#include<stdio.h>
#include<time.h>
__global__ void gathertrajctoryKernel(int b,int n,int m,int t,const float * __restrict__ inp,const int * __restrict__ idx, float * __restrict__ out){
    for(int i = blockIdx.x;i<b;i+=gridDim.x){
        for(int j = threadIdx.x;j<m; j+=blockDim.x){
            int tmp = idx[i*m+j];
            for(int k = 0;k<t;k++){
                int tmp_idx1 = ((i*m+j)*t+k);
                int tmp_idx2 = ((i*n+tmp)*t+k);
                out[tmp_idx1*3+0]=inp[tmp_idx2*3+0];
                out[tmp_idx1*3+1]=inp[tmp_idx2*3+1];
                out[tmp_idx1*3+2]=inp[tmp_idx2*3+2];
            }
        }
    }
}

void gathertrajctoryLauncher(int b,int n,int m,int t,const float * inp,const int *idx, float *out){
    //clock_t start,finish;
    //double totaltime;
    //start=clock();
    gathertrajctoryKernel<<<32,512>>>(b,n,m,t,inp,idx,out);
    //finish=clock();
    //totaltime=(double)(finish-start)/CLOCKS_PER_SEC;
    //printf("gathertrajctoryKernel:%f b:%d n:%d m:%d t:%d \n",totaltime,b,n,m,t);

}

__global__ void gathertrajectorygradKernel(int b,int n,int m,int t,const float * __restrict__ out_g,const int * __restrict__ idx,float * __restrict__ inp_g){
    for(int i = blockIdx.x;i<b;i+=gridDim.x){
        for(int j = threadIdx.x;j<m; j+=blockDim.x){
            int tmp = idx[i*m+j];
            for(int k = 0;k<t;k++){
                int tmp_idx1 = ((i*m+j)*t+k);
                int tmp_idx2 = ((i*n+tmp)*t+k);
                atomicAdd(&inp_g[tmp_idx2*3+0],out_g[tmp_idx1*3+0]);
                atomicAdd(&inp_g[tmp_idx2*3+1],out_g[tmp_idx1*3+1]);
                atomicAdd(&inp_g[tmp_idx2*3+2],out_g[tmp_idx1*3+2]);
            }
        }
    }
}

void gathertrajectorygradLauncher(int b,int n,int m,int t,const float * out_g,const int * idx,float * inp_g){
    //clock_t start,finish;
    //double totaltime;
    //start=clock();
    gathertrajectorygradKernel<<<32,128>>>(b,n,m,t,out_g,idx,inp_g);
    //finish=clock();
    //totaltime=(double)(finish-start)/CLOCKS_PER_SEC;
    //printf("gathertrajectorygradKernel:%f  \n",totaltime);

}

__global__ void farthestpointsamplingtrajectoryKernel(int b,int n,int m,int t,const float * __restrict__ trajectory,float * __restrict__ temp,int * __restrict__ sample_idx){
    const int BlockSize = 512;
    __shared__ float max_dists[BlockSize];
    __shared__ int dists_idx[BlockSize];
    const int BufferSize=2880;
    __shared__ float buf[BufferSize*3];
    const int framesize = 64;
    __shared__ float framebufx[framesize];
    __shared__ float framebufy[framesize];
    __shared__ float framebufz[framesize];
    for(int i=blockIdx.x;i<b;i+=gridDim.x){   //batch init
        int last = 0;
        if (threadIdx.x==0)
            sample_idx[i*m+0]=last;
        for(int j=threadIdx.x;j<n;j+=blockDim.x){
            temp[blockIdx.x*n+j]=1e38;
        }
        for(int j=threadIdx.x;j<min(BufferSize,n*t)*3;j+=blockDim.x){
            buf[j]=trajectory[i*n*t*3+j];
        }
        __syncthreads();
        for(int j=0;j<m;j++){ //each sample step
            float t_max_dists = -1;
            int t_dist_idx = 0;
            for(int k=0;k<min(t,framesize);k++){
                int tmp_idx = i*n*t*3 + last*t*3 + k*3;
                framebufx[k] = trajectory[tmp_idx + 0];
                framebufy[k] = trajectory[tmp_idx + 1];
                framebufz[k] = trajectory[tmp_idx + 2]; 
            }
            for(int k=threadIdx.x;k<n;k+=blockDim.x){ //compute dis
                float td=temp[blockIdx.x*n+k];
                float td_new = 0;
                float tx1=0,ty1=0,tz1=0,tx2=0,ty2=0,tz2=0;
                for(int u=0;u<t;u++){
                    if(u<framesize){
                        int tmp_idx = u;
                        tx1=framebufx[tmp_idx];
                        ty1=framebufy[tmp_idx];
                        tz1=framebufz[tmp_idx];
                    }else{
                        int tmp_idx = i*n*t*3 + last*t*3 + u*3;
                        tx1=trajectory[tmp_idx+0];
                        ty1=trajectory[tmp_idx+1];
                        tz1=trajectory[tmp_idx+2];
                    }
                    if(k*t+u<BufferSize){
                        int tmp_idx = (k*t+u)*3;
                        tx2=buf[tmp_idx+0];
                        ty2=buf[tmp_idx+1];
                        tz2=buf[tmp_idx+2];
                    }else{
                        int tmp_idx = i*n*t*3 + k*t*3 + u*3;
                        tx2=trajectory[tmp_idx+0];
                        ty2=trajectory[tmp_idx+1];
                        tz2=trajectory[tmp_idx+2];
                    }
                    td_new += max(((tx2-tx1)*(tx2-tx1)+(ty2-ty1)*(ty2-ty1)+(tz2-tz1)*(tz2-tz1)),1e-20f);
                }
                td_new/=t;
                float d2=min(td,td_new);
                if(d2!=td)
                    temp[blockIdx.x*n+k]=d2;
                if(d2>t_max_dists){
                    t_max_dists=d2;
                    t_dist_idx=k;
                }
            }
            max_dists[threadIdx.x]=t_max_dists;
            dists_idx[threadIdx.x]=t_dist_idx;
            for (int u=0;(1<<u)<blockDim.x;u++){ //reduce min
                __syncthreads();
               if (threadIdx.x<(blockDim.x>>(u+1))){
                   int i1=(threadIdx.x*2)<<u;
                   int i2=(threadIdx.x*2+1)<<u;
                   if (max_dists[i1]<max_dists[i2]){
                       max_dists[i1]=max_dists[i2];
                       dists_idx[i1]=dists_idx[i2];
                   }
               }
            }
            __syncthreads();
            last=dists_idx[0];
            if (threadIdx.x==0)
                sample_idx[i*m+j]=last;
        }
    }
}
//require 32*n working space
void farthestpointsamplingtrajectoryLauncher(int b,int n,int m,int t,const float * inp,float * temp,int *out){
    //clock_t start,finish;
    //double totaltime;
    //start=clock();
    farthestpointsamplingtrajectoryKernel<<<32,512>>>(b,n,m,t,inp,temp,out);
    //finish=clock();
    //totaltime=(double)(finish-start)/CLOCKS_PER_SEC;
    //printf("farthestpointsamplingtrajectoryKernel:%f  \n",totaltime);

}

	.file	"tmpxft_003106c2_00000000-6_sampling_trajectory.cudafe1.cpp"
	.text
#APP

#NO_APP
	.type	_ZL26__cudaUnregisterBinaryUtilv, @function
_ZL26__cudaUnregisterBinaryUtilv:
.LFB2032:
	.cfi_startproc
	endbr64
	movq	_ZL20__cudaFatCubinHandle(%rip), %rdi
	jmp	__cudaUnregisterFatBinary@PLT
	.cfi_endproc
.LFE2032:
	.size	_ZL26__cudaUnregisterBinaryUtilv, .-_ZL26__cudaUnregisterBinaryUtilv
	.globl	_Z51__device_stub__Z21gathertrajctoryKerneliiiiPKfPKiPfiiiiPKfPKiPf
	.type	_Z51__device_stub__Z21gathertrajctoryKerneliiiiPKfPKiPfiiiiPKfPKiPf, @function
_Z51__device_stub__Z21gathertrajctoryKerneliiiiPKfPKiPfiiiiPKfPKiPf:
.LFB2054:
	.cfi_startproc
	endbr64
	subq	$184, %rsp
	.cfi_def_cfa_offset 192
	movl	%edi, 12(%rsp)
	leaq	64(%rsp), %rdi
	movl	%esi, 8(%rsp)
	leaq	76(%rsp), %rsi
	movl	%edx, 4(%rsp)
	leaq	48(%rsp), %rdx
	movl	%ecx, (%rsp)
	leaq	56(%rsp), %rcx
	movq	%fs:40, %rax
	movq	%rax, 168(%rsp)
	xorl	%eax, %eax
	leaq	12(%rsp), %rax
	movq	%r8, 24(%rsp)
	movq	%rax, 112(%rsp)
	leaq	8(%rsp), %rax
	movq	%rax, 120(%rsp)
	leaq	4(%rsp), %rax
	movq	%rax, 128(%rsp)
	movq	%rsp, %rax
	movq	%rax, 136(%rsp)
	leaq	24(%rsp), %rax
	movq	%rax, 144(%rsp)
	leaq	32(%rsp), %rax
	movq	%rax, 152(%rsp)
	movq	192(%rsp), %rax
	movq	%r9, 32(%rsp)
	movq	%rax, 40(%rsp)
	leaq	40(%rsp), %rax
	movq	%rax, 160(%rsp)
	movabsq	$4294967297, %rax
	movq	%rax, 64(%rsp)
	movl	$1, 72(%rsp)
	movq	%rax, 76(%rsp)
	movl	$1, 84(%rsp)
	call	__cudaPopCallConfiguration@PLT
	testl	%eax, %eax
	jne	.L2
	pushq	56(%rsp)
	.cfi_def_cfa_offset 200
	leaq	_Z21gathertrajctoryKerneliiiiPKfPKiPf(%rip), %rdi
	pushq	56(%rsp)
	.cfi_def_cfa_offset 208
	movq	92(%rsp), %rcx
	movl	100(%rsp), %r8d
	movq	80(%rsp), %rsi
	movl	88(%rsp), %edx
	leaq	128(%rsp), %r9
	call	cudaLaunchKernel@PLT
	popq	%rax
	.cfi_def_cfa_offset 200
	popq	%rdx
	.cfi_def_cfa_offset 192
.L2:
	movq	168(%rsp), %rax
	subq	%fs:40, %rax
	je	.L4
	call	__stack_chk_fail@PLT
.L4:
	addq	$184, %rsp
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE2054:
	.size	_Z51__device_stub__Z21gathertrajctoryKerneliiiiPKfPKiPfiiiiPKfPKiPf, .-_Z51__device_stub__Z21gathertrajctoryKerneliiiiPKfPKiPfiiiiPKfPKiPf
	.globl	_Z21gathertrajctoryKerneliiiiPKfPKiPf
	.type	_Z21gathertrajctoryKerneliiiiPKfPKiPf, @function
_Z21gathertrajctoryKerneliiiiPKfPKiPf:
.LFB2055:
	.cfi_startproc
	endbr64
	jmp	_Z51__device_stub__Z21gathertrajctoryKerneliiiiPKfPKiPfiiiiPKfPKiPf
	.cfi_endproc
.LFE2055:
	.size	_Z21gathertrajctoryKerneliiiiPKfPKiPf, .-_Z21gathertrajctoryKerneliiiiPKfPKiPf
	.globl	_Z23gathertrajctoryLauncheriiiiPKfPKiPf
	.type	_Z23gathertrajctoryLauncheriiiiPKfPKiPf, @function
_Z23gathertrajctoryLauncheriiiiPKfPKiPf:
.LFB2027:
	.cfi_startproc
	endbr64
	pushq	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	movq	%r9, %r15
	xorl	%r9d, %r9d
	pushq	%r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	movq	%r8, %r14
	xorl	%r8d, %r8d
	pushq	%r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	movl	%ecx, %r13d
	movl	$1, %ecx
	pushq	%r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	movl	%edx, %r12d
	movl	$8388609, %edx
	pushq	%rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	salq	$9, %rdx
	movl	%esi, %ebp
	movl	$1, %esi
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	subq	$56, %rsp
	.cfi_def_cfa_offset 112
	movl	%edi, 12(%rsp)
	movl	$134217729, %edi
	movq	112(%rsp), %rbx
	salq	$5, %rdi
	call	__cudaPushCallConfiguration@PLT
	testl	%eax, %eax
	jne	.L8
	movq	%rbx, 112(%rsp)
	movl	12(%rsp), %edi
	addq	$56, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	movq	%r15, %r9
	popq	%rbx
	.cfi_def_cfa_offset 48
	movq	%r14, %r8
	movl	%r13d, %ecx
	movl	%r12d, %edx
	movl	%ebp, %esi
	popq	%rbp
	.cfi_def_cfa_offset 40
	popq	%r12
	.cfi_def_cfa_offset 32
	popq	%r13
	.cfi_def_cfa_offset 24
	popq	%r14
	.cfi_def_cfa_offset 16
	popq	%r15
	.cfi_def_cfa_offset 8
	jmp	_Z51__device_stub__Z21gathertrajctoryKerneliiiiPKfPKiPfiiiiPKfPKiPf
.L8:
	.cfi_restore_state
	addq	$56, %rsp
	.cfi_def_cfa_offset 56
	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	_Z23gathertrajctoryLauncheriiiiPKfPKiPf, .-_Z23gathertrajctoryLauncheriiiiPKfPKiPf
	.globl	_Z56__device_stub__Z26gathertrajectorygradKerneliiiiPKfPKiPfiiiiPKfPKiPf
	.type	_Z56__device_stub__Z26gathertrajectorygradKerneliiiiPKfPKiPfiiiiPKfPKiPf, @function
