#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include <math.h>
#include <time.h>
#define MAX_CHAR 100
#define DATAFILE "data.txt"
#define RESULTSFILE "resultsCudal.txt"
#define G 6.674e-11
#define NUM_ITER 1000
#define NUM_ITER_SHOW 50

__global__ void asteroid(double * gpu_x, double * gpu_y, double * gpu_vx, double * gpu_vy, double * gpu_m, double * gpu_x_new, double * gpu_y_new, double * gpu_vx_new, double * gpu_vy_new, int noOfObjects){
        int i = threadIdx.x; // local or register
        // printf("Object %d: %d, %d\n", i, gpu_x[i], gpu_y[i]);

        if (i < noOfObjects){
             gpu_x_new[i]=gpu_x[i];
             gpu_y_new[i]=gpu_y[i];
             gpu_vx_new[i]=gpu_vx[i];
             gpu_vy_new[i]=gpu_vy[i];
         }

         if (i < noOfObjects){
             double ax_total=0;
             double ay_total=0;
             for (int j=0; j < noOfObjects; j++) {
                 if (i==j)
                     continue;

                 double d = sqrt(pow( (gpu_x[i]-gpu_x[j]) ,2.0) + pow( (gpu_y[i]-gpu_y[j]) ,2.0));
                 double f = G*gpu_m[i]*gpu_m[j]/pow(d,2.0);
                 double fx = f*(gpu_x[j]-gpu_x[i])/d;
                 double ax = fx/gpu_m[i];
                 double fy = f*(gpu_y[j]-gpu_y[i])/d;
                 double ay = fy/gpu_m[i];

                 ax_total += ax;
                 ay_total += ay;

             }

             gpu_vx_new[i] += ax_total;
             gpu_vy_new[i] += ay_total;

             gpu_x_new[i] += gpu_vx_new[i];
             gpu_y_new[i] += gpu_vy_new[i];

         }  // noOfObjects
         printf("Object %d: %d, %d\n", i, gpu_x[i], gpu_y[i]);

         if (i < noOfObjects){
             gpu_x[i]=gpu_x_new[i];
             gpu_y[i]=gpu_y_new[i];
             gpu_vx[i]=gpu_vx_new[i];
             gpu_vy[i]=gpu_vy_new[i];
         }
}

int main(){

    clock_t start, end;
    double time_used;
    char  str[MAX_CHAR];
    FILE *file;
    int noOfObjects;
    int i;

    file = fopen( DATAFILE , "r");
    fscanf(file,"%s",str);
    noOfObjects = atoi(str);
    printf("Number of objects: %d\n",noOfObjects);

    const int ARRAY_BYTES = noOfObjects * sizeof(double);

    double *x = (double *) malloc(ARRAY_BYTES);
    double *y = (double *) malloc(ARRAY_BYTES);
    double *vx = (double *) malloc(ARRAY_BYTES);
    double *vy = (double *) malloc(ARRAY_BYTES);
    double *m = (double *) malloc(ARRAY_BYTES);

    double *x0 = (double *) malloc(ARRAY_BYTES);
    double *y0 = (double *) malloc(ARRAY_BYTES);
    double *vx0 = (double *) malloc(ARRAY_BYTES);
    double *vy0 = (double *) malloc(ARRAY_BYTES);

    double *x_new = (double *) malloc(ARRAY_BYTES);
    double *y_new = (double *) malloc(ARRAY_BYTES);
    double *vx_new = (double *) malloc(ARRAY_BYTES);
    double *vy_new = (double *) malloc(ARRAY_BYTES);

    printf("\n");

    // declare GPU memory pointers
    double * gpu_x;
    double * gpu_y;
    double * gpu_vx;
    double * gpu_vy;
    double * gpu_m;
    double * gpu_x_new;
    double * gpu_y_new;
    double * gpu_vx_new;
    double * gpu_vy_new;

    // launch the kernel
    for (i=0; i < noOfObjects; i++) {
        fscanf(file,"%s",str);
        x[i] = atof(str);
        x0[i] = atof(str);
        fscanf(file,"%s",str);
        y[i] = atof(str);
        y0[i] = atof(str);
        fscanf(file,"%s",str);
        vx[i] = atof(str);
        vx0[i] = atof(str);
        fscanf(file,"%s",str);
        vy[i] = atof(str);
        vy0[i] = atof(str);
        fscanf(file,"%s",str);
        m[i] = atof(str);
    }
    fclose(file);

    // allocate GPU memory
    cudaMalloc((void**) &gpu_x, ARRAY_BYTES);
    cudaMalloc((void**) &gpu_y, ARRAY_BYTES);
    cudaMalloc((void**) &gpu_vx, ARRAY_BYTES);
    cudaMalloc((void**) &gpu_vy, ARRAY_BYTES);
    cudaMalloc((void**) &gpu_m, ARRAY_BYTES);
    cudaMalloc((void**) &gpu_x_new, ARRAY_BYTES);
    cudaMalloc((void**) &gpu_y_new, ARRAY_BYTES);
    cudaMalloc((void**) &gpu_vx_new, ARRAY_BYTES);
    cudaMalloc((void**) &gpu_vy_new, ARRAY_BYTES);

    // transfer the array to the GPU
    cudaMemcpy(gpu_x, x, ARRAY_BYTES, cudaMemcpyHostToDevice);
    cudaMemcpy(gpu_y, y, ARRAY_BYTES, cudaMemcpyHostToDevice);
    cudaMemcpy(gpu_vx, vx, ARRAY_BYTES, cudaMemcpyHostToDevice);
    cudaMemcpy(gpu_vy, vy, ARRAY_BYTES, cudaMemcpyHostToDevice);
    cudaMemcpy(gpu_m, m, ARRAY_BYTES, cudaMemcpyHostToDevice);
    cudaMemcpy(gpu_x_new, x_new, ARRAY_BYTES, cudaMemcpyHostToDevice);
    cudaMemcpy(gpu_y_new, y_new, ARRAY_BYTES, cudaMemcpyHostToDevice);
    cudaMemcpy(gpu_vx_new, vx_new, ARRAY_BYTES, cudaMemcpyHostToDevice);
    cudaMemcpy(gpu_vy_new, vy_new, ARRAY_BYTES, cudaMemcpyHostToDevice);

    start=clock();
    for (int niter=0; niter<NUM_ITER; niter++) {

        asteroid<<<1, noOfObjects>>>(gpu_x, gpu_y, gpu_vx, gpu_vy, gpu_m, gpu_x_new, gpu_y_new, gpu_vx_new, gpu_vy_new, noOfObjects);
        //printf("ola k ase \n\n, %d", niter);

        if (niter%NUM_ITER_SHOW == 0)
            printf("Iteration %d/%d\n", niter, NUM_ITER);

    }  // nIter
    end=clock();

    // copy back the result array to the CPU
    cudaMemcpy(x, gpu_x, noOfObjects*sizeof(double), cudaMemcpyDeviceToHost);
    cudaMemcpy(y, gpu_y, noOfObjects*sizeof(double), cudaMemcpyDeviceToHost);
    cudaMemcpy(vx, gpu_vx, noOfObjects*sizeof(double), cudaMemcpyDeviceToHost);
    cudaMemcpy(vy, gpu_vy, noOfObjects*sizeof(double), cudaMemcpyDeviceToHost);
    cudaMemcpy(m, gpu_m, noOfObjects*sizeof(double), cudaMemcpyDeviceToHost);
    cudaMemcpy(x_new, gpu_x_new, noOfObjects*sizeof(double), cudaMemcpyDeviceToHost);
    cudaMemcpy(y_new, gpu_y_new, noOfObjects*sizeof(double), cudaMemcpyDeviceToHost);
    cudaMemcpy(vx_new, gpu_vx_new, noOfObjects*sizeof(double), cudaMemcpyDeviceToHost);
    cudaMemcpy(vy_new, gpu_vy_new, noOfObjects*sizeof(double), cudaMemcpyDeviceToHost);

    file = fopen( RESULTSFILE , "w");
    fprintf(file, "Movement of objects\n");
    fprintf(file, "-------------------\n");
    for (i=0; i<noOfObjects; i++) {
        double mov = sqrt(pow( (x0[i]-x[i]) ,2.0) + pow( (y0[i]-y[i]) ,2.0));
        fprintf(file,"  Object %i  -  %f meters\n", i, mov);
    }
    int hours = NUM_ITER/3600;
    int mins = (NUM_ITER - hours*3600)/60;
    int secs = (NUM_ITER - hours*3600 - mins*60);
    fprintf(file,"Time elapsed: %i seconds (%i hours, %i minutes, %i seconds)\n",NUM_ITER, hours, mins, secs);

    time_used = ((double)(end-start)) / CLOCKS_PER_SEC;
    fprintf(file,"Processing time: %f sec.\n",time_used);
    fclose(file);
    // // copy back the result array to the CPU
    // cudaMemcpy(h_out, d_out, ARRAY_BYTES, cudaMemcpyDeviceToHost);
    // // print out the resulting array
    // for (int i =0; i < ARRAY_SIZE; i++) {
    // printf("%f", h_out[i]);
    // printf(((i % 4) != 3) ? "\t" : "\n");
    // }
    cudaFree(gpu_x);
    cudaFree(gpu_y);
    cudaFree(gpu_vx);
    cudaFree(gpu_vy);
    cudaFree(gpu_m);

    cudaFree(gpu_x_new);
    cudaFree(gpu_y_new);
    cudaFree(gpu_vx_new);
    cudaFree(gpu_vy_new);

}  // main

	.file	"tmpxft_0020c7ea_00000000-6_SimulateAsteroidsParallel.cudafe1.cpp"
	.text
#APP

#NO_APP
	.type	_ZL26__cudaUnregisterBinaryUtilv, @function
_ZL26__cudaUnregisterBinaryUtilv:
.LFB2030:
	.cfi_startproc
	endbr64
	movq	_ZL20__cudaFatCubinHandle(%rip), %rdi
	jmp	__cudaUnregisterFatBinary@PLT
	.cfi_endproc
.LFE2030:
	.size	_ZL26__cudaUnregisterBinaryUtilv, .-_ZL26__cudaUnregisterBinaryUtilv
	.globl	_Z44__device_stub__Z8asteroidPdS_S_S_S_S_S_S_S_iPdS_S_S_S_S_S_S_S_i
	.type	_Z44__device_stub__Z8asteroidPdS_S_S_S_S_S_S_S_iPdS_S_S_S_S_S_S_S_i, @function
_Z44__device_stub__Z8asteroidPdS_S_S_S_S_S_S_S_iPdS_S_S_S_S_S_S_S_i:
.LFB2052:
	.cfi_startproc
	endbr64
	subq	$248, %rsp
	.cfi_def_cfa_offset 256
	movq	256(%rsp), %rax
	movq	%rdi, 72(%rsp)
	leaq	104(%rsp), %rdi
	movq	%rsi, 64(%rsp)
	leaq	116(%rsp), %rsi
	movq	%rax, 24(%rsp)
	movq	264(%rsp), %rax
	movq	%rdx, 56(%rsp)
	leaq	88(%rsp), %rdx
	movq	%rax, 16(%rsp)
	movq	272(%rsp), %rax
	movq	%rcx, 48(%rsp)
	leaq	96(%rsp), %rcx
	movq	%r8, 40(%rsp)
	movq	%r9, 32(%rsp)
	movq	%rax, 8(%rsp)
	movq	%fs:40, %rax
	movq	%rax, 232(%rsp)
	xorl	%eax, %eax
	leaq	72(%rsp), %rax
	movl	$1, 112(%rsp)
	movq	%rax, 152(%rsp)
	leaq	64(%rsp), %rax
	movq	%rax, 160(%rsp)
	leaq	56(%rsp), %rax
	movq	%rax, 168(%rsp)
	leaq	48(%rsp), %rax
	movq	%rax, 176(%rsp)
	leaq	40(%rsp), %rax
	movq	%rax, 184(%rsp)
	leaq	32(%rsp), %rax
	movq	%rax, 192(%rsp)
	leaq	24(%rsp), %rax
	movq	%rax, 200(%rsp)
	leaq	16(%rsp), %rax
	movq	%rax, 208(%rsp)
	leaq	8(%rsp), %rax
	movq	%rax, 216(%rsp)
	leaq	280(%rsp), %rax
	movq	%rax, 224(%rsp)
	movabsq	$4294967297, %rax
	movq	%rax, 104(%rsp)
	movq	%rax, 116(%rsp)
	movl	$1, 124(%rsp)
	call	__cudaPopCallConfiguration@PLT
	testl	%eax, %eax
	jne	.L2
	pushq	96(%rsp)
	.cfi_def_cfa_offset 264
	leaq	_Z8asteroidPdS_S_S_S_S_S_S_S_i(%rip), %rdi
	pushq	96(%rsp)
	.cfi_def_cfa_offset 272
	movq	132(%rsp), %rcx
	movl	140(%rsp), %r8d
	movq	120(%rsp), %rsi
	movl	128(%rsp), %edx
	leaq	168(%rsp), %r9
	call	cudaLaunchKernel@PLT
	popq	%rax
	.cfi_def_cfa_offset 264
	popq	%rdx
	.cfi_def_cfa_offset 256
.L2:
	movq	232(%rsp), %rax
	subq	%fs:40, %rax
	je	.L4
	call	__stack_chk_fail@PLT
.L4:
	addq	$248, %rsp
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE2052:
	.size	_Z44__device_stub__Z8asteroidPdS_S_S_S_S_S_S_S_iPdS_S_S_S_S_S_S_S_i, .-_Z44__device_stub__Z8asteroidPdS_S_S_S_S_S_S_S_iPdS_S_S_S_S_S_S_S_i
	.globl	_Z8asteroidPdS_S_S_S_S_S_S_S_i
	.type	_Z8asteroidPdS_S_S_S_S_S_S_S_i, @function
_Z8asteroidPdS_S_S_S_S_S_S_S_i:
.LFB2053:
	.cfi_startproc
	endbr64
	jmp	_Z44__device_stub__Z8asteroidPdS_S_S_S_S_S_S_S_iPdS_S_S_S_S_S_S_S_i
	.cfi_endproc
.LFE2053:
	.size	_Z8asteroidPdS_S_S_S_S_S_S_S_i, .-_Z8asteroidPdS_S_S_S_S_S_S_S_i
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"r"
.LC1:
	.string	"data.txt"
.LC2:
	.string	"%s"
.LC3:
	.string	"Number of objects: %d\n"
.LC4:
	.string	"\n"
.LC5:
	.string	"Iteration %d/%d\n"
.LC6:
	.string	"w"
.LC7:
	.string	"resultsCudal.txt"
.LC8:
	.string	"Movement of objects\n"
.LC9:
	.string	"-------------------\n"
.LC10:
	.string	"  Object %i  -  %f meters\n"
.LC11:
	.string	"Time elapsed: %i seconds (%i hours, %i minutes, %i seconds)\n"
.LC13:
	.string	"Processing time: %f sec.\n"
	.section	.text.startup,"ax",@progbits
	.globl	main
	.type	main, @function
main:
.LFB2027:
	.cfi_startproc
	endbr64
	pushq	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	leaq	.LC0(%rip), %rsi
	leaq	.LC1(%rip), %rdi
	pushq	%r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	pushq	%r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	pushq	%r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	pushq	%rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	xorl	%ebp, %ebp
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	subq	$328, %rsp
	.cfi_def_cfa_offset 384
	movq	%fs:40, %rax
	movq	%rax, 312(%rsp)
	xorl	%eax, %eax
	leaq	212(%rsp), %rbx
	call	fopen@PLT
	movq	%rbx, %rdx
	leaq	.LC2(%rip), %rsi
	movq	%rax, %rdi
	movq	%rax, 24(%rsp)
	xorl	%eax, %eax
	call	__isoc23_fscanf@PLT
	movq	%rbx, %rdi
	call	atoi@PLT
	leaq	.LC3(%rip), %rsi
	movl	$2, %edi
	movl	%eax, %edx
	movl	%eax, %ebx
	xorl	%eax, %eax
	call	__printf_chk@PLT
	movslq	%ebx, %rax
	movq	%rax, 104(%rsp)
	leal	0(,%rbx,8), %eax
	cltq
	movq	%rax, %rdi
	movq	%rax, 8(%rsp)
	call	malloc@PLT
	movq	8(%rsp), %rdi
	movq	%rax, 32(%rsp)
	call	malloc@PLT
	movq	8(%rsp), %rdi
	movq	%rax, 40(%rsp)
	call	malloc@PLT
	movq	8(%rsp), %rdi
	movq	%rax, 48(%rsp)
	call	malloc@PLT
	movq	8(%rsp), %rdi
	movq	%rax, 56(%rsp)
	call	malloc@PLT
	movq	8(%rsp), %rdi
	movq	%rax, 64(%rsp)
	call	malloc@PLT
	movq	8(%rsp), %rdi
	movq	%rax, %r15
	call	malloc@PLT
	movq	8(%rsp), %rdi
	movq	%rax, %r13
	call	malloc@PLT
	movq	8(%rsp), %rdi
	movq	%rax, %r12
	call	malloc@PLT
	movq	8(%rsp), %rdi
	movq	%rax, %r14
	call	malloc@PLT
	movq	8(%rsp), %rdi
	movq	%rax, 72(%rsp)
	call	malloc@PLT
	movq	8(%rsp), %rdi
	movq	%rax, 80(%rsp)
	call	malloc@PLT
	movq	8(%rsp), %rdi
	movq	%rax, 88(%rsp)
	call	malloc@PLT
	leaq	.LC4(%rip), %rsi
	movl	$2, %edi
	movq	%rax, 96(%rsp)
	xorl	%eax, %eax
	call	__printf_chk@PLT
.L9:
	cmpl	%ebp, %ebx
	jle	.L19
	leaq	212(%rsp), %rax
	movq	24(%rsp), %rdi
	leaq	.LC2(%rip), %rsi
	movq	%rax, %rdx
	movq	%rax, 16(%rsp)
	xorl	%eax, %eax
	call	__isoc23_fscanf@PLT
	movq	16(%rsp), %rdi
	call	atof@PLT
	movq	32(%rsp), %rax
	movq	16(%rsp), %rdi
	movsd	%xmm0, (%rax,%rbp,8)
	call	atof@PLT
	movq	16(%rsp), %rdx
	movq	24(%rsp), %rdi
	xorl	%eax, %eax
	leaq	.LC2(%rip), %rsi
	movsd	%xmm0, (%r15,%rbp,8)
	call	__isoc23_fscanf@PLT
	movq	16(%rsp), %rdi
	call	atof@PLT
	movq	40(%rsp), %rax
	movq	16(%rsp), %rdi
	movsd	%xmm0, (%rax,%rbp,8)
	call	atof@PLT
	movq	16(%rsp), %rdx
	movq	24(%rsp), %rdi
	xorl	%eax, %eax
	leaq	.LC2(%rip), %rsi
	movsd	%xmm0, 0(%r13,%rbp,8)
	call	__isoc23_fscanf@PLT
	movq	16(%rsp), %rdi
	call	atof@PLT
	movq	48(%rsp), %rax
	movq	16(%rsp), %rdi
	movsd	%xmm0, (%rax,%rbp,8)
	call	atof@PLT
	movq	16(%rsp), %rdx
	movq	24(%rsp), %rdi
	xorl	%eax, %eax
	leaq	.LC2(%rip), %rsi
	movsd	%xmm0, (%r12,%rbp,8)
	call	__isoc23_fscanf@PLT
	movq	16(%rsp), %rdi
	call	atof@PLT
	movq	56(%rsp), %rax
	movq	16(%rsp), %rdi
	movsd	%xmm0, (%rax,%rbp,8)
	call	atof@PLT
	movq	16(%rsp), %rdx
	movq	24(%rsp), %rdi
	xorl	%eax, %eax
	movsd	%xmm0, (%r14,%rbp,8)
	leaq	.LC2(%rip), %rsi
	call	__isoc23_fscanf@PLT
	movq	16(%rsp), %rdi
	call	atof@PLT
	movq	64(%rsp), %rax
	movsd	%xmm0, (%rax,%rbp,8)
	incq	%rbp
	jmp	.L9
.L19:
	movq	24(%rsp), %rdi
	xorl	%ebp, %ebp
	movabsq	$4294967297, %r12
	call	fclose@PLT
	movq	8(%rsp), %rsi
	leaq	112(%rsp), %rdi
	call	cudaMalloc@PLT
	movq	8(%rsp), %rsi
	leaq	120(%rsp), %rdi
	call	cudaMalloc@PLT
	movq	8(%rsp), %rsi
	leaq	128(%rsp), %rdi
	call	cudaMalloc@PLT
	movq	8(%rsp), %rsi
	leaq	136(%rsp), %rdi
	call	cudaMalloc@PLT
	movq	8(%rsp), %rsi
	leaq	144(%rsp), %rdi
	call	cudaMalloc@PLT
	movq	8(%rsp), %rsi
	leaq	152(%rsp), %rdi
	call	cudaMalloc@PLT
	movq	8(%rsp), %rsi
	leaq	160(%rsp), %rdi
	call	cudaMalloc@PLT
	movq	8(%rsp), %rsi
	leaq	168(%rsp), %rdi
	call	cudaMalloc@PLT
	movq	8(%rsp), %rsi
	leaq	176(%rsp), %rdi
	call	cudaMalloc@PLT
	movq	8(%rsp), %rdx
	movq	32(%rsp), %rsi
	movl	$1, %ecx
	movq	112(%rsp), %rdi
	call	cudaMemcpy@PLT
	movq	8(%rsp), %rdx
	movq	40(%rsp), %rsi
	movl	$1, %ecx
	movq	120(%rsp), %rdi
	call	cudaMemcpy@PLT
	movq	8(%rsp), %rdx
	movq	48(%rsp), %rsi
	movl	$1, %ecx
	movq	128(%rsp), %rdi
	call	cudaMemcpy@PLT
	movq	8(%rsp), %rdx
	movq	56(%rsp), %rsi
	movl	$1, %ecx
	movq	136(%rsp), %rdi
	call	cudaMemcpy@PLT
	movq	8(%rsp), %rdx
	movq	64(%rsp), %rsi
	movl	$1, %ecx
	movq	144(%rsp), %rdi
	call	cudaMemcpy@PLT
	movq	8(%rsp), %rdx
	movq	72(%rsp), %rsi
	movl	$1, %ecx
	movq	152(%rsp), %rdi
	call	cudaMemcpy@PLT
	movq	8(%rsp), %rdx
	movq	80(%rsp), %rsi
	movl	$1, %ecx
	movq	160(%rsp), %rdi
	call	cudaMemcpy@PLT
	movq	8(%rsp), %rdx
	movq	88(%rsp), %rsi
	movl	$1, %ecx
	movq	168(%rsp), %rdi
	call	cudaMemcpy@PLT
	movq	8(%rsp), %rdx
	movq	96(%rsp), %rsi
	movl	$1, %ecx
	movq	176(%rsp), %rdi
	call	cudaMemcpy@PLT
	call	clock@PLT
	movq	%rax, %r14
.L13:
	movl	%ebx, 200(%rsp)
	xorl	%r9d, %r9d
	xorl	%r8d, %r8d
	movq	%r12, %rdi
	movq	%r12, 204(%rsp)
	movl	208(%rsp), %ecx
	movl	$1, %esi
	movq	200(%rsp), %rdx
	call	__cudaPushCallConfiguration@PLT
	testl	%eax, %eax
	jne	.L11
	pushq	%rbx
	.cfi_def_cfa_offset 392
	pushq	184(%rsp)
	.cfi_def_cfa_offset 400
	pushq	184(%rsp)
	.cfi_def_cfa_offset 408
	pushq	184(%rsp)
	.cfi_def_cfa_offset 416
	movq	184(%rsp), %r9
	movq	176(%rsp), %r8
	movq	168(%rsp), %rcx
	movq	160(%rsp), %rdx
	movq	152(%rsp), %rsi
	movq	144(%rsp), %rdi
	call	_Z44__device_stub__Z8asteroidPdS_S_S_S_S_S_S_S_iPdS_S_S_S_S_S_S_S_i
	addq	$32, %rsp
	.cfi_def_cfa_offset 384
.L11:
	movl	%ebp, %eax
	movl	$50, %ecx
	cltd
	idivl	%ecx
	testl	%edx, %edx
	jne	.L12
	movl	$1000, %ecx
	movl	%ebp, %edx
	leaq	.LC5(%rip), %rsi
	xorl	%eax, %eax
	movl	$2, %edi
	call	__printf_chk@PLT
.L12:
	incl	%ebp
	cmpl	$1000, %ebp
	jne	.L13
	call	clock@PLT
	movq	104(%rsp), %rbp
	movq	112(%rsp), %rsi
	movl	$2, %ecx
	movq	32(%rsp), %rdi
	movq	%rax, %r12
	salq	$3, %rbp
	movq	%rbp, %rdx
	call	cudaMemcpy@PLT
	movq	120(%rsp), %rsi
	movq	40(%rsp), %rdi
	movq	%rbp, %rdx
	movl	$2, %ecx
	call	cudaMemcpy@PLT
	movq	128(%rsp), %rsi
	movq	48(%rsp), %rdi
	movq	%rbp, %rdx
	movl	$2, %ecx
	call	cudaMemcpy@PLT
	movq	136(%rsp), %rsi
	movq	56(%rsp), %rdi
	movq	%rbp, %rdx
	movl	$2, %ecx
	call	cudaMemcpy@PLT
	movq	144(%rsp), %rsi
	movq	64(%rsp), %rdi
	movq	%rbp, %rdx
	movl	$2, %ecx
	call	cudaMemcpy@PLT
	movq	152(%rsp), %rsi
	movq	72(%rsp), %rdi
	movq	%rbp, %rdx
	movl	$2, %ecx
	call	cudaMemcpy@PLT
	movq	160(%rsp), %rsi
	movq	80(%rsp), %rdi
	movq	%rbp, %rdx
	movl	$2, %ecx
	call	cudaMemcpy@PLT
	movq	168(%rsp), %rsi
	movq	88(%rsp), %rdi
	movq	%rbp, %rdx
	movl	$2, %ecx
	call	cudaMemcpy@PLT
	movq	176(%rsp), %rsi
	movq	96(%rsp), %rdi
	movq	%rbp, %rdx
	movl	$2, %ecx
	xorl	%ebp, %ebp
	call	cudaMemcpy@PLT
	leaq	.LC6(%rip), %rsi
	leaq	.LC7(%rip), %rdi
	call	fopen@PLT
	leaq	.LC8(%rip), %rdx
	movl	$2, %esi
	movq	%rax, %rdi
	movq	%rax, 8(%rsp)
	xorl	%eax, %eax
	call	__fprintf_chk@PLT
	movq	8(%rsp), %rdi
	leaq	.LC9(%rip), %rdx
	xorl	%eax, %eax
	movl	$2, %esi
	call	__fprintf_chk@PLT
.L14:
	movl	%ebp, %ecx
	cmpl	%ebp, %ebx
	jle	.L20
	movq	32(%rsp), %rax
	movsd	(%r15,%rbp,8), %xmm1
	movl	%ecx, 16(%rsp)
	movsd	0(%r13,%rbp,8), %xmm0
	subsd	(%rax,%rbp,8), %xmm1
	movq	40(%rsp), %rax
	subsd	(%rax,%rbp,8), %xmm0
	incq	%rbp
	mulsd	%xmm1, %xmm1
	mulsd	%xmm0, %xmm0
	addsd	%xmm1, %xmm0
	call	sqrt@PLT
	movl	16(%rsp), %ecx
	movq	8(%rsp), %rdi
	movb	$1, %al
	leaq	.LC10(%rip), %rdx
	movl	$2, %esi
	call	__fprintf_chk@PLT
	jmp	.L14
.L20:
	pushq	%rax
	.cfi_def_cfa_offset 392
	xorl	%r8d, %r8d
	movl	$16, %r9d
	movl	$1000, %ecx
	pushq	$40
	.cfi_def_cfa_offset 400
	movq	24(%rsp), %rdi
	leaq	.LC11(%rip), %rdx
	xorl	%eax, %eax
	movl	$2, %esi
	subq	%r14, %r12
	call	__fprintf_chk@PLT
	popq	%rdx
	.cfi_def_cfa_offset 392
	popq	%rcx
	.cfi_def_cfa_offset 384
	leaq	.LC13(%rip), %rdx
	movq	8(%rsp), %rdi
	movl	$2, %esi
	movb	$1, %al
	cvtsi2sdq	%r12, %xmm0
	divsd	.LC12(%rip), %xmm0
	call	__fprintf_chk@PLT
	movq	8(%rsp), %rdi
	call	fclose@PLT
	movq	112(%rsp), %rdi
	call	cudaFree@PLT
	movq	120(%rsp), %rdi
	call	cudaFree@PLT
	movq	128(%rsp), %rdi
	call	cudaFree@PLT
	movq	136(%rsp), %rdi
	call	cudaFree@PLT
	movq	144(%rsp), %rdi
	call	cudaFree@PLT
	movq	152(%rsp), %rdi
	call	cudaFree@PLT
	movq	160(%rsp), %rdi
	call	cudaFree@PLT
	movq	168(%rsp), %rdi
	call	cudaFree@PLT
	movq	176(%rsp), %rdi
	call	cudaFree@PLT
	movq	312(%rsp), %rax
	subq	%fs:40, %rax
	je	.L16
	call	__stack_chk_fail@PLT
.L16:
	addq	$328, %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
.LFE2027:
	.size	main, .-main
	.section	.rodata.str1.1
.LC14:
	.string	"_Z8asteroidPdS_S_S_S_S_S_S_S_i"
	.section	.text.startup
	.type	_ZL24__sti____cudaRegisterAllv, @function
_ZL24__sti____cudaRegisterAllv:
.LFB2055:
	.cfi_startproc
	endbr64
	pushq	%rax
	.cfi_def_cfa_offset 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	.LC14(%rip), %rdx
	movq	%rax, %rdi
	leaq	_Z8asteroidPdS_S_S_S_S_S_S_S_i(%rip), %rsi
	pushq	$0
	.cfi_def_cfa_offset 40
	movq	%rdx, %rcx
	pushq	$0
	.cfi_def_cfa_offset 48
	movq	%rax, _ZL20__cudaFatCubinHandle(%rip)
	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	%rdx
	.cfi_def_cfa_offset 8
	jmp	atexit@PLT
	.cfi_endproc
.LFE2055:
	.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
.LC12:
	.long	0
	.long	1093567616
	.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 <string.h>
#include <stdlib.h>
#include <math.h>
#include <time.h>
#define MAX_CHAR 100
#define DATAFILE "data.txt"
#define RESULTSFILE "resultsCudal.txt"
#define G 6.674e-11
#define NUM_ITER 1000
#define NUM_ITER_SHOW 50

__global__ void asteroid(double * gpu_x, double * gpu_y, double * gpu_vx, double * gpu_vy, double * gpu_m, double * gpu_x_new, double * gpu_y_new, double * gpu_vx_new, double * gpu_vy_new, int noOfObjects){
        int i = threadIdx.x; // local or register
        // printf("Object %d: %d, %d\n", i, gpu_x[i], gpu_y[i]);

        if (i < noOfObjects){
             gpu_x_new[i]=gpu_x[i];
             gpu_y_new[i]=gpu_y[i];
             gpu_vx_new[i]=gpu_vx[i];
             gpu_vy_new[i]=gpu_vy[i];
         }

         if (i < noOfObjects){
             double ax_total=0;
             double ay_total=0;
             for (int j=0; j < noOfObjects; j++) {
                 if (i==j)
                     continue;

                 double d = sqrt(pow( (gpu_x[i]-gpu_x[j]) ,2.0) + pow( (gpu_y[i]-gpu_y[j]) ,2.0));
                 double f = G*gpu_m[i]*gpu_m[j]/pow(d,2.0);
                 double fx = f*(gpu_x[j]-gpu_x[i])/d;
                 double ax = fx/gpu_m[i];
                 double fy = f*(gpu_y[j]-gpu_y[i])/d;
                 double ay = fy/gpu_m[i];

                 ax_total += ax;
                 ay_total += ay;

             }

             gpu_vx_new[i] += ax_total;
             gpu_vy_new[i] += ay_total;

             gpu_x_new[i] += gpu_vx_new[i];
             gpu_y_new[i] += gpu_vy_new[i];

         }  // noOfObjects
         printf("Object %d: %d, %d\n", i, gpu_x[i], gpu_y[i]);

         if (i < noOfObjects){
             gpu_x[i]=gpu_x_new[i];
             gpu_y[i]=gpu_y_new[i];
             gpu_vx[i]=gpu_vx_new[i];
             gpu_vy[i]=gpu_vy_new[i];
         }
}

