#include "noise_module_base.cuh"

// Constants used by the current version of libnoise.
const int X_NOISE_GEN = 1619;
const int Y_NOISE_GEN = 31337;
const int Z_NOISE_GEN = 6971;
const int SEED_NOISE_GEN = 1013;
const int SHIFT_NOISE_GEN = 8;

NoiseModule::NoiseModule() {

}

double NoiseModule::GetValue(double x, double y, double z) {
    return 0.0;
}

double NoiseModule::MakeInt32Range(double n) {
    if (n >= 1073741824.0) {
        return (2.0 * fmod (n, 1073741824.0)) - 1073741824.0;
    }
    else if (n <= -1073741824.0) {
        return (2.0 * fmod (n, 1073741824.0)) + 1073741824.0;
    }
    else {
        return n;
    }
}

double NoiseModule::GradientNoise3D(double fx, double fy, double fz, int ix,
                                    int iy, int iz, int seed) {
    // Randomly generate a gradient vector given the integer coordinates of the
    // input value.  This implementation generates a random number and uses it
    // as an index into a normalized-vector lookup table.
    int vectorIndex = ( X_NOISE_GEN    * ix
                        + Y_NOISE_GEN    * iy
                        + Z_NOISE_GEN    * iz
                        + SEED_NOISE_GEN * seed) & 0xffffffff;
    vectorIndex ^= (vectorIndex >> SHIFT_NOISE_GEN);
    vectorIndex &= 0xff;

    double xvGradient = g_randomVectors((vectorIndex << 2)    );
    double yvGradient = g_randomVectors((vectorIndex << 2) + 1);
    double zvGradient = g_randomVectors((vectorIndex << 2) + 2);

    // Set up us another vector equal to the distance between the two vectors
    // passed to this function.
    double xvPoint = (fx - (double)ix);
    double yvPoint = (fy - (double)iy);
    double zvPoint = (fz - (double)iz);

    // Now compute the dot product of the gradient vector with the distance
    // vector.  The resulting value is gradient noise.  Apply a scaling value
    // so that this noise value ranges from -1.0 to 1.0.
    return ((xvGradient * xvPoint)
            + (yvGradient * yvPoint)
            + (zvGradient * zvPoint)) * 2.12;
}

double NoiseModule::GradientCoherentNoise3D(double x, double y, double z,
                                            int seed) {
    // Create a unit-length cube aligned along an integer boundary.  This cube
    // surrounds the input point.
    int x0 = (x > 0.0? (int)x: (int)x - 1);
    int x1 = x0 + 1;
    int y0 = (y > 0.0? (int)y: (int)y - 1);
    int y1 = y0 + 1;
    int z0 = (z > 0.0? (int)z: (int)z - 1);
    int z1 = z0 + 1;

    // Map the difference between the coordinates of the input value and the
    // coordinates of the cube's outer-lower-left vertex onto an S-curve.
    double xs = 0, ys = 0, zs = 0;
    xs = SCurve3 (x - (double)x0);
    ys = SCurve3 (y - (double)y0);
    zs = SCurve3 (z - (double)z0);

    // Now calculate the noise values at each vertex of the cube.  To generate
    // the coherent-noise value at the input point, interpolate these eight
    // noise values using the S-curve value as the interpolant (trilinear
    // interpolation.)
    double n0, n1, ix0, ix1, iy0, iy1;
    n0   = GradientNoise3D (x, y, z, x0, y0, z0, seed);
    n1   = GradientNoise3D (x, y, z, x1, y0, z0, seed);
    ix0  = LinearInterp (n0, n1, xs);
    n0   = GradientNoise3D (x, y, z, x0, y1, z0, seed);
    n1   = GradientNoise3D (x, y, z, x1, y1, z0, seed);
    ix1  = LinearInterp (n0, n1, xs);
    iy0  = LinearInterp (ix0, ix1, ys);
    n0   = GradientNoise3D (x, y, z, x0, y0, z1, seed);
    n1   = GradientNoise3D (x, y, z, x1, y0, z1, seed);
    ix0  = LinearInterp (n0, n1, xs);
    n0   = GradientNoise3D (x, y, z, x0, y1, z1, seed);
    n1   = GradientNoise3D (x, y, z, x1, y1, z1, seed);
    ix1  = LinearInterp (n0, n1, xs);
    iy1  = LinearInterp (ix0, ix1, ys);

    return LinearInterp (iy0, iy1, zs);
}

double NoiseModule::LinearInterp(double n0, double n1, double a) {
    return ((1.0 - a) * n0) + (a * n1);
}

double NoiseModule::SCurve3(double a) {
    return (a * a * (3.0 - 2.0 * a));
}

	.file	"tmpxft_0032040c_00000000-6_noise_module_base.cudafe1.cpp"
	.text
#APP

#NO_APP
	.type	_ZL26__cudaUnregisterBinaryUtilv, @function
_ZL26__cudaUnregisterBinaryUtilv:
.LFB2019:
	.cfi_startproc
	endbr64
	movq	_ZL20__cudaFatCubinHandle(%rip), %rdi
	jmp	__cudaUnregisterFatBinary@PLT
	.cfi_endproc
.LFE2019:
	.size	_ZL26__cudaUnregisterBinaryUtilv, .-_ZL26__cudaUnregisterBinaryUtilv
	.align 2
	.globl	_ZN11NoiseModuleC2Ev
	.type	_ZN11NoiseModuleC2Ev, @function
_ZN11NoiseModuleC2Ev:
.LFB2009:
	.cfi_startproc
	endbr64
	ret
	.cfi_endproc
.LFE2009:
	.size	_ZN11NoiseModuleC2Ev, .-_ZN11NoiseModuleC2Ev
	.globl	_ZN11NoiseModuleC1Ev
	.set	_ZN11NoiseModuleC1Ev,_ZN11NoiseModuleC2Ev
	.align 2
	.globl	_ZN11NoiseModule8GetValueEddd
	.type	_ZN11NoiseModule8GetValueEddd, @function
_ZN11NoiseModule8GetValueEddd:
.LFB2011:
	.cfi_startproc
	endbr64
	xorps	%xmm0, %xmm0
	ret
	.cfi_endproc
.LFE2011:
	.size	_ZN11NoiseModule8GetValueEddd, .-_ZN11NoiseModule8GetValueEddd
	.align 2
	.globl	_ZN11NoiseModule14MakeInt32RangeEd
	.type	_ZN11NoiseModule14MakeInt32RangeEd, @function