_Z56__device_stub__Z26gathertrajectorygradKerneliiiiPKfPKiPfiiiiPKfPKiPf:
.LFB2056:
	.cfi_startproc
	endbr64
	subq	$184, %rsp
	.cfi_def_cfa_offset 192
	movl	%edi, 12(%rsp)
	leaq	64(%rsp), %rdi
	movl	%esi, 8(%rsp)
	leaq	76(%rsp), %rsi
	movl	%edx, 4(%rsp)
	leaq	48(%rsp), %rdx
	movl	%ecx, (%rsp)
	leaq	56(%rsp), %rcx
	movq	%fs:40, %rax
	movq	%rax, 168(%rsp)
	xorl	%eax, %eax
	leaq	12(%rsp), %rax
	movq	%r8, 24(%rsp)
	movq	%rax, 112(%rsp)
	leaq	8(%rsp), %rax
	movq	%rax, 120(%rsp)
	leaq	4(%rsp), %rax
	movq	%rax, 128(%rsp)
	movq	%rsp, %rax
	movq	%rax, 136(%rsp)
	leaq	24(%rsp), %rax
	movq	%rax, 144(%rsp)
	leaq	32(%rsp), %rax
	movq	%rax, 152(%rsp)
	movq	192(%rsp), %rax
	movq	%r9, 32(%rsp)
	movq	%rax, 40(%rsp)
	leaq	40(%rsp), %rax
	movq	%rax, 160(%rsp)
	movabsq	$4294967297, %rax
	movq	%rax, 64(%rsp)
	movl	$1, 72(%rsp)
	movq	%rax, 76(%rsp)
	movl	$1, 84(%rsp)
	call	__cudaPopCallConfiguration@PLT
	testl	%eax, %eax
	jne	.L11
	pushq	56(%rsp)
	.cfi_def_cfa_offset 200
	leaq	_Z26gathertrajectorygradKerneliiiiPKfPKiPf(%rip), %rdi
	pushq	56(%rsp)
	.cfi_def_cfa_offset 208
	movq	92(%rsp), %rcx
	movl	100(%rsp), %r8d
	movq	80(%rsp), %rsi
	movl	88(%rsp), %edx
	leaq	128(%rsp), %r9
	call	cudaLaunchKernel@PLT
	popq	%rax
	.cfi_def_cfa_offset 200
	popq	%rdx
	.cfi_def_cfa_offset 192
.L11:
	movq	168(%rsp), %rax
	subq	%fs:40, %rax
	je	.L13
	call	__stack_chk_fail@PLT
.L13:
	addq	$184, %rsp
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE2056:
	.size	_Z56__device_stub__Z26gathertrajectorygradKerneliiiiPKfPKiPfiiiiPKfPKiPf, .-_Z56__device_stub__Z26gathertrajectorygradKerneliiiiPKfPKiPfiiiiPKfPKiPf
	.globl	_Z26gathertrajectorygradKerneliiiiPKfPKiPf
	.type	_Z26gathertrajectorygradKerneliiiiPKfPKiPf, @function
_Z26gathertrajectorygradKerneliiiiPKfPKiPf:
.LFB2057:
	.cfi_startproc
	endbr64
	jmp	_Z56__device_stub__Z26gathertrajectorygradKerneliiiiPKfPKiPfiiiiPKfPKiPf
	.cfi_endproc
.LFE2057:
	.size	_Z26gathertrajectorygradKerneliiiiPKfPKiPf, .-_Z26gathertrajectorygradKerneliiiiPKfPKiPf
	.globl	_Z28gathertrajectorygradLauncheriiiiPKfPKiPf
	.type	_Z28gathertrajectorygradLauncheriiiiPKfPKiPf, @function
_Z28gathertrajectorygradLauncheriiiiPKfPKiPf:
.LFB2028:
	.cfi_startproc
	endbr64
	pushq	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	movq	%r9, %r15
	xorl	%r9d, %r9d
	pushq	%r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	movq	%r8, %r14
	xorl	%r8d, %r8d
	pushq	%r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	movl	%ecx, %r13d
	movl	$1, %ecx
	pushq	%r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	movl	%edx, %r12d
	movl	$33554433, %edx
	pushq	%rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	salq	$7, %rdx
	movl	%esi, %ebp
	movl	$1, %esi
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	subq	$56, %rsp
	.cfi_def_cfa_offset 112
	movl	%edi, 12(%rsp)
	movl	$134217729, %edi
	movq	112(%rsp), %rbx
	salq	$5, %rdi
	call	__cudaPushCallConfiguration@PLT
	testl	%eax, %eax
	jne	.L16
	movq	%rbx, 112(%rsp)
	movl	12(%rsp), %edi
	addq	$56, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	movq	%r15, %r9
	popq	%rbx
	.cfi_def_cfa_offset 48
	movq	%r14, %r8
	movl	%r13d, %ecx
	movl	%r12d, %edx
	movl	%ebp, %esi
	popq	%rbp
	.cfi_def_cfa_offset 40
	popq	%r12
	.cfi_def_cfa_offset 32
	popq	%r13
	.cfi_def_cfa_offset 24
	popq	%r14
	.cfi_def_cfa_offset 16
	popq	%r15
	.cfi_def_cfa_offset 8
	jmp	_Z56__device_stub__Z26gathertrajectorygradKerneliiiiPKfPKiPfiiiiPKfPKiPf
.L16:
	.cfi_restore_state
	addq	$56, %rsp
	.cfi_def_cfa_offset 56
	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
.LFE2028:
	.size	_Z28gathertrajectorygradLauncheriiiiPKfPKiPf, .-_Z28gathertrajectorygradLauncheriiiiPKfPKiPf
	.globl	_Z66__device_stub__Z37farthestpointsamplingtrajectoryKerneliiiiPKfPfPiiiiiPKfPfPi
	.type	_Z66__device_stub__Z37farthestpointsamplingtrajectoryKerneliiiiPKfPfPiiiiiPKfPfPi, @function
_Z66__device_stub__Z37farthestpointsamplingtrajectoryKerneliiiiPKfPfPiiiiiPKfPfPi:
.LFB2058:
	.cfi_startproc
	endbr64
	subq	$184, %rsp
	.cfi_def_cfa_offset 192
	movl	%edi, 12(%rsp)
	leaq	64(%rsp), %rdi
	movl	%esi, 8(%rsp)
	leaq	76(%rsp), %rsi
	movl	%edx, 4(%rsp)
	leaq	48(%rsp), %rdx
	movl	%ecx, (%rsp)
	leaq	56(%rsp), %rcx
	movq	%fs:40, %rax
	movq	%rax, 168(%rsp)
	xorl	%eax, %eax
	leaq	12(%rsp), %rax
	movq	%r8, 24(%rsp)
	movq	%rax, 112(%rsp)
	leaq	8(%rsp), %rax
	movq	%rax, 120(%rsp)
	leaq	4(%rsp), %rax
	movq	%rax, 128(%rsp)
	movq	%rsp, %rax
	movq	%rax, 136(%rsp)
	leaq	24(%rsp), %rax
	movq	%rax, 144(%rsp)
	leaq	32(%rsp), %rax
	movq	%rax, 152(%rsp)
	movq	192(%rsp), %rax
	movq	%r9, 32(%rsp)
	movq	%rax, 40(%rsp)
	leaq	40(%rsp), %rax
	movq	%rax, 160(%rsp)
	movabsq	$4294967297, %rax
	movq	%rax, 64(%rsp)
	movl	$1, 72(%rsp)
	movq	%rax, 76(%rsp)
	movl	$1, 84(%rsp)
	call	__cudaPopCallConfiguration@PLT
	testl	%eax, %eax
	jne	.L19
	pushq	56(%rsp)
	.cfi_def_cfa_offset 200
	leaq	_Z37farthestpointsamplingtrajectoryKerneliiiiPKfPfPi(%rip), %rdi
	pushq	56(%rsp)
	.cfi_def_cfa_offset 208
	movq	92(%rsp), %rcx
	movl	100(%rsp), %r8d
	movq	80(%rsp), %rsi
	movl	88(%rsp), %edx
	leaq	128(%rsp), %r9
	call	cudaLaunchKernel@PLT
	popq	%rax
	.cfi_def_cfa_offset 200
	popq	%rdx
	.cfi_def_cfa_offset 192
.L19:
	movq	168(%rsp), %rax
	subq	%fs:40, %rax
	je	.L21
	call	__stack_chk_fail@PLT
.L21:
	addq	$184, %rsp
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE2058:
	.size	_Z66__device_stub__Z37farthestpointsamplingtrajectoryKerneliiiiPKfPfPiiiiiPKfPfPi, .-_Z66__device_stub__Z37farthestpointsamplingtrajectoryKerneliiiiPKfPfPiiiiiPKfPfPi
	.globl	_Z37farthestpointsamplingtrajectoryKerneliiiiPKfPfPi
	.type	_Z37farthestpointsamplingtrajectoryKerneliiiiPKfPfPi, @function
_Z37farthestpointsamplingtrajectoryKerneliiiiPKfPfPi:
.LFB2059:
	.cfi_startproc
	endbr64
	jmp	_Z66__device_stub__Z37farthestpointsamplingtrajectoryKerneliiiiPKfPfPiiiiiPKfPfPi
	.cfi_endproc
.LFE2059:
	.size	_Z37farthestpointsamplingtrajectoryKerneliiiiPKfPfPi, .-_Z37farthestpointsamplingtrajectoryKerneliiiiPKfPfPi
	.globl	_Z39farthestpointsamplingtrajectoryLauncheriiiiPKfPfPi
	.type	_Z39farthestpointsamplingtrajectoryLauncheriiiiPKfPfPi, @function
_Z39farthestpointsamplingtrajectoryLauncheriiiiPKfPfPi:
.LFB2029:
	.cfi_startproc
	endbr64
	pushq	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	movq	%r9, %r15
	xorl	%r9d, %r9d
	pushq	%r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	movq	%r8, %r14
	xorl	%r8d, %r8d
	pushq	%r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	movl	%ecx, %r13d
	movl	$1, %ecx
	pushq	%r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	movl	%edx, %r12d
	movl	$8388609, %edx
	pushq	%rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	salq	$9, %rdx
	movl	%esi, %ebp
	movl	$1, %esi
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	subq	$56, %rsp
	.cfi_def_cfa_offset 112
	movl	%edi, 12(%rsp)
	movl	$134217729, %edi
	movq	112(%rsp), %rbx
	salq	$5, %rdi
	call	__cudaPushCallConfiguration@PLT
	testl	%eax, %eax
	jne	.L24
	movq	%rbx, 112(%rsp)
	movl	12(%rsp), %edi
	addq	$56, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	movq	%r15, %r9
	popq	%rbx
	.cfi_def_cfa_offset 48
	movq	%r14, %r8
	movl	%r13d, %ecx
	movl	%r12d, %edx
	movl	%ebp, %esi
	popq	%rbp
	.cfi_def_cfa_offset 40
	popq	%r12
	.cfi_def_cfa_offset 32
	popq	%r13
	.cfi_def_cfa_offset 24
	popq	%r14
	.cfi_def_cfa_offset 16
	popq	%r15
	.cfi_def_cfa_offset 8
	jmp	_Z66__device_stub__Z37farthestpointsamplingtrajectoryKerneliiiiPKfPfPiiiiiPKfPfPi
.L24:
	.cfi_restore_state
	addq	$56, %rsp
	.cfi_def_cfa_offset 56
	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
.LFE2029:
	.size	_Z39farthestpointsamplingtrajectoryLauncheriiiiPKfPfPi, .-_Z39farthestpointsamplingtrajectoryLauncheriiiiPKfPfPi
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"_Z37farthestpointsamplingtrajectoryKerneliiiiPKfPfPi"
.LC1:
	.string	"_Z26gathertrajectorygradKerneliiiiPKfPKiPf"
.LC2:
	.string	"_Z21gathertrajctoryKerneliiiiPKfPKiPf"
	.section	.text.startup,"ax",@progbits
	.type	_ZL24__sti____cudaRegisterAllv, @function
_ZL24__sti____cudaRegisterAllv:
.LFB2061:
	.cfi_startproc
	endbr64
	pushq	%rbx
	.cfi_def_cfa_offset 16
	.cfi_offset 3, -16
	leaq	_ZL15__fatDeviceText(%rip), %rdi
	call	__cudaRegisterFatBinary@PLT
	pushq	$0
	.cfi_def_cfa_offset 24
	xorl	%r9d, %r9d
	orl	$-1, %r8d
	pushq	$0
	.cfi_def_cfa_offset 32
	leaq	.LC0(%rip), %rdx
	movq	%rax, %rdi
	movq	%rax, %rbx
	pushq	$0
	.cfi_def_cfa_offset 40
	movq	%rdx, %rcx
	leaq	_Z37farthestpointsamplingtrajectoryKerneliiiiPKfPfPi(%rip), %rsi
	pushq	$0
	.cfi_def_cfa_offset 48
	movq	%rax, _ZL20__cudaFatCubinHandle(%rip)
	call	__cudaRegisterFunction@PLT
	addq	$32, %rsp
	.cfi_def_cfa_offset 16
	movq	%rbx, %rdi
	xorl	%r9d, %r9d
	pushq	$0
	.cfi_def_cfa_offset 24
	leaq	.LC1(%rip), %rdx
	orl	$-1, %r8d
	leaq	_Z26gathertrajectorygradKerneliiiiPKfPKiPf(%rip), %rsi
	pushq	$0
	.cfi_def_cfa_offset 32
	movq	%rdx, %rcx
	pushq	$0
	.cfi_def_cfa_offset 40
	pushq	$0
	.cfi_def_cfa_offset 48
	call	__cudaRegisterFunction@PLT
	addq	$32, %rsp
	.cfi_def_cfa_offset 16
	movq	%rbx, %rdi
	xorl	%r9d, %r9d
	pushq	$0
	.cfi_def_cfa_offset 24
	leaq	.LC2(%rip), %rdx
	orl	$-1, %r8d
	leaq	_Z21gathertrajctoryKerneliiiiPKfPKiPf(%rip), %rsi
	pushq	$0
	.cfi_def_cfa_offset 32
	movq	%rdx, %rcx
	pushq	$0
	.cfi_def_cfa_offset 40
	pushq	$0
	.cfi_def_cfa_offset 48
	call	__cudaRegisterFunction@PLT
	movq	_ZL20__cudaFatCubinHandle(%rip), %rdi
	addq	$32, %rsp
	.cfi_def_cfa_offset 16
	call	__cudaRegisterFatBinaryEnd@PLT
	leaq	_ZL26__cudaUnregisterBinaryUtilv(%rip), %rdi
	popq	%rbx
	.cfi_def_cfa_offset 8
	jmp	atexit@PLT
	.cfi_endproc