int main(){

    clock_t start, end;
    double time_used;
    char  str[MAX_CHAR];
    FILE *file;
    int noOfObjects;
    int i;

    file = fopen( DATAFILE , "r");
    fscanf(file,"%s",str);
    noOfObjects = atoi(str);
    printf("Number of objects: %d\n",noOfObjects);

    const int ARRAY_BYTES = noOfObjects * sizeof(double);

    double *x = (double *) malloc(ARRAY_BYTES);
    double *y = (double *) malloc(ARRAY_BYTES);
    double *vx = (double *) malloc(ARRAY_BYTES);
    double *vy = (double *) malloc(ARRAY_BYTES);
    double *m = (double *) malloc(ARRAY_BYTES);

    double *x0 = (double *) malloc(ARRAY_BYTES);
    double *y0 = (double *) malloc(ARRAY_BYTES);
    double *vx0 = (double *) malloc(ARRAY_BYTES);
    double *vy0 = (double *) malloc(ARRAY_BYTES);

    double *x_new = (double *) malloc(ARRAY_BYTES);
    double *y_new = (double *) malloc(ARRAY_BYTES);
    double *vx_new = (double *) malloc(ARRAY_BYTES);
    double *vy_new = (double *) malloc(ARRAY_BYTES);

    printf("\n");

    // declare GPU memory pointers
    double * gpu_x;
    double * gpu_y;
    double * gpu_vx;
    double * gpu_vy;
    double * gpu_m;
    double * gpu_x_new;
    double * gpu_y_new;
    double * gpu_vx_new;
    double * gpu_vy_new;

    // launch the kernel
    for (i=0; i < noOfObjects; i++) {
        fscanf(file,"%s",str);
        x[i] = atof(str);
        x0[i] = atof(str);
        fscanf(file,"%s",str);
        y[i] = atof(str);
        y0[i] = atof(str);
        fscanf(file,"%s",str);
        vx[i] = atof(str);
        vx0[i] = atof(str);
        fscanf(file,"%s",str);
        vy[i] = atof(str);
        vy0[i] = atof(str);
        fscanf(file,"%s",str);
        m[i] = atof(str);
    }
    fclose(file);

    // allocate GPU memory
    hipMalloc((void**) &gpu_x, ARRAY_BYTES);
    hipMalloc((void**) &gpu_y, ARRAY_BYTES);
    hipMalloc((void**) &gpu_vx, ARRAY_BYTES);
    hipMalloc((void**) &gpu_vy, ARRAY_BYTES);
    hipMalloc((void**) &gpu_m, ARRAY_BYTES);
    hipMalloc((void**) &gpu_x_new, ARRAY_BYTES);
    hipMalloc((void**) &gpu_y_new, ARRAY_BYTES);
    hipMalloc((void**) &gpu_vx_new, ARRAY_BYTES);
    hipMalloc((void**) &gpu_vy_new, ARRAY_BYTES);

    // transfer the array to the GPU
    hipMemcpy(gpu_x, x, ARRAY_BYTES, hipMemcpyHostToDevice);
    hipMemcpy(gpu_y, y, ARRAY_BYTES, hipMemcpyHostToDevice);
    hipMemcpy(gpu_vx, vx, ARRAY_BYTES, hipMemcpyHostToDevice);
    hipMemcpy(gpu_vy, vy, ARRAY_BYTES, hipMemcpyHostToDevice);
    hipMemcpy(gpu_m, m, ARRAY_BYTES, hipMemcpyHostToDevice);
    hipMemcpy(gpu_x_new, x_new, ARRAY_BYTES, hipMemcpyHostToDevice);
    hipMemcpy(gpu_y_new, y_new, ARRAY_BYTES, hipMemcpyHostToDevice);
    hipMemcpy(gpu_vx_new, vx_new, ARRAY_BYTES, hipMemcpyHostToDevice);
    hipMemcpy(gpu_vy_new, vy_new, ARRAY_BYTES, hipMemcpyHostToDevice);

    start=clock();
    for (int niter=0; niter<NUM_ITER; niter++) {

        asteroid<<<1, noOfObjects>>>(gpu_x, gpu_y, gpu_vx, gpu_vy, gpu_m, gpu_x_new, gpu_y_new, gpu_vx_new, gpu_vy_new, noOfObjects);
        //printf("ola k ase \n\n, %d", niter);

        if (niter%NUM_ITER_SHOW == 0)
            printf("Iteration %d/%d\n", niter, NUM_ITER);

    }  // nIter
    end=clock();

    // copy back the result array to the CPU
    hipMemcpy(x, gpu_x, noOfObjects*sizeof(double), hipMemcpyDeviceToHost);
    hipMemcpy(y, gpu_y, noOfObjects*sizeof(double), hipMemcpyDeviceToHost);
    hipMemcpy(vx, gpu_vx, noOfObjects*sizeof(double), hipMemcpyDeviceToHost);
    hipMemcpy(vy, gpu_vy, noOfObjects*sizeof(double), hipMemcpyDeviceToHost);
    hipMemcpy(m, gpu_m, noOfObjects*sizeof(double), hipMemcpyDeviceToHost);
    hipMemcpy(x_new, gpu_x_new, noOfObjects*sizeof(double), hipMemcpyDeviceToHost);
    hipMemcpy(y_new, gpu_y_new, noOfObjects*sizeof(double), hipMemcpyDeviceToHost);
    hipMemcpy(vx_new, gpu_vx_new, noOfObjects*sizeof(double), hipMemcpyDeviceToHost);
    hipMemcpy(vy_new, gpu_vy_new, noOfObjects*sizeof(double), hipMemcpyDeviceToHost);

    file = fopen( RESULTSFILE , "w");
    fprintf(file, "Movement of objects\n");
    fprintf(file, "-------------------\n");
    for (i=0; i<noOfObjects; i++) {
        double mov = sqrt(pow( (x0[i]-x[i]) ,2.0) + pow( (y0[i]-y[i]) ,2.0));
        fprintf(file,"  Object %i  -  %f meters\n", i, mov);
    }
    int hours = NUM_ITER/3600;
    int mins = (NUM_ITER - hours*3600)/60;
    int secs = (NUM_ITER - hours*3600 - mins*60);
    fprintf(file,"Time elapsed: %i seconds (%i hours, %i minutes, %i seconds)\n",NUM_ITER, hours, mins, secs);

    time_used = ((double)(end-start)) / CLOCKS_PER_SEC;
    fprintf(file,"Processing time: %f sec.\n",time_used);
    fclose(file);
    // // copy back the result array to the CPU
    // cudaMemcpy(h_out, d_out, ARRAY_BYTES, cudaMemcpyDeviceToHost);
    // // print out the resulting array
    // for (int i =0; i < ARRAY_SIZE; i++) {
    // printf("%f", h_out[i]);
    // printf(((i % 4) != 3) ? "\t" : "\n");
    // }
    hipFree(gpu_x);
    hipFree(gpu_y);
    hipFree(gpu_vx);
    hipFree(gpu_vy);
    hipFree(gpu_m);

    hipFree(gpu_x_new);
    hipFree(gpu_y_new);
    hipFree(gpu_vx_new);
    hipFree(gpu_vy_new);

}  // main

	.text
	.file	"SimulateAsteroidsParallel.hip"
	.globl	_Z23__device_stub__asteroidPdS_S_S_S_S_S_S_S_i # -- Begin function _Z23__device_stub__asteroidPdS_S_S_S_S_S_S_S_i
	.type	_Z23__device_stub__asteroidPdS_S_S_S_S_S_S_S_i,@function
_Z23__device_stub__asteroidPdS_S_S_S_S_S_S_S_i: # @_Z23__device_stub__asteroidPdS_S_S_S_S_S_S_S_i
	.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	$176, %rsp
	.cfi_def_cfa_offset 224
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r13, -32
	.cfi_offset %r14, -24
	.cfi_offset %r15, -16
	leaq	56(%rsp), %rax
	movq	%rdi, (%rax)
	leaq	48(%rsp), %rdi
	movq	%rsi, (%rdi)
	leaq	40(%rsp), %rsi
	movq	%rdx, (%rsi)
	leaq	32(%rsp), %rdx
	movq	%rcx, (%rdx)
	leaq	24(%rsp), %rcx
	movq	%r8, (%rcx)
	leaq	16(%rsp), %r8
	movq	%r9, (%r8)
	leaq	96(%rsp), %rbx
	movq	%rax, (%rbx)
	movq	%rdi, 8(%rbx)
	movq	%rsi, 16(%rbx)
	movq	%rdx, 24(%rbx)
	movq	%rcx, 32(%rbx)
	movq	%r8, 40(%rbx)
	leaq	224(%rsp), %rax
	movq	%rax, 48(%rbx)
	leaq	232(%rsp), %rax
	movq	%rax, 56(%rbx)
	leaq	240(%rsp), %rax
	movq	%rax, 64(%rbx)
	leaq	248(%rsp), %rax
	movq	%rax, 72(%rbx)
	leaq	80(%rsp), %r14
	leaq	64(%rsp), %r15
	leaq	8(%rsp), %r12
	movq	%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	$_Z8asteroidPdS_S_S_S_S_S_S_S_i, %edi
	movq	%rbx, %r9
	pushq	(%r13)
	.cfi_adjust_cfa_offset 8
	pushq	(%r12)
	.cfi_adjust_cfa_offset 8
	callq	hipLaunchKernel
	addq	$192, %rsp
	.cfi_adjust_cfa_offset -192
	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_end0:
	.size	_Z23__device_stub__asteroidPdS_S_S_S_S_S_S_S_i, .Lfunc_end0-_Z23__device_stub__asteroidPdS_S_S_S_S_S_S_S_i
	.cfi_endproc
                                        # -- End function
	.section	.rodata.cst8,"aM",@progbits,8
	.p2align	3, 0x0                          # -- Begin function main
.LCPI1_0:
	.quad	0x412e848000000000              # double 1.0E+6
	.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	$296, %rsp                      # imm = 0x128
	.cfi_def_cfa_offset 352
	.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	$.L.str, %edi
	movl	$.L.str.1, %esi
	callq	fopen
	movq	%rax, %rbx
	leaq	192(%rsp), %r14
	movl	$.L.str.2, %esi
	movq	%rax, %rdi
	movq	%r14, %rdx
	xorl	%eax, %eax
	callq	__isoc23_fscanf
	movq	%r14, %rdi
	callq	atoi
	movl	%eax, %ebp
	movl	$.L.str.3, %edi
	movl	%eax, %esi
	xorl	%eax, %eax
	callq	printf
	movslq	%ebp, %r14
	movq	%r14, %r15
	shlq	$35, %r15
	sarq	$32, %r15
	movq	%r15, %rdi
	callq	malloc
	movq	%rax, 8(%rsp)                   # 8-byte Spill
	movq	%r15, %rdi
	callq	malloc
	movq	%rax, 72(%rsp)                  # 8-byte Spill
	movq	%r15, %rdi
	callq	malloc
	movq	%rax, 80(%rsp)                  # 8-byte Spill
	movq	%r15, %rdi
	callq	malloc
	movq	%rax, 88(%rsp)                  # 8-byte Spill
	movq	%r15, %rdi
	callq	malloc
	movq	%rax, 96(%rsp)                  # 8-byte Spill
	movq	%r15, %rdi
	callq	malloc
	movq	%rax, %r12
	movq	%r15, %rdi
	callq	malloc
	movq	%rax, %r13
	movq	%r15, %rdi
	callq	malloc
	movq	%rax, 128(%rsp)                 # 8-byte Spill
	movq	%r15, %rdi
	callq	malloc
	movq	%rax, 136(%rsp)                 # 8-byte Spill
	movq	%r15, %rdi
	callq	malloc
	movq	%rax, 144(%rsp)                 # 8-byte Spill
	movq	%r15, 64(%rsp)                  # 8-byte Spill
	movq	%r15, %rdi
	callq	malloc
	movq	%rax, 152(%rsp)                 # 8-byte Spill
	movl	$10, %edi
	callq	putchar@PLT
	movl	%r14d, %r15d
	movq	%r14, 160(%rsp)                 # 8-byte Spill
	testl	%r14d, %r14d
	jle	.LBB1_3
# %bb.1:                                # %.lr.ph.preheader
	leaq	192(%rsp), %rbp
	xorl	%r14d, %r14d
.LBB1_2:                                # %.lr.ph
                                        # =>This Inner Loop Header: Depth=1
	movl	$.L.str.2, %esi
	movq	%rbx, %rdi
	movq	%rbp, %rdx
	xorl	%eax, %eax
	callq	__isoc23_fscanf
	movq	%rbp, %rdi
	callq	atof
	movq	8(%rsp), %rax                   # 8-byte Reload
	movsd	%xmm0, (%rax,%r14,8)
	movq	%rbp, %rdi
	callq	atof
	movsd	%xmm0, (%r12,%r14,8)
	movl	$.L.str.2, %esi
	movq	%rbx, %rdi
	movq	%rbp, %rdx
	xorl	%eax, %eax
	callq	__isoc23_fscanf
	movq	%rbp, %rdi
	callq	atof
	movq	72(%rsp), %rax                  # 8-byte Reload
	movsd	%xmm0, (%rax,%r14,8)
	movq	%rbp, %rdi
	callq	atof
	movsd	%xmm0, (%r13,%r14,8)
	movl	$.L.str.2, %esi
	movq	%rbx, %rdi
	movq	%rbp, %rdx
	xorl	%eax, %eax
	callq	__isoc23_fscanf
	movq	%rbp, %rdi
	callq	atof
	movq	80(%rsp), %rax                  # 8-byte Reload
	movsd	%xmm0, (%rax,%r14,8)
	movl	$.L.str.2, %esi
	movq	%rbx, %rdi
	movq	%rbp, %rdx
	xorl	%eax, %eax
	callq	__isoc23_fscanf
	movq	%rbp, %rdi
	callq	atof
	movq	88(%rsp), %rax                  # 8-byte Reload
	movsd	%xmm0, (%rax,%r14,8)
	movl	$.L.str.2, %esi
	movq	%rbx, %rdi
	movq	%rbp, %rdx
	xorl	%eax, %eax
	callq	__isoc23_fscanf
	movq	%rbp, %rdi
	callq	atof
	movq	96(%rsp), %rax                  # 8-byte Reload
	movsd	%xmm0, (%rax,%r14,8)
	incq	%r14
	cmpq	%r14, %r15
	jne	.LBB1_2
.LBB1_3:                                # %._crit_edge
	movq	%r13, 176(%rsp)                 # 8-byte Spill
	movq	%r12, 184(%rsp)                 # 8-byte Spill
	shlq	$3, 160(%rsp)                   # 8-byte Folded Spill
	movabsq	$4294967296, %rbp               # imm = 0x100000000
	movq	%rbx, %rdi
	callq	fclose
	leaq	120(%rsp), %rbx
	movq	%rbx, %rdi
	movq	64(%rsp), %r14                  # 8-byte Reload
	movq	%r14, %rsi
	callq	hipMalloc
	leaq	56(%rsp), %rdi
	movq	%r14, %rsi
	callq	hipMalloc
	leaq	48(%rsp), %rdi
	movq	%r14, %rsi
	callq	hipMalloc
	leaq	40(%rsp), %rdi
	movq	%r14, %rsi
	callq	hipMalloc
	leaq	32(%rsp), %rdi
	movq	%r14, %rsi
	callq	hipMalloc
	leaq	24(%rsp), %rdi
	movq	%r14, %rsi
	callq	hipMalloc
	leaq	16(%rsp), %rdi
	movq	%r14, %rsi
	callq	hipMalloc
	leaq	112(%rsp), %r13
	movq	%r13, %rdi
	movq	%r14, %rsi
	callq	hipMalloc
	leaq	104(%rsp), %r12
	movq	%r12, %rdi
	movq	%r14, %rsi
	callq	hipMalloc
	movq	(%rbx), %rdi
	movq	8(%rsp), %rsi                   # 8-byte Reload
	movq	%r14, %rdx
	movl	$1, %ecx
	callq	hipMemcpy
	leaq	56(%rsp), %rax
	movq	(%rax), %rdi
	movq	72(%rsp), %rsi                  # 8-byte Reload
	movq	%r14, %rdx
	movl	$1, %ecx
	callq	hipMemcpy
	leaq	48(%rsp), %rax
	movq	(%rax), %rdi
	movq	80(%rsp), %rsi                  # 8-byte Reload
	movq	%r14, %rdx
	movl	$1, %ecx
	callq	hipMemcpy
	leaq	40(%rsp), %rax
	movq	(%rax), %rdi
	movq	88(%rsp), %rsi                  # 8-byte Reload
	movq	%r14, %rdx
	movl	$1, %ecx
	callq	hipMemcpy
	leaq	32(%rsp), %rax
	movq	(%rax), %rdi
	movq	96(%rsp), %rsi                  # 8-byte Reload
	movq	%r14, %rdx
	movl	$1, %ecx
	callq	hipMemcpy
	leaq	24(%rsp), %rax
	movq	(%rax), %rdi
	movq	128(%rsp), %rsi                 # 8-byte Reload
	movq	%r14, %rdx
	movl	$1, %ecx
	callq	hipMemcpy
	leaq	16(%rsp), %rax
	movq	(%rax), %rdi
	movq	136(%rsp), %rsi                 # 8-byte Reload
	movq	%r14, %rdx
	movl	$1, %ecx
	callq	hipMemcpy
	movq	(%r13), %rdi
	movq	144(%rsp), %rsi                 # 8-byte Reload
	movq	%r14, %rdx
	movl	$1, %ecx
	callq	hipMemcpy
	movq	(%r12), %rdi
	movq	152(%rsp), %rsi                 # 8-byte Reload
	movq	%r14, %rdx
	movl	$1, %ecx
	callq	hipMemcpy
	callq	clock
	movq	%rax, 64(%rsp)                  # 8-byte Spill
	movq	%r15, %r12
	movq	%r15, %rbx
	btsq	$32, %rbx
	movl	$65535, %r14d                   # imm = 0xFFFF
	incq	%rbp
	xorl	%r13d, %r13d
	movq	72(%rsp), %r15                  # 8-byte Reload
.LBB1_4:                                # =>This Inner Loop Header: Depth=1
	movq	%rbp, %rdi
	movl	$1, %esi
	movq	%rbx, %rdx
	movl	$1, %ecx
	xorl	%r8d, %r8d
	xorl	%r9d, %r9d
	callq	__hipPushCallConfiguration
	testl	%eax, %eax
	jne	.LBB1_6
# %bb.5:                                #   in Loop: Header=BB1_4 Depth=1
	movq	120(%rsp), %rdi
	movq	56(%rsp), %rsi
	movq	48(%rsp), %rdx
	movq	40(%rsp), %rcx
	movq	32(%rsp), %r8
	movq	24(%rsp), %r9
	pushq	%r12
	.cfi_adjust_cfa_offset 8
	pushq	112(%rsp)
	.cfi_adjust_cfa_offset 8
	pushq	128(%rsp)
	.cfi_adjust_cfa_offset 8
	pushq	40(%rsp)
	.cfi_adjust_cfa_offset 8
	callq	_Z23__device_stub__asteroidPdS_S_S_S_S_S_S_S_i
	addq	$32, %rsp
	.cfi_adjust_cfa_offset -32
.LBB1_6:                                #   in Loop: Header=BB1_4 Depth=1
	movl	%r13d, %eax
	andl	%r14d, %eax
	shrl	%eax
	imull	$5243, %eax, %eax               # imm = 0x147B
	shrl	$17, %eax
	imull	$-50, %eax, %eax
	andl	%r14d, %eax
	addw	%r13w, %ax
	jne	.LBB1_8
# %bb.7:                                #   in Loop: Header=BB1_4 Depth=1
	movl	$.L.str.5, %edi
	movl	%r13d, %esi
	movl	$1000, %edx                     # imm = 0x3E8
	xorl	%eax, %eax
	callq	printf
.LBB1_8:                                #   in Loop: Header=BB1_4 Depth=1
	incl	%r13d
	cmpl	$1000, %r13d                    # imm = 0x3E8
	jne	.LBB1_4
# %bb.9:
	callq	clock
	movq	%rax, 168(%rsp)                 # 8-byte Spill
	movq	120(%rsp), %rsi
	movq	8(%rsp), %rdi                   # 8-byte Reload
	movq	160(%rsp), %rbx                 # 8-byte Reload
	movq	%rbx, %rdx
	movl	$2, %ecx
	callq	hipMemcpy
	movq	56(%rsp), %rsi
	movq	%r15, %rdi
	movq	%rbx, %rdx
	movl	$2, %ecx
	callq	hipMemcpy
	movq	48(%rsp), %rsi
	movq	80(%rsp), %rdi                  # 8-byte Reload
	movq	%rbx, %rdx
	movl	$2, %ecx
	callq	hipMemcpy
	movq	40(%rsp), %rsi
	movq	88(%rsp), %rdi                  # 8-byte Reload
	movq	%rbx, %rdx
	movl	$2, %ecx
	callq	hipMemcpy
	movq	32(%rsp), %rsi
	movq	96(%rsp), %rdi                  # 8-byte Reload
	movq	%rbx, %rdx
	movl	$2, %ecx
	callq	hipMemcpy
	movq	24(%rsp), %rsi
	movq	128(%rsp), %rdi                 # 8-byte Reload
	movq	%rbx, %rdx
	movl	$2, %ecx
	callq	hipMemcpy
	movq	16(%rsp), %rsi
	movq	136(%rsp), %rdi                 # 8-byte Reload
	movq	%rbx, %rdx
	movl	$2, %ecx
	callq	hipMemcpy
	movq	112(%rsp), %rsi
	movq	144(%rsp), %rdi                 # 8-byte Reload
	movq	%rbx, %rdx
	movl	$2, %ecx
	callq	hipMemcpy
	movq	104(%rsp), %rsi
	movq	152(%rsp), %rdi                 # 8-byte Reload
	movq	%rbx, %rdx
	movl	$2, %ecx
	callq	hipMemcpy
	movl	$.L.str.6, %edi
	movl	$.L.str.7, %esi
	callq	fopen
	movq	%rax, %rbp
	movl	$.L.str.8, %edi
	movl	$20, %esi
	movl	$1, %edx
	movq	%rax, %rcx
	callq	fwrite@PLT
	movl	$.L.str.9, %edi
	movl	$20, %esi
	movl	$1, %edx
	movq	%rbp, %rcx
	callq	fwrite@PLT
	testl	%r12d, %r12d
	movq	184(%rsp), %rbx                 # 8-byte Reload
	movq	176(%rsp), %r14                 # 8-byte Reload
	jle	.LBB1_12
# %bb.10:                               # %.lr.ph134.preheader
	xorl	%r13d, %r13d
.LBB1_11:                               # %.lr.ph134
                                        # =>This Inner Loop Header: Depth=1
	movsd	(%rbx,%r13,8), %xmm0            # xmm0 = mem[0],zero
	movq	8(%rsp), %rax                   # 8-byte Reload
	subsd	(%rax,%r13,8), %xmm0
	movsd	(%r14,%r13,8), %xmm1            # xmm1 = mem[0],zero
	subsd	(%r15,%r13,8), %xmm1
	mulsd	%xmm0, %xmm0
	mulsd	%xmm1, %xmm1
	addsd	%xmm0, %xmm1
	xorps	%xmm0, %xmm0
	sqrtsd	%xmm1, %xmm0
	movl	$.L.str.10, %esi
	movq	%rbp, %rdi
	movl	%r13d, %edx
	movb	$1, %al
	callq	fprintf
	incq	%r13
	cmpq	%r13, %r12
	jne	.LBB1_11
.LBB1_12:                               # %._crit_edge135
	movl	$.L.str.11, %esi
	movq	%rbp, %rdi
	movl	$1000, %edx                     # imm = 0x3E8
	xorl	%ecx, %ecx
	movl	$16, %r8d
	movl	$40, %r9d
	xorl	%eax, %eax
	callq	fprintf
	movq	168(%rsp), %rax                 # 8-byte Reload
	subq	64(%rsp), %rax                  # 8-byte Folded Reload
	xorps	%xmm0, %xmm0
	cvtsi2sd	%rax, %xmm0
	divsd	.LCPI1_0(%rip), %xmm0
	movl	$.L.str.12, %esi
	movq	%rbp, %rdi
	movb	$1, %al
	callq	fprintf
	movq	%rbp, %rdi
	callq	fclose
	movq	120(%rsp), %rdi
	callq	hipFree
	movq	56(%rsp), %rdi
	callq	hipFree
	movq	48(%rsp), %rdi
	callq	hipFree
	movq	40(%rsp), %rdi
	callq	hipFree
	movq	32(%rsp), %rdi
	callq	hipFree
	movq	24(%rsp), %rdi
	callq	hipFree
	movq	16(%rsp), %rdi
	callq	hipFree
	movq	112(%rsp), %rdi
	callq	hipFree
	movq	104(%rsp), %rdi
	callq	hipFree
	xorl	%eax, %eax
	addq	$296, %rsp                      # imm = 0x128
	.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_end1:
	.size	main, .Lfunc_end1-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:
	subq	$40, %rsp
	.cfi_def_cfa_offset 48
	movq	__hip_gpubin_handle(%rip), %rdi
	testq	%rdi, %rdi
	jne	.LBB2_2
# %bb.1:
	movl	$__hip_fatbin_wrapper, %edi
	callq	__hipRegisterFatBinary
	movq	%rax, %rdi
	movq	%rax, __hip_gpubin_handle(%rip)
.LBB2_2:
	xorps	%xmm0, %xmm0
	movups	%xmm0, 16(%rsp)
	movups	%xmm0, (%rsp)
	movl	$_Z8asteroidPdS_S_S_S_S_S_S_S_i, %esi
	movl	$.L__unnamed_1, %edx
	movl	$.L__unnamed_1, %ecx
	movl	$-1, %r8d
	xorl	%r9d, %r9d
	callq	__hipRegisterFunction
	movl	$__hip_module_dtor, %edi
	addq	$40, %rsp
	.cfi_def_cfa_offset 8
	jmp	atexit                          # TAILCALL
.Lfunc_end2:
	.size	__hip_module_ctor, .Lfunc_end2-__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	.LBB3_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
.LBB3_2:
	retq
.Lfunc_end3:
	.size	__hip_module_dtor, .Lfunc_end3-__hip_module_dtor
	.cfi_endproc
                                        # -- End function
	.type	_Z8asteroidPdS_S_S_S_S_S_S_S_i,@object # @_Z8asteroidPdS_S_S_S_S_S_S_S_i
	.section	.rodata,"a",@progbits
	.globl	_Z8asteroidPdS_S_S_S_S_S_S_S_i
	.p2align	3, 0x0
_Z8asteroidPdS_S_S_S_S_S_S_S_i:
	.quad	_Z23__device_stub__asteroidPdS_S_S_S_S_S_S_S_i
	.size	_Z8asteroidPdS_S_S_S_S_S_S_S_i, 8

	.type	.L.str,@object                  # @.str
	.section	.rodata.str1.1,"aMS",@progbits,1
.L.str:
	.asciz	"data.txt"
	.size	.L.str, 9

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

	.type	.L.str.2,@object                # @.str.2
.L.str.2:
	.asciz	"%s"
	.size	.L.str.2, 3

	.type	.L.str.3,@object                # @.str.3
.L.str.3:
	.asciz	"Number of objects: %d\n"
	.size	.L.str.3, 23

	.type	.L.str.5,@object                # @.str.5
.L.str.5:
	.asciz	"Iteration %d/%d\n"
	.size	.L.str.5, 17

	.type	.L.str.6,@object                # @.str.6
.L.str.6:
	.asciz	"resultsCudal.txt"
	.size	.L.str.6, 17

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

	.type	.L.str.8,@object                # @.str.8
.L.str.8:
	.asciz	"Movement of objects\n"
	.size	.L.str.8, 21

	.type	.L.str.9,@object                # @.str.9
.L.str.9:
	.asciz	"-------------------\n"
	.size	.L.str.9, 21

	.type	.L.str.10,@object               # @.str.10
.L.str.10:
	.asciz	"  Object %i  -  %f meters\n"
	.size	.L.str.10, 27

	.type	.L.str.11,@object               # @.str.11
.L.str.11:
	.asciz	"Time elapsed: %i seconds (%i hours, %i minutes, %i seconds)\n"
	.size	.L.str.11, 61

	.type	.L.str.12,@object               # @.str.12
.L.str.12:
	.asciz	"Processing time: %f sec.\n"
	.size	.L.str.12, 26

	.type	.L__unnamed_1,@object           # @0
.L__unnamed_1:
	.asciz	"_Z8asteroidPdS_S_S_S_S_S_S_S_i"
	.size	.L__unnamed_1, 31

	.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 _Z23__device_stub__asteroidPdS_S_S_S_S_S_S_S_i
	.addrsig_sym __hip_module_ctor
	.addrsig_sym __hip_module_dtor
	.addrsig_sym _Z8asteroidPdS_S_S_S_S_S_S_S_i
	.addrsig_sym __hip_fatbin
	.addrsig_sym __hip_fatbin_wrapper
	.addrsig_sym __hip_cuid_

	.text
	.amdgcn_target "amdgcn-amd-amdhsa--gfx1100"
	.protected	_Z8asteroidPdS_S_S_S_S_S_S_S_i ; -- Begin function _Z8asteroidPdS_S_S_S_S_S_S_S_i
	.globl	_Z8asteroidPdS_S_S_S_S_S_S_S_i
	.p2align	8
	.type	_Z8asteroidPdS_S_S_S_S_S_S_S_i,@function
_Z8asteroidPdS_S_S_S_S_S_S_S_i:         ; @_Z8asteroidPdS_S_S_S_S_S_S_S_i
; %bb.0:
	s_clause 0x2
	s_load_b32 s33, s[0:1], 0x48
	s_load_b64 s[28:29], s[0:1], 0x40
	s_load_b512 s[12:27], s[0:1], 0x0
	v_dual_mov_b32 v1, 0 :: v_dual_lshlrev_b32 v42, 3, v0
	s_waitcnt lgkmcnt(0)
	v_cmp_gt_i32_e64 s2, s33, v0
	s_delay_alu instid0(VALU_DEP_1)
	s_and_saveexec_b32 s11, s2
	s_cbranch_execz .LBB0_6
