#include <stdio.h>
#include <time.h>




#define ADIABATIC_GAMMA (5.0 / 3.0)
#define min2(a, b) (a) < (b) ? (a) : (b)
#define max2(a, b) (a) > (b) ? (a) : (b)
typedef double real;

__host__ __device__ void conserved_to_primitive(const real *cons, real *prim)
{
    const real newton_iter_max = 50;
    const real error_tolerance = 1e-12 * cons[0];
    const real gm              = ADIABATIC_GAMMA;
    const real m               = cons[0];
    const real tau             = cons[3];
    const real ss              = cons[1] * cons[1] + cons[2] * cons[2];
    int iteration              = 0;
    real p                     = prim[3];
    real w0;

    while (1) {
        const real et = tau + p + m;
        const real b2 = min2(ss / et / et, 1.0 - 1e-10);
        const real w2 = 1.0 / (1.0 - b2);
        const real w  = sqrt(w2);
        const real e  = (tau + m * (1.0 - w) + p * (1.0 - w2)) / (m * w);
        const real d  = m / w;
        const real h  = 1.0 + e + p / d;
        const real a2 = gm * p / (d * h);
        const real f  = d * e * (gm - 1.0) - p;
        const real g  = b2 * a2 - 1.0;

        p -= f / g;

        if (fabs(f) < error_tolerance || iteration == newton_iter_max) {
            w0 = w;
            break;
        }
        iteration += 1;
    }

    prim[0] = m / w0;
    prim[1] = w0 * cons[1] / (tau + m + p);
    prim[2] = w0 * cons[2] / (tau + m + p);
    prim[3] = p;
}

__host__ __device__ real primitive_to_gamma_beta_squared(const real *prim)
{
    const real u1 = prim[1];
    const real u2 = prim[2];
    return u1 * u1 + u2 * u2;
}

__host__ __device__ real primitive_to_lorentz_factor(const real *prim)
{
    return sqrt(1.0 + primitive_to_gamma_beta_squared(prim));
}

__host__ __device__ real primitive_to_gamma_beta_component(const real *prim, int direction)
{
    switch (direction)
    {
        case 0: return prim[1];
        case 1: return prim[2];
        default: return 0.0;
    }
}

__host__ __device__ real primitive_to_beta_component(const real *prim, int direction)
{
    const real w = primitive_to_lorentz_factor(prim);

    switch (direction)
    {
        case 0: return prim[1] / w;
        case 1: return prim[2] / w;
        default: return 0.0;
    }
}

__host__ __device__ real primitive_to_enthalpy_density(const real* prim)
{
    const real rho = prim[0];
    const real pre = prim[3];
    return rho + pre * (1.0 + 1.0 / (ADIABATIC_GAMMA - 1.0));
}

__host__ __device__ __host__ void primitive_to_conserved(const real *prim, real *cons)
{
    const real rho = prim[0];
    const real u1 = prim[1];
    const real u2 = prim[2];
    const real pre = prim[3];

    const real w = primitive_to_lorentz_factor(prim);
    const real h = primitive_to_enthalpy_density(prim) / rho;
    const real m = rho * w;

    cons[0] = m;
    cons[1] = m * h * u1;
    cons[2] = m * h * u2;
    cons[3] = m * (h * w - 1.0) - pre;
}

__host__ __device__ void primitive_to_flux_vector(const real *prim, real *flux, int direction)
{
    const real vn = primitive_to_beta_component(prim, direction);
    const real pre = prim[3];
    real cons[4];
    primitive_to_conserved(prim, cons);

    flux[0] = vn * cons[0];
    flux[1] = vn * cons[1] + pre * (direction == 0);
    flux[2] = vn * cons[2] + pre * (direction == 1);
    flux[3] = vn * cons[3] + pre * vn;
}

__host__ __device__ real primitive_to_sound_speed_squared(const real *prim)
{
    const real pre = prim[3];
    const real rho_h = primitive_to_enthalpy_density(prim);
    return ADIABATIC_GAMMA * pre / rho_h;
}

__host__ __device__ void primitive_to_outer_wavespeeds(const real *prim, real *wavespeeds, int direction)
{
    const real a2 = primitive_to_sound_speed_squared(prim);
    const real un = primitive_to_gamma_beta_component(prim, direction);
    const real uu = primitive_to_gamma_beta_squared(prim);
    const real vv = uu / (1.0 + uu);
    const real v2 = un * un / (1.0 + uu);
    const real vn = sqrt(v2);
    const real k0 = sqrt(a2 * (1.0 - vv) * (1.0 - vv * a2 - v2 * (1.0 - a2)));

    wavespeeds[0] = (vn * (1.0 - a2) - k0) / (1.0 - vv * a2);
    wavespeeds[1] = (vn * (1.0 - a2) + k0) / (1.0 - vv * a2);
}

__device__ void riemann_hlle(const real *pl, const real *pr, real *flux, int direction)
{
    real ul[4];
    real ur[4];
    real fl[4];
    real fr[4];
    real al[2];
    real ar[2];

    primitive_to_conserved(pl, ul);
    primitive_to_conserved(pr, ur);
    primitive_to_flux_vector(pl, fl, direction);
    primitive_to_flux_vector(pr, fr, direction);
    primitive_to_outer_wavespeeds(pl, al, direction);
    primitive_to_outer_wavespeeds(pr, ar, direction);

    const real am = min2(0.0, min2(al[0], ar[0]));
    const real ap = max2(0.0, max2(al[1], ar[1]));

    for (int i = 0; i < 4; ++i)
    {
        flux[i] = (fl[i] * ap - fr[i] * am - (ul[i] - ur[i]) * ap * am) / (ap - am);
    }
}

void initial_primitive(real *primitive, int num_zones, real x0, real x1)
{
    real dx = (x1 - x0) / num_zones;

    for (int i = 0; i < num_zones; ++i)
    {
        real x = (i + 0.5) * dx;
        real *prim = &primitive[i * 4];

        if (x < 0.5 * (x0 + x1))
        {
            prim[0] = 1.0;
            prim[1] = 0.0;
            prim[2] = 0.0;
            prim[3] = 1.0;
        }
        else
        {
            prim[0] = 0.1;
            prim[1] = 0.0;
            prim[2] = 0.0;
            prim[3] = 0.125;
        }
    }
}

struct UpdateStruct
{
    int num_zones;
    real x0;
    real x1;
    real *primitive;
    real *conserved;
    real *flux;
};

struct UpdateStruct update_struct_new(int num_zones, real x0, real x1)
{
    struct UpdateStruct update;
    update.num_zones = num_zones;
    update.x0 = x0;
    update.x1 = x1;

    cudaMalloc(&update.primitive, num_zones * 4 * sizeof(real));
    cudaMalloc(&update.conserved, num_zones * 4 * sizeof(real));
    cudaMalloc(&update.flux, (num_zones + 1) * 4 * sizeof(real));

    return update;
}

void update_struct_del(struct UpdateStruct update)
{
    cudaFree(update.primitive);
    cudaFree(update.conserved);
    cudaFree(update.flux);
}

void update_struct_set_primitive(struct UpdateStruct update, const real *primitive_host)
{
    real *conserved_host = (real*) malloc(update.num_zones * 4 * sizeof(real));

    for (int i = 0; i < update.num_zones; ++i)
    {
        const real *prim = &primitive_host[4 * i];
        /* */ real *cons = &conserved_host[4 * i];
        primitive_to_conserved(prim, cons);
    }

    cudaMemcpy(
        update.primitive,
        primitive_host,
        update.num_zones * 4 * sizeof(real),
        cudaMemcpyHostToDevice
    );

    cudaMemcpy(
        update.conserved,
        conserved_host,
        update.num_zones * 4 * sizeof(real),
        cudaMemcpyHostToDevice
    );
    free(conserved_host);
}

void update_struct_get_primitive(struct UpdateStruct update, real *primitive_host)
{
    cudaMemcpy(primitive_host,
        update.primitive,
        update.num_zones * 4 * sizeof(real),
        cudaMemcpyDeviceToHost
    );
}

__global__ void update_struct_do_compute_flux(UpdateStruct update)
{
    int i = blockIdx.x * blockDim.x + threadIdx.x;
    if (i >= update.num_zones + 1)
        return;

    int il = i - 1;
    int ir = i;

    if (il == -1)
        il += 1;

    if (ir == update.num_zones)
        ir -= 1;

    const real *pl = &update.primitive[4 * il];
    const real *pr = &update.primitive[4 * ir];
    real *flux = &update.flux[4 * i];
    riemann_hlle(pl, pr, flux, 0);
}

__global__ void update_struct_do_advance_cons(UpdateStruct update, real dt)
{
    int i = blockIdx.x * blockDim.x + threadIdx.x;
    if (i >= update.num_zones)
        return;

    const real dx = (update.x1 - update.x0) / update.num_zones;
    const real *fl = &update.flux[4 * (i + 0)];
    const real *fr = &update.flux[4 * (i + 1)];
    real *cons = &update.conserved[4 * i];
    real *prim = &update.primitive[4 * i];

    for (int q = 0; q < 4; ++q)
    {
        cons[q] -= (fr[q] - fl[q]) * dt / dx;
    }
    conserved_to_primitive(cons, prim);
}

int main()
{
    const int num_zones = 1 << 16;
    const int block_size = 32;
    const int fold = 100;
    const real x0 = 0.0;
    const real x1 = 1.0;
    const real dx = (x1 - x0) / num_zones;

    real *primitive = (real*) malloc(num_zones * 4 * sizeof(real));
    struct UpdateStruct update = update_struct_new(num_zones, x0, x1);

    initial_primitive(primitive, num_zones, x0, x1);
    update_struct_set_primitive(update, primitive);

    int iteration = 0;
    real time = 0.0;
    real dt = dx * 0.1;

    while (time < 0.1)
    {
        clock_t start = clock();

        for (int i = 0; i < fold; ++i)
        {
            update_struct_do_compute_flux<<<num_zones / block_size + 1, block_size>>>(update);
            update_struct_do_advance_cons<<<num_zones / block_size + 0, block_size>>>(update, dt);

            time += dt;
            iteration += 1;
        }
        clock_t end = clock();

        real seconds = ((real) (end - start)) / CLOCKS_PER_SEC;
        real mzps = (num_zones / 1e6) / seconds * fold;
        printf("[%d] t=%.3e Mzps=%.2f\n", iteration, time, mzps);
    }

    update_struct_get_primitive(update, primitive);
    update_struct_del(update);

    FILE* outfile = fopen("sr1d.dat", "w");

    for (int i = 0; i < num_zones; ++i)
    {
        real *prim = &primitive[i * 4];
        real x = (i + 0.5) * dx;
        fprintf(outfile, "%f %f %f %f\n", x, prim[0], prim[1], prim[3]);
    }
    fclose(outfile);
    free(primitive);

    cudaError_t error = cudaGetLastError();

    if (error)
    {
        printf("%s\n", cudaGetErrorString(error));
    }
    return 0;
}

	.file	"tmpxft_0038e3c4_00000000-6_sr1d.cudafe1.cpp"
	.text
#APP

#NO_APP
	.type	_ZL26__cudaUnregisterBinaryUtilv, @function
_ZL26__cudaUnregisterBinaryUtilv:
.LFB2046:
	.cfi_startproc
	endbr64
	movq	_ZL20__cudaFatCubinHandle(%rip), %rdi
	jmp	__cudaUnregisterFatBinary@PLT
	.cfi_endproc
.LFE2046:
	.size	_ZL26__cudaUnregisterBinaryUtilv, .-_ZL26__cudaUnregisterBinaryUtilv
	.globl	_Z22conserved_to_primitivePKdPd
	.type	_Z22conserved_to_primitivePKdPd, @function
_Z22conserved_to_primitivePKdPd:
.LFB2027:
	.cfi_startproc
	endbr64
	pushq	%r12
	.cfi_def_cfa_offset 16
	.cfi_offset 12, -16
	movl	$51, %r12d
	pushq	%rbp
	.cfi_def_cfa_offset 24
	.cfi_offset 6, -24
	movq	%rsi, %rbp
	pushq	%rbx
	.cfi_def_cfa_offset 32
	.cfi_offset 3, -32
	movq	%rdi, %rbx
	subq	$64, %rsp
	.cfi_def_cfa_offset 96
	movsd	8(%rdi), %xmm8
	movsd	16(%rdi), %xmm0
	movsd	(%rdi), %xmm1
	movsd	24(%rdi), %xmm6
	mulsd	%xmm8, %xmm8
	movsd	24(%rsi), %xmm3
	movsd	.LC1(%rip), %xmm10
	mulsd	%xmm0, %xmm0
	mulsd	%xmm1, %xmm10
	addsd	%xmm0, %xmm8
.L7:
	movaps	%xmm3, %xmm0
	movaps	%xmm8, %xmm7
	movsd	.LC2(%rip), %xmm5
	movsd	%xmm6, 40(%rsp)
	addsd	%xmm6, %xmm0
	movsd	%xmm10, 56(%rsp)
	movaps	%xmm5, %xmm6
	movsd	%xmm3, 48(%rsp)
	movsd	%xmm1, 32(%rsp)
	addsd	%xmm1, %xmm0
	movsd	%xmm8, 24(%rsp)
	divsd	%xmm0, %xmm7
	divsd	%xmm0, %xmm7
	movaps	%xmm5, %xmm0
	minsd	.LC0(%rip), %xmm7
	subsd	%xmm7, %xmm0
	movsd	%xmm7, 16(%rsp)
	divsd	%xmm0, %xmm6
	movaps	%xmm6, %xmm0
	movsd	%xmm6, 8(%rsp)
	call	sqrt@PLT
	movsd	32(%rsp), %xmm1
	movsd	.LC2(%rip), %xmm5
	movaps	%xmm0, %xmm2
	movsd	48(%rsp), %xmm3
	movsd	40(%rsp), %xmm6
	movaps	%xmm1, %xmm9
	movaps	%xmm5, %xmm0
	movaps	%xmm5, %xmm4
	movsd	16(%rsp), %xmm7
	divsd	%xmm2, %xmm9
	subsd	%xmm2, %xmm0
	movaps	%xmm3, %xmm12
	movsd	.LC4(%rip), %xmm11
	subsd	8(%rsp), %xmm4
	movsd	56(%rsp), %xmm10
	mulsd	%xmm3, %xmm11
	movsd	24(%rsp), %xmm8
	mulsd	%xmm1, %xmm0
	mulsd	%xmm3, %xmm4
	addsd	%xmm6, %xmm0
	addsd	%xmm4, %xmm0
	movaps	%xmm1, %xmm4
	mulsd	%xmm2, %xmm4
	divsd	%xmm4, %xmm0
	divsd	%xmm9, %xmm12
	movaps	%xmm0, %xmm4
	addsd	%xmm5, %xmm0
	mulsd	%xmm9, %xmm4
	mulsd	.LC3(%rip), %xmm4
	subsd	%xmm3, %xmm4
	addsd	%xmm12, %xmm0
	mulsd	%xmm9, %xmm0
	divsd	%xmm0, %xmm11
	movaps	%xmm11, %xmm0
	mulsd	%xmm7, %xmm0
	subsd	%xmm5, %xmm0
	movaps	%xmm4, %xmm5
	andps	.LC5(%rip), %xmm4
	comisd	%xmm4, %xmm10
	divsd	%xmm0, %xmm5
	subsd	%xmm5, %xmm3
	jbe	.L11
.L6:
	movsd	%xmm9, 0(%rbp)
	movsd	8(%rbx), %xmm0
	addsd	%xmm6, %xmm1
	mulsd	%xmm2, %xmm0
	addsd	%xmm3, %xmm1
	divsd	%xmm1, %xmm0
	movsd	%xmm0, 8(%rbp)
	mulsd	16(%rbx), %xmm2
	movsd	%xmm3, 24(%rbp)
	divsd	%xmm1, %xmm2
	movsd	%xmm2, 16(%rbp)
	addq	$64, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 32
	popq	%rbx
	.cfi_def_cfa_offset 24
	popq	%rbp
	.cfi_def_cfa_offset 16
	popq	%r12
	.cfi_def_cfa_offset 8
	ret
.L11:
	.cfi_restore_state
	decl	%r12d
	jne	.L7
	jmp	.L6
	.cfi_endproc
.LFE2027:
	.size	_Z22conserved_to_primitivePKdPd, .-_Z22conserved_to_primitivePKdPd
	.globl	_Z31primitive_to_gamma_beta_squaredPKd
	.type	_Z31primitive_to_gamma_beta_squaredPKd, @function
_Z31primitive_to_gamma_beta_squaredPKd:
.LFB2028:
	.cfi_startproc
	endbr64
	movsd	8(%rdi), %xmm0
	movsd	16(%rdi), %xmm1
	mulsd	%xmm0, %xmm0
	mulsd	%xmm1, %xmm1
	addsd	%xmm1, %xmm0
	ret
	.cfi_endproc
.LFE2028:
	.size	_Z31primitive_to_gamma_beta_squaredPKd, .-_Z31primitive_to_gamma_beta_squaredPKd
	.globl	_Z27primitive_to_lorentz_factorPKd
	.type	_Z27primitive_to_lorentz_factorPKd, @function
_Z27primitive_to_lorentz_factorPKd:
.LFB2029:
	.cfi_startproc
	endbr64
	pushq	%rax
	.cfi_def_cfa_offset 16
	call	_Z31primitive_to_gamma_beta_squaredPKd
	addsd	.LC2(%rip), %xmm0
	popq	%rdx
	.cfi_def_cfa_offset 8
	jmp	sqrt@PLT
	.cfi_endproc
.LFE2029:
	.size	_Z27primitive_to_lorentz_factorPKd, .-_Z27primitive_to_lorentz_factorPKd
	.globl	_Z33primitive_to_gamma_beta_componentPKdi
	.type	_Z33primitive_to_gamma_beta_componentPKdi, @function
_Z33primitive_to_gamma_beta_componentPKdi:
.LFB2030:
	.cfi_startproc
	endbr64
	testl	%esi, %esi
	je	.L19
	decl	%esi
	je	.L20
	xorps	%xmm0, %xmm0
	ret
.L19:
	movsd	8(%rdi), %xmm0
	ret
.L20:
	movsd	16(%rdi), %xmm0
	ret
	.cfi_endproc
.LFE2030:
	.size	_Z33primitive_to_gamma_beta_componentPKdi, .-_Z33primitive_to_gamma_beta_componentPKdi
	.globl	_Z27primitive_to_beta_componentPKdi
	.type	_Z27primitive_to_beta_componentPKdi, @function
_Z27primitive_to_beta_componentPKdi:
.LFB2031:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movl	%esi, %ebp
	pushq	%rbx
	.cfi_def_cfa_offset 24
	.cfi_offset 3, -24
	movq	%rdi, %rbx
	pushq	%rdx
	.cfi_def_cfa_offset 32
	call	_Z27primitive_to_lorentz_factorPKd
	movaps	%xmm0, %xmm1
	testl	%ebp, %ebp
	je	.L23
	decl	%ebp
	xorps	%xmm0, %xmm0
	jne	.L22
	movsd	16(%rbx), %xmm0
	jmp	.L27
.L23:
	movsd	8(%rbx), %xmm0
.L27:
	divsd	%xmm1, %xmm0
.L22:
	popq	%rax
	.cfi_def_cfa_offset 24
	popq	%rbx
	.cfi_def_cfa_offset 16
	popq	%rbp
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE2031:
	.size	_Z27primitive_to_beta_componentPKdi, .-_Z27primitive_to_beta_componentPKdi
	.globl	_Z29primitive_to_enthalpy_densityPKd
	.type	_Z29primitive_to_enthalpy_densityPKd, @function
_Z29primitive_to_enthalpy_densityPKd:
.LFB2032:
	.cfi_startproc
	endbr64
	movsd	.LC7(%rip), %xmm0
	mulsd	24(%rdi), %xmm0
	addsd	(%rdi), %xmm0
	ret
	.cfi_endproc
.LFE2032:
	.size	_Z29primitive_to_enthalpy_densityPKd, .-_Z29primitive_to_enthalpy_densityPKd
	.globl	_Z22primitive_to_conservedPKdPd
	.type	_Z22primitive_to_conservedPKdPd, @function
_Z22primitive_to_conservedPKdPd:
.LFB2033:
	.cfi_startproc
	endbr64
	pushq	%rbx
	.cfi_def_cfa_offset 16
	.cfi_offset 3, -16
	movq	%rsi, %rbx
	subq	$32, %rsp
	.cfi_def_cfa_offset 48
	movsd	(%rdi), %xmm1
	movsd	8(%rdi), %xmm4
	movsd	24(%rdi), %xmm5
	movsd	16(%rdi), %xmm6
	movsd	%xmm1, 24(%rsp)
	movsd	%xmm4, 16(%rsp)
	movsd	%xmm5, 8(%rsp)
	movsd	%xmm6, (%rsp)
	call	_Z27primitive_to_lorentz_factorPKd
	movsd	8(%rsp), %xmm5
	movsd	.LC7(%rip), %xmm2
	movsd	24(%rsp), %xmm1
	movsd	16(%rsp), %xmm4
	mulsd	%xmm5, %xmm2
	addsd	%xmm1, %xmm2
	divsd	%xmm1, %xmm2
	mulsd	%xmm0, %xmm1
	movsd	%xmm1, (%rbx)
	mulsd	%xmm2, %xmm0
	movaps	%xmm2, %xmm3
	subsd	.LC2(%rip), %xmm0
	mulsd	%xmm1, %xmm3
	mulsd	%xmm1, %xmm0
	mulsd	%xmm3, %xmm4
	mulsd	(%rsp), %xmm3
	subsd	%xmm5, %xmm0
	movsd	%xmm4, 8(%rbx)
	movsd	%xmm3, 16(%rbx)
	movsd	%xmm0, 24(%rbx)
	addq	$32, %rsp
	.cfi_def_cfa_offset 16
	popq	%rbx
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE2033:
	.size	_Z22primitive_to_conservedPKdPd, .-_Z22primitive_to_conservedPKdPd
	.globl	_Z24primitive_to_flux_vectorPKdPdi
	.type	_Z24primitive_to_flux_vectorPKdPdi, @function
_Z24primitive_to_flux_vectorPKdPdi:
.LFB2034:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movl	%edx, %ebp
	pushq	%rbx
	.cfi_def_cfa_offset 24
	.cfi_offset 3, -24
	movq	%rsi, %rbx
	movl	%edx, %esi
	subq	$72, %rsp
	.cfi_def_cfa_offset 96
	movq	%fs:40, %rax
	movq	%rax, 56(%rsp)
	xorl	%eax, %eax
	movq	%rdi, (%rsp)
	call	_Z27primitive_to_beta_componentPKdi
	movq	(%rsp), %rdi
	leaq	24(%rsp), %rsi
	movsd	%xmm0, 8(%rsp)
	movsd	24(%rdi), %xmm2
	movsd	%xmm2, (%rsp)
	call	_Z22primitive_to_conservedPKdPd
	movsd	8(%rsp), %xmm0
	movsd	24(%rsp), %xmm1
	testl	%ebp, %ebp
	movsd	32(%rsp), %xmm3
	movsd	(%rsp), %xmm2
	mulsd	%xmm0, %xmm1
	mulsd	%xmm0, %xmm3
	movsd	%xmm1, (%rbx)
	movsd	.LC2(%rip), %xmm1
	je	.L32
	xorps	%xmm1, %xmm1
.L32:
	mulsd	%xmm2, %xmm1
	decl	%ebp
	addsd	%xmm3, %xmm1
	movsd	40(%rsp), %xmm3
	mulsd	%xmm0, %xmm3
	movsd	%xmm1, 8(%rbx)
	xorps	%xmm1, %xmm1
	jne	.L33
	movsd	.LC2(%rip), %xmm1