.LFE2061:
	.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
	.ident	"GCC: (Ubuntu 13.3.0-6ubuntu2~24.04) 13.3.0"
	.section	.note.GNU-stack,"",@progbits
	.section	.note.gnu.property,"a"
	.align 8
	.long	1f - 0f
	.long	4f - 1f
	.long	5
0:
	.string	"GNU"
1:
	.align 8
	.long	0xc0000002
	.long	3f - 2f
2:
	.long	0x3
3:
	.align 8
4:


#include <hip/hip_runtime.h>
#include<stdio.h>
#include<time.h>
__global__ void gathertrajctoryKernel(int b,int n,int m,int t,const float * __restrict__ inp,const int * __restrict__ idx, float * __restrict__ out){
    for(int i = blockIdx.x;i<b;i+=gridDim.x){
        for(int j = threadIdx.x;j<m; j+=blockDim.x){
            int tmp = idx[i*m+j];
            for(int k = 0;k<t;k++){
                int tmp_idx1 = ((i*m+j)*t+k);
                int tmp_idx2 = ((i*n+tmp)*t+k);
                out[tmp_idx1*3+0]=inp[tmp_idx2*3+0];
                out[tmp_idx1*3+1]=inp[tmp_idx2*3+1];
                out[tmp_idx1*3+2]=inp[tmp_idx2*3+2];
            }
        }
    }
}

void gathertrajctoryLauncher(int b,int n,int m,int t,const float * inp,const int *idx, float *out){
    //clock_t start,finish;
    //double totaltime;
    //start=clock();
    gathertrajctoryKernel<<<32,512>>>(b,n,m,t,inp,idx,out);
    //finish=clock();
    //totaltime=(double)(finish-start)/CLOCKS_PER_SEC;
    //printf("gathertrajctoryKernel:%f b:%d n:%d m:%d t:%d \n",totaltime,b,n,m,t);

}

__global__ void gathertrajectorygradKernel(int b,int n,int m,int t,const float * __restrict__ out_g,const int * __restrict__ idx,float * __restrict__ inp_g){
    for(int i = blockIdx.x;i<b;i+=gridDim.x){
        for(int j = threadIdx.x;j<m; j+=blockDim.x){
            int tmp = idx[i*m+j];
            for(int k = 0;k<t;k++){
                int tmp_idx1 = ((i*m+j)*t+k);
                int tmp_idx2 = ((i*n+tmp)*t+k);
                atomicAdd(&inp_g[tmp_idx2*3+0],out_g[tmp_idx1*3+0]);
                atomicAdd(&inp_g[tmp_idx2*3+1],out_g[tmp_idx1*3+1]);
                atomicAdd(&inp_g[tmp_idx2*3+2],out_g[tmp_idx1*3+2]);
            }
        }
    }
}

void gathertrajectorygradLauncher(int b,int n,int m,int t,const float * out_g,const int * idx,float * inp_g){
    //clock_t start,finish;
    //double totaltime;
    //start=clock();
    gathertrajectorygradKernel<<<32,128>>>(b,n,m,t,out_g,idx,inp_g);
    //finish=clock();
    //totaltime=(double)(finish-start)/CLOCKS_PER_SEC;
    //printf("gathertrajectorygradKernel:%f  \n",totaltime);

}

__global__ void farthestpointsamplingtrajectoryKernel(int b,int n,int m,int t,const float * __restrict__ trajectory,float * __restrict__ temp,int * __restrict__ sample_idx){
    const int BlockSize = 512;
    __shared__ float max_dists[BlockSize];
    __shared__ int dists_idx[BlockSize];
    const int BufferSize=2880;
    __shared__ float buf[BufferSize*3];
    const int framesize = 64;
    __shared__ float framebufx[framesize];
    __shared__ float framebufy[framesize];
    __shared__ float framebufz[framesize];
    for(int i=blockIdx.x;i<b;i+=gridDim.x){   //batch init
        int last = 0;
        if (threadIdx.x==0)
            sample_idx[i*m+0]=last;
        for(int j=threadIdx.x;j<n;j+=blockDim.x){
            temp[blockIdx.x*n+j]=1e38;
        }
        for(int j=threadIdx.x;j<min(BufferSize,n*t)*3;j+=blockDim.x){
            buf[j]=trajectory[i*n*t*3+j];
        }
        __syncthreads();
        for(int j=0;j<m;j++){ //each sample step
            float t_max_dists = -1;
            int t_dist_idx = 0;
            for(int k=0;k<min(t,framesize);k++){
                int tmp_idx = i*n*t*3 + last*t*3 + k*3;
                framebufx[k] = trajectory[tmp_idx + 0];
                framebufy[k] = trajectory[tmp_idx + 1];
                framebufz[k] = trajectory[tmp_idx + 2]; 
            }
            for(int k=threadIdx.x;k<n;k+=blockDim.x){ //compute dis
                float td=temp[blockIdx.x*n+k];
                float td_new = 0;
                float tx1=0,ty1=0,tz1=0,tx2=0,ty2=0,tz2=0;
                for(int u=0;u<t;u++){
                    if(u<framesize){
                        int tmp_idx = u;
                        tx1=framebufx[tmp_idx];
                        ty1=framebufy[tmp_idx];
                        tz1=framebufz[tmp_idx];
                    }else{
                        int tmp_idx = i*n*t*3 + last*t*3 + u*3;
                        tx1=trajectory[tmp_idx+0];
                        ty1=trajectory[tmp_idx+1];
                        tz1=trajectory[tmp_idx+2];
                    }
                    if(k*t+u<BufferSize){
                        int tmp_idx = (k*t+u)*3;
                        tx2=buf[tmp_idx+0];
                        ty2=buf[tmp_idx+1];
                        tz2=buf[tmp_idx+2];
                    }else{
                        int tmp_idx = i*n*t*3 + k*t*3 + u*3;
                        tx2=trajectory[tmp_idx+0];
                        ty2=trajectory[tmp_idx+1];
                        tz2=trajectory[tmp_idx+2];
                    }
                    td_new += max(((tx2-tx1)*(tx2-tx1)+(ty2-ty1)*(ty2-ty1)+(tz2-tz1)*(tz2-tz1)),1e-20f);
                }
                td_new/=t;
                float d2=min(td,td_new);
                if(d2!=td)
                    temp[blockIdx.x*n+k]=d2;
                if(d2>t_max_dists){
                    t_max_dists=d2;
                    t_dist_idx=k;
                }
            }
            max_dists[threadIdx.x]=t_max_dists;
            dists_idx[threadIdx.x]=t_dist_idx;
            for (int u=0;(1<<u)<blockDim.x;u++){ //reduce min
                __syncthreads();
               if (threadIdx.x<(blockDim.x>>(u+1))){
                   int i1=(threadIdx.x*2)<<u;
                   int i2=(threadIdx.x*2+1)<<u;
                   if (max_dists[i1]<max_dists[i2]){
                       max_dists[i1]=max_dists[i2];
                       dists_idx[i1]=dists_idx[i2];
                   }
               }
            }
            __syncthreads();
            last=dists_idx[0];
            if (threadIdx.x==0)
                sample_idx[i*m+j]=last;
        }
    }
}
//require 32*n working space
void farthestpointsamplingtrajectoryLauncher(int b,int n,int m,int t,const float * inp,float * temp,int *out){
    //clock_t start,finish;
    //double totaltime;
    //start=clock();
    farthestpointsamplingtrajectoryKernel<<<32,512>>>(b,n,m,t,inp,temp,out);
    //finish=clock();
    //totaltime=(double)(finish-start)/CLOCKS_PER_SEC;
    //printf("farthestpointsamplingtrajectoryKernel:%f  \n",totaltime);

}

	.text
	.file	"sampling_trajectory.hip"
	.globl	_Z36__device_stub__gathertrajctoryKerneliiiiPKfPKiPf # -- Begin function _Z36__device_stub__gathertrajctoryKerneliiiiPKfPKiPf
	.type	_Z36__device_stub__gathertrajctoryKerneliiiiPKfPKiPf,@function