_ZN11NoiseModule14MakeInt32RangeEd:
.LFB2012:
	.cfi_startproc
	endbr64
	pushq	%rdx
	.cfi_def_cfa_offset 16
	comisd	.LC1(%rip), %xmm0
	jb	.L11
	movsd	.LC1(%rip), %xmm1
	call	fmod@PLT
	addsd	%xmm0, %xmm0
	subsd	.LC1(%rip), %xmm0
	jmp	.L7
.L11:
	movsd	.LC2(%rip), %xmm1
	comisd	%xmm0, %xmm1
	jb	.L7
	movsd	.LC1(%rip), %xmm1
	call	fmod@PLT
	addsd	%xmm0, %xmm0
	addsd	.LC1(%rip), %xmm0
.L7:
	popq	%rax
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE2012:
	.size	_ZN11NoiseModule14MakeInt32RangeEd, .-_ZN11NoiseModule14MakeInt32RangeEd
	.align 2
	.globl	_ZN11NoiseModule15GradientNoise3DEdddiiii
	.type	_ZN11NoiseModule15GradientNoise3DEdddiiii, @function
_ZN11NoiseModule15GradientNoise3DEdddiiii:
.LFB2013:
	.cfi_startproc
	endbr64
	pushq	%r14
	.cfi_def_cfa_offset 16
	.cfi_offset 14, -16
	imull	$1619, %esi, %eax
	movl	%ecx, %r14d
	pushq	%r13
	.cfi_def_cfa_offset 24
	.cfi_offset 13, -24
	movl	%edx, %r13d
	imull	$31337, %edx, %edx
	imull	$1013, %r8d, %r8d
	pushq	%r12
	.cfi_def_cfa_offset 32
	.cfi_offset 12, -32
	movl	%esi, %r12d
	pushq	%rbp
	.cfi_def_cfa_offset 40
	.cfi_offset 6, -40
	movq	%rdi, %rbp
	addl	%edx, %eax
	imull	$6971, %ecx, %edx
	pushq	%rbx
	.cfi_def_cfa_offset 48
	.cfi_offset 3, -48
	addl	%edx, %eax
	subq	$48, %rsp
	.cfi_def_cfa_offset 96
	addl	%r8d, %eax
	movsd	%xmm1, 32(%rsp)
	movl	%eax, %ebx
	movsd	%xmm2, 24(%rsp)
	sarl	$8, %ebx
	movsd	%xmm0, 40(%rsp)
	xorl	%eax, %ebx
	sall	$2, %ebx
	andl	$1020, %ebx
	movl	%ebx, %esi
	call	_ZN11NoiseModule15g_randomVectorsEi@PLT
	leal	1(%rbx), %esi
	movq	%rbp, %rdi
	movsd	%xmm0, 8(%rsp)
	call	_ZN11NoiseModule15g_randomVectorsEi@PLT
	leal	2(%rbx), %esi
	movq	%rbp, %rdi
	movsd	%xmm0, 16(%rsp)
	call	_ZN11NoiseModule15g_randomVectorsEi@PLT
	cvtsi2sdl	%r12d, %xmm5
	movsd	40(%rsp), %xmm3
	movsd	32(%rsp), %xmm1
	movaps	%xmm0, %xmm4
	movsd	8(%rsp), %xmm0
	movsd	24(%rsp), %xmm2
	subsd	%xmm5, %xmm3
	mulsd	%xmm3, %xmm0
	cvtsi2sdl	%r13d, %xmm3
	subsd	%xmm3, %xmm1
	mulsd	16(%rsp), %xmm1
	addsd	%xmm1, %xmm0
	cvtsi2sdl	%r14d, %xmm1
	subsd	%xmm1, %xmm2
	mulsd	%xmm4, %xmm2
	addsd	%xmm2, %xmm0
	mulsd	.LC3(%rip), %xmm0
	addq	$48, %rsp
	.cfi_def_cfa_offset 48
	popq	%rbx
	.cfi_def_cfa_offset 40
	popq	%rbp
	.cfi_def_cfa_offset 32
	popq	%r12
	.cfi_def_cfa_offset 24
	popq	%r13
	.cfi_def_cfa_offset 16
	popq	%r14
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE2013:
	.size	_ZN11NoiseModule15GradientNoise3DEdddiiii, .-_ZN11NoiseModule15GradientNoise3DEdddiiii
	.align 2
	.globl	_ZN11NoiseModule23GradientCoherentNoise3DEdddi
	.type	_ZN11NoiseModule23GradientCoherentNoise3DEdddi, @function
_ZN11NoiseModule23GradientCoherentNoise3DEdddi:
.LFB2014:
	.cfi_startproc
	endbr64
	pushq	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	pushq	%r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	pushq	%r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	pushq	%r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	pushq	%rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	cvttsd2sil	%xmm0, %ebp
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	movl	%esi, %ebx
	subq	$120, %rsp
	.cfi_def_cfa_offset 176
	movsd	%xmm0, 8(%rsp)
	movsd	8(%rsp), %xmm7
	xorps	%xmm0, %xmm0
	movq	%rdi, 16(%rsp)
	comisd	%xmm0, %xmm7
	ja	.L17
	decl	%ebp
.L17:
	xorps	%xmm0, %xmm0
	cvttsd2sil	%xmm1, %r12d
	leal	1(%rbp), %eax
	comisd	%xmm0, %xmm1
	movl	%eax, 36(%rsp)
	ja	.L18
	decl	%r12d
.L18:
	xorps	%xmm0, %xmm0
	cvttsd2sil	%xmm2, %r13d
	leal	1(%r12), %r15d
	comisd	%xmm0, %xmm2
	ja	.L19
	decl	%r13d