; %bb.1:                                ; %.lr.ph
	global_load_b64 v[2:3], v42, s[12:13]
	v_add_co_u32 v9, s3, s12, v42
	s_delay_alu instid0(VALU_DEP_1)
	v_add_co_ci_u32_e64 v10, null, s13, 0, s3
	v_mov_b32_e32 v17, 0
	v_dual_mov_b32 v18, 0 :: v_dual_mov_b32 v33, v0
	s_mov_b32 s30, 0x55555555
	s_mov_b32 s34, 0x968915a9
	s_mov_b32 s36, 0x4222de17
	s_delay_alu instid0(VALU_DEP_1)
	v_dual_mov_b32 v20, v18 :: v_dual_mov_b32 v19, v17
	s_mov_b32 s38, 0x3abe935a
	s_mov_b32 s40, 0x47e6c9c2
	s_mov_b32 s42, 0xcfa74449
	s_mov_b32 s44, 0x71bf3c30
	s_mov_b32 s46, 0x1c7792ce
	s_mov_b32 s48, 0x924920da
	s_mov_b32 s50, 0x9999999c
	s_mov_b32 s52, 0xfefa39ef
	s_mov_b32 s54, 0x3b39803f
	s_mov_b32 s58, 0xd5df274d
	s_mov_b32 s60, 0x652b82fe
	s_mov_b32 s64, 0xfca7ab0c
	s_mov_b32 s66, 0x6a5dcb37
	s_mov_b32 s68, 0x623fde64
	s_mov_b32 s70, 0x7c89e6b0
	s_mov_b32 s72, 0x14761f6e
	s_mov_b32 s74, 0x1852b7b0
	s_mov_b32 s76, 0x11122322
	s_mov_b32 s78, 0x555502a1
	s_mov_b32 s80, 0x55555511
	s_mov_b32 s82, 11
	s_mov_b32 s84, 0xf4deae16
	s_mov_b32 s31, 0x3fe55555
	s_mov_b32 s35, 0x3fba6564
	s_mov_b32 s37, 0x3fbdee67
	s_mov_b32 s39, 0x3fbe25e4
	s_mov_b32 s41, 0x3fc110ef
	s_mov_b32 s43, 0x3fc3b13b
	s_mov_b32 s45, 0x3fc745d1
	s_mov_b32 s47, 0x3fcc71c7
	s_mov_b32 s49, 0x3fd24924
	s_mov_b32 s51, 0x3fd99999
	s_mov_b32 s53, 0x3fe62e42
	s_mov_b32 s55, 0x3c7abc9e
	s_mov_b32 s57, 0xbfe55555
	s_mov_b32 s59, 0x3c8543b0
	s_mov_b32 s61, 0x3ff71547
	s_mov_b32 s63, 0xbfe62e42
	s_mov_b32 s65, 0x3e928af3
	s_mov_b32 s67, 0x3e5ade15
	s_mov_b32 s69, 0x3ec71dee
	s_mov_b32 s71, 0x3efa0199
	s_mov_b32 s73, 0x3f2a01a0
	s_mov_b32 s75, 0x3f56c16c
	s_mov_b32 s77, 0x3f811111
	s_mov_b32 s79, 0x3fa55555
	s_mov_b32 s81, 0x3fc55555
	s_mov_b32 s83, 0x3fe00000
	s_mov_b32 s85, 0x3dd25868
	s_mov_b32 s87, 0xbc7abc9e
	s_mov_b64 s[88:89], s[14:15]
	s_mov_b64 s[90:91], s[12:13]
	s_waitcnt vmcnt(0)
	global_store_b64 v42, v[2:3], s[22:23]
	global_load_b64 v[2:3], v42, s[14:15]
	s_waitcnt vmcnt(0)
	global_store_b64 v42, v[2:3], s[24:25]
	global_load_b64 v[2:3], v42, s[16:17]
	s_waitcnt vmcnt(0)
	global_store_b64 v42, v[2:3], s[26:27]
	global_load_b64 v[21:22], v42, s[18:19]
	v_add_co_u32 v3, s3, s22, v42
	s_delay_alu instid0(VALU_DEP_1) | instskip(SKIP_1) | instid1(VALU_DEP_1)
	v_add_co_ci_u32_e64 v4, null, s23, 0, s3
	v_add_co_u32 v13, s3, s14, v42
	v_add_co_ci_u32_e64 v14, null, s15, 0, s3
	v_add_co_u32 v5, s3, s24, v42
	s_delay_alu instid0(VALU_DEP_1) | instskip(SKIP_1) | instid1(VALU_DEP_1)
	v_add_co_ci_u32_e64 v6, null, s25, 0, s3
	v_add_co_u32 v11, s3, s26, v42
	v_add_co_ci_u32_e64 v12, null, s27, 0, s3
	v_add_co_u32 v7, s3, s28, v42
	s_delay_alu instid0(VALU_DEP_1) | instskip(SKIP_1) | instid1(VALU_DEP_1)
	v_add_co_ci_u32_e64 v8, null, s29, 0, s3
	v_add_co_u32 v15, s3, s20, v42
	v_add_co_ci_u32_e64 v16, null, s21, 0, s3
	s_waitcnt vmcnt(0)
	global_store_b64 v42, v[21:22], s[28:29]
.LBB0_2:                                ; =>This Inner Loop Header: Depth=1
	s_mov_b32 s92, exec_lo
	v_cmpx_ne_u32_e32 0, v33
	s_cbranch_execz .LBB0_4