_Z36__device_stub__gathertrajctoryKerneliiiiPKfPKiPf: # @_Z36__device_stub__gathertrajctoryKerneliiiiPKfPKiPf
	.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	$144, %rsp
	.cfi_def_cfa_offset 192
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r13, -32
	.cfi_offset %r14, -24
	.cfi_offset %r15, -16
	leaq	12(%rsp), %rax
	movl	%edi, (%rax)
	leaq	8(%rsp), %rdi
	movl	%esi, (%rdi)
	leaq	4(%rsp), %rsi
	movl	%edx, (%rsi)
	movq	%rsp, %rdx
	movl	%ecx, (%rdx)
	leaq	40(%rsp), %rcx
	movq	%r8, (%rcx)
	leaq	32(%rsp), %r8
	movq	%r9, (%r8)
	leaq	80(%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	192(%rsp), %rax
	movq	%rax, 48(%rbx)
	leaq	64(%rsp), %r14
	leaq	48(%rsp), %r15
	leaq	24(%rsp), %r12
	leaq	16(%rsp), %r13
	movq	%r14, %rdi
	movq	%r15, %rsi
	movq	%r12, %rdx
	movq	%r13, %rcx
	callq	__hipPopCallConfiguration
	movq	(%r14), %rsi
	movl	8(%r14), %edx
	movq	(%r15), %rcx
	movl	8(%r15), %r8d
	movl	$_Z21gathertrajctoryKerneliiiiPKfPKiPf, %edi
	movq	%rbx, %r9
	pushq	(%r13)
	.cfi_adjust_cfa_offset 8
	pushq	(%r12)
	.cfi_adjust_cfa_offset 8
	callq	hipLaunchKernel
	addq	$160, %rsp
	.cfi_adjust_cfa_offset -160
	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	_Z36__device_stub__gathertrajctoryKerneliiiiPKfPKiPf, .Lfunc_end0-_Z36__device_stub__gathertrajctoryKerneliiiiPKfPKiPf
	.cfi_endproc
                                        # -- End function
	.globl	_Z23gathertrajctoryLauncheriiiiPKfPKiPf # -- Begin function _Z23gathertrajctoryLauncheriiiiPKfPKiPf
	.type	_Z23gathertrajctoryLauncheriiiiPKfPKiPf,@function
_Z23gathertrajctoryLauncheriiiiPKfPKiPf: # @_Z23gathertrajctoryLauncheriiiiPKfPKiPf
	.cfi_startproc
# %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	pushq	%r15
	.cfi_def_cfa_offset 24
	pushq	%r14
	.cfi_def_cfa_offset 32
	pushq	%r13
	.cfi_def_cfa_offset 40
	pushq	%r12
	.cfi_def_cfa_offset 48
	pushq	%rbx
	.cfi_def_cfa_offset 56
	pushq	%rax
	.cfi_def_cfa_offset 64
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	.cfi_offset %rbp, -16
	movq	%r9, %rbx
	movq	%r8, %r14
	movl	%ecx, %ebp
	movl	%edx, %r15d
	movl	%esi, %r12d
	movl	%edi, %r13d
	movabsq	$4294967328, %rdi               # imm = 0x100000020
	leaq	480(%rdi), %rdx
	movl	$1, %esi
	movl	$1, %ecx
	xorl	%r8d, %r8d
	xorl	%r9d, %r9d
	callq	__hipPushCallConfiguration
	testl	%eax, %eax
	je	.LBB1_2
# %bb.1:
	addq	$8, %rsp
	.cfi_def_cfa_offset 56
	popq	%rbx
	.cfi_def_cfa_offset 48
	popq	%r12
	.cfi_def_cfa_offset 40
	popq	%r13
	.cfi_def_cfa_offset 32
	popq	%r14
	.cfi_def_cfa_offset 24
	popq	%r15
	.cfi_def_cfa_offset 16
	popq	%rbp
	.cfi_def_cfa_offset 8
	retq
.LBB1_2:
	.cfi_def_cfa_offset 64
	movl	%r13d, %edi
	movl	%r12d, %esi
	movl	%r15d, %edx
	movl	%ebp, %ecx
	movq	%r14, %r8
	movq	%rbx, %r9
	addq	$8, %rsp
	.cfi_def_cfa_offset 56
	popq	%rbx
	.cfi_def_cfa_offset 48
	popq	%r12
	.cfi_def_cfa_offset 40
	popq	%r13
	.cfi_def_cfa_offset 32
	popq	%r14
	.cfi_def_cfa_offset 24
	popq	%r15
	.cfi_def_cfa_offset 16
	popq	%rbp
	.cfi_def_cfa_offset 8
	jmp	_Z36__device_stub__gathertrajctoryKerneliiiiPKfPKiPf # TAILCALL
.Lfunc_end1:
	.size	_Z23gathertrajctoryLauncheriiiiPKfPKiPf, .Lfunc_end1-_Z23gathertrajctoryLauncheriiiiPKfPKiPf
	.cfi_endproc
                                        # -- End function
	.globl	_Z41__device_stub__gathertrajectorygradKerneliiiiPKfPKiPf # -- Begin function _Z41__device_stub__gathertrajectorygradKerneliiiiPKfPKiPf
	.type	_Z41__device_stub__gathertrajectorygradKerneliiiiPKfPKiPf,@function
_Z41__device_stub__gathertrajectorygradKerneliiiiPKfPKiPf: # @_Z41__device_stub__gathertrajectorygradKerneliiiiPKfPKiPf
	.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	$144, %rsp
	.cfi_def_cfa_offset 192
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r13, -32
	.cfi_offset %r14, -24
	.cfi_offset %r15, -16
	leaq	12(%rsp), %rax
	movl	%edi, (%rax)
	leaq	8(%rsp), %rdi
	movl	%esi, (%rdi)
	leaq	4(%rsp), %rsi
	movl	%edx, (%rsi)
	movq	%rsp, %rdx
	movl	%ecx, (%rdx)
	leaq	40(%rsp), %rcx
	movq	%r8, (%rcx)
	leaq	32(%rsp), %r8
	movq	%r9, (%r8)
	leaq	80(%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	192(%rsp), %rax
	movq	%rax, 48(%rbx)
	leaq	64(%rsp), %r14
	leaq	48(%rsp), %r15
	leaq	24(%rsp), %r12
	leaq	16(%rsp), %r13
	movq	%r14, %rdi
	movq	%r15, %rsi
	movq	%r12, %rdx
	movq	%r13, %rcx
	callq	__hipPopCallConfiguration
	movq	(%r14), %rsi
	movl	8(%r14), %edx
	movq	(%r15), %rcx
	movl	8(%r15), %r8d
	movl	$_Z26gathertrajectorygradKerneliiiiPKfPKiPf, %edi
	movq	%rbx, %r9
	pushq	(%r13)
	.cfi_adjust_cfa_offset 8
	pushq	(%r12)
	.cfi_adjust_cfa_offset 8
	callq	hipLaunchKernel
	addq	$160, %rsp
	.cfi_adjust_cfa_offset -160
	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_end2:
	.size	_Z41__device_stub__gathertrajectorygradKerneliiiiPKfPKiPf, .Lfunc_end2-_Z41__device_stub__gathertrajectorygradKerneliiiiPKfPKiPf
	.cfi_endproc
                                        # -- End function
	.globl	_Z28gathertrajectorygradLauncheriiiiPKfPKiPf # -- Begin function _Z28gathertrajectorygradLauncheriiiiPKfPKiPf
	.type	_Z28gathertrajectorygradLauncheriiiiPKfPKiPf,@function
_Z28gathertrajectorygradLauncheriiiiPKfPKiPf: # @_Z28gathertrajectorygradLauncheriiiiPKfPKiPf
	.cfi_startproc
# %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	pushq	%r15
	.cfi_def_cfa_offset 24
	pushq	%r14
	.cfi_def_cfa_offset 32
	pushq	%r13
	.cfi_def_cfa_offset 40
	pushq	%r12
	.cfi_def_cfa_offset 48
	pushq	%rbx
	.cfi_def_cfa_offset 56
	pushq	%rax
	.cfi_def_cfa_offset 64
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	.cfi_offset %rbp, -16
	movq	%r9, %rbx
	movq	%r8, %r14
	movl	%ecx, %ebp
	movl	%edx, %r15d
	movl	%esi, %r12d
	movl	%edi, %r13d
	movabsq	$4294967328, %rdi               # imm = 0x100000020
	leaq	96(%rdi), %rdx
	movl	$1, %esi
	movl	$1, %ecx
	xorl	%r8d, %r8d
	xorl	%r9d, %r9d
	callq	__hipPushCallConfiguration
	testl	%eax, %eax
	je	.LBB3_2
# %bb.1:
	addq	$8, %rsp
	.cfi_def_cfa_offset 56
	popq	%rbx
	.cfi_def_cfa_offset 48
	popq	%r12
	.cfi_def_cfa_offset 40
	popq	%r13
	.cfi_def_cfa_offset 32
	popq	%r14
	.cfi_def_cfa_offset 24
	popq	%r15
	.cfi_def_cfa_offset 16
	popq	%rbp
	.cfi_def_cfa_offset 8
	retq
.LBB3_2:
	.cfi_def_cfa_offset 64
	movl	%r13d, %edi
	movl	%r12d, %esi
	movl	%r15d, %edx
	movl	%ebp, %ecx
	movq	%r14, %r8
	movq	%rbx, %r9
	addq	$8, %rsp
	.cfi_def_cfa_offset 56
	popq	%rbx
	.cfi_def_cfa_offset 48
	popq	%r12
	.cfi_def_cfa_offset 40
	popq	%r13
	.cfi_def_cfa_offset 32
	popq	%r14
	.cfi_def_cfa_offset 24
	popq	%r15
	.cfi_def_cfa_offset 16
	popq	%rbp
	.cfi_def_cfa_offset 8
	jmp	_Z41__device_stub__gathertrajectorygradKerneliiiiPKfPKiPf # TAILCALL
.Lfunc_end3:
	.size	_Z28gathertrajectorygradLauncheriiiiPKfPKiPf, .Lfunc_end3-_Z28gathertrajectorygradLauncheriiiiPKfPKiPf
	.cfi_endproc
                                        # -- End function
	.globl	_Z52__device_stub__farthestpointsamplingtrajectoryKerneliiiiPKfPfPi # -- Begin function _Z52__device_stub__farthestpointsamplingtrajectoryKerneliiiiPKfPfPi
	.type	_Z52__device_stub__farthestpointsamplingtrajectoryKerneliiiiPKfPfPi,@function
_Z52__device_stub__farthestpointsamplingtrajectoryKerneliiiiPKfPfPi: # @_Z52__device_stub__farthestpointsamplingtrajectoryKerneliiiiPKfPfPi
	.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	$144, %rsp
	.cfi_def_cfa_offset 192
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r13, -32
	.cfi_offset %r14, -24
	.cfi_offset %r15, -16
	leaq	12(%rsp), %rax
	movl	%edi, (%rax)
	leaq	8(%rsp), %rdi
	movl	%esi, (%rdi)
	leaq	4(%rsp), %rsi
	movl	%edx, (%rsi)
	movq	%rsp, %rdx
	movl	%ecx, (%rdx)
	leaq	40(%rsp), %rcx
	movq	%r8, (%rcx)
	leaq	32(%rsp), %r8
	movq	%r9, (%r8)
	leaq	80(%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	192(%rsp), %rax
	movq	%rax, 48(%rbx)
	leaq	64(%rsp), %r14
	leaq	48(%rsp), %r15
	leaq	24(%rsp), %r12
	leaq	16(%rsp), %r13
	movq	%r14, %rdi
	movq	%r15, %rsi
	movq	%r12, %rdx
	movq	%r13, %rcx
	callq	__hipPopCallConfiguration
	movq	(%r14), %rsi
	movl	8(%r14), %edx
	movq	(%r15), %rcx
	movl	8(%r15), %r8d
	movl	$_Z37farthestpointsamplingtrajectoryKerneliiiiPKfPfPi, %edi
	movq	%rbx, %r9
	pushq	(%r13)
	.cfi_adjust_cfa_offset 8
	pushq	(%r12)
	.cfi_adjust_cfa_offset 8
	callq	hipLaunchKernel
	addq	$160, %rsp
	.cfi_adjust_cfa_offset -160
	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_end4:
	.size	_Z52__device_stub__farthestpointsamplingtrajectoryKerneliiiiPKfPfPi, .Lfunc_end4-_Z52__device_stub__farthestpointsamplingtrajectoryKerneliiiiPKfPfPi
	.cfi_endproc
                                        # -- End function
	.globl	_Z39farthestpointsamplingtrajectoryLauncheriiiiPKfPfPi # -- Begin function _Z39farthestpointsamplingtrajectoryLauncheriiiiPKfPfPi
	.type	_Z39farthestpointsamplingtrajectoryLauncheriiiiPKfPfPi,@function
_Z39farthestpointsamplingtrajectoryLauncheriiiiPKfPfPi: # @_Z39farthestpointsamplingtrajectoryLauncheriiiiPKfPfPi
	.cfi_startproc
# %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	pushq	%r15
	.cfi_def_cfa_offset 24
	pushq	%r14
	.cfi_def_cfa_offset 32
	pushq	%r13
	.cfi_def_cfa_offset 40
	pushq	%r12
	.cfi_def_cfa_offset 48
	pushq	%rbx
	.cfi_def_cfa_offset 56
	pushq	%rax
	.cfi_def_cfa_offset 64
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	.cfi_offset %rbp, -16
	movq	%r9, %rbx
	movq	%r8, %r14
	movl	%ecx, %ebp
	movl	%edx, %r15d
	movl	%esi, %r12d
	movl	%edi, %r13d
	movabsq	$4294967328, %rdi               # imm = 0x100000020
	leaq	480(%rdi), %rdx
	movl	$1, %esi
	movl	$1, %ecx
	xorl	%r8d, %r8d
	xorl	%r9d, %r9d
	callq	__hipPushCallConfiguration
	testl	%eax, %eax
	je	.LBB5_2
# %bb.1:
	addq	$8, %rsp
	.cfi_def_cfa_offset 56
	popq	%rbx
	.cfi_def_cfa_offset 48
	popq	%r12
	.cfi_def_cfa_offset 40
	popq	%r13
	.cfi_def_cfa_offset 32
	popq	%r14
	.cfi_def_cfa_offset 24
	popq	%r15
	.cfi_def_cfa_offset 16
	popq	%rbp
	.cfi_def_cfa_offset 8
	retq
.LBB5_2:
	.cfi_def_cfa_offset 64
	movl	%r13d, %edi
	movl	%r12d, %esi
	movl	%r15d, %edx
	movl	%ebp, %ecx
	movq	%r14, %r8
	movq	%rbx, %r9
	addq	$8, %rsp
	.cfi_def_cfa_offset 56
	popq	%rbx
	.cfi_def_cfa_offset 48
	popq	%r12
	.cfi_def_cfa_offset 40
	popq	%r13
	.cfi_def_cfa_offset 32
	popq	%r14
	.cfi_def_cfa_offset 24
	popq	%r15
	.cfi_def_cfa_offset 16
	popq	%rbp
	.cfi_def_cfa_offset 8
	jmp	_Z52__device_stub__farthestpointsamplingtrajectoryKerneliiiiPKfPfPi # TAILCALL
.Lfunc_end5:
	.size	_Z39farthestpointsamplingtrajectoryLauncheriiiiPKfPfPi, .Lfunc_end5-_Z39farthestpointsamplingtrajectoryLauncheriiiiPKfPfPi
	.cfi_endproc
                                        # -- End function
	.p2align	4, 0x90                         # -- Begin function __hip_module_ctor
	.type	__hip_module_ctor,@function
__hip_module_ctor:                      # @__hip_module_ctor
	.cfi_startproc
# %bb.0:
	pushq	%rbx
	.cfi_def_cfa_offset 16
	subq	$32, %rsp
	.cfi_def_cfa_offset 48
	.cfi_offset %rbx, -16
	movq	__hip_gpubin_handle(%rip), %rbx
	testq	%rbx, %rbx
	jne	.LBB6_2
# %bb.1:
	movl	$__hip_fatbin_wrapper, %edi
	callq	__hipRegisterFatBinary
	movq	%rax, %rbx
	movq	%rax, __hip_gpubin_handle(%rip)
.LBB6_2:
	xorps	%xmm0, %xmm0
	movups	%xmm0, 16(%rsp)
	movups	%xmm0, (%rsp)
	movl	$_Z21gathertrajctoryKerneliiiiPKfPKiPf, %esi
	movl	$.L__unnamed_1, %edx
	movl	$.L__unnamed_1, %ecx
	movq	%rbx, %rdi
	movl	$-1, %r8d
	xorl	%r9d, %r9d
	callq	__hipRegisterFunction
	xorps	%xmm0, %xmm0
	movups	%xmm0, 16(%rsp)
	movups	%xmm0, (%rsp)
	movl	$_Z26gathertrajectorygradKerneliiiiPKfPKiPf, %esi
	movl	$.L__unnamed_2, %edx
	movl	$.L__unnamed_2, %ecx
	movq	%rbx, %rdi
	movl	$-1, %r8d
	xorl	%r9d, %r9d
	callq	__hipRegisterFunction
	xorps	%xmm0, %xmm0
	movups	%xmm0, 16(%rsp)
	movups	%xmm0, (%rsp)
	movl	$_Z37farthestpointsamplingtrajectoryKerneliiiiPKfPfPi, %esi
	movl	$.L__unnamed_3, %edx
	movl	$.L__unnamed_3, %ecx
	movq	%rbx, %rdi
	movl	$-1, %r8d
	xorl	%r9d, %r9d
	callq	__hipRegisterFunction
	movl	$__hip_module_dtor, %edi
	addq	$32, %rsp
	.cfi_def_cfa_offset 16
	popq	%rbx
	.cfi_def_cfa_offset 8
	jmp	atexit                          # TAILCALL
.Lfunc_end6:
	.size	__hip_module_ctor, .Lfunc_end6-__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	.LBB7_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
.LBB7_2:
	retq
.Lfunc_end7:
	.size	__hip_module_dtor, .Lfunc_end7-__hip_module_dtor
	.cfi_endproc
                                        # -- End function
	.type	_Z21gathertrajctoryKerneliiiiPKfPKiPf,@object # @_Z21gathertrajctoryKerneliiiiPKfPKiPf
	.section	.rodata,"a",@progbits
	.globl	_Z21gathertrajctoryKerneliiiiPKfPKiPf
	.p2align	3, 0x0
_Z21gathertrajctoryKerneliiiiPKfPKiPf:
	.quad	_Z36__device_stub__gathertrajctoryKerneliiiiPKfPKiPf
	.size	_Z21gathertrajctoryKerneliiiiPKfPKiPf, 8

	.type	_Z26gathertrajectorygradKerneliiiiPKfPKiPf,@object # @_Z26gathertrajectorygradKerneliiiiPKfPKiPf
	.globl	_Z26gathertrajectorygradKerneliiiiPKfPKiPf
	.p2align	3, 0x0
_Z26gathertrajectorygradKerneliiiiPKfPKiPf:
	.quad	_Z41__device_stub__gathertrajectorygradKerneliiiiPKfPKiPf
	.size	_Z26gathertrajectorygradKerneliiiiPKfPKiPf, 8

	.type	_Z37farthestpointsamplingtrajectoryKerneliiiiPKfPfPi,@object # @_Z37farthestpointsamplingtrajectoryKerneliiiiPKfPfPi
	.globl	_Z37farthestpointsamplingtrajectoryKerneliiiiPKfPfPi
	.p2align	3, 0x0
_Z37farthestpointsamplingtrajectoryKerneliiiiPKfPfPi:
	.quad	_Z52__device_stub__farthestpointsamplingtrajectoryKerneliiiiPKfPfPi
	.size	_Z37farthestpointsamplingtrajectoryKerneliiiiPKfPfPi, 8

	.type	.L__unnamed_1,@object           # @0
	.section	.rodata.str1.1,"aMS",@progbits,1
.L__unnamed_1:
	.asciz	"_Z21gathertrajctoryKerneliiiiPKfPKiPf"
	.size	.L__unnamed_1, 38

	.type	.L__unnamed_2,@object           # @1
.L__unnamed_2:
	.asciz	"_Z26gathertrajectorygradKerneliiiiPKfPKiPf"
	.size	.L__unnamed_2, 43

	.type	.L__unnamed_3,@object           # @2
.L__unnamed_3:
	.asciz	"_Z37farthestpointsamplingtrajectoryKerneliiiiPKfPfPi"
	.size	.L__unnamed_3, 53

	.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 _Z36__device_stub__gathertrajctoryKerneliiiiPKfPKiPf
	.addrsig_sym _Z41__device_stub__gathertrajectorygradKerneliiiiPKfPKiPf
	.addrsig_sym _Z52__device_stub__farthestpointsamplingtrajectoryKerneliiiiPKfPfPi
	.addrsig_sym __hip_module_ctor
	.addrsig_sym __hip_module_dtor
	.addrsig_sym _Z21gathertrajctoryKerneliiiiPKfPKiPf
	.addrsig_sym _Z26gathertrajectorygradKerneliiiiPKfPKiPf
	.addrsig_sym _Z37farthestpointsamplingtrajectoryKerneliiiiPKfPfPi
	.addrsig_sym __hip_fatbin
	.addrsig_sym __hip_fatbin_wrapper
	.addrsig_sym __hip_cuid_

	.text
	.amdgcn_target "amdgcn-amd-amdhsa--gfx1100"
	.protected	_Z21gathertrajctoryKerneliiiiPKfPKiPf ; -- Begin function _Z21gathertrajctoryKerneliiiiPKfPKiPf
	.globl	_Z21gathertrajctoryKerneliiiiPKfPKiPf
	.p2align	8
	.type	_Z21gathertrajctoryKerneliiiiPKfPKiPf,@function
_Z21gathertrajctoryKerneliiiiPKfPKiPf:  ; @_Z21gathertrajctoryKerneliiiiPKfPKiPf
; %bb.0:
	s_load_b128 s[4:7], s[0:1], 0x0
	s_waitcnt lgkmcnt(0)
	s_cmp_ge_i32 s15, s4
	s_cbranch_scc1 .LBB0_9
; %bb.1:                                ; %.lr.ph48
	s_clause 0x2
	s_load_b32 s3, s[0:1], 0x28
	s_load_b128 s[8:11], s[0:1], 0x10
	s_load_b64 s[12:13], s[0:1], 0x20
	v_mad_u64_u32 v[1:2], null, s15, s6, v[0:1]
	s_mul_i32 s16, s7, 3
	s_cmp_gt_i32 s7, 0
	v_cmp_gt_i32_e64 s2, s6, v0
	s_cselect_b32 s14, -1, 0
	s_add_u32 s0, s0, 40
	s_addc_u32 s1, s1, 0
	s_delay_alu instid0(VALU_DEP_2)
	v_mul_lo_u32 v5, s16, v1
	s_mul_i32 s17, s15, s5
	s_waitcnt lgkmcnt(0)
	s_mul_i32 s18, s3, s7
	s_mul_i32 s5, s3, s5
	s_mul_i32 s18, s18, s6
	s_delay_alu instid0(SALU_CYCLE_1)
	s_mul_i32 s18, s18, 3
.LBB0_2:                                ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_4 Depth 2
                                        ;       Child Loop BB0_6 Depth 3
	s_and_saveexec_b32 s19, s2
	s_cbranch_execz .LBB0_8
; %bb.3:                                ; %.lr.ph44
                                        ;   in Loop: Header=BB0_2 Depth=1
	s_load_b32 s20, s[0:1], 0xc
	v_dual_mov_b32 v6, v5 :: v_dual_mov_b32 v7, v0
	s_mul_i32 s21, s15, s6
	s_mov_b32 s23, 0
	s_waitcnt lgkmcnt(0)
	s_and_b32 s20, s20, 0xffff
	s_delay_alu instid0(SALU_CYCLE_1)
	s_mul_i32 s22, s16, s20
.LBB0_4:                                ;   Parent Loop BB0_2 Depth=1
                                        ; =>  This Loop Header: Depth=2
                                        ;       Child Loop BB0_6 Depth 3
	s_and_not1_b32 vcc_lo, exec_lo, s14
	s_cbranch_vccnz .LBB0_7
; %bb.5:                                ; %.lr.ph
                                        ;   in Loop: Header=BB0_4 Depth=2
	v_add_nc_u32_e32 v1, s21, v7
	v_mov_b32_e32 v3, v6
	s_mov_b32 s24, s7
	s_delay_alu instid0(VALU_DEP_2) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_ashrrev_i32_e32 v2, 31, v1
	v_lshlrev_b64 v[1:2], 2, v[1:2]
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_2)
	v_add_co_u32 v1, vcc_lo, s10, v1
	v_add_co_ci_u32_e32 v2, vcc_lo, s11, v2, vcc_lo
	global_load_b32 v1, v[1:2], off
	s_waitcnt vmcnt(0)
	v_add_nc_u32_e32 v1, s17, v1
	s_delay_alu instid0(VALU_DEP_1)
	v_mul_lo_u32 v1, s16, v1
.LBB0_6:                                ;   Parent Loop BB0_2 Depth=1
                                        ;     Parent Loop BB0_4 Depth=2
                                        ; =>    This Inner Loop Header: Depth=3
	s_delay_alu instid0(VALU_DEP_1) | instskip(SKIP_2) | instid1(SALU_CYCLE_1)
	v_ashrrev_i32_e32 v2, 31, v1
	v_ashrrev_i32_e32 v4, 31, v3
	s_add_i32 s24, s24, -1
	s_cmp_eq_u32 s24, 0
	s_delay_alu instid0(VALU_DEP_2) | instskip(NEXT) | instid1(VALU_DEP_2)
	v_lshlrev_b64 v[8:9], 2, v[1:2]
	v_lshlrev_b64 v[11:12], 2, v[3:4]
	v_add_nc_u32_e32 v1, 3, v1
	v_add_nc_u32_e32 v3, 3, v3
	s_delay_alu instid0(VALU_DEP_4)
	v_add_co_u32 v8, vcc_lo, s8, v8
	v_add_co_ci_u32_e32 v9, vcc_lo, s9, v9, vcc_lo
	v_add_co_u32 v11, vcc_lo, s12, v11
	v_add_co_ci_u32_e32 v12, vcc_lo, s13, v12, vcc_lo
	global_load_b96 v[8:10], v[8:9], off
	s_waitcnt vmcnt(0)
	global_store_b96 v[11:12], v[8:10], off
	s_cbranch_scc0 .LBB0_6
.LBB0_7:                                ; %._crit_edge
                                        ;   in Loop: Header=BB0_4 Depth=2
	v_add_nc_u32_e32 v7, s20, v7
	v_add_nc_u32_e32 v6, s22, v6
	s_delay_alu instid0(VALU_DEP_2) | instskip(SKIP_1) | instid1(SALU_CYCLE_1)
	v_cmp_le_i32_e32 vcc_lo, s6, v7
	s_or_b32 s23, vcc_lo, s23
	s_and_not1_b32 exec_lo, exec_lo, s23
	s_cbranch_execnz .LBB0_4
.LBB0_8:                                ; %Flow73
                                        ;   in Loop: Header=BB0_2 Depth=1
	s_or_b32 exec_lo, exec_lo, s19
	v_add_nc_u32_e32 v5, s18, v5
	s_add_i32 s15, s3, s15
	s_add_i32 s17, s17, s5
	s_cmp_ge_i32 s15, s4
	s_cbranch_scc0 .LBB0_2
.LBB0_9:                                ; %._crit_edge49
	s_nop 0
	s_sendmsg sendmsg(MSG_DEALLOC_VGPRS)
	s_endpgm
	.section	.rodata,"a",@progbits
	.p2align	6, 0x0
	.amdhsa_kernel _Z21gathertrajctoryKerneliiiiPKfPKiPf
		.amdhsa_group_segment_fixed_size 0
		.amdhsa_private_segment_fixed_size 0
		.amdhsa_kernarg_size 296
		.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 13
		.amdhsa_next_free_sgpr 25
		.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	_Z21gathertrajctoryKerneliiiiPKfPKiPf, .Lfunc_end0-_Z21gathertrajctoryKerneliiiiPKfPKiPf
                                        ; -- End function
	.section	.AMDGPU.csdata,"",@progbits
; Kernel info:
; codeLenInByte = 420
; NumSgprs: 27
; NumVgprs: 13
; ScratchSize: 0
; MemoryBound: 0
; FloatMode: 240
; IeeeMode: 1
; LDSByteSize: 0 bytes/workgroup (compile time only)
; SGPRBlocks: 3
; VGPRBlocks: 1
; NumSGPRsForWavesPerEU: 27
; NumVGPRsForWavesPerEU: 13
; Occupancy: 16
; WaveLimiterHint : 0
; COMPUTE_PGM_RSRC2:SCRATCH_EN: 0
; COMPUTE_PGM_RSRC2:USER_SGPR: 15
; COMPUTE_PGM_RSRC2:TRAP_HANDLER: 0
; COMPUTE_PGM_RSRC2:TGID_X_EN: 1
; COMPUTE_PGM_RSRC2:TGID_Y_EN: 0
; COMPUTE_PGM_RSRC2:TGID_Z_EN: 0
; COMPUTE_PGM_RSRC2:TIDIG_COMP_CNT: 0
	.text
	.protected	_Z26gathertrajectorygradKerneliiiiPKfPKiPf ; -- Begin function _Z26gathertrajectorygradKerneliiiiPKfPKiPf
	.globl	_Z26gathertrajectorygradKerneliiiiPKfPKiPf
	.p2align	8
	.type	_Z26gathertrajectorygradKerneliiiiPKfPKiPf,@function
_Z26gathertrajectorygradKerneliiiiPKfPKiPf: ; @_Z26gathertrajectorygradKerneliiiiPKfPKiPf
; %bb.0:
	s_load_b128 s[4:7], s[0:1], 0x0
	s_waitcnt lgkmcnt(0)
	s_cmp_ge_i32 s15, s4
	s_cbranch_scc1 .LBB1_15
; %bb.1:                                ; %.lr.ph48
	s_clause 0x2
	s_load_b128 s[8:11], s[0:1], 0x10
	s_load_b64 s[12:13], s[0:1], 0x20
	s_load_b32 s3, s[0:1], 0x28
	s_cmp_gt_i32 s7, 0
	v_cmp_gt_i32_e64 s2, s6, v0
	s_cselect_b32 s14, -1, 0
	s_add_u32 s0, s0, 40
	s_addc_u32 s1, s1, 0
.LBB1_2:                                ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB1_4 Depth 2
                                        ;       Child Loop BB1_6 Depth 3
                                        ;         Child Loop BB1_7 Depth 4
                                        ;         Child Loop BB1_9 Depth 4
                                        ;         Child Loop BB1_11 Depth 4
	s_delay_alu instid0(VALU_DEP_1)
	s_and_saveexec_b32 s16, s2
	s_cbranch_execz .LBB1_14
; %bb.3:                                ; %.lr.ph44
                                        ;   in Loop: Header=BB1_2 Depth=1
	s_load_b32 s19, s[0:1], 0xc
	v_mov_b32_e32 v7, v0
	s_mul_i32 s17, s15, s6
	s_mul_i32 s18, s15, s5
	s_mov_b32 s20, 0
	s_waitcnt lgkmcnt(0)
	s_and_b32 s19, s19, 0xffff
.LBB1_4:                                ;   Parent Loop BB1_2 Depth=1
                                        ; =>  This Loop Header: Depth=2
                                        ;       Child Loop BB1_6 Depth 3
                                        ;         Child Loop BB1_7 Depth 4
                                        ;         Child Loop BB1_9 Depth 4
                                        ;         Child Loop BB1_11 Depth 4
	s_and_not1_b32 vcc_lo, exec_lo, s14
	s_cbranch_vccnz .LBB1_13
; %bb.5:                                ; %.lr.ph
                                        ;   in Loop: Header=BB1_4 Depth=2
	v_add_nc_u32_e32 v1, s17, v7
	s_mov_b32 s21, 0
	s_delay_alu instid0(VALU_DEP_1) | instskip(SKIP_1) | instid1(VALU_DEP_2)
	v_ashrrev_i32_e32 v2, 31, v1
	v_mul_lo_u32 v8, v1, s7
	v_lshlrev_b64 v[2:3], 2, v[1:2]
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_2)
	v_add_co_u32 v2, vcc_lo, s10, v2
	v_add_co_ci_u32_e32 v3, vcc_lo, s11, v3, vcc_lo
	global_load_b32 v2, v[2:3], off
	s_waitcnt vmcnt(0)
	v_add_nc_u32_e32 v2, s18, v2
	s_delay_alu instid0(VALU_DEP_1)
	v_mul_lo_u32 v9, v2, s7
.LBB1_6:                                ;   Parent Loop BB1_2 Depth=1
                                        ;     Parent Loop BB1_4 Depth=2
                                        ; =>    This Loop Header: Depth=3
                                        ;         Child Loop BB1_7 Depth 4
                                        ;         Child Loop BB1_9 Depth 4
                                        ;         Child Loop BB1_11 Depth 4
	v_add_nc_u32_e32 v1, s21, v8
	s_delay_alu instid0(VALU_DEP_2) | instskip(SKIP_1) | instid1(VALU_DEP_2)
	v_add_nc_u32_e32 v2, s21, v9
	s_mov_b32 s22, 0
	v_lshl_add_u32 v1, v1, 1, v1
	s_delay_alu instid0(VALU_DEP_2) | instskip(NEXT) | instid1(VALU_DEP_2)
	v_lshl_add_u32 v3, v2, 1, v2
	v_ashrrev_i32_e32 v2, 31, v1
	s_delay_alu instid0(VALU_DEP_2) | instskip(NEXT) | instid1(VALU_DEP_2)
	v_ashrrev_i32_e32 v4, 31, v3
	v_lshlrev_b64 v[1:2], 2, v[1:2]
	s_delay_alu instid0(VALU_DEP_2) | instskip(NEXT) | instid1(VALU_DEP_2)
	v_lshlrev_b64 v[5:6], 2, v[3:4]
	v_add_co_u32 v3, vcc_lo, s8, v1
	s_delay_alu instid0(VALU_DEP_3) | instskip(NEXT) | instid1(VALU_DEP_3)
	v_add_co_ci_u32_e32 v4, vcc_lo, s9, v2, vcc_lo
	v_add_co_u32 v1, vcc_lo, s12, v5
	s_delay_alu instid0(VALU_DEP_4)
	v_add_co_ci_u32_e32 v2, vcc_lo, s13, v6, vcc_lo
	global_load_b32 v10, v[3:4], off
	global_load_b32 v6, v[1:2], off
.LBB1_7:                                ; %atomicrmw.start
                                        ;   Parent Loop BB1_2 Depth=1
                                        ;     Parent Loop BB1_4 Depth=2
                                        ;       Parent Loop BB1_6 Depth=3
                                        ; =>      This Inner Loop Header: Depth=4
	s_waitcnt vmcnt(0)
	v_add_f32_e32 v5, v6, v10
	global_atomic_cmpswap_b32 v5, v[1:2], v[5:6], off glc
	s_waitcnt vmcnt(0)
	v_cmp_eq_u32_e32 vcc_lo, v5, v6
	v_mov_b32_e32 v6, v5
	s_or_b32 s22, vcc_lo, s22
	s_delay_alu instid0(SALU_CYCLE_1)
	s_and_not1_b32 exec_lo, exec_lo, s22
	s_cbranch_execnz .LBB1_7
; %bb.8:                                ; %atomicrmw.end
                                        ;   in Loop: Header=BB1_6 Depth=3
	s_or_b32 exec_lo, exec_lo, s22
	global_load_b32 v10, v[3:4], off offset:4
	global_load_b32 v6, v[1:2], off offset:4
	s_mov_b32 s22, 0
.LBB1_9:                                ; %atomicrmw.start51
                                        ;   Parent Loop BB1_2 Depth=1
                                        ;     Parent Loop BB1_4 Depth=2
                                        ;       Parent Loop BB1_6 Depth=3
                                        ; =>      This Inner Loop Header: Depth=4
	s_waitcnt vmcnt(0)
	v_add_f32_e32 v5, v6, v10
	global_atomic_cmpswap_b32 v5, v[1:2], v[5:6], off offset:4 glc
	s_waitcnt vmcnt(0)
	v_cmp_eq_u32_e32 vcc_lo, v5, v6
	v_mov_b32_e32 v6, v5
	s_or_b32 s22, vcc_lo, s22
	s_delay_alu instid0(SALU_CYCLE_1)
	s_and_not1_b32 exec_lo, exec_lo, s22
	s_cbranch_execnz .LBB1_9
; %bb.10:                               ; %atomicrmw.end50
                                        ;   in Loop: Header=BB1_6 Depth=3
	s_or_b32 exec_lo, exec_lo, s22
	global_load_b32 v5, v[3:4], off offset:8
	global_load_b32 v4, v[1:2], off offset:8
	s_mov_b32 s22, 0
.LBB1_11:                               ; %atomicrmw.start57
                                        ;   Parent Loop BB1_2 Depth=1
                                        ;     Parent Loop BB1_4 Depth=2
                                        ;       Parent Loop BB1_6 Depth=3
                                        ; =>      This Inner Loop Header: Depth=4
	s_waitcnt vmcnt(0)
	v_add_f32_e32 v3, v4, v5
	global_atomic_cmpswap_b32 v3, v[1:2], v[3:4], off offset:8 glc
	s_waitcnt vmcnt(0)
	v_cmp_eq_u32_e32 vcc_lo, v3, v4
	v_mov_b32_e32 v4, v3
	s_or_b32 s22, vcc_lo, s22
	s_delay_alu instid0(SALU_CYCLE_1)
	s_and_not1_b32 exec_lo, exec_lo, s22
	s_cbranch_execnz .LBB1_11
; %bb.12:                               ; %atomicrmw.end56
                                        ;   in Loop: Header=BB1_6 Depth=3
	s_or_b32 exec_lo, exec_lo, s22
	s_add_i32 s21, s21, 1
	s_delay_alu instid0(SALU_CYCLE_1)
	s_cmp_eq_u32 s21, s7
	s_cbranch_scc0 .LBB1_6
.LBB1_13:                               ; %._crit_edge
                                        ;   in Loop: Header=BB1_4 Depth=2
	v_add_nc_u32_e32 v7, s19, v7
	s_delay_alu instid0(VALU_DEP_1) | instskip(SKIP_1) | instid1(SALU_CYCLE_1)
	v_cmp_le_i32_e32 vcc_lo, s6, v7
	s_or_b32 s20, vcc_lo, s20
	s_and_not1_b32 exec_lo, exec_lo, s20
	s_cbranch_execnz .LBB1_4
.LBB1_14:                               ; %Flow77
                                        ;   in Loop: Header=BB1_2 Depth=1
	s_or_b32 exec_lo, exec_lo, s16
	s_waitcnt lgkmcnt(0)
	s_add_i32 s15, s3, s15
	s_delay_alu instid0(SALU_CYCLE_1)
	s_cmp_ge_i32 s15, s4
	s_cbranch_scc0 .LBB1_2
.LBB1_15:                               ; %._crit_edge49
	s_endpgm
	.section	.rodata,"a",@progbits
	.p2align	6, 0x0
	.amdhsa_kernel _Z26gathertrajectorygradKerneliiiiPKfPKiPf
		.amdhsa_group_segment_fixed_size 0
		.amdhsa_private_segment_fixed_size 0
		.amdhsa_kernarg_size 296
		.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 11
		.amdhsa_next_free_sgpr 23
		.amdhsa_float_round_mode_32 0
		.amdhsa_float_round_mode_16_64 0
		.amdhsa_float_denorm_mode_32 3
		.amdhsa_float_denorm_mode_16_64 3
		.amdhsa_dx10_clamp 1
		.amdhsa_ieee_mode 1
		.amdhsa_fp16_overflow 0
		.amdhsa_workgroup_processor_mode 1
		.amdhsa_memory_ordered 1
		.amdhsa_forward_progress 0
		.amdhsa_shared_vgpr_count 0
		.amdhsa_exception_fp_ieee_invalid_op 0
		.amdhsa_exception_fp_denorm_src 0
		.amdhsa_exception_fp_ieee_div_zero 0
		.amdhsa_exception_fp_ieee_overflow 0
		.amdhsa_exception_fp_ieee_underflow 0
		.amdhsa_exception_fp_ieee_inexact 0
		.amdhsa_exception_int_div_zero 0
	.end_amdhsa_kernel
	.text
.Lfunc_end1:
	.size	_Z26gathertrajectorygradKerneliiiiPKfPKiPf, .Lfunc_end1-_Z26gathertrajectorygradKerneliiiiPKfPKiPf
                                        ; -- End function
	.section	.AMDGPU.csdata,"",@progbits
; Kernel info:
; codeLenInByte = 572
; NumSgprs: 25
; NumVgprs: 11
; ScratchSize: 0
; MemoryBound: 0
; FloatMode: 240
; IeeeMode: 1
; LDSByteSize: 0 bytes/workgroup (compile time only)
; SGPRBlocks: 3
; VGPRBlocks: 1
; NumSGPRsForWavesPerEU: 25
; NumVGPRsForWavesPerEU: 11
; 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
	.protected	_Z37farthestpointsamplingtrajectoryKerneliiiiPKfPfPi ; -- Begin function _Z37farthestpointsamplingtrajectoryKerneliiiiPKfPfPi
	.globl	_Z37farthestpointsamplingtrajectoryKerneliiiiPKfPfPi
	.p2align	8
	.type	_Z37farthestpointsamplingtrajectoryKerneliiiiPKfPfPi,@function
_Z37farthestpointsamplingtrajectoryKerneliiiiPKfPfPi: ; @_Z37farthestpointsamplingtrajectoryKerneliiiiPKfPfPi
; %bb.0:
	s_load_b128 s[8:11], s[0:1], 0x0
	s_waitcnt lgkmcnt(0)
	s_cmp_ge_i32 s15, s8
	s_cbranch_scc1 .LBB2_42
; %bb.1:                                ; %.lr.ph193
	s_clause 0x2
	s_load_b128 s[16:19], s[0:1], 0x10
	s_load_b64 s[6:7], s[0:1], 0x20
	s_load_b32 s14, s[0:1], 0x28
	v_mul_lo_u32 v16, v0, s11
	s_mul_i32 s31, s15, s9
	s_mul_i32 s3, s11, s9
	v_add_nc_u32_e32 v1, s31, v0
	s_add_u32 s12, s0, 40
	v_dual_mov_b32 v21, 0x7e967699 :: v_dual_lshlrev_b32 v12, 2, v0
	v_dual_mov_b32 v2, 0 :: v_dual_lshlrev_b32 v13, 1, v0
	s_mul_i32 s35, s11, 3
	s_addc_u32 s13, s1, 0
	s_min_i32 s30, s3, 0xb40
	v_mul_lo_u32 v19, v16, 12
	v_mul_lo_u32 v20, s35, v1
	s_mul_i32 s30, s30, 3
	s_cmp_gt_i32 s10, 0
	v_cmp_eq_u32_e64 s2, 0, v0
	v_cmp_gt_i32_e64 s0, s9, v0
	v_cmp_gt_i32_e64 s1, s30, v0
	s_cselect_b32 s33, -1, 0
	s_min_i32 s34, s11, 64
	v_cvt_f32_i32_e32 v14, s11
	v_add_nc_u32_e32 v15, 0x8f00, v12
	v_add_nc_u32_e32 v17, 0x8700, v12
	v_or_b32_e32 v18, 1, v13
	s_cmp_gt_i32 s11, 0
	s_waitcnt lgkmcnt(0)
	s_mul_i32 s36, s14, s9
	s_mul_i32 s37, s35, s31
	s_mul_i32 s38, s35, s36
	s_cselect_b32 s39, -1, 0
	s_mul_i32 s40, s11, 12
	s_mov_b64 s[4:5], src_shared_base
	s_mov_b32 s41, s31
.LBB2_2:                                ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB2_6 Depth 2
                                        ;     Child Loop BB2_9 Depth 2
                                        ;     Child Loop BB2_12 Depth 2
                                        ;       Child Loop BB2_14 Depth 3
                                        ;       Child Loop BB2_17 Depth 3
                                        ;         Child Loop BB2_19 Depth 4
                                        ;       Child Loop BB2_34 Depth 3
	s_mul_i32 s20, s15, s10
	s_and_saveexec_b32 s3, s2
	s_cbranch_execz .LBB2_4
; %bb.3:                                ;   in Loop: Header=BB2_2 Depth=1
	s_ashr_i32 s21, s20, 31
	s_delay_alu instid0(SALU_CYCLE_1) | instskip(NEXT) | instid1(SALU_CYCLE_1)
	s_lshl_b64 s[22:23], s[20:21], 2
	s_add_u32 s22, s6, s22
	s_addc_u32 s23, s7, s23
	global_store_b32 v2, v2, s[22:23]
.LBB2_4:                                ;   in Loop: Header=BB2_2 Depth=1
	s_or_b32 exec_lo, exec_lo, s3
	s_and_saveexec_b32 s4, s0
	s_cbranch_execz .LBB2_7
; %bb.5:                                ; %.lr.ph
                                        ;   in Loop: Header=BB2_2 Depth=1
	s_load_b32 s3, s[12:13], 0xc
	v_mov_b32_e32 v3, v0
	s_mov_b32 s22, 0
	s_waitcnt lgkmcnt(0)
	s_and_b32 s21, s3, 0xffff
.LBB2_6:                                ;   Parent Loop BB2_2 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	s_delay_alu instid0(VALU_DEP_1) | instskip(SKIP_1) | instid1(VALU_DEP_2)
	v_add_nc_u32_e32 v1, s31, v3
	v_add_nc_u32_e32 v3, s21, v3
	v_lshlrev_b64 v[4:5], 2, v[1:2]
	s_delay_alu instid0(VALU_DEP_2) | instskip(SKIP_1) | instid1(VALU_DEP_2)
	v_cmp_le_i32_e32 vcc_lo, s9, v3
	s_or_b32 s22, vcc_lo, s22
	v_add_co_u32 v4, s3, s18, v4
	s_delay_alu instid0(VALU_DEP_1)
	v_add_co_ci_u32_e64 v5, s3, s19, v5, s3
	global_store_b32 v[4:5], v21, off
	s_and_not1_b32 exec_lo, exec_lo, s22
	s_cbranch_execnz .LBB2_6
.LBB2_7:                                ; %Flow263
                                        ;   in Loop: Header=BB2_2 Depth=1
	s_or_b32 exec_lo, exec_lo, s4
	s_and_saveexec_b32 s3, s1
	s_cbranch_execz .LBB2_10
; %bb.8:                                ; %.lr.ph169
                                        ;   in Loop: Header=BB2_2 Depth=1
	s_load_b32 s4, s[12:13], 0xc
	v_mov_b32_e32 v1, v12
	v_mov_b32_e32 v3, v0
	s_mov_b32 s22, 0
	s_waitcnt lgkmcnt(0)
	s_and_b32 s4, s4, 0xffff
	s_delay_alu instid0(SALU_CYCLE_1)
	s_lshl_b32 s21, s4, 2
.LBB2_9:                                ;   Parent Loop BB2_2 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	v_add_nc_u32_e32 v4, s37, v3
	v_add_nc_u32_e32 v3, s4, v3
	s_delay_alu instid0(VALU_DEP_2) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_ashrrev_i32_e32 v5, 31, v4
	v_lshlrev_b64 v[4:5], 2, v[4:5]
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_2)
	v_add_co_u32 v4, vcc_lo, s16, v4
	v_add_co_ci_u32_e32 v5, vcc_lo, s17, v5, vcc_lo
	v_cmp_le_i32_e32 vcc_lo, s30, v3
	global_load_b32 v4, v[4:5], off
	s_or_b32 s22, vcc_lo, s22
	s_waitcnt vmcnt(0)
	ds_store_b32 v1, v4
	v_add_nc_u32_e32 v1, s21, v1
	s_and_not1_b32 exec_lo, exec_lo, s22
	s_cbranch_execnz .LBB2_9