.L19:
	cvtsi2sdl	%ebp, %xmm3
	movsd	8(%rsp), %xmm0
	movl	%ebx, %r8d
	movl	%r13d, %ecx
	movq	16(%rsp), %rdi
	movl	%r12d, %edx
	movl	%ebp, %esi
	movsd	%xmm2, 56(%rsp)
	movsd	.LC4(%rip), %xmm5
	movsd	%xmm1, 40(%rsp)
	leal	1(%r13), %r14d
	subsd	%xmm3, %xmm0
	movaps	%xmm5, %xmm3
	movaps	%xmm0, %xmm4
	addsd	%xmm0, %xmm4
	mulsd	%xmm0, %xmm0
	subsd	%xmm4, %xmm3
	mulsd	%xmm0, %xmm3
	movaps	%xmm1, %xmm0
	movsd	%xmm3, 24(%rsp)
	cvtsi2sdl	%r12d, %xmm3
	subsd	%xmm3, %xmm0
	movaps	%xmm5, %xmm3
	movaps	%xmm0, %xmm4
	addsd	%xmm0, %xmm4
	mulsd	%xmm0, %xmm0
	subsd	%xmm4, %xmm3
	mulsd	%xmm0, %xmm3
	movaps	%xmm2, %xmm0
	movsd	%xmm3, 48(%rsp)
	cvtsi2sdl	%r13d, %xmm3
	subsd	%xmm3, %xmm0
	movaps	%xmm0, %xmm3
	addsd	%xmm0, %xmm3
	mulsd	%xmm0, %xmm0
	subsd	%xmm3, %xmm5
	mulsd	%xmm0, %xmm5
	movsd	8(%rsp), %xmm0
	movsd	%xmm5, 104(%rsp)
	call	_ZN11NoiseModule15GradientNoise3DEdddiiii
	movl	36(%rsp), %esi
	movl	%ebx, %r8d
	movl	%r13d, %ecx
	movsd	56(%rsp), %xmm2
	movsd	40(%rsp), %xmm1
	movsd	%xmm0, 72(%rsp)
	movl	%r12d, %edx
	movq	16(%rsp), %rdi
	movsd	8(%rsp), %xmm0
	movsd	%xmm2, 64(%rsp)
	movsd	%xmm1, 56(%rsp)
	call	_ZN11NoiseModule15GradientNoise3DEdddiiii
	movsd	72(%rsp), %xmm3
	movl	%ebx, %r8d
	movl	%ebp, %esi
	movsd	.LC5(%rip), %xmm7
	subsd	24(%rsp), %xmm7
	movl	%r13d, %ecx
	movl	%r15d, %edx
	mulsd	24(%rsp), %xmm0
	movsd	64(%rsp), %xmm2
	movsd	56(%rsp), %xmm1
	movq	16(%rsp), %rdi
	mulsd	%xmm7, %xmm3
	movsd	%xmm7, 40(%rsp)
	addsd	%xmm0, %xmm3
	movsd	8(%rsp), %xmm0
	movsd	%xmm3, 80(%rsp)
	call	_ZN11NoiseModule15GradientNoise3DEdddiiii
	movl	36(%rsp), %esi
	movl	%ebx, %r8d
	movl	%r13d, %ecx
	movsd	64(%rsp), %xmm2
	movsd	56(%rsp), %xmm1
	movsd	%xmm0, 72(%rsp)
	movl	%r15d, %edx
	movq	16(%rsp), %rdi
	movsd	8(%rsp), %xmm0
	call	_ZN11NoiseModule15GradientNoise3DEdddiiii
	movsd	72(%rsp), %xmm4
	movl	%ebx, %r8d
	movl	%ebp, %esi
	mulsd	24(%rsp), %xmm0
	movsd	80(%rsp), %xmm3
	movl	%r14d, %ecx
	movl	%r12d, %edx
	mulsd	40(%rsp), %xmm4
	movsd	.LC5(%rip), %xmm6
	subsd	48(%rsp), %xmm6
	movsd	64(%rsp), %xmm2
	movsd	56(%rsp), %xmm1
	movq	16(%rsp), %rdi
	movsd	%xmm2, 80(%rsp)
	mulsd	%xmm6, %xmm3
	movsd	%xmm6, 96(%rsp)
	addsd	%xmm0, %xmm4
	mulsd	48(%rsp), %xmm4
	movsd	8(%rsp), %xmm0
	addsd	%xmm3, %xmm4
	movsd	%xmm4, 72(%rsp)
	call	_ZN11NoiseModule15GradientNoise3DEdddiiii
	movl	36(%rsp), %esi
	movl	%ebx, %r8d
	movl	%r14d, %ecx
	movsd	80(%rsp), %xmm2
	movsd	56(%rsp), %xmm1
	movsd	%xmm0, 64(%rsp)
	movl	%r12d, %edx
	movq	16(%rsp), %rdi
	movsd	8(%rsp), %xmm0
	call	_ZN11NoiseModule15GradientNoise3DEdddiiii
	movsd	64(%rsp), %xmm3
	movl	%ebx, %r8d
	movl	%ebp, %esi
	mulsd	24(%rsp), %xmm0
	movsd	80(%rsp), %xmm2
	movl	%r14d, %ecx
	movl	%r15d, %edx
	mulsd	40(%rsp), %xmm3
	movsd	56(%rsp), %xmm1
	movq	16(%rsp), %rdi
	movsd	%xmm2, 88(%rsp)
	movsd	%xmm1, 80(%rsp)
	addsd	%xmm0, %xmm3
	movsd	8(%rsp), %xmm0
	movsd	%xmm3, 64(%rsp)
	call	_ZN11NoiseModule15GradientNoise3DEdddiiii
	movl	36(%rsp), %esi
	movl	%ebx, %r8d
	movl	%r14d, %ecx
	movsd	80(%rsp), %xmm1
	movsd	%xmm0, 56(%rsp)
	movq	16(%rsp), %rdi
	movl	%r15d, %edx
	movsd	88(%rsp), %xmm2
	movsd	8(%rsp), %xmm0
	call	_ZN11NoiseModule15GradientNoise3DEdddiiii
	movsd	56(%rsp), %xmm1
	mulsd	24(%rsp), %xmm0
	mulsd	40(%rsp), %xmm1
	movsd	96(%rsp), %xmm6
	movsd	104(%rsp), %xmm5
	addsd	%xmm0, %xmm1
	movsd	64(%rsp), %xmm0
	mulsd	48(%rsp), %xmm1
	mulsd	%xmm6, %xmm0
	addsd	%xmm1, %xmm0
	movsd	.LC5(%rip), %xmm1
	subsd	%xmm5, %xmm1
	mulsd	72(%rsp), %xmm1
	addq	$120, %rsp
	.cfi_def_cfa_offset 56
	mulsd	%xmm5, %xmm0
	popq	%rbx
	.cfi_def_cfa_offset 48
	popq	%rbp
	.cfi_def_cfa_offset 40
	popq	%r12
	.cfi_def_cfa_offset 32
	popq	%r13
	.cfi_def_cfa_offset 24
	popq	%r14
	.cfi_def_cfa_offset 16
	popq	%r15
	.cfi_def_cfa_offset 8
	addsd	%xmm1, %xmm0
	ret
	.cfi_endproc
.LFE2014:
	.size	_ZN11NoiseModule23GradientCoherentNoise3DEdddi, .-_ZN11NoiseModule23GradientCoherentNoise3DEdddi
	.align 2
	.globl	_ZN11NoiseModule12LinearInterpEddd
	.type	_ZN11NoiseModule12LinearInterpEddd, @function