; %bb.3:                                ;   in Loop: Header=BB0_2 Depth=1
	global_load_b64 v[21:22], v[9:10], off
	global_load_b64 v[23:24], v1, s[90:91]
	global_load_b64 v[25:26], v[13:14], off
	global_load_b64 v[27:28], v1, s[88:89]
	s_mov_b32 s56, s30
	s_mov_b32 s62, s52
	s_mov_b32 s86, s54
	global_load_b64 v[29:30], v1, s[20:21]
	s_waitcnt vmcnt(3)
	v_add_f64 v[31:32], v[21:22], -v[23:24]
	v_add_f64 v[21:22], v[23:24], -v[21:22]
	s_waitcnt vmcnt(1)
	v_add_f64 v[36:37], v[25:26], -v[27:28]
	v_add_f64 v[25:26], v[27:28], -v[25:26]
	s_delay_alu instid0(VALU_DEP_4) | instskip(NEXT) | instid1(VALU_DEP_3)
	v_frexp_mant_f64_e64 v[34:35], |v[31:32]|
	v_frexp_mant_f64_e64 v[40:41], |v[36:37]|
	s_delay_alu instid0(VALU_DEP_2) | instskip(NEXT) | instid1(VALU_DEP_2)
	v_cmp_gt_f64_e32 vcc_lo, s[30:31], v[34:35]
	v_cmp_gt_f64_e64 s3, s[30:31], v[40:41]
	v_cndmask_b32_e64 v2, 0, 1, vcc_lo
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_3)
	v_ldexp_f64 v[34:35], v[34:35], v2
	v_cndmask_b32_e64 v2, 0, 1, s3
	s_delay_alu instid0(VALU_DEP_1) | instskip(SKIP_1) | instid1(VALU_DEP_4)
	v_ldexp_f64 v[40:41], v[40:41], v2
	v_frexp_exp_i32_f64_e32 v2, v[31:32]
	v_add_f64 v[38:39], v[34:35], 1.0
	v_add_f64 v[53:54], v[34:35], -1.0
	s_delay_alu instid0(VALU_DEP_4) | instskip(SKIP_4) | instid1(VALU_DEP_1)
	v_add_f64 v[47:48], v[40:41], 1.0
	v_add_f64 v[59:60], v[40:41], -1.0
	v_subrev_co_ci_u32_e32 v2, vcc_lo, 0, v2, vcc_lo
	v_rcp_f64_e32 v[43:44], v[38:39]
	v_add_f64 v[55:56], v[38:39], -1.0
	v_add_f64 v[34:35], v[34:35], -v[55:56]
	s_waitcnt_depctr 0xfff
	v_fma_f64 v[45:46], -v[38:39], v[43:44], 1.0
	s_delay_alu instid0(VALU_DEP_1) | instskip(SKIP_1) | instid1(VALU_DEP_1)
	v_fma_f64 v[43:44], v[45:46], v[43:44], v[43:44]
	v_rcp_f64_e32 v[45:46], v[47:48]
	v_fma_f64 v[49:50], -v[38:39], v[43:44], 1.0
	s_waitcnt_depctr 0xfff
	v_fma_f64 v[51:52], -v[47:48], v[45:46], 1.0
	v_fma_f64 v[43:44], v[49:50], v[43:44], v[43:44]
	s_delay_alu instid0(VALU_DEP_2) | instskip(NEXT) | instid1(VALU_DEP_2)
	v_fma_f64 v[45:46], v[51:52], v[45:46], v[45:46]
	v_mul_f64 v[49:50], v[53:54], v[43:44]
	s_delay_alu instid0(VALU_DEP_2) | instskip(NEXT) | instid1(VALU_DEP_2)
	v_fma_f64 v[51:52], -v[47:48], v[45:46], 1.0
	v_mul_f64 v[57:58], v[38:39], v[49:50]
	s_delay_alu instid0(VALU_DEP_2) | instskip(NEXT) | instid1(VALU_DEP_2)
	v_fma_f64 v[45:46], v[51:52], v[45:46], v[45:46]
	v_fma_f64 v[38:39], v[49:50], v[38:39], -v[57:58]
	s_delay_alu instid0(VALU_DEP_2) | instskip(NEXT) | instid1(VALU_DEP_2)
	v_mul_f64 v[51:52], v[59:60], v[45:46]
	v_fma_f64 v[34:35], v[49:50], v[34:35], v[38:39]
	v_add_f64 v[38:39], v[47:48], -1.0
	s_delay_alu instid0(VALU_DEP_3) | instskip(NEXT) | instid1(VALU_DEP_3)
	v_mul_f64 v[55:56], v[47:48], v[51:52]
	v_add_f64 v[61:62], v[57:58], v[34:35]
	s_delay_alu instid0(VALU_DEP_3) | instskip(NEXT) | instid1(VALU_DEP_3)
	v_add_f64 v[38:39], v[40:41], -v[38:39]
	v_fma_f64 v[40:41], v[51:52], v[47:48], -v[55:56]
	s_delay_alu instid0(VALU_DEP_3) | instskip(NEXT) | instid1(VALU_DEP_2)
	v_add_f64 v[47:48], v[53:54], -v[61:62]
	v_fma_f64 v[38:39], v[51:52], v[38:39], v[40:41]
	v_add_f64 v[40:41], v[61:62], -v[57:58]
	s_delay_alu instid0(VALU_DEP_3) | instskip(NEXT) | instid1(VALU_DEP_3)
	v_add_f64 v[53:54], v[53:54], -v[47:48]
	v_add_f64 v[57:58], v[55:56], v[38:39]
	s_delay_alu instid0(VALU_DEP_3) | instskip(NEXT) | instid1(VALU_DEP_3)
	v_add_f64 v[34:35], v[40:41], -v[34:35]
	v_add_f64 v[40:41], v[53:54], -v[61:62]
	s_delay_alu instid0(VALU_DEP_3) | instskip(NEXT) | instid1(VALU_DEP_2)
	v_add_f64 v[53:54], v[59:60], -v[57:58]
	v_add_f64 v[34:35], v[34:35], v[40:41]
	v_add_f64 v[40:41], v[57:58], -v[55:56]
	s_delay_alu instid0(VALU_DEP_3) | instskip(NEXT) | instid1(VALU_DEP_3)
	v_add_f64 v[55:56], v[59:60], -v[53:54]
	v_add_f64 v[34:35], v[47:48], v[34:35]
	s_delay_alu instid0(VALU_DEP_3) | instskip(NEXT) | instid1(VALU_DEP_3)
	v_add_f64 v[38:39], v[40:41], -v[38:39]
	v_add_f64 v[40:41], v[55:56], -v[57:58]
	s_delay_alu instid0(VALU_DEP_3) | instskip(NEXT) | instid1(VALU_DEP_2)
	v_mul_f64 v[34:35], v[43:44], v[34:35]
	v_add_f64 v[38:39], v[38:39], v[40:41]
	s_delay_alu instid0(VALU_DEP_2) | instskip(NEXT) | instid1(VALU_DEP_2)
	v_add_f64 v[40:41], v[49:50], v[34:35]
	v_add_f64 v[38:39], v[53:54], v[38:39]
	s_delay_alu instid0(VALU_DEP_2) | instskip(NEXT) | instid1(VALU_DEP_2)
	v_add_f64 v[43:44], v[40:41], -v[49:50]
	v_mul_f64 v[38:39], v[45:46], v[38:39]
	v_mul_f64 v[45:46], v[40:41], v[40:41]
	s_delay_alu instid0(VALU_DEP_3) | instskip(NEXT) | instid1(VALU_DEP_3)
	v_add_f64 v[34:35], v[34:35], -v[43:44]
	v_add_f64 v[43:44], v[51:52], v[38:39]
	s_delay_alu instid0(VALU_DEP_3) | instskip(NEXT) | instid1(VALU_DEP_3)
	v_fma_f64 v[47:48], v[40:41], v[40:41], -v[45:46]
	v_add_f64 v[49:50], v[34:35], v[34:35]
	s_delay_alu instid0(VALU_DEP_3) | instskip(NEXT) | instid1(VALU_DEP_2)
	v_add_f64 v[51:52], v[43:44], -v[51:52]
	v_fma_f64 v[47:48], v[40:41], v[49:50], v[47:48]
	v_mul_f64 v[49:50], v[43:44], v[43:44]
	s_delay_alu instid0(VALU_DEP_3) | instskip(NEXT) | instid1(VALU_DEP_3)
	v_add_f64 v[38:39], v[38:39], -v[51:52]
	v_add_f64 v[51:52], v[45:46], v[47:48]
	s_delay_alu instid0(VALU_DEP_3) | instskip(NEXT) | instid1(VALU_DEP_3)
	v_fma_f64 v[53:54], v[43:44], v[43:44], -v[49:50]
	v_add_f64 v[55:56], v[38:39], v[38:39]
	s_delay_alu instid0(VALU_DEP_3) | instskip(SKIP_2) | instid1(VALU_DEP_4)
	v_fma_f64 v[57:58], v[51:52], s[36:37], s[34:35]
	v_add_f64 v[45:46], v[51:52], -v[45:46]
	v_mul_f64 v[67:68], v[40:41], v[51:52]
	v_fma_f64 v[53:54], v[43:44], v[55:56], v[53:54]
	s_delay_alu instid0(VALU_DEP_4) | instskip(NEXT) | instid1(VALU_DEP_4)
	v_fma_f64 v[55:56], v[51:52], v[57:58], s[38:39]
	v_add_f64 v[45:46], v[47:48], -v[45:46]
	s_delay_alu instid0(VALU_DEP_3) | instskip(NEXT) | instid1(VALU_DEP_3)
	v_add_f64 v[57:58], v[49:50], v[53:54]
	v_fma_f64 v[55:56], v[51:52], v[55:56], s[40:41]
	s_delay_alu instid0(VALU_DEP_2) | instskip(SKIP_1) | instid1(VALU_DEP_3)
	v_fma_f64 v[59:60], v[57:58], s[36:37], s[34:35]
	v_add_f64 v[49:50], v[57:58], -v[49:50]
	v_fma_f64 v[55:56], v[51:52], v[55:56], s[42:43]
	s_delay_alu instid0(VALU_DEP_3) | instskip(NEXT) | instid1(VALU_DEP_3)
	v_fma_f64 v[59:60], v[57:58], v[59:60], s[38:39]
	v_add_f64 v[49:50], v[53:54], -v[49:50]
	s_delay_alu instid0(VALU_DEP_3) | instskip(NEXT) | instid1(VALU_DEP_3)
	v_fma_f64 v[55:56], v[51:52], v[55:56], s[44:45]
	v_fma_f64 v[59:60], v[57:58], v[59:60], s[40:41]
	s_delay_alu instid0(VALU_DEP_2) | instskip(NEXT) | instid1(VALU_DEP_2)
	v_fma_f64 v[55:56], v[51:52], v[55:56], s[46:47]
	v_fma_f64 v[59:60], v[57:58], v[59:60], s[42:43]
	s_delay_alu instid0(VALU_DEP_2) | instskip(NEXT) | instid1(VALU_DEP_2)
	v_fma_f64 v[55:56], v[51:52], v[55:56], s[48:49]
	v_fma_f64 v[59:60], v[57:58], v[59:60], s[44:45]
	s_delay_alu instid0(VALU_DEP_2) | instskip(NEXT) | instid1(VALU_DEP_2)
	v_fma_f64 v[55:56], v[51:52], v[55:56], s[50:51]
	v_fma_f64 v[59:60], v[57:58], v[59:60], s[46:47]
	s_delay_alu instid0(VALU_DEP_2) | instskip(NEXT) | instid1(VALU_DEP_2)
	v_mul_f64 v[61:62], v[51:52], v[55:56]
	v_fma_f64 v[59:60], v[57:58], v[59:60], s[48:49]
	s_delay_alu instid0(VALU_DEP_2) | instskip(NEXT) | instid1(VALU_DEP_2)
	v_fma_f64 v[47:48], v[51:52], v[55:56], -v[61:62]
	v_fma_f64 v[59:60], v[57:58], v[59:60], s[50:51]
	s_delay_alu instid0(VALU_DEP_2) | instskip(NEXT) | instid1(VALU_DEP_2)
	v_fma_f64 v[47:48], v[45:46], v[55:56], v[47:48]
	v_mul_f64 v[55:56], v[57:58], v[59:60]
	s_delay_alu instid0(VALU_DEP_2) | instskip(NEXT) | instid1(VALU_DEP_2)
	v_add_f64 v[63:64], v[61:62], v[47:48]
	v_fma_f64 v[53:54], v[57:58], v[59:60], -v[55:56]
	s_delay_alu instid0(VALU_DEP_2) | instskip(SKIP_1) | instid1(VALU_DEP_3)
	v_add_f64 v[65:66], v[63:64], s[30:31]
	v_add_f64 v[61:62], v[63:64], -v[61:62]
	v_fma_f64 v[53:54], v[49:50], v[59:60], v[53:54]
	s_delay_alu instid0(VALU_DEP_3) | instskip(NEXT) | instid1(VALU_DEP_3)
	v_add_f64 v[59:60], v[65:66], s[56:57]
	v_add_f64 v[47:48], v[47:48], -v[61:62]
	v_fma_f64 v[61:62], v[51:52], v[40:41], -v[67:68]
	s_delay_alu instid0(VALU_DEP_4) | instskip(NEXT) | instid1(VALU_DEP_4)
	v_add_f64 v[69:70], v[55:56], v[53:54]
	v_add_f64 v[59:60], v[63:64], -v[59:60]
	s_delay_alu instid0(VALU_DEP_4) | instskip(NEXT) | instid1(VALU_DEP_4)
	v_add_f64 v[47:48], v[47:48], s[58:59]
	v_fma_f64 v[51:52], v[51:52], v[34:35], v[61:62]
	s_delay_alu instid0(VALU_DEP_4)
	v_add_f64 v[61:62], v[69:70], s[30:31]
	v_add_f64 v[55:56], v[69:70], -v[55:56]
	v_mul_f64 v[63:64], v[43:44], v[57:58]
	v_ldexp_f64 v[34:35], v[34:35], 1
	v_add_f64 v[47:48], v[47:48], v[59:60]
	v_fma_f64 v[45:46], v[45:46], v[40:41], v[51:52]
	v_add_f64 v[51:52], v[61:62], s[56:57]
	v_add_f64 v[53:54], v[53:54], -v[55:56]
	v_fma_f64 v[55:56], v[57:58], v[43:44], -v[63:64]
	v_ldexp_f64 v[40:41], v[40:41], 1
	v_add_f64 v[59:60], v[65:66], v[47:48]
	v_add_f64 v[71:72], v[67:68], v[45:46]
	v_add_f64 v[51:52], v[69:70], -v[51:52]
	v_add_f64 v[53:54], v[53:54], s[58:59]
	v_fma_f64 v[55:56], v[57:58], v[38:39], v[55:56]
	v_ldexp_f64 v[38:39], v[38:39], 1
	v_add_f64 v[57:58], v[65:66], -v[59:60]
	v_mul_f64 v[65:66], v[71:72], v[59:60]
	v_add_f64 v[51:52], v[53:54], v[51:52]
	v_fma_f64 v[49:50], v[49:50], v[43:44], v[55:56]
	v_add_f64 v[53:54], v[71:72], -v[67:68]
	v_ldexp_f64 v[43:44], v[43:44], 1
	v_add_f64 v[47:48], v[47:48], v[57:58]
	v_fma_f64 v[55:56], v[71:72], v[59:60], -v[65:66]
	v_add_f64 v[57:58], v[61:62], v[51:52]
	v_add_f64 v[67:68], v[63:64], v[49:50]
	v_add_f64 v[45:46], v[45:46], -v[53:54]
	s_delay_alu instid0(VALU_DEP_4) | instskip(NEXT) | instid1(VALU_DEP_4)
	v_fma_f64 v[47:48], v[71:72], v[47:48], v[55:56]
	v_add_f64 v[53:54], v[61:62], -v[57:58]
	s_delay_alu instid0(VALU_DEP_4) | instskip(NEXT) | instid1(VALU_DEP_3)
	v_mul_f64 v[55:56], v[67:68], v[57:58]
	v_fma_f64 v[45:46], v[45:46], v[59:60], v[47:48]
	v_add_f64 v[47:48], v[67:68], -v[63:64]
	s_delay_alu instid0(VALU_DEP_4) | instskip(NEXT) | instid1(VALU_DEP_4)
	v_add_f64 v[51:52], v[51:52], v[53:54]
	v_fma_f64 v[53:54], v[67:68], v[57:58], -v[55:56]
	s_delay_alu instid0(VALU_DEP_4) | instskip(NEXT) | instid1(VALU_DEP_4)
	v_add_f64 v[59:60], v[65:66], v[45:46]
	v_add_f64 v[47:48], v[49:50], -v[47:48]
	s_delay_alu instid0(VALU_DEP_3)
	v_fma_f64 v[49:50], v[67:68], v[51:52], v[53:54]
	v_cvt_f64_i32_e32 v[51:52], v2
	v_frexp_exp_i32_f64_e32 v2, v[36:37]
	v_add_f64 v[53:54], v[40:41], v[59:60]
	v_add_f64 v[61:62], v[59:60], -v[65:66]
	v_fma_f64 v[47:48], v[47:48], v[57:58], v[49:50]
	v_mul_f64 v[49:50], v[51:52], s[52:53]
	v_subrev_co_ci_u32_e64 v2, vcc_lo, 0, v2, s3
	v_cmp_eq_f64_e32 vcc_lo, 1.0, v[31:32]
	v_cmp_eq_f64_e64 s3, 1.0, v[36:37]
	v_add_f64 v[40:41], v[53:54], -v[40:41]
	v_add_f64 v[45:46], v[45:46], -v[61:62]
	v_add_f64 v[57:58], v[55:56], v[47:48]
	v_fma_f64 v[61:62], v[51:52], s[52:53], -v[49:50]
	s_delay_alu instid0(VALU_DEP_4) | instskip(NEXT) | instid1(VALU_DEP_4)
	v_add_f64 v[40:41], v[59:60], -v[40:41]
	v_add_f64 v[34:35], v[34:35], v[45:46]
	v_cvt_f64_i32_e32 v[45:46], v2
	v_add_f64 v[59:60], v[43:44], v[57:58]
	v_add_f64 v[55:56], v[57:58], -v[55:56]
	v_fma_f64 v[51:52], v[51:52], s[54:55], v[61:62]
	v_cndmask_b32_e64 v2, 2.0, 0x3ff00000, vcc_lo
	v_add_f64 v[34:35], v[34:35], v[40:41]
	v_mul_f64 v[40:41], v[45:46], s[52:53]
	v_add_f64 v[43:44], v[59:60], -v[43:44]
	v_add_f64 v[47:48], v[47:48], -v[55:56]
	v_add_f64 v[55:56], v[49:50], v[51:52]
	v_add_f64 v[61:62], v[53:54], v[34:35]
	v_fma_f64 v[63:64], v[45:46], s[52:53], -v[40:41]
	v_add_f64 v[43:44], v[57:58], -v[43:44]
	v_add_f64 v[38:39], v[38:39], v[47:48]
	v_add_f64 v[49:50], v[55:56], -v[49:50]
	v_add_f64 v[47:48], v[55:56], v[61:62]
	v_fma_f64 v[45:46], v[45:46], s[54:55], v[63:64]
	v_add_f64 v[53:54], v[61:62], -v[53:54]
	v_add_f64 v[38:39], v[38:39], v[43:44]
	v_add_f64 v[49:50], v[51:52], -v[49:50]
	v_add_f64 v[43:44], v[47:48], -v[55:56]
	v_add_f64 v[57:58], v[40:41], v[45:46]
	v_add_f64 v[34:35], v[34:35], -v[53:54]
	v_add_f64 v[63:64], v[59:60], v[38:39]
	s_delay_alu instid0(VALU_DEP_4) | instskip(SKIP_2) | instid1(VALU_DEP_4)
	v_add_f64 v[65:66], v[47:48], -v[43:44]
	v_add_f64 v[43:44], v[61:62], -v[43:44]
	v_add_f64 v[40:41], v[57:58], -v[40:41]
	v_add_f64 v[67:68], v[57:58], v[63:64]
	s_delay_alu instid0(VALU_DEP_4) | instskip(SKIP_1) | instid1(VALU_DEP_4)
	v_add_f64 v[51:52], v[55:56], -v[65:66]
	v_add_f64 v[55:56], v[49:50], v[34:35]
	v_add_f64 v[40:41], v[45:46], -v[40:41]
	s_delay_alu instid0(VALU_DEP_4) | instskip(NEXT) | instid1(VALU_DEP_4)
	v_add_f64 v[53:54], v[67:68], -v[57:58]
	v_add_f64 v[43:44], v[43:44], v[51:52]
	v_add_f64 v[51:52], v[63:64], -v[59:60]
	v_add_f64 v[61:62], v[55:56], -v[49:50]
	s_delay_alu instid0(VALU_DEP_4)
	v_add_f64 v[59:60], v[67:68], -v[53:54]
	v_add_f64 v[45:46], v[63:64], -v[53:54]
	v_add_f64 v[43:44], v[55:56], v[43:44]
	v_add_f64 v[38:39], v[38:39], -v[51:52]
	v_add_f64 v[53:54], v[55:56], -v[61:62]
	v_add_f64 v[51:52], v[57:58], -v[59:60]
	v_add_f64 v[34:35], v[34:35], -v[61:62]
	v_add_f64 v[55:56], v[47:48], v[43:44]
	v_add_f64 v[57:58], v[40:41], v[38:39]
	v_add_f64 v[49:50], v[49:50], -v[53:54]
	v_add_f64 v[45:46], v[45:46], v[51:52]
	s_delay_alu instid0(VALU_DEP_4) | instskip(NEXT) | instid1(VALU_DEP_4)
	v_add_f64 v[47:48], v[55:56], -v[47:48]
	v_add_f64 v[51:52], v[57:58], -v[40:41]
	s_delay_alu instid0(VALU_DEP_4) | instskip(NEXT) | instid1(VALU_DEP_4)
	v_add_f64 v[34:35], v[34:35], v[49:50]
	v_add_f64 v[45:46], v[57:58], v[45:46]
	s_delay_alu instid0(VALU_DEP_4) | instskip(NEXT) | instid1(VALU_DEP_4)
	v_add_f64 v[43:44], v[43:44], -v[47:48]
	v_add_f64 v[47:48], v[57:58], -v[51:52]
	v_add_f64 v[38:39], v[38:39], -v[51:52]
	s_delay_alu instid0(VALU_DEP_4) | instskip(SKIP_3) | instid1(VALU_DEP_4)
	v_add_f64 v[49:50], v[67:68], v[45:46]
	v_mul_f64 v[51:52], v[1:2], 0.5
	v_add_f64 v[34:35], v[34:35], v[43:44]
	v_add_f64 v[40:41], v[40:41], -v[47:48]
	v_add_f64 v[43:44], v[49:50], -v[67:68]
	s_delay_alu instid0(VALU_DEP_3) | instskip(NEXT) | instid1(VALU_DEP_3)
	v_add_f64 v[47:48], v[55:56], v[34:35]
	v_add_f64 v[38:39], v[38:39], v[40:41]
	s_delay_alu instid0(VALU_DEP_3) | instskip(NEXT) | instid1(VALU_DEP_3)
	v_add_f64 v[40:41], v[45:46], -v[43:44]
	v_add_f64 v[43:44], v[47:48], -v[55:56]
	v_mul_f64 v[45:46], v[1:2], v[47:48]
	s_delay_alu instid0(VALU_DEP_3) | instskip(SKIP_1) | instid1(VALU_DEP_4)
	v_add_f64 v[38:39], v[38:39], v[40:41]
	v_trunc_f64_e32 v[40:41], v[1:2]
	v_add_f64 v[34:35], v[34:35], -v[43:44]
	s_delay_alu instid0(VALU_DEP_4) | instskip(NEXT) | instid1(VALU_DEP_4)
	v_fma_f64 v[43:44], v[1:2], v[47:48], -v[45:46]
	v_add_f64 v[47:48], v[49:50], v[38:39]
	s_delay_alu instid0(VALU_DEP_4) | instskip(NEXT) | instid1(VALU_DEP_3)
	v_cmp_eq_f64_e32 vcc_lo, v[40:41], v[1:2]
	v_fma_f64 v[34:35], v[1:2], v[34:35], v[43:44]
	v_cndmask_b32_e64 v2, 2.0, 0x3ff00000, s3
	s_delay_alu instid0(VALU_DEP_4) | instskip(SKIP_1) | instid1(VALU_DEP_3)
	v_add_f64 v[40:41], v[47:48], -v[49:50]
	v_cmp_class_f64_e64 s3, v[45:46], 0x204
	v_mul_f64 v[43:44], v[1:2], v[47:48]
	s_delay_alu instid0(VALU_DEP_3) | instskip(NEXT) | instid1(VALU_DEP_2)
	v_add_f64 v[38:39], v[38:39], -v[40:41]
	v_fma_f64 v[40:41], v[1:2], v[47:48], -v[43:44]
	v_cmp_class_f64_e64 s4, v[43:44], 0x204
	s_delay_alu instid0(VALU_DEP_2) | instskip(SKIP_1) | instid1(VALU_DEP_2)
	v_fma_f64 v[38:39], v[1:2], v[38:39], v[40:41]
	v_add_f64 v[40:41], v[45:46], v[34:35]
	v_add_f64 v[47:48], v[43:44], v[38:39]
	s_delay_alu instid0(VALU_DEP_2) | instskip(NEXT) | instid1(VALU_DEP_3)
	v_cndmask_b32_e64 v50, v41, v46, s3
	v_cndmask_b32_e64 v49, v40, v45, s3
	v_add_f64 v[40:41], v[40:41], -v[45:46]
	s_delay_alu instid0(VALU_DEP_2)
	v_mul_f64 v[55:56], v[49:50], s[60:61]
	v_cmp_neq_f64_e64 s3, 0x7ff00000, |v[49:50]|
	v_cmp_ngt_f64_e64 s5, 0xc090cc00, v[49:50]
	v_cndmask_b32_e64 v54, v48, v44, s4
	v_cndmask_b32_e64 v53, v47, v43, s4
	v_add_f64 v[43:44], v[47:48], -v[43:44]
	v_cmp_nlt_f64_e64 s4, 0x40900000, v[49:50]
	v_add_f64 v[34:35], v[34:35], -v[40:41]
	s_delay_alu instid0(VALU_DEP_4)
	v_mul_f64 v[57:58], v[53:54], s[60:61]
	v_rndne_f64_e32 v[55:56], v[55:56]
	v_cmp_nlt_f64_e64 s7, 0x40900000, v[53:54]
	v_cmp_ngt_f64_e64 s8, 0xc090cc00, v[53:54]
	v_cmp_neq_f64_e64 s6, 0x7ff00000, |v[53:54]|
	v_add_f64 v[38:39], v[38:39], -v[43:44]
	v_cndmask_b32_e64 v35, 0, v35, s3
	v_cndmask_b32_e64 v34, 0, v34, s3
	v_rndne_f64_e32 v[57:58], v[57:58]
	v_fma_f64 v[59:60], v[55:56], s[62:63], v[49:50]
	v_cvt_i32_f64_e32 v67, v[55:56]
	s_and_b32 s3, s5, s4
	v_cndmask_b32_e64 v39, 0, v39, s6
	v_cndmask_b32_e64 v38, 0, v38, s6
	v_fma_f64 v[61:62], v[57:58], s[62:63], v[53:54]
	v_fma_f64 v[59:60], v[55:56], s[86:87], v[59:60]
	s_delay_alu instid0(VALU_DEP_2) | instskip(NEXT) | instid1(VALU_DEP_2)
	v_fma_f64 v[61:62], v[57:58], s[86:87], v[61:62]
	v_fma_f64 v[63:64], v[59:60], s[66:67], s[64:65]
	s_delay_alu instid0(VALU_DEP_2) | instskip(NEXT) | instid1(VALU_DEP_2)
	v_fma_f64 v[65:66], v[61:62], s[66:67], s[64:65]
	v_fma_f64 v[63:64], v[59:60], v[63:64], s[68:69]
	s_delay_alu instid0(VALU_DEP_2) | instskip(NEXT) | instid1(VALU_DEP_2)
	v_fma_f64 v[65:66], v[61:62], v[65:66], s[68:69]
	v_fma_f64 v[63:64], v[59:60], v[63:64], s[70:71]
	s_delay_alu instid0(VALU_DEP_2) | instskip(NEXT) | instid1(VALU_DEP_2)
	v_fma_f64 v[65:66], v[61:62], v[65:66], s[70:71]
	v_fma_f64 v[63:64], v[59:60], v[63:64], s[72:73]
	s_delay_alu instid0(VALU_DEP_2) | instskip(NEXT) | instid1(VALU_DEP_2)
	v_fma_f64 v[65:66], v[61:62], v[65:66], s[72:73]
	v_fma_f64 v[63:64], v[59:60], v[63:64], s[74:75]
	s_delay_alu instid0(VALU_DEP_2) | instskip(NEXT) | instid1(VALU_DEP_2)
	v_fma_f64 v[65:66], v[61:62], v[65:66], s[74:75]
	v_fma_f64 v[63:64], v[59:60], v[63:64], s[76:77]
	s_delay_alu instid0(VALU_DEP_2) | instskip(NEXT) | instid1(VALU_DEP_2)
	v_fma_f64 v[65:66], v[61:62], v[65:66], s[76:77]
	v_fma_f64 v[63:64], v[59:60], v[63:64], s[78:79]
	s_delay_alu instid0(VALU_DEP_2) | instskip(NEXT) | instid1(VALU_DEP_2)
	v_fma_f64 v[65:66], v[61:62], v[65:66], s[78:79]
	v_fma_f64 v[63:64], v[59:60], v[63:64], s[80:81]
	s_delay_alu instid0(VALU_DEP_2) | instskip(NEXT) | instid1(VALU_DEP_2)
	v_fma_f64 v[65:66], v[61:62], v[65:66], s[80:81]
	v_fma_f64 v[63:64], v[59:60], v[63:64], s[82:83]
	s_delay_alu instid0(VALU_DEP_2) | instskip(NEXT) | instid1(VALU_DEP_2)
	v_fma_f64 v[65:66], v[61:62], v[65:66], s[82:83]
	v_fma_f64 v[63:64], v[59:60], v[63:64], 1.0
	s_delay_alu instid0(VALU_DEP_2) | instskip(NEXT) | instid1(VALU_DEP_2)
	v_fma_f64 v[65:66], v[61:62], v[65:66], 1.0
	v_fma_f64 v[55:56], v[59:60], v[63:64], 1.0
	v_cvt_i32_f64_e32 v59, v[57:58]
	s_delay_alu instid0(VALU_DEP_3) | instskip(NEXT) | instid1(VALU_DEP_3)
	v_fma_f64 v[57:58], v[61:62], v[65:66], 1.0
	v_ldexp_f64 v[45:46], v[55:56], v67
	v_mul_f64 v[55:56], v[1:2], 0.5
	s_delay_alu instid0(VALU_DEP_3) | instskip(SKIP_1) | instid1(VALU_DEP_3)
	v_ldexp_f64 v[47:48], v[57:58], v59
	v_trunc_f64_e32 v[59:60], v[1:2]
	v_trunc_f64_e32 v[40:41], v[55:56]
	v_trunc_f64_e32 v[57:58], v[51:52]
	v_cndmask_b32_e64 v43, 0x7ff00000, v46, s4
	s_delay_alu instid0(VALU_DEP_1) | instskip(SKIP_2) | instid1(VALU_DEP_1)
	v_cndmask_b32_e64 v44, 0, v43, s5
	v_cndmask_b32_e64 v43, 0, v45, s3
	s_and_b32 s3, s8, s7
	v_fma_f64 v[34:35], v[43:44], v[34:35], v[43:44]
	v_cndmask_b32_e64 v45, 0, v47, s3
	v_cmp_eq_f64_e64 s10, v[59:60], v[1:2]
	v_cmp_class_f64_e64 s3, v[43:44], 0x204
	v_cmp_neq_f64_e64 s4, v[40:41], v[55:56]
	v_cndmask_b32_e64 v46, 0x7ff00000, v48, s7
	v_cmp_neq_f64_e64 s9, v[57:58], v[51:52]
	v_cmp_eq_f64_e64 s7, 0, v[36:37]
	s_delay_alu instid0(VALU_DEP_3) | instskip(SKIP_1) | instid1(VALU_DEP_2)
	v_cndmask_b32_e64 v46, 0, v46, s8
	v_cmp_class_f64_e64 s8, v[31:32], 0x204
	v_fma_f64 v[38:39], v[45:46], v[38:39], v[45:46]
	v_cmp_class_f64_e64 s5, v[45:46], 0x204
	v_cndmask_b32_e64 v34, v34, v43, s3
	v_cndmask_b32_e64 v35, v35, v44, s3
	s_and_b32 s3, s10, s4
	v_cmp_gt_f64_e64 s4, 0, v[36:37]
	s_and_b32 s6, vcc_lo, s9
	v_cndmask_b32_e64 v40, 0x3ff00000, v37, s3
	v_cndmask_b32_e64 v2, 0x3ff00000, v32, s6
	v_cmp_class_f64_e64 s9, v[36:37], 0x204
	v_cndmask_b32_e64 v47, 0, v37, s3
	v_cmp_o_f64_e64 s3, v[31:32], v[31:32]
	s_delay_alu instid0(VALU_DEP_4)
	v_bfi_b32 v2, 0x7fffffff, v35, v2
	v_cndmask_b32_e64 v39, v39, v46, s5
	v_cndmask_b32_e64 v38, v38, v45, s5
	v_cmp_eq_f64_e64 s5, 0, v[31:32]
	v_cndmask_b32_e64 v45, 0, v32, s6
	v_cndmask_b32_e64 v46, 0x7ff00000, 0, s7
	v_bfi_b32 v35, 0x7fffffff, v39, v40
	v_cndmask_b32_e32 v39, 0x7ff80000, v2, vcc_lo
	v_cndmask_b32_e64 v43, 0, v38, s10
	s_delay_alu instid0(VALU_DEP_3) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_cndmask_b32_e64 v41, 0x7ff80000, v35, s10
	v_cndmask_b32_e64 v35, v35, v41, s4
	v_cndmask_b32_e32 v40, 0, v34, vcc_lo
	v_cmp_gt_f64_e32 vcc_lo, 0, v[31:32]
	v_cndmask_b32_e64 v38, v38, v43, s4
	v_cndmask_b32_e64 v44, 0x7ff00000, 0, s5
	s_delay_alu instid0(VALU_DEP_1)
	v_bfi_b32 v44, 0x7fffffff, v44, v45
	v_cndmask_b32_e32 v34, v34, v40, vcc_lo
	v_cndmask_b32_e32 v2, v2, v39, vcc_lo
	v_bfi_b32 v39, 0x7fffffff, v46, v47
	s_or_b32 vcc_lo, s5, s8
	s_delay_alu instid0(VALU_DEP_3) | instid1(SALU_CYCLE_1)
	v_cndmask_b32_e64 v34, v34, 0, vcc_lo
	s_delay_alu instid0(VALU_DEP_3)
	v_cndmask_b32_e32 v2, v2, v44, vcc_lo
	s_or_b32 vcc_lo, s7, s9
	v_cndmask_b32_e32 v35, v35, v39, vcc_lo
	v_cndmask_b32_e64 v38, v38, 0, vcc_lo
	v_cmp_o_f64_e32 vcc_lo, v[36:37], v[36:37]
	v_cndmask_b32_e64 v31, 0, v34, s3
	v_cndmask_b32_e64 v32, 0x7ff80000, v2, s3
	s_delay_alu instid0(VALU_DEP_4) | instskip(SKIP_1) | instid1(VALU_DEP_1)
	v_cndmask_b32_e32 v34, 0, v38, vcc_lo
	v_cndmask_b32_e32 v35, 0x7ff80000, v35, vcc_lo
	v_add_f64 v[31:32], v[31:32], v[34:35]
	s_delay_alu instid0(VALU_DEP_1) | instskip(SKIP_1) | instid1(VALU_DEP_1)
	v_cmp_gt_f64_e32 vcc_lo, 0x10000000, v[31:32]
	v_cndmask_b32_e64 v2, 0, 1, vcc_lo
	v_lshlrev_b32_e32 v2, 8, v2
	s_delay_alu instid0(VALU_DEP_1) | instskip(SKIP_1) | instid1(VALU_DEP_2)
	v_ldexp_f64 v[31:32], v[31:32], v2
	v_cndmask_b32_e64 v2, 0, 0xffffff80, vcc_lo
	v_rsq_f64_e32 v[34:35], v[31:32]
	v_cmp_class_f64_e64 vcc_lo, v[31:32], 0x260
	s_waitcnt_depctr 0xfff
	v_mul_f64 v[36:37], v[31:32], v[34:35]
	v_mul_f64 v[34:35], v[34:35], 0.5
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_fma_f64 v[38:39], -v[34:35], v[36:37], 0.5
	v_fma_f64 v[36:37], v[36:37], v[38:39], v[36:37]
	v_fma_f64 v[34:35], v[34:35], v[38:39], v[34:35]
	s_delay_alu instid0(VALU_DEP_2) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_fma_f64 v[38:39], -v[36:37], v[36:37], v[31:32]
	v_fma_f64 v[36:37], v[38:39], v[34:35], v[36:37]
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_fma_f64 v[38:39], -v[36:37], v[36:37], v[31:32]
	v_fma_f64 v[34:35], v[38:39], v[34:35], v[36:37]
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_ldexp_f64 v[34:35], v[34:35], v2
	v_dual_cndmask_b32 v32, v35, v32 :: v_dual_cndmask_b32 v31, v34, v31
	s_delay_alu instid0(VALU_DEP_1) | instskip(SKIP_2) | instid1(VALU_DEP_3)
	v_frexp_mant_f64_e64 v[34:35], |v[31:32]|
	v_cmp_eq_f64_e64 s5, 0, v[31:32]
	v_cmp_class_f64_e64 s6, v[31:32], 0x204
	v_cmp_gt_f64_e32 vcc_lo, s[30:31], v[34:35]
	v_cndmask_b32_e64 v2, 0, 1, vcc_lo
	s_delay_alu instid0(VALU_DEP_1) | instskip(SKIP_1) | instid1(VALU_DEP_2)
	v_ldexp_f64 v[34:35], v[34:35], v2
	v_frexp_exp_i32_f64_e32 v2, v[31:32]
	v_add_f64 v[36:37], v[34:35], 1.0
	v_add_f64 v[43:44], v[34:35], -1.0
	s_delay_alu instid0(VALU_DEP_3) | instskip(SKIP_1) | instid1(VALU_DEP_4)
	v_subrev_co_ci_u32_e32 v2, vcc_lo, 0, v2, vcc_lo
	v_cmp_eq_f64_e32 vcc_lo, 1.0, v[31:32]
	v_rcp_f64_e32 v[38:39], v[36:37]
	v_add_f64 v[45:46], v[36:37], -1.0
	s_delay_alu instid0(VALU_DEP_1) | instskip(SKIP_2) | instid1(VALU_DEP_1)
	v_add_f64 v[34:35], v[34:35], -v[45:46]
	s_waitcnt_depctr 0xfff
	v_fma_f64 v[40:41], -v[36:37], v[38:39], 1.0
	v_fma_f64 v[38:39], v[40:41], v[38:39], v[38:39]
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_fma_f64 v[40:41], -v[36:37], v[38:39], 1.0
	v_fma_f64 v[38:39], v[40:41], v[38:39], v[38:39]
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_mul_f64 v[40:41], v[43:44], v[38:39]
	v_mul_f64 v[47:48], v[36:37], v[40:41]
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_fma_f64 v[36:37], v[40:41], v[36:37], -v[47:48]
	v_fma_f64 v[34:35], v[40:41], v[34:35], v[36:37]
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_add_f64 v[36:37], v[47:48], v[34:35]
	v_add_f64 v[45:46], v[43:44], -v[36:37]
	v_add_f64 v[47:48], v[36:37], -v[47:48]
	s_delay_alu instid0(VALU_DEP_2) | instskip(NEXT) | instid1(VALU_DEP_2)
	v_add_f64 v[43:44], v[43:44], -v[45:46]
	v_add_f64 v[34:35], v[47:48], -v[34:35]
	s_delay_alu instid0(VALU_DEP_2) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_add_f64 v[36:37], v[43:44], -v[36:37]
	v_add_f64 v[34:35], v[34:35], v[36:37]
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_add_f64 v[34:35], v[45:46], v[34:35]
	v_mul_f64 v[34:35], v[38:39], v[34:35]
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_add_f64 v[36:37], v[40:41], v[34:35]
	v_add_f64 v[38:39], v[36:37], -v[40:41]
	v_mul_f64 v[40:41], v[36:37], v[36:37]
	s_delay_alu instid0(VALU_DEP_2) | instskip(NEXT) | instid1(VALU_DEP_2)
	v_add_f64 v[34:35], v[34:35], -v[38:39]
	v_fma_f64 v[38:39], v[36:37], v[36:37], -v[40:41]
	s_delay_alu instid0(VALU_DEP_2) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_add_f64 v[43:44], v[34:35], v[34:35]
	v_fma_f64 v[38:39], v[36:37], v[43:44], v[38:39]
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_add_f64 v[43:44], v[40:41], v[38:39]
	v_fma_f64 v[45:46], v[43:44], s[36:37], s[34:35]
	v_add_f64 v[40:41], v[43:44], -v[40:41]
	v_mul_f64 v[51:52], v[36:37], v[43:44]
	s_delay_alu instid0(VALU_DEP_3) | instskip(NEXT) | instid1(VALU_DEP_3)
	v_fma_f64 v[45:46], v[43:44], v[45:46], s[38:39]
	v_add_f64 v[38:39], v[38:39], -v[40:41]
	s_delay_alu instid0(VALU_DEP_2) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_fma_f64 v[45:46], v[43:44], v[45:46], s[40:41]
	v_fma_f64 v[45:46], v[43:44], v[45:46], s[42:43]
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_fma_f64 v[45:46], v[43:44], v[45:46], s[44:45]
	v_fma_f64 v[45:46], v[43:44], v[45:46], s[46:47]
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_fma_f64 v[45:46], v[43:44], v[45:46], s[48:49]
	v_fma_f64 v[45:46], v[43:44], v[45:46], s[50:51]
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_mul_f64 v[47:48], v[43:44], v[45:46]
	v_fma_f64 v[40:41], v[43:44], v[45:46], -v[47:48]
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_fma_f64 v[40:41], v[38:39], v[45:46], v[40:41]
	v_add_f64 v[45:46], v[47:48], v[40:41]
	s_delay_alu instid0(VALU_DEP_1) | instskip(SKIP_1) | instid1(VALU_DEP_2)
	v_add_f64 v[49:50], v[45:46], s[30:31]
	v_add_f64 v[47:48], v[45:46], -v[47:48]
	v_add_f64 v[53:54], v[49:50], s[56:57]
	s_delay_alu instid0(VALU_DEP_2) | instskip(SKIP_1) | instid1(VALU_DEP_3)
	v_add_f64 v[40:41], v[40:41], -v[47:48]
	v_fma_f64 v[47:48], v[43:44], v[36:37], -v[51:52]
	v_add_f64 v[45:46], v[45:46], -v[53:54]
	s_delay_alu instid0(VALU_DEP_3) | instskip(NEXT) | instid1(VALU_DEP_3)
	v_add_f64 v[40:41], v[40:41], s[58:59]
	v_fma_f64 v[43:44], v[43:44], v[34:35], v[47:48]
	v_ldexp_f64 v[34:35], v[34:35], 1
	s_delay_alu instid0(VALU_DEP_3) | instskip(NEXT) | instid1(VALU_DEP_3)
	v_add_f64 v[40:41], v[40:41], v[45:46]
	v_fma_f64 v[38:39], v[38:39], v[36:37], v[43:44]
	v_ldexp_f64 v[36:37], v[36:37], 1
	s_delay_alu instid0(VALU_DEP_3) | instskip(NEXT) | instid1(VALU_DEP_3)
	v_add_f64 v[43:44], v[49:50], v[40:41]
	v_add_f64 v[45:46], v[51:52], v[38:39]
	s_delay_alu instid0(VALU_DEP_2) | instskip(NEXT) | instid1(VALU_DEP_2)
	v_add_f64 v[47:48], v[49:50], -v[43:44]
	v_mul_f64 v[49:50], v[45:46], v[43:44]
	v_add_f64 v[51:52], v[45:46], -v[51:52]
	s_delay_alu instid0(VALU_DEP_3) | instskip(NEXT) | instid1(VALU_DEP_3)
	v_add_f64 v[40:41], v[40:41], v[47:48]
	v_fma_f64 v[47:48], v[45:46], v[43:44], -v[49:50]
	s_delay_alu instid0(VALU_DEP_3) | instskip(NEXT) | instid1(VALU_DEP_2)
	v_add_f64 v[38:39], v[38:39], -v[51:52]
	v_fma_f64 v[40:41], v[45:46], v[40:41], v[47:48]
	s_delay_alu instid0(VALU_DEP_1) | instskip(SKIP_2) | instid1(VALU_DEP_3)
	v_fma_f64 v[38:39], v[38:39], v[43:44], v[40:41]
	v_cvt_f64_i32_e32 v[43:44], v2
	v_cndmask_b32_e64 v2, 2.0, 0x3ff00000, vcc_lo
	v_add_f64 v[40:41], v[49:50], v[38:39]
	s_delay_alu instid0(VALU_DEP_1) | instskip(SKIP_2) | instid1(VALU_DEP_3)
	v_add_f64 v[45:46], v[36:37], v[40:41]
	v_add_f64 v[47:48], v[40:41], -v[49:50]
	v_mul_f64 v[49:50], v[43:44], s[52:53]
	v_add_f64 v[36:37], v[45:46], -v[36:37]
	s_delay_alu instid0(VALU_DEP_3) | instskip(NEXT) | instid1(VALU_DEP_3)
	v_add_f64 v[38:39], v[38:39], -v[47:48]
	v_fma_f64 v[47:48], v[43:44], s[52:53], -v[49:50]
	s_delay_alu instid0(VALU_DEP_3) | instskip(NEXT) | instid1(VALU_DEP_3)
	v_add_f64 v[36:37], v[40:41], -v[36:37]
	v_add_f64 v[34:35], v[34:35], v[38:39]
	s_delay_alu instid0(VALU_DEP_3) | instskip(NEXT) | instid1(VALU_DEP_2)
	v_fma_f64 v[38:39], v[43:44], s[54:55], v[47:48]
	v_add_f64 v[34:35], v[34:35], v[36:37]
	s_delay_alu instid0(VALU_DEP_2) | instskip(NEXT) | instid1(VALU_DEP_2)
	v_add_f64 v[36:37], v[49:50], v[38:39]
	v_add_f64 v[40:41], v[45:46], v[34:35]
	s_delay_alu instid0(VALU_DEP_2) | instskip(NEXT) | instid1(VALU_DEP_2)
	v_add_f64 v[49:50], v[36:37], -v[49:50]
	v_add_f64 v[43:44], v[36:37], v[40:41]
	v_add_f64 v[45:46], v[40:41], -v[45:46]
	s_delay_alu instid0(VALU_DEP_3) | instskip(SKIP_3) | instid1(VALU_DEP_2)
	v_add_f64 v[38:39], v[38:39], -v[49:50]
	global_load_b64 v[49:50], v[15:16], off
	v_add_f64 v[47:48], v[43:44], -v[36:37]
	v_add_f64 v[34:35], v[34:35], -v[45:46]
	v_add_f64 v[51:52], v[43:44], -v[47:48]
	v_add_f64 v[40:41], v[40:41], -v[47:48]
	s_delay_alu instid0(VALU_DEP_3) | instskip(NEXT) | instid1(VALU_DEP_3)
	v_add_f64 v[45:46], v[38:39], v[34:35]
	v_add_f64 v[36:37], v[36:37], -v[51:52]
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_3)
	v_add_f64 v[36:37], v[40:41], v[36:37]
	v_add_f64 v[40:41], v[45:46], -v[38:39]
	s_delay_alu instid0(VALU_DEP_2) | instskip(NEXT) | instid1(VALU_DEP_2)
	v_add_f64 v[36:37], v[45:46], v[36:37]
	v_add_f64 v[45:46], v[45:46], -v[40:41]
	v_add_f64 v[34:35], v[34:35], -v[40:41]
	s_delay_alu instid0(VALU_DEP_3) | instskip(NEXT) | instid1(VALU_DEP_3)
	v_add_f64 v[47:48], v[43:44], v[36:37]
	v_add_f64 v[38:39], v[38:39], -v[45:46]
	s_delay_alu instid0(VALU_DEP_2) | instskip(NEXT) | instid1(VALU_DEP_2)
	v_add_f64 v[40:41], v[47:48], -v[43:44]
	v_add_f64 v[34:35], v[34:35], v[38:39]
	s_delay_alu instid0(VALU_DEP_2) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_add_f64 v[36:37], v[36:37], -v[40:41]
	v_add_f64 v[34:35], v[34:35], v[36:37]
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_add_f64 v[36:37], v[47:48], v[34:35]
	v_add_f64 v[38:39], v[36:37], -v[47:48]
	v_mul_f64 v[40:41], v[1:2], v[36:37]
	s_delay_alu instid0(VALU_DEP_2) | instskip(NEXT) | instid1(VALU_DEP_2)
	v_add_f64 v[34:35], v[34:35], -v[38:39]
	v_fma_f64 v[36:37], v[1:2], v[36:37], -v[40:41]
	v_cmp_class_f64_e64 vcc_lo, v[40:41], 0x204
	s_delay_alu instid0(VALU_DEP_2) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_fma_f64 v[34:35], v[1:2], v[34:35], v[36:37]
	v_add_f64 v[36:37], v[40:41], v[34:35]
	s_delay_alu instid0(VALU_DEP_1) | instskip(SKIP_1) | instid1(VALU_DEP_2)
	v_dual_cndmask_b32 v39, v37, v41 :: v_dual_cndmask_b32 v38, v36, v40
	v_add_f64 v[36:37], v[36:37], -v[40:41]
	v_mul_f64 v[43:44], v[38:39], s[60:61]
	v_cmp_nlt_f64_e64 s3, 0x40900000, v[38:39]
	v_cmp_neq_f64_e64 vcc_lo, 0x7ff00000, |v[38:39]|
	v_cmp_ngt_f64_e64 s4, 0xc090cc00, v[38:39]
	v_add_f64 v[34:35], v[34:35], -v[36:37]
	v_trunc_f64_e32 v[36:37], v[1:2]
	v_rndne_f64_e32 v[43:44], v[43:44]
	s_delay_alu instid0(VALU_DEP_3) | instskip(SKIP_1) | instid1(VALU_DEP_2)
	v_dual_cndmask_b32 v35, 0, v35 :: v_dual_cndmask_b32 v34, 0, v34
	s_and_b32 vcc_lo, s4, s3
	v_fma_f64 v[45:46], v[43:44], s[62:63], v[38:39]
	v_cvt_i32_f64_e32 v51, v[43:44]
	s_delay_alu instid0(VALU_DEP_2) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_fma_f64 v[45:46], v[43:44], s[86:87], v[45:46]
	v_fma_f64 v[47:48], v[45:46], s[66:67], s[64:65]
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_fma_f64 v[47:48], v[45:46], v[47:48], s[68:69]
	v_fma_f64 v[47:48], v[45:46], v[47:48], s[70:71]
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_fma_f64 v[47:48], v[45:46], v[47:48], s[72:73]
	v_fma_f64 v[47:48], v[45:46], v[47:48], s[74:75]
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_fma_f64 v[47:48], v[45:46], v[47:48], s[76:77]
	v_fma_f64 v[47:48], v[45:46], v[47:48], s[78:79]
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_fma_f64 v[47:48], v[45:46], v[47:48], s[80:81]
	v_fma_f64 v[47:48], v[45:46], v[47:48], s[82:83]
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_fma_f64 v[47:48], v[45:46], v[47:48], 1.0
	v_fma_f64 v[43:44], v[45:46], v[47:48], 1.0
	s_delay_alu instid0(VALU_DEP_1) | instskip(SKIP_1) | instid1(VALU_DEP_2)
	v_ldexp_f64 v[40:41], v[43:44], v51
	v_mul_f64 v[43:44], v[1:2], 0.5
	v_cndmask_b32_e64 v41, 0x7ff00000, v41, s3
	s_delay_alu instid0(VALU_DEP_2) | instskip(NEXT) | instid1(VALU_DEP_4)
	v_trunc_f64_e32 v[38:39], v[43:44]
	v_cndmask_b32_e32 v40, 0, v40, vcc_lo
	v_cmp_eq_f64_e32 vcc_lo, v[36:37], v[1:2]
	s_waitcnt vmcnt(0)
	v_mul_f64 v[36:37], v[49:50], s[84:85]
	v_cndmask_b32_e64 v41, 0, v41, s4
	v_cndmask_b32_e64 v2, 0x7ff00000, 0, s5
	s_delay_alu instid0(VALU_DEP_2) | instskip(SKIP_3) | instid1(VALU_DEP_3)
	v_fma_f64 v[34:35], v[40:41], v[34:35], v[40:41]
	v_cmp_class_f64_e64 s4, v[40:41], 0x204
	v_cmp_neq_f64_e64 s3, v[38:39], v[43:44]
	v_mul_f64 v[29:30], v[36:37], v[29:30]
	v_cndmask_b32_e64 v35, v35, v41, s4
	v_cndmask_b32_e64 v34, v34, v40, s4
	s_delay_alu instid0(VALU_DEP_4) | instskip(SKIP_3) | instid1(SALU_CYCLE_1)
	s_and_b32 vcc_lo, vcc_lo, s3
	v_cndmask_b32_e32 v38, 0x3ff00000, v32, vcc_lo
	v_cndmask_b32_e32 v39, 0, v32, vcc_lo
	s_or_b32 vcc_lo, s5, s6
	v_cndmask_b32_e64 v34, v34, 0, vcc_lo
	s_delay_alu instid0(VALU_DEP_3) | instskip(NEXT) | instid1(VALU_DEP_3)
	v_bfi_b32 v35, 0x7fffffff, v35, v38
	v_bfi_b32 v2, 0x7fffffff, v2, v39
	s_delay_alu instid0(VALU_DEP_1) | instskip(SKIP_2) | instid1(VALU_DEP_3)
	v_cndmask_b32_e32 v2, v35, v2, vcc_lo
	v_cmp_o_f64_e32 vcc_lo, v[31:32], v[31:32]
	v_cndmask_b32_e32 v34, 0, v34, vcc_lo
	v_cndmask_b32_e32 v35, 0x7ff80000, v2, vcc_lo
	s_delay_alu instid0(VALU_DEP_1) | instskip(SKIP_1) | instid1(VALU_DEP_2)
	v_div_scale_f64 v[36:37], null, v[34:35], v[34:35], v[29:30]
	v_div_scale_f64 v[43:44], vcc_lo, v[29:30], v[34:35], v[29:30]
	v_rcp_f64_e32 v[38:39], v[36:37]
	s_waitcnt_depctr 0xfff
	v_fma_f64 v[40:41], -v[36:37], v[38:39], 1.0
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_fma_f64 v[38:39], v[38:39], v[40:41], v[38:39]
	v_fma_f64 v[40:41], -v[36:37], v[38:39], 1.0
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_fma_f64 v[38:39], v[38:39], v[40:41], v[38:39]
	v_mul_f64 v[40:41], v[43:44], v[38:39]
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_fma_f64 v[36:37], -v[36:37], v[40:41], v[43:44]
	v_div_fmas_f64 v[36:37], v[36:37], v[38:39], v[40:41]
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_div_fixup_f64 v[23:24], v[36:37], v[34:35], v[29:30]
	v_mul_f64 v[21:22], v[21:22], v[23:24]
	v_mul_f64 v[23:24], v[25:26], v[23:24]
	s_delay_alu instid0(VALU_DEP_2) | instskip(SKIP_1) | instid1(VALU_DEP_3)
	v_div_scale_f64 v[29:30], null, v[31:32], v[31:32], v[21:22]
	v_div_scale_f64 v[38:39], vcc_lo, v[21:22], v[31:32], v[21:22]
	v_div_scale_f64 v[27:28], null, v[31:32], v[31:32], v[23:24]
	s_delay_alu instid0(VALU_DEP_3) | instskip(SKIP_2) | instid1(VALU_DEP_1)
	v_rcp_f64_e32 v[34:35], v[29:30]
	s_waitcnt_depctr 0xfff
	v_fma_f64 v[36:37], -v[29:30], v[34:35], 1.0
	v_fma_f64 v[34:35], v[34:35], v[36:37], v[34:35]
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_fma_f64 v[36:37], -v[29:30], v[34:35], 1.0
	v_fma_f64 v[34:35], v[34:35], v[36:37], v[34:35]
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_mul_f64 v[36:37], v[38:39], v[34:35]
	v_fma_f64 v[29:30], -v[29:30], v[36:37], v[38:39]
	s_delay_alu instid0(VALU_DEP_1) | instskip(SKIP_1) | instid1(VALU_DEP_1)
	v_div_fmas_f64 v[29:30], v[29:30], v[34:35], v[36:37]
	v_rcp_f64_e32 v[34:35], v[27:28]
	v_div_fixup_f64 v[21:22], v[29:30], v[31:32], v[21:22]
	s_waitcnt_depctr 0xfff
	v_fma_f64 v[38:39], -v[27:28], v[34:35], 1.0
	v_div_scale_f64 v[25:26], null, v[49:50], v[49:50], v[21:22]
	v_div_scale_f64 v[40:41], vcc_lo, v[21:22], v[49:50], v[21:22]
	s_delay_alu instid0(VALU_DEP_3) | instskip(NEXT) | instid1(VALU_DEP_3)
	v_fma_f64 v[34:35], v[34:35], v[38:39], v[34:35]
	v_rcp_f64_e32 v[29:30], v[25:26]
	s_delay_alu instid0(VALU_DEP_1) | instskip(SKIP_3) | instid1(VALU_DEP_2)
	v_fma_f64 v[38:39], -v[27:28], v[34:35], 1.0
	s_waitcnt_depctr 0xfff
	v_fma_f64 v[36:37], -v[25:26], v[29:30], 1.0
	v_fma_f64 v[34:35], v[34:35], v[38:39], v[34:35]
	v_fma_f64 v[29:30], v[29:30], v[36:37], v[29:30]
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_fma_f64 v[36:37], -v[25:26], v[29:30], 1.0
	v_fma_f64 v[29:30], v[29:30], v[36:37], v[29:30]
	v_div_scale_f64 v[36:37], s3, v[23:24], v[31:32], v[23:24]
	s_delay_alu instid0(VALU_DEP_2) | instskip(NEXT) | instid1(VALU_DEP_2)
	v_mul_f64 v[38:39], v[40:41], v[29:30]
	v_mul_f64 v[43:44], v[36:37], v[34:35]
	s_delay_alu instid0(VALU_DEP_2) | instskip(NEXT) | instid1(VALU_DEP_2)
	v_fma_f64 v[25:26], -v[25:26], v[38:39], v[40:41]
	v_fma_f64 v[27:28], -v[27:28], v[43:44], v[36:37]
	s_delay_alu instid0(VALU_DEP_2) | instskip(SKIP_1) | instid1(VALU_DEP_2)
	v_div_fmas_f64 v[25:26], v[25:26], v[29:30], v[38:39]
	s_mov_b32 vcc_lo, s3
	v_div_fmas_f64 v[27:28], v[27:28], v[34:35], v[43:44]
	s_delay_alu instid0(VALU_DEP_2) | instskip(NEXT) | instid1(VALU_DEP_2)
	v_div_fixup_f64 v[21:22], v[25:26], v[49:50], v[21:22]
	v_div_fixup_f64 v[23:24], v[27:28], v[31:32], v[23:24]
	s_delay_alu instid0(VALU_DEP_2) | instskip(NEXT) | instid1(VALU_DEP_2)
	v_add_f64 v[17:18], v[17:18], v[21:22]
	v_div_scale_f64 v[27:28], null, v[49:50], v[49:50], v[23:24]
	s_delay_alu instid0(VALU_DEP_1) | instskip(SKIP_2) | instid1(VALU_DEP_1)
	v_rcp_f64_e32 v[29:30], v[27:28]
	s_waitcnt_depctr 0xfff
	v_fma_f64 v[31:32], -v[27:28], v[29:30], 1.0
	v_fma_f64 v[29:30], v[29:30], v[31:32], v[29:30]
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_fma_f64 v[31:32], -v[27:28], v[29:30], 1.0
	v_fma_f64 v[29:30], v[29:30], v[31:32], v[29:30]
	v_div_scale_f64 v[31:32], vcc_lo, v[23:24], v[49:50], v[23:24]
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_mul_f64 v[34:35], v[31:32], v[29:30]
	v_fma_f64 v[27:28], -v[27:28], v[34:35], v[31:32]
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_div_fmas_f64 v[27:28], v[27:28], v[29:30], v[34:35]
	v_div_fixup_f64 v[23:24], v[27:28], v[49:50], v[23:24]
	s_delay_alu instid0(VALU_DEP_1)
	v_add_f64 v[19:20], v[19:20], v[23:24]