.L33:
	mulsd	%xmm2, %xmm1
	addsd	%xmm3, %xmm1
	movsd	%xmm1, 16(%rbx)
	movsd	48(%rsp), %xmm1
	mulsd	%xmm0, %xmm1
	mulsd	%xmm2, %xmm0
	addsd	%xmm0, %xmm1
	movsd	%xmm1, 24(%rbx)
	movq	56(%rsp), %rax
	subq	%fs:40, %rax
	je	.L34
	call	__stack_chk_fail@PLT
.L34:
	addq	$72, %rsp
	.cfi_def_cfa_offset 24
	popq	%rbx
	.cfi_def_cfa_offset 16
	popq	%rbp
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE2034:
	.size	_Z24primitive_to_flux_vectorPKdPdi, .-_Z24primitive_to_flux_vectorPKdPdi
	.globl	_Z32primitive_to_sound_speed_squaredPKd
	.type	_Z32primitive_to_sound_speed_squaredPKd, @function
_Z32primitive_to_sound_speed_squaredPKd:
.LFB2035:
	.cfi_startproc
	endbr64
	movsd	24(%rdi), %xmm1
	movsd	.LC4(%rip), %xmm0
	mulsd	%xmm1, %xmm0
	mulsd	.LC7(%rip), %xmm1
	addsd	(%rdi), %xmm1
	divsd	%xmm1, %xmm0
	ret
	.cfi_endproc
.LFE2035:
	.size	_Z32primitive_to_sound_speed_squaredPKd, .-_Z32primitive_to_sound_speed_squaredPKd
	.globl	_Z29primitive_to_outer_wavespeedsPKdPdi
	.type	_Z29primitive_to_outer_wavespeedsPKdPdi, @function
_Z29primitive_to_outer_wavespeedsPKdPdi:
.LFB2036:
	.cfi_startproc
	endbr64
	pushq	%rbx
	.cfi_def_cfa_offset 16
	.cfi_offset 3, -16
	movq	%rsi, %rbx
	movl	%edx, %esi
	subq	$32, %rsp
	.cfi_def_cfa_offset 48
	call	_Z32primitive_to_sound_speed_squaredPKd
	movsd	%xmm0, 24(%rsp)
	call	_Z33primitive_to_gamma_beta_componentPKdi
	movaps	%xmm0, %xmm2
	call	_Z31primitive_to_gamma_beta_squaredPKd
	mulsd	%xmm2, %xmm2
	movsd	.LC2(%rip), %xmm1
	movaps	%xmm0, %xmm4
	addsd	%xmm1, %xmm0
	divsd	%xmm0, %xmm2
	divsd	%xmm0, %xmm4
	movaps	%xmm2, %xmm0
	movsd	%xmm2, 8(%rsp)
	movsd	%xmm4, 16(%rsp)
	call	sqrt@PLT
	movsd	24(%rsp), %xmm5
	movsd	16(%rsp), %xmm4
	movsd	.LC2(%rip), %xmm1
	movsd	%xmm0, (%rsp)
	movsd	8(%rsp), %xmm2
	movaps	%xmm5, %xmm0
	mulsd	%xmm4, %xmm0
	movaps	%xmm1, %xmm3
	movaps	%xmm1, %xmm6
	subsd	%xmm5, %xmm3
	subsd	%xmm4, %xmm1
	mulsd	%xmm3, %xmm2
	movsd	%xmm3, 16(%rsp)
	subsd	%xmm0, %xmm6
	mulsd	%xmm5, %xmm1
	movaps	%xmm6, %xmm0
	movsd	%xmm6, 8(%rsp)
	subsd	%xmm2, %xmm0
	mulsd	%xmm1, %xmm0
	call	sqrt@PLT
	movsd	16(%rsp), %xmm3
	mulsd	(%rsp), %xmm3
	movsd	8(%rsp), %xmm6
	movaps	%xmm3, %xmm1
	addsd	%xmm0, %xmm3
	subsd	%xmm0, %xmm1
	divsd	%xmm6, %xmm3
	divsd	%xmm6, %xmm1
	movsd	%xmm3, 8(%rbx)
	movsd	%xmm1, (%rbx)
	addq	$32, %rsp
	.cfi_def_cfa_offset 16
	popq	%rbx
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE2036:
	.size	_Z29primitive_to_outer_wavespeedsPKdPdi, .-_Z29primitive_to_outer_wavespeedsPKdPdi
	.globl	_Z12riemann_hllePKdS0_Pdi
	.type	_Z12riemann_hllePKdS0_Pdi, @function
_Z12riemann_hllePKdS0_Pdi:
.LFB2037:
	.cfi_startproc
	endbr64
	pushq	%rax
	.cfi_def_cfa_offset 16
	popq	%rax
	.cfi_def_cfa_offset 8
	subq	$24, %rsp
	.cfi_def_cfa_offset 32
	movl	$1, 12(%rsp)
	movl	12(%rsp), %edi
	call	exit@PLT
	.cfi_endproc
.LFE2037:
	.size	_Z12riemann_hllePKdS0_Pdi, .-_Z12riemann_hllePKdS0_Pdi
	.globl	_Z17initial_primitivePdidd
	.type	_Z17initial_primitivePdidd, @function
_Z17initial_primitivePdidd:
.LFB2038:
	.cfi_startproc
	endbr64
	cvtsi2sdl	%esi, %xmm2
	movaps	%xmm1, %xmm3
	xorl	%eax, %eax
	movsd	.LC10(%rip), %xmm5
	subsd	%xmm0, %xmm3
	movsd	.LC2(%rip), %xmm6
	divsd	%xmm2, %xmm3
.L45:
	cmpl	%esi, %eax
	jge	.L49
	cvtsi2sdl	%eax, %xmm2
	movaps	%xmm1, %xmm4
	addsd	%xmm0, %xmm4
	addsd	%xmm5, %xmm2
	mulsd	%xmm5, %xmm4
	mulsd	%xmm3, %xmm2
	comisd	%xmm2, %xmm4
	ja	.L48
	movsd	.LC8(%rip), %xmm4
	movsd	.LC9(%rip), %xmm2
	jmp	.L46
.L48:
	movaps	%xmm6, %xmm4
	movaps	%xmm6, %xmm2
.L46:
	movq	$0x000000000, 8(%rdi)
	incl	%eax
	addq	$32, %rdi
	movsd	%xmm4, -32(%rdi)
	movq	$0x000000000, -16(%rdi)
	movsd	%xmm2, -8(%rdi)
	jmp	.L45
.L49:
	ret
	.cfi_endproc
.LFE2038:
	.size	_Z17initial_primitivePdidd, .-_Z17initial_primitivePdidd
	.globl	_Z17update_struct_newidd
	.type	_Z17update_struct_newidd, @function
_Z17update_struct_newidd:
.LFB2039:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rdi, %rbp
	leaq	24(%rdi), %rdi
	pushq	%rbx
	.cfi_def_cfa_offset 24
	.cfi_offset 3, -24
	leal	0(,%rsi,4), %ebx
	pushq	%rax
	.cfi_def_cfa_offset 32
	movslq	%ebx, %rbx
	salq	$3, %rbx
	movl	%esi, -24(%rdi)
	movq	%rbx, %rsi
	movsd	%xmm0, -16(%rdi)
	movsd	%xmm1, -8(%rdi)
	call	cudaMalloc@PLT
	leaq	32(%rbp), %rdi
	movq	%rbx, %rsi
	call	cudaMalloc@PLT
	leaq	32(%rbx), %rsi
	leaq	40(%rbp), %rdi
	call	cudaMalloc@PLT
	movq	%rbp, %rax
	popq	%rdx
	.cfi_def_cfa_offset 24
	popq	%rbx
	.cfi_def_cfa_offset 16
	popq	%rbp
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE2039:
	.size	_Z17update_struct_newidd, .-_Z17update_struct_newidd
	.globl	_Z17update_struct_del12UpdateStruct
	.type	_Z17update_struct_del12UpdateStruct, @function
_Z17update_struct_del12UpdateStruct:
.LFB2040:
	.cfi_startproc
	endbr64
	pushq	%rax
	.cfi_def_cfa_offset 16
	movq	40(%rsp), %rdi
	call	cudaFree@PLT
	movq	48(%rsp), %rdi
	call	cudaFree@PLT
	movq	56(%rsp), %rdi
	popq	%rdx
	.cfi_def_cfa_offset 8
	jmp	cudaFree@PLT
	.cfi_endproc
.LFE2040:
	.size	_Z17update_struct_del12UpdateStruct, .-_Z17update_struct_del12UpdateStruct
	.globl	_Z27update_struct_set_primitive12UpdateStructPKd
	.type	_Z27update_struct_set_primitive12UpdateStructPKd, @function
_Z27update_struct_set_primitive12UpdateStructPKd:
.LFB2041:
	.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
	xorl	%r13d, %r13d
	pushq	%r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	movq	%rdi, %r12
	pushq	%rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	movq	%r12, %r14
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	subq	$24, %rsp
	.cfi_def_cfa_offset 80
	movl	80(%rsp), %r15d
	leal	0(,%r15,4), %ebx
	movslq	%ebx, %rbx
	leaq	0(,%rbx,8), %rax
	movq	%rax, %rdi
	movq	%rax, 8(%rsp)
	call	malloc@PLT
	movq	%rax, %rbp
	movq	%rax, %rbx
.L55:
	cmpl	%r15d, %r13d
	jge	.L58
	movq	%rbx, %rsi
	movq	%r14, %rdi
	incl	%r13d
	addq	$32, %r14
	call	_Z22primitive_to_conservedPKdPd
	addq	$32, %rbx
	jmp	.L55
.L58:
	movq	8(%rsp), %rdx
	movq	104(%rsp), %rdi
	movq	%r12, %rsi
	movl	$1, %ecx
	call	cudaMemcpy@PLT
	movq	112(%rsp), %rdi
	movq	8(%rsp), %rdx
	movq	%rbp, %rsi
	movl	$1, %ecx
	call	cudaMemcpy@PLT
	addq	$24, %rsp
	.cfi_def_cfa_offset 56
	movq	%rbp, %rdi
	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
	jmp	free@PLT
	.cfi_endproc
.LFE2041:
	.size	_Z27update_struct_set_primitive12UpdateStructPKd, .-_Z27update_struct_set_primitive12UpdateStructPKd
	.globl	_Z27update_struct_get_primitive12UpdateStructPd
	.type	_Z27update_struct_get_primitive12UpdateStructPd, @function
_Z27update_struct_get_primitive12UpdateStructPd:
.LFB2042:
	.cfi_startproc
	endbr64
	movl	8(%rsp), %eax
	movq	32(%rsp), %rsi
	movl	$2, %ecx
	leal	0(,%rax,4), %edx
	movslq	%edx, %rdx
	salq	$3, %rdx
	jmp	cudaMemcpy@PLT
	.cfi_endproc
.LFE2042:
	.size	_Z27update_struct_get_primitive12UpdateStructPd, .-_Z27update_struct_get_primitive12UpdateStructPd
	.globl	_Z61__device_stub__Z29update_struct_do_compute_flux12UpdateStructR12UpdateStruct
	.type	_Z61__device_stub__Z29update_struct_do_compute_flux12UpdateStructR12UpdateStruct, @function
_Z61__device_stub__Z29update_struct_do_compute_flux12UpdateStructR12UpdateStruct:
.LFB2068:
	.cfi_startproc
	endbr64
	subq	$88, %rsp
	.cfi_def_cfa_offset 96
	movq	%fs:40, %rax
	movq	%rax, 72(%rsp)
	xorl	%eax, %eax
	leaq	8(%rsp), %rcx
	movq	%rdi, 64(%rsp)
	movq	%rsp, %rdx
	movabsq	$4294967297, %rax
	leaq	28(%rsp), %rsi
	leaq	16(%rsp), %rdi
	movl	$1, 24(%rsp)
	movq	%rax, 16(%rsp)
	movq	%rax, 28(%rsp)
	movl	$1, 36(%rsp)
	call	__cudaPopCallConfiguration@PLT
	testl	%eax, %eax
	jne	.L60
	pushq	8(%rsp)
	.cfi_def_cfa_offset 104
	leaq	_Z29update_struct_do_compute_flux12UpdateStruct(%rip), %rdi
	pushq	8(%rsp)
	.cfi_def_cfa_offset 112
	movq	44(%rsp), %rcx
	movl	52(%rsp), %r8d
	movq	32(%rsp), %rsi
	movl	40(%rsp), %edx
	leaq	80(%rsp), %r9
	call	cudaLaunchKernel@PLT
	popq	%rax
	.cfi_def_cfa_offset 104
	popq	%rdx
	.cfi_def_cfa_offset 96
.L60:
	movq	72(%rsp), %rax
	subq	%fs:40, %rax
	je	.L62
	call	__stack_chk_fail@PLT
.L62:
	addq	$88, %rsp
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE2068:
	.size	_Z61__device_stub__Z29update_struct_do_compute_flux12UpdateStructR12UpdateStruct, .-_Z61__device_stub__Z29update_struct_do_compute_flux12UpdateStructR12UpdateStruct
	.globl	_Z29update_struct_do_compute_flux12UpdateStruct
	.type	_Z29update_struct_do_compute_flux12UpdateStruct, @function
_Z29update_struct_do_compute_flux12UpdateStruct:
.LFB2069:
	.cfi_startproc
	endbr64
	pushq	%rax
	.cfi_def_cfa_offset 16
	leaq	16(%rsp), %rdi
	call	_Z61__device_stub__Z29update_struct_do_compute_flux12UpdateStructR12UpdateStruct
	popq	%rdx
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE2069:
	.size	_Z29update_struct_do_compute_flux12UpdateStruct, .-_Z29update_struct_do_compute_flux12UpdateStruct
	.globl	_Z62__device_stub__Z29update_struct_do_advance_cons12UpdateStructdR12UpdateStructd
	.type	_Z62__device_stub__Z29update_struct_do_advance_cons12UpdateStructdR12UpdateStructd, @function
_Z62__device_stub__Z29update_struct_do_advance_cons12UpdateStructdR12UpdateStructd:
.LFB2070:
	.cfi_startproc
	endbr64
	subq	$120, %rsp
	.cfi_def_cfa_offset 128
	movsd	%xmm0, 8(%rsp)
	leaq	32(%rsp), %rcx
	leaq	24(%rsp), %rdx
	movq	%fs:40, %rax
	movq	%rax, 104(%rsp)
	xorl	%eax, %eax
	leaq	8(%rsp), %rax
	movq	%rdi, 88(%rsp)
	leaq	52(%rsp), %rsi
	movq	%rax, 96(%rsp)
	leaq	40(%rsp), %rdi
	movabsq	$4294967297, %rax
	movq	%rax, 40(%rsp)
	movl	$1, 48(%rsp)
	movq	%rax, 52(%rsp)
	movl	$1, 60(%rsp)
	call	__cudaPopCallConfiguration@PLT
	testl	%eax, %eax
	jne	.L66
	pushq	32(%rsp)
	.cfi_def_cfa_offset 136
	leaq	_Z29update_struct_do_advance_cons12UpdateStructd(%rip), %rdi
	pushq	32(%rsp)
	.cfi_def_cfa_offset 144
	movq	68(%rsp), %rcx
	movl	76(%rsp), %r8d
	movq	56(%rsp), %rsi
	movl	64(%rsp), %edx
	leaq	104(%rsp), %r9
	call	cudaLaunchKernel@PLT
	popq	%rax
	.cfi_def_cfa_offset 136
	popq	%rdx
	.cfi_def_cfa_offset 128
.L66:
	movq	104(%rsp), %rax
	subq	%fs:40, %rax
	je	.L68
	call	__stack_chk_fail@PLT
.L68:
	addq	$120, %rsp
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE2070:
	.size	_Z62__device_stub__Z29update_struct_do_advance_cons12UpdateStructdR12UpdateStructd, .-_Z62__device_stub__Z29update_struct_do_advance_cons12UpdateStructdR12UpdateStructd
	.globl	_Z29update_struct_do_advance_cons12UpdateStructd
	.type	_Z29update_struct_do_advance_cons12UpdateStructd, @function
_Z29update_struct_do_advance_cons12UpdateStructd:
.LFB2071:
	.cfi_startproc
	endbr64
	pushq	%rax
	.cfi_def_cfa_offset 16
	leaq	16(%rsp), %rdi
	call	_Z62__device_stub__Z29update_struct_do_advance_cons12UpdateStructdR12UpdateStructd
	popq	%rdx
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE2071:
	.size	_Z29update_struct_do_advance_cons12UpdateStructd, .-_Z29update_struct_do_advance_cons12UpdateStructd
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC15:
	.string	"[%d] t=%.3e Mzps=%.2f\n"
.LC16:
	.string	"w"
.LC17:
	.string	"sr1d.dat"
.LC19:
	.string	"%f %f %f %f\n"
.LC20:
	.string	"%s\n"
	.section	.text.startup,"ax",@progbits
	.globl	main
	.type	main, @function
main:
.LFB2043:
	.cfi_startproc
	endbr64
	pushq	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	movl	$2097152, %edi
	pushq	%r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	pushq	%r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	xorl	%r13d, %r13d
	pushq	%r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	movabsq	$4294967328, %r12
	pushq	%rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	subq	$152, %rsp
	.cfi_def_cfa_offset 208
	movq	%fs:40, %rax
	movq	%rax, 136(%rsp)
	xorl	%eax, %eax
	leaq	40(%rsp), %rbx
	call	malloc@PLT
	xorps	%xmm0, %xmm0
	movl	$65536, %esi
	movq	%rbx, %rdi
	movsd	.LC2(%rip), %xmm1
	movq	%rax, %rbp
	call	_Z17update_struct_newidd
	xorps	%xmm0, %xmm0
	movl	$65536, %esi
	movq	%rbp, %rdi
	movsd	.LC2(%rip), %xmm1
	movl	$12, %ecx
	call	_Z17initial_primitivePdidd
	subq	$48, %rsp
	.cfi_def_cfa_offset 256
	movq	%rbx, %rsi
	movq	%rsp, %rdi
	rep movsl
	movq	%rbp, %rdi
	call	_Z27update_struct_set_primitive12UpdateStructPKd
	addq	$48, %rsp
	.cfi_def_cfa_offset 208
	movq	$0x000000000, 8(%rsp)
.L76:
	call	clock@PLT
	movl	$100, %r15d
	movq	%rax, %r14
.L75:
	xorl	%r9d, %r9d
	xorl	%r8d, %r8d
	movq	%r12, %rdx
	movl	$1, %ecx
	movabsq	$4294969345, %rdi
	movl	$1, %esi
	movq	%r12, 28(%rsp)
	movl	$1, 36(%rsp)
	movq	%rdi, 16(%rsp)
	movl	$1, 24(%rsp)
	call	__cudaPushCallConfiguration@PLT
	testl	%eax, %eax
	jne	.L73
	leaq	88(%rsp), %rdi
	movl	$12, %ecx
	movq	%rbx, %rsi
	rep movsl
	leaq	88(%rsp), %rdi
	call	_Z61__device_stub__Z29update_struct_do_compute_flux12UpdateStructR12UpdateStruct
.L73:
	movl	$2097153, %edi
	xorl	%r9d, %r9d
	xorl	%r8d, %r8d
	movq	%r12, %rdx
	salq	$11, %rdi
	movl	$1, %ecx
	movl	$1, %esi
	movq	%r12, 28(%rsp)
	movl	$1, 36(%rsp)
	movq	%rdi, 16(%rsp)
	movl	$1, 24(%rsp)
	call	__cudaPushCallConfiguration@PLT
	testl	%eax, %eax
	jne	.L74
	leaq	88(%rsp), %rdi
	movl	$12, %ecx
	movq	%rbx, %rsi
	movsd	.LC11(%rip), %xmm0
	rep movsl
	leaq	88(%rsp), %rdi
	call	_Z62__device_stub__Z29update_struct_do_advance_cons12UpdateStructdR12UpdateStructd
.L74:
	movsd	.LC11(%rip), %xmm4
	addsd	8(%rsp), %xmm4
	movsd	%xmm4, 8(%rsp)
	decl	%r15d
	jne	.L75
	call	clock@PLT
	addl	$100, %r13d
	movl	$2, %edi
	movsd	.LC13(%rip), %xmm1
	subq	%r14, %rax
	movl	%r13d, %edx
	leaq	.LC15(%rip), %rsi
	cvtsi2sdq	%rax, %xmm0
	divsd	.LC12(%rip), %xmm0
	movb	$2, %al
	divsd	%xmm0, %xmm1
	movsd	8(%rsp), %xmm0
	mulsd	.LC14(%rip), %xmm1
	call	__printf_chk@PLT
	movsd	.LC8(%rip), %xmm0
	comisd	8(%rsp), %xmm0
	ja	.L76
	subq	$48, %rsp
	.cfi_def_cfa_offset 256
	movq	%rbx, %rsi
	movl	$12, %ecx
	movq	%rbp, %rbx
	movq	%rsp, %rdi
	xorl	%r13d, %r13d
	rep movsl
	movq	%rbp, %rdi
	call	_Z27update_struct_get_primitive12UpdateStructPd
	leaq	88(%rsp), %rsi
	movq	%rsp, %rdi
	movl	$12, %ecx
	rep movsl
	call	_Z17update_struct_del12UpdateStruct
	addq	$48, %rsp
	.cfi_def_cfa_offset 208
	leaq	.LC16(%rip), %rsi
	leaq	.LC17(%rip), %rdi
	call	fopen@PLT
	movq	%rax, %r12
.L77:
	cvtsi2sdl	%r13d, %xmm0
	movsd	24(%rbx), %xmm3
	movsd	(%rbx), %xmm1
	movb	$4, %al
	movsd	8(%rbx), %xmm2
	movl	$2, %esi
	movq	%r12, %rdi
	incl	%r13d
	addsd	.LC10(%rip), %xmm0
	mulsd	.LC18(%rip), %xmm0
	leaq	.LC19(%rip), %rdx
	addq	$32, %rbx
	call	__fprintf_chk@PLT
	cmpl	$65536, %r13d
	jne	.L77
	movq	%r12, %rdi
	call	fclose@PLT
	movq	%rbp, %rdi
	call	free@PLT
	call	cudaGetLastError@PLT
	movl	%eax, %edi
	testl	%eax, %eax
	je	.L78
	call	cudaGetErrorString@PLT
	leaq	.LC20(%rip), %rsi
	movl	$2, %edi
	movq	%rax, %rdx
	xorl	%eax, %eax
	call	__printf_chk@PLT
.L78:
	movq	136(%rsp), %rax
	subq	%fs:40, %rax
	je	.L79
	call	__stack_chk_fail@PLT
.L79:
	addq	$152, %rsp
	.cfi_def_cfa_offset 56
	xorl	%eax, %eax
	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
	ret
	.cfi_endproc
.LFE2043:
	.size	main, .-main
	.section	.rodata.str1.1
.LC21:
	.string	"_Z29update_struct_do_advance_cons12UpdateStructd"
.LC22:
	.string	"_Z29update_struct_do_compute_flux12UpdateStruct"
	.section	.text.startup
	.type	_ZL24__sti____cudaRegisterAllv, @function