_ZN11NoiseModule12LinearInterpEddd:
.LFB2015:
	.cfi_startproc
	endbr64
	movaps	%xmm0, %xmm3
	movsd	.LC5(%rip), %xmm0
	subsd	%xmm2, %xmm0
	mulsd	%xmm1, %xmm2
	mulsd	%xmm3, %xmm0
	addsd	%xmm2, %xmm0
	ret
	.cfi_endproc
.LFE2015:
	.size	_ZN11NoiseModule12LinearInterpEddd, .-_ZN11NoiseModule12LinearInterpEddd
	.align 2
	.globl	_ZN11NoiseModule7SCurve3Ed
	.type	_ZN11NoiseModule7SCurve3Ed, @function
_ZN11NoiseModule7SCurve3Ed:
.LFB2016:
	.cfi_startproc
	endbr64
	movaps	%xmm0, %xmm2
	movaps	%xmm0, %xmm1
	addsd	%xmm0, %xmm2
	mulsd	%xmm1, %xmm1
	movsd	.LC4(%rip), %xmm0
	subsd	%xmm2, %xmm0
	mulsd	%xmm1, %xmm0
	ret
	.cfi_endproc
.LFE2016:
	.size	_ZN11NoiseModule7SCurve3Ed, .-_ZN11NoiseModule7SCurve3Ed
	.section	.text.startup,"ax",@progbits
	.type	_ZL24__sti____cudaRegisterAllv, @function
_ZL24__sti____cudaRegisterAllv:
.LFB2042:
	.cfi_startproc
	endbr64
	pushq	%rax
	.cfi_def_cfa_offset 16
	leaq	_ZL15__fatDeviceText(%rip), %rdi
	call	__cudaRegisterFatBinary@PLT
	movq	%rax, %rdi
	movq	%rax, _ZL20__cudaFatCubinHandle(%rip)
	call	__cudaRegisterFatBinaryEnd@PLT
	leaq	_ZL26__cudaUnregisterBinaryUtilv(%rip), %rdi
	popq	%rdx
	.cfi_def_cfa_offset 8
	jmp	atexit@PLT
	.cfi_endproc
.LFE2042:
	.size	_ZL24__sti____cudaRegisterAllv, .-_ZL24__sti____cudaRegisterAllv
	.section	.init_array,"aw"
	.align 8
	.quad	_ZL24__sti____cudaRegisterAllv
	.section	.nvFatBinSegment,"aw"
	.align 8
	.type	_ZL15__fatDeviceText, @object
	.size	_ZL15__fatDeviceText, 24
_ZL15__fatDeviceText:
	.long	1180844977
	.long	1
	.quad	fatbinData
	.quad	0
	.local	_ZL20__cudaFatCubinHandle
	.comm	_ZL20__cudaFatCubinHandle,8,8
	.section	.rodata.cst8,"aM",@progbits,8
	.align 8
.LC1:
	.long	0
	.long	1104150528
	.align 8
.LC2:
	.long	0
	.long	-1043333120
	.align 8
.LC3:
	.long	-1889785610
	.long	1073804738
	.align 8
.LC4:
	.long	0
	.long	1074266112
	.align 8
.LC5:
	.long	0
	.long	1072693248
	.ident	"GCC: (Ubuntu 13.3.0-6ubuntu2~24.04) 13.3.0"
	.section	.note.GNU-stack,"",@progbits
	.section	.note.gnu.property,"a"
	.align 8
	.long	1f - 0f
	.long	4f - 1f
	.long	5
0:
	.string	"GNU"
1:
	.align 8
	.long	0xc0000002
	.long	3f - 2f
2:
	.long	0x3
3:
	.align 8
4:


#include <hip/hip_runtime.h>
#include "noise_module_base.cuh"

// Constants used by the current version of libnoise.
const int X_NOISE_GEN = 1619;
const int Y_NOISE_GEN = 31337;
const int Z_NOISE_GEN = 6971;
const int SEED_NOISE_GEN = 1013;
const int SHIFT_NOISE_GEN = 8;

NoiseModule::NoiseModule() {

}

double NoiseModule::GetValue(double x, double y, double z) {
    return 0.0;
}

double NoiseModule::MakeInt32Range(double n) {
    if (n >= 1073741824.0) {
        return (2.0 * fmod (n, 1073741824.0)) - 1073741824.0;
    }
    else if (n <= -1073741824.0) {
        return (2.0 * fmod (n, 1073741824.0)) + 1073741824.0;
    }
    else {
        return n;
    }
}

double NoiseModule::GradientNoise3D(double fx, double fy, double fz, int ix,
                                    int iy, int iz, int seed) {
    // Randomly generate a gradient vector given the integer coordinates of the
    // input value.  This implementation generates a random number and uses it
    // as an index into a normalized-vector lookup table.
    int vectorIndex = ( X_NOISE_GEN    * ix
                        + Y_NOISE_GEN    * iy
                        + Z_NOISE_GEN    * iz
                        + SEED_NOISE_GEN * seed) & 0xffffffff;
    vectorIndex ^= (vectorIndex >> SHIFT_NOISE_GEN);
    vectorIndex &= 0xff;

    double xvGradient = g_randomVectors((vectorIndex << 2)    );
    double yvGradient = g_randomVectors((vectorIndex << 2) + 1);
    double zvGradient = g_randomVectors((vectorIndex << 2) + 2);

    // Set up us another vector equal to the distance between the two vectors
    // passed to this function.
    double xvPoint = (fx - (double)ix);
    double yvPoint = (fy - (double)iy);
    double zvPoint = (fz - (double)iz);

    // Now compute the dot product of the gradient vector with the distance
    // vector.  The resulting value is gradient noise.  Apply a scaling value
    // so that this noise value ranges from -1.0 to 1.0.
    return ((xvGradient * xvPoint)
            + (yvGradient * yvPoint)
            + (zvGradient * zvPoint)) * 2.12;
}