.LBB0_4:                                ;   in Loop: Header=BB0_2 Depth=1
	s_or_b32 exec_lo, exec_lo, s92
	s_add_i32 s33, s33, -1
	s_add_u32 s90, s90, 8
	s_addc_u32 s91, s91, 0
	s_add_u32 s88, s88, 8
	v_add_nc_u32_e32 v33, -1, v33
	s_addc_u32 s89, s89, 0
	s_add_u32 s20, s20, 8
	s_addc_u32 s21, s21, 0
	s_cmp_eq_u32 s33, 0
	s_cbranch_scc0 .LBB0_2
; %bb.5:                                ; %._crit_edge
	global_load_b64 v[1:2], v[11:12], off
	s_waitcnt vmcnt(0)
	v_add_f64 v[1:2], v[17:18], v[1:2]
	global_store_b64 v[11:12], v[1:2], off
	global_load_b64 v[1:2], v[7:8], off
	s_waitcnt vmcnt(0)
	v_add_f64 v[1:2], v[19:20], v[1:2]
	global_store_b64 v[7:8], v[1:2], off
	global_load_b64 v[1:2], v[11:12], off
	global_load_b64 v[9:10], v[3:4], off
	s_waitcnt vmcnt(0)
	v_add_f64 v[1:2], v[1:2], v[9:10]
	global_store_b64 v[3:4], v[1:2], off
	global_load_b64 v[1:2], v[7:8], off
	global_load_b64 v[3:4], v[5:6], off
	s_waitcnt vmcnt(0)
	v_add_f64 v[1:2], v[1:2], v[3:4]
	global_store_b64 v[5:6], v[1:2], off
.LBB0_6:                                ; %Flow568
	s_or_b32 exec_lo, exec_lo, s11
	s_clause 0x1
	global_load_b64 v[6:7], v42, s[12:13]
	global_load_b64 v[2:3], v42, s[14:15]
	s_load_b64 s[4:5], s[0:1], 0xa0
	v_mbcnt_lo_u32_b32 v40, -1, 0
	v_mov_b32_e32 v4, 0
	v_mov_b32_e32 v5, 0
	s_delay_alu instid0(VALU_DEP_3) | instskip(SKIP_1) | instid1(VALU_DEP_1)
	v_dual_mov_b32 v1, 0 :: v_dual_mov_b32 v8, v40
	;;#ASMSTART
	;;#ASMEND
	v_readfirstlane_b32 s0, v8
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_cmp_eq_u32_e64 s0, s0, v8
	s_and_saveexec_b32 s1, s0
	s_cbranch_execz .LBB0_12
; %bb.7:
	s_waitcnt lgkmcnt(0)
	global_load_b64 v[11:12], v1, s[4:5] offset:24 glc
	s_waitcnt vmcnt(0)
	buffer_gl1_inv
	buffer_gl0_inv
	s_clause 0x1
	global_load_b64 v[4:5], v1, s[4:5] offset:40
	global_load_b64 v[9:10], v1, s[4:5]
	s_mov_b32 s3, exec_lo
	s_waitcnt vmcnt(1)
	v_and_b32_e32 v5, v5, v12
	v_and_b32_e32 v4, v4, v11
	s_delay_alu instid0(VALU_DEP_2) | instskip(NEXT) | instid1(VALU_DEP_2)
	v_mul_lo_u32 v5, v5, 24
	v_mul_hi_u32 v13, v4, 24
	v_mul_lo_u32 v4, v4, 24
	s_delay_alu instid0(VALU_DEP_2) | instskip(SKIP_1) | instid1(VALU_DEP_2)
	v_add_nc_u32_e32 v5, v13, v5
	s_waitcnt vmcnt(0)
	v_add_co_u32 v4, vcc_lo, v9, v4
	s_delay_alu instid0(VALU_DEP_2)
	v_add_co_ci_u32_e32 v5, vcc_lo, v10, v5, vcc_lo
	global_load_b64 v[9:10], v[4:5], off glc
	s_waitcnt vmcnt(0)
	global_atomic_cmpswap_b64 v[4:5], v1, v[9:12], s[4:5] offset:24 glc
	s_waitcnt vmcnt(0)
	buffer_gl1_inv
	buffer_gl0_inv
	v_cmpx_ne_u64_e64 v[4:5], v[11:12]
	s_cbranch_execz .LBB0_11
; %bb.8:                                ; %.preheader3.i.i.i.preheader
	v_mov_b32_e32 v9, 0
	s_mov_b32 s6, 0
.LBB0_9:                                ; %.preheader3.i.i.i
                                        ; =>This Inner Loop Header: Depth=1
	s_sleep 1
	s_clause 0x1
	global_load_b64 v[10:11], v9, s[4:5] offset:40
	global_load_b64 v[14:15], v9, s[4:5]
	v_dual_mov_b32 v13, v5 :: v_dual_mov_b32 v12, v4
	s_waitcnt vmcnt(1)
	s_delay_alu instid0(VALU_DEP_1) | instskip(SKIP_1) | instid1(VALU_DEP_1)
	v_and_b32_e32 v10, v10, v12
	s_waitcnt vmcnt(0)
	v_mad_u64_u32 v[4:5], null, v10, 24, v[14:15]
	v_and_b32_e32 v14, v11, v13
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_mad_u64_u32 v[10:11], null, v14, 24, v[5:6]
	v_mov_b32_e32 v5, v10
	global_load_b64 v[10:11], v[4:5], off glc
	s_waitcnt vmcnt(0)
	global_atomic_cmpswap_b64 v[4:5], v9, v[10:13], s[4:5] offset:24 glc
	s_waitcnt vmcnt(0)
	buffer_gl1_inv
	buffer_gl0_inv
	v_cmp_eq_u64_e32 vcc_lo, v[4:5], v[12:13]
	s_or_b32 s6, vcc_lo, s6
	s_delay_alu instid0(SALU_CYCLE_1)
	s_and_not1_b32 exec_lo, exec_lo, s6
	s_cbranch_execnz .LBB0_9
; %bb.10:                               ; %Flow564
	s_or_b32 exec_lo, exec_lo, s6
.LBB0_11:                               ; %Flow566
	s_delay_alu instid0(SALU_CYCLE_1)
	s_or_b32 exec_lo, exec_lo, s3
.LBB0_12:                               ; %.loopexit4.i.i.i
	s_delay_alu instid0(SALU_CYCLE_1)
	s_or_b32 exec_lo, exec_lo, s1
	s_waitcnt lgkmcnt(0)
	s_clause 0x1
	global_load_b64 v[9:10], v1, s[4:5] offset:40
	global_load_b128 v[12:15], v1, s[4:5]
	v_readfirstlane_b32 s6, v4
	v_readfirstlane_b32 s7, v5
	s_mov_b32 s11, exec_lo
	s_waitcnt vmcnt(1)
	v_readfirstlane_b32 s8, v9
	v_readfirstlane_b32 s9, v10
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(SALU_CYCLE_1)
	s_and_b64 s[8:9], s[6:7], s[8:9]
	s_mul_i32 s1, s9, 24
	s_mul_hi_u32 s3, s8, 24
	s_mul_i32 s10, s8, 24
	s_and_saveexec_b32 s20, s0
	s_cbranch_execz .LBB0_14
; %bb.13:
	v_dual_mov_b32 v16, s11 :: v_dual_mov_b32 v17, 0
	s_add_i32 s11, s3, s1
	s_waitcnt vmcnt(0)
	v_add_co_u32 v4, vcc_lo, v12, s10
	v_add_co_ci_u32_e32 v5, vcc_lo, s11, v13, vcc_lo
	v_dual_mov_b32 v18, 2 :: v_dual_mov_b32 v19, 1
	global_store_b128 v[4:5], v[16:19], off offset:8
.LBB0_14:
	s_or_b32 exec_lo, exec_lo, s20
	v_mov_b32_e32 v9, 0
	s_lshl_b64 s[8:9], s[8:9], 12
	s_mov_b32 s36, 0
	s_waitcnt vmcnt(0)
	v_add_co_u32 v1, vcc_lo, v14, s8
	v_lshlrev_b64 v[4:5], 6, v[8:9]
	v_mov_b32_e32 v8, 33
	v_add_co_ci_u32_e32 v10, vcc_lo, s9, v15, vcc_lo
	v_add_co_u32 v36, s8, s12, v42
	s_delay_alu instid0(VALU_DEP_1)
	v_add_co_ci_u32_e64 v37, null, s13, 0, s8
	v_add_co_u32 v4, vcc_lo, v1, v4
	v_add_co_u32 v38, s8, s14, v42
	s_mov_b32 s37, s36
	s_mov_b32 s38, s36
	s_mov_b32 s39, s36
	v_add_co_ci_u32_e32 v5, vcc_lo, v10, v5, vcc_lo
	v_mov_b32_e32 v10, v9
	v_dual_mov_b32 v11, v9 :: v_dual_mov_b32 v14, s36
	v_add_co_ci_u32_e64 v39, null, s15, 0, s8
	v_dual_mov_b32 v15, s37 :: v_dual_mov_b32 v16, s38
	v_mov_b32_e32 v17, s39
	s_clause 0x3
	global_store_b128 v[4:5], v[8:11], off
	global_store_b128 v[4:5], v[14:17], off offset:16
	global_store_b128 v[4:5], v[14:17], off offset:32
	global_store_b128 v[4:5], v[14:17], off offset:48
	s_and_saveexec_b32 s8, s0
	s_cbranch_execz .LBB0_22
; %bb.15:
	s_clause 0x1
	global_load_b64 v[18:19], v9, s[4:5] offset:32 glc
	global_load_b64 v[10:11], v9, s[4:5] offset:40
	s_mov_b32 s9, exec_lo
	v_dual_mov_b32 v16, s6 :: v_dual_mov_b32 v17, s7
	s_waitcnt vmcnt(0)
	v_and_b32_e32 v1, s7, v11
	v_and_b32_e32 v8, s6, v10
	s_delay_alu instid0(VALU_DEP_2) | instskip(NEXT) | instid1(VALU_DEP_2)
	v_mul_lo_u32 v1, v1, 24
	v_mul_hi_u32 v10, v8, 24
	v_mul_lo_u32 v8, v8, 24
	s_delay_alu instid0(VALU_DEP_2) | instskip(NEXT) | instid1(VALU_DEP_2)
	v_add_nc_u32_e32 v1, v10, v1
	v_add_co_u32 v14, vcc_lo, v12, v8
	s_delay_alu instid0(VALU_DEP_2)
	v_add_co_ci_u32_e32 v15, vcc_lo, v13, v1, vcc_lo
	global_store_b64 v[14:15], v[18:19], off
	s_waitcnt_vscnt null, 0x0
	global_atomic_cmpswap_b64 v[10:11], v9, v[16:19], s[4:5] offset:32 glc
	s_waitcnt vmcnt(0)
	v_cmpx_ne_u64_e64 v[10:11], v[18:19]
	s_cbranch_execz .LBB0_18
; %bb.16:                               ; %.preheader1.i.i.i.preheader
	v_mov_b32_e32 v1, 0
	s_mov_b32 s11, 0
.LBB0_17:                               ; %.preheader1.i.i.i
                                        ; =>This Inner Loop Header: Depth=1
	v_dual_mov_b32 v8, s6 :: v_dual_mov_b32 v9, s7
	s_sleep 1
	global_store_b64 v[14:15], v[10:11], off
	s_waitcnt_vscnt null, 0x0
	global_atomic_cmpswap_b64 v[8:9], v1, v[8:11], s[4:5] offset:32 glc
	s_waitcnt vmcnt(0)
	v_cmp_eq_u64_e32 vcc_lo, v[8:9], v[10:11]
	v_dual_mov_b32 v11, v9 :: v_dual_mov_b32 v10, v8
	s_or_b32 s11, vcc_lo, s11
	s_delay_alu instid0(SALU_CYCLE_1)
	s_and_not1_b32 exec_lo, exec_lo, s11
	s_cbranch_execnz .LBB0_17
.LBB0_18:                               ; %Flow562
	s_or_b32 exec_lo, exec_lo, s9
	v_mov_b32_e32 v11, 0
	s_mov_b32 s11, exec_lo
	s_mov_b32 s9, exec_lo
	v_mbcnt_lo_u32_b32 v1, s11, 0
	global_load_b64 v[8:9], v11, s[4:5] offset:16
	v_cmpx_eq_u32_e32 0, v1
	s_cbranch_execz .LBB0_20
; %bb.19:
	s_bcnt1_i32_b32 s11, s11
	s_delay_alu instid0(SALU_CYCLE_1)
	v_mov_b32_e32 v10, s11
	s_waitcnt vmcnt(0)
	global_atomic_add_u64 v[8:9], v[10:11], off offset:8
.LBB0_20:
	s_or_b32 exec_lo, exec_lo, s9
	s_waitcnt vmcnt(0)
	global_load_b64 v[10:11], v[8:9], off offset:16
	s_waitcnt vmcnt(0)
	v_cmp_eq_u64_e32 vcc_lo, 0, v[10:11]
	s_cbranch_vccnz .LBB0_22
; %bb.21:
	global_load_b32 v8, v[8:9], off offset:24
	v_mov_b32_e32 v9, 0
	s_waitcnt vmcnt(0)
	v_readfirstlane_b32 s9, v8
	s_waitcnt_vscnt null, 0x0
	global_store_b64 v[10:11], v[8:9], off
	s_and_b32 m0, s9, 0xff
	s_sendmsg sendmsg(MSG_INTERRUPT)
.LBB0_22:                               ; %Flow563
	s_or_b32 exec_lo, exec_lo, s8
	s_add_i32 s3, s3, s1
	v_add_co_u32 v1, vcc_lo, v12, s10
	v_add_co_ci_u32_e32 v9, vcc_lo, s3, v13, vcc_lo
	s_delay_alu instid0(VALU_DEP_2) | instskip(NEXT) | instid1(VALU_DEP_2)
	v_add_co_u32 v8, vcc_lo, v1, 20
	v_add_co_ci_u32_e32 v9, vcc_lo, 0, v9, vcc_lo
.LBB0_23:                               ; =>This Inner Loop Header: Depth=1
	v_mov_b32_e32 v1, 1
	s_and_saveexec_b32 s1, s0
	s_cbranch_execz .LBB0_25
; %bb.24:                               ;   in Loop: Header=BB0_23 Depth=1
	global_load_b32 v1, v[8:9], off glc
	s_waitcnt vmcnt(0)
	buffer_gl1_inv
	buffer_gl0_inv
	v_and_b32_e32 v1, 1, v1
.LBB0_25:                               ;   in Loop: Header=BB0_23 Depth=1
	s_or_b32 exec_lo, exec_lo, s1
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_readfirstlane_b32 s1, v1
	s_cmp_eq_u32 s1, 0
	s_cbranch_scc1 .LBB0_27
; %bb.26:                               ;   in Loop: Header=BB0_23 Depth=1
	s_mov_b32 s1, 0
	s_sleep 1
	s_branch .LBB0_28
.LBB0_27:                               ;   in Loop: Header=BB0_23 Depth=1
	s_mov_b32 s1, -1
.LBB0_28:                               ; %Flow557
                                        ;   in Loop: Header=BB0_23 Depth=1
	s_delay_alu instid0(SALU_CYCLE_1)
	s_and_not1_b32 vcc_lo, exec_lo, s1
	s_cbranch_vccnz .LBB0_23
; %bb.29:
	global_load_b64 v[8:9], v[4:5], off
	s_and_saveexec_b32 s1, s0
	s_cbranch_execz .LBB0_33
; %bb.30:
	v_mov_b32_e32 v1, 0
	s_clause 0x2
	global_load_b64 v[4:5], v1, s[4:5] offset:40
	global_load_b64 v[14:15], v1, s[4:5] offset:24 glc
	global_load_b64 v[12:13], v1, s[4:5]
	s_waitcnt vmcnt(2)
	v_add_co_u32 v16, vcc_lo, v4, 1
	v_add_co_ci_u32_e32 v17, vcc_lo, 0, v5, vcc_lo
	s_delay_alu instid0(VALU_DEP_2) | instskip(NEXT) | instid1(VALU_DEP_2)
	v_add_co_u32 v10, vcc_lo, v16, s6
	v_add_co_ci_u32_e32 v11, vcc_lo, s7, v17, vcc_lo
	s_delay_alu instid0(VALU_DEP_1) | instskip(SKIP_1) | instid1(VALU_DEP_1)
	v_cmp_eq_u64_e32 vcc_lo, 0, v[10:11]
	v_dual_cndmask_b32 v10, v10, v16 :: v_dual_cndmask_b32 v11, v11, v17
	v_and_b32_e32 v4, v10, v4
	s_delay_alu instid0(VALU_DEP_2) | instskip(NEXT) | instid1(VALU_DEP_2)
	v_and_b32_e32 v5, v11, v5
	v_mul_hi_u32 v16, v4, 24
	v_mul_lo_u32 v4, v4, 24
	s_waitcnt vmcnt(0)
	s_delay_alu instid0(VALU_DEP_1) | instskip(SKIP_2) | instid1(VALU_DEP_1)
	v_add_co_u32 v4, vcc_lo, v12, v4
	v_mov_b32_e32 v12, v14
	v_mul_lo_u32 v5, v5, 24
	v_add_nc_u32_e32 v5, v16, v5
	s_delay_alu instid0(VALU_DEP_1)
	v_add_co_ci_u32_e32 v5, vcc_lo, v13, v5, vcc_lo
	v_mov_b32_e32 v13, v15
	global_store_b64 v[4:5], v[14:15], off
	s_waitcnt_vscnt null, 0x0
	global_atomic_cmpswap_b64 v[12:13], v1, v[10:13], s[4:5] offset:24 glc
	s_waitcnt vmcnt(0)
	v_cmp_ne_u64_e32 vcc_lo, v[12:13], v[14:15]
	s_and_b32 exec_lo, exec_lo, vcc_lo
	s_cbranch_execz .LBB0_33
; %bb.31:                               ; %.preheader.i.i.i.preheader
	s_mov_b32 s0, 0
.LBB0_32:                               ; %.preheader.i.i.i
                                        ; =>This Inner Loop Header: Depth=1
	s_sleep 1
	global_store_b64 v[4:5], v[12:13], off
	s_waitcnt_vscnt null, 0x0
	global_atomic_cmpswap_b64 v[14:15], v1, v[10:13], s[4:5] offset:24 glc
	s_waitcnt vmcnt(0)
	v_cmp_eq_u64_e32 vcc_lo, v[14:15], v[12:13]
	v_dual_mov_b32 v12, v14 :: v_dual_mov_b32 v13, v15
	s_or_b32 s0, vcc_lo, s0
	s_delay_alu instid0(SALU_CYCLE_1)
	s_and_not1_b32 exec_lo, exec_lo, s0
	s_cbranch_execnz .LBB0_32
.LBB0_33:                               ; %__ockl_printf_begin.exit
	s_or_b32 exec_lo, exec_lo, s1
	s_getpc_b64 s[6:7]
	s_add_u32 s6, s6, .str@rel32@lo+4
	s_addc_u32 s7, s7, .str@rel32@hi+12
	s_delay_alu instid0(SALU_CYCLE_1)
	s_cmp_lg_u64 s[6:7], 0
	s_cbranch_scc0 .LBB0_119
; %bb.34:
	s_waitcnt vmcnt(0)
	v_dual_mov_b32 v14, 2 :: v_dual_and_b32 v1, 2, v8
	v_dual_mov_b32 v5, 0 :: v_dual_and_b32 v10, -3, v8
	v_mov_b32_e32 v11, v9
	v_mov_b32_e32 v15, 1
	s_mov_b64 s[8:9], 19
.LBB0_35:                               ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_38 Depth 2
                                        ;     Child Loop BB0_45 Depth 2
                                        ;     Child Loop BB0_53 Depth 2
                                        ;     Child Loop BB0_61 Depth 2
                                        ;     Child Loop BB0_69 Depth 2
                                        ;     Child Loop BB0_77 Depth 2
                                        ;     Child Loop BB0_85 Depth 2
                                        ;     Child Loop BB0_93 Depth 2
                                        ;     Child Loop BB0_101 Depth 2
                                        ;     Child Loop BB0_107 Depth 2
                                        ;     Child Loop BB0_116 Depth 2
	s_delay_alu instid0(SALU_CYCLE_1) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_cmp_lt_u64_e64 s0, s[8:9], 56
                                        ; implicit-def: $vgpr18_vgpr19
                                        ; implicit-def: $sgpr20
	s_and_b32 s0, s0, exec_lo
	s_cselect_b32 s10, s8, 56
	s_cselect_b32 s11, s9, 0
	s_cmp_gt_u32 s10, 7
	s_mov_b32 s0, -1
	s_cbranch_scc1 .LBB0_40
; %bb.36:                               ;   in Loop: Header=BB0_35 Depth=1
	v_mov_b32_e32 v18, 0
	v_mov_b32_e32 v19, 0
	s_cmp_eq_u32 s10, 0
	s_cbranch_scc1 .LBB0_39
; %bb.37:                               ; %.preheader31.i.preheader
                                        ;   in Loop: Header=BB0_35 Depth=1
	s_lshl_b64 s[0:1], s[10:11], 3
	s_mov_b64 s[12:13], 0
	s_mov_b64 s[14:15], s[6:7]
.LBB0_38:                               ; %.preheader31.i
                                        ;   Parent Loop BB0_35 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	global_load_u8 v4, v5, s[14:15]
	s_waitcnt vmcnt(0)
	v_and_b32_e32 v4, 0xffff, v4
	s_delay_alu instid0(VALU_DEP_1)
	v_lshlrev_b64 v[12:13], s12, v[4:5]
	s_add_u32 s12, s12, 8
	s_addc_u32 s13, s13, 0
	s_add_u32 s14, s14, 1
	s_addc_u32 s15, s15, 0
	s_cmp_lg_u32 s0, s12
	v_or_b32_e32 v18, v12, v18
	v_or_b32_e32 v19, v13, v19
	s_cbranch_scc1 .LBB0_38
.LBB0_39:                               ; %Flow533
                                        ;   in Loop: Header=BB0_35 Depth=1
	s_mov_b32 s0, 0
	s_mov_b32 s20, 0
.LBB0_40:                               ; %Flow535
                                        ;   in Loop: Header=BB0_35 Depth=1
	s_and_not1_b32 vcc_lo, exec_lo, s0
	s_mov_b64 s[0:1], s[6:7]
	s_cbranch_vccnz .LBB0_42
; %bb.41:                               ;   in Loop: Header=BB0_35 Depth=1
	global_load_b64 v[18:19], v5, s[6:7]
	s_add_i32 s20, s10, -8
	s_add_u32 s0, s6, 8
	s_addc_u32 s1, s7, 0
.LBB0_42:                               ; %.loopexit32.i
                                        ;   in Loop: Header=BB0_35 Depth=1
	s_cmp_gt_u32 s20, 7
	s_cbranch_scc1 .LBB0_47
; %bb.43:                               ;   in Loop: Header=BB0_35 Depth=1
	v_mov_b32_e32 v20, 0
	v_mov_b32_e32 v21, 0
	s_cmp_eq_u32 s20, 0
	s_cbranch_scc1 .LBB0_46
; %bb.44:                               ; %.preheader29.i.preheader
                                        ;   in Loop: Header=BB0_35 Depth=1
	s_mov_b64 s[12:13], 0
	s_mov_b64 s[14:15], 0
.LBB0_45:                               ; %.preheader29.i
                                        ;   Parent Loop BB0_35 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	s_delay_alu instid0(SALU_CYCLE_1)
	s_add_u32 s30, s0, s14
	s_addc_u32 s31, s1, s15
	s_add_u32 s14, s14, 1
	global_load_u8 v4, v5, s[30:31]
	s_addc_u32 s15, s15, 0
	s_waitcnt vmcnt(0)
	v_and_b32_e32 v4, 0xffff, v4
	s_delay_alu instid0(VALU_DEP_1) | instskip(SKIP_3) | instid1(VALU_DEP_1)
	v_lshlrev_b64 v[12:13], s12, v[4:5]
	s_add_u32 s12, s12, 8
	s_addc_u32 s13, s13, 0
	s_cmp_lg_u32 s20, s14
	v_or_b32_e32 v20, v12, v20
	s_delay_alu instid0(VALU_DEP_2)
	v_or_b32_e32 v21, v13, v21
	s_cbranch_scc1 .LBB0_45
.LBB0_46:                               ; %Flow528
                                        ;   in Loop: Header=BB0_35 Depth=1
	s_mov_b32 s12, 0
	s_mov_b32 s3, 0
	s_branch .LBB0_48
.LBB0_47:                               ;   in Loop: Header=BB0_35 Depth=1
	s_mov_b32 s12, -1
                                        ; implicit-def: $vgpr20_vgpr21
                                        ; implicit-def: $sgpr3
.LBB0_48:                               ; %Flow530
                                        ;   in Loop: Header=BB0_35 Depth=1
	s_delay_alu instid0(SALU_CYCLE_1)
	s_and_not1_b32 vcc_lo, exec_lo, s12
	s_cbranch_vccnz .LBB0_50
; %bb.49:                               ;   in Loop: Header=BB0_35 Depth=1
	global_load_b64 v[20:21], v5, s[0:1]
	s_add_i32 s3, s20, -8
	s_add_u32 s0, s0, 8
	s_addc_u32 s1, s1, 0
.LBB0_50:                               ; %.loopexit30.i
                                        ;   in Loop: Header=BB0_35 Depth=1
	s_cmp_gt_u32 s3, 7
	s_cbranch_scc1 .LBB0_55
; %bb.51:                               ;   in Loop: Header=BB0_35 Depth=1
	v_mov_b32_e32 v22, 0
	v_mov_b32_e32 v23, 0
	s_cmp_eq_u32 s3, 0
	s_cbranch_scc1 .LBB0_54
; %bb.52:                               ; %.preheader27.i.preheader
                                        ;   in Loop: Header=BB0_35 Depth=1
	s_mov_b64 s[12:13], 0
	s_mov_b64 s[14:15], 0
.LBB0_53:                               ; %.preheader27.i
                                        ;   Parent Loop BB0_35 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	s_delay_alu instid0(SALU_CYCLE_1)
	s_add_u32 s20, s0, s14
	s_addc_u32 s21, s1, s15
	s_add_u32 s14, s14, 1
	global_load_u8 v4, v5, s[20:21]
	s_addc_u32 s15, s15, 0
	s_waitcnt vmcnt(0)
	v_and_b32_e32 v4, 0xffff, v4
	s_delay_alu instid0(VALU_DEP_1) | instskip(SKIP_3) | instid1(VALU_DEP_1)
	v_lshlrev_b64 v[12:13], s12, v[4:5]
	s_add_u32 s12, s12, 8
	s_addc_u32 s13, s13, 0
	s_cmp_lg_u32 s3, s14
	v_or_b32_e32 v22, v12, v22
	s_delay_alu instid0(VALU_DEP_2)
	v_or_b32_e32 v23, v13, v23
	s_cbranch_scc1 .LBB0_53
.LBB0_54:                               ; %Flow523
                                        ;   in Loop: Header=BB0_35 Depth=1
	s_mov_b32 s12, 0
	s_mov_b32 s20, 0
	s_branch .LBB0_56
.LBB0_55:                               ;   in Loop: Header=BB0_35 Depth=1
	s_mov_b32 s12, -1
                                        ; implicit-def: $sgpr20
.LBB0_56:                               ; %Flow525
                                        ;   in Loop: Header=BB0_35 Depth=1
	s_delay_alu instid0(SALU_CYCLE_1)
	s_and_not1_b32 vcc_lo, exec_lo, s12
	s_cbranch_vccnz .LBB0_58
; %bb.57:                               ;   in Loop: Header=BB0_35 Depth=1
	global_load_b64 v[22:23], v5, s[0:1]
	s_add_i32 s20, s3, -8
	s_add_u32 s0, s0, 8
	s_addc_u32 s1, s1, 0
.LBB0_58:                               ; %.loopexit28.i
                                        ;   in Loop: Header=BB0_35 Depth=1
	s_cmp_gt_u32 s20, 7
	s_cbranch_scc1 .LBB0_63
; %bb.59:                               ;   in Loop: Header=BB0_35 Depth=1
	v_mov_b32_e32 v24, 0
	v_mov_b32_e32 v25, 0
	s_cmp_eq_u32 s20, 0
	s_cbranch_scc1 .LBB0_62
; %bb.60:                               ; %.preheader25.i.preheader
                                        ;   in Loop: Header=BB0_35 Depth=1
	s_mov_b64 s[12:13], 0
	s_mov_b64 s[14:15], 0
.LBB0_61:                               ; %.preheader25.i
                                        ;   Parent Loop BB0_35 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	s_delay_alu instid0(SALU_CYCLE_1)
	s_add_u32 s30, s0, s14
	s_addc_u32 s31, s1, s15
	s_add_u32 s14, s14, 1
	global_load_u8 v4, v5, s[30:31]
	s_addc_u32 s15, s15, 0
	s_waitcnt vmcnt(0)
	v_and_b32_e32 v4, 0xffff, v4
	s_delay_alu instid0(VALU_DEP_1) | instskip(SKIP_3) | instid1(VALU_DEP_1)
	v_lshlrev_b64 v[12:13], s12, v[4:5]
	s_add_u32 s12, s12, 8
	s_addc_u32 s13, s13, 0
	s_cmp_lg_u32 s20, s14
	v_or_b32_e32 v24, v12, v24
	s_delay_alu instid0(VALU_DEP_2)
	v_or_b32_e32 v25, v13, v25
	s_cbranch_scc1 .LBB0_61
.LBB0_62:                               ; %Flow518
                                        ;   in Loop: Header=BB0_35 Depth=1
	s_mov_b32 s12, 0
	s_mov_b32 s3, 0
	s_branch .LBB0_64
.LBB0_63:                               ;   in Loop: Header=BB0_35 Depth=1
	s_mov_b32 s12, -1
                                        ; implicit-def: $vgpr24_vgpr25
                                        ; implicit-def: $sgpr3
.LBB0_64:                               ; %Flow520
                                        ;   in Loop: Header=BB0_35 Depth=1
	s_delay_alu instid0(SALU_CYCLE_1)
	s_and_not1_b32 vcc_lo, exec_lo, s12
	s_cbranch_vccnz .LBB0_66