_ZL24__sti____cudaRegisterAllv:
.LFB2073:
	.cfi_startproc
	endbr64
	pushq	%rbx
	.cfi_def_cfa_offset 16
	.cfi_offset 3, -16
	leaq	_ZL15__fatDeviceText(%rip), %rdi
	call	__cudaRegisterFatBinary@PLT
	pushq	$0
	.cfi_def_cfa_offset 24
	xorl	%r9d, %r9d
	orl	$-1, %r8d
	pushq	$0
	.cfi_def_cfa_offset 32
	leaq	.LC21(%rip), %rdx
	movq	%rax, %rdi
	movq	%rax, %rbx
	pushq	$0
	.cfi_def_cfa_offset 40
	movq	%rdx, %rcx
	leaq	_Z29update_struct_do_advance_cons12UpdateStructd(%rip), %rsi
	pushq	$0
	.cfi_def_cfa_offset 48
	movq	%rax, _ZL20__cudaFatCubinHandle(%rip)
	call	__cudaRegisterFunction@PLT
	addq	$32, %rsp
	.cfi_def_cfa_offset 16
	movq	%rbx, %rdi
	xorl	%r9d, %r9d
	pushq	$0
	.cfi_def_cfa_offset 24
	leaq	.LC22(%rip), %rdx
	orl	$-1, %r8d
	leaq	_Z29update_struct_do_compute_flux12UpdateStruct(%rip), %rsi
	pushq	$0
	.cfi_def_cfa_offset 32
	movq	%rdx, %rcx
	pushq	$0
	.cfi_def_cfa_offset 40
	pushq	$0
	.cfi_def_cfa_offset 48
	call	__cudaRegisterFunction@PLT
	movq	_ZL20__cudaFatCubinHandle(%rip), %rdi
	addq	$32, %rsp
	.cfi_def_cfa_offset 16
	call	__cudaRegisterFatBinaryEnd@PLT
	leaq	_ZL26__cudaUnregisterBinaryUtilv(%rip), %rdi
	popq	%rbx
	.cfi_def_cfa_offset 8
	jmp	atexit@PLT
	.cfi_endproc
.LFE2073:
	.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
.LC0:
	.long	-900720
	.long	1072693247
	.align 8
.LC1:
	.long	-2127697391
	.long	1030854553
	.align 8
.LC2:
	.long	0
	.long	1072693248
	.align 8
.LC3:
	.long	1431655766
	.long	1071994197
	.align 8
.LC4:
	.long	-1431655765
	.long	1073392298
	.section	.rodata.cst16,"aM",@progbits,16
	.align 16
.LC5:
	.long	-1
	.long	2147483647
	.long	0
	.long	0
	.section	.rodata.cst8
	.align 8
.LC7:
	.long	0
	.long	1074003968
	.align 8
.LC8:
	.long	-1717986918
	.long	1069128089
	.align 8
.LC9:
	.long	0
	.long	1069547520
	.align 8
.LC10:
	.long	0
	.long	1071644672
	.align 8
.LC11:
	.long	-1717986918
	.long	1052350873
	.align 8
.LC12:
	.long	0
	.long	1093567616
	.align 8
.LC13:
	.long	-1598689907
	.long	1068549879
	.align 8
.LC14:
	.long	0
	.long	1079574528
	.align 8
.LC18:
	.long	0
	.long	1055916032
	.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 <stdio.h>
#include <time.h>




#define ADIABATIC_GAMMA (5.0 / 3.0)
#define min2(a, b) (a) < (b) ? (a) : (b)
#define max2(a, b) (a) > (b) ? (a) : (b)
typedef double real;

__host__ __device__ void conserved_to_primitive(const real *cons, real *prim)
{
    const real newton_iter_max = 50;
    const real error_tolerance = 1e-12 * cons[0];
    const real gm              = ADIABATIC_GAMMA;
    const real m               = cons[0];
    const real tau             = cons[3];
    const real ss              = cons[1] * cons[1] + cons[2] * cons[2];
    int iteration              = 0;
    real p                     = prim[3];
    real w0;

    while (1) {
        const real et = tau + p + m;
        const real b2 = min2(ss / et / et, 1.0 - 1e-10);
        const real w2 = 1.0 / (1.0 - b2);
        const real w  = sqrt(w2);
        const real e  = (tau + m * (1.0 - w) + p * (1.0 - w2)) / (m * w);
        const real d  = m / w;
        const real h  = 1.0 + e + p / d;
        const real a2 = gm * p / (d * h);
        const real f  = d * e * (gm - 1.0) - p;
        const real g  = b2 * a2 - 1.0;

        p -= f / g;

        if (fabs(f) < error_tolerance || iteration == newton_iter_max) {
            w0 = w;
            break;
        }
        iteration += 1;
    }

    prim[0] = m / w0;
    prim[1] = w0 * cons[1] / (tau + m + p);
    prim[2] = w0 * cons[2] / (tau + m + p);
    prim[3] = p;
}

__host__ __device__ real primitive_to_gamma_beta_squared(const real *prim)
{
    const real u1 = prim[1];
    const real u2 = prim[2];
    return u1 * u1 + u2 * u2;
}

__host__ __device__ real primitive_to_lorentz_factor(const real *prim)
{
    return sqrt(1.0 + primitive_to_gamma_beta_squared(prim));
}

__host__ __device__ real primitive_to_gamma_beta_component(const real *prim, int direction)
{
    switch (direction)
    {
        case 0: return prim[1];
        case 1: return prim[2];
        default: return 0.0;
    }
}

__host__ __device__ real primitive_to_beta_component(const real *prim, int direction)
{
    const real w = primitive_to_lorentz_factor(prim);

    switch (direction)
    {
        case 0: return prim[1] / w;
        case 1: return prim[2] / w;
        default: return 0.0;
    }
}

__host__ __device__ real primitive_to_enthalpy_density(const real* prim)
{
    const real rho = prim[0];
    const real pre = prim[3];
    return rho + pre * (1.0 + 1.0 / (ADIABATIC_GAMMA - 1.0));
}

__host__ __device__ __host__ void primitive_to_conserved(const real *prim, real *cons)
{
    const real rho = prim[0];
    const real u1 = prim[1];
    const real u2 = prim[2];
    const real pre = prim[3];

    const real w = primitive_to_lorentz_factor(prim);
    const real h = primitive_to_enthalpy_density(prim) / rho;
    const real m = rho * w;

    cons[0] = m;
    cons[1] = m * h * u1;
    cons[2] = m * h * u2;
    cons[3] = m * (h * w - 1.0) - pre;
}

__host__ __device__ void primitive_to_flux_vector(const real *prim, real *flux, int direction)
{
    const real vn = primitive_to_beta_component(prim, direction);
    const real pre = prim[3];
    real cons[4];
    primitive_to_conserved(prim, cons);

    flux[0] = vn * cons[0];
    flux[1] = vn * cons[1] + pre * (direction == 0);
    flux[2] = vn * cons[2] + pre * (direction == 1);
    flux[3] = vn * cons[3] + pre * vn;
}

__host__ __device__ real primitive_to_sound_speed_squared(const real *prim)
{
    const real pre = prim[3];
    const real rho_h = primitive_to_enthalpy_density(prim);
    return ADIABATIC_GAMMA * pre / rho_h;
}

__host__ __device__ void primitive_to_outer_wavespeeds(const real *prim, real *wavespeeds, int direction)
{
    const real a2 = primitive_to_sound_speed_squared(prim);
    const real un = primitive_to_gamma_beta_component(prim, direction);
    const real uu = primitive_to_gamma_beta_squared(prim);
    const real vv = uu / (1.0 + uu);
    const real v2 = un * un / (1.0 + uu);
    const real vn = sqrt(v2);
    const real k0 = sqrt(a2 * (1.0 - vv) * (1.0 - vv * a2 - v2 * (1.0 - a2)));

    wavespeeds[0] = (vn * (1.0 - a2) - k0) / (1.0 - vv * a2);
    wavespeeds[1] = (vn * (1.0 - a2) + k0) / (1.0 - vv * a2);
}

__device__ void riemann_hlle(const real *pl, const real *pr, real *flux, int direction)
{
    real ul[4];
    real ur[4];
    real fl[4];
    real fr[4];
    real al[2];
    real ar[2];

    primitive_to_conserved(pl, ul);
    primitive_to_conserved(pr, ur);
    primitive_to_flux_vector(pl, fl, direction);
    primitive_to_flux_vector(pr, fr, direction);
    primitive_to_outer_wavespeeds(pl, al, direction);
    primitive_to_outer_wavespeeds(pr, ar, direction);

    const real am = min2(0.0, min2(al[0], ar[0]));
    const real ap = max2(0.0, max2(al[1], ar[1]));

    for (int i = 0; i < 4; ++i)
    {
        flux[i] = (fl[i] * ap - fr[i] * am - (ul[i] - ur[i]) * ap * am) / (ap - am);
    }
}

void initial_primitive(real *primitive, int num_zones, real x0, real x1)
{
    real dx = (x1 - x0) / num_zones;

    for (int i = 0; i < num_zones; ++i)
    {
        real x = (i + 0.5) * dx;
        real *prim = &primitive[i * 4];

        if (x < 0.5 * (x0 + x1))
        {
            prim[0] = 1.0;
            prim[1] = 0.0;
            prim[2] = 0.0;
            prim[3] = 1.0;
        }
        else
        {
            prim[0] = 0.1;
            prim[1] = 0.0;
            prim[2] = 0.0;
            prim[3] = 0.125;
        }
    }
}

struct UpdateStruct
{
    int num_zones;
    real x0;
    real x1;
    real *primitive;
    real *conserved;
    real *flux;
};

struct UpdateStruct update_struct_new(int num_zones, real x0, real x1)
{
    struct UpdateStruct update;
    update.num_zones = num_zones;
    update.x0 = x0;
    update.x1 = x1;

    hipMalloc(&update.primitive, num_zones * 4 * sizeof(real));
    hipMalloc(&update.conserved, num_zones * 4 * sizeof(real));
    hipMalloc(&update.flux, (num_zones + 1) * 4 * sizeof(real));

    return update;
}

void update_struct_del(struct UpdateStruct update)
{
    hipFree(update.primitive);
    hipFree(update.conserved);
    hipFree(update.flux);
}

void update_struct_set_primitive(struct UpdateStruct update, const real *primitive_host)
{
    real *conserved_host = (real*) malloc(update.num_zones * 4 * sizeof(real));

    for (int i = 0; i < update.num_zones; ++i)
    {
        const real *prim = &primitive_host[4 * i];
        /* */ real *cons = &conserved_host[4 * i];
        primitive_to_conserved(prim, cons);
    }

    hipMemcpy(
        update.primitive,
        primitive_host,
        update.num_zones * 4 * sizeof(real),
        hipMemcpyHostToDevice
    );

    hipMemcpy(
        update.conserved,
        conserved_host,
        update.num_zones * 4 * sizeof(real),
        hipMemcpyHostToDevice
    );
    free(conserved_host);
}

void update_struct_get_primitive(struct UpdateStruct update, real *primitive_host)
{
    hipMemcpy(primitive_host,
        update.primitive,
        update.num_zones * 4 * sizeof(real),
        hipMemcpyDeviceToHost
    );
}

__global__ void update_struct_do_compute_flux(UpdateStruct update)
{
    int i = blockIdx.x * blockDim.x + threadIdx.x;
    if (i >= update.num_zones + 1)
        return;

    int il = i - 1;
    int ir = i;

    if (il == -1)
        il += 1;

    if (ir == update.num_zones)
        ir -= 1;

    const real *pl = &update.primitive[4 * il];
    const real *pr = &update.primitive[4 * ir];
    real *flux = &update.flux[4 * i];
    riemann_hlle(pl, pr, flux, 0);
}

__global__ void update_struct_do_advance_cons(UpdateStruct update, real dt)
{
    int i = blockIdx.x * blockDim.x + threadIdx.x;
    if (i >= update.num_zones)
        return;

    const real dx = (update.x1 - update.x0) / update.num_zones;
    const real *fl = &update.flux[4 * (i + 0)];
    const real *fr = &update.flux[4 * (i + 1)];
    real *cons = &update.conserved[4 * i];
    real *prim = &update.primitive[4 * i];

    for (int q = 0; q < 4; ++q)
    {
        cons[q] -= (fr[q] - fl[q]) * dt / dx;
    }
    conserved_to_primitive(cons, prim);
}

int main()
{
    const int num_zones = 1 << 16;
    const int block_size = 32;
    const int fold = 100;
    const real x0 = 0.0;
    const real x1 = 1.0;
    const real dx = (x1 - x0) / num_zones;

    real *primitive = (real*) malloc(num_zones * 4 * sizeof(real));
    struct UpdateStruct update = update_struct_new(num_zones, x0, x1);

    initial_primitive(primitive, num_zones, x0, x1);
    update_struct_set_primitive(update, primitive);

    int iteration = 0;
    real time = 0.0;
    real dt = dx * 0.1;

    while (time < 0.1)
    {
        clock_t start = clock();

        for (int i = 0; i < fold; ++i)
        {
            update_struct_do_compute_flux<<<num_zones / block_size + 1, block_size>>>(update);
            update_struct_do_advance_cons<<<num_zones / block_size + 0, block_size>>>(update, dt);

            time += dt;
            iteration += 1;
        }
        clock_t end = clock();

        real seconds = ((real) (end - start)) / CLOCKS_PER_SEC;
        real mzps = (num_zones / 1e6) / seconds * fold;
        printf("[%d] t=%.3e Mzps=%.2f\n", iteration, time, mzps);
    }

    update_struct_get_primitive(update, primitive);
    update_struct_del(update);

    FILE* outfile = fopen("sr1d.dat", "w");

    for (int i = 0; i < num_zones; ++i)
    {
        real *prim = &primitive[i * 4];
        real x = (i + 0.5) * dx;
        fprintf(outfile, "%f %f %f %f\n", x, prim[0], prim[1], prim[3]);
    }
    fclose(outfile);
    free(primitive);

    hipError_t error = hipGetLastError();

    if (error)
    {
        printf("%s\n", hipGetErrorString(error));
    }
    return 0;
}

	.text
	.file	"sr1d.hip"
	.section	.rodata.cst8,"aM",@progbits,8
	.p2align	3, 0x0                          # -- Begin function _Z22conserved_to_primitivePKdPd
.LCPI0_0:
	.quad	0x3d719799812dea11              # double 9.9999999999999998E-13
.LCPI0_1:
	.quad	0x3feffffffff24190              # double 0.99999999989999999
.LCPI0_2:
	.quad	0x3ff0000000000000              # double 1
.LCPI0_3:
	.quad	0x3ffaaaaaaaaaaaab              # double 1.6666666666666667
.LCPI0_4:
	.quad	0x3fe5555555555556              # double 0.66666666666666674
.LCPI0_5:
	.quad	0xbff0000000000000              # double -1
	.section	.rodata.cst16,"aM",@progbits,16
	.p2align	4, 0x0
.LCPI0_6:
	.quad	0x7fffffffffffffff              # double NaN
	.quad	0x7fffffffffffffff              # double NaN
	.text
	.globl	_Z22conserved_to_primitivePKdPd
	.type	_Z22conserved_to_primitivePKdPd,@function
_Z22conserved_to_primitivePKdPd:        # @_Z22conserved_to_primitivePKdPd
	.cfi_startproc
# %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	pushq	%r14
	.cfi_def_cfa_offset 24
	pushq	%rbx
	.cfi_def_cfa_offset 32
	subq	$64, %rsp
	.cfi_def_cfa_offset 96
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	.cfi_offset %rbp, -16
	movq	%rsi, %rbx
	movq	%rdi, %r14
	movsd	(%rdi), %xmm5                   # xmm5 = mem[0],zero
	movsd	8(%rdi), %xmm0                  # xmm0 = mem[0],zero
	movsd	.LCPI0_0(%rip), %xmm8           # xmm8 = mem[0],zero
	mulsd	%xmm5, %xmm8
	movsd	24(%rdi), %xmm7                 # xmm7 = mem[0],zero
	mulsd	%xmm0, %xmm0
	movsd	16(%rdi), %xmm9                 # xmm9 = mem[0],zero
	mulsd	%xmm9, %xmm9
	addsd	%xmm0, %xmm9
	movsd	24(%rsi), %xmm6                 # xmm6 = mem[0],zero
	movl	$50, %ebp
	movsd	.LCPI0_1(%rip), %xmm10          # xmm10 = mem[0],zero
	movsd	.LCPI0_2(%rip), %xmm11          # xmm11 = mem[0],zero
	xorpd	%xmm12, %xmm12
	movsd	.LCPI0_3(%rip), %xmm13          # xmm13 = mem[0],zero
	movsd	.LCPI0_4(%rip), %xmm14          # xmm14 = mem[0],zero
	movsd	.LCPI0_5(%rip), %xmm15          # xmm15 = mem[0],zero
	movsd	%xmm5, 32(%rsp)                 # 8-byte Spill
	movsd	%xmm7, 24(%rsp)                 # 8-byte Spill
	movsd	%xmm8, 16(%rsp)                 # 8-byte Spill
	movsd	%xmm9, 8(%rsp)                  # 8-byte Spill
.LBB0_1:                                # =>This Inner Loop Header: Depth=1
	movapd	%xmm7, %xmm0
	addsd	%xmm6, %xmm0
	addsd	%xmm5, %xmm0
	movapd	%xmm9, %xmm1
	divsd	%xmm0, %xmm1
	divsd	%xmm0, %xmm1
	minsd	%xmm10, %xmm1
	movapd	%xmm11, %xmm0
	movsd	%xmm1, 56(%rsp)                 # 8-byte Spill
	subsd	%xmm1, %xmm0
	movapd	%xmm11, %xmm3
	divsd	%xmm0, %xmm3
	ucomisd	%xmm12, %xmm3
	jb	.LBB0_3
# %bb.2:                                #   in Loop: Header=BB0_1 Depth=1
	xorps	%xmm0, %xmm0
	sqrtsd	%xmm3, %xmm0
	jmp	.LBB0_4
.LBB0_3:                                # %call.sqrt
                                        #   in Loop: Header=BB0_1 Depth=1
	movapd	%xmm3, %xmm0
	movsd	%xmm6, 48(%rsp)                 # 8-byte Spill
	movsd	%xmm3, 40(%rsp)                 # 8-byte Spill
	callq	sqrt
	movsd	40(%rsp), %xmm3                 # 8-byte Reload
                                        # xmm3 = mem[0],zero
	movsd	.LCPI0_5(%rip), %xmm15          # xmm15 = mem[0],zero
	movsd	.LCPI0_4(%rip), %xmm14          # xmm14 = mem[0],zero
	movsd	.LCPI0_3(%rip), %xmm13          # xmm13 = mem[0],zero
	xorpd	%xmm12, %xmm12
	movsd	.LCPI0_2(%rip), %xmm11          # xmm11 = mem[0],zero
	movsd	.LCPI0_1(%rip), %xmm10          # xmm10 = mem[0],zero
	movsd	8(%rsp), %xmm9                  # 8-byte Reload
                                        # xmm9 = mem[0],zero
	movsd	16(%rsp), %xmm8                 # 8-byte Reload
                                        # xmm8 = mem[0],zero
	movsd	24(%rsp), %xmm7                 # 8-byte Reload
                                        # xmm7 = mem[0],zero
	movsd	48(%rsp), %xmm6                 # 8-byte Reload
                                        # xmm6 = mem[0],zero
	movsd	32(%rsp), %xmm5                 # 8-byte Reload
                                        # xmm5 = mem[0],zero
.LBB0_4:                                # %.split
                                        #   in Loop: Header=BB0_1 Depth=1
	movapd	%xmm11, %xmm1
	subsd	%xmm0, %xmm1
	mulsd	%xmm5, %xmm1
	addsd	%xmm7, %xmm1
	movapd	%xmm11, %xmm2
	subsd	%xmm3, %xmm2
	mulsd	%xmm6, %xmm2
	addsd	%xmm1, %xmm2
	movapd	%xmm5, %xmm1
	mulsd	%xmm0, %xmm1
	divsd	%xmm1, %xmm2
	movapd	%xmm5, %xmm1
	divsd	%xmm0, %xmm1
	movapd	%xmm1, %xmm3
	mulsd	%xmm2, %xmm3
	addsd	%xmm11, %xmm2
	movapd	%xmm6, %xmm4
	divsd	%xmm1, %xmm4
	addsd	%xmm2, %xmm4
	movapd	%xmm6, %xmm2
	mulsd	%xmm13, %xmm2
	mulsd	%xmm1, %xmm4
	divsd	%xmm4, %xmm2
	mulsd	%xmm14, %xmm3
	subsd	%xmm6, %xmm3
	movsd	56(%rsp), %xmm4                 # 8-byte Reload
                                        # xmm4 = mem[0],zero
	mulsd	%xmm2, %xmm4
	addsd	%xmm15, %xmm4
	movapd	%xmm3, %xmm2
	divsd	%xmm4, %xmm2
	subsd	%xmm2, %xmm6
	andpd	.LCPI0_6(%rip), %xmm3
	subl	$1, %ebp
	setb	%al
	ucomisd	%xmm3, %xmm8
	ja	.LBB0_6
# %bb.5:                                # %.split
                                        #   in Loop: Header=BB0_1 Depth=1
	testb	%al, %al
	je	.LBB0_1
.LBB0_6:
	movsd	%xmm1, (%rbx)
	movsd	8(%r14), %xmm1                  # xmm1 = mem[0],zero
	mulsd	%xmm0, %xmm1
	addsd	%xmm7, %xmm5
	addsd	%xmm6, %xmm5
	divsd	%xmm5, %xmm1
	movsd	%xmm1, 8(%rbx)
	mulsd	16(%r14), %xmm0
	divsd	%xmm5, %xmm0
	movsd	%xmm0, 16(%rbx)
	movsd	%xmm6, 24(%rbx)
	addq	$64, %rsp
	.cfi_def_cfa_offset 32
	popq	%rbx
	.cfi_def_cfa_offset 24
	popq	%r14
	.cfi_def_cfa_offset 16
	popq	%rbp
	.cfi_def_cfa_offset 8
	retq
.Lfunc_end0:
	.size	_Z22conserved_to_primitivePKdPd, .Lfunc_end0-_Z22conserved_to_primitivePKdPd
	.cfi_endproc
                                        # -- End function
	.globl	_Z31primitive_to_gamma_beta_squaredPKd # -- Begin function _Z31primitive_to_gamma_beta_squaredPKd
	.type	_Z31primitive_to_gamma_beta_squaredPKd,@function
_Z31primitive_to_gamma_beta_squaredPKd: # @_Z31primitive_to_gamma_beta_squaredPKd
	.cfi_startproc
# %bb.0:
	movsd	8(%rdi), %xmm1                  # xmm1 = mem[0],zero
	movsd	16(%rdi), %xmm0                 # xmm0 = mem[0],zero
	mulsd	%xmm1, %xmm1
	mulsd	%xmm0, %xmm0
	addsd	%xmm1, %xmm0
	retq
.Lfunc_end1:
	.size	_Z31primitive_to_gamma_beta_squaredPKd, .Lfunc_end1-_Z31primitive_to_gamma_beta_squaredPKd
	.cfi_endproc
                                        # -- End function
	.section	.rodata.cst8,"aM",@progbits,8
	.p2align	3, 0x0                          # -- Begin function _Z27primitive_to_lorentz_factorPKd
.LCPI2_0:
	.quad	0x3ff0000000000000              # double 1
	.text
	.globl	_Z27primitive_to_lorentz_factorPKd
	.type	_Z27primitive_to_lorentz_factorPKd,@function
_Z27primitive_to_lorentz_factorPKd:     # @_Z27primitive_to_lorentz_factorPKd
	.cfi_startproc
# %bb.0:
	movsd	8(%rdi), %xmm0                  # xmm0 = mem[0],zero
	movsd	16(%rdi), %xmm1                 # xmm1 = mem[0],zero
	mulsd	%xmm0, %xmm0
	mulsd	%xmm1, %xmm1
	addsd	%xmm0, %xmm1
	addsd	.LCPI2_0(%rip), %xmm1
	xorps	%xmm0, %xmm0
	sqrtsd	%xmm1, %xmm0
	retq
.Lfunc_end2:
	.size	_Z27primitive_to_lorentz_factorPKd, .Lfunc_end2-_Z27primitive_to_lorentz_factorPKd
	.cfi_endproc
                                        # -- End function
	.globl	_Z33primitive_to_gamma_beta_componentPKdi # -- Begin function _Z33primitive_to_gamma_beta_componentPKdi
	.type	_Z33primitive_to_gamma_beta_componentPKdi,@function