double NoiseModule::GradientCoherentNoise3D(double x, double y, double z,
                                            int seed) {
    // Create a unit-length cube aligned along an integer boundary.  This cube
    // surrounds the input point.
    int x0 = (x > 0.0? (int)x: (int)x - 1);
    int x1 = x0 + 1;
    int y0 = (y > 0.0? (int)y: (int)y - 1);
    int y1 = y0 + 1;
    int z0 = (z > 0.0? (int)z: (int)z - 1);
    int z1 = z0 + 1;

    // Map the difference between the coordinates of the input value and the
    // coordinates of the cube's outer-lower-left vertex onto an S-curve.
    double xs = 0, ys = 0, zs = 0;
    xs = SCurve3 (x - (double)x0);
    ys = SCurve3 (y - (double)y0);
    zs = SCurve3 (z - (double)z0);

    // Now calculate the noise values at each vertex of the cube.  To generate
    // the coherent-noise value at the input point, interpolate these eight
    // noise values using the S-curve value as the interpolant (trilinear
    // interpolation.)
    double n0, n1, ix0, ix1, iy0, iy1;
    n0   = GradientNoise3D (x, y, z, x0, y0, z0, seed);
    n1   = GradientNoise3D (x, y, z, x1, y0, z0, seed);
    ix0  = LinearInterp (n0, n1, xs);
    n0   = GradientNoise3D (x, y, z, x0, y1, z0, seed);
    n1   = GradientNoise3D (x, y, z, x1, y1, z0, seed);
    ix1  = LinearInterp (n0, n1, xs);
    iy0  = LinearInterp (ix0, ix1, ys);
    n0   = GradientNoise3D (x, y, z, x0, y0, z1, seed);
    n1   = GradientNoise3D (x, y, z, x1, y0, z1, seed);
    ix0  = LinearInterp (n0, n1, xs);
    n0   = GradientNoise3D (x, y, z, x0, y1, z1, seed);
    n1   = GradientNoise3D (x, y, z, x1, y1, z1, seed);
    ix1  = LinearInterp (n0, n1, xs);
    iy1  = LinearInterp (ix0, ix1, ys);

    return LinearInterp (iy0, iy1, zs);
}

double NoiseModule::LinearInterp(double n0, double n1, double a) {
    return ((1.0 - a) * n0) + (a * n1);
}

double NoiseModule::SCurve3(double a) {
    return (a * a * (3.0 - 2.0 * a));
}

	.text
	.file	"noise_module_base.hip"
	.globl	_ZN11NoiseModuleC2Ev            # -- Begin function _ZN11NoiseModuleC2Ev
	.p2align	1, 0x90
	.type	_ZN11NoiseModuleC2Ev,@function
_ZN11NoiseModuleC2Ev:                   # @_ZN11NoiseModuleC2Ev
	.cfi_startproc
# %bb.0:
	retq
.Lfunc_end0:
	.size	_ZN11NoiseModuleC2Ev, .Lfunc_end0-_ZN11NoiseModuleC2Ev
	.cfi_endproc
                                        # -- End function
	.globl	_ZN11NoiseModule8GetValueEddd   # -- Begin function _ZN11NoiseModule8GetValueEddd
	.p2align	1, 0x90
	.type	_ZN11NoiseModule8GetValueEddd,@function
_ZN11NoiseModule8GetValueEddd:          # @_ZN11NoiseModule8GetValueEddd
	.cfi_startproc
# %bb.0:
	xorps	%xmm0, %xmm0
	retq
.Lfunc_end1:
	.size	_ZN11NoiseModule8GetValueEddd, .Lfunc_end1-_ZN11NoiseModule8GetValueEddd
	.cfi_endproc
                                        # -- End function
	.section	.rodata.cst8,"aM",@progbits,8
	.p2align	3, 0x0                          # -- Begin function _ZN11NoiseModule14MakeInt32RangeEd
.LCPI2_0:
	.quad	0xc1d0000000000000              # double -1073741824
.LCPI2_1:
	.quad	0x41d0000000000000              # double 1073741824
	.text
	.globl	_ZN11NoiseModule14MakeInt32RangeEd
	.p2align	1, 0x90
	.type	_ZN11NoiseModule14MakeInt32RangeEd,@function
_ZN11NoiseModule14MakeInt32RangeEd:     # @_ZN11NoiseModule14MakeInt32RangeEd
	.cfi_startproc
# %bb.0:
	pushq	%rax
	.cfi_def_cfa_offset 16
	movsd	.LCPI2_0(%rip), %xmm1           # xmm1 = mem[0],zero
	ucomisd	.LCPI2_1(%rip), %xmm0
	jae	.LBB2_3
# %bb.1:
	ucomisd	%xmm0, %xmm1
	jb	.LBB2_4
# %bb.2:
	movsd	.LCPI2_1(%rip), %xmm1           # xmm1 = mem[0],zero
.LBB2_3:                                # %.sink.split
	movsd	%xmm1, (%rsp)                   # 8-byte Spill
	movsd	.LCPI2_1(%rip), %xmm1           # xmm1 = mem[0],zero
	callq	fmod
	addsd	%xmm0, %xmm0
	addsd	(%rsp), %xmm0                   # 8-byte Folded Reload
.LBB2_4:
	popq	%rax
	.cfi_def_cfa_offset 8
	retq
.Lfunc_end2:
	.size	_ZN11NoiseModule14MakeInt32RangeEd, .Lfunc_end2-_ZN11NoiseModule14MakeInt32RangeEd
	.cfi_endproc
                                        # -- End function
	.section	.rodata.cst8,"aM",@progbits,8
	.p2align	3, 0x0                          # -- Begin function _ZN11NoiseModule15GradientNoise3DEdddiiii
.LCPI3_0:
	.quad	0x4000f5c28f5c28f6              # double 2.1200000000000001
	.text
	.globl	_ZN11NoiseModule15GradientNoise3DEdddiiii
	.p2align	1, 0x90
	.type	_ZN11NoiseModule15GradientNoise3DEdddiiii,@function
_ZN11NoiseModule15GradientNoise3DEdddiiii: # @_ZN11NoiseModule15GradientNoise3DEdddiiii
	.cfi_startproc