.LBB2_10:                               ; %Flow261
                                        ;   in Loop: Header=BB2_2 Depth=1
	s_or_b32 exec_lo, exec_lo, s3
	s_delay_alu instid0(SALU_CYCLE_1)
	s_and_not1_b32 vcc_lo, exec_lo, s33
	s_waitcnt lgkmcnt(0)
	s_waitcnt_vscnt null, 0x0
	s_barrier
	buffer_gl0_inv
	s_cbranch_vccnz .LBB2_41
; %bb.11:                               ; %.preheader165.lr.ph
                                        ;   in Loop: Header=BB2_2 Depth=1
	s_load_b32 s3, s[12:13], 0xc
	s_mov_b32 s46, 0
	s_waitcnt lgkmcnt(0)
	s_and_b32 s21, s3, 0xffff
	s_mov_b32 s3, 0
	s_cmp_gt_u32 s21, 1
	s_mul_i32 s42, s40, s21
	s_mul_i32 s43, s11, s21
	s_mul_i32 s44, s35, s21
	s_cselect_b32 s45, -1, 0
.LBB2_12:                               ; %.preheader165
                                        ;   Parent Loop BB2_2 Depth=1
                                        ; =>  This Loop Header: Depth=2
                                        ;       Child Loop BB2_14 Depth 3
                                        ;       Child Loop BB2_17 Depth 3
                                        ;         Child Loop BB2_19 Depth 4
                                        ;       Child Loop BB2_34 Depth 3
	s_and_not1_b32 vcc_lo, exec_lo, s39
	s_cbranch_vccnz .LBB2_15