_Z33primitive_to_gamma_beta_componentPKdi: # @_Z33primitive_to_gamma_beta_componentPKdi
	.cfi_startproc
# %bb.0:
	testl	%esi, %esi
	je	.LBB3_1
# %bb.2:
	xorps	%xmm0, %xmm0
	cmpl	$1, %esi
	jne	.LBB3_5
# %bb.3:
	movl	$2, %eax
	jmp	.LBB3_4
.LBB3_1:
	movl	$1, %eax
.LBB3_4:                                # %.sink.split
	movsd	(%rdi,%rax,8), %xmm0            # xmm0 = mem[0],zero
.LBB3_5:
	retq
.Lfunc_end3:
	.size	_Z33primitive_to_gamma_beta_componentPKdi, .Lfunc_end3-_Z33primitive_to_gamma_beta_componentPKdi
	.cfi_endproc
                                        # -- End function
	.section	.rodata.cst8,"aM",@progbits,8
	.p2align	3, 0x0                          # -- Begin function _Z27primitive_to_beta_componentPKdi
.LCPI4_0:
	.quad	0x3ff0000000000000              # double 1
	.text
	.globl	_Z27primitive_to_beta_componentPKdi
	.type	_Z27primitive_to_beta_componentPKdi,@function
_Z27primitive_to_beta_componentPKdi:    # @_Z27primitive_to_beta_componentPKdi
	.cfi_startproc
# %bb.0:
	movsd	8(%rdi), %xmm1                  # xmm1 = mem[0],zero
	movsd	16(%rdi), %xmm0                 # xmm0 = mem[0],zero
	movapd	%xmm1, %xmm2
	mulsd	%xmm1, %xmm2
	movapd	%xmm0, %xmm3
	mulsd	%xmm0, %xmm3
	addsd	%xmm2, %xmm3
	addsd	.LCPI4_0(%rip), %xmm3
	xorps	%xmm2, %xmm2
	sqrtsd	%xmm3, %xmm2
	cmpl	$1, %esi
	je	.LBB4_3
# %bb.1:
	xorpd	%xmm0, %xmm0
	testl	%esi, %esi
	jne	.LBB4_4
# %bb.2:
	divsd	%xmm2, %xmm1
	movapd	%xmm1, %xmm0
	retq
.LBB4_3:
	divsd	%xmm2, %xmm0
.LBB4_4:
	retq
.Lfunc_end4:
	.size	_Z27primitive_to_beta_componentPKdi, .Lfunc_end4-_Z27primitive_to_beta_componentPKdi
	.cfi_endproc
                                        # -- End function
	.section	.rodata.cst8,"aM",@progbits,8
	.p2align	3, 0x0                          # -- Begin function _Z29primitive_to_enthalpy_densityPKd
.LCPI5_0:
	.quad	0x4004000000000000              # double 2.5
	.text
	.globl	_Z29primitive_to_enthalpy_densityPKd
	.type	_Z29primitive_to_enthalpy_densityPKd,@function
_Z29primitive_to_enthalpy_densityPKd:   # @_Z29primitive_to_enthalpy_densityPKd
	.cfi_startproc
# %bb.0:
	movsd	24(%rdi), %xmm0                 # xmm0 = mem[0],zero
	mulsd	.LCPI5_0(%rip), %xmm0
	addsd	(%rdi), %xmm0
	retq
.Lfunc_end5:
	.size	_Z29primitive_to_enthalpy_densityPKd, .Lfunc_end5-_Z29primitive_to_enthalpy_densityPKd
	.cfi_endproc
                                        # -- End function
	.section	.rodata.cst8,"aM",@progbits,8
	.p2align	3, 0x0                          # -- Begin function _Z22primitive_to_conservedPKdPd
.LCPI6_0:
	.quad	0x3ff0000000000000              # double 1
.LCPI6_1:
	.quad	0x4004000000000000              # double 2.5
.LCPI6_2:
	.quad	0xbff0000000000000              # double -1
	.text
	.globl	_Z22primitive_to_conservedPKdPd
	.type	_Z22primitive_to_conservedPKdPd,@function
_Z22primitive_to_conservedPKdPd:        # @_Z22primitive_to_conservedPKdPd
	.cfi_startproc
# %bb.0:
	movsd	(%rdi), %xmm0                   # xmm0 = mem[0],zero
	movsd	8(%rdi), %xmm1                  # xmm1 = mem[0],zero
	movsd	16(%rdi), %xmm2                 # xmm2 = mem[0],zero
	movapd	%xmm1, %xmm3
	mulsd	%xmm1, %xmm3
	movapd	%xmm2, %xmm4
	mulsd	%xmm2, %xmm4
	addsd	%xmm3, %xmm4
	addsd	.LCPI6_0(%rip), %xmm4
	movsd	24(%rdi), %xmm3                 # xmm3 = mem[0],zero
	sqrtsd	%xmm4, %xmm4
	movsd	.LCPI6_1(%rip), %xmm5           # xmm5 = mem[0],zero
	mulsd	%xmm3, %xmm5
	addsd	%xmm0, %xmm5
	divsd	%xmm0, %xmm5
	mulsd	%xmm4, %xmm0
	movsd	%xmm0, (%rsi)
	movapd	%xmm5, %xmm6
	mulsd	%xmm0, %xmm6
	mulsd	%xmm6, %xmm1
	movsd	%xmm1, 8(%rsi)
	mulsd	%xmm2, %xmm6
	mulsd	%xmm4, %xmm5
	addsd	.LCPI6_2(%rip), %xmm5
	movsd	%xmm6, 16(%rsi)
	mulsd	%xmm0, %xmm5
	subsd	%xmm3, %xmm5
	movsd	%xmm5, 24(%rsi)
	retq
.Lfunc_end6:
	.size	_Z22primitive_to_conservedPKdPd, .Lfunc_end6-_Z22primitive_to_conservedPKdPd
	.cfi_endproc
                                        # -- End function
	.section	.rodata.cst8,"aM",@progbits,8
	.p2align	3, 0x0                          # -- Begin function _Z24primitive_to_flux_vectorPKdPdi
.LCPI7_0:
	.quad	0x3ff0000000000000              # double 1
.LCPI7_1:
	.quad	0x4004000000000000              # double 2.5
.LCPI7_2:
	.quad	0xbff0000000000000              # double -1
	.text
	.globl	_Z24primitive_to_flux_vectorPKdPdi
	.type	_Z24primitive_to_flux_vectorPKdPdi,@function
_Z24primitive_to_flux_vectorPKdPdi:     # @_Z24primitive_to_flux_vectorPKdPdi
	.cfi_startproc
# %bb.0:
	movsd	8(%rdi), %xmm2                  # xmm2 = mem[0],zero
	movsd	16(%rdi), %xmm0                 # xmm0 = mem[0],zero
	movapd	%xmm2, %xmm1
	mulsd	%xmm2, %xmm1
	movapd	%xmm0, %xmm3
	mulsd	%xmm0, %xmm3
	addsd	%xmm1, %xmm3
	addsd	.LCPI7_0(%rip), %xmm3
	sqrtsd	%xmm3, %xmm5
	cmpl	$1, %edx
	je	.LBB7_3
# %bb.1:
	xorpd	%xmm1, %xmm1
	testl	%edx, %edx
	jne	.LBB7_5
# %bb.2:
	movapd	%xmm2, %xmm1
	jmp	.LBB7_4
.LBB7_3:
	movapd	%xmm0, %xmm1
.LBB7_4:                                # %_Z27primitive_to_beta_componentPKdi.exit
	divsd	%xmm5, %xmm1
.LBB7_5:                                # %_Z27primitive_to_beta_componentPKdi.exit
	movsd	(%rdi), %xmm6                   # xmm6 = mem[0],zero
	movsd	24(%rdi), %xmm4                 # xmm4 = mem[0],zero
	movsd	.LCPI7_1(%rip), %xmm3           # xmm3 = mem[0],zero
	mulsd	%xmm4, %xmm3
	addsd	%xmm6, %xmm3
	divsd	%xmm6, %xmm3
	mulsd	%xmm5, %xmm6
	movapd	%xmm6, %xmm7
	mulsd	%xmm3, %xmm7
	mulsd	%xmm7, %xmm2
	mulsd	%xmm5, %xmm3
	addsd	.LCPI7_2(%rip), %xmm3
	mulsd	%xmm7, %xmm0
	mulsd	%xmm6, %xmm3
	mulsd	%xmm1, %xmm6
	movsd	%xmm6, (%rsi)
	mulsd	%xmm1, %xmm2
	movsd	.LCPI7_0(%rip), %xmm5           # xmm5 = mem[0],zero
	movapd	%xmm5, %xmm6
	testl	%edx, %edx
	je	.LBB7_7
# %bb.6:                                # %_Z27primitive_to_beta_componentPKdi.exit
	xorpd	%xmm6, %xmm6
.LBB7_7:                                # %_Z27primitive_to_beta_componentPKdi.exit
	subsd	%xmm4, %xmm3
	mulsd	%xmm4, %xmm6
	addsd	%xmm2, %xmm6
	movsd	%xmm6, 8(%rsi)
	mulsd	%xmm1, %xmm0
	cmpl	$1, %edx
	je	.LBB7_9
# %bb.8:                                # %_Z27primitive_to_beta_componentPKdi.exit
	xorpd	%xmm5, %xmm5
.LBB7_9:                                # %_Z27primitive_to_beta_componentPKdi.exit
	mulsd	%xmm4, %xmm5
	addsd	%xmm0, %xmm5
	movsd	%xmm5, 16(%rsi)
	mulsd	%xmm1, %xmm3
	mulsd	%xmm4, %xmm1
	addsd	%xmm3, %xmm1
	movsd	%xmm1, 24(%rsi)
	retq
.Lfunc_end7:
	.size	_Z24primitive_to_flux_vectorPKdPdi, .Lfunc_end7-_Z24primitive_to_flux_vectorPKdPdi
	.cfi_endproc
                                        # -- End function
	.section	.rodata.cst8,"aM",@progbits,8
	.p2align	3, 0x0                          # -- Begin function _Z32primitive_to_sound_speed_squaredPKd
.LCPI8_0:
	.quad	0x4004000000000000              # double 2.5
.LCPI8_1:
	.quad	0x3ffaaaaaaaaaaaab              # double 1.6666666666666667
	.text
	.globl	_Z32primitive_to_sound_speed_squaredPKd
	.type	_Z32primitive_to_sound_speed_squaredPKd,@function
_Z32primitive_to_sound_speed_squaredPKd: # @_Z32primitive_to_sound_speed_squaredPKd
	.cfi_startproc
# %bb.0:
	movsd	24(%rdi), %xmm0                 # xmm0 = mem[0],zero
	movsd	.LCPI8_0(%rip), %xmm1           # xmm1 = mem[0],zero
	mulsd	%xmm0, %xmm1
	addsd	(%rdi), %xmm1
	mulsd	.LCPI8_1(%rip), %xmm0
	divsd	%xmm1, %xmm0
	retq
.Lfunc_end8:
	.size	_Z32primitive_to_sound_speed_squaredPKd, .Lfunc_end8-_Z32primitive_to_sound_speed_squaredPKd
	.cfi_endproc
                                        # -- End function
	.section	.rodata.cst8,"aM",@progbits,8
	.p2align	3, 0x0                          # -- Begin function _Z29primitive_to_outer_wavespeedsPKdPdi
.LCPI9_0:
	.quad	0x3ffaaaaaaaaaaaab              # double 1.6666666666666667
.LCPI9_1:
	.quad	0x4004000000000000              # double 2.5
.LCPI9_2:
	.quad	0x3ff0000000000000              # double 1
	.text
	.globl	_Z29primitive_to_outer_wavespeedsPKdPdi
	.type	_Z29primitive_to_outer_wavespeedsPKdPdi,@function
_Z29primitive_to_outer_wavespeedsPKdPdi: # @_Z29primitive_to_outer_wavespeedsPKdPdi
	.cfi_startproc
# %bb.0:
	pushq	%rbx
	.cfi_def_cfa_offset 16
	subq	$32, %rsp
	.cfi_def_cfa_offset 48
	.cfi_offset %rbx, -16
	movq	%rsi, %rbx
	movsd	(%rdi), %xmm2                   # xmm2 = mem[0],zero
	movsd	24(%rdi), %xmm3                 # xmm3 = mem[0],zero
	testl	%edx, %edx
	je	.LBB9_1
# %bb.2:
	xorpd	%xmm1, %xmm1
	cmpl	$1, %edx
	jne	.LBB9_5
# %bb.3:
	movl	$2, %eax
	jmp	.LBB9_4
.LBB9_1:
	movl	$1, %eax
.LBB9_4:                                # %.sink.split.i
	movsd	(%rdi,%rax,8), %xmm1            # xmm1 = mem[0],zero
.LBB9_5:                                # %_Z33primitive_to_gamma_beta_componentPKdi.exit
	movsd	.LCPI9_0(%rip), %xmm0           # xmm0 = mem[0],zero
	mulsd	%xmm3, %xmm0
	mulsd	.LCPI9_1(%rip), %xmm3
	addsd	%xmm3, %xmm2
	divsd	%xmm2, %xmm0
	movsd	8(%rdi), %xmm2                  # xmm2 = mem[0],zero
	movsd	16(%rdi), %xmm3                 # xmm3 = mem[0],zero
	mulsd	%xmm2, %xmm2
	mulsd	%xmm3, %xmm3
	addsd	%xmm2, %xmm3
	movsd	.LCPI9_2(%rip), %xmm4           # xmm4 = mem[0],zero
	movapd	%xmm3, %xmm2
	addsd	%xmm4, %xmm2
	divsd	%xmm2, %xmm3
	mulsd	%xmm1, %xmm1
	divsd	%xmm2, %xmm1
	sqrtsd	%xmm1, %xmm6
	movapd	%xmm4, %xmm2
	subsd	%xmm3, %xmm2
	mulsd	%xmm0, %xmm2
	mulsd	%xmm0, %xmm3
	movapd	%xmm4, %xmm5
	subsd	%xmm3, %xmm5
	subsd	%xmm0, %xmm4
	mulsd	%xmm4, %xmm1
	movapd	%xmm5, %xmm0
	subsd	%xmm1, %xmm0
	mulsd	%xmm2, %xmm0
	xorpd	%xmm1, %xmm1
	ucomisd	%xmm1, %xmm0
	jb	.LBB9_7
# %bb.6:
	sqrtsd	%xmm0, %xmm0
	jmp	.LBB9_8
.LBB9_7:                                # %call.sqrt
	movsd	%xmm4, 24(%rsp)                 # 8-byte Spill
	movsd	%xmm5, 16(%rsp)                 # 8-byte Spill
	movsd	%xmm6, 8(%rsp)                  # 8-byte Spill
	callq	sqrt
	movsd	8(%rsp), %xmm6                  # 8-byte Reload
                                        # xmm6 = mem[0],zero
	movsd	16(%rsp), %xmm5                 # 8-byte Reload
                                        # xmm5 = mem[0],zero
	movsd	24(%rsp), %xmm4                 # 8-byte Reload
                                        # xmm4 = mem[0],zero
.LBB9_8:                                # %_Z33primitive_to_gamma_beta_componentPKdi.exit.split
	mulsd	%xmm6, %xmm4
	movapd	%xmm4, %xmm1
	subsd	%xmm0, %xmm1
	divsd	%xmm5, %xmm1
	movsd	%xmm1, (%rbx)
	addsd	%xmm0, %xmm4
	divsd	%xmm5, %xmm4
	movsd	%xmm4, 8(%rbx)
	addq	$32, %rsp
	.cfi_def_cfa_offset 16
	popq	%rbx
	.cfi_def_cfa_offset 8
	retq
.Lfunc_end9:
	.size	_Z29primitive_to_outer_wavespeedsPKdPdi, .Lfunc_end9-_Z29primitive_to_outer_wavespeedsPKdPdi
	.cfi_endproc
                                        # -- End function
	.section	.rodata.cst8,"aM",@progbits,8
	.p2align	3, 0x0                          # -- Begin function _Z17initial_primitivePdidd
.LCPI10_0:
	.quad	0x3fe0000000000000              # double 0.5
	.section	.rodata.cst16,"aM",@progbits,16
	.p2align	3, 0x0
.LCPI10_1:
	.quad	0x3fb999999999999a              # double 0.10000000000000001
	.quad	0x3ff0000000000000              # double 1
.LCPI10_2:
	.quad	0x3fc0000000000000              # double 0.125
	.quad	0x3ff0000000000000              # double 1
	.text
	.globl	_Z17initial_primitivePdidd
	.type	_Z17initial_primitivePdidd,@function
_Z17initial_primitivePdidd:             # @_Z17initial_primitivePdidd
	.cfi_startproc
# %bb.0:
	testl	%esi, %esi
	jle	.LBB10_3
# %bb.1:                                # %.lr.ph
	movapd	%xmm1, %xmm2
	subsd	%xmm0, %xmm2
	cvtsi2sd	%esi, %xmm3
	divsd	%xmm3, %xmm2
	addsd	%xmm1, %xmm0
	mulsd	.LCPI10_0(%rip), %xmm0
	movl	%esi, %eax
	shlq	$2, %rax
	xorl	%ecx, %ecx
	movsd	.LCPI10_0(%rip), %xmm1          # xmm1 = mem[0],zero
	xorpd	%xmm3, %xmm3
	xorl	%edx, %edx
.LBB10_2:                               # =>This Inner Loop Header: Depth=1
	xorps	%xmm4, %xmm4
	cvtsi2sd	%ecx, %xmm4
	addsd	%xmm1, %xmm4
	mulsd	%xmm2, %xmm4
	movl	%edx, %esi
	andl	$-4, %esi
	xorl	%r8d, %r8d
	ucomisd	%xmm4, %xmm0
	seta	%r8b
	movsd	.LCPI10_1(,%r8,8), %xmm4        # xmm4 = mem[0],zero
	movsd	.LCPI10_2(,%r8,8), %xmm5        # xmm5 = mem[0],zero
	movsd	%xmm4, (%rdi,%rsi,8)
	movupd	%xmm3, 8(%rdi,%rsi,8)
	movsd	%xmm5, 24(%rdi,%rsi,8)
	addq	$4, %rdx
	incl	%ecx
	cmpq	%rdx, %rax
	jne	.LBB10_2
.LBB10_3:                               # %._crit_edge
	retq
.Lfunc_end10:
	.size	_Z17initial_primitivePdidd, .Lfunc_end10-_Z17initial_primitivePdidd
	.cfi_endproc
                                        # -- End function
	.globl	_Z17update_struct_newidd        # -- Begin function _Z17update_struct_newidd
	.type	_Z17update_struct_newidd,@function
_Z17update_struct_newidd:               # @_Z17update_struct_newidd
	.cfi_startproc
# %bb.0:
	pushq	%r15
	.cfi_def_cfa_offset 16
	pushq	%r14
	.cfi_def_cfa_offset 24
	pushq	%rbx
	.cfi_def_cfa_offset 32
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	.cfi_offset %r15, -16
	movl	%esi, %r14d
	movq	%rdi, %rbx
	movl	%esi, (%rdi)
	movsd	%xmm0, 8(%rdi)
	movsd	%xmm1, 16(%rdi)
	addq	$24, %rdi
	leal	(,%r14,4), %eax
	movslq	%eax, %r15
	shlq	$3, %r15
	movq	%r15, %rsi
	callq	hipMalloc
	leaq	32(%rbx), %rdi
	movq	%r15, %rsi
	callq	hipMalloc
	movq	%rbx, %rdi
	addq	$40, %rdi
	leal	4(,%r14,4), %eax
	movslq	%eax, %rsi
	shlq	$3, %rsi
	callq	hipMalloc
	movq	%rbx, %rax
	popq	%rbx
	.cfi_def_cfa_offset 24
	popq	%r14
	.cfi_def_cfa_offset 16
	popq	%r15
	.cfi_def_cfa_offset 8
	retq
.Lfunc_end11:
	.size	_Z17update_struct_newidd, .Lfunc_end11-_Z17update_struct_newidd
	.cfi_endproc
                                        # -- End function
	.globl	_Z17update_struct_del12UpdateStruct # -- Begin function _Z17update_struct_del12UpdateStruct
	.type	_Z17update_struct_del12UpdateStruct,@function
_Z17update_struct_del12UpdateStruct:    # @_Z17update_struct_del12UpdateStruct
	.cfi_startproc
# %bb.0:
	pushq	%rax
	.cfi_def_cfa_offset 16
	movq	40(%rsp), %rdi
	callq	hipFree
	movq	48(%rsp), %rdi
	callq	hipFree
	movq	56(%rsp), %rdi
	popq	%rax
	.cfi_def_cfa_offset 8
	jmp	hipFree                         # TAILCALL
.Lfunc_end12:
	.size	_Z17update_struct_del12UpdateStruct, .Lfunc_end12-_Z17update_struct_del12UpdateStruct
	.cfi_endproc
                                        # -- End function
	.globl	_Z27update_struct_set_primitive12UpdateStructPKd # -- Begin function _Z27update_struct_set_primitive12UpdateStructPKd
	.type	_Z27update_struct_set_primitive12UpdateStructPKd,@function
_Z27update_struct_set_primitive12UpdateStructPKd: # @_Z27update_struct_set_primitive12UpdateStructPKd
	.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
	pushq	%rax
	.cfi_def_cfa_offset 64
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	.cfi_offset %rbp, -16
	movq	%rdi, %r15
	leaq	64(%rsp), %rax
	movslq	(%rax), %r12
	movq	%r12, %rbx
	shlq	$5, %rbx
	movq	%rbx, %rdi
	callq	malloc
	movq	%rax, %r14
	testq	%r12, %r12
	jle	.LBB13_3
# %bb.1:
	movl	%r12d, %ebp
	movq	%r15, %r12
	movq	%r14, %r13
.LBB13_2:                               # %.lr.ph
                                        # =>This Inner Loop Header: Depth=1
	movq	%r12, %rdi
	movq	%r13, %rsi
	callq	_Z22primitive_to_conservedPKdPd
	addq	$32, %r13
	addq	$32, %r12
	decq	%rbp
	jne	.LBB13_2
.LBB13_3:                               # %._crit_edge
	leaq	64(%rsp), %r12
	movq	24(%r12), %rdi
	movq	%r15, %rsi
	movq	%rbx, %rdx
	movl	$1, %ecx
	callq	hipMemcpy
	movq	32(%r12), %rdi
	movq	%r14, %rsi
	movq	%rbx, %rdx
	movl	$1, %ecx
	callq	hipMemcpy
	movq	%r14, %rdi
	addq	$8, %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
	jmp	free                            # TAILCALL
.Lfunc_end13:
	.size	_Z27update_struct_set_primitive12UpdateStructPKd, .Lfunc_end13-_Z27update_struct_set_primitive12UpdateStructPKd
	.cfi_endproc
                                        # -- End function
	.globl	_Z27update_struct_get_primitive12UpdateStructPd # -- Begin function _Z27update_struct_get_primitive12UpdateStructPd
	.type	_Z27update_struct_get_primitive12UpdateStructPd,@function
_Z27update_struct_get_primitive12UpdateStructPd: # @_Z27update_struct_get_primitive12UpdateStructPd
	.cfi_startproc
# %bb.0:
	movq	32(%rsp), %rsi
	movslq	8(%rsp), %rdx
	shlq	$5, %rdx
	movl	$2, %ecx
	jmp	hipMemcpy                       # TAILCALL
.Lfunc_end14:
	.size	_Z27update_struct_get_primitive12UpdateStructPd, .Lfunc_end14-_Z27update_struct_get_primitive12UpdateStructPd
	.cfi_endproc
                                        # -- End function
	.globl	_Z44__device_stub__update_struct_do_compute_flux12UpdateStruct # -- Begin function _Z44__device_stub__update_struct_do_compute_flux12UpdateStruct
	.type	_Z44__device_stub__update_struct_do_compute_flux12UpdateStruct,@function