; %bb.65:                               ;   in Loop: Header=BB0_35 Depth=1
	global_load_b64 v[24:25], v5, s[0:1]
	s_add_i32 s3, s20, -8
	s_add_u32 s0, s0, 8
	s_addc_u32 s1, s1, 0
.LBB0_66:                               ; %.loopexit26.i
                                        ;   in Loop: Header=BB0_35 Depth=1
	s_cmp_gt_u32 s3, 7
	s_cbranch_scc1 .LBB0_71
; %bb.67:                               ;   in Loop: Header=BB0_35 Depth=1
	v_mov_b32_e32 v26, 0
	v_mov_b32_e32 v27, 0
	s_cmp_eq_u32 s3, 0
	s_cbranch_scc1 .LBB0_70
; %bb.68:                               ; %.preheader23.i.preheader
                                        ;   in Loop: Header=BB0_35 Depth=1
	s_mov_b64 s[12:13], 0
	s_mov_b64 s[14:15], 0
.LBB0_69:                               ; %.preheader23.i
                                        ;   Parent Loop BB0_35 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	s_delay_alu instid0(SALU_CYCLE_1)
	s_add_u32 s20, s0, s14
	s_addc_u32 s21, s1, s15
	s_add_u32 s14, s14, 1
	global_load_u8 v4, v5, s[20:21]
	s_addc_u32 s15, s15, 0
	s_waitcnt vmcnt(0)
	v_and_b32_e32 v4, 0xffff, v4
	s_delay_alu instid0(VALU_DEP_1) | instskip(SKIP_3) | instid1(VALU_DEP_1)
	v_lshlrev_b64 v[12:13], s12, v[4:5]
	s_add_u32 s12, s12, 8
	s_addc_u32 s13, s13, 0
	s_cmp_lg_u32 s3, s14
	v_or_b32_e32 v26, v12, v26
	s_delay_alu instid0(VALU_DEP_2)
	v_or_b32_e32 v27, v13, v27
	s_cbranch_scc1 .LBB0_69
.LBB0_70:                               ; %Flow513
                                        ;   in Loop: Header=BB0_35 Depth=1
	s_mov_b32 s12, 0
	s_mov_b32 s20, 0
	s_branch .LBB0_72
.LBB0_71:                               ;   in Loop: Header=BB0_35 Depth=1
	s_mov_b32 s12, -1
                                        ; implicit-def: $sgpr20
.LBB0_72:                               ; %Flow515
                                        ;   in Loop: Header=BB0_35 Depth=1
	s_delay_alu instid0(SALU_CYCLE_1)
	s_and_not1_b32 vcc_lo, exec_lo, s12
	s_cbranch_vccnz .LBB0_74
; %bb.73:                               ;   in Loop: Header=BB0_35 Depth=1
	global_load_b64 v[26:27], v5, s[0:1]
	s_add_i32 s20, s3, -8
	s_add_u32 s0, s0, 8
	s_addc_u32 s1, s1, 0
.LBB0_74:                               ; %.loopexit24.i
                                        ;   in Loop: Header=BB0_35 Depth=1
	s_cmp_gt_u32 s20, 7
	s_cbranch_scc1 .LBB0_79
; %bb.75:                               ;   in Loop: Header=BB0_35 Depth=1
	v_mov_b32_e32 v28, 0
	v_mov_b32_e32 v29, 0
	s_cmp_eq_u32 s20, 0
	s_cbranch_scc1 .LBB0_78
; %bb.76:                               ; %.preheader21.i.preheader
                                        ;   in Loop: Header=BB0_35 Depth=1
	s_mov_b64 s[12:13], 0
	s_mov_b64 s[14:15], 0
.LBB0_77:                               ; %.preheader21.i
                                        ;   Parent Loop BB0_35 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	s_delay_alu instid0(SALU_CYCLE_1)
	s_add_u32 s30, s0, s14
	s_addc_u32 s31, s1, s15
	s_add_u32 s14, s14, 1
	global_load_u8 v4, v5, s[30:31]
	s_addc_u32 s15, s15, 0
	s_waitcnt vmcnt(0)
	v_and_b32_e32 v4, 0xffff, v4
	s_delay_alu instid0(VALU_DEP_1) | instskip(SKIP_3) | instid1(VALU_DEP_1)
	v_lshlrev_b64 v[12:13], s12, v[4:5]
	s_add_u32 s12, s12, 8
	s_addc_u32 s13, s13, 0
	s_cmp_lg_u32 s20, s14
	v_or_b32_e32 v28, v12, v28
	s_delay_alu instid0(VALU_DEP_2)
	v_or_b32_e32 v29, v13, v29
	s_cbranch_scc1 .LBB0_77
.LBB0_78:                               ; %Flow508
                                        ;   in Loop: Header=BB0_35 Depth=1
	s_mov_b32 s12, 0
	s_mov_b32 s3, 0
	s_branch .LBB0_80
.LBB0_79:                               ;   in Loop: Header=BB0_35 Depth=1
	s_mov_b32 s12, -1
                                        ; implicit-def: $vgpr28_vgpr29
                                        ; implicit-def: $sgpr3
.LBB0_80:                               ; %Flow510
                                        ;   in Loop: Header=BB0_35 Depth=1
	s_delay_alu instid0(SALU_CYCLE_1)
	s_and_not1_b32 vcc_lo, exec_lo, s12
	s_cbranch_vccnz .LBB0_82
; %bb.81:                               ;   in Loop: Header=BB0_35 Depth=1
	global_load_b64 v[28:29], v5, s[0:1]
	s_add_i32 s3, s20, -8
	s_add_u32 s0, s0, 8
	s_addc_u32 s1, s1, 0
.LBB0_82:                               ; %.loopexit22.i
                                        ;   in Loop: Header=BB0_35 Depth=1
	s_cmp_gt_u32 s3, 7
	s_cbranch_scc1 .LBB0_87
; %bb.83:                               ;   in Loop: Header=BB0_35 Depth=1
	v_mov_b32_e32 v30, 0
	v_mov_b32_e32 v31, 0
	s_cmp_eq_u32 s3, 0
	s_cbranch_scc1 .LBB0_86
; %bb.84:                               ; %.preheader.i.preheader
                                        ;   in Loop: Header=BB0_35 Depth=1
	s_mov_b64 s[12:13], 0
	s_mov_b64 s[14:15], s[0:1]
.LBB0_85:                               ; %.preheader.i
                                        ;   Parent Loop BB0_35 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	global_load_u8 v4, v5, s[14:15]
	s_add_i32 s3, s3, -1
	s_waitcnt vmcnt(0)
	v_and_b32_e32 v4, 0xffff, v4
	s_delay_alu instid0(VALU_DEP_1)
	v_lshlrev_b64 v[12:13], s12, v[4:5]
	s_add_u32 s12, s12, 8
	s_addc_u32 s13, s13, 0
	s_add_u32 s14, s14, 1
	s_addc_u32 s15, s15, 0
	s_cmp_lg_u32 s3, 0
	v_or_b32_e32 v30, v12, v30
	v_or_b32_e32 v31, v13, v31
	s_cbranch_scc1 .LBB0_85
.LBB0_86:                               ; %Flow503
                                        ;   in Loop: Header=BB0_35 Depth=1
	s_mov_b32 s3, 0
	s_branch .LBB0_88
.LBB0_87:                               ;   in Loop: Header=BB0_35 Depth=1
	s_mov_b32 s3, -1
.LBB0_88:                               ; %Flow505
                                        ;   in Loop: Header=BB0_35 Depth=1
	s_delay_alu instid0(SALU_CYCLE_1)
	s_and_not1_b32 vcc_lo, exec_lo, s3
	s_cbranch_vccnz .LBB0_90
; %bb.89:                               ;   in Loop: Header=BB0_35 Depth=1
	global_load_b64 v[30:31], v5, s[0:1]
.LBB0_90:                               ; %.loopexit.i
                                        ;   in Loop: Header=BB0_35 Depth=1
	v_mov_b32_e32 v4, v40
	s_waitcnt vmcnt(0)
	v_mov_b32_e32 v12, 0
	v_mov_b32_e32 v13, 0
	;;#ASMSTART
	;;#ASMEND
	v_readfirstlane_b32 s0, v4
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_cmp_eq_u32_e64 s0, s0, v4
	s_and_saveexec_b32 s1, s0
	s_cbranch_execz .LBB0_96
; %bb.91:                               ;   in Loop: Header=BB0_35 Depth=1
	global_load_b64 v[34:35], v5, s[4:5] offset:24 glc
	s_waitcnt vmcnt(0)
	buffer_gl1_inv
	buffer_gl0_inv
	s_clause 0x1
	global_load_b64 v[12:13], v5, s[4:5] offset:40
	global_load_b64 v[16:17], v5, s[4:5]
	s_mov_b32 s3, exec_lo
	s_waitcnt vmcnt(1)
	v_and_b32_e32 v13, v13, v35
	v_and_b32_e32 v12, v12, v34
	s_delay_alu instid0(VALU_DEP_2) | instskip(NEXT) | instid1(VALU_DEP_2)
	v_mul_lo_u32 v13, v13, 24
	v_mul_hi_u32 v32, v12, 24
	v_mul_lo_u32 v12, v12, 24
	s_delay_alu instid0(VALU_DEP_2) | instskip(SKIP_1) | instid1(VALU_DEP_2)
	v_add_nc_u32_e32 v13, v32, v13
	s_waitcnt vmcnt(0)
	v_add_co_u32 v12, vcc_lo, v16, v12
	s_delay_alu instid0(VALU_DEP_2)
	v_add_co_ci_u32_e32 v13, vcc_lo, v17, v13, vcc_lo
	global_load_b64 v[32:33], v[12:13], off glc
	s_waitcnt vmcnt(0)
	global_atomic_cmpswap_b64 v[12:13], v5, v[32:35], s[4:5] offset:24 glc
	s_waitcnt vmcnt(0)
	buffer_gl1_inv
	buffer_gl0_inv
	v_cmpx_ne_u64_e64 v[12:13], v[34:35]
	s_cbranch_execz .LBB0_95
; %bb.92:                               ; %.preheader3.i.i19.i.preheader
                                        ;   in Loop: Header=BB0_35 Depth=1
	s_mov_b32 s12, 0
.LBB0_93:                               ; %.preheader3.i.i19.i
                                        ;   Parent Loop BB0_35 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	s_sleep 1
	s_clause 0x1
	global_load_b64 v[16:17], v5, s[4:5] offset:40
	global_load_b64 v[32:33], v5, s[4:5]
	v_dual_mov_b32 v35, v13 :: v_dual_mov_b32 v34, v12
	s_waitcnt vmcnt(1)
	s_delay_alu instid0(VALU_DEP_1) | instskip(SKIP_1) | instid1(VALU_DEP_1)
	v_and_b32_e32 v16, v16, v34
	s_waitcnt vmcnt(0)
	v_mad_u64_u32 v[12:13], null, v16, 24, v[32:33]
	v_and_b32_e32 v32, v17, v35
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_mad_u64_u32 v[16:17], null, v32, 24, v[13:14]
	v_mov_b32_e32 v13, v16
	global_load_b64 v[32:33], v[12:13], off glc
	s_waitcnt vmcnt(0)
	global_atomic_cmpswap_b64 v[12:13], v5, v[32:35], s[4:5] offset:24 glc
	s_waitcnt vmcnt(0)
	buffer_gl1_inv
	buffer_gl0_inv
	v_cmp_eq_u64_e32 vcc_lo, v[12:13], v[34:35]
	s_or_b32 s12, vcc_lo, s12
	s_delay_alu instid0(SALU_CYCLE_1)
	s_and_not1_b32 exec_lo, exec_lo, s12
	s_cbranch_execnz .LBB0_93
; %bb.94:                               ; %Flow498
                                        ;   in Loop: Header=BB0_35 Depth=1
	s_or_b32 exec_lo, exec_lo, s12
.LBB0_95:                               ; %Flow500
                                        ;   in Loop: Header=BB0_35 Depth=1
	s_delay_alu instid0(SALU_CYCLE_1)
	s_or_b32 exec_lo, exec_lo, s3
.LBB0_96:                               ; %.loopexit4.i.i14.i
                                        ;   in Loop: Header=BB0_35 Depth=1
	s_delay_alu instid0(SALU_CYCLE_1)
	s_or_b32 exec_lo, exec_lo, s1
	s_clause 0x1
	global_load_b64 v[16:17], v5, s[4:5] offset:40
	global_load_b128 v[32:35], v5, s[4:5]
	v_readfirstlane_b32 s12, v12
	v_readfirstlane_b32 s13, v13
	s_mov_b32 s21, exec_lo
	s_waitcnt vmcnt(1)
	v_readfirstlane_b32 s14, v16
	v_readfirstlane_b32 s15, v17
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(SALU_CYCLE_1)
	s_and_b64 s[14:15], s[12:13], s[14:15]
	s_mul_i32 s1, s15, 24
	s_mul_hi_u32 s3, s14, 24
	s_mul_i32 s20, s14, 24
	s_and_saveexec_b32 s30, s0
	s_cbranch_execz .LBB0_98
; %bb.97:                               ;   in Loop: Header=BB0_35 Depth=1
	v_dual_mov_b32 v12, s21 :: v_dual_mov_b32 v13, v5
	s_add_i32 s21, s3, s1
	s_waitcnt vmcnt(0)
	v_add_co_u32 v16, vcc_lo, v32, s20
	v_add_co_ci_u32_e32 v17, vcc_lo, s21, v33, vcc_lo
	global_store_b128 v[16:17], v[12:15], off offset:8
.LBB0_98:                               ;   in Loop: Header=BB0_35 Depth=1
	s_or_b32 exec_lo, exec_lo, s30
	v_cmp_gt_u64_e64 vcc_lo, s[8:9], 56
	v_or_b32_e32 v12, 0, v11
	v_or_b32_e32 v13, v10, v1
	s_lshl_b64 s[14:15], s[14:15], 12
	s_lshl_b32 s21, s10, 2
	s_delay_alu instid0(SALU_CYCLE_1) | instskip(NEXT) | instid1(VALU_DEP_1)
	s_add_i32 s21, s21, 28
	v_dual_cndmask_b32 v17, v12, v11 :: v_dual_cndmask_b32 v12, v13, v10
	v_lshlrev_b64 v[10:11], 6, v[4:5]
	s_waitcnt vmcnt(0)
	v_add_co_u32 v4, vcc_lo, v34, s14
	v_add_co_ci_u32_e32 v13, vcc_lo, s15, v35, vcc_lo
	s_and_b32 s21, s21, 0x1e0
	s_delay_alu instid0(VALU_DEP_2) | instskip(SKIP_1) | instid1(VALU_DEP_3)
	v_add_co_u32 v34, vcc_lo, v4, v10
	v_and_or_b32 v16, 0xffffff1f, v12, s21
	v_add_co_ci_u32_e32 v35, vcc_lo, v13, v11, vcc_lo
	s_clause 0x3
	global_store_b128 v[34:35], v[16:19], off
	global_store_b128 v[34:35], v[20:23], off offset:16
	global_store_b128 v[34:35], v[24:27], off offset:32
	global_store_b128 v[34:35], v[28:31], off offset:48
	s_and_saveexec_b32 s14, s0
	s_cbranch_execz .LBB0_106
; %bb.99:                               ;   in Loop: Header=BB0_35 Depth=1
	s_clause 0x1
	global_load_b64 v[20:21], v5, s[4:5] offset:32 glc
	global_load_b64 v[10:11], v5, s[4:5] offset:40
	v_dual_mov_b32 v18, s12 :: v_dual_mov_b32 v19, s13
	s_waitcnt vmcnt(0)
	v_readfirstlane_b32 s30, v10
	v_readfirstlane_b32 s31, v11
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(SALU_CYCLE_1)
	s_and_b64 s[30:31], s[30:31], s[12:13]
	s_mul_i32 s15, s31, 24
	s_mul_hi_u32 s21, s30, 24
	s_mul_i32 s30, s30, 24
	s_add_i32 s21, s21, s15
	v_add_co_u32 v16, vcc_lo, v32, s30
	v_add_co_ci_u32_e32 v17, vcc_lo, s21, v33, vcc_lo
	s_mov_b32 s15, exec_lo
	global_store_b64 v[16:17], v[20:21], off
	s_waitcnt_vscnt null, 0x0
	global_atomic_cmpswap_b64 v[12:13], v5, v[18:21], s[4:5] offset:32 glc
	s_waitcnt vmcnt(0)
	v_cmpx_ne_u64_e64 v[12:13], v[20:21]
	s_cbranch_execz .LBB0_102
; %bb.100:                              ; %.preheader1.i.i17.i.preheader
                                        ;   in Loop: Header=BB0_35 Depth=1
	s_mov_b32 s21, 0
.LBB0_101:                              ; %.preheader1.i.i17.i
                                        ;   Parent Loop BB0_35 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	v_dual_mov_b32 v10, s12 :: v_dual_mov_b32 v11, s13
	s_sleep 1
	global_store_b64 v[16:17], v[12:13], off
	s_waitcnt_vscnt null, 0x0
	global_atomic_cmpswap_b64 v[10:11], v5, v[10:13], s[4:5] offset:32 glc
	s_waitcnt vmcnt(0)
	v_cmp_eq_u64_e32 vcc_lo, v[10:11], v[12:13]
	v_dual_mov_b32 v13, v11 :: v_dual_mov_b32 v12, v10
	s_or_b32 s21, vcc_lo, s21
	s_delay_alu instid0(SALU_CYCLE_1)
	s_and_not1_b32 exec_lo, exec_lo, s21
	s_cbranch_execnz .LBB0_101
.LBB0_102:                              ; %Flow496
                                        ;   in Loop: Header=BB0_35 Depth=1
	s_or_b32 exec_lo, exec_lo, s15
	global_load_b64 v[10:11], v5, s[4:5] offset:16
	s_mov_b32 s21, exec_lo
	s_mov_b32 s15, exec_lo
	v_mbcnt_lo_u32_b32 v4, s21, 0
	s_delay_alu instid0(VALU_DEP_1)
	v_cmpx_eq_u32_e32 0, v4
	s_cbranch_execz .LBB0_104
; %bb.103:                              ;   in Loop: Header=BB0_35 Depth=1
	s_bcnt1_i32_b32 s21, s21
	s_delay_alu instid0(SALU_CYCLE_1)
	v_mov_b32_e32 v4, s21
	s_waitcnt vmcnt(0)
	global_atomic_add_u64 v[10:11], v[4:5], off offset:8
.LBB0_104:                              ;   in Loop: Header=BB0_35 Depth=1
	s_or_b32 exec_lo, exec_lo, s15
	s_waitcnt vmcnt(0)
	global_load_b64 v[12:13], v[10:11], off offset:16
	s_waitcnt vmcnt(0)
	v_cmp_eq_u64_e32 vcc_lo, 0, v[12:13]
	s_cbranch_vccnz .LBB0_106
; %bb.105:                              ;   in Loop: Header=BB0_35 Depth=1
	global_load_b32 v4, v[10:11], off offset:24
	s_waitcnt vmcnt(0)
	v_readfirstlane_b32 s15, v4
	s_waitcnt_vscnt null, 0x0
	global_store_b64 v[12:13], v[4:5], off
	s_and_b32 m0, s15, 0xff
	s_sendmsg sendmsg(MSG_INTERRUPT)
.LBB0_106:                              ; %Flow497
                                        ;   in Loop: Header=BB0_35 Depth=1
	s_or_b32 exec_lo, exec_lo, s14
	s_add_i32 s3, s3, s1
	v_add_co_u32 v4, vcc_lo, v32, s20
	v_add_co_ci_u32_e32 v11, vcc_lo, s3, v33, vcc_lo
	s_delay_alu instid0(VALU_DEP_2) | instskip(NEXT) | instid1(VALU_DEP_2)
	v_add_co_u32 v10, vcc_lo, v4, 20
	v_add_co_ci_u32_e32 v11, vcc_lo, 0, v11, vcc_lo
.LBB0_107:                              ;   Parent Loop BB0_35 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	v_mov_b32_e32 v4, 1
	s_and_saveexec_b32 s1, s0
	s_cbranch_execz .LBB0_109
; %bb.108:                              ;   in Loop: Header=BB0_107 Depth=2
	global_load_b32 v4, v[10:11], off glc
	s_waitcnt vmcnt(0)
	buffer_gl1_inv
	buffer_gl0_inv
	v_and_b32_e32 v4, 1, v4
.LBB0_109:                              ;   in Loop: Header=BB0_107 Depth=2
	s_or_b32 exec_lo, exec_lo, s1
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_readfirstlane_b32 s1, v4
	s_cmp_eq_u32 s1, 0
	s_cbranch_scc1 .LBB0_111
; %bb.110:                              ;   in Loop: Header=BB0_107 Depth=2
	s_mov_b32 s1, 0
	s_sleep 1
	s_branch .LBB0_112
.LBB0_111:                              ;   in Loop: Header=BB0_107 Depth=2
	s_mov_b32 s1, -1
.LBB0_112:                              ; %Flow491
                                        ;   in Loop: Header=BB0_107 Depth=2
	s_delay_alu instid0(SALU_CYCLE_1)
	s_and_not1_b32 vcc_lo, exec_lo, s1
	s_cbranch_vccnz .LBB0_107
; %bb.113:                              ;   in Loop: Header=BB0_35 Depth=1
	global_load_b128 v[10:13], v[34:35], off
	s_and_saveexec_b32 s1, s0
	s_cbranch_execz .LBB0_117
; %bb.114:                              ;   in Loop: Header=BB0_35 Depth=1
	s_clause 0x2
	global_load_b64 v[12:13], v5, s[4:5] offset:40
	global_load_b64 v[20:21], v5, s[4:5] offset:24 glc
	global_load_b64 v[18:19], v5, s[4:5]
	s_waitcnt vmcnt(2)
	v_add_co_u32 v4, vcc_lo, v12, 1
	v_add_co_ci_u32_e32 v22, vcc_lo, 0, v13, vcc_lo
	s_delay_alu instid0(VALU_DEP_2) | instskip(NEXT) | instid1(VALU_DEP_2)
	v_add_co_u32 v16, vcc_lo, v4, s12
	v_add_co_ci_u32_e32 v17, vcc_lo, s13, v22, vcc_lo
	s_delay_alu instid0(VALU_DEP_1) | instskip(SKIP_1) | instid1(VALU_DEP_1)
	v_cmp_eq_u64_e32 vcc_lo, 0, v[16:17]
	v_dual_cndmask_b32 v17, v17, v22 :: v_dual_cndmask_b32 v16, v16, v4
	v_and_b32_e32 v4, v17, v13
	s_delay_alu instid0(VALU_DEP_2) | instskip(NEXT) | instid1(VALU_DEP_2)
	v_and_b32_e32 v12, v16, v12
	v_mul_lo_u32 v4, v4, 24
	s_delay_alu instid0(VALU_DEP_2) | instskip(SKIP_1) | instid1(VALU_DEP_2)
	v_mul_hi_u32 v13, v12, 24
	v_mul_lo_u32 v12, v12, 24
	v_add_nc_u32_e32 v4, v13, v4
	s_waitcnt vmcnt(0)
	s_delay_alu instid0(VALU_DEP_2) | instskip(SKIP_1) | instid1(VALU_DEP_3)
	v_add_co_u32 v12, vcc_lo, v18, v12
	v_mov_b32_e32 v18, v20
	v_add_co_ci_u32_e32 v13, vcc_lo, v19, v4, vcc_lo
	v_mov_b32_e32 v19, v21
	global_store_b64 v[12:13], v[20:21], off
	s_waitcnt_vscnt null, 0x0
	global_atomic_cmpswap_b64 v[18:19], v5, v[16:19], s[4:5] offset:24 glc
	s_waitcnt vmcnt(0)
	v_cmp_ne_u64_e32 vcc_lo, v[18:19], v[20:21]
	s_and_b32 exec_lo, exec_lo, vcc_lo
	s_cbranch_execz .LBB0_117
; %bb.115:                              ; %.preheader.i.i16.i.preheader
                                        ;   in Loop: Header=BB0_35 Depth=1
	s_mov_b32 s0, 0
.LBB0_116:                              ; %.preheader.i.i16.i
                                        ;   Parent Loop BB0_35 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	s_sleep 1
	global_store_b64 v[12:13], v[18:19], off
	s_waitcnt_vscnt null, 0x0
	global_atomic_cmpswap_b64 v[20:21], v5, v[16:19], s[4:5] offset:24 glc
	s_waitcnt vmcnt(0)
	v_cmp_eq_u64_e32 vcc_lo, v[20:21], v[18:19]
	v_dual_mov_b32 v18, v20 :: v_dual_mov_b32 v19, v21
	s_or_b32 s0, vcc_lo, s0
	s_delay_alu instid0(SALU_CYCLE_1)
	s_and_not1_b32 exec_lo, exec_lo, s0
	s_cbranch_execnz .LBB0_116
.LBB0_117:                              ; %__ockl_hostcall_preview.exit20.i
                                        ;   in Loop: Header=BB0_35 Depth=1
	s_or_b32 exec_lo, exec_lo, s1
	s_sub_u32 s8, s8, s10
	s_subb_u32 s9, s9, s11
	s_add_u32 s6, s6, s10
	s_addc_u32 s7, s7, s11
	s_cmp_lg_u64 s[8:9], 0
	s_cbranch_scc1 .LBB0_35
; %bb.118:                              ; %Flow536
	s_mov_b32 s0, 0
	s_branch .LBB0_120
.LBB0_119:
	s_mov_b32 s0, -1
                                        ; implicit-def: $vgpr10_vgpr11
.LBB0_120:                              ; %Flow551
	s_delay_alu instid0(SALU_CYCLE_1)
	s_and_b32 vcc_lo, exec_lo, s0
	s_cbranch_vccz .LBB0_149
; %bb.121:
	s_waitcnt vmcnt(0)
	v_mov_b32_e32 v10, v40
	v_mov_b32_e32 v4, 0
	v_mov_b32_e32 v5, 0
	;;#ASMSTART
	;;#ASMEND
	s_delay_alu instid0(VALU_DEP_3) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_readfirstlane_b32 s0, v10
	v_cmp_eq_u32_e64 s0, s0, v10
	s_delay_alu instid0(VALU_DEP_1)
	s_and_saveexec_b32 s1, s0
	s_cbranch_execz .LBB0_127
; %bb.122:
	v_mov_b32_e32 v1, 0
	s_mov_b32 s3, exec_lo
	global_load_b64 v[13:14], v1, s[4:5] offset:24 glc
	s_waitcnt vmcnt(0)
	buffer_gl1_inv
	buffer_gl0_inv
	s_clause 0x1
	global_load_b64 v[4:5], v1, s[4:5] offset:40
	global_load_b64 v[11:12], v1, s[4:5]
	s_waitcnt vmcnt(1)
	v_and_b32_e32 v4, v4, v13
	v_and_b32_e32 v5, v5, v14
	s_delay_alu instid0(VALU_DEP_2) | instskip(NEXT) | instid1(VALU_DEP_2)
	v_mul_hi_u32 v15, v4, 24
	v_mul_lo_u32 v5, v5, 24
	v_mul_lo_u32 v4, v4, 24
	s_delay_alu instid0(VALU_DEP_2) | instskip(SKIP_1) | instid1(VALU_DEP_2)
	v_add_nc_u32_e32 v5, v15, v5
	s_waitcnt vmcnt(0)
	v_add_co_u32 v4, vcc_lo, v11, v4
	s_delay_alu instid0(VALU_DEP_2)
	v_add_co_ci_u32_e32 v5, vcc_lo, v12, v5, vcc_lo
	global_load_b64 v[11:12], v[4:5], off glc
	s_waitcnt vmcnt(0)
	global_atomic_cmpswap_b64 v[4:5], v1, v[11:14], s[4:5] offset:24 glc
	s_waitcnt vmcnt(0)
	buffer_gl1_inv
	buffer_gl0_inv
	v_cmpx_ne_u64_e64 v[4:5], v[13:14]
	s_cbranch_execz .LBB0_126
; %bb.123:                              ; %.preheader3.i.i.i116.preheader
	s_mov_b32 s6, 0
.LBB0_124:                              ; %.preheader3.i.i.i116
                                        ; =>This Inner Loop Header: Depth=1
	s_sleep 1
	s_clause 0x1
	global_load_b64 v[11:12], v1, s[4:5] offset:40
	global_load_b64 v[15:16], v1, s[4:5]
	v_dual_mov_b32 v14, v5 :: v_dual_mov_b32 v13, v4
	s_waitcnt vmcnt(1)
	s_delay_alu instid0(VALU_DEP_1) | instskip(SKIP_1) | instid1(VALU_DEP_1)
	v_and_b32_e32 v11, v11, v13
	s_waitcnt vmcnt(0)
	v_mad_u64_u32 v[4:5], null, v11, 24, v[15:16]
	v_and_b32_e32 v15, v12, v14
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_mad_u64_u32 v[11:12], null, v15, 24, v[5:6]
	v_mov_b32_e32 v5, v11
	global_load_b64 v[11:12], v[4:5], off glc
	s_waitcnt vmcnt(0)
	global_atomic_cmpswap_b64 v[4:5], v1, v[11:14], s[4:5] offset:24 glc
	s_waitcnt vmcnt(0)
	buffer_gl1_inv
	buffer_gl0_inv
	v_cmp_eq_u64_e32 vcc_lo, v[4:5], v[13:14]
	s_or_b32 s6, vcc_lo, s6
	s_delay_alu instid0(SALU_CYCLE_1)
	s_and_not1_b32 exec_lo, exec_lo, s6
	s_cbranch_execnz .LBB0_124
; %bb.125:                              ; %Flow548
	s_or_b32 exec_lo, exec_lo, s6
.LBB0_126:                              ; %Flow550
	s_delay_alu instid0(SALU_CYCLE_1)
	s_or_b32 exec_lo, exec_lo, s3
.LBB0_127:                              ; %.loopexit4.i.i.i111
	s_delay_alu instid0(SALU_CYCLE_1)
	s_or_b32 exec_lo, exec_lo, s1
	v_mov_b32_e32 v11, 0
	v_readfirstlane_b32 s6, v4
	v_readfirstlane_b32 s7, v5
	s_mov_b32 s11, exec_lo
	s_clause 0x1
	global_load_b64 v[16:17], v11, s[4:5] offset:40
	global_load_b128 v[12:15], v11, s[4:5]
	s_waitcnt vmcnt(1)
	v_readfirstlane_b32 s8, v16
	v_readfirstlane_b32 s9, v17
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(SALU_CYCLE_1)
	s_and_b64 s[8:9], s[6:7], s[8:9]
	s_mul_i32 s1, s9, 24
	s_mul_hi_u32 s3, s8, 24
	s_mul_i32 s10, s8, 24
	s_and_saveexec_b32 s12, s0
	s_cbranch_execz .LBB0_129
; %bb.128:
	v_dual_mov_b32 v16, s11 :: v_dual_mov_b32 v17, v11
	s_add_i32 s11, s3, s1
	s_waitcnt vmcnt(0)
	v_add_co_u32 v4, vcc_lo, v12, s10
	v_add_co_ci_u32_e32 v5, vcc_lo, s11, v13, vcc_lo
	v_dual_mov_b32 v18, 2 :: v_dual_mov_b32 v19, 1
	global_store_b128 v[4:5], v[16:19], off offset:8