; %bb.13:                               ; %.lr.ph171
                                        ;   in Loop: Header=BB2_12 Depth=2
	s_add_i32 s22, s41, s3
	s_mov_b32 s4, 0x9700
	s_mul_i32 s22, s35, s22
	s_mov_b32 s24, s34
.LBB2_14:                               ;   Parent Loop BB2_2 Depth=1
                                        ;     Parent Loop BB2_12 Depth=2
                                        ; =>    This Inner Loop Header: Depth=3
	s_ashr_i32 s23, s22, 31
	s_delay_alu instid0(SALU_CYCLE_1) | instskip(NEXT) | instid1(SALU_CYCLE_1)
	s_lshl_b64 s[26:27], s[22:23], 2
	s_add_u32 s26, s16, s26
	s_addc_u32 s27, s17, s27
	s_add_i32 s24, s24, -1
	s_clause 0x1
	s_load_b64 s[28:29], s[26:27], 0x0
	s_load_b32 s23, s[26:27], 0x8
	v_mov_b32_e32 v1, s4
	s_add_i32 s22, s22, 3
	s_add_i32 s4, s4, 4
	s_cmp_eq_u32 s24, 0
	s_waitcnt lgkmcnt(0)
	v_dual_mov_b32 v4, s29 :: v_dual_mov_b32 v3, s28
	v_mov_b32_e32 v5, s23
	ds_store_2addr_stride64_b32 v1, v3, v4 offset1:1
	ds_store_b32 v1, v5 offset:512
	s_cbranch_scc0 .LBB2_14