_Z44__device_stub__update_struct_do_compute_flux12UpdateStruct: # @_Z44__device_stub__update_struct_do_compute_flux12UpdateStruct
	.cfi_startproc
# %bb.0:
	pushq	%r15
	.cfi_def_cfa_offset 16
	pushq	%r14
	.cfi_def_cfa_offset 24
	pushq	%r13
	.cfi_def_cfa_offset 32
	pushq	%r12
	.cfi_def_cfa_offset 40
	pushq	%rbx
	.cfi_def_cfa_offset 48
	subq	$64, %rsp
	.cfi_def_cfa_offset 112
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r13, -32
	.cfi_offset %r14, -24
	.cfi_offset %r15, -16
	leaq	112(%rsp), %rax
	movq	%rsp, %rbx
	movq	%rax, (%rbx)
	leaq	48(%rsp), %r14
	leaq	32(%rsp), %r15
	leaq	24(%rsp), %r12
	leaq	16(%rsp), %r13
	movq	%r14, %rdi
	movq	%r15, %rsi
	movq	%r12, %rdx
	movq	%r13, %rcx
	callq	__hipPopCallConfiguration
	movq	(%r14), %rsi
	movl	8(%r14), %edx
	movq	(%r15), %rcx
	movl	8(%r15), %r8d
	movl	$_Z29update_struct_do_compute_flux12UpdateStruct, %edi
	movq	%rbx, %r9
	pushq	(%r13)
	.cfi_adjust_cfa_offset 8
	pushq	(%r12)
	.cfi_adjust_cfa_offset 8
	callq	hipLaunchKernel
	addq	$80, %rsp
	.cfi_adjust_cfa_offset -80
	popq	%rbx
	.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
	retq
.Lfunc_end15:
	.size	_Z44__device_stub__update_struct_do_compute_flux12UpdateStruct, .Lfunc_end15-_Z44__device_stub__update_struct_do_compute_flux12UpdateStruct
	.cfi_endproc
                                        # -- End function
	.globl	_Z44__device_stub__update_struct_do_advance_cons12UpdateStructd # -- Begin function _Z44__device_stub__update_struct_do_advance_cons12UpdateStructd
	.type	_Z44__device_stub__update_struct_do_advance_cons12UpdateStructd,@function
_Z44__device_stub__update_struct_do_advance_cons12UpdateStructd: # @_Z44__device_stub__update_struct_do_advance_cons12UpdateStructd
	.cfi_startproc
# %bb.0:
	pushq	%r15
	.cfi_def_cfa_offset 16
	pushq	%r14
	.cfi_def_cfa_offset 24
	pushq	%r13
	.cfi_def_cfa_offset 32
	pushq	%r12
	.cfi_def_cfa_offset 40
	pushq	%rbx
	.cfi_def_cfa_offset 48
	subq	$80, %rsp
	.cfi_def_cfa_offset 128
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r13, -32
	.cfi_offset %r14, -24
	.cfi_offset %r15, -16
	leaq	24(%rsp), %rax
	movsd	%xmm0, (%rax)
	leaq	128(%rsp), %rcx
	leaq	64(%rsp), %rbx
	movq	%rcx, (%rbx)
	movq	%rax, 8(%rbx)
	leaq	48(%rsp), %r14
	leaq	32(%rsp), %r15
	leaq	16(%rsp), %r12
	leaq	8(%rsp), %r13
	movq	%r14, %rdi
	movq	%r15, %rsi
	movq	%r12, %rdx
	movq	%r13, %rcx
	callq	__hipPopCallConfiguration
	movq	(%r14), %rsi
	movl	8(%r14), %edx
	movq	(%r15), %rcx
	movl	8(%r15), %r8d
	movl	$_Z29update_struct_do_advance_cons12UpdateStructd, %edi
	movq	%rbx, %r9
	pushq	(%r13)
	.cfi_adjust_cfa_offset 8
	pushq	(%r12)
	.cfi_adjust_cfa_offset 8
	callq	hipLaunchKernel
	addq	$96, %rsp
	.cfi_adjust_cfa_offset -96
	popq	%rbx
	.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
	retq
.Lfunc_end16:
	.size	_Z44__device_stub__update_struct_do_advance_cons12UpdateStructd, .Lfunc_end16-_Z44__device_stub__update_struct_do_advance_cons12UpdateStructd
	.cfi_endproc
                                        # -- End function
	.section	.rodata.cst8,"aM",@progbits,8
	.p2align	3, 0x0                          # -- Begin function main
.LCPI17_0:
	.quad	0x3ff0000000000000              # double 1
.LCPI17_1:
	.quad	0x3fe0000000000000              # double 0.5
.LCPI17_2:
	.quad	0x3ef0000000000000              # double 1.52587890625E-5
.LCPI17_5:
	.quad	0x3eb999999999999a              # double 1.5258789062500001E-6
.LCPI17_6:
	.quad	0x412e848000000000              # double 1.0E+6
.LCPI17_7:
	.quad	0x3fb0c6f7a0b5ed8d              # double 0.065535999999999997
.LCPI17_8:
	.quad	0x4059000000000000              # double 100
.LCPI17_9:
	.quad	0x3fb999999999999a              # double 0.10000000000000001
	.section	.rodata.cst16,"aM",@progbits,16
	.p2align	3, 0x0
.LCPI17_3:
	.quad	0x3fb999999999999a              # double 0.10000000000000001
	.quad	0x3ff0000000000000              # double 1
.LCPI17_4:
	.quad	0x3fc0000000000000              # double 0.125
	.quad	0x3ff0000000000000              # double 1
	.text
	.globl	main
	.type	main,@function
main:                                   # @main
	.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	$120, %rsp
	.cfi_def_cfa_offset 176
	.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	$2097152, %edi                  # imm = 0x200000
	callq	malloc
	movq	%rax, %rbx
	leaq	64(%rsp), %rdi
	movsd	.LCPI17_0(%rip), %xmm1          # xmm1 = mem[0],zero
	xorps	%xmm0, %xmm0
	movl	$65536, %esi                    # imm = 0x10000
	callq	_Z17update_struct_newidd
	xorl	%eax, %eax
	movsd	.LCPI17_1(%rip), %xmm3          # xmm3 = mem[0],zero
	xorps	%xmm0, %xmm0
	movq	%rbx, %rcx
.LBB17_1:                               # =>This Inner Loop Header: Depth=1
	xorps	%xmm1, %xmm1
	cvtsi2sd	%eax, %xmm1
	addsd	%xmm3, %xmm1
	mulsd	.LCPI17_2(%rip), %xmm1
	xorl	%edx, %edx
	ucomisd	%xmm1, %xmm3
	seta	%dl
	movsd	.LCPI17_3(,%rdx,8), %xmm1       # xmm1 = mem[0],zero
	movsd	.LCPI17_4(,%rdx,8), %xmm2       # xmm2 = mem[0],zero
	movsd	%xmm1, (%rcx)
	movups	%xmm0, 8(%rcx)
	movsd	%xmm2, 24(%rcx)
	incq	%rax
	addq	$32, %rcx
	cmpq	$65536, %rax                    # imm = 0x10000
	jne	.LBB17_1
# %bb.2:                                # %_Z17initial_primitivePdidd.exit
	movabsq	$4294967328, %r14               # imm = 0x100000020
	movupd	64(%rsp), %xmm0
	movupd	80(%rsp), %xmm1
	movups	96(%rsp), %xmm2
	movups	%xmm2, 32(%rsp)
	movupd	%xmm1, 16(%rsp)
	movupd	%xmm0, (%rsp)
	movq	%rbx, 112(%rsp)                 # 8-byte Spill
	movq	%rbx, %rdi
	callq	_Z27update_struct_set_primitive12UpdateStructPKd
	xorpd	%xmm0, %xmm0
	movsd	%xmm0, 56(%rsp)                 # 8-byte Spill
	xorl	%r15d, %r15d
	leaq	2017(%r14), %r12
	leaq	2016(%r14), %r13
.LBB17_3:                               # =>This Loop Header: Depth=1
                                        #     Child Loop BB17_4 Depth 2
	movl	$100, %ebx
	callq	clock
	movq	%rax, %rbp
.LBB17_4:                               #   Parent Loop BB17_3 Depth=1
                                        # =>  This Inner Loop Header: Depth=2
	movq	%r12, %rdi
	movl	$1, %esi
	movq	%r14, %rdx
	movl	$1, %ecx
	xorl	%r8d, %r8d
	xorl	%r9d, %r9d
	callq	__hipPushCallConfiguration
	testl	%eax, %eax
	jne	.LBB17_6
# %bb.5:                                #   in Loop: Header=BB17_4 Depth=2
	movupd	64(%rsp), %xmm0
	movupd	80(%rsp), %xmm1
	movups	96(%rsp), %xmm2
	movups	%xmm2, 32(%rsp)
	movupd	%xmm1, 16(%rsp)
	movupd	%xmm0, (%rsp)
	callq	_Z44__device_stub__update_struct_do_compute_flux12UpdateStruct
.LBB17_6:                               #   in Loop: Header=BB17_4 Depth=2
	movq	%r13, %rdi
	movl	$1, %esi
	movq	%r14, %rdx
	movl	$1, %ecx
	xorl	%r8d, %r8d
	xorl	%r9d, %r9d
	callq	__hipPushCallConfiguration
	testl	%eax, %eax
	jne	.LBB17_8
# %bb.7:                                #   in Loop: Header=BB17_4 Depth=2
	movups	64(%rsp), %xmm0
	movupd	80(%rsp), %xmm1
	movups	96(%rsp), %xmm2
	movups	%xmm2, 32(%rsp)
	movupd	%xmm1, 16(%rsp)
	movups	%xmm0, (%rsp)
	movsd	.LCPI17_5(%rip), %xmm0          # xmm0 = mem[0],zero
	callq	_Z44__device_stub__update_struct_do_advance_cons12UpdateStructd
.LBB17_8:                               #   in Loop: Header=BB17_4 Depth=2
	movsd	56(%rsp), %xmm0                 # 8-byte Reload
                                        # xmm0 = mem[0],zero
	addsd	.LCPI17_5(%rip), %xmm0
	movsd	%xmm0, 56(%rsp)                 # 8-byte Spill
	decl	%ebx
	jne	.LBB17_4
# %bb.9:                                #   in Loop: Header=BB17_3 Depth=1
	addl	$100, %r15d
	callq	clock
	subq	%rbp, %rax
	xorps	%xmm0, %xmm0
	cvtsi2sd	%rax, %xmm0
	divsd	.LCPI17_6(%rip), %xmm0
	movsd	.LCPI17_7(%rip), %xmm1          # xmm1 = mem[0],zero
	divsd	%xmm0, %xmm1
	mulsd	.LCPI17_8(%rip), %xmm1
	movl	$.L.str, %edi
	movl	%r15d, %esi
	movsd	56(%rsp), %xmm0                 # 8-byte Reload
                                        # xmm0 = mem[0],zero
	movb	$2, %al
	callq	printf
	movsd	.LCPI17_9(%rip), %xmm0          # xmm0 = mem[0],zero
	ucomisd	56(%rsp), %xmm0                 # 8-byte Folded Reload
	ja	.LBB17_3
# %bb.10:
	movslq	64(%rsp), %rdx
	movq	88(%rsp), %rsi
	shlq	$5, %rdx
	movq	112(%rsp), %r12                 # 8-byte Reload
	movq	%r12, %rdi
	movl	$2, %ecx
	callq	hipMemcpy
	movq	88(%rsp), %rdi
	movq	96(%rsp), %r14
	movq	104(%rsp), %r15
	callq	hipFree
	movq	%r14, %rdi
	callq	hipFree
	movq	%r15, %rdi
	callq	hipFree
	movl	$.L.str.1, %edi
	movl	$.L.str.2, %esi
	callq	fopen
	movq	%rax, %r14
	xorl	%ebx, %ebx
	movq	%r12, %r15
.LBB17_11:                              # =>This Inner Loop Header: Depth=1
	xorps	%xmm0, %xmm0
	cvtsi2sd	%ebx, %xmm0
	addsd	.LCPI17_1(%rip), %xmm0
	mulsd	.LCPI17_2(%rip), %xmm0
	movsd	(%r15), %xmm1                   # xmm1 = mem[0],zero
	movsd	8(%r15), %xmm2                  # xmm2 = mem[0],zero
	movsd	24(%r15), %xmm3                 # xmm3 = mem[0],zero
	movl	$.L.str.3, %esi
	movq	%r14, %rdi
	movb	$4, %al
	callq	fprintf
	incq	%rbx
	addq	$32, %r15
	cmpq	$65536, %rbx                    # imm = 0x10000
	jne	.LBB17_11
# %bb.12:
	movq	%r14, %rdi
	callq	fclose
	movq	%r12, %rdi
	callq	free
	callq	hipGetLastError
	testl	%eax, %eax
	je	.LBB17_14
# %bb.13:
	movl	%eax, %edi
	callq	hipGetErrorString
	movq	%rax, %rdi
	callq	puts@PLT
.LBB17_14:
	xorl	%eax, %eax
	addq	$120, %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_end17:
	.size	main, .Lfunc_end17-main
	.cfi_endproc
                                        # -- End function
	.p2align	4, 0x90                         # -- Begin function __hip_module_ctor
	.type	__hip_module_ctor,@function
__hip_module_ctor:                      # @__hip_module_ctor
	.cfi_startproc
# %bb.0:
	pushq	%rbx
	.cfi_def_cfa_offset 16
	subq	$32, %rsp
	.cfi_def_cfa_offset 48
	.cfi_offset %rbx, -16
	movq	__hip_gpubin_handle(%rip), %rbx
	testq	%rbx, %rbx
	jne	.LBB18_2
# %bb.1:
	movl	$__hip_fatbin_wrapper, %edi
	callq	__hipRegisterFatBinary
	movq	%rax, %rbx
	movq	%rax, __hip_gpubin_handle(%rip)
.LBB18_2:
	xorps	%xmm0, %xmm0
	movups	%xmm0, 16(%rsp)
	movups	%xmm0, (%rsp)
	movl	$_Z29update_struct_do_compute_flux12UpdateStruct, %esi
	movl	$.L__unnamed_1, %edx
	movl	$.L__unnamed_1, %ecx
	movq	%rbx, %rdi
	movl	$-1, %r8d
	xorl	%r9d, %r9d
	callq	__hipRegisterFunction
	xorps	%xmm0, %xmm0
	movups	%xmm0, 16(%rsp)
	movups	%xmm0, (%rsp)
	movl	$_Z29update_struct_do_advance_cons12UpdateStructd, %esi
	movl	$.L__unnamed_2, %edx
	movl	$.L__unnamed_2, %ecx
	movq	%rbx, %rdi
	movl	$-1, %r8d
	xorl	%r9d, %r9d
	callq	__hipRegisterFunction
	movl	$__hip_module_dtor, %edi
	addq	$32, %rsp
	.cfi_def_cfa_offset 16
	popq	%rbx
	.cfi_def_cfa_offset 8
	jmp	atexit                          # TAILCALL
.Lfunc_end18:
	.size	__hip_module_ctor, .Lfunc_end18-__hip_module_ctor
	.cfi_endproc
                                        # -- End function
	.p2align	4, 0x90                         # -- Begin function __hip_module_dtor
	.type	__hip_module_dtor,@function
__hip_module_dtor:                      # @__hip_module_dtor
	.cfi_startproc
# %bb.0:
	movq	__hip_gpubin_handle(%rip), %rdi
	testq	%rdi, %rdi
	je	.LBB19_2
# %bb.1:
	pushq	%rax
	.cfi_def_cfa_offset 16
	callq	__hipUnregisterFatBinary
	movq	$0, __hip_gpubin_handle(%rip)
	addq	$8, %rsp
	.cfi_def_cfa_offset 8
.LBB19_2:
	retq
.Lfunc_end19:
	.size	__hip_module_dtor, .Lfunc_end19-__hip_module_dtor
	.cfi_endproc
                                        # -- End function
	.type	_Z29update_struct_do_compute_flux12UpdateStruct,@object # @_Z29update_struct_do_compute_flux12UpdateStruct
	.section	.rodata,"a",@progbits
	.globl	_Z29update_struct_do_compute_flux12UpdateStruct
	.p2align	3, 0x0
_Z29update_struct_do_compute_flux12UpdateStruct:
	.quad	_Z44__device_stub__update_struct_do_compute_flux12UpdateStruct
	.size	_Z29update_struct_do_compute_flux12UpdateStruct, 8

	.type	_Z29update_struct_do_advance_cons12UpdateStructd,@object # @_Z29update_struct_do_advance_cons12UpdateStructd
	.globl	_Z29update_struct_do_advance_cons12UpdateStructd
	.p2align	3, 0x0
_Z29update_struct_do_advance_cons12UpdateStructd:
	.quad	_Z44__device_stub__update_struct_do_advance_cons12UpdateStructd
	.size	_Z29update_struct_do_advance_cons12UpdateStructd, 8

	.type	.L.str,@object                  # @.str
	.section	.rodata.str1.1,"aMS",@progbits,1
.L.str:
	.asciz	"[%d] t=%.3e Mzps=%.2f\n"
	.size	.L.str, 23

	.type	.L.str.1,@object                # @.str.1
.L.str.1:
	.asciz	"sr1d.dat"
	.size	.L.str.1, 9

	.type	.L.str.2,@object                # @.str.2
.L.str.2:
	.asciz	"w"
	.size	.L.str.2, 2

	.type	.L.str.3,@object                # @.str.3
.L.str.3:
	.asciz	"%f %f %f %f\n"
	.size	.L.str.3, 13

	.type	.L__unnamed_1,@object           # @0
.L__unnamed_1:
	.asciz	"_Z29update_struct_do_compute_flux12UpdateStruct"
	.size	.L__unnamed_1, 48

	.type	.L__unnamed_2,@object           # @1
.L__unnamed_2:
	.asciz	"_Z29update_struct_do_advance_cons12UpdateStructd"
	.size	.L__unnamed_2, 49

	.type	__hip_fatbin_wrapper,@object    # @__hip_fatbin_wrapper
	.section	.hipFatBinSegment,"a",@progbits
	.p2align	3, 0x0
__hip_fatbin_wrapper:
	.long	1212764230                      # 0x48495046
	.long	1                               # 0x1
	.quad	__hip_fatbin
	.quad	0
	.size	__hip_fatbin_wrapper, 24

	.type	__hip_gpubin_handle,@object     # @__hip_gpubin_handle
	.local	__hip_gpubin_handle
	.comm	__hip_gpubin_handle,8,8
	.section	.init_array,"aw",@init_array
	.p2align	3, 0x0
	.quad	__hip_module_ctor
	.type	__hip_cuid_,@object             # @__hip_cuid_
	.bss
	.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 _Z44__device_stub__update_struct_do_compute_flux12UpdateStruct
	.addrsig_sym _Z44__device_stub__update_struct_do_advance_cons12UpdateStructd
	.addrsig_sym __hip_module_ctor
	.addrsig_sym __hip_module_dtor
	.addrsig_sym _Z29update_struct_do_compute_flux12UpdateStruct
	.addrsig_sym _Z29update_struct_do_advance_cons12UpdateStructd
	.addrsig_sym __hip_fatbin
	.addrsig_sym __hip_fatbin_wrapper
	.addrsig_sym __hip_cuid_

	.text
	.amdgcn_target "amdgcn-amd-amdhsa--gfx1100"
	.protected	_Z29update_struct_do_compute_flux12UpdateStruct ; -- Begin function _Z29update_struct_do_compute_flux12UpdateStruct
	.globl	_Z29update_struct_do_compute_flux12UpdateStruct
	.p2align	8
	.type	_Z29update_struct_do_compute_flux12UpdateStruct,@function
_Z29update_struct_do_compute_flux12UpdateStruct: ; @_Z29update_struct_do_compute_flux12UpdateStruct
; %bb.0:
	s_clause 0x1
	s_load_b32 s3, s[0:1], 0x3c
	s_load_b32 s2, s[0:1], 0x0
	s_waitcnt lgkmcnt(0)
	s_and_b32 s3, s3, 0xffff
	s_delay_alu instid0(SALU_CYCLE_1) | instskip(SKIP_1) | instid1(VALU_DEP_1)
	v_mad_u64_u32 v[16:17], null, s15, s3, v[0:1]
	s_mov_b32 s3, exec_lo
	v_cmpx_ge_i32_e64 s2, v16
	s_cbranch_execz .LBB0_3