# %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	pushq	%r15
	.cfi_def_cfa_offset 24
	pushq	%r14
	.cfi_def_cfa_offset 32
	pushq	%r12
	.cfi_def_cfa_offset 40
	pushq	%rbx
	.cfi_def_cfa_offset 48
	subq	$48, %rsp
	.cfi_def_cfa_offset 96
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	.cfi_offset %rbp, -16
	movl	%ecx, %ebx
	movl	%edx, %ebp
	movl	%esi, %r14d
	movsd	%xmm2, 40(%rsp)                 # 8-byte Spill
	movsd	%xmm1, 32(%rsp)                 # 8-byte Spill
	movsd	%xmm0, 24(%rsp)                 # 8-byte Spill
	movq	%rdi, %r15
	imull	$1619, %esi, %eax               # imm = 0x653
	imull	$31337, %edx, %ecx              # imm = 0x7A69
	addl	%eax, %ecx
	imull	$6971, %ebx, %eax               # imm = 0x1B3B
	imull	$1013, %r8d, %edx               # imm = 0x3F5
	addl	%eax, %edx
	addl	%ecx, %edx
	movl	%edx, %eax
	shrl	$8, %eax
	xorl	%edx, %eax
	movzbl	%al, %r12d
	shll	$2, %r12d
	movl	%r12d, %esi
	callq	_ZN11NoiseModule15g_randomVectorsEi
	movsd	%xmm0, 16(%rsp)                 # 8-byte Spill
	leal	1(%r12), %esi
	movq	%r15, %rdi
	callq	_ZN11NoiseModule15g_randomVectorsEi
	movsd	%xmm0, 8(%rsp)                  # 8-byte Spill
	orl	$2, %r12d
	movq	%r15, %rdi
	movl	%r12d, %esi
	callq	_ZN11NoiseModule15g_randomVectorsEi
	xorps	%xmm1, %xmm1
	cvtsi2sd	%r14d, %xmm1
	movsd	24(%rsp), %xmm4                 # 8-byte Reload
                                        # xmm4 = mem[0],zero
	subsd	%xmm1, %xmm4
	xorps	%xmm1, %xmm1
	cvtsi2sd	%ebp, %xmm1
	movsd	32(%rsp), %xmm2                 # 8-byte Reload
                                        # xmm2 = mem[0],zero
	subsd	%xmm1, %xmm2
	xorps	%xmm1, %xmm1
	cvtsi2sd	%ebx, %xmm1
	movsd	40(%rsp), %xmm3                 # 8-byte Reload
                                        # xmm3 = mem[0],zero
	subsd	%xmm1, %xmm3
	mulsd	16(%rsp), %xmm4                 # 8-byte Folded Reload
	mulsd	8(%rsp), %xmm2                  # 8-byte Folded Reload
	addsd	%xmm4, %xmm2
	mulsd	%xmm3, %xmm0
	addsd	%xmm2, %xmm0
	mulsd	.LCPI3_0(%rip), %xmm0
	addq	$48, %rsp
	.cfi_def_cfa_offset 48
	popq	%rbx
	.cfi_def_cfa_offset 40
	popq	%r12
	.cfi_def_cfa_offset 32
	popq	%r14
	.cfi_def_cfa_offset 24
	popq	%r15
	.cfi_def_cfa_offset 16
	popq	%rbp
	.cfi_def_cfa_offset 8
	retq
.Lfunc_end3:
	.size	_ZN11NoiseModule15GradientNoise3DEdddiiii, .Lfunc_end3-_ZN11NoiseModule15GradientNoise3DEdddiiii
	.cfi_endproc
                                        # -- End function
	.section	.rodata.cst8,"aM",@progbits,8
	.p2align	3, 0x0                          # -- Begin function _ZN11NoiseModule23GradientCoherentNoise3DEdddi
.LCPI4_0:
	.quad	0x4008000000000000              # double 3
.LCPI4_1:
	.quad	0x3ff0000000000000              # double 1
	.text
	.globl	_ZN11NoiseModule23GradientCoherentNoise3DEdddi
	.p2align	1, 0x90
	.type	_ZN11NoiseModule23GradientCoherentNoise3DEdddi,@function
_ZN11NoiseModule23GradientCoherentNoise3DEdddi: # @_ZN11NoiseModule23GradientCoherentNoise3DEdddi
	.cfi_startproc