.LBB2_15:                               ; %.preheader
                                        ;   in Loop: Header=BB2_12 Depth=2
	v_dual_mov_b32 v22, -1.0 :: v_dual_mov_b32 v23, 0
	s_and_saveexec_b32 s47, s0
	s_cbranch_execz .LBB2_32
; %bb.16:                               ; %.lr.ph180
                                        ;   in Loop: Header=BB2_12 Depth=2
	v_dual_mov_b32 v22, -1.0 :: v_dual_mov_b32 v23, 0
	v_mov_b32_e32 v24, v20
	v_dual_mov_b32 v25, v16 :: v_dual_mov_b32 v26, v19
	v_mov_b32_e32 v27, v0
	s_add_i32 s3, s41, s3
	s_mov_b32 s48, 0
	s_mul_i32 s49, s35, s3
.LBB2_17:                               ;   Parent Loop BB2_2 Depth=1
                                        ;     Parent Loop BB2_12 Depth=2
                                        ; =>    This Loop Header: Depth=3
                                        ;         Child Loop BB2_19 Depth 4
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_dual_mov_b32 v28, 0 :: v_dual_add_nc_u32 v1, s31, v27
	v_lshlrev_b64 v[3:4], 2, v[1:2]
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_2)
	v_add_co_u32 v3, vcc_lo, s18, v3
	v_add_co_ci_u32_e32 v4, vcc_lo, s19, v4, vcc_lo
	s_and_not1_b32 vcc_lo, exec_lo, s39
	global_load_b32 v1, v[3:4], off
	s_cbranch_vccnz .LBB2_28
; %bb.18:                               ; %.lr.ph175
                                        ;   in Loop: Header=BB2_17 Depth=3
	v_mov_b32_e32 v5, v24
	v_mov_b32_e32 v29, v26
	s_mov_b32 s50, 0
	s_mov_b32 s22, s49
	s_mov_b32 s51, 0
.LBB2_19:                               ;   Parent Loop BB2_2 Depth=1
                                        ;     Parent Loop BB2_12 Depth=2
                                        ;       Parent Loop BB2_17 Depth=3
                                        ; =>      This Inner Loop Header: Depth=4
	s_delay_alu instid0(SALU_CYCLE_1)
	s_cmp_gt_u32 s51, 63
	s_mov_b32 s3, -1
                                        ; implicit-def: $sgpr28_sgpr29
                                        ; implicit-def: $sgpr26_sgpr27
                                        ; implicit-def: $sgpr24_sgpr25
	s_cbranch_scc0 .LBB2_21
; %bb.20:                               ;   in Loop: Header=BB2_19 Depth=4
	s_ashr_i32 s23, s22, 31
	s_mov_b32 s3, 0
	s_lshl_b64 s[24:25], s[22:23], 2
	s_delay_alu instid0(SALU_CYCLE_1)
	s_add_u32 s24, s16, s24
	s_addc_u32 s25, s17, s25
	s_add_u32 s26, s24, 4
	s_addc_u32 s27, s25, 0
	s_add_u32 s28, s24, 8
	s_addc_u32 s29, s25, 0
.LBB2_21:                               ; %Flow251
                                        ;   in Loop: Header=BB2_19 Depth=4
	s_and_not1_b32 vcc_lo, exec_lo, s3
	s_cbranch_vccnz .LBB2_23
; %bb.22:                               ;   in Loop: Header=BB2_19 Depth=4
	s_add_i32 s3, s50, 0x9700
	s_delay_alu instid0(SALU_CYCLE_1) | instskip(SKIP_3) | instid1(SALU_CYCLE_1)
	s_cmp_lg_u32 s3, -1
	s_cselect_b32 s24, s3, 0
	s_cselect_b32 s25, s5, 0
	s_add_i32 s3, s50, 0x9800
	s_cmp_lg_u32 s3, -1
	s_cselect_b32 s26, s3, 0
	s_cselect_b32 s27, s5, 0
	s_add_i32 s3, s50, 0x9900
	s_delay_alu instid0(SALU_CYCLE_1)
	s_cmp_lg_u32 s3, -1
	s_cselect_b32 s28, s3, 0
	s_cselect_b32 s29, s5, 0
.LBB2_23:                               ;   in Loop: Header=BB2_19 Depth=4
	s_delay_alu instid0(SALU_CYCLE_1)
	v_dual_mov_b32 v6, s28 :: v_dual_mov_b32 v7, s29
	v_dual_mov_b32 v8, s26 :: v_dual_mov_b32 v9, s27
	v_dual_mov_b32 v10, s24 :: v_dual_mov_b32 v11, s25
	flat_load_b32 v30, v[6:7]
	flat_load_b32 v31, v[8:9]
	flat_load_b32 v32, v[10:11]
	v_add_nc_u32_e32 v6, s51, v25
                                        ; implicit-def: $vgpr10_vgpr11
                                        ; implicit-def: $vgpr8_vgpr9
	s_delay_alu instid0(VALU_DEP_1) | instskip(SKIP_1) | instid1(SALU_CYCLE_1)
	v_cmp_lt_i32_e32 vcc_lo, 0xb3f, v6
                                        ; implicit-def: $vgpr6_vgpr7
	s_and_saveexec_b32 s3, vcc_lo
	s_xor_b32 s3, exec_lo, s3
; %bb.24:                               ;   in Loop: Header=BB2_19 Depth=4
	v_ashrrev_i32_e32 v6, 31, v5
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_lshlrev_b64 v[6:7], 2, v[5:6]
	v_add_co_u32 v6, vcc_lo, s16, v6
	s_delay_alu instid0(VALU_DEP_2) | instskip(NEXT) | instid1(VALU_DEP_2)
	v_add_co_ci_u32_e32 v7, vcc_lo, s17, v7, vcc_lo
	v_add_co_u32 v8, vcc_lo, v6, 4
	s_delay_alu instid0(VALU_DEP_2)
	v_add_co_ci_u32_e32 v9, vcc_lo, 0, v7, vcc_lo
	v_add_co_u32 v10, vcc_lo, v6, 8
	v_add_co_ci_u32_e32 v11, vcc_lo, 0, v7, vcc_lo
; %bb.25:                               ; %Flow250
                                        ;   in Loop: Header=BB2_19 Depth=4
	s_and_not1_saveexec_b32 s23, s3
; %bb.26:                               ;   in Loop: Header=BB2_19 Depth=4
	v_add_nc_u32_e32 v8, 4, v29
	v_add_nc_u32_e32 v9, 8, v29
	v_cmp_ne_u32_e32 vcc_lo, -1, v29
	s_delay_alu instid0(VALU_DEP_3) | instskip(NEXT) | instid1(VALU_DEP_3)
	v_cmp_ne_u32_e64 s3, -1, v8
	v_cmp_ne_u32_e64 s4, -1, v9
	v_cndmask_b32_e64 v7, 0, s5, vcc_lo
	v_cndmask_b32_e32 v6, 0, v29, vcc_lo
	s_delay_alu instid0(VALU_DEP_4) | instskip(NEXT) | instid1(VALU_DEP_4)
	v_cndmask_b32_e64 v8, 0, v8, s3
	v_cndmask_b32_e64 v10, 0, v9, s4
	v_cndmask_b32_e64 v9, 0, s5, s3
	v_cndmask_b32_e64 v11, 0, s5, s4
; %bb.27:                               ;   in Loop: Header=BB2_19 Depth=4
	s_or_b32 exec_lo, exec_lo, s23
	flat_load_b32 v6, v[6:7]
	flat_load_b32 v7, v[8:9]
	flat_load_b32 v8, v[10:11]
	s_add_i32 s51, s51, 1
	s_add_i32 s22, s22, 3
	s_add_i32 s50, s50, 4
	s_cmp_eq_u32 s11, s51
	v_add_nc_u32_e32 v5, 3, v5
	s_waitcnt vmcnt(2) lgkmcnt(2)
	v_dual_sub_f32 v6, v6, v32 :: v_dual_add_nc_u32 v29, 12, v29
	s_waitcnt vmcnt(0) lgkmcnt(0)
	v_dual_sub_f32 v7, v7, v31 :: v_dual_sub_f32 v8, v8, v30
	s_delay_alu instid0(VALU_DEP_2) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_mul_f32_e32 v6, v6, v6
	v_fmac_f32_e32 v6, v7, v7
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_fmac_f32_e32 v6, v8, v8
	v_max_f32_e32 v6, 0x1e3ce508, v6
	s_delay_alu instid0(VALU_DEP_1)
	v_add_f32_e32 v28, v28, v6
	s_cbranch_scc0 .LBB2_19
.LBB2_28:                               ; %Flow253
                                        ;   in Loop: Header=BB2_17 Depth=3
	s_delay_alu instid0(VALU_DEP_1) | instskip(SKIP_2) | instid1(VALU_DEP_2)
	v_div_scale_f32 v5, null, v14, v14, v28
	v_div_scale_f32 v8, vcc_lo, v28, v14, v28
	s_mov_b32 s3, exec_lo
	v_rcp_f32_e32 v6, v5
	s_waitcnt_depctr 0xfff
	v_fma_f32 v7, -v5, v6, 1.0
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_fmac_f32_e32 v6, v7, v6
	v_mul_f32_e32 v7, v8, v6
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_fma_f32 v9, -v5, v7, v8
	v_fmac_f32_e32 v7, v9, v6
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_fma_f32 v5, -v5, v7, v8
	v_div_fmas_f32 v5, v5, v6, v7
	s_waitcnt vmcnt(0)
	v_max_f32_e32 v6, v1, v1
	s_delay_alu instid0(VALU_DEP_2) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_div_fixup_f32 v5, v5, v14, v28
	v_min_f32_e32 v5, v6, v5
	s_delay_alu instid0(VALU_DEP_1)
	v_cmpx_neq_f32_e32 v5, v1
	s_cbranch_execz .LBB2_30
; %bb.29:                               ;   in Loop: Header=BB2_17 Depth=3
	global_store_b32 v[3:4], v5, off
.LBB2_30:                               ;   in Loop: Header=BB2_17 Depth=3
	s_or_b32 exec_lo, exec_lo, s3
	v_cmp_gt_f32_e32 vcc_lo, v5, v22
	v_add_nc_u32_e32 v26, s42, v26
	v_add_nc_u32_e32 v25, s43, v25
	v_dual_cndmask_b32 v23, v23, v27 :: v_dual_add_nc_u32 v24, s44, v24
	v_dual_cndmask_b32 v22, v22, v5 :: v_dual_add_nc_u32 v27, s21, v27
	s_delay_alu instid0(VALU_DEP_1) | instskip(SKIP_1) | instid1(SALU_CYCLE_1)
	v_cmp_le_i32_e32 vcc_lo, s9, v27
	s_or_b32 s48, vcc_lo, s48
	s_and_not1_b32 exec_lo, exec_lo, s48
	s_cbranch_execnz .LBB2_17
; %bb.31:                               ; %Flow254
                                        ;   in Loop: Header=BB2_12 Depth=2
	s_or_b32 exec_lo, exec_lo, s48
.LBB2_32:                               ; %Flow255
                                        ;   in Loop: Header=BB2_12 Depth=2
	s_delay_alu instid0(SALU_CYCLE_1) | instskip(NEXT) | instid1(SALU_CYCLE_1)
	s_or_b32 exec_lo, exec_lo, s47
	s_and_not1_b32 vcc_lo, exec_lo, s45
	ds_store_b32 v15, v22
	ds_store_b32 v17, v23
	s_cbranch_vccnz .LBB2_38