; %bb.1:
	v_cmp_eq_u32_e32 vcc_lo, s2, v16
	v_sub_nc_u32_e64 v0, v16, 1 clamp
	s_clause 0x1
	s_load_b64 s[4:5], s[0:1], 0x18
	s_load_b64 s[6:7], s[0:1], 0x28
	s_mov_b32 s8, 0xaaaaaaab
	v_subrev_co_ci_u32_e32 v1, vcc_lo, 0, v16, vcc_lo
	v_lshlrev_b32_e32 v0, 2, v0
	s_mov_b32 s9, 0x3ffaaaaa
	s_delay_alu instid0(VALU_DEP_2) | instskip(NEXT) | instid1(VALU_DEP_2)
	v_lshlrev_b32_e32 v2, 2, v1
	v_ashrrev_i32_e32 v1, 31, v0
	s_delay_alu instid0(VALU_DEP_2) | instskip(NEXT) | instid1(VALU_DEP_2)
	v_ashrrev_i32_e32 v3, 31, v2
	v_lshlrev_b64 v[0:1], 3, v[0:1]
	s_delay_alu instid0(VALU_DEP_2) | instskip(SKIP_1) | instid1(VALU_DEP_2)
	v_lshlrev_b64 v[2:3], 3, v[2:3]
	s_waitcnt lgkmcnt(0)
	v_add_co_u32 v4, vcc_lo, s4, v0
	s_delay_alu instid0(VALU_DEP_3) | instskip(NEXT) | instid1(VALU_DEP_3)
	v_add_co_ci_u32_e32 v5, vcc_lo, s5, v1, vcc_lo
	v_add_co_u32 v6, vcc_lo, s4, v2
	s_delay_alu instid0(VALU_DEP_4)
	v_add_co_ci_u32_e32 v7, vcc_lo, s5, v3, vcc_lo
	s_clause 0x3
	global_load_b128 v[0:3], v[4:5], off
	global_load_b128 v[12:15], v[6:7], off
	global_load_b128 v[8:11], v[4:5], off offset:16
	global_load_b128 v[4:7], v[6:7], off offset:16
	s_waitcnt vmcnt(3)
	v_mul_f64 v[31:32], v[2:3], v[2:3]
	s_waitcnt vmcnt(2)
	v_mul_f64 v[21:22], v[14:15], v[14:15]
	s_waitcnt vmcnt(1)
	s_delay_alu instid0(VALU_DEP_2) | instskip(SKIP_1) | instid1(VALU_DEP_2)
	v_fma_f64 v[33:34], v[8:9], v[8:9], v[31:32]
	s_waitcnt vmcnt(0)
	v_fma_f64 v[23:24], v[4:5], v[4:5], v[21:22]
	s_delay_alu instid0(VALU_DEP_2) | instskip(NEXT) | instid1(VALU_DEP_2)
	v_add_f64 v[35:36], v[33:34], 1.0
	v_add_f64 v[25:26], v[23:24], 1.0
	s_delay_alu instid0(VALU_DEP_2) | instskip(NEXT) | instid1(VALU_DEP_2)
	v_cmp_gt_f64_e32 vcc_lo, 0x10000000, v[35:36]
	v_cmp_gt_f64_e64 s0, 0x10000000, v[25:26]
	v_div_scale_f64 v[51:52], null, v[35:36], v[35:36], v[33:34]
	v_div_scale_f64 v[55:56], null, v[35:36], v[35:36], v[31:32]
	v_cndmask_b32_e64 v17, 0, 1, vcc_lo
	s_delay_alu instid0(VALU_DEP_4) | instskip(NEXT) | instid1(VALU_DEP_4)
	v_cndmask_b32_e64 v18, 0, 1, s0
	v_rcp_f64_e32 v[63:64], v[51:52]
	s_delay_alu instid0(VALU_DEP_3) | instskip(NEXT) | instid1(VALU_DEP_2)
	v_rcp_f64_e32 v[67:68], v[55:56]
	v_lshlrev_b32_e32 v17, 8, v17
	s_delay_alu instid0(VALU_DEP_2) | instskip(NEXT) | instid1(VALU_DEP_2)
	v_lshlrev_b32_e32 v18, 8, v18
	v_ldexp_f64 v[27:28], v[35:36], v17
	s_delay_alu instid0(VALU_DEP_2) | instskip(NEXT) | instid1(VALU_DEP_2)
	v_ldexp_f64 v[37:38], v[25:26], v18
	v_rsq_f64_e32 v[17:18], v[27:28]
	s_delay_alu instid0(VALU_DEP_1)
	v_rsq_f64_e32 v[19:20], v[37:38]
	s_waitcnt_depctr 0xfff
	v_mul_f64 v[29:30], v[27:28], v[17:18]
	v_mul_f64 v[17:18], v[17:18], 0.5
	v_mul_f64 v[39:40], v[37:38], v[19:20]
	v_mul_f64 v[19:20], v[19:20], 0.5
	s_delay_alu instid0(VALU_DEP_3) | instskip(NEXT) | instid1(VALU_DEP_2)
	v_fma_f64 v[41:42], -v[17:18], v[29:30], 0.5
	v_fma_f64 v[43:44], -v[19:20], v[39:40], 0.5
	s_delay_alu instid0(VALU_DEP_2) | instskip(SKIP_1) | instid1(VALU_DEP_3)
	v_fma_f64 v[29:30], v[29:30], v[41:42], v[29:30]
	v_fma_f64 v[17:18], v[17:18], v[41:42], v[17:18]
	v_fma_f64 v[39:40], v[39:40], v[43:44], v[39:40]
	v_fma_f64 v[19:20], v[19:20], v[43:44], v[19:20]
	s_delay_alu instid0(VALU_DEP_4) | instskip(NEXT) | instid1(VALU_DEP_3)
	v_fma_f64 v[41:42], -v[29:30], v[29:30], v[27:28]
	v_fma_f64 v[43:44], -v[39:40], v[39:40], v[37:38]
	s_delay_alu instid0(VALU_DEP_2) | instskip(NEXT) | instid1(VALU_DEP_2)
	v_fma_f64 v[29:30], v[41:42], v[17:18], v[29:30]
	v_fma_f64 v[39:40], v[43:44], v[19:20], v[39:40]
	s_delay_alu instid0(VALU_DEP_2) | instskip(NEXT) | instid1(VALU_DEP_2)
	v_fma_f64 v[41:42], -v[29:30], v[29:30], v[27:28]
	v_fma_f64 v[43:44], -v[39:40], v[39:40], v[37:38]
	s_delay_alu instid0(VALU_DEP_2) | instskip(SKIP_1) | instid1(VALU_DEP_3)
	v_fma_f64 v[29:30], v[41:42], v[17:18], v[29:30]
	v_fma_f64 v[17:18], 0x40040000, v[10:11], v[0:1]
	v_fma_f64 v[39:40], v[43:44], v[19:20], v[39:40]
	v_cndmask_b32_e64 v41, 0, 0xffffff80, vcc_lo
	v_cndmask_b32_e64 v42, 0, 0xffffff80, s0
	v_cmp_class_f64_e64 vcc_lo, v[27:28], 0x260
	v_cmp_class_f64_e64 s0, v[37:38], 0x260
	v_fma_f64 v[19:20], 0x40040000, v[6:7], v[12:13]
	v_ldexp_f64 v[29:30], v[29:30], v41
	v_div_scale_f64 v[43:44], null, v[0:1], v[0:1], v[17:18]
	v_ldexp_f64 v[39:40], v[39:40], v42
	v_mul_f64 v[41:42], v[10:11], s[8:9]
	v_div_scale_f64 v[45:46], null, v[12:13], v[12:13], v[19:20]
	v_dual_cndmask_b32 v30, v30, v28 :: v_dual_cndmask_b32 v29, v29, v27
	v_rcp_f64_e32 v[49:50], v[43:44]
	s_delay_alu instid0(VALU_DEP_4) | instskip(SKIP_3) | instid1(VALU_DEP_3)
	v_cndmask_b32_e64 v28, v40, v38, s0
	v_cndmask_b32_e64 v27, v39, v37, s0
	v_div_scale_f64 v[47:48], null, v[17:18], v[17:18], v[41:42]
	v_div_scale_f64 v[37:38], null, v[29:30], v[29:30], v[2:3]
	v_div_scale_f64 v[39:40], null, v[27:28], v[27:28], v[14:15]
	v_rcp_f64_e32 v[53:54], v[45:46]
	v_div_scale_f64 v[77:78], vcc_lo, v[17:18], v[0:1], v[17:18]
	v_div_scale_f64 v[79:80], s0, v[19:20], v[12:13], v[19:20]
	v_div_scale_f64 v[81:82], s1, v[2:3], v[29:30], v[2:3]
	s_delay_alu instid0(TRANS32_DEP_2) | instskip(SKIP_4) | instid1(VALU_DEP_2)
	v_fma_f64 v[65:66], -v[43:44], v[49:50], 1.0
	v_rcp_f64_e32 v[61:62], v[47:48]
	v_rcp_f64_e32 v[57:58], v[37:38]
	v_rcp_f64_e32 v[59:60], v[39:40]
	v_fma_f64 v[69:70], -v[45:46], v[53:54], 1.0
	v_fma_f64 v[49:50], v[49:50], v[65:66], v[49:50]
	v_fma_f64 v[65:66], -v[51:52], v[63:64], 1.0
	s_delay_alu instid0(TRANS32_DEP_3)
	v_fma_f64 v[75:76], -v[47:48], v[61:62], 1.0
	s_waitcnt_depctr 0xfff
	v_fma_f64 v[71:72], -v[37:38], v[57:58], 1.0
	v_fma_f64 v[73:74], -v[39:40], v[59:60], 1.0
	v_fma_f64 v[53:54], v[53:54], v[69:70], v[53:54]
	v_fma_f64 v[69:70], -v[55:56], v[67:68], 1.0
	v_fma_f64 v[63:64], v[63:64], v[65:66], v[63:64]
	v_fma_f64 v[61:62], v[61:62], v[75:76], v[61:62]
	v_fma_f64 v[57:58], v[57:58], v[71:72], v[57:58]
	v_fma_f64 v[71:72], -v[43:44], v[49:50], 1.0
	v_fma_f64 v[59:60], v[59:60], v[73:74], v[59:60]
	v_fma_f64 v[65:66], -v[45:46], v[53:54], 1.0
	v_fma_f64 v[67:68], v[67:68], v[69:70], v[67:68]
	v_fma_f64 v[75:76], -v[47:48], v[61:62], 1.0
	v_fma_f64 v[69:70], -v[37:38], v[57:58], 1.0
	v_fma_f64 v[49:50], v[49:50], v[71:72], v[49:50]
	v_fma_f64 v[73:74], -v[39:40], v[59:60], 1.0
	v_fma_f64 v[71:72], -v[51:52], v[63:64], 1.0
	v_fma_f64 v[53:54], v[53:54], v[65:66], v[53:54]
	v_fma_f64 v[65:66], -v[55:56], v[67:68], 1.0
	v_fma_f64 v[61:62], v[61:62], v[75:76], v[61:62]
	v_div_scale_f64 v[75:76], s4, v[33:34], v[35:36], v[33:34]
	v_fma_f64 v[57:58], v[57:58], v[69:70], v[57:58]
	v_div_scale_f64 v[69:70], s2, v[14:15], v[27:28], v[14:15]
	v_fma_f64 v[59:60], v[59:60], v[73:74], v[59:60]
	v_div_scale_f64 v[73:74], s3, v[41:42], v[17:18], v[41:42]
	v_mul_f64 v[83:84], v[77:78], v[49:50]
	v_fma_f64 v[63:64], v[63:64], v[71:72], v[63:64]
	v_mul_f64 v[85:86], v[79:80], v[53:54]
	v_fma_f64 v[65:66], v[67:68], v[65:66], v[67:68]
	v_div_scale_f64 v[71:72], s5, v[31:32], v[35:36], v[31:32]
	v_mul_f64 v[67:68], v[81:82], v[57:58]
	v_mul_f64 v[87:88], v[69:70], v[59:60]
	v_mul_f64 v[89:90], v[73:74], v[61:62]
	v_fma_f64 v[43:44], -v[43:44], v[83:84], v[77:78]
	v_mul_f64 v[77:78], v[75:76], v[63:64]
	v_fma_f64 v[45:46], -v[45:46], v[85:86], v[79:80]
	v_mul_f64 v[79:80], v[71:72], v[65:66]
	v_fma_f64 v[37:38], -v[37:38], v[67:68], v[81:82]
	v_fma_f64 v[39:40], -v[39:40], v[87:88], v[69:70]
	v_fma_f64 v[47:48], -v[47:48], v[89:90], v[73:74]
	v_div_fmas_f64 v[43:44], v[43:44], v[49:50], v[83:84]
	v_fma_f64 v[51:52], -v[51:52], v[77:78], v[75:76]
	s_mov_b32 vcc_lo, s0
	v_div_fmas_f64 v[45:46], v[45:46], v[53:54], v[85:86]
	s_mov_b32 vcc_lo, s1
	v_fma_f64 v[49:50], -v[55:56], v[79:80], v[71:72]
	v_div_fmas_f64 v[37:38], v[37:38], v[57:58], v[67:68]
	s_mov_b32 vcc_lo, s2
	v_div_fmas_f64 v[39:40], v[39:40], v[59:60], v[87:88]
	s_mov_b32 vcc_lo, s3
	v_div_fmas_f64 v[47:48], v[47:48], v[61:62], v[89:90]
	s_mov_b32 vcc_lo, s4
	v_div_fmas_f64 v[51:52], v[51:52], v[63:64], v[77:78]
	s_mov_b32 vcc_lo, s5
	v_div_fmas_f64 v[49:50], v[49:50], v[65:66], v[79:80]
	s_delay_alu instid0(VALU_DEP_3)
	v_div_fixup_f64 v[41:42], v[47:48], v[17:18], v[41:42]
	v_div_fixup_f64 v[17:18], v[43:44], v[0:1], v[17:18]
	v_mul_f64 v[0:1], v[0:1], v[29:30]
	v_div_fixup_f64 v[33:34], v[51:52], v[35:36], v[33:34]
	v_div_fixup_f64 v[31:32], v[49:50], v[35:36], v[31:32]
	v_add_f64 v[35:36], -v[41:42], 1.0
	s_delay_alu instid0(VALU_DEP_4) | instskip(NEXT) | instid1(VALU_DEP_4)
	v_mul_f64 v[43:44], v[17:18], v[0:1]
	v_add_f64 v[47:48], -v[33:34], 1.0
	v_fma_f64 v[33:34], -v[41:42], v[33:34], 1.0
	v_fma_f64 v[17:18], v[17:18], v[29:30], -1.0
	v_cmp_gt_f64_e32 vcc_lo, 0x10000000, v[31:32]
	v_div_fixup_f64 v[29:30], v[37:38], v[29:30], v[2:3]
	v_div_fixup_f64 v[37:38], v[39:40], v[27:28], v[14:15]
	v_mul_f64 v[8:9], v[8:9], v[43:44]
	v_mul_f64 v[41:42], v[41:42], v[47:48]
	v_fma_f64 v[47:48], -v[31:32], v[35:36], v[33:34]
	v_fma_f64 v[17:18], v[0:1], v[17:18], -v[10:11]
	v_mul_f64 v[2:3], v[2:3], v[43:44]
	s_delay_alu instid0(VALU_DEP_3) | instskip(SKIP_1) | instid1(VALU_DEP_1)
	v_mul_f64 v[41:42], v[41:42], v[47:48]
	v_cndmask_b32_e64 v47, 0, 1, vcc_lo
	v_lshlrev_b32_e32 v47, 8, v47
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_4)
	v_ldexp_f64 v[31:32], v[31:32], v47
	v_cmp_gt_f64_e64 s0, 0x10000000, v[41:42]
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_cndmask_b32_e64 v48, 0, 1, s0
	v_lshlrev_b32_e32 v48, 8, v48
	s_delay_alu instid0(VALU_DEP_1) | instskip(SKIP_1) | instid1(VALU_DEP_1)
	v_ldexp_f64 v[41:42], v[41:42], v48
	v_rsq_f64_e32 v[47:48], v[31:32]
	v_rsq_f64_e32 v[49:50], v[41:42]
	s_waitcnt_depctr 0xfff
	v_mul_f64 v[51:52], v[31:32], v[47:48]
	v_mul_f64 v[47:48], v[47:48], 0.5
	v_mul_f64 v[53:54], v[41:42], v[49:50]
	v_mul_f64 v[49:50], v[49:50], 0.5
	s_delay_alu instid0(VALU_DEP_3) | instskip(NEXT) | instid1(VALU_DEP_2)
	v_fma_f64 v[55:56], -v[47:48], v[51:52], 0.5
	v_fma_f64 v[57:58], -v[49:50], v[53:54], 0.5
	s_delay_alu instid0(VALU_DEP_2) | instskip(SKIP_1) | instid1(VALU_DEP_3)
	v_fma_f64 v[51:52], v[51:52], v[55:56], v[51:52]
	v_fma_f64 v[47:48], v[47:48], v[55:56], v[47:48]
	v_fma_f64 v[53:54], v[53:54], v[57:58], v[53:54]
	s_delay_alu instid0(VALU_DEP_3) | instskip(SKIP_1) | instid1(VALU_DEP_3)
	v_fma_f64 v[55:56], -v[51:52], v[51:52], v[31:32]
	v_fma_f64 v[49:50], v[49:50], v[57:58], v[49:50]
	v_fma_f64 v[57:58], -v[53:54], v[53:54], v[41:42]
	s_delay_alu instid0(VALU_DEP_3) | instskip(NEXT) | instid1(VALU_DEP_2)
	v_fma_f64 v[51:52], v[55:56], v[47:48], v[51:52]
	v_fma_f64 v[53:54], v[57:58], v[49:50], v[53:54]
	s_delay_alu instid0(VALU_DEP_2) | instskip(NEXT) | instid1(VALU_DEP_2)
	v_fma_f64 v[55:56], -v[51:52], v[51:52], v[31:32]
	v_fma_f64 v[57:58], -v[53:54], v[53:54], v[41:42]
	s_delay_alu instid0(VALU_DEP_2)
	v_fma_f64 v[47:48], v[55:56], v[47:48], v[51:52]
	v_cndmask_b32_e64 v51, 0, 0xffffff80, vcc_lo
	v_cndmask_b32_e64 v52, 0, 0xffffff80, s0
	v_cmp_class_f64_e64 vcc_lo, v[31:32], 0x260
	v_cmp_class_f64_e64 s0, v[41:42], 0x260
	v_div_scale_f64 v[55:56], null, v[25:26], v[25:26], v[21:22]
	v_fma_f64 v[49:50], v[57:58], v[49:50], v[53:54]
	v_ldexp_f64 v[47:48], v[47:48], v51
	v_div_scale_f64 v[53:54], null, v[25:26], v[25:26], v[23:24]
	s_delay_alu instid0(VALU_DEP_4) | instskip(NEXT) | instid1(VALU_DEP_3)
	v_rcp_f64_e32 v[65:66], v[55:56]
	v_ldexp_f64 v[49:50], v[49:50], v52
	s_delay_alu instid0(VALU_DEP_3) | instskip(NEXT) | instid1(VALU_DEP_3)
	v_dual_cndmask_b32 v32, v48, v32 :: v_dual_cndmask_b32 v31, v47, v31
	v_rcp_f64_e32 v[63:64], v[53:54]
	s_waitcnt_depctr 0xfff
	v_fma_f64 v[75:76], -v[55:56], v[65:66], 1.0
	v_cndmask_b32_e64 v42, v50, v42, s0
	v_cndmask_b32_e64 v41, v49, v41, s0
	v_fma_f64 v[73:74], -v[53:54], v[63:64], 1.0
	s_delay_alu instid0(VALU_DEP_2)
	v_fma_f64 v[47:48], v[35:36], v[31:32], -v[41:42]
	v_fma_f64 v[31:32], v[35:36], v[31:32], v[41:42]
	v_mul_f64 v[35:36], v[6:7], s[8:9]
	v_fma_f64 v[65:66], v[65:66], v[75:76], v[65:66]
	v_fma_f64 v[63:64], v[63:64], v[73:74], v[63:64]
	v_div_scale_f64 v[41:42], null, v[33:34], v[33:34], v[47:48]
	v_div_scale_f64 v[49:50], null, v[33:34], v[33:34], v[31:32]
	v_div_scale_f64 v[51:52], null, v[19:20], v[19:20], v[35:36]
	v_fma_f64 v[75:76], -v[55:56], v[65:66], 1.0
	v_div_scale_f64 v[77:78], vcc_lo, v[47:48], v[33:34], v[47:48]
	v_fma_f64 v[73:74], -v[53:54], v[63:64], 1.0
	v_rcp_f64_e32 v[57:58], v[41:42]
	v_rcp_f64_e32 v[59:60], v[49:50]
	s_delay_alu instid0(VALU_DEP_4) | instskip(NEXT) | instid1(VALU_DEP_3)
	v_rcp_f64_e32 v[61:62], v[51:52]
	v_fma_f64 v[65:66], v[65:66], v[75:76], v[65:66]
	s_delay_alu instid0(VALU_DEP_2) | instskip(SKIP_1) | instid1(TRANS32_DEP_3)
	v_fma_f64 v[63:64], v[63:64], v[73:74], v[63:64]
	v_div_scale_f64 v[73:74], s3, v[21:22], v[25:26], v[21:22]
	v_fma_f64 v[67:68], -v[41:42], v[57:58], 1.0
	s_waitcnt_depctr 0xfff
	v_fma_f64 v[69:70], -v[49:50], v[59:60], 1.0
	v_fma_f64 v[71:72], -v[51:52], v[61:62], 1.0
	v_mul_f64 v[85:86], v[73:74], v[65:66]
	v_fma_f64 v[57:58], v[57:58], v[67:68], v[57:58]
	s_delay_alu instid0(VALU_DEP_4) | instskip(NEXT) | instid1(VALU_DEP_4)
	v_fma_f64 v[59:60], v[59:60], v[69:70], v[59:60]
	v_fma_f64 v[61:62], v[61:62], v[71:72], v[61:62]
	s_delay_alu instid0(VALU_DEP_4) | instskip(NEXT) | instid1(VALU_DEP_4)
	v_fma_f64 v[55:56], -v[55:56], v[85:86], v[73:74]
	v_fma_f64 v[67:68], -v[41:42], v[57:58], 1.0
	s_delay_alu instid0(VALU_DEP_4) | instskip(NEXT) | instid1(VALU_DEP_4)
	v_fma_f64 v[69:70], -v[49:50], v[59:60], 1.0
	v_fma_f64 v[71:72], -v[51:52], v[61:62], 1.0
	s_delay_alu instid0(VALU_DEP_3) | instskip(SKIP_1) | instid1(VALU_DEP_4)
	v_fma_f64 v[57:58], v[57:58], v[67:68], v[57:58]
	v_div_scale_f64 v[67:68], s0, v[31:32], v[33:34], v[31:32]
	v_fma_f64 v[59:60], v[59:60], v[69:70], v[59:60]
	v_div_scale_f64 v[69:70], s1, v[35:36], v[19:20], v[35:36]
	v_fma_f64 v[61:62], v[61:62], v[71:72], v[61:62]
	v_div_scale_f64 v[71:72], s2, v[23:24], v[25:26], v[23:24]
	v_mul_f64 v[75:76], v[77:78], v[57:58]
	v_mul_f64 v[79:80], v[67:68], v[59:60]
	s_delay_alu instid0(VALU_DEP_4) | instskip(NEXT) | instid1(VALU_DEP_4)
	v_mul_f64 v[81:82], v[69:70], v[61:62]
	v_mul_f64 v[83:84], v[71:72], v[63:64]
	s_delay_alu instid0(VALU_DEP_4) | instskip(NEXT) | instid1(VALU_DEP_4)
	v_fma_f64 v[41:42], -v[41:42], v[75:76], v[77:78]
	v_fma_f64 v[49:50], -v[49:50], v[79:80], v[67:68]
	s_delay_alu instid0(VALU_DEP_4) | instskip(NEXT) | instid1(VALU_DEP_4)
	v_fma_f64 v[51:52], -v[51:52], v[81:82], v[69:70]
	v_fma_f64 v[53:54], -v[53:54], v[83:84], v[71:72]
	s_delay_alu instid0(VALU_DEP_4) | instskip(SKIP_1) | instid1(VALU_DEP_4)
	v_div_fmas_f64 v[41:42], v[41:42], v[57:58], v[75:76]
	s_mov_b32 vcc_lo, s0
	v_div_fmas_f64 v[49:50], v[49:50], v[59:60], v[79:80]
	s_mov_b32 vcc_lo, s1
	s_delay_alu instid0(VALU_DEP_4) | instskip(SKIP_1) | instid1(VALU_DEP_4)
	v_div_fmas_f64 v[51:52], v[51:52], v[61:62], v[81:82]
	s_mov_b32 vcc_lo, s2
	v_div_fmas_f64 v[53:54], v[53:54], v[63:64], v[83:84]
	s_mov_b32 vcc_lo, s3
	s_mov_b64 s[2:3], 0
	v_div_fmas_f64 v[55:56], v[55:56], v[65:66], v[85:86]
	v_div_fixup_f64 v[41:42], v[41:42], v[33:34], v[47:48]
	v_div_fixup_f64 v[31:32], v[49:50], v[33:34], v[31:32]
	v_div_fixup_f64 v[35:36], v[51:52], v[19:20], v[35:36]
	v_div_fixup_f64 v[19:20], v[45:46], v[12:13], v[19:20]
	v_mul_f64 v[12:13], v[12:13], v[27:28]
	v_div_fixup_f64 v[23:24], v[53:54], v[25:26], v[23:24]
	v_div_fixup_f64 v[21:22], v[55:56], v[25:26], v[21:22]
	v_add_f64 v[25:26], -v[35:36], 1.0
	s_delay_alu instid0(VALU_DEP_3) | instskip(SKIP_1) | instid1(VALU_DEP_4)
	v_add_f64 v[51:52], -v[23:24], 1.0
	v_fma_f64 v[23:24], -v[35:36], v[23:24], 1.0
	v_cmp_gt_f64_e32 vcc_lo, 0x10000000, v[21:22]
	s_delay_alu instid0(VALU_DEP_3) | instskip(NEXT) | instid1(VALU_DEP_3)
	v_mul_f64 v[35:36], v[35:36], v[51:52]
	v_fma_f64 v[51:52], -v[21:22], v[25:26], v[23:24]
	s_delay_alu instid0(VALU_DEP_1) | instskip(SKIP_1) | instid1(VALU_DEP_1)
	v_mul_f64 v[35:36], v[35:36], v[51:52]
	v_cndmask_b32_e64 v51, 0, 1, vcc_lo
	v_lshlrev_b32_e32 v51, 8, v51
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_4)
	v_ldexp_f64 v[21:22], v[21:22], v51
	v_cmp_gt_f64_e64 s0, 0x10000000, v[35:36]
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_cndmask_b32_e64 v52, 0, 1, s0
	v_lshlrev_b32_e32 v52, 8, v52
	s_delay_alu instid0(VALU_DEP_1) | instskip(SKIP_1) | instid1(VALU_DEP_1)
	v_ldexp_f64 v[35:36], v[35:36], v52
	v_rsq_f64_e32 v[51:52], v[21:22]
	v_rsq_f64_e32 v[53:54], v[35:36]
	s_waitcnt_depctr 0xfff
	v_mul_f64 v[55:56], v[21:22], v[51:52]
	v_mul_f64 v[51:52], v[51:52], 0.5
	v_mul_f64 v[57:58], v[35:36], v[53:54]
	v_mul_f64 v[53:54], v[53:54], 0.5
	s_delay_alu instid0(VALU_DEP_3) | instskip(NEXT) | instid1(VALU_DEP_2)
	v_fma_f64 v[59:60], -v[51:52], v[55:56], 0.5
	v_fma_f64 v[61:62], -v[53:54], v[57:58], 0.5
	s_delay_alu instid0(VALU_DEP_2) | instskip(SKIP_1) | instid1(VALU_DEP_3)
	v_fma_f64 v[55:56], v[55:56], v[59:60], v[55:56]
	v_fma_f64 v[51:52], v[51:52], v[59:60], v[51:52]
	v_fma_f64 v[57:58], v[57:58], v[61:62], v[57:58]
	s_delay_alu instid0(VALU_DEP_3) | instskip(SKIP_1) | instid1(VALU_DEP_3)
	v_fma_f64 v[59:60], -v[55:56], v[55:56], v[21:22]
	v_fma_f64 v[53:54], v[53:54], v[61:62], v[53:54]
	v_fma_f64 v[61:62], -v[57:58], v[57:58], v[35:36]
	s_delay_alu instid0(VALU_DEP_3) | instskip(NEXT) | instid1(VALU_DEP_2)
	v_fma_f64 v[55:56], v[59:60], v[51:52], v[55:56]
	v_fma_f64 v[57:58], v[61:62], v[53:54], v[57:58]
	s_delay_alu instid0(VALU_DEP_2) | instskip(NEXT) | instid1(VALU_DEP_2)
	v_fma_f64 v[59:60], -v[55:56], v[55:56], v[21:22]
	v_fma_f64 v[61:62], -v[57:58], v[57:58], v[35:36]
	s_delay_alu instid0(VALU_DEP_2)
	v_fma_f64 v[51:52], v[59:60], v[51:52], v[55:56]
	v_cndmask_b32_e64 v55, 0, 0xffffff80, vcc_lo
	v_cndmask_b32_e64 v56, 0, 0xffffff80, s0
	v_cmp_class_f64_e64 vcc_lo, v[21:22], 0x260
	v_cmp_class_f64_e64 s0, v[35:36], 0x260
	v_fma_f64 v[53:54], v[61:62], v[53:54], v[57:58]
	v_ldexp_f64 v[51:52], v[51:52], v55
	s_delay_alu instid0(VALU_DEP_2) | instskip(NEXT) | instid1(VALU_DEP_2)
	v_ldexp_f64 v[53:54], v[53:54], v56
	v_dual_cndmask_b32 v22, v52, v22 :: v_dual_cndmask_b32 v21, v51, v21
	s_delay_alu instid0(VALU_DEP_2) | instskip(NEXT) | instid1(VALU_DEP_3)
	v_cndmask_b32_e64 v36, v54, v36, s0
	v_cndmask_b32_e64 v35, v53, v35, s0
	s_delay_alu instid0(VALU_DEP_1) | instskip(SKIP_1) | instid1(VALU_DEP_2)
	v_fma_f64 v[51:52], v[25:26], v[21:22], -v[35:36]
	v_fma_f64 v[21:22], v[25:26], v[21:22], v[35:36]
	v_div_scale_f64 v[25:26], null, v[23:24], v[23:24], v[51:52]
	s_delay_alu instid0(VALU_DEP_2) | instskip(SKIP_1) | instid1(VALU_DEP_3)
	v_div_scale_f64 v[35:36], null, v[23:24], v[23:24], v[21:22]
	v_div_scale_f64 v[61:62], vcc_lo, v[51:52], v[23:24], v[51:52]
	v_rcp_f64_e32 v[53:54], v[25:26]
	s_delay_alu instid0(VALU_DEP_2) | instskip(SKIP_3) | instid1(VALU_DEP_2)
	v_rcp_f64_e32 v[55:56], v[35:36]
	s_waitcnt_depctr 0xfff
	v_fma_f64 v[57:58], -v[25:26], v[53:54], 1.0
	v_fma_f64 v[59:60], -v[35:36], v[55:56], 1.0
	v_fma_f64 v[53:54], v[53:54], v[57:58], v[53:54]
	s_delay_alu instid0(VALU_DEP_2) | instskip(NEXT) | instid1(VALU_DEP_2)
	v_fma_f64 v[55:56], v[55:56], v[59:60], v[55:56]
	v_fma_f64 v[57:58], -v[25:26], v[53:54], 1.0
	s_delay_alu instid0(VALU_DEP_2) | instskip(NEXT) | instid1(VALU_DEP_2)
	v_fma_f64 v[59:60], -v[35:36], v[55:56], 1.0
	v_fma_f64 v[53:54], v[53:54], v[57:58], v[53:54]
	v_div_scale_f64 v[57:58], s0, v[21:22], v[23:24], v[21:22]
	s_delay_alu instid0(VALU_DEP_3) | instskip(NEXT) | instid1(VALU_DEP_3)
	v_fma_f64 v[55:56], v[55:56], v[59:60], v[55:56]
	v_mul_f64 v[59:60], v[61:62], v[53:54]
	s_delay_alu instid0(VALU_DEP_2) | instskip(NEXT) | instid1(VALU_DEP_2)
	v_mul_f64 v[63:64], v[57:58], v[55:56]
	v_fma_f64 v[25:26], -v[25:26], v[59:60], v[61:62]
	s_delay_alu instid0(VALU_DEP_2) | instskip(NEXT) | instid1(VALU_DEP_2)
	v_fma_f64 v[35:36], -v[35:36], v[63:64], v[57:58]
	v_div_fmas_f64 v[25:26], v[25:26], v[53:54], v[59:60]
	s_mov_b32 vcc_lo, s0
	s_delay_alu instid0(VALU_DEP_2) | instskip(NEXT) | instid1(VALU_DEP_2)
	v_div_fmas_f64 v[35:36], v[35:36], v[55:56], v[63:64]
	v_div_fixup_f64 v[25:26], v[25:26], v[23:24], v[51:52]
	s_delay_alu instid0(VALU_DEP_2)
	v_div_fixup_f64 v[21:22], v[35:36], v[23:24], v[21:22]
	v_mul_f64 v[23:24], v[19:20], v[12:13]
	v_fma_f64 v[19:20], v[19:20], v[27:28], -1.0
	v_mul_f64 v[27:28], v[29:30], v[8:9]
	v_mul_f64 v[35:36], v[29:30], v[17:18]
	v_cmp_lt_f64_e32 vcc_lo, v[41:42], v[25:26]
	v_cmp_gt_f64_e64 s0, v[31:32], v[21:22]
	v_mul_f64 v[4:5], v[4:5], v[23:24]
	v_fma_f64 v[19:20], v[12:13], v[19:20], -v[6:7]
	v_mul_f64 v[14:15], v[14:15], v[23:24]
	v_fma_f64 v[23:24], v[29:30], v[2:3], v[10:11]
	v_dual_cndmask_b32 v34, v26, v42 :: v_dual_cndmask_b32 v33, v25, v41
	v_fma_f64 v[25:26], v[10:11], 0, v[27:28]
	v_cndmask_b32_e64 v32, v22, v32, s0
	v_mul_f64 v[39:40], v[37:38], v[4:5]
	v_cndmask_b32_e64 v31, v21, v31, s0
	v_fma_f64 v[10:11], v[10:11], v[29:30], v[35:36]
	v_mul_f64 v[41:42], v[37:38], v[19:20]
	v_mul_f64 v[21:22], v[29:30], v[0:1]
	s_delay_alu instid0(VALU_DEP_4) | instskip(SKIP_3) | instid1(VALU_DEP_4)
	v_cmp_ngt_f64_e64 s0, 0, v[31:32]
	v_fma_f64 v[35:36], v[6:7], 0, v[39:40]
	v_lshlrev_b32_e32 v39, 2, v16
	v_cmp_nlt_f64_e32 vcc_lo, 0, v[33:34]
	v_cndmask_b32_e64 v30, 0, v32, s0
	v_cndmask_b32_e64 v29, 0, v31, s0
	v_mul_f64 v[31:32], v[37:38], v[12:13]
	v_ashrrev_i32_e32 v40, 31, v39
	s_delay_alu instid0(VALU_DEP_1) | instskip(SKIP_3) | instid1(VALU_DEP_4)
	v_lshlrev_b64 v[39:40], 3, v[39:40]
	v_dual_cndmask_b32 v28, 0, v34 :: v_dual_cndmask_b32 v27, 0, v33
	v_fma_f64 v[33:34], v[37:38], v[14:15], v[6:7]
	v_fma_f64 v[6:7], v[6:7], v[37:38], v[41:42]
	v_add_co_u32 v39, vcc_lo, s6, v39
	s_delay_alu instid0(VALU_DEP_4)
	v_add_f64 v[37:38], v[29:30], -v[27:28]
	v_add_co_ci_u32_e32 v40, vcc_lo, s7, v40, vcc_lo