# %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	pushq	%r15
	.cfi_def_cfa_offset 24
	pushq	%r14
	.cfi_def_cfa_offset 32
	pushq	%r13
	.cfi_def_cfa_offset 40
	pushq	%r12
	.cfi_def_cfa_offset 48
	pushq	%rbx
	.cfi_def_cfa_offset 56
	subq	$104, %rsp
	.cfi_def_cfa_offset 160
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	.cfi_offset %rbp, -16
	movl	%esi, %r14d
	movq	%rdi, %r15
	xorpd	%xmm3, %xmm3
	xorl	%eax, %eax
	ucomisd	%xmm3, %xmm0
	setbe	%al
	cvttsd2si	%xmm0, %r13d
	subl	%eax, %r13d
	xorl	%eax, %eax
	ucomisd	%xmm3, %xmm1
	setbe	%al
	cvttsd2si	%xmm1, %ebp
	movapd	%xmm1, %xmm4
	subl	%eax, %ebp
	xorl	%eax, %eax
	ucomisd	%xmm3, %xmm2
	setbe	%al
	cvttsd2si	%xmm2, %r12d
	movapd	%xmm2, %xmm5
	subl	%eax, %r12d
	leal	1(%rbp), %eax
	movl	%eax, 36(%rsp)                  # 4-byte Spill
	leal	1(%r13), %ebx
	leal	1(%r12), %eax
	movl	%eax, 84(%rsp)                  # 4-byte Spill
	xorps	%xmm2, %xmm2
	cvtsi2sd	%r13d, %xmm2
	movsd	%xmm0, 16(%rsp)                 # 8-byte Spill
	movapd	%xmm0, %xmm1
	subsd	%xmm2, %xmm1
	movapd	%xmm1, %xmm2
	mulsd	%xmm1, %xmm2
	addsd	%xmm1, %xmm1
	movsd	.LCPI4_0(%rip), %xmm3           # xmm3 = mem[0],zero
	movapd	%xmm3, %xmm6
	subsd	%xmm1, %xmm6
	mulsd	%xmm2, %xmm6
	movsd	%xmm6, 40(%rsp)                 # 8-byte Spill
	xorps	%xmm2, %xmm2
	cvtsi2sd	%ebp, %xmm2
	movapd	%xmm4, %xmm1
	movsd	%xmm4, (%rsp)                   # 8-byte Spill
	subsd	%xmm2, %xmm1
	movapd	%xmm1, %xmm2
	mulsd	%xmm1, %xmm2
	addsd	%xmm1, %xmm1
	movapd	%xmm3, %xmm6
	subsd	%xmm1, %xmm6
	xorps	%xmm1, %xmm1
	cvtsi2sd	%r12d, %xmm1
	mulsd	%xmm2, %xmm6
	movsd	%xmm6, 88(%rsp)                 # 8-byte Spill
	movsd	%xmm5, 8(%rsp)                  # 8-byte Spill
	movapd	%xmm5, %xmm2
	subsd	%xmm1, %xmm2
	movapd	%xmm2, %xmm1
	mulsd	%xmm2, %xmm1
	addsd	%xmm2, %xmm2
	subsd	%xmm2, %xmm3
	mulsd	%xmm1, %xmm3
	movsd	%xmm3, 96(%rsp)                 # 8-byte Spill
	movapd	%xmm4, %xmm1
	movapd	%xmm5, %xmm2
	movl	%r13d, %esi
	movq	%r13, 56(%rsp)                  # 8-byte Spill
	movl	%ebp, %edx
	movl	%r12d, %ecx
	movl	%r14d, %r8d
	callq	_ZN11NoiseModule15GradientNoise3DEdddiiii
	movsd	%xmm0, 24(%rsp)                 # 8-byte Spill
	movq	%r15, %rdi
	movsd	16(%rsp), %xmm0                 # 8-byte Reload
                                        # xmm0 = mem[0],zero
	movsd	(%rsp), %xmm1                   # 8-byte Reload
                                        # xmm1 = mem[0],zero
	movsd	8(%rsp), %xmm2                  # 8-byte Reload
                                        # xmm2 = mem[0],zero
	movl	%ebx, 80(%rsp)                  # 4-byte Spill
	movl	%ebx, %esi
	movl	%ebp, %edx
	movl	%r12d, %ecx
	movl	%r14d, %r8d
	callq	_ZN11NoiseModule15GradientNoise3DEdddiiii
	movsd	.LCPI4_1(%rip), %xmm1           # xmm1 = mem[0],zero
	movsd	40(%rsp), %xmm2                 # 8-byte Reload
                                        # xmm2 = mem[0],zero
	subsd	%xmm2, %xmm1
	movsd	%xmm1, 72(%rsp)                 # 8-byte Spill
	movsd	24(%rsp), %xmm3                 # 8-byte Reload
                                        # xmm3 = mem[0],zero
	mulsd	%xmm1, %xmm3
	mulsd	%xmm2, %xmm0
	addsd	%xmm3, %xmm0
	movsd	%xmm0, 24(%rsp)                 # 8-byte Spill
	movq	%r15, %rdi
	movsd	16(%rsp), %xmm0                 # 8-byte Reload
                                        # xmm0 = mem[0],zero
	movsd	(%rsp), %xmm1                   # 8-byte Reload
                                        # xmm1 = mem[0],zero
	movsd	8(%rsp), %xmm2                  # 8-byte Reload
                                        # xmm2 = mem[0],zero
	movl	%r13d, %esi
	movl	36(%rsp), %r13d                 # 4-byte Reload
	movl	%r13d, %edx
	movl	%r12d, %ecx
	movl	%r14d, %r8d
	callq	_ZN11NoiseModule15GradientNoise3DEdddiiii
	movsd	%xmm0, 64(%rsp)                 # 8-byte Spill
	movq	%r15, %rdi
	movsd	16(%rsp), %xmm0                 # 8-byte Reload
                                        # xmm0 = mem[0],zero
	movsd	(%rsp), %xmm1                   # 8-byte Reload
                                        # xmm1 = mem[0],zero
	movsd	8(%rsp), %xmm2                  # 8-byte Reload
                                        # xmm2 = mem[0],zero
	movl	%ebx, %esi
	movl	%r13d, %edx
	movl	%r12d, %ecx
	movl	%r14d, %ebx
	movl	%r14d, %r8d
	callq	_ZN11NoiseModule15GradientNoise3DEdddiiii
	movapd	%xmm0, %xmm1
	movsd	64(%rsp), %xmm0                 # 8-byte Reload
                                        # xmm0 = mem[0],zero
	mulsd	72(%rsp), %xmm0                 # 8-byte Folded Reload
	mulsd	40(%rsp), %xmm1                 # 8-byte Folded Reload
	addsd	%xmm0, %xmm1
	movsd	.LCPI4_1(%rip), %xmm2           # xmm2 = mem[0],zero
	movsd	88(%rsp), %xmm0                 # 8-byte Reload
                                        # xmm0 = mem[0],zero
	subsd	%xmm0, %xmm2
	movsd	%xmm2, 64(%rsp)                 # 8-byte Spill
	movsd	24(%rsp), %xmm3                 # 8-byte Reload
                                        # xmm3 = mem[0],zero
	mulsd	%xmm2, %xmm3
	mulsd	%xmm0, %xmm1
	addsd	%xmm3, %xmm1
	movsd	%xmm1, 24(%rsp)                 # 8-byte Spill
	movq	%r15, %rdi
	movsd	16(%rsp), %xmm0                 # 8-byte Reload
                                        # xmm0 = mem[0],zero
	movsd	(%rsp), %xmm1                   # 8-byte Reload
                                        # xmm1 = mem[0],zero
	movsd	8(%rsp), %xmm2                  # 8-byte Reload
                                        # xmm2 = mem[0],zero
	movq	56(%rsp), %r14                  # 8-byte Reload
	movl	%r14d, %esi
	movl	%ebp, %edx
	movl	84(%rsp), %r13d                 # 4-byte Reload
	movl	%r13d, %ecx
	movl	%ebx, %r8d
	callq	_ZN11NoiseModule15GradientNoise3DEdddiiii
	movsd	%xmm0, 48(%rsp)                 # 8-byte Spill
	movq	%r15, %rdi
	movsd	16(%rsp), %xmm0                 # 8-byte Reload
                                        # xmm0 = mem[0],zero
	movsd	(%rsp), %xmm1                   # 8-byte Reload
                                        # xmm1 = mem[0],zero
	movsd	8(%rsp), %xmm2                  # 8-byte Reload
                                        # xmm2 = mem[0],zero
	movl	80(%rsp), %r12d                 # 4-byte Reload
	movl	%r12d, %esi
	movl	%ebp, %edx
	movl	%r13d, %ecx
	movl	%ebx, %r8d
	callq	_ZN11NoiseModule15GradientNoise3DEdddiiii
	movsd	48(%rsp), %xmm1                 # 8-byte Reload
                                        # xmm1 = mem[0],zero
	mulsd	72(%rsp), %xmm1                 # 8-byte Folded Reload
	mulsd	40(%rsp), %xmm0                 # 8-byte Folded Reload
	addsd	%xmm1, %xmm0
	movsd	%xmm0, 48(%rsp)                 # 8-byte Spill
	movq	%r15, %rdi
	movsd	16(%rsp), %xmm0                 # 8-byte Reload
                                        # xmm0 = mem[0],zero
	movsd	(%rsp), %xmm1                   # 8-byte Reload
                                        # xmm1 = mem[0],zero
	movsd	8(%rsp), %xmm2                  # 8-byte Reload
                                        # xmm2 = mem[0],zero
	movl	%r14d, %esi
	movl	36(%rsp), %ebp                  # 4-byte Reload
	movl	%ebp, %edx
	movl	%r13d, %ecx
	movl	%ebx, %r8d
	callq	_ZN11NoiseModule15GradientNoise3DEdddiiii
	movsd	%xmm0, 56(%rsp)                 # 8-byte Spill
	movq	%r15, %rdi
	movsd	16(%rsp), %xmm0                 # 8-byte Reload
                                        # xmm0 = mem[0],zero
	movsd	(%rsp), %xmm1                   # 8-byte Reload
                                        # xmm1 = mem[0],zero
	movsd	8(%rsp), %xmm2                  # 8-byte Reload
                                        # xmm2 = mem[0],zero
	movl	%r12d, %esi
	movl	%ebp, %edx
	movl	%r13d, %ecx
	movl	%ebx, %r8d
	callq	_ZN11NoiseModule15GradientNoise3DEdddiiii
	movsd	56(%rsp), %xmm1                 # 8-byte Reload
                                        # xmm1 = mem[0],zero
	mulsd	72(%rsp), %xmm1                 # 8-byte Folded Reload
	mulsd	40(%rsp), %xmm0                 # 8-byte Folded Reload
	addsd	%xmm1, %xmm0
	movsd	48(%rsp), %xmm1                 # 8-byte Reload
                                        # xmm1 = mem[0],zero
	mulsd	64(%rsp), %xmm1                 # 8-byte Folded Reload
	mulsd	88(%rsp), %xmm0                 # 8-byte Folded Reload
	addsd	%xmm1, %xmm0
	movsd	96(%rsp), %xmm1                 # 8-byte Reload
                                        # xmm1 = mem[0],zero
	movsd	.LCPI4_1(%rip), %xmm2           # xmm2 = mem[0],zero
	subsd	%xmm1, %xmm2
	mulsd	24(%rsp), %xmm2                 # 8-byte Folded Reload
	mulsd	%xmm1, %xmm0
	addsd	%xmm2, %xmm0
	addq	$104, %rsp
	.cfi_def_cfa_offset 56
	popq	%rbx
	.cfi_def_cfa_offset 48
	popq	%r12
	.cfi_def_cfa_offset 40
	popq	%r13
	.cfi_def_cfa_offset 32
	popq	%r14
	.cfi_def_cfa_offset 24
	popq	%r15
	.cfi_def_cfa_offset 16
	popq	%rbp
	.cfi_def_cfa_offset 8
	retq