.LBB0_129:
	s_or_b32 exec_lo, exec_lo, s12
	s_lshl_b64 s[8:9], s[8:9], 12
	v_lshlrev_b64 v[4:5], 6, v[10:11]
	s_waitcnt vmcnt(0)
	v_add_co_u32 v1, vcc_lo, v14, s8
	v_add_co_ci_u32_e32 v10, vcc_lo, s9, v15, vcc_lo
	s_mov_b32 s12, 0
	s_delay_alu instid0(VALU_DEP_2)
	v_add_co_u32 v4, vcc_lo, v1, v4
	s_mov_b32 s15, s12
	s_mov_b32 s13, s12
	s_mov_b32 s14, s12
	v_and_or_b32 v8, 0xffffff1f, v8, 32
	v_add_co_ci_u32_e32 v5, vcc_lo, v10, v5, vcc_lo
	v_dual_mov_b32 v10, v11 :: v_dual_mov_b32 v17, s15
	v_dual_mov_b32 v16, s14 :: v_dual_mov_b32 v15, s13
	v_mov_b32_e32 v14, s12
	s_clause 0x3
	global_store_b128 v[4:5], v[8:11], off
	global_store_b128 v[4:5], v[14:17], off offset:16
	global_store_b128 v[4:5], v[14:17], off offset:32
	global_store_b128 v[4:5], v[14:17], off offset:48
	s_and_saveexec_b32 s8, s0
	s_cbranch_execz .LBB0_137
; %bb.130:
	v_dual_mov_b32 v1, 0 :: v_dual_mov_b32 v16, s6
	v_mov_b32_e32 v17, s7
	s_clause 0x1
	global_load_b64 v[18:19], v1, s[4:5] offset:32 glc
	global_load_b64 v[8:9], v1, s[4:5] offset:40
	s_waitcnt vmcnt(0)
	v_readfirstlane_b32 s12, v8
	v_readfirstlane_b32 s13, v9
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(SALU_CYCLE_1)
	s_and_b64 s[12:13], s[12:13], s[6:7]
	s_mul_i32 s9, s13, 24
	s_mul_hi_u32 s11, s12, 24
	s_mul_i32 s12, s12, 24
	s_add_i32 s11, s11, s9
	v_add_co_u32 v14, vcc_lo, v12, s12
	v_add_co_ci_u32_e32 v15, vcc_lo, s11, v13, vcc_lo
	s_mov_b32 s9, exec_lo
	global_store_b64 v[14:15], v[18:19], off
	s_waitcnt_vscnt null, 0x0
	global_atomic_cmpswap_b64 v[10:11], v1, v[16:19], s[4:5] offset:32 glc
	s_waitcnt vmcnt(0)
	v_cmpx_ne_u64_e64 v[10:11], v[18:19]
	s_cbranch_execz .LBB0_133
; %bb.131:                              ; %.preheader1.i.i.i114.preheader
	s_mov_b32 s11, 0
.LBB0_132:                              ; %.preheader1.i.i.i114
                                        ; =>This Inner Loop Header: Depth=1
	v_dual_mov_b32 v8, s6 :: v_dual_mov_b32 v9, s7
	s_sleep 1
	global_store_b64 v[14:15], v[10:11], off
	s_waitcnt_vscnt null, 0x0
	global_atomic_cmpswap_b64 v[8:9], v1, v[8:11], s[4:5] offset:32 glc
	s_waitcnt vmcnt(0)
	v_cmp_eq_u64_e32 vcc_lo, v[8:9], v[10:11]
	v_dual_mov_b32 v11, v9 :: v_dual_mov_b32 v10, v8
	s_or_b32 s11, vcc_lo, s11
	s_delay_alu instid0(SALU_CYCLE_1)
	s_and_not1_b32 exec_lo, exec_lo, s11
	s_cbranch_execnz .LBB0_132
.LBB0_133:                              ; %Flow546
	s_or_b32 exec_lo, exec_lo, s9
	v_mov_b32_e32 v11, 0
	s_mov_b32 s11, exec_lo
	s_mov_b32 s9, exec_lo
	v_mbcnt_lo_u32_b32 v1, s11, 0
	global_load_b64 v[8:9], v11, s[4:5] offset:16
	v_cmpx_eq_u32_e32 0, v1
	s_cbranch_execz .LBB0_135
; %bb.134:
	s_bcnt1_i32_b32 s11, s11
	s_delay_alu instid0(SALU_CYCLE_1)
	v_mov_b32_e32 v10, s11
	s_waitcnt vmcnt(0)
	global_atomic_add_u64 v[8:9], v[10:11], off offset:8
.LBB0_135:
	s_or_b32 exec_lo, exec_lo, s9
	s_waitcnt vmcnt(0)
	global_load_b64 v[10:11], v[8:9], off offset:16
	s_waitcnt vmcnt(0)
	v_cmp_eq_u64_e32 vcc_lo, 0, v[10:11]
	s_cbranch_vccnz .LBB0_137
; %bb.136:
	global_load_b32 v8, v[8:9], off offset:24
	v_mov_b32_e32 v9, 0
	s_waitcnt vmcnt(0)
	v_readfirstlane_b32 s9, v8
	s_waitcnt_vscnt null, 0x0
	global_store_b64 v[10:11], v[8:9], off
	s_and_b32 m0, s9, 0xff
	s_sendmsg sendmsg(MSG_INTERRUPT)
.LBB0_137:                              ; %Flow547
	s_or_b32 exec_lo, exec_lo, s8
	s_add_i32 s3, s3, s1
	v_add_co_u32 v1, vcc_lo, v12, s10
	v_add_co_ci_u32_e32 v9, vcc_lo, s3, v13, vcc_lo
	s_delay_alu instid0(VALU_DEP_2) | instskip(NEXT) | instid1(VALU_DEP_2)
	v_add_co_u32 v8, vcc_lo, v1, 20
	v_add_co_ci_u32_e32 v9, vcc_lo, 0, v9, vcc_lo
.LBB0_138:                              ; =>This Inner Loop Header: Depth=1
	v_mov_b32_e32 v1, 1
	s_and_saveexec_b32 s1, s0
	s_cbranch_execz .LBB0_140
; %bb.139:                              ;   in Loop: Header=BB0_138 Depth=1
	global_load_b32 v1, v[8:9], off glc
	s_waitcnt vmcnt(0)
	buffer_gl1_inv
	buffer_gl0_inv
	v_and_b32_e32 v1, 1, v1
.LBB0_140:                              ;   in Loop: Header=BB0_138 Depth=1
	s_or_b32 exec_lo, exec_lo, s1
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_readfirstlane_b32 s1, v1
	s_cmp_eq_u32 s1, 0
	s_cbranch_scc1 .LBB0_142
; %bb.141:                              ;   in Loop: Header=BB0_138 Depth=1
	s_mov_b32 s1, 0
	s_sleep 1
	s_branch .LBB0_143
.LBB0_142:                              ;   in Loop: Header=BB0_138 Depth=1
	s_mov_b32 s1, -1
.LBB0_143:                              ; %Flow541
                                        ;   in Loop: Header=BB0_138 Depth=1
	s_delay_alu instid0(SALU_CYCLE_1)
	s_and_not1_b32 vcc_lo, exec_lo, s1
	s_cbranch_vccnz .LBB0_138
; %bb.144:
	global_load_b128 v[10:13], v[4:5], off
	s_and_saveexec_b32 s1, s0
	s_cbranch_execz .LBB0_148
; %bb.145:
	v_mov_b32_e32 v1, 0
	s_clause 0x2
	global_load_b64 v[4:5], v1, s[4:5] offset:40
	global_load_b64 v[8:9], v1, s[4:5] offset:24 glc
	global_load_b64 v[14:15], v1, s[4:5]
	s_waitcnt vmcnt(2)
	v_add_co_u32 v16, vcc_lo, v4, 1
	v_add_co_ci_u32_e32 v17, vcc_lo, 0, v5, vcc_lo
	s_delay_alu instid0(VALU_DEP_2) | instskip(NEXT) | instid1(VALU_DEP_2)
	v_add_co_u32 v12, vcc_lo, v16, s6
	v_add_co_ci_u32_e32 v13, vcc_lo, s7, v17, vcc_lo
	s_delay_alu instid0(VALU_DEP_1) | instskip(SKIP_1) | instid1(VALU_DEP_1)
	v_cmp_eq_u64_e32 vcc_lo, 0, v[12:13]
	v_dual_cndmask_b32 v12, v12, v16 :: v_dual_cndmask_b32 v13, v13, v17
	v_and_b32_e32 v4, v12, v4
	s_delay_alu instid0(VALU_DEP_2) | instskip(NEXT) | instid1(VALU_DEP_2)
	v_and_b32_e32 v5, v13, v5
	v_mul_hi_u32 v16, v4, 24
	v_mul_lo_u32 v4, v4, 24
	s_waitcnt vmcnt(0)
	s_delay_alu instid0(VALU_DEP_1) | instskip(SKIP_2) | instid1(VALU_DEP_1)
	v_add_co_u32 v4, vcc_lo, v14, v4
	v_mov_b32_e32 v14, v8
	v_mul_lo_u32 v5, v5, 24
	v_add_nc_u32_e32 v5, v16, v5
	s_delay_alu instid0(VALU_DEP_1)
	v_add_co_ci_u32_e32 v5, vcc_lo, v15, v5, vcc_lo
	v_mov_b32_e32 v15, v9
	global_store_b64 v[4:5], v[8:9], off
	s_waitcnt_vscnt null, 0x0
	global_atomic_cmpswap_b64 v[14:15], v1, v[12:15], s[4:5] offset:24 glc
	s_waitcnt vmcnt(0)
	v_cmp_ne_u64_e32 vcc_lo, v[14:15], v[8:9]
	s_and_b32 exec_lo, exec_lo, vcc_lo
	s_cbranch_execz .LBB0_148
; %bb.146:                              ; %.preheader.i.i.i113.preheader
	s_mov_b32 s0, 0
.LBB0_147:                              ; %.preheader.i.i.i113
                                        ; =>This Inner Loop Header: Depth=1
	s_sleep 1
	global_store_b64 v[4:5], v[14:15], off
	s_waitcnt_vscnt null, 0x0
	global_atomic_cmpswap_b64 v[8:9], v1, v[12:15], s[4:5] offset:24 glc
	s_waitcnt vmcnt(0)
	v_cmp_eq_u64_e32 vcc_lo, v[8:9], v[14:15]
	v_dual_mov_b32 v15, v9 :: v_dual_mov_b32 v14, v8
	s_or_b32 s0, vcc_lo, s0
	s_delay_alu instid0(SALU_CYCLE_1)
	s_and_not1_b32 exec_lo, exec_lo, s0
	s_cbranch_execnz .LBB0_147
.LBB0_148:                              ; %__ockl_hostcall_preview.exit.i
	s_or_b32 exec_lo, exec_lo, s1
.LBB0_149:                              ; %__ockl_printf_append_string_n.exit
	s_waitcnt vmcnt(0)
	v_mov_b32_e32 v12, v40
	v_mov_b32_e32 v4, 0
	v_mov_b32_e32 v5, 0
	;;#ASMSTART
	;;#ASMEND
	s_delay_alu instid0(VALU_DEP_3) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_readfirstlane_b32 s0, v12
	v_cmp_eq_u32_e64 s0, s0, v12
	s_delay_alu instid0(VALU_DEP_1)
	s_and_saveexec_b32 s1, s0
	s_cbranch_execz .LBB0_155
; %bb.150:
	v_mov_b32_e32 v1, 0
	s_mov_b32 s3, exec_lo
	global_load_b64 v[15:16], v1, s[4:5] offset:24 glc
	s_waitcnt vmcnt(0)
	buffer_gl1_inv
	buffer_gl0_inv
	s_clause 0x1
	global_load_b64 v[4:5], v1, s[4:5] offset:40
	global_load_b64 v[8:9], v1, s[4:5]
	s_waitcnt vmcnt(1)
	v_and_b32_e32 v4, v4, v15
	v_and_b32_e32 v5, v5, v16
	s_delay_alu instid0(VALU_DEP_2) | instskip(NEXT) | instid1(VALU_DEP_2)
	v_mul_hi_u32 v13, v4, 24
	v_mul_lo_u32 v5, v5, 24
	v_mul_lo_u32 v4, v4, 24
	s_delay_alu instid0(VALU_DEP_2) | instskip(SKIP_1) | instid1(VALU_DEP_2)
	v_add_nc_u32_e32 v5, v13, v5
	s_waitcnt vmcnt(0)
	v_add_co_u32 v4, vcc_lo, v8, v4
	s_delay_alu instid0(VALU_DEP_2)
	v_add_co_ci_u32_e32 v5, vcc_lo, v9, v5, vcc_lo
	global_load_b64 v[13:14], v[4:5], off glc
	s_waitcnt vmcnt(0)
	global_atomic_cmpswap_b64 v[4:5], v1, v[13:16], s[4:5] offset:24 glc
	s_waitcnt vmcnt(0)
	buffer_gl1_inv
	buffer_gl0_inv
	v_cmpx_ne_u64_e64 v[4:5], v[15:16]
	s_cbranch_execz .LBB0_154
; %bb.151:                              ; %.preheader3.i.i.i123.preheader
	s_mov_b32 s6, 0
.LBB0_152:                              ; %.preheader3.i.i.i123
                                        ; =>This Inner Loop Header: Depth=1
	s_sleep 1
	s_clause 0x1
	global_load_b64 v[8:9], v1, s[4:5] offset:40
	global_load_b64 v[13:14], v1, s[4:5]
	v_dual_mov_b32 v16, v5 :: v_dual_mov_b32 v15, v4
	s_waitcnt vmcnt(1)
	s_delay_alu instid0(VALU_DEP_1) | instskip(SKIP_1) | instid1(VALU_DEP_1)
	v_and_b32_e32 v8, v8, v15
	s_waitcnt vmcnt(0)
	v_mad_u64_u32 v[4:5], null, v8, 24, v[13:14]
	v_and_b32_e32 v13, v9, v16
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_mad_u64_u32 v[8:9], null, v13, 24, v[5:6]
	v_mov_b32_e32 v5, v8
	global_load_b64 v[13:14], v[4:5], off glc
	s_waitcnt vmcnt(0)
	global_atomic_cmpswap_b64 v[4:5], v1, v[13:16], s[4:5] offset:24 glc
	s_waitcnt vmcnt(0)
	buffer_gl1_inv
	buffer_gl0_inv
	v_cmp_eq_u64_e32 vcc_lo, v[4:5], v[15:16]
	s_or_b32 s6, vcc_lo, s6
	s_delay_alu instid0(SALU_CYCLE_1)
	s_and_not1_b32 exec_lo, exec_lo, s6
	s_cbranch_execnz .LBB0_152
; %bb.153:                              ; %Flow484
	s_or_b32 exec_lo, exec_lo, s6
.LBB0_154:                              ; %Flow486
	s_delay_alu instid0(SALU_CYCLE_1)
	s_or_b32 exec_lo, exec_lo, s3
.LBB0_155:                              ; %.loopexit4.i.i.i117
	s_delay_alu instid0(SALU_CYCLE_1)
	s_or_b32 exec_lo, exec_lo, s1
	v_mov_b32_e32 v13, 0
	v_readfirstlane_b32 s6, v4
	v_readfirstlane_b32 s7, v5
	s_mov_b32 s11, exec_lo
	s_clause 0x1
	global_load_b64 v[8:9], v13, s[4:5] offset:40
	global_load_b128 v[14:17], v13, s[4:5]
	s_waitcnt vmcnt(1)
	v_readfirstlane_b32 s8, v8
	v_readfirstlane_b32 s9, v9
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(SALU_CYCLE_1)
	s_and_b64 s[8:9], s[6:7], s[8:9]
	s_mul_i32 s1, s9, 24
	s_mul_hi_u32 s3, s8, 24
	s_mul_i32 s10, s8, 24
	s_and_saveexec_b32 s12, s0
	s_cbranch_execz .LBB0_157
; %bb.156:
	v_dual_mov_b32 v18, s11 :: v_dual_mov_b32 v19, v13
	s_add_i32 s11, s3, s1
	s_waitcnt vmcnt(0)
	v_add_co_u32 v4, vcc_lo, v14, s10
	v_add_co_ci_u32_e32 v5, vcc_lo, s11, v15, vcc_lo
	v_dual_mov_b32 v20, 2 :: v_dual_mov_b32 v21, 1
	global_store_b128 v[4:5], v[18:21], off offset:8
.LBB0_157:
	s_or_b32 exec_lo, exec_lo, s12
	s_lshl_b64 s[8:9], s[8:9], 12
	v_lshlrev_b64 v[4:5], 6, v[12:13]
	s_waitcnt vmcnt(0)
	v_add_co_u32 v1, vcc_lo, v16, s8
	v_add_co_ci_u32_e32 v8, vcc_lo, s9, v17, vcc_lo
	s_mov_b32 s12, 0
	s_delay_alu instid0(VALU_DEP_2)
	v_add_co_u32 v4, vcc_lo, v1, v4
	s_mov_b32 s15, s12
	s_mov_b32 s13, s12
	s_mov_b32 s14, s12
	v_and_or_b32 v10, 0xffffff1f, v10, 32
	v_add_co_ci_u32_e32 v5, vcc_lo, v8, v5, vcc_lo
	v_dual_mov_b32 v12, v0 :: v_dual_mov_b32 v19, s15
	v_dual_mov_b32 v18, s14 :: v_dual_mov_b32 v17, s13
	v_mov_b32_e32 v16, s12
	s_clause 0x3
	global_store_b128 v[4:5], v[10:13], off
	global_store_b128 v[4:5], v[16:19], off offset:16
	global_store_b128 v[4:5], v[16:19], off offset:32
	global_store_b128 v[4:5], v[16:19], off offset:48
	s_and_saveexec_b32 s8, s0
	s_cbranch_execz .LBB0_165
; %bb.158:
	v_dual_mov_b32 v12, 0 :: v_dual_mov_b32 v17, s7
	v_mov_b32_e32 v16, s6
	s_clause 0x1
	global_load_b64 v[18:19], v12, s[4:5] offset:32 glc
	global_load_b64 v[0:1], v12, s[4:5] offset:40
	s_waitcnt vmcnt(0)
	v_readfirstlane_b32 s12, v0
	v_readfirstlane_b32 s13, v1
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(SALU_CYCLE_1)
	s_and_b64 s[12:13], s[12:13], s[6:7]
	s_mul_i32 s9, s13, 24
	s_mul_hi_u32 s11, s12, 24
	s_mul_i32 s12, s12, 24
	s_add_i32 s11, s11, s9
	v_add_co_u32 v0, vcc_lo, v14, s12
	v_add_co_ci_u32_e32 v1, vcc_lo, s11, v15, vcc_lo
	s_mov_b32 s9, exec_lo
	global_store_b64 v[0:1], v[18:19], off
	s_waitcnt_vscnt null, 0x0
	global_atomic_cmpswap_b64 v[10:11], v12, v[16:19], s[4:5] offset:32 glc
	s_waitcnt vmcnt(0)
	v_cmpx_ne_u64_e64 v[10:11], v[18:19]
	s_cbranch_execz .LBB0_161
; %bb.159:                              ; %.preheader1.i.i.i121.preheader
	s_mov_b32 s11, 0
.LBB0_160:                              ; %.preheader1.i.i.i121
                                        ; =>This Inner Loop Header: Depth=1
	v_dual_mov_b32 v8, s6 :: v_dual_mov_b32 v9, s7
	s_sleep 1
	global_store_b64 v[0:1], v[10:11], off
	s_waitcnt_vscnt null, 0x0
	global_atomic_cmpswap_b64 v[8:9], v12, v[8:11], s[4:5] offset:32 glc
	s_waitcnt vmcnt(0)
	v_cmp_eq_u64_e32 vcc_lo, v[8:9], v[10:11]
	v_dual_mov_b32 v11, v9 :: v_dual_mov_b32 v10, v8
	s_or_b32 s11, vcc_lo, s11
	s_delay_alu instid0(SALU_CYCLE_1)
	s_and_not1_b32 exec_lo, exec_lo, s11
	s_cbranch_execnz .LBB0_160
.LBB0_161:                              ; %Flow482
	s_or_b32 exec_lo, exec_lo, s9
	v_mov_b32_e32 v9, 0
	s_mov_b32 s11, exec_lo
	s_mov_b32 s9, exec_lo
	v_mbcnt_lo_u32_b32 v8, s11, 0
	global_load_b64 v[0:1], v9, s[4:5] offset:16
	v_cmpx_eq_u32_e32 0, v8
	s_cbranch_execz .LBB0_163
; %bb.162:
	s_bcnt1_i32_b32 s11, s11
	s_delay_alu instid0(SALU_CYCLE_1)
	v_mov_b32_e32 v8, s11
	s_waitcnt vmcnt(0)
	global_atomic_add_u64 v[0:1], v[8:9], off offset:8
.LBB0_163:
	s_or_b32 exec_lo, exec_lo, s9
	s_waitcnt vmcnt(0)
	global_load_b64 v[8:9], v[0:1], off offset:16
	s_waitcnt vmcnt(0)
	v_cmp_eq_u64_e32 vcc_lo, 0, v[8:9]
	s_cbranch_vccnz .LBB0_165
; %bb.164:
	global_load_b32 v0, v[0:1], off offset:24
	v_mov_b32_e32 v1, 0
	s_waitcnt vmcnt(0)
	v_readfirstlane_b32 s9, v0
	s_waitcnt_vscnt null, 0x0
	global_store_b64 v[8:9], v[0:1], off
	s_and_b32 m0, s9, 0xff
	s_sendmsg sendmsg(MSG_INTERRUPT)
.LBB0_165:                              ; %Flow483
	s_or_b32 exec_lo, exec_lo, s8
	s_add_i32 s3, s3, s1
	v_add_co_u32 v0, vcc_lo, v14, s10
	v_add_co_ci_u32_e32 v1, vcc_lo, s3, v15, vcc_lo
	s_delay_alu instid0(VALU_DEP_2) | instskip(NEXT) | instid1(VALU_DEP_2)
	v_add_co_u32 v0, vcc_lo, v0, 20
	v_add_co_ci_u32_e32 v1, vcc_lo, 0, v1, vcc_lo
.LBB0_166:                              ; =>This Inner Loop Header: Depth=1
	v_mov_b32_e32 v8, 1
	s_and_saveexec_b32 s1, s0
	s_cbranch_execz .LBB0_168
; %bb.167:                              ;   in Loop: Header=BB0_166 Depth=1
	global_load_b32 v8, v[0:1], off glc
	s_waitcnt vmcnt(0)
	buffer_gl1_inv
	buffer_gl0_inv
	v_and_b32_e32 v8, 1, v8
.LBB0_168:                              ;   in Loop: Header=BB0_166 Depth=1
	s_or_b32 exec_lo, exec_lo, s1
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_readfirstlane_b32 s1, v8
	s_cmp_eq_u32 s1, 0
	s_cbranch_scc1 .LBB0_170
; %bb.169:                              ;   in Loop: Header=BB0_166 Depth=1
	s_mov_b32 s1, 0
	s_sleep 1
	s_branch .LBB0_171
.LBB0_170:                              ;   in Loop: Header=BB0_166 Depth=1
	s_mov_b32 s1, -1
.LBB0_171:                              ; %Flow477
                                        ;   in Loop: Header=BB0_166 Depth=1
	s_delay_alu instid0(SALU_CYCLE_1)
	s_and_not1_b32 vcc_lo, exec_lo, s1
	s_cbranch_vccnz .LBB0_166
; %bb.172:
	global_load_b64 v[4:5], v[4:5], off
	s_and_saveexec_b32 s1, s0
	s_cbranch_execz .LBB0_176
; %bb.173:
	v_mov_b32_e32 v12, 0
	s_clause 0x2
	global_load_b64 v[0:1], v12, s[4:5] offset:40
	global_load_b64 v[13:14], v12, s[4:5] offset:24 glc
	global_load_b64 v[10:11], v12, s[4:5]
	s_waitcnt vmcnt(2)
	v_add_co_u32 v15, vcc_lo, v0, 1
	v_add_co_ci_u32_e32 v16, vcc_lo, 0, v1, vcc_lo
	s_delay_alu instid0(VALU_DEP_2) | instskip(NEXT) | instid1(VALU_DEP_2)
	v_add_co_u32 v8, vcc_lo, v15, s6
	v_add_co_ci_u32_e32 v9, vcc_lo, s7, v16, vcc_lo
	s_delay_alu instid0(VALU_DEP_1) | instskip(SKIP_1) | instid1(VALU_DEP_1)
	v_cmp_eq_u64_e32 vcc_lo, 0, v[8:9]
	v_dual_cndmask_b32 v9, v9, v16 :: v_dual_cndmask_b32 v8, v8, v15
	v_and_b32_e32 v1, v9, v1
	s_delay_alu instid0(VALU_DEP_2) | instskip(NEXT) | instid1(VALU_DEP_2)
	v_and_b32_e32 v0, v8, v0
	v_mul_lo_u32 v1, v1, 24
	s_delay_alu instid0(VALU_DEP_2) | instskip(SKIP_1) | instid1(VALU_DEP_2)
	v_mul_hi_u32 v15, v0, 24
	v_mul_lo_u32 v0, v0, 24
	v_add_nc_u32_e32 v1, v15, v1
	s_waitcnt vmcnt(0)
	s_delay_alu instid0(VALU_DEP_2) | instskip(SKIP_1) | instid1(VALU_DEP_3)
	v_add_co_u32 v0, vcc_lo, v10, v0
	v_mov_b32_e32 v10, v13
	v_add_co_ci_u32_e32 v1, vcc_lo, v11, v1, vcc_lo
	v_mov_b32_e32 v11, v14
	global_store_b64 v[0:1], v[13:14], off
	s_waitcnt_vscnt null, 0x0
	global_atomic_cmpswap_b64 v[10:11], v12, v[8:11], s[4:5] offset:24 glc
	s_waitcnt vmcnt(0)
	v_cmp_ne_u64_e32 vcc_lo, v[10:11], v[13:14]
	s_and_b32 exec_lo, exec_lo, vcc_lo
	s_cbranch_execz .LBB0_176
; %bb.174:                              ; %.preheader.i.i.i120.preheader
	s_mov_b32 s0, 0
.LBB0_175:                              ; %.preheader.i.i.i120
                                        ; =>This Inner Loop Header: Depth=1
	s_sleep 1
	global_store_b64 v[0:1], v[10:11], off
	s_waitcnt_vscnt null, 0x0
	global_atomic_cmpswap_b64 v[13:14], v12, v[8:11], s[4:5] offset:24 glc
	s_waitcnt vmcnt(0)
	v_cmp_eq_u64_e32 vcc_lo, v[13:14], v[10:11]
	v_dual_mov_b32 v10, v13 :: v_dual_mov_b32 v11, v14
	s_or_b32 s0, vcc_lo, s0
	s_delay_alu instid0(SALU_CYCLE_1)
	s_and_not1_b32 exec_lo, exec_lo, s0
	s_cbranch_execnz .LBB0_175
.LBB0_176:                              ; %__ockl_printf_append_args.exit
	s_or_b32 exec_lo, exec_lo, s1
	v_mov_b32_e32 v0, v40
	v_mov_b32_e32 v12, 0
	v_mov_b32_e32 v13, 0
	;;#ASMSTART
	;;#ASMEND
	s_delay_alu instid0(VALU_DEP_3) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_readfirstlane_b32 s0, v0
	v_cmp_eq_u32_e64 s0, s0, v0
	s_delay_alu instid0(VALU_DEP_1)
	s_and_saveexec_b32 s1, s0
	s_cbranch_execz .LBB0_182
; %bb.177:
	v_mov_b32_e32 v1, 0
	s_mov_b32 s3, exec_lo
	global_load_b64 v[10:11], v1, s[4:5] offset:24 glc
	s_waitcnt vmcnt(0)
	buffer_gl1_inv
	buffer_gl0_inv
	s_clause 0x1
	global_load_b64 v[8:9], v1, s[4:5] offset:40
	global_load_b64 v[12:13], v1, s[4:5]
	s_waitcnt vmcnt(1)
	v_and_b32_e32 v8, v8, v10
	v_and_b32_e32 v9, v9, v11
	s_delay_alu instid0(VALU_DEP_2) | instskip(NEXT) | instid1(VALU_DEP_2)
	v_mul_hi_u32 v14, v8, 24
	v_mul_lo_u32 v9, v9, 24
	v_mul_lo_u32 v8, v8, 24
	s_delay_alu instid0(VALU_DEP_2) | instskip(SKIP_1) | instid1(VALU_DEP_2)
	v_add_nc_u32_e32 v9, v14, v9
	s_waitcnt vmcnt(0)
	v_add_co_u32 v8, vcc_lo, v12, v8
	s_delay_alu instid0(VALU_DEP_2)
	v_add_co_ci_u32_e32 v9, vcc_lo, v13, v9, vcc_lo
	global_load_b64 v[8:9], v[8:9], off glc
	s_waitcnt vmcnt(0)
	global_atomic_cmpswap_b64 v[12:13], v1, v[8:11], s[4:5] offset:24 glc
	s_waitcnt vmcnt(0)
	buffer_gl1_inv
	buffer_gl0_inv
	v_cmpx_ne_u64_e64 v[12:13], v[10:11]
	s_cbranch_execz .LBB0_181
; %bb.178:                              ; %.preheader3.i.i.i130.preheader
	s_mov_b32 s6, 0
.LBB0_179:                              ; %.preheader3.i.i.i130
                                        ; =>This Inner Loop Header: Depth=1
	s_sleep 1
	s_clause 0x1
	global_load_b64 v[8:9], v1, s[4:5] offset:40
	global_load_b64 v[14:15], v1, s[4:5]
	v_dual_mov_b32 v10, v12 :: v_dual_mov_b32 v11, v13
	s_waitcnt vmcnt(1)
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_2)
	v_and_b32_e32 v8, v8, v10
	v_and_b32_e32 v9, v9, v11
	s_waitcnt vmcnt(0)
	s_delay_alu instid0(VALU_DEP_2) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_mad_u64_u32 v[12:13], null, v8, 24, v[14:15]
	v_mov_b32_e32 v8, v13
	s_delay_alu instid0(VALU_DEP_1)
	v_mad_u64_u32 v[13:14], null, v9, 24, v[8:9]
	global_load_b64 v[8:9], v[12:13], off glc
	s_waitcnt vmcnt(0)
	global_atomic_cmpswap_b64 v[12:13], v1, v[8:11], s[4:5] offset:24 glc
	s_waitcnt vmcnt(0)
	buffer_gl1_inv
	buffer_gl0_inv
	v_cmp_eq_u64_e32 vcc_lo, v[12:13], v[10:11]
	s_or_b32 s6, vcc_lo, s6
	s_delay_alu instid0(SALU_CYCLE_1)
	s_and_not1_b32 exec_lo, exec_lo, s6
	s_cbranch_execnz .LBB0_179
; %bb.180:                              ; %Flow470
	s_or_b32 exec_lo, exec_lo, s6
.LBB0_181:                              ; %Flow472
	s_delay_alu instid0(SALU_CYCLE_1)
	s_or_b32 exec_lo, exec_lo, s3
.LBB0_182:                              ; %.loopexit4.i.i.i124
	s_delay_alu instid0(SALU_CYCLE_1)
	s_or_b32 exec_lo, exec_lo, s1
	v_mov_b32_e32 v1, 0
	v_readfirstlane_b32 s6, v12
	v_readfirstlane_b32 s7, v13
	s_mov_b32 s11, exec_lo
	s_clause 0x1
	global_load_b64 v[14:15], v1, s[4:5] offset:40
	global_load_b128 v[8:11], v1, s[4:5]
	s_waitcnt vmcnt(1)
	v_readfirstlane_b32 s8, v14
	v_readfirstlane_b32 s9, v15
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(SALU_CYCLE_1)
	s_and_b64 s[8:9], s[6:7], s[8:9]
	s_mul_i32 s1, s9, 24
	s_mul_hi_u32 s3, s8, 24
	s_mul_i32 s10, s8, 24
	s_and_saveexec_b32 s12, s0
	s_cbranch_execz .LBB0_184
; %bb.183:
	v_dual_mov_b32 v12, s11 :: v_dual_mov_b32 v13, v1
	s_add_i32 s11, s3, s1
	s_waitcnt vmcnt(0)
	v_add_co_u32 v16, vcc_lo, v8, s10
	v_add_co_ci_u32_e32 v17, vcc_lo, s11, v9, vcc_lo
	v_dual_mov_b32 v14, 2 :: v_dual_mov_b32 v15, 1
	global_store_b128 v[16:17], v[12:15], off offset:8