.LBB0_2:                                ; =>This Inner Loop Header: Depth=1
	s_cmp_eq_u32 s2, 1
	s_cselect_b32 vcc_lo, -1, 0
	s_cmp_eq_u32 s2, 2
	v_dual_cndmask_b32 v16, v22, v24 :: v_dual_cndmask_b32 v41, v32, v34
	v_dual_cndmask_b32 v42, v31, v33 :: v_dual_cndmask_b32 v43, v1, v3
	v_dual_cndmask_b32 v44, v0, v2 :: v_dual_cndmask_b32 v45, v13, v15
	v_cndmask_b32_e32 v46, v12, v14, vcc_lo
	s_cselect_b32 s0, -1, 0
	s_cmp_eq_u32 s2, 3
	v_cndmask_b32_e64 v41, v41, v36, s0
	v_cndmask_b32_e64 v47, v42, v35, s0
	v_cndmask_b32_e64 v48, v43, v9, s0
	v_cndmask_b32_e64 v49, v44, v8, s0
	v_cndmask_b32_e64 v50, v45, v5, s0
	v_cndmask_b32_e64 v51, v46, v4, s0
	s_cselect_b32 s1, -1, 0
	v_cndmask_b32_e64 v16, v16, v26, s0
	v_cndmask_b32_e64 v44, v41, v7, s1
	v_cndmask_b32_e64 v43, v47, v6, s1
	v_cndmask_b32_e64 v46, v48, v18, s1
	v_cndmask_b32_e64 v45, v49, v17, s1
	v_cndmask_b32_e64 v48, v50, v20, s1
	v_cndmask_b32_e64 v47, v51, v19, s1
	v_mul_f64 v[43:44], v[27:28], v[43:44]
	v_cndmask_b32_e64 v42, v16, v11, s1
	v_cndmask_b32_e32 v16, v21, v23, vcc_lo
	s_add_u32 s2, s2, 1
	v_add_f64 v[45:46], v[45:46], -v[47:48]
	s_addc_u32 s3, s3, 0
	s_cmp_lg_u32 s2, 4
	v_cndmask_b32_e64 v16, v16, v25, s0
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_cndmask_b32_e64 v41, v16, v10, s1
	v_fma_f64 v[41:42], v[29:30], v[41:42], -v[43:44]
	s_delay_alu instid0(VALU_DEP_4) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_mul_f64 v[43:44], v[29:30], v[45:46]
	v_fma_f64 v[41:42], -v[27:28], v[43:44], v[41:42]
	s_delay_alu instid0(VALU_DEP_1) | instskip(SKIP_1) | instid1(VALU_DEP_2)
	v_div_scale_f64 v[43:44], null, v[37:38], v[37:38], v[41:42]
	v_div_scale_f64 v[49:50], vcc_lo, v[41:42], v[37:38], v[41:42]
	v_rcp_f64_e32 v[45:46], v[43:44]
	s_waitcnt_depctr 0xfff
	v_fma_f64 v[47:48], -v[43:44], v[45:46], 1.0
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_fma_f64 v[45:46], v[45:46], v[47:48], v[45:46]
	v_fma_f64 v[47:48], -v[43:44], v[45:46], 1.0
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_fma_f64 v[45:46], v[45:46], v[47:48], v[45:46]
	v_mul_f64 v[47:48], v[49:50], v[45:46]
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_fma_f64 v[43:44], -v[43:44], v[47:48], v[49:50]
	v_div_fmas_f64 v[43:44], v[43:44], v[45:46], v[47:48]
	s_delay_alu instid0(VALU_DEP_1)
	v_div_fixup_f64 v[41:42], v[43:44], v[37:38], v[41:42]
	global_store_b64 v[39:40], v[41:42], off
	v_add_co_u32 v39, vcc_lo, v39, 8
	v_add_co_ci_u32_e32 v40, vcc_lo, 0, v40, vcc_lo
	s_cbranch_scc1 .LBB0_2
.LBB0_3:                                ; %_Z12riemann_hllePKdS0_Pdi.exit
	s_nop 0
	s_sendmsg sendmsg(MSG_DEALLOC_VGPRS)
	s_endpgm
	.section	.rodata,"a",@progbits
	.p2align	6, 0x0
	.amdhsa_kernel _Z29update_struct_do_compute_flux12UpdateStruct
		.amdhsa_group_segment_fixed_size 0
		.amdhsa_private_segment_fixed_size 0
		.amdhsa_kernarg_size 304
		.amdhsa_user_sgpr_count 15
		.amdhsa_user_sgpr_dispatch_ptr 0
		.amdhsa_user_sgpr_queue_ptr 0
		.amdhsa_user_sgpr_kernarg_segment_ptr 1
		.amdhsa_user_sgpr_dispatch_id 0
		.amdhsa_user_sgpr_private_segment_size 0
		.amdhsa_wavefront_size32 1
		.amdhsa_uses_dynamic_stack 0
		.amdhsa_enable_private_segment 0
		.amdhsa_system_sgpr_workgroup_id_x 1
		.amdhsa_system_sgpr_workgroup_id_y 0
		.amdhsa_system_sgpr_workgroup_id_z 0
		.amdhsa_system_sgpr_workgroup_info 0
		.amdhsa_system_vgpr_workitem_id 0
		.amdhsa_next_free_vgpr 91
		.amdhsa_next_free_sgpr 16
		.amdhsa_float_round_mode_32 0
		.amdhsa_float_round_mode_16_64 0
		.amdhsa_float_denorm_mode_32 3
		.amdhsa_float_denorm_mode_16_64 3
		.amdhsa_dx10_clamp 1
		.amdhsa_ieee_mode 1
		.amdhsa_fp16_overflow 0
		.amdhsa_workgroup_processor_mode 1
		.amdhsa_memory_ordered 1
		.amdhsa_forward_progress 0
		.amdhsa_shared_vgpr_count 0
		.amdhsa_exception_fp_ieee_invalid_op 0
		.amdhsa_exception_fp_denorm_src 0
		.amdhsa_exception_fp_ieee_div_zero 0
		.amdhsa_exception_fp_ieee_overflow 0
		.amdhsa_exception_fp_ieee_underflow 0
		.amdhsa_exception_fp_ieee_inexact 0
		.amdhsa_exception_int_div_zero 0
	.end_amdhsa_kernel
	.text
.Lfunc_end0:
	.size	_Z29update_struct_do_compute_flux12UpdateStruct, .Lfunc_end0-_Z29update_struct_do_compute_flux12UpdateStruct
                                        ; -- End function
	.section	.AMDGPU.csdata,"",@progbits
; Kernel info:
; codeLenInByte = 3580
; NumSgprs: 18
; NumVgprs: 91
; ScratchSize: 0
; MemoryBound: 0
; FloatMode: 240
; IeeeMode: 1
; LDSByteSize: 0 bytes/workgroup (compile time only)
; SGPRBlocks: 2
; VGPRBlocks: 11
; NumSGPRsForWavesPerEU: 18
; NumVGPRsForWavesPerEU: 91
; Occupancy: 16
; WaveLimiterHint : 0
; COMPUTE_PGM_RSRC2:SCRATCH_EN: 0
; COMPUTE_PGM_RSRC2:USER_SGPR: 15
; COMPUTE_PGM_RSRC2:TRAP_HANDLER: 0
; COMPUTE_PGM_RSRC2:TGID_X_EN: 1
; COMPUTE_PGM_RSRC2:TGID_Y_EN: 0
; COMPUTE_PGM_RSRC2:TGID_Z_EN: 0
; COMPUTE_PGM_RSRC2:TIDIG_COMP_CNT: 0
	.text
	.protected	_Z29update_struct_do_advance_cons12UpdateStructd ; -- Begin function _Z29update_struct_do_advance_cons12UpdateStructd
	.globl	_Z29update_struct_do_advance_cons12UpdateStructd
	.p2align	8
	.type	_Z29update_struct_do_advance_cons12UpdateStructd,@function
_Z29update_struct_do_advance_cons12UpdateStructd: ; @_Z29update_struct_do_advance_cons12UpdateStructd
; %bb.0:
	s_clause 0x1
	s_load_b32 s3, s[0:1], 0x44
	s_load_b32 s2, s[0:1], 0x0
	s_waitcnt lgkmcnt(0)
	s_and_b32 s3, s3, 0xffff
	s_delay_alu instid0(SALU_CYCLE_1) | instskip(SKIP_1) | instid1(VALU_DEP_1)
	v_mad_u64_u32 v[1:2], null, s15, s3, v[0:1]
	s_mov_b32 s3, exec_lo
	v_cmpx_gt_i32_e64 s2, v1
	s_cbranch_execz .LBB1_6
; %bb.1:
	s_load_b256 s[4:11], s[0:1], 0x8
	v_cvt_f64_i32_e32 v[2:3], s2
	s_load_b128 s[0:3], s[0:1], 0x28
	v_lshlrev_b32_e32 v0, 2, v1
	s_delay_alu instid0(VALU_DEP_1) | instskip(SKIP_2) | instid1(VALU_DEP_1)
	v_ashrrev_i32_e32 v1, 31, v0
	s_waitcnt lgkmcnt(0)
	v_add_f64 v[4:5], s[6:7], -s[4:5]
	v_div_scale_f64 v[6:7], null, v[2:3], v[2:3], v[4:5]
	s_delay_alu instid0(VALU_DEP_1) | instskip(SKIP_2) | instid1(VALU_DEP_1)
	v_rcp_f64_e32 v[8:9], v[6:7]
	s_waitcnt_depctr 0xfff
	v_fma_f64 v[10:11], -v[6:7], v[8:9], 1.0
	v_fma_f64 v[8:9], v[8:9], v[10:11], v[8:9]
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_fma_f64 v[10:11], -v[6:7], v[8:9], 1.0
	v_fma_f64 v[8:9], v[8:9], v[10:11], v[8:9]
	v_div_scale_f64 v[10:11], vcc_lo, v[4:5], v[2:3], v[4:5]
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_mul_f64 v[12:13], v[10:11], v[8:9]
	v_fma_f64 v[6:7], -v[6:7], v[12:13], v[10:11]
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_div_fmas_f64 v[6:7], v[6:7], v[8:9], v[12:13]
	v_div_fixup_f64 v[4:5], v[6:7], v[2:3], v[4:5]
	v_lshlrev_b64 v[2:3], 3, v[0:1]
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_2)
	v_add_co_u32 v6, vcc_lo, s0, v2
	v_add_co_ci_u32_e32 v7, vcc_lo, s1, v3, vcc_lo
	v_add_co_u32 v0, vcc_lo, s10, v2
	v_add_co_ci_u32_e32 v1, vcc_lo, s11, v3, vcc_lo
	s_mov_b64 s[0:1], 0
.LBB1_2:                                ; =>This Inner Loop Header: Depth=1
	s_delay_alu instid0(SALU_CYCLE_1)
	v_add_co_u32 v8, vcc_lo, v6, s0
	v_add_co_ci_u32_e32 v9, vcc_lo, s1, v7, vcc_lo
	v_add_co_u32 v14, vcc_lo, v0, s0
	v_add_co_ci_u32_e32 v15, vcc_lo, s1, v1, vcc_lo
	s_clause 0x1
	global_load_b64 v[10:11], v[8:9], off offset:32
	global_load_b64 v[8:9], v[8:9], off
	s_add_u32 s0, s0, 8
	s_addc_u32 s1, s1, 0
	global_load_b64 v[16:17], v[14:15], off
	s_cmp_eq_u32 s0, 32
	s_waitcnt vmcnt(1)
	v_add_f64 v[8:9], v[10:11], -v[8:9]
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_mul_f64 v[8:9], v[8:9], s[2:3]
	v_div_scale_f64 v[10:11], null, v[4:5], v[4:5], v[8:9]
	v_div_scale_f64 v[20:21], vcc_lo, v[8:9], v[4:5], v[8:9]
	s_delay_alu instid0(VALU_DEP_2) | instskip(SKIP_2) | instid1(VALU_DEP_1)
	v_rcp_f64_e32 v[12:13], v[10:11]
	s_waitcnt_depctr 0xfff
	v_fma_f64 v[18:19], -v[10:11], v[12:13], 1.0
	v_fma_f64 v[12:13], v[12:13], v[18:19], v[12:13]
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_fma_f64 v[18:19], -v[10:11], v[12:13], 1.0
	v_fma_f64 v[12:13], v[12:13], v[18:19], v[12:13]
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_mul_f64 v[18:19], v[20:21], v[12:13]
	v_fma_f64 v[10:11], -v[10:11], v[18:19], v[20:21]
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_div_fmas_f64 v[10:11], v[10:11], v[12:13], v[18:19]
	v_div_fixup_f64 v[8:9], v[10:11], v[4:5], v[8:9]
	s_waitcnt vmcnt(0)
	s_delay_alu instid0(VALU_DEP_1)
	v_add_f64 v[8:9], v[16:17], -v[8:9]
	global_store_b64 v[14:15], v[8:9], off
	s_cbranch_scc0 .LBB1_2
; %bb.3:
	s_clause 0x1
	global_load_b128 v[4:7], v[0:1], off offset:16
	global_load_b128 v[8:11], v[0:1], off
	v_add_co_u32 v12, vcc_lo, s8, v2
	v_add_co_ci_u32_e32 v13, vcc_lo, s9, v3, vcc_lo
	s_mov_b32 s0, 0x812dea11
	s_mov_b32 s1, 0x3d719799
	s_mov_b32 s2, 0xfff24190
	global_load_b64 v[2:3], v[12:13], off offset:24
	s_mov_b32 s4, 0xaaaaaaab
	s_mov_b32 s6, 0x55555556
	s_mov_b32 s3, 0x3fefffff
	s_mov_b32 s5, 0x3ffaaaaa
	s_mov_b32 s7, 0x3fe55555
	s_mov_b32 s8, 50
	s_waitcnt vmcnt(2)
	v_mul_f64 v[14:15], v[4:5], v[4:5]
	s_waitcnt vmcnt(1)
	v_mul_f64 v[4:5], v[8:9], s[0:1]
	s_mov_b32 s1, 0
	s_delay_alu instid0(VALU_DEP_2)
	v_fma_f64 v[10:11], v[10:11], v[10:11], v[14:15]