.Lfunc_end4:
	.size	_ZN11NoiseModule23GradientCoherentNoise3DEdddi, .Lfunc_end4-_ZN11NoiseModule23GradientCoherentNoise3DEdddi
	.cfi_endproc
                                        # -- End function
	.section	.rodata.cst8,"aM",@progbits,8
	.p2align	3, 0x0                          # -- Begin function _ZN11NoiseModule7SCurve3Ed
.LCPI5_0:
	.quad	0x4008000000000000              # double 3
	.text
	.globl	_ZN11NoiseModule7SCurve3Ed
	.p2align	1, 0x90
	.type	_ZN11NoiseModule7SCurve3Ed,@function
_ZN11NoiseModule7SCurve3Ed:             # @_ZN11NoiseModule7SCurve3Ed
	.cfi_startproc
# %bb.0:
	movapd	%xmm0, %xmm2
	mulsd	%xmm0, %xmm2
	addsd	%xmm0, %xmm0
	movsd	.LCPI5_0(%rip), %xmm1           # xmm1 = mem[0],zero
	subsd	%xmm0, %xmm1
	mulsd	%xmm2, %xmm1
	movapd	%xmm1, %xmm0
	retq
.Lfunc_end5:
	.size	_ZN11NoiseModule7SCurve3Ed, .Lfunc_end5-_ZN11NoiseModule7SCurve3Ed
	.cfi_endproc
                                        # -- End function
	.section	.rodata.cst8,"aM",@progbits,8
	.p2align	3, 0x0                          # -- Begin function _ZN11NoiseModule12LinearInterpEddd
.LCPI6_0:
	.quad	0x3ff0000000000000              # double 1
	.text
	.globl	_ZN11NoiseModule12LinearInterpEddd
	.p2align	1, 0x90
	.type	_ZN11NoiseModule12LinearInterpEddd,@function
_ZN11NoiseModule12LinearInterpEddd:     # @_ZN11NoiseModule12LinearInterpEddd
	.cfi_startproc
# %bb.0:
	movsd	.LCPI6_0(%rip), %xmm3           # xmm3 = mem[0],zero
	subsd	%xmm2, %xmm3
	mulsd	%xmm3, %xmm0
	mulsd	%xmm2, %xmm1
	addsd	%xmm1, %xmm0
	retq
.Lfunc_end6:
	.size	_ZN11NoiseModule12LinearInterpEddd, .Lfunc_end6-_ZN11NoiseModule12LinearInterpEddd
	.cfi_endproc
                                        # -- End function
	.type	__hip_cuid_,@object             # @__hip_cuid_
	.bss
	.globl	__hip_cuid_
__hip_cuid_:
	.byte	0                               # 0x0
	.size	__hip_cuid_, 1

	.globl	_ZN11NoiseModuleC1Ev
	.type	_ZN11NoiseModuleC1Ev,@function
.set _ZN11NoiseModuleC1Ev, _ZN11NoiseModuleC2Ev
	.ident	"AMD clang version 18.0.0git (https://github.com/RadeonOpenCompute/llvm-project roc-6.3.2 25012 e5bf7e55c91490b07c49d8960fa7983d864936c4)"
	.section	".note.GNU-stack","",@progbits
	.addrsig
	.addrsig_sym __hip_cuid_

	.text
	.p2alignl 7, 3214868480
	.fill 96, 4, 3214868480
	.type	__hip_cuid_,@object             ; @__hip_cuid_
	.section	.bss,"aw",@nobits
	.globl	__hip_cuid_
__hip_cuid_:
	.byte	0                               ; 0x0
	.size	__hip_cuid_, 1

	.ident	"AMD clang version 18.0.0git (https://github.com/RadeonOpenCompute/llvm-project roc-6.3.2 25012 e5bf7e55c91490b07c49d8960fa7983d864936c4)"
	.section	".note.GNU-stack","",@progbits
	.addrsig
	.addrsig_sym __hip_cuid_
	.amdgcn_target "amdgcn-amd-amdhsa--gfx1100"
	.amdgpu_metadata
---
amdhsa.kernels:  []
amdhsa.target:   amdgcn-amd-amdhsa--gfx1100
amdhsa.version:
  - 1
  - 2
...

	.end_amdgpu_metadata