.LBB0_184:
	s_or_b32 exec_lo, exec_lo, s12
	s_lshl_b64 s[8:9], s[8:9], 12
	v_lshlrev_b64 v[0:1], 6, v[0:1]
	s_waitcnt vmcnt(0)
	v_add_co_u32 v10, vcc_lo, v10, s8
	v_add_co_ci_u32_e32 v11, vcc_lo, s9, v11, vcc_lo
	s_mov_b32 s12, 0
	s_delay_alu instid0(VALU_DEP_2)
	v_add_co_u32 v0, vcc_lo, v10, v0
	s_mov_b32 s13, s12
	s_mov_b32 s14, s12
	s_mov_b32 s15, s12
	v_and_or_b32 v4, 0xffffff1f, v4, 32
	v_add_co_ci_u32_e32 v1, vcc_lo, v11, v1, vcc_lo
	v_dual_mov_b32 v10, s12 :: v_dual_mov_b32 v11, s13
	v_dual_mov_b32 v12, s14 :: v_dual_mov_b32 v13, s15
	s_clause 0x3
	global_store_b128 v[0:1], v[4:7], off
	global_store_b128 v[0:1], v[10:13], off offset:16
	global_store_b128 v[0:1], v[10:13], off offset:32
	global_store_b128 v[0:1], v[10:13], off offset:48
	s_and_saveexec_b32 s8, s0
	s_cbranch_execz .LBB0_192
; %bb.185:
	v_dual_mov_b32 v12, 0 :: v_dual_mov_b32 v13, s6
	v_mov_b32_e32 v14, s7
	s_clause 0x1
	global_load_b64 v[15:16], v12, s[4:5] offset:32 glc
	global_load_b64 v[4:5], v12, s[4:5] offset:40
	s_waitcnt vmcnt(0)
	v_readfirstlane_b32 s12, v4
	v_readfirstlane_b32 s13, v5
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(SALU_CYCLE_1)
	s_and_b64 s[12:13], s[12:13], s[6:7]
	s_mul_i32 s9, s13, 24
	s_mul_hi_u32 s11, s12, 24
	s_mul_i32 s12, s12, 24
	s_add_i32 s11, s11, s9
	v_add_co_u32 v10, vcc_lo, v8, s12
	v_add_co_ci_u32_e32 v11, vcc_lo, s11, v9, vcc_lo
	s_mov_b32 s9, exec_lo
	global_store_b64 v[10:11], v[15:16], off
	s_waitcnt_vscnt null, 0x0
	global_atomic_cmpswap_b64 v[6:7], v12, v[13:16], s[4:5] offset:32 glc
	s_waitcnt vmcnt(0)
	v_cmpx_ne_u64_e64 v[6:7], v[15:16]
	s_cbranch_execz .LBB0_188
; %bb.186:                              ; %.preheader1.i.i.i128.preheader
	s_mov_b32 s11, 0
.LBB0_187:                              ; %.preheader1.i.i.i128
                                        ; =>This Inner Loop Header: Depth=1
	v_dual_mov_b32 v4, s6 :: v_dual_mov_b32 v5, s7
	s_sleep 1
	global_store_b64 v[10:11], v[6:7], off
	s_waitcnt_vscnt null, 0x0
	global_atomic_cmpswap_b64 v[4:5], v12, v[4:7], s[4:5] offset:32 glc
	s_waitcnt vmcnt(0)
	v_cmp_eq_u64_e32 vcc_lo, v[4:5], v[6:7]
	v_dual_mov_b32 v7, v5 :: v_dual_mov_b32 v6, v4
	s_or_b32 s11, vcc_lo, s11
	s_delay_alu instid0(SALU_CYCLE_1)
	s_and_not1_b32 exec_lo, exec_lo, s11
	s_cbranch_execnz .LBB0_187
.LBB0_188:                              ; %Flow468
	s_or_b32 exec_lo, exec_lo, s9
	v_mov_b32_e32 v7, 0
	s_mov_b32 s11, exec_lo
	s_mov_b32 s9, exec_lo
	v_mbcnt_lo_u32_b32 v6, s11, 0
	global_load_b64 v[4:5], v7, s[4:5] offset:16
	v_cmpx_eq_u32_e32 0, v6
	s_cbranch_execz .LBB0_190
; %bb.189:
	s_bcnt1_i32_b32 s11, s11
	s_delay_alu instid0(SALU_CYCLE_1)
	v_mov_b32_e32 v6, s11
	s_waitcnt vmcnt(0)
	global_atomic_add_u64 v[4:5], v[6:7], off offset:8
.LBB0_190:
	s_or_b32 exec_lo, exec_lo, s9
	s_waitcnt vmcnt(0)
	global_load_b64 v[6:7], v[4:5], off offset:16
	s_waitcnt vmcnt(0)
	v_cmp_eq_u64_e32 vcc_lo, 0, v[6:7]
	s_cbranch_vccnz .LBB0_192
; %bb.191:
	global_load_b32 v4, v[4:5], off offset:24
	v_mov_b32_e32 v5, 0
	s_waitcnt vmcnt(0)
	v_readfirstlane_b32 s9, v4
	s_waitcnt_vscnt null, 0x0
	global_store_b64 v[6:7], v[4:5], off
	s_and_b32 m0, s9, 0xff
	s_sendmsg sendmsg(MSG_INTERRUPT)
.LBB0_192:                              ; %Flow469
	s_or_b32 exec_lo, exec_lo, s8
	s_add_i32 s3, s3, s1
	v_add_co_u32 v4, vcc_lo, v8, s10
	v_add_co_ci_u32_e32 v5, vcc_lo, s3, v9, vcc_lo
	s_delay_alu instid0(VALU_DEP_2) | instskip(NEXT) | instid1(VALU_DEP_2)
	v_add_co_u32 v4, vcc_lo, v4, 20
	v_add_co_ci_u32_e32 v5, vcc_lo, 0, v5, vcc_lo
.LBB0_193:                              ; =>This Inner Loop Header: Depth=1
	v_mov_b32_e32 v6, 1
	s_and_saveexec_b32 s1, s0
	s_cbranch_execz .LBB0_195
; %bb.194:                              ;   in Loop: Header=BB0_193 Depth=1
	global_load_b32 v6, v[4:5], off glc
	s_waitcnt vmcnt(0)
	buffer_gl1_inv
	buffer_gl0_inv
	v_and_b32_e32 v6, 1, v6
.LBB0_195:                              ;   in Loop: Header=BB0_193 Depth=1
	s_or_b32 exec_lo, exec_lo, s1
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_readfirstlane_b32 s1, v6
	s_cmp_eq_u32 s1, 0
	s_cbranch_scc1 .LBB0_197
; %bb.196:                              ;   in Loop: Header=BB0_193 Depth=1
	s_mov_b32 s1, 0
	s_sleep 1
	s_branch .LBB0_198
.LBB0_197:                              ;   in Loop: Header=BB0_193 Depth=1
	s_mov_b32 s1, -1
.LBB0_198:                              ; %Flow463
                                        ;   in Loop: Header=BB0_193 Depth=1
	s_delay_alu instid0(SALU_CYCLE_1)
	s_and_not1_b32 vcc_lo, exec_lo, s1
	s_cbranch_vccnz .LBB0_193
; %bb.199:
	global_load_b64 v[0:1], v[0:1], off
	s_and_saveexec_b32 s1, s0
	s_cbranch_execz .LBB0_203
; %bb.200:
	v_mov_b32_e32 v10, 0
	s_clause 0x2
	global_load_b64 v[6:7], v10, s[4:5] offset:40
	global_load_b64 v[11:12], v10, s[4:5] offset:24 glc
	global_load_b64 v[8:9], v10, s[4:5]
	s_waitcnt vmcnt(2)
	v_add_co_u32 v13, vcc_lo, v6, 1
	v_add_co_ci_u32_e32 v14, vcc_lo, 0, v7, vcc_lo
	s_delay_alu instid0(VALU_DEP_2) | instskip(NEXT) | instid1(VALU_DEP_2)
	v_add_co_u32 v4, vcc_lo, v13, s6
	v_add_co_ci_u32_e32 v5, vcc_lo, s7, v14, vcc_lo
	s_delay_alu instid0(VALU_DEP_1) | instskip(SKIP_1) | instid1(VALU_DEP_1)
	v_cmp_eq_u64_e32 vcc_lo, 0, v[4:5]
	v_dual_cndmask_b32 v5, v5, v14 :: v_dual_cndmask_b32 v4, v4, v13
	v_and_b32_e32 v7, v5, v7
	s_delay_alu instid0(VALU_DEP_2) | instskip(NEXT) | instid1(VALU_DEP_2)
	v_and_b32_e32 v6, v4, v6
	v_mul_lo_u32 v7, v7, 24
	s_delay_alu instid0(VALU_DEP_2) | instskip(SKIP_1) | instid1(VALU_DEP_2)
	v_mul_hi_u32 v13, v6, 24
	v_mul_lo_u32 v6, v6, 24
	v_add_nc_u32_e32 v7, v13, v7
	s_waitcnt vmcnt(0)
	s_delay_alu instid0(VALU_DEP_2) | instskip(SKIP_1) | instid1(VALU_DEP_3)
	v_add_co_u32 v8, vcc_lo, v8, v6
	v_mov_b32_e32 v6, v11
	v_add_co_ci_u32_e32 v9, vcc_lo, v9, v7, vcc_lo
	v_mov_b32_e32 v7, v12
	global_store_b64 v[8:9], v[11:12], off
	s_waitcnt_vscnt null, 0x0
	global_atomic_cmpswap_b64 v[6:7], v10, v[4:7], s[4:5] offset:24 glc
	s_waitcnt vmcnt(0)
	v_cmp_ne_u64_e32 vcc_lo, v[6:7], v[11:12]
	s_and_b32 exec_lo, exec_lo, vcc_lo
	s_cbranch_execz .LBB0_203
; %bb.201:                              ; %.preheader.i.i.i127.preheader
	s_mov_b32 s0, 0
.LBB0_202:                              ; %.preheader.i.i.i127
                                        ; =>This Inner Loop Header: Depth=1
	s_sleep 1
	global_store_b64 v[8:9], v[6:7], off
	s_waitcnt_vscnt null, 0x0
	global_atomic_cmpswap_b64 v[11:12], v10, v[4:7], s[4:5] offset:24 glc
	s_waitcnt vmcnt(0)
	v_cmp_eq_u64_e32 vcc_lo, v[11:12], v[6:7]
	v_dual_mov_b32 v6, v11 :: v_dual_mov_b32 v7, v12
	s_or_b32 s0, vcc_lo, s0
	s_delay_alu instid0(SALU_CYCLE_1)
	s_and_not1_b32 exec_lo, exec_lo, s0
	s_cbranch_execnz .LBB0_202
.LBB0_203:                              ; %__ockl_printf_append_args.exit131
	s_or_b32 exec_lo, exec_lo, s1
	;;#ASMSTART
	;;#ASMEND
	v_readfirstlane_b32 s0, v40
	v_mov_b32_e32 v8, 0
	v_mov_b32_e32 v9, 0
	s_delay_alu instid0(VALU_DEP_3) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_cmp_eq_u32_e64 s0, s0, v40
	s_and_saveexec_b32 s1, s0
	s_cbranch_execz .LBB0_209
; %bb.204:
	v_mov_b32_e32 v4, 0
	s_mov_b32 s3, exec_lo
	global_load_b64 v[10:11], v4, s[4:5] offset:24 glc
	s_waitcnt vmcnt(0)
	buffer_gl1_inv
	buffer_gl0_inv
	s_clause 0x1
	global_load_b64 v[5:6], v4, s[4:5] offset:40
	global_load_b64 v[7:8], v4, s[4:5]
	s_waitcnt vmcnt(1)
	v_and_b32_e32 v5, v5, v10
	v_and_b32_e32 v6, v6, v11
	s_delay_alu instid0(VALU_DEP_2) | instskip(NEXT) | instid1(VALU_DEP_2)
	v_mul_hi_u32 v9, v5, 24
	v_mul_lo_u32 v6, v6, 24
	v_mul_lo_u32 v5, v5, 24
	s_delay_alu instid0(VALU_DEP_2) | instskip(SKIP_1) | instid1(VALU_DEP_2)
	v_add_nc_u32_e32 v6, v9, v6
	s_waitcnt vmcnt(0)
	v_add_co_u32 v5, vcc_lo, v7, v5
	s_delay_alu instid0(VALU_DEP_2)
	v_add_co_ci_u32_e32 v6, vcc_lo, v8, v6, vcc_lo
	global_load_b64 v[8:9], v[5:6], off glc
	s_waitcnt vmcnt(0)
	global_atomic_cmpswap_b64 v[8:9], v4, v[8:11], s[4:5] offset:24 glc
	s_waitcnt vmcnt(0)
	buffer_gl1_inv
	buffer_gl0_inv
	v_cmpx_ne_u64_e64 v[8:9], v[10:11]
	s_cbranch_execz .LBB0_208
; %bb.205:                              ; %.preheader3.i.i.i138.preheader
	s_mov_b32 s6, 0
.LBB0_206:                              ; %.preheader3.i.i.i138
                                        ; =>This Inner Loop Header: Depth=1
	s_sleep 1
	s_clause 0x1
	global_load_b64 v[5:6], v4, s[4:5] offset:40
	global_load_b64 v[12:13], v4, s[4:5]
	v_dual_mov_b32 v11, v9 :: v_dual_mov_b32 v10, v8
	s_waitcnt vmcnt(1)
	s_delay_alu instid0(VALU_DEP_1) | instskip(SKIP_1) | instid1(VALU_DEP_1)
	v_and_b32_e32 v5, v5, v10
	s_waitcnt vmcnt(0)
	v_mad_u64_u32 v[7:8], null, v5, 24, v[12:13]
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_dual_mov_b32 v5, v8 :: v_dual_and_b32 v6, v6, v11
	v_mad_u64_u32 v[8:9], null, v6, 24, v[5:6]
	global_load_b64 v[8:9], v[7:8], off glc
	s_waitcnt vmcnt(0)
	global_atomic_cmpswap_b64 v[8:9], v4, v[8:11], s[4:5] offset:24 glc
	s_waitcnt vmcnt(0)
	buffer_gl1_inv
	buffer_gl0_inv
	v_cmp_eq_u64_e32 vcc_lo, v[8:9], v[10:11]
	s_or_b32 s6, vcc_lo, s6
	s_delay_alu instid0(SALU_CYCLE_1)
	s_and_not1_b32 exec_lo, exec_lo, s6
	s_cbranch_execnz .LBB0_206
; %bb.207:                              ; %Flow456
	s_or_b32 exec_lo, exec_lo, s6
.LBB0_208:                              ; %Flow458
	s_delay_alu instid0(SALU_CYCLE_1)
	s_or_b32 exec_lo, exec_lo, s3
.LBB0_209:                              ; %.loopexit4.i.i.i132
	s_delay_alu instid0(SALU_CYCLE_1)
	s_or_b32 exec_lo, exec_lo, s1
	v_mov_b32_e32 v41, 0
	v_readfirstlane_b32 s6, v8
	v_readfirstlane_b32 s7, v9
	s_mov_b32 s11, exec_lo
	s_clause 0x1
	global_load_b64 v[10:11], v41, s[4:5] offset:40
	global_load_b128 v[4:7], v41, s[4:5]
	s_waitcnt vmcnt(1)
	v_readfirstlane_b32 s8, v10
	v_readfirstlane_b32 s9, v11
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(SALU_CYCLE_1)
	s_and_b64 s[8:9], s[6:7], s[8:9]
	s_mul_i32 s1, s9, 24
	s_mul_hi_u32 s3, s8, 24
	s_mul_i32 s10, s8, 24
	s_and_saveexec_b32 s12, s0
	s_cbranch_execz .LBB0_211
; %bb.210:
	v_dual_mov_b32 v8, s11 :: v_dual_mov_b32 v9, v41
	s_add_i32 s11, s3, s1
	s_waitcnt vmcnt(0)
	v_add_co_u32 v12, vcc_lo, v4, s10
	v_add_co_ci_u32_e32 v13, vcc_lo, s11, v5, vcc_lo
	v_dual_mov_b32 v10, 2 :: v_dual_mov_b32 v11, 1
	global_store_b128 v[12:13], v[8:11], off offset:8
.LBB0_211:
	s_or_b32 exec_lo, exec_lo, s12
	s_lshl_b64 s[8:9], s[8:9], 12
	s_mov_b32 s12, 0
	s_waitcnt vmcnt(0)
	v_add_co_u32 v8, vcc_lo, v6, s8
	v_add_co_ci_u32_e32 v9, vcc_lo, s9, v7, vcc_lo
	v_lshlrev_b64 v[6:7], 6, v[40:41]
	s_mov_b32 s13, s12
	s_mov_b32 s14, s12
	s_mov_b32 s15, s12
	v_and_or_b32 v0, 0xffffff1d, v0, 34
	s_delay_alu instid0(VALU_DEP_2)
	v_add_co_u32 v10, vcc_lo, v8, v6
	v_add_co_ci_u32_e32 v11, vcc_lo, v9, v7, vcc_lo
	v_dual_mov_b32 v6, s12 :: v_dual_mov_b32 v7, s13
	v_dual_mov_b32 v8, s14 :: v_dual_mov_b32 v9, s15
	s_clause 0x3
	global_store_b128 v[10:11], v[0:3], off
	global_store_b128 v[10:11], v[6:9], off offset:16
	global_store_b128 v[10:11], v[6:9], off offset:32
	global_store_b128 v[10:11], v[6:9], off offset:48
	s_and_saveexec_b32 s8, s0
	s_cbranch_execz .LBB0_219
; %bb.212:
	v_dual_mov_b32 v8, 0 :: v_dual_mov_b32 v9, s6
	v_mov_b32_e32 v10, s7
	s_clause 0x1
	global_load_b64 v[11:12], v8, s[4:5] offset:32 glc
	global_load_b64 v[0:1], v8, s[4:5] offset:40
	s_waitcnt vmcnt(0)
	v_readfirstlane_b32 s12, v0
	v_readfirstlane_b32 s13, v1
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(SALU_CYCLE_1)
	s_and_b64 s[12:13], s[12:13], s[6:7]
	s_mul_i32 s9, s13, 24
	s_mul_hi_u32 s11, s12, 24
	s_mul_i32 s12, s12, 24
	s_add_i32 s11, s11, s9
	v_add_co_u32 v6, vcc_lo, v4, s12
	v_add_co_ci_u32_e32 v7, vcc_lo, s11, v5, vcc_lo
	s_mov_b32 s9, exec_lo
	global_store_b64 v[6:7], v[11:12], off
	s_waitcnt_vscnt null, 0x0
	global_atomic_cmpswap_b64 v[2:3], v8, v[9:12], s[4:5] offset:32 glc
	s_waitcnt vmcnt(0)
	v_cmpx_ne_u64_e64 v[2:3], v[11:12]
	s_cbranch_execz .LBB0_215
; %bb.213:                              ; %.preheader1.i.i.i136.preheader
	s_mov_b32 s11, 0
.LBB0_214:                              ; %.preheader1.i.i.i136
                                        ; =>This Inner Loop Header: Depth=1
	v_dual_mov_b32 v0, s6 :: v_dual_mov_b32 v1, s7
	s_sleep 1
	global_store_b64 v[6:7], v[2:3], off
	s_waitcnt_vscnt null, 0x0
	global_atomic_cmpswap_b64 v[0:1], v8, v[0:3], s[4:5] offset:32 glc
	s_waitcnt vmcnt(0)
	v_cmp_eq_u64_e32 vcc_lo, v[0:1], v[2:3]
	v_dual_mov_b32 v3, v1 :: v_dual_mov_b32 v2, v0
	s_or_b32 s11, vcc_lo, s11
	s_delay_alu instid0(SALU_CYCLE_1)
	s_and_not1_b32 exec_lo, exec_lo, s11
	s_cbranch_execnz .LBB0_214
.LBB0_215:                              ; %Flow454
	s_or_b32 exec_lo, exec_lo, s9
	v_mov_b32_e32 v3, 0
	s_mov_b32 s11, exec_lo
	s_mov_b32 s9, exec_lo
	v_mbcnt_lo_u32_b32 v2, s11, 0
	global_load_b64 v[0:1], v3, s[4:5] offset:16
	v_cmpx_eq_u32_e32 0, v2
	s_cbranch_execz .LBB0_217
; %bb.216:
	s_bcnt1_i32_b32 s11, s11
	s_delay_alu instid0(SALU_CYCLE_1)
	v_mov_b32_e32 v2, s11
	s_waitcnt vmcnt(0)
	global_atomic_add_u64 v[0:1], v[2:3], off offset:8
.LBB0_217:
	s_or_b32 exec_lo, exec_lo, s9
	s_waitcnt vmcnt(0)
	global_load_b64 v[2:3], v[0:1], off offset:16
	s_waitcnt vmcnt(0)
	v_cmp_eq_u64_e32 vcc_lo, 0, v[2:3]
	s_cbranch_vccnz .LBB0_219
; %bb.218:
	global_load_b32 v0, v[0:1], off offset:24
	v_mov_b32_e32 v1, 0
	s_waitcnt vmcnt(0)
	v_readfirstlane_b32 s9, v0
	s_waitcnt_vscnt null, 0x0
	global_store_b64 v[2:3], v[0:1], off
	s_and_b32 m0, s9, 0xff
	s_sendmsg sendmsg(MSG_INTERRUPT)
.LBB0_219:                              ; %Flow455
	s_or_b32 exec_lo, exec_lo, s8
	s_add_i32 s3, s3, s1
	v_add_co_u32 v0, vcc_lo, v4, s10
	v_add_co_ci_u32_e32 v1, vcc_lo, s3, v5, vcc_lo
	s_delay_alu instid0(VALU_DEP_2) | instskip(NEXT) | instid1(VALU_DEP_2)
	v_add_co_u32 v0, vcc_lo, v0, 20
	v_add_co_ci_u32_e32 v1, vcc_lo, 0, v1, vcc_lo
.LBB0_220:                              ; =>This Inner Loop Header: Depth=1
	v_mov_b32_e32 v2, 1
	s_and_saveexec_b32 s1, s0
	s_cbranch_execz .LBB0_222
; %bb.221:                              ;   in Loop: Header=BB0_220 Depth=1
	global_load_b32 v2, v[0:1], off glc
	s_waitcnt vmcnt(0)
	buffer_gl1_inv
	buffer_gl0_inv
	v_and_b32_e32 v2, 1, v2
.LBB0_222:                              ;   in Loop: Header=BB0_220 Depth=1
	s_or_b32 exec_lo, exec_lo, s1
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_readfirstlane_b32 s1, v2
	s_cmp_eq_u32 s1, 0
	s_cbranch_scc1 .LBB0_224
; %bb.223:                              ;   in Loop: Header=BB0_220 Depth=1
	s_mov_b32 s1, 0
	s_sleep 1
	s_branch .LBB0_225
.LBB0_224:                              ;   in Loop: Header=BB0_220 Depth=1
	s_mov_b32 s1, -1
.LBB0_225:                              ; %Flow449
                                        ;   in Loop: Header=BB0_220 Depth=1
	s_delay_alu instid0(SALU_CYCLE_1)
	s_and_not1_b32 vcc_lo, exec_lo, s1
	s_cbranch_vccnz .LBB0_220
; %bb.226:
	s_and_saveexec_b32 s1, s0
	s_cbranch_execz .LBB0_230
; %bb.227:
	v_mov_b32_e32 v6, 0
	s_clause 0x2
	global_load_b64 v[2:3], v6, s[4:5] offset:40
	global_load_b64 v[7:8], v6, s[4:5] offset:24 glc
	global_load_b64 v[4:5], v6, s[4:5]
	s_waitcnt vmcnt(2)
	v_add_co_u32 v9, vcc_lo, v2, 1
	v_add_co_ci_u32_e32 v10, vcc_lo, 0, v3, vcc_lo
	s_delay_alu instid0(VALU_DEP_2) | instskip(NEXT) | instid1(VALU_DEP_2)
	v_add_co_u32 v0, vcc_lo, v9, s6
	v_add_co_ci_u32_e32 v1, vcc_lo, s7, v10, vcc_lo
	s_delay_alu instid0(VALU_DEP_1) | instskip(SKIP_1) | instid1(VALU_DEP_1)
	v_cmp_eq_u64_e32 vcc_lo, 0, v[0:1]
	v_dual_cndmask_b32 v1, v1, v10 :: v_dual_cndmask_b32 v0, v0, v9
	v_and_b32_e32 v3, v1, v3
	s_delay_alu instid0(VALU_DEP_2) | instskip(NEXT) | instid1(VALU_DEP_2)
	v_and_b32_e32 v2, v0, v2
	v_mul_lo_u32 v3, v3, 24
	s_delay_alu instid0(VALU_DEP_2) | instskip(SKIP_1) | instid1(VALU_DEP_2)
	v_mul_hi_u32 v9, v2, 24
	v_mul_lo_u32 v2, v2, 24
	v_add_nc_u32_e32 v3, v9, v3
	s_waitcnt vmcnt(0)
	s_delay_alu instid0(VALU_DEP_2) | instskip(SKIP_1) | instid1(VALU_DEP_3)
	v_add_co_u32 v4, vcc_lo, v4, v2
	v_mov_b32_e32 v2, v7
	v_add_co_ci_u32_e32 v5, vcc_lo, v5, v3, vcc_lo
	v_mov_b32_e32 v3, v8
	global_store_b64 v[4:5], v[7:8], off
	s_waitcnt_vscnt null, 0x0
	global_atomic_cmpswap_b64 v[2:3], v6, v[0:3], s[4:5] offset:24 glc
	s_waitcnt vmcnt(0)
	v_cmp_ne_u64_e32 vcc_lo, v[2:3], v[7:8]
	s_and_b32 exec_lo, exec_lo, vcc_lo
	s_cbranch_execz .LBB0_230
; %bb.228:                              ; %.preheader.i.i.i135.preheader
	s_mov_b32 s0, 0
.LBB0_229:                              ; %.preheader.i.i.i135
                                        ; =>This Inner Loop Header: Depth=1
	s_sleep 1
	global_store_b64 v[4:5], v[2:3], off
	s_waitcnt_vscnt null, 0x0
	global_atomic_cmpswap_b64 v[7:8], v6, v[0:3], s[4:5] offset:24 glc
	s_waitcnt vmcnt(0)
	v_cmp_eq_u64_e32 vcc_lo, v[7:8], v[2:3]
	v_dual_mov_b32 v2, v7 :: v_dual_mov_b32 v3, v8
	s_or_b32 s0, vcc_lo, s0
	s_delay_alu instid0(SALU_CYCLE_1)
	s_and_not1_b32 exec_lo, exec_lo, s0
	s_cbranch_execnz .LBB0_229
.LBB0_230:                              ; %__ockl_printf_append_args.exit139
	s_or_b32 exec_lo, exec_lo, s1
	s_and_saveexec_b32 s0, s2
	s_cbranch_execz .LBB0_232
; %bb.231:
	global_load_b64 v[0:1], v42, s[22:23]
	s_waitcnt vmcnt(0)
	global_store_b64 v[36:37], v[0:1], off
	global_load_b64 v[0:1], v42, s[24:25]
	s_waitcnt vmcnt(0)
	global_store_b64 v[38:39], v[0:1], off
	global_load_b64 v[0:1], v42, s[26:27]
	s_waitcnt vmcnt(0)
	global_store_b64 v42, v[0:1], s[16:17]
	global_load_b64 v[0:1], v42, s[28:29]
	s_waitcnt vmcnt(0)
	global_store_b64 v42, v[0:1], s[18:19]
.LBB0_232:
	s_nop 0
	s_sendmsg sendmsg(MSG_DEALLOC_VGPRS)
	s_endpgm
	.section	.rodata,"a",@progbits
	.p2align	6, 0x0
	.amdhsa_kernel _Z8asteroidPdS_S_S_S_S_S_S_S_i
		.amdhsa_group_segment_fixed_size 0
		.amdhsa_private_segment_fixed_size 0
		.amdhsa_kernarg_size 336
		.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 73
		.amdhsa_next_free_sgpr 93
		.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	_Z8asteroidPdS_S_S_S_S_S_S_S_i, .Lfunc_end0-_Z8asteroidPdS_S_S_S_S_S_S_S_i
                                        ; -- End function
	.section	.AMDGPU.csdata,"",@progbits
; Kernel info:
; codeLenInByte = 16008
; NumSgprs: 95
; NumVgprs: 73
; ScratchSize: 0
; MemoryBound: 1
; FloatMode: 240
; IeeeMode: 1
; LDSByteSize: 0 bytes/workgroup (compile time only)
; SGPRBlocks: 11
; VGPRBlocks: 9
; NumSGPRsForWavesPerEU: 95
; NumVGPRsForWavesPerEU: 73
; Occupancy: 16
; WaveLimiterHint : 1
; 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	.str,@object                    ; @.str
	.section	.rodata.str1.1,"aMS",@progbits,1
.str:
	.asciz	"Object %d: %d, %d\n"
	.size	.str, 19

	.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:
      - .address_space:  global
        .offset:         0
        .size:           8
        .value_kind:     global_buffer
      - .address_space:  global
        .offset:         8
        .size:           8
        .value_kind:     global_buffer
      - .address_space:  global
        .offset:         16
        .size:           8
        .value_kind:     global_buffer
      - .address_space:  global
        .offset:         24
        .size:           8
        .value_kind:     global_buffer
      - .address_space:  global
        .offset:         32
        .size:           8
        .value_kind:     global_buffer
      - .address_space:  global
        .offset:         40
        .size:           8
        .value_kind:     global_buffer
      - .address_space:  global
        .offset:         48
        .size:           8
        .value_kind:     global_buffer
      - .address_space:  global
        .offset:         56
        .size:           8
        .value_kind:     global_buffer
      - .address_space:  global
        .offset:         64
        .size:           8
        .value_kind:     global_buffer
      - .offset:         72
        .size:           4
        .value_kind:     by_value
      - .offset:         80
        .size:           4
        .value_kind:     hidden_block_count_x
      - .offset:         84
        .size:           4
        .value_kind:     hidden_block_count_y
      - .offset:         88
        .size:           4
        .value_kind:     hidden_block_count_z
      - .offset:         92
        .size:           2
        .value_kind:     hidden_group_size_x
      - .offset:         94
        .size:           2
        .value_kind:     hidden_group_size_y
      - .offset:         96
        .size:           2
        .value_kind:     hidden_group_size_z
      - .offset:         98
        .size:           2
        .value_kind:     hidden_remainder_x
      - .offset:         100
        .size:           2
        .value_kind:     hidden_remainder_y
      - .offset:         102
        .size:           2
        .value_kind:     hidden_remainder_z
      - .offset:         120
        .size:           8
        .value_kind:     hidden_global_offset_x
      - .offset:         128
        .size:           8
        .value_kind:     hidden_global_offset_y
      - .offset:         136
        .size:           8
        .value_kind:     hidden_global_offset_z
      - .offset:         144
        .size:           2
        .value_kind:     hidden_grid_dims
      - .offset:         160
        .size:           8
        .value_kind:     hidden_hostcall_buffer
    .group_segment_fixed_size: 0
    .kernarg_segment_align: 8
    .kernarg_segment_size: 336
    .language:       OpenCL C
    .language_version:
      - 2
      - 0
    .max_flat_workgroup_size: 1024
    .name:           _Z8asteroidPdS_S_S_S_S_S_S_S_i
    .private_segment_fixed_size: 0
    .sgpr_count:     95
    .sgpr_spill_count: 0
    .symbol:         _Z8asteroidPdS_S_S_S_S_S_S_S_i.kd
    .uniform_work_group_size: 1
    .uses_dynamic_stack: false
    .vgpr_count:     73
    .vgpr_spill_count: 0
    .wavefront_size: 32
    .workgroup_processor_mode: 1
amdhsa.target:   amdgcn-amd-amdhsa--gfx1100
amdhsa.version:
  - 1
  - 2
...

	.end_amdgpu_metadata