.LBB1_4:                                ; =>This Inner Loop Header: Depth=1
	s_waitcnt vmcnt(0)
	s_delay_alu instid0(VALU_DEP_1) | instskip(SKIP_3) | instid1(VALU_DEP_1)
	v_add_f64 v[14:15], v[6:7], v[2:3]
	s_cmp_eq_u32 s8, 0
	s_cselect_b32 s9, -1, 0
	s_add_i32 s8, s8, -1
	v_add_f64 v[14:15], v[8:9], v[14:15]
	s_delay_alu instid0(VALU_DEP_1) | instskip(SKIP_1) | instid1(VALU_DEP_2)
	v_div_scale_f64 v[16:17], null, v[14:15], v[14:15], v[10:11]
	v_div_scale_f64 v[22:23], vcc_lo, v[10:11], v[14:15], v[10:11]
	v_rcp_f64_e32 v[18:19], v[16:17]
	s_waitcnt_depctr 0xfff
	v_fma_f64 v[20:21], -v[16:17], v[18:19], 1.0
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_fma_f64 v[18:19], v[18:19], v[20:21], v[18:19]
	v_fma_f64 v[20:21], -v[16:17], v[18:19], 1.0
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_fma_f64 v[18:19], v[18:19], v[20:21], v[18:19]
	v_mul_f64 v[20:21], v[22:23], v[18:19]
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_fma_f64 v[16:17], -v[16:17], v[20:21], v[22:23]
	v_div_fmas_f64 v[16:17], v[16:17], v[18:19], v[20:21]
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_div_fixup_f64 v[16:17], v[16:17], v[14:15], v[10:11]
	v_div_scale_f64 v[18:19], null, v[14:15], v[14:15], v[16:17]
	v_div_scale_f64 v[24:25], vcc_lo, v[16:17], v[14:15], v[16:17]
	s_delay_alu instid0(VALU_DEP_2) | instskip(SKIP_2) | instid1(VALU_DEP_1)
	v_rcp_f64_e32 v[20:21], v[18:19]
	s_waitcnt_depctr 0xfff
	v_fma_f64 v[22:23], -v[18:19], v[20:21], 1.0
	v_fma_f64 v[20:21], v[20:21], v[22:23], v[20:21]
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_fma_f64 v[22:23], -v[18:19], v[20:21], 1.0
	v_fma_f64 v[20:21], v[20:21], v[22:23], v[20:21]
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_mul_f64 v[22:23], v[24:25], v[20:21]
	v_fma_f64 v[18:19], -v[18:19], v[22:23], v[24:25]
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_div_fmas_f64 v[18:19], v[18:19], v[20:21], v[22:23]
	v_div_fixup_f64 v[14:15], v[18:19], v[14:15], v[16:17]
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_min_f64 v[18:19], v[14:15], s[2:3]
	v_add_f64 v[14:15], -v[18:19], 1.0
	s_delay_alu instid0(VALU_DEP_1) | instskip(SKIP_1) | instid1(VALU_DEP_2)
	v_div_scale_f64 v[16:17], null, v[14:15], v[14:15], 1.0
	v_div_scale_f64 v[24:25], vcc_lo, 1.0, v[14:15], 1.0
	v_rcp_f64_e32 v[20:21], v[16:17]
	s_waitcnt_depctr 0xfff
	v_fma_f64 v[22:23], -v[16:17], v[20:21], 1.0
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_fma_f64 v[20:21], v[20:21], v[22:23], v[20:21]
	v_fma_f64 v[22:23], -v[16:17], v[20:21], 1.0
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_fma_f64 v[20:21], v[20:21], v[22:23], v[20:21]
	v_mul_f64 v[22:23], v[24:25], v[20:21]
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_fma_f64 v[16:17], -v[16:17], v[22:23], v[24:25]
	v_div_fmas_f64 v[16:17], v[16:17], v[20:21], v[22:23]
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_div_fixup_f64 v[16:17], v[16:17], v[14:15], 1.0
	v_cmp_gt_f64_e32 vcc_lo, 0x10000000, v[16:17]
	v_cndmask_b32_e64 v14, 0, 1, vcc_lo
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_lshlrev_b32_e32 v14, 8, v14
	v_ldexp_f64 v[14:15], v[16:17], v14
	v_add_f64 v[16:17], -v[16:17], 1.0
	s_delay_alu instid0(VALU_DEP_2) | instskip(SKIP_3) | instid1(VALU_DEP_1)
	v_rsq_f64_e32 v[20:21], v[14:15]
	s_waitcnt_depctr 0xfff
	v_mul_f64 v[22:23], v[14:15], v[20:21]
	v_mul_f64 v[20:21], v[20:21], 0.5
	v_fma_f64 v[24:25], -v[20:21], v[22:23], 0.5
	s_delay_alu instid0(VALU_DEP_1) | instskip(SKIP_1) | instid1(VALU_DEP_2)
	v_fma_f64 v[22:23], v[22:23], v[24:25], v[22:23]
	v_fma_f64 v[20:21], v[20:21], v[24:25], v[20:21]
	v_fma_f64 v[24:25], -v[22:23], v[22:23], v[14:15]
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_fma_f64 v[22:23], v[24:25], v[20:21], v[22:23]
	v_fma_f64 v[24:25], -v[22:23], v[22:23], v[14:15]
	s_delay_alu instid0(VALU_DEP_1) | instskip(SKIP_2) | instid1(VALU_DEP_2)
	v_fma_f64 v[20:21], v[24:25], v[20:21], v[22:23]
	v_cndmask_b32_e64 v22, 0, 0xffffff80, vcc_lo
	v_cmp_class_f64_e64 vcc_lo, v[14:15], 0x260
	v_ldexp_f64 v[20:21], v[20:21], v22
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_dual_cndmask_b32 v15, v21, v15 :: v_dual_cndmask_b32 v14, v20, v14
	v_add_f64 v[20:21], -v[14:15], 1.0
	v_mul_f64 v[22:23], v[8:9], v[14:15]
	v_div_scale_f64 v[24:25], null, v[14:15], v[14:15], v[8:9]
	s_delay_alu instid0(VALU_DEP_3) | instskip(NEXT) | instid1(VALU_DEP_2)
	v_fma_f64 v[20:21], v[8:9], v[20:21], v[6:7]
	v_rcp_f64_e32 v[28:29], v[24:25]
	s_delay_alu instid0(VALU_DEP_1) | instskip(SKIP_4) | instid1(VALU_DEP_3)
	v_fma_f64 v[20:21], v[2:3], v[16:17], v[20:21]
	s_waitcnt_depctr 0xfff
	v_fma_f64 v[32:33], -v[24:25], v[28:29], 1.0
	v_div_scale_f64 v[16:17], null, v[22:23], v[22:23], v[20:21]
	v_div_scale_f64 v[34:35], vcc_lo, v[20:21], v[22:23], v[20:21]
	v_fma_f64 v[28:29], v[28:29], v[32:33], v[28:29]
	s_delay_alu instid0(VALU_DEP_3) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_rcp_f64_e32 v[26:27], v[16:17]
	v_fma_f64 v[32:33], -v[24:25], v[28:29], 1.0
	s_waitcnt_depctr 0xfff
	v_fma_f64 v[30:31], -v[16:17], v[26:27], 1.0
	v_fma_f64 v[28:29], v[28:29], v[32:33], v[28:29]
	s_delay_alu instid0(VALU_DEP_2) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_fma_f64 v[26:27], v[26:27], v[30:31], v[26:27]
	v_fma_f64 v[30:31], -v[16:17], v[26:27], 1.0
	s_delay_alu instid0(VALU_DEP_1) | instskip(SKIP_1) | instid1(VALU_DEP_2)
	v_fma_f64 v[26:27], v[26:27], v[30:31], v[26:27]
	v_div_scale_f64 v[30:31], s0, v[8:9], v[14:15], v[8:9]
	v_mul_f64 v[32:33], v[34:35], v[26:27]
	s_delay_alu instid0(VALU_DEP_2) | instskip(NEXT) | instid1(VALU_DEP_2)
	v_mul_f64 v[36:37], v[30:31], v[28:29]
	v_fma_f64 v[16:17], -v[16:17], v[32:33], v[34:35]
	s_delay_alu instid0(VALU_DEP_2) | instskip(NEXT) | instid1(VALU_DEP_2)
	v_fma_f64 v[24:25], -v[24:25], v[36:37], v[30:31]
	v_div_fmas_f64 v[26:27], v[16:17], v[26:27], v[32:33]
	s_mov_b32 vcc_lo, s0
	s_delay_alu instid0(VALU_DEP_2) | instskip(NEXT) | instid1(VALU_DEP_2)
	v_div_fmas_f64 v[16:17], v[24:25], v[28:29], v[36:37]
	v_div_fixup_f64 v[20:21], v[26:27], v[22:23], v[20:21]
	s_delay_alu instid0(VALU_DEP_2) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_div_fixup_f64 v[16:17], v[16:17], v[14:15], v[8:9]
	v_div_scale_f64 v[24:25], null, v[16:17], v[16:17], v[2:3]
	v_div_scale_f64 v[32:33], vcc_lo, v[2:3], v[16:17], v[2:3]
	s_delay_alu instid0(VALU_DEP_2) | instskip(SKIP_2) | instid1(VALU_DEP_1)
	v_rcp_f64_e32 v[28:29], v[24:25]
	s_waitcnt_depctr 0xfff
	v_fma_f64 v[30:31], -v[24:25], v[28:29], 1.0
	v_fma_f64 v[28:29], v[28:29], v[30:31], v[28:29]
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_fma_f64 v[30:31], -v[24:25], v[28:29], 1.0
	v_fma_f64 v[28:29], v[28:29], v[30:31], v[28:29]
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_mul_f64 v[30:31], v[32:33], v[28:29]
	v_fma_f64 v[24:25], -v[24:25], v[30:31], v[32:33]
	s_delay_alu instid0(VALU_DEP_1) | instskip(SKIP_2) | instid1(VALU_DEP_3)
	v_div_fmas_f64 v[22:23], v[24:25], v[28:29], v[30:31]
	v_add_f64 v[24:25], v[20:21], 1.0
	v_mul_f64 v[20:21], v[16:17], v[20:21]
	v_div_fixup_f64 v[22:23], v[22:23], v[16:17], v[2:3]
	s_delay_alu instid0(VALU_DEP_2) | instskip(NEXT) | instid1(VALU_DEP_2)
	v_fma_f64 v[20:21], v[20:21], s[6:7], -v[2:3]
	v_add_f64 v[22:23], v[22:23], v[24:25]
	v_mul_f64 v[24:25], v[2:3], s[4:5]
	s_delay_alu instid0(VALU_DEP_3) | instskip(NEXT) | instid1(VALU_DEP_3)
	v_cmp_lt_f64_e64 s0, |v[20:21]|, v[4:5]
	v_mul_f64 v[22:23], v[16:17], v[22:23]
	s_delay_alu instid0(VALU_DEP_2) | instskip(NEXT) | instid1(SALU_CYCLE_1)
	s_or_b32 s0, s0, s9
	s_and_b32 s0, exec_lo, s0
	s_delay_alu instid0(SALU_CYCLE_1) | instskip(NEXT) | instid1(VALU_DEP_1)
	s_or_b32 s1, s0, s1
	v_div_scale_f64 v[26:27], null, v[22:23], v[22:23], v[24:25]
	v_div_scale_f64 v[32:33], vcc_lo, v[24:25], v[22:23], v[24:25]
	s_delay_alu instid0(VALU_DEP_2) | instskip(SKIP_2) | instid1(VALU_DEP_1)
	v_rcp_f64_e32 v[28:29], v[26:27]
	s_waitcnt_depctr 0xfff
	v_fma_f64 v[30:31], -v[26:27], v[28:29], 1.0
	v_fma_f64 v[28:29], v[28:29], v[30:31], v[28:29]
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_fma_f64 v[30:31], -v[26:27], v[28:29], 1.0
	v_fma_f64 v[28:29], v[28:29], v[30:31], v[28:29]
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_mul_f64 v[30:31], v[32:33], v[28:29]
	v_fma_f64 v[26:27], -v[26:27], v[30:31], v[32:33]
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_div_fmas_f64 v[26:27], v[26:27], v[28:29], v[30:31]
	v_div_fixup_f64 v[22:23], v[26:27], v[22:23], v[24:25]
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_fma_f64 v[18:19], v[18:19], v[22:23], -1.0
	v_div_scale_f64 v[22:23], null, v[18:19], v[18:19], v[20:21]
	s_delay_alu instid0(VALU_DEP_1) | instskip(SKIP_2) | instid1(VALU_DEP_1)
	v_rcp_f64_e32 v[24:25], v[22:23]
	s_waitcnt_depctr 0xfff
	v_fma_f64 v[26:27], -v[22:23], v[24:25], 1.0
	v_fma_f64 v[24:25], v[24:25], v[26:27], v[24:25]
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_fma_f64 v[26:27], -v[22:23], v[24:25], 1.0
	v_fma_f64 v[24:25], v[24:25], v[26:27], v[24:25]
	v_div_scale_f64 v[26:27], vcc_lo, v[20:21], v[18:19], v[20:21]
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_mul_f64 v[28:29], v[26:27], v[24:25]
	v_fma_f64 v[22:23], -v[22:23], v[28:29], v[26:27]
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_div_fmas_f64 v[22:23], v[22:23], v[24:25], v[28:29]
	v_div_fixup_f64 v[18:19], v[22:23], v[18:19], v[20:21]
	s_delay_alu instid0(VALU_DEP_1)
	v_add_f64 v[2:3], v[2:3], -v[18:19]
	s_and_not1_b32 exec_lo, exec_lo, s1
	s_cbranch_execnz .LBB1_4
; %bb.5:                                ; %_Z22conserved_to_primitivePKdPd.exit
	s_or_b32 exec_lo, exec_lo, s1
	global_store_b64 v[12:13], v[16:17], off
	global_load_b64 v[4:5], v[0:1], off offset:8
	v_add_f64 v[6:7], v[8:9], v[6:7]
	s_delay_alu instid0(VALU_DEP_1) | instskip(SKIP_2) | instid1(VALU_DEP_1)
	v_add_f64 v[6:7], v[6:7], v[2:3]
	s_waitcnt vmcnt(0)
	v_mul_f64 v[4:5], v[14:15], v[4:5]
	v_div_scale_f64 v[8:9], null, v[6:7], v[6:7], v[4:5]
	v_div_scale_f64 v[18:19], vcc_lo, v[4:5], v[6:7], v[4:5]
	s_delay_alu instid0(VALU_DEP_2) | instskip(SKIP_2) | instid1(VALU_DEP_1)
	v_rcp_f64_e32 v[10:11], v[8:9]
	s_waitcnt_depctr 0xfff
	v_fma_f64 v[16:17], -v[8:9], v[10:11], 1.0
	v_fma_f64 v[10:11], v[10:11], v[16:17], v[10:11]
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_fma_f64 v[16:17], -v[8:9], v[10:11], 1.0
	v_fma_f64 v[10:11], v[10:11], v[16:17], v[10:11]
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_mul_f64 v[16:17], v[18:19], v[10:11]
	v_fma_f64 v[8:9], -v[8:9], v[16:17], v[18:19]
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_div_fmas_f64 v[8:9], v[8:9], v[10:11], v[16:17]
	v_div_fixup_f64 v[4:5], v[8:9], v[6:7], v[4:5]
	global_store_b64 v[12:13], v[4:5], off offset:8
	global_load_b64 v[0:1], v[0:1], off offset:16
	s_waitcnt vmcnt(0)
	v_mul_f64 v[0:1], v[14:15], v[0:1]
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_div_scale_f64 v[4:5], null, v[6:7], v[6:7], v[0:1]
	v_rcp_f64_e32 v[8:9], v[4:5]
	s_waitcnt_depctr 0xfff
	v_fma_f64 v[10:11], -v[4:5], v[8:9], 1.0
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_fma_f64 v[8:9], v[8:9], v[10:11], v[8:9]
	v_fma_f64 v[10:11], -v[4:5], v[8:9], 1.0
	s_delay_alu instid0(VALU_DEP_1) | instskip(SKIP_1) | instid1(VALU_DEP_1)
	v_fma_f64 v[8:9], v[8:9], v[10:11], v[8:9]
	v_div_scale_f64 v[10:11], vcc_lo, v[0:1], v[6:7], v[0:1]
	v_mul_f64 v[14:15], v[10:11], v[8:9]
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_fma_f64 v[4:5], -v[4:5], v[14:15], v[10:11]
	v_div_fmas_f64 v[4:5], v[4:5], v[8:9], v[14:15]
	s_delay_alu instid0(VALU_DEP_1)
	v_div_fixup_f64 v[0:1], v[4:5], v[6:7], v[0:1]
	global_store_b128 v[12:13], v[0:3], off offset:16
.LBB1_6:
	s_nop 0
	s_sendmsg sendmsg(MSG_DEALLOC_VGPRS)
	s_endpgm
	.section	.rodata,"a",@progbits
	.p2align	6, 0x0
	.amdhsa_kernel _Z29update_struct_do_advance_cons12UpdateStructd
		.amdhsa_group_segment_fixed_size 0
		.amdhsa_private_segment_fixed_size 0
		.amdhsa_kernarg_size 312
		.amdhsa_user_sgpr_count 15
		.amdhsa_user_sgpr_dispatch_ptr 0
		.amdhsa_user_sgpr_queue_ptr 0
		.amdhsa_user_sgpr_kernarg_segment_ptr 1
		.amdhsa_user_sgpr_dispatch_id 0
		.amdhsa_user_sgpr_private_segment_size 0
		.amdhsa_wavefront_size32 1
		.amdhsa_uses_dynamic_stack 0
		.amdhsa_enable_private_segment 0
		.amdhsa_system_sgpr_workgroup_id_x 1
		.amdhsa_system_sgpr_workgroup_id_y 0
		.amdhsa_system_sgpr_workgroup_id_z 0
		.amdhsa_system_sgpr_workgroup_info 0
		.amdhsa_system_vgpr_workitem_id 0
		.amdhsa_next_free_vgpr 38
		.amdhsa_next_free_sgpr 16
		.amdhsa_float_round_mode_32 0
		.amdhsa_float_round_mode_16_64 0
		.amdhsa_float_denorm_mode_32 3
		.amdhsa_float_denorm_mode_16_64 3
		.amdhsa_dx10_clamp 1
		.amdhsa_ieee_mode 1
		.amdhsa_fp16_overflow 0
		.amdhsa_workgroup_processor_mode 1
		.amdhsa_memory_ordered 1
		.amdhsa_forward_progress 0
		.amdhsa_shared_vgpr_count 0
		.amdhsa_exception_fp_ieee_invalid_op 0
		.amdhsa_exception_fp_denorm_src 0
		.amdhsa_exception_fp_ieee_div_zero 0
		.amdhsa_exception_fp_ieee_overflow 0
		.amdhsa_exception_fp_ieee_underflow 0
		.amdhsa_exception_fp_ieee_inexact 0
		.amdhsa_exception_int_div_zero 0
	.end_amdhsa_kernel
	.text
.Lfunc_end1:
	.size	_Z29update_struct_do_advance_cons12UpdateStructd, .Lfunc_end1-_Z29update_struct_do_advance_cons12UpdateStructd
                                        ; -- End function
	.section	.AMDGPU.csdata,"",@progbits
; Kernel info:
; codeLenInByte = 2164
; NumSgprs: 18
; NumVgprs: 38
; ScratchSize: 0
; MemoryBound: 0
; FloatMode: 240
; IeeeMode: 1
; LDSByteSize: 0 bytes/workgroup (compile time only)
; SGPRBlocks: 2
; VGPRBlocks: 4
; NumSGPRsForWavesPerEU: 18
; NumVGPRsForWavesPerEU: 38
; Occupancy: 16
; WaveLimiterHint : 0
; COMPUTE_PGM_RSRC2:SCRATCH_EN: 0
; COMPUTE_PGM_RSRC2:USER_SGPR: 15
; COMPUTE_PGM_RSRC2:TRAP_HANDLER: 0
; COMPUTE_PGM_RSRC2:TGID_X_EN: 1
; COMPUTE_PGM_RSRC2:TGID_Y_EN: 0
; COMPUTE_PGM_RSRC2:TGID_Z_EN: 0
; COMPUTE_PGM_RSRC2:TIDIG_COMP_CNT: 0
	.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_
	.amdgpu_metadata
---
amdhsa.kernels:
  - .args:
      - .offset:         0
        .size:           48
        .value_kind:     by_value
      - .offset:         48
        .size:           4
        .value_kind:     hidden_block_count_x
      - .offset:         52
        .size:           4
        .value_kind:     hidden_block_count_y
      - .offset:         56
        .size:           4
        .value_kind:     hidden_block_count_z
      - .offset:         60
        .size:           2
        .value_kind:     hidden_group_size_x
      - .offset:         62
        .size:           2
        .value_kind:     hidden_group_size_y
      - .offset:         64
        .size:           2
        .value_kind:     hidden_group_size_z
      - .offset:         66
        .size:           2
        .value_kind:     hidden_remainder_x
      - .offset:         68
        .size:           2
        .value_kind:     hidden_remainder_y
      - .offset:         70
        .size:           2
        .value_kind:     hidden_remainder_z
      - .offset:         88
        .size:           8
        .value_kind:     hidden_global_offset_x
      - .offset:         96
        .size:           8
        .value_kind:     hidden_global_offset_y
      - .offset:         104
        .size:           8
        .value_kind:     hidden_global_offset_z
      - .offset:         112
        .size:           2
        .value_kind:     hidden_grid_dims
    .group_segment_fixed_size: 0
    .kernarg_segment_align: 8
    .kernarg_segment_size: 304
    .language:       OpenCL C
    .language_version:
      - 2
      - 0
    .max_flat_workgroup_size: 1024
    .name:           _Z29update_struct_do_compute_flux12UpdateStruct
    .private_segment_fixed_size: 0
    .sgpr_count:     18
    .sgpr_spill_count: 0
    .symbol:         _Z29update_struct_do_compute_flux12UpdateStruct.kd
    .uniform_work_group_size: 1
    .uses_dynamic_stack: false
    .vgpr_count:     91
    .vgpr_spill_count: 0
    .wavefront_size: 32
    .workgroup_processor_mode: 1
  - .args:
      - .offset:         0
        .size:           48
        .value_kind:     by_value
      - .offset:         48
        .size:           8
        .value_kind:     by_value
      - .offset:         56
        .size:           4
        .value_kind:     hidden_block_count_x
      - .offset:         60
        .size:           4
        .value_kind:     hidden_block_count_y
      - .offset:         64
        .size:           4
        .value_kind:     hidden_block_count_z
      - .offset:         68
        .size:           2
        .value_kind:     hidden_group_size_x
      - .offset:         70
        .size:           2
        .value_kind:     hidden_group_size_y
      - .offset:         72
        .size:           2
        .value_kind:     hidden_group_size_z
      - .offset:         74
        .size:           2
        .value_kind:     hidden_remainder_x
      - .offset:         76
        .size:           2
        .value_kind:     hidden_remainder_y
      - .offset:         78
        .size:           2
        .value_kind:     hidden_remainder_z
      - .offset:         96
        .size:           8
        .value_kind:     hidden_global_offset_x
      - .offset:         104
        .size:           8
        .value_kind:     hidden_global_offset_y
      - .offset:         112
        .size:           8
        .value_kind:     hidden_global_offset_z
      - .offset:         120
        .size:           2
        .value_kind:     hidden_grid_dims
    .group_segment_fixed_size: 0
    .kernarg_segment_align: 8
    .kernarg_segment_size: 312
    .language:       OpenCL C
    .language_version:
      - 2
      - 0
    .max_flat_workgroup_size: 1024
    .name:           _Z29update_struct_do_advance_cons12UpdateStructd
    .private_segment_fixed_size: 0
    .sgpr_count:     18
    .sgpr_spill_count: 0
    .symbol:         _Z29update_struct_do_advance_cons12UpdateStructd.kd
    .uniform_work_group_size: 1
    .uses_dynamic_stack: false
    .vgpr_count:     38
    .vgpr_spill_count: 0
    .wavefront_size: 32
    .workgroup_processor_mode: 1
amdhsa.target:   amdgcn-amd-amdhsa--gfx1100
amdhsa.version:
  - 1
  - 2
...

	.end_amdgpu_metadata