; %bb.33:                               ; %.lr.ph186.preheader
                                        ;   in Loop: Header=BB2_12 Depth=2
	s_mov_b32 s3, 0
.LBB2_34:                               ; %.lr.ph186
                                        ;   Parent Loop BB2_2 Depth=1
                                        ;     Parent Loop BB2_12 Depth=2
                                        ; =>    This Inner Loop Header: Depth=3
	s_delay_alu instid0(SALU_CYCLE_1)
	s_mov_b32 s4, s3
	s_add_i32 s3, s3, 1
	s_waitcnt lgkmcnt(0)
	s_waitcnt_vscnt null, 0x0
	s_lshr_b32 s22, s21, s3
	s_barrier
	v_cmp_gt_u32_e32 vcc_lo, s22, v0
	buffer_gl0_inv
	s_and_saveexec_b32 s22, vcc_lo
	s_cbranch_execz .LBB2_37
; %bb.35:                               ;   in Loop: Header=BB2_34 Depth=3
	v_lshlrev_b32_e32 v1, s4, v13
	v_lshlrev_b32_e32 v3, s4, v18
	s_delay_alu instid0(VALU_DEP_2) | instskip(NEXT) | instid1(VALU_DEP_2)
	v_lshlrev_b32_e32 v1, 2, v1
	v_lshlrev_b32_e32 v4, 2, v3
	ds_load_b32 v5, v1 offset:36608
	ds_load_b32 v3, v4 offset:36608
	s_waitcnt lgkmcnt(0)
	v_cmp_lt_f32_e32 vcc_lo, v5, v3
	s_and_b32 exec_lo, exec_lo, vcc_lo
	s_cbranch_execz .LBB2_37
; %bb.36:                               ;   in Loop: Header=BB2_34 Depth=3
	ds_load_b32 v4, v4 offset:34560
	v_add_nc_u32_e32 v5, 0x8f00, v1
	ds_store_b32 v5, v3
	s_waitcnt lgkmcnt(1)
	ds_store_b32 v1, v4 offset:34560
.LBB2_37:                               ;   in Loop: Header=BB2_34 Depth=3
	s_or_b32 exec_lo, exec_lo, s22
	s_lshl_b32 s4, 2, s4
	s_delay_alu instid0(SALU_CYCLE_1)
	s_cmp_ge_u32 s4, s21
	s_cbranch_scc0 .LBB2_34
.LBB2_38:                               ; %._crit_edge187
                                        ;   in Loop: Header=BB2_12 Depth=2
	s_waitcnt lgkmcnt(0)
	s_waitcnt_vscnt null, 0x0
	s_barrier
	buffer_gl0_inv
	ds_load_b32 v1, v2 offset:34560
	s_waitcnt lgkmcnt(0)
	v_readfirstlane_b32 s3, v1
	s_and_saveexec_b32 s4, s2
	s_cbranch_execz .LBB2_40
; %bb.39:                               ;   in Loop: Header=BB2_12 Depth=2
	s_add_i32 s22, s46, s20
	s_delay_alu instid0(VALU_DEP_1) | instskip(SKIP_1) | instid1(SALU_CYCLE_1)
	v_mov_b32_e32 v1, s3
	s_ashr_i32 s23, s22, 31
	s_lshl_b64 s[22:23], s[22:23], 2
	s_delay_alu instid0(SALU_CYCLE_1)
	s_add_u32 s22, s6, s22
	s_addc_u32 s23, s7, s23
	global_store_b32 v2, v1, s[22:23]
.LBB2_40:                               ;   in Loop: Header=BB2_12 Depth=2
	s_or_b32 exec_lo, exec_lo, s4
	s_add_i32 s46, s46, 1
	s_delay_alu instid0(SALU_CYCLE_1)
	s_cmp_eq_u32 s46, s10
	s_cbranch_scc0 .LBB2_12
.LBB2_41:                               ; %._crit_edge190
                                        ;   in Loop: Header=BB2_2 Depth=1
	v_add_nc_u32_e32 v20, s38, v20
	s_add_i32 s15, s14, s15
	s_add_i32 s37, s37, s38
	s_add_i32 s41, s41, s36
	s_cmp_ge_i32 s15, s8
	s_cbranch_scc0 .LBB2_2
.LBB2_42:                               ; %._crit_edge194
	s_nop 0
	s_sendmsg sendmsg(MSG_DEALLOC_VGPRS)
	s_endpgm
	.section	.rodata,"a",@progbits
	.p2align	6, 0x0
	.amdhsa_kernel _Z37farthestpointsamplingtrajectoryKerneliiiiPKfPfPi
		.amdhsa_group_segment_fixed_size 39424
		.amdhsa_private_segment_fixed_size 0
		.amdhsa_kernarg_size 296
		.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 33
		.amdhsa_next_free_sgpr 52
		.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_end2:
	.size	_Z37farthestpointsamplingtrajectoryKerneliiiiPKfPfPi, .Lfunc_end2-_Z37farthestpointsamplingtrajectoryKerneliiiiPKfPfPi
                                        ; -- End function
	.section	.AMDGPU.csdata,"",@progbits
; Kernel info:
; codeLenInByte = 1820
; NumSgprs: 54
; NumVgprs: 33
; ScratchSize: 0
; MemoryBound: 0
; FloatMode: 240
; IeeeMode: 1
; LDSByteSize: 39424 bytes/workgroup (compile time only)
; SGPRBlocks: 6
; VGPRBlocks: 4
; NumSGPRsForWavesPerEU: 54
; NumVGPRsForWavesPerEU: 33
; Occupancy: 16
; WaveLimiterHint : 0
; COMPUTE_PGM_RSRC2:SCRATCH_EN: 0
; COMPUTE_PGM_RSRC2:USER_SGPR: 15
; COMPUTE_PGM_RSRC2:TRAP_HANDLER: 0
; COMPUTE_PGM_RSRC2:TGID_X_EN: 1
; COMPUTE_PGM_RSRC2:TGID_Y_EN: 0
; COMPUTE_PGM_RSRC2:TGID_Z_EN: 0
; COMPUTE_PGM_RSRC2:TIDIG_COMP_CNT: 0
	.text
	.p2alignl 7, 3214868480
	.fill 96, 4, 3214868480
	.type	__hip_cuid_,@object             ; @__hip_cuid_
	.section	.bss,"aw",@nobits
	.globl	__hip_cuid_
__hip_cuid_:
	.byte	0                               ; 0x0
	.size	__hip_cuid_, 1

	.ident	"AMD clang version 18.0.0git (https://github.com/RadeonOpenCompute/llvm-project roc-6.3.2 25012 e5bf7e55c91490b07c49d8960fa7983d864936c4)"
	.section	".note.GNU-stack","",@progbits
	.addrsig
	.addrsig_sym __hip_cuid_
	.amdgpu_metadata
---
amdhsa.kernels:
  - .args:
      - .offset:         0
        .size:           4
        .value_kind:     by_value
      - .offset:         4
        .size:           4
        .value_kind:     by_value
      - .offset:         8
        .size:           4
        .value_kind:     by_value
      - .offset:         12
        .size:           4
        .value_kind:     by_value
      - .actual_access:  read_only
        .address_space:  global
        .offset:         16
        .size:           8
        .value_kind:     global_buffer
      - .actual_access:  read_only
        .address_space:  global
        .offset:         24
        .size:           8
        .value_kind:     global_buffer
      - .actual_access:  write_only
        .address_space:  global
        .offset:         32
        .size:           8
        .value_kind:     global_buffer
      - .offset:         40
        .size:           4
        .value_kind:     hidden_block_count_x
      - .offset:         44
        .size:           4
        .value_kind:     hidden_block_count_y
      - .offset:         48
        .size:           4
        .value_kind:     hidden_block_count_z
      - .offset:         52
        .size:           2
        .value_kind:     hidden_group_size_x
      - .offset:         54
        .size:           2
        .value_kind:     hidden_group_size_y
      - .offset:         56
        .size:           2
        .value_kind:     hidden_group_size_z
      - .offset:         58
        .size:           2
        .value_kind:     hidden_remainder_x
      - .offset:         60
        .size:           2
        .value_kind:     hidden_remainder_y
      - .offset:         62
        .size:           2
        .value_kind:     hidden_remainder_z
      - .offset:         80
        .size:           8
        .value_kind:     hidden_global_offset_x
      - .offset:         88
        .size:           8
        .value_kind:     hidden_global_offset_y
      - .offset:         96
        .size:           8
        .value_kind:     hidden_global_offset_z
      - .offset:         104
        .size:           2
        .value_kind:     hidden_grid_dims
    .group_segment_fixed_size: 0
    .kernarg_segment_align: 8
    .kernarg_segment_size: 296
    .language:       OpenCL C
    .language_version:
      - 2
      - 0
    .max_flat_workgroup_size: 1024
    .name:           _Z21gathertrajctoryKerneliiiiPKfPKiPf
    .private_segment_fixed_size: 0
    .sgpr_count:     27
    .sgpr_spill_count: 0
    .symbol:         _Z21gathertrajctoryKerneliiiiPKfPKiPf.kd
    .uniform_work_group_size: 1
    .uses_dynamic_stack: false
    .vgpr_count:     13
    .vgpr_spill_count: 0
    .wavefront_size: 32
    .workgroup_processor_mode: 1
  - .args:
      - .offset:         0
        .size:           4
        .value_kind:     by_value
      - .offset:         4
        .size:           4
        .value_kind:     by_value
      - .offset:         8
        .size:           4
        .value_kind:     by_value
      - .offset:         12
        .size:           4
        .value_kind:     by_value
      - .actual_access:  read_only
        .address_space:  global
        .offset:         16
        .size:           8
        .value_kind:     global_buffer
      - .actual_access:  read_only
        .address_space:  global
        .offset:         24
        .size:           8
        .value_kind:     global_buffer
      - .address_space:  global
        .offset:         32
        .size:           8
        .value_kind:     global_buffer
      - .offset:         40
        .size:           4
        .value_kind:     hidden_block_count_x
      - .offset:         44
        .size:           4
        .value_kind:     hidden_block_count_y
      - .offset:         48
        .size:           4
        .value_kind:     hidden_block_count_z
      - .offset:         52
        .size:           2
        .value_kind:     hidden_group_size_x
      - .offset:         54
        .size:           2
        .value_kind:     hidden_group_size_y
      - .offset:         56
        .size:           2
        .value_kind:     hidden_group_size_z
      - .offset:         58
        .size:           2
        .value_kind:     hidden_remainder_x
      - .offset:         60
        .size:           2
        .value_kind:     hidden_remainder_y
      - .offset:         62
        .size:           2
        .value_kind:     hidden_remainder_z
      - .offset:         80
        .size:           8
        .value_kind:     hidden_global_offset_x
      - .offset:         88
        .size:           8
        .value_kind:     hidden_global_offset_y
      - .offset:         96
        .size:           8
        .value_kind:     hidden_global_offset_z
      - .offset:         104
        .size:           2
        .value_kind:     hidden_grid_dims
    .group_segment_fixed_size: 0
    .kernarg_segment_align: 8
    .kernarg_segment_size: 296
    .language:       OpenCL C
    .language_version:
      - 2
      - 0
    .max_flat_workgroup_size: 1024
    .name:           _Z26gathertrajectorygradKerneliiiiPKfPKiPf
    .private_segment_fixed_size: 0
    .sgpr_count:     25
    .sgpr_spill_count: 0
    .symbol:         _Z26gathertrajectorygradKerneliiiiPKfPKiPf.kd
    .uniform_work_group_size: 1
    .uses_dynamic_stack: false
    .vgpr_count:     11
    .vgpr_spill_count: 0
    .wavefront_size: 32
    .workgroup_processor_mode: 1
  - .args:
      - .offset:         0
        .size:           4
        .value_kind:     by_value
      - .offset:         4
        .size:           4
        .value_kind:     by_value
      - .offset:         8
        .size:           4
        .value_kind:     by_value
      - .offset:         12
        .size:           4
        .value_kind:     by_value
      - .actual_access:  read_only
        .address_space:  global
        .offset:         16
        .size:           8
        .value_kind:     global_buffer
      - .address_space:  global
        .offset:         24
        .size:           8
        .value_kind:     global_buffer
      - .actual_access:  write_only
        .address_space:  global
        .offset:         32
        .size:           8
        .value_kind:     global_buffer
      - .offset:         40
        .size:           4
        .value_kind:     hidden_block_count_x
      - .offset:         44
        .size:           4
        .value_kind:     hidden_block_count_y
      - .offset:         48
        .size:           4
        .value_kind:     hidden_block_count_z
      - .offset:         52
        .size:           2
        .value_kind:     hidden_group_size_x
      - .offset:         54
        .size:           2
        .value_kind:     hidden_group_size_y
      - .offset:         56
        .size:           2
        .value_kind:     hidden_group_size_z
      - .offset:         58
        .size:           2
        .value_kind:     hidden_remainder_x
      - .offset:         60
        .size:           2
        .value_kind:     hidden_remainder_y
      - .offset:         62
        .size:           2
        .value_kind:     hidden_remainder_z
      - .offset:         80
        .size:           8
        .value_kind:     hidden_global_offset_x
      - .offset:         88
        .size:           8
        .value_kind:     hidden_global_offset_y
      - .offset:         96
        .size:           8
        .value_kind:     hidden_global_offset_z
      - .offset:         104
        .size:           2
        .value_kind:     hidden_grid_dims
    .group_segment_fixed_size: 39424
    .kernarg_segment_align: 8
    .kernarg_segment_size: 296
    .language:       OpenCL C
    .language_version:
      - 2
      - 0
    .max_flat_workgroup_size: 1024
    .name:           _Z37farthestpointsamplingtrajectoryKerneliiiiPKfPfPi
    .private_segment_fixed_size: 0
    .sgpr_count:     54
    .sgpr_spill_count: 0
    .symbol:         _Z37farthestpointsamplingtrajectoryKerneliiiiPKfPfPi.kd
    .uniform_work_group_size: 1
    .uses_dynamic_stack: false
    .vgpr_count:     33
    .vgpr_spill_count: 0
    .wavefront_size: 32
    .workgroup_processor_mode: 1
amdhsa.target:   amdgcn-amd-amdhsa--gfx1100
amdhsa.version:
  - 1
  - 2
...

	.end_amdgpu_metadata
