/* Furthest point sampling GPU implementation
 * Original author: Haoqiang Fan
 * Modified by Charles R. Qi
 * All Rights Reserved. 2017.
 */

__global__ void cumsumKernel(int b, int n, const float* __restrict__ inp,
                             float* __restrict__ out) {
    const int BlockSize = 2048;
    const int paddingLevel = 5;
    __shared__ float buffer4[BlockSize * 4];
    __shared__ float buffer[BlockSize + (BlockSize >> paddingLevel)];
    for (int i = blockIdx.x; i < b; i += gridDim.x) {
        float runningsum = 0, runningsum2 = 0;
        for (int j = 0; j < n; j += BlockSize * 4) {
            int n24_i = min(n - j, BlockSize * 4);
            int n24 = (n24_i + 3) & ~3;
            int n2 = n24 >> 2;
            for (int k = threadIdx.x * 4; k < n24_i; k += blockDim.x * 4) {
                if (k + 3 < n24_i) {
                    float v1 = inp[i * n + j + k];
                    float v2 = inp[i * n + j + k + 1];
                    v2 += v1;
                    float v3 = inp[i * n + j + k + 2];
                    float v4 = inp[i * n + j + k + 3];
                    v4 += v3;
                    v3 += v2;
                    v4 += v2;
                    buffer4[k] = v1;
                    buffer4[k + 1] = v2;
                    buffer4[k + 2] = v3;
                    buffer4[k + 3] = v4;
                    buffer[(k >> 2) + (k >> (2 + paddingLevel))] = v4;
                } else {
                    float v = 0;
                    for (int k2 = k; k2 < n24_i; k2++) {
                        v += inp[i * n + j + k2];
                        buffer4[k2] = v;
                    }
                    for (int k2 = n24_i; k2 < n24; k2++) {
                        buffer4[k2] = v;
                    }
                    buffer[(k >> 2) + (k >> (2 + paddingLevel))] = v;
                }
            }
            int u = 0;
            for (; (2 << u) <= n2; u++) {
                __syncthreads();
                for (int k = threadIdx.x; k < int(n2 >> (u + 1));
                     k += blockDim.x) {
                    int i1 = (((k << 1) + 2) << u) - 1;
                    int i2 = (((k << 1) + 1) << u) - 1;
                    i1 += i1 >> paddingLevel;
                    i2 += i2 >> paddingLevel;
                    buffer[i1] += buffer[i2];
                }
            }
            u--;
            for (; u >= 0; u--) {
                __syncthreads();
                for (int k = threadIdx.x; k < int((n2 - (1 << u)) >> (u + 1));
                     k += blockDim.x) {
                    int i1 = (((k << 1) + 3) << u) - 1;
                    int i2 = (((k << 1) + 2) << u) - 1;
                    i1 += i1 >> paddingLevel;
                    i2 += i2 >> paddingLevel;
                    buffer[i1] += buffer[i2];
                }
            }
            __syncthreads();
            for (int k = threadIdx.x * 4; k < n24; k += blockDim.x * 4) {
                if (k != 0) {
                    int k2 = ((k >> 2) - 1) + (((k >> 2) - 1) >> paddingLevel);
                    buffer4[k] += buffer[k2];
                    buffer4[k + 1] += buffer[k2];
                    buffer4[k + 2] += buffer[k2];
                    buffer4[k + 3] += buffer[k2];
                }
            }
            __syncthreads();
            for (int k = threadIdx.x; k < n24_i; k += blockDim.x) {
                out[i * n + j + k] = buffer4[k] + runningsum;
            }
            float t =
                buffer[(n2 - 1) + ((n2 - 1) >> paddingLevel)] + runningsum2;
            float r2 = runningsum + t;
            runningsum2 = t - (r2 - runningsum);
            runningsum = r2;
            __syncthreads();
        }
    }
}

__global__ void binarysearchKernel(int b, int n, int m,
                                   const float* __restrict__ dataset,
                                   const float* __restrict__ query,
                                   int* __restrict__ result) {
    int base = 1;
    while (base < n) base <<= 1;
    for (int i = blockIdx.x; i < b; i += gridDim.x) {
        for (int j = blockIdx.y * blockDim.x + threadIdx.x; j < m;
             j += blockDim.x * gridDim.y) {
            float q = query[i * m + j] * dataset[i * n + n - 1];
            int r = n - 1;
            for (int k = base; k >= 1; k >>= 1)
                if (r >= k && dataset[i * n + r - k] >= q) r -= k;
            result[i * m + j] = r;
        }
    }
}
__global__ void farthestpointsamplingKernel(int b, int n, int m,
                                            const float* __restrict__ dataset,
                                            float* __restrict__ temp,
                                            int* __restrict__ idxs) {
    if (m <= 0) return;
    const int BlockSize = 512;
    __shared__ float dists[BlockSize];
    __shared__ int dists_i[BlockSize];
    const int BufferSize = 3072;
    __shared__ float buf[BufferSize * 3];
    for (int i = blockIdx.x; i < b; i += gridDim.x) {
        int old = 0;
        if (threadIdx.x == 0) idxs[i * m + 0] = old;
        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) * 3; j += blockDim.x) {
            buf[j] = dataset[i * n * 3 + j];
        }
        __syncthreads();
        for (int j = 1; j < m; j++) {
            int besti = 0;
            float best = -1;
            float x1 = dataset[i * n * 3 + old * 3 + 0];
            float y1 = dataset[i * n * 3 + old * 3 + 1];
            float z1 = dataset[i * n * 3 + old * 3 + 2];
            for (int k = threadIdx.x; k < n; k += blockDim.x) {
                float td = temp[blockIdx.x * n + k];
                float x2, y2, z2;
                if (k < BufferSize) {
                    x2 = buf[k * 3 + 0];
                    y2 = buf[k * 3 + 1];
                    z2 = buf[k * 3 + 2];
                } else {
                    x2 = dataset[i * n * 3 + k * 3 + 0];
                    y2 = dataset[i * n * 3 + k * 3 + 1];
                    z2 = dataset[i * n * 3 + k * 3 + 2];
                }
                float d = (x2 - x1) * (x2 - x1) + (y2 - y1) * (y2 - y1) +
                          (z2 - z1) * (z2 - z1);
                float d2 = min(d, td);
                if (d2 != td) temp[blockIdx.x * n + k] = d2;
                if (d2 > best) {
                    best = d2;
                    besti = k;
                }
            }
            dists[threadIdx.x] = best;
            dists_i[threadIdx.x] = besti;
            for (int u = 0; (1 << u) < blockDim.x; u++) {
                __syncthreads();
                if (threadIdx.x < (blockDim.x >> (u + 1))) {
                    int i1 = (threadIdx.x * 2) << u;
                    int i2 = (threadIdx.x * 2 + 1) << u;
                    if (dists[i1] < dists[i2]) {
                        dists[i1] = dists[i2];
                        dists_i[i1] = dists_i[i2];
                    }
                }
            }
            __syncthreads();
            old = dists_i[0];
            if (threadIdx.x == 0) idxs[i * m + j] = old;
        }
    }
}

__global__ void gatherpointKernel(int b, int n, int m,
                                  const float* __restrict__ inp,
                                  const int* __restrict__ idx,
                                  float* __restrict__ out) {
    for (int i = blockIdx.x; i < b; i += gridDim.x) {
        for (int j = blockIdx.y * blockDim.x + threadIdx.x; j < m;
             j += blockDim.x * gridDim.y) {
            int a = idx[i * m + j];
            out[(i * m + j) * 3 + 0] = inp[(i * n + a) * 3 + 0];
            out[(i * m + j) * 3 + 1] = inp[(i * n + a) * 3 + 1];
            out[(i * m + j) * 3 + 2] = inp[(i * n + a) * 3 + 2];
        }
    }
}

__global__ void scatteraddpointKernel(int b, int n, int m,
                                      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 = blockIdx.y * blockDim.x + threadIdx.x; j < m;
             j += blockDim.x * gridDim.y) {
            int a = idx[i * m + j];
            atomicAdd(&inp_g[(i * n + a) * 3 + 0], out_g[(i * m + j) * 3 + 0]);
            atomicAdd(&inp_g[(i * n + a) * 3 + 1], out_g[(i * m + j) * 3 + 1]);
            atomicAdd(&inp_g[(i * n + a) * 3 + 2], out_g[(i * m + j) * 3 + 2]);
        }
    }
}

void cumsumLauncher(int b, int n, const float* inp, float* out) {
    cumsumKernel<<<32, 512>>>(b, n, inp, out);
}
// require b*n working space
void probsampleLauncher(int b, int n, int m, const float* inp_p,
                        const float* inp_r, float* temp, int* out) {
    cumsumKernel<<<32, 512>>>(b, n, inp_p, temp);
    binarysearchKernel<<<dim3(32, 8, 1), 512>>>(b, n, m, temp, inp_r, out);
}
// require 32*n working space
void farthestpointsamplingLauncher(int b, int n, int m, const float* inp,
                                   float* temp, int* out) {
    farthestpointsamplingKernel<<<32, 512>>>(b, n, m, inp, temp, out);
}
void gatherpointLauncher(int b, int n, int m, const float* inp, const int* idx,
                         float* out) {
    gatherpointKernel<<<dim3(2, 8, 1), 512>>>(b, n, m, inp, idx, out);
}
void scatteraddpointLauncher(int b, int n, int m, const float* out_g,
                             const int* idx, float* inp_g) {
    scatteraddpointKernel<<<dim3(2, 8, 1), 512>>>(b, n, m, out_g, idx, inp_g);
}

	.file	"tmpxft_0033d261_00000000-6_tf_sampling.cudafe1.cpp"
	.text
#APP

#NO_APP
	.type	_ZL26__cudaUnregisterBinaryUtilv, @function
_ZL26__cudaUnregisterBinaryUtilv:
.LFB2015:
	.cfi_startproc
	endbr64
	movq	_ZL20__cudaFatCubinHandle(%rip), %rdi
	jmp	__cudaUnregisterFatBinary@PLT
	.cfi_endproc
.LFE2015:
	.size	_ZL26__cudaUnregisterBinaryUtilv, .-_ZL26__cudaUnregisterBinaryUtilv
	.globl	_Z37__device_stub__Z12cumsumKerneliiPKfPfiiPKfPf
	.type	_Z37__device_stub__Z12cumsumKerneliiPKfPfiiPKfPf, @function
_Z37__device_stub__Z12cumsumKerneliiPKfPfiiPKfPf:
.LFB2037:
	.cfi_startproc
	endbr64
	subq	$152, %rsp
	.cfi_def_cfa_offset 160
	movl	%edi, 12(%rsp)
	leaq	56(%rsp), %rdi
	movl	%esi, 8(%rsp)
	leaq	68(%rsp), %rsi
	movq	%fs:40, %rax
	movq	%rax, 136(%rsp)
	xorl	%eax, %eax
	leaq	12(%rsp), %rax
	movq	%rdx, 24(%rsp)
	leaq	40(%rsp), %rdx
	movq	%rax, 104(%rsp)
	leaq	8(%rsp), %rax
	movq	%rax, 112(%rsp)
	leaq	24(%rsp), %rax
	movq	%rax, 120(%rsp)
	leaq	32(%rsp), %rax
	movq	%rcx, 32(%rsp)
	leaq	48(%rsp), %rcx
	movq	%rax, 128(%rsp)
	movabsq	$4294967297, %rax
	movq	%rax, 56(%rsp)
	movl	$1, 64(%rsp)
	movq	%rax, 68(%rsp)
	movl	$1, 76(%rsp)
	call	__cudaPopCallConfiguration@PLT
	testl	%eax, %eax
	jne	.L2
	pushq	48(%rsp)
	.cfi_def_cfa_offset 168
	leaq	_Z12cumsumKerneliiPKfPf(%rip), %rdi
	pushq	48(%rsp)
	.cfi_def_cfa_offset 176
	movq	84(%rsp), %rcx
	movl	92(%rsp), %r8d
	movq	72(%rsp), %rsi
	movl	80(%rsp), %edx
	leaq	120(%rsp), %r9
	call	cudaLaunchKernel@PLT
	popq	%rax
	.cfi_def_cfa_offset 168
	popq	%rdx
	.cfi_def_cfa_offset 160
.L2:
	movq	136(%rsp), %rax
	subq	%fs:40, %rax
	je	.L4
	call	__stack_chk_fail@PLT
.L4:
	addq	$152, %rsp
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE2037:
	.size	_Z37__device_stub__Z12cumsumKerneliiPKfPfiiPKfPf, .-_Z37__device_stub__Z12cumsumKerneliiPKfPfiiPKfPf
	.globl	_Z12cumsumKerneliiPKfPf
	.type	_Z12cumsumKerneliiPKfPf, @function
_Z12cumsumKerneliiPKfPf:
.LFB2038:
	.cfi_startproc
	endbr64
	jmp	_Z37__device_stub__Z12cumsumKerneliiPKfPfiiPKfPf
	.cfi_endproc
.LFE2038:
	.size	_Z12cumsumKerneliiPKfPf, .-_Z12cumsumKerneliiPKfPf
	.globl	_Z14cumsumLauncheriiPKfPf
	.type	_Z14cumsumLauncheriiPKfPf, @function
_Z14cumsumLauncheriiPKfPf:
.LFB2008:
	.cfi_startproc
	endbr64
	pushq	%r13
	.cfi_def_cfa_offset 16
	.cfi_offset 13, -16
	xorl	%r9d, %r9d
	movq	%rcx, %r13
	xorl	%r8d, %r8d
	pushq	%r12
	.cfi_def_cfa_offset 24
	.cfi_offset 12, -24
	movq	%rdx, %r12
	movl	$8388609, %edx
	movl	$1, %ecx
	pushq	%rbp
	.cfi_def_cfa_offset 32
	.cfi_offset 6, -32
	salq	$9, %rdx
	movl	%esi, %ebp
	movl	$1, %esi
	pushq	%rbx
	.cfi_def_cfa_offset 40
	.cfi_offset 3, -40
	movl	%edi, %ebx
	movl	$134217729, %edi
	salq	$5, %rdi
	subq	$40, %rsp
	.cfi_def_cfa_offset 80
	call	__cudaPushCallConfiguration@PLT
	testl	%eax, %eax
	jne	.L8
	addq	$40, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	movq	%r13, %rcx
	movq	%r12, %rdx
	movl	%ebp, %esi
	movl	%ebx, %edi
	popq	%rbx
	.cfi_def_cfa_offset 32
	popq	%rbp
	.cfi_def_cfa_offset 24
	popq	%r12
	.cfi_def_cfa_offset 16
	popq	%r13
	.cfi_def_cfa_offset 8
	jmp	_Z37__device_stub__Z12cumsumKerneliiPKfPfiiPKfPf
.L8:
	.cfi_restore_state
	addq	$40, %rsp
	.cfi_def_cfa_offset 40
	popq	%rbx
	.cfi_def_cfa_offset 32
	popq	%rbp
	.cfi_def_cfa_offset 24
	popq	%r12
	.cfi_def_cfa_offset 16
	popq	%r13
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE2008:
	.size	_Z14cumsumLauncheriiPKfPf, .-_Z14cumsumLauncheriiPKfPf
	.globl	_Z47__device_stub__Z18binarysearchKerneliiiPKfS0_PiiiiPKfS0_Pi
	.type	_Z47__device_stub__Z18binarysearchKerneliiiPKfS0_PiiiiPKfS0_Pi, @function
_Z47__device_stub__Z18binarysearchKerneliiiPKfS0_PiiiiPKfS0_Pi:
.LFB2039:
	.cfi_startproc
	endbr64
	subq	$168, %rsp
	.cfi_def_cfa_offset 176
	movl	%edi, 12(%rsp)
	leaq	56(%rsp), %rdi
	movl	%esi, 8(%rsp)
	leaq	68(%rsp), %rsi
	movl	%edx, 4(%rsp)
	leaq	40(%rsp), %rdx
	movq	%fs:40, %rax
	movq	%rax, 152(%rsp)
	xorl	%eax, %eax
	leaq	12(%rsp), %rax
	movq	%rcx, 16(%rsp)
	leaq	48(%rsp), %rcx
	movq	%rax, 104(%rsp)
	leaq	8(%rsp), %rax
	movq	%rax, 112(%rsp)
	leaq	4(%rsp), %rax
	movq	%rax, 120(%rsp)
	leaq	16(%rsp), %rax
	movq	%rax, 128(%rsp)
	leaq	24(%rsp), %rax
	movq	%rax, 136(%rsp)
	leaq	32(%rsp), %rax
	movq	%rax, 144(%rsp)
	movabsq	$4294967297, %rax
	movq	%r8, 24(%rsp)
	movq	%r9, 32(%rsp)
	movq	%rax, 56(%rsp)
	movl	$1, 64(%rsp)
	movq	%rax, 68(%rsp)
	movl	$1, 76(%rsp)
	call	__cudaPopCallConfiguration@PLT
	testl	%eax, %eax
	jne	.L11
	pushq	48(%rsp)
	.cfi_def_cfa_offset 184
	leaq	_Z18binarysearchKerneliiiPKfS0_Pi(%rip), %rdi
	pushq	48(%rsp)
	.cfi_def_cfa_offset 192
	movq	84(%rsp), %rcx
	movl	92(%rsp), %r8d
	movq	72(%rsp), %rsi
	movl	80(%rsp), %edx
	leaq	120(%rsp), %r9
	call	cudaLaunchKernel@PLT
	popq	%rax
	.cfi_def_cfa_offset 184
	popq	%rdx
	.cfi_def_cfa_offset 176
.L11:
	movq	152(%rsp), %rax
	subq	%fs:40, %rax
	je	.L13
	call	__stack_chk_fail@PLT
.L13:
	addq	$168, %rsp
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE2039:
	.size	_Z47__device_stub__Z18binarysearchKerneliiiPKfS0_PiiiiPKfS0_Pi, .-_Z47__device_stub__Z18binarysearchKerneliiiPKfS0_PiiiiPKfS0_Pi
	.globl	_Z18binarysearchKerneliiiPKfS0_Pi
	.type	_Z18binarysearchKerneliiiPKfS0_Pi, @function
_Z18binarysearchKerneliiiPKfS0_Pi:
.LFB2040:
	.cfi_startproc
	endbr64
	jmp	_Z47__device_stub__Z18binarysearchKerneliiiPKfS0_PiiiiPKfS0_Pi
	.cfi_endproc
.LFE2040:
	.size	_Z18binarysearchKerneliiiPKfS0_Pi, .-_Z18binarysearchKerneliiiPKfS0_Pi
	.globl	_Z18probsampleLauncheriiiPKfS0_PfPi
	.type	_Z18probsampleLauncheriiiPKfS0_PfPi, @function
_Z18probsampleLauncheriiiPKfS0_PfPi:
.LFB2009:
	.cfi_startproc
	endbr64
	pushq	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	pushq	%r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	movq	%rcx, %r14
	movl	$1, %ecx
	pushq	%r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	movq	%r8, %r13
	xorl	%r8d, %r8d
	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
	movq	%r9, %rbp
	xorl	%r9d, %r9d
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	movl	%esi, %ebx
	movl	$1, %esi
	subq	$56, %rsp
	.cfi_def_cfa_offset 112
	movl	%edi, 12(%rsp)
	movl	$134217729, %edi
	movq	112(%rsp), %r15
	salq	$5, %rdi
	movq	%rdx, 36(%rsp)
	movl	$1, 44(%rsp)
	movq	%rdi, 24(%rsp)
	movl	$1, 32(%rsp)
	call	__cudaPushCallConfiguration@PLT
	testl	%eax, %eax
	jne	.L17
	movl	12(%rsp), %edi
	movq	%rbp, %rcx
	movq	%r14, %rdx
	movl	%ebx, %esi
	call	_Z37__device_stub__Z12cumsumKerneliiPKfPfiiPKfPf
.L17:
	movl	$8388609, %edx
	movl	$1073741825, %edi
	xorl	%r9d, %r9d
	xorl	%r8d, %r8d
	salq	$9, %rdx
	salq	$5, %rdi
	movl	$1, %ecx
	movl	$1, %esi
	movq	%rdx, 36(%rsp)
	movl	$1, 44(%rsp)
	movq	%rdi, 24(%rsp)
	movl	$1, 32(%rsp)
	call	__cudaPushCallConfiguration@PLT
	testl	%eax, %eax
	jne	.L16
	movl	12(%rsp), %edi
	addq	$56, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	movq	%r15, %r9
	movq	%r13, %r8
	movq	%rbp, %rcx
	movl	%r12d, %edx
	movl	%ebx, %esi
	popq	%rbx
	.cfi_def_cfa_offset 48
	popq	%rbp
	.cfi_def_cfa_offset 40
	popq	%r12
	.cfi_def_cfa_offset 32
	popq	%r13
	.cfi_def_cfa_offset 24
	popq	%r14
	.cfi_def_cfa_offset 16
	popq	%r15
	.cfi_def_cfa_offset 8
	jmp	_Z47__device_stub__Z18binarysearchKerneliiiPKfS0_PiiiiPKfS0_Pi
.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
.LFE2009:
	.size	_Z18probsampleLauncheriiiPKfS0_PfPi, .-_Z18probsampleLauncheriiiPKfS0_PfPi
	.globl	_Z55__device_stub__Z27farthestpointsamplingKerneliiiPKfPfPiiiiPKfPfPi
	.type	_Z55__device_stub__Z27farthestpointsamplingKerneliiiPKfPfPiiiiPKfPfPi, @function
_Z55__device_stub__Z27farthestpointsamplingKerneliiiPKfPfPiiiiPKfPfPi:
.LFB2041:
	.cfi_startproc
	endbr64
	subq	$168, %rsp
	.cfi_def_cfa_offset 176
	movl	%edi, 12(%rsp)
	leaq	56(%rsp), %rdi
	movl	%esi, 8(%rsp)
	leaq	68(%rsp), %rsi
	movl	%edx, 4(%rsp)
	leaq	40(%rsp), %rdx
	movq	%fs:40, %rax
	movq	%rax, 152(%rsp)
	xorl	%eax, %eax
	leaq	12(%rsp), %rax
	movq	%rcx, 16(%rsp)
	leaq	48(%rsp), %rcx
	movq	%rax, 104(%rsp)
	leaq	8(%rsp), %rax
	movq	%rax, 112(%rsp)
	leaq	4(%rsp), %rax
	movq	%rax, 120(%rsp)
	leaq	16(%rsp), %rax
	movq	%rax, 128(%rsp)
	leaq	24(%rsp), %rax
	movq	%rax, 136(%rsp)
	leaq	32(%rsp), %rax
	movq	%rax, 144(%rsp)
	movabsq	$4294967297, %rax
	movq	%r8, 24(%rsp)
	movq	%r9, 32(%rsp)
	movq	%rax, 56(%rsp)
	movl	$1, 64(%rsp)
	movq	%rax, 68(%rsp)
	movl	$1, 76(%rsp)
	call	__cudaPopCallConfiguration@PLT
	testl	%eax, %eax
	jne	.L20
	pushq	48(%rsp)
	.cfi_def_cfa_offset 184
	leaq	_Z27farthestpointsamplingKerneliiiPKfPfPi(%rip), %rdi
	pushq	48(%rsp)
	.cfi_def_cfa_offset 192
	movq	84(%rsp), %rcx
	movl	92(%rsp), %r8d
	movq	72(%rsp), %rsi
	movl	80(%rsp), %edx
	leaq	120(%rsp), %r9
	call	cudaLaunchKernel@PLT
	popq	%rax
	.cfi_def_cfa_offset 184
	popq	%rdx
	.cfi_def_cfa_offset 176
.L20:
	movq	152(%rsp), %rax
	subq	%fs:40, %rax
	je	.L22
	call	__stack_chk_fail@PLT
.L22:
	addq	$168, %rsp
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE2041:
	.size	_Z55__device_stub__Z27farthestpointsamplingKerneliiiPKfPfPiiiiPKfPfPi, .-_Z55__device_stub__Z27farthestpointsamplingKerneliiiPKfPfPiiiiPKfPfPi
	.globl	_Z27farthestpointsamplingKerneliiiPKfPfPi
	.type	_Z27farthestpointsamplingKerneliiiPKfPfPi, @function
_Z27farthestpointsamplingKerneliiiPKfPfPi:
.LFB2042:
	.cfi_startproc
	endbr64
	jmp	_Z55__device_stub__Z27farthestpointsamplingKerneliiiPKfPfPiiiiPKfPfPi
	.cfi_endproc
.LFE2042:
	.size	_Z27farthestpointsamplingKerneliiiPKfPfPi, .-_Z27farthestpointsamplingKerneliiiPKfPfPi
	.globl	_Z29farthestpointsamplingLauncheriiiPKfPfPi
	.type	_Z29farthestpointsamplingLauncheriiiPKfPfPi, @function
_Z29farthestpointsamplingLauncheriiiPKfPfPi:
.LFB2010:
	.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
	movq	%rcx, %r13
	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
	movl	%edi, %ebx
	movl	$134217729, %edi
	salq	$5, %rdi
	subq	$40, %rsp
	.cfi_def_cfa_offset 96
	call	__cudaPushCallConfiguration@PLT
	testl	%eax, %eax
	jne	.L25
	addq	$40, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	movq	%r15, %r9
	movq	%r14, %r8
	movq	%r13, %rcx
	movl	%r12d, %edx
	movl	%ebp, %esi
	movl	%ebx, %edi
	popq	%rbx
	.cfi_def_cfa_offset 48
	popq	%rbp
	.cfi_def_cfa_offset 40
	popq	%r12
	.cfi_def_cfa_offset 32
	popq	%r13
	.cfi_def_cfa_offset 24
	popq	%r14
	.cfi_def_cfa_offset 16
	popq	%r15
	.cfi_def_cfa_offset 8
	jmp	_Z55__device_stub__Z27farthestpointsamplingKerneliiiPKfPfPiiiiPKfPfPi
.L25:
	.cfi_restore_state
	addq	$40, %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
.LFE2010:
	.size	_Z29farthestpointsamplingLauncheriiiPKfPfPi, .-_Z29farthestpointsamplingLauncheriiiPKfPfPi
	.globl	_Z46__device_stub__Z17gatherpointKerneliiiPKfPKiPfiiiPKfPKiPf
	.type	_Z46__device_stub__Z17gatherpointKerneliiiPKfPKiPfiiiPKfPKiPf, @function
_Z46__device_stub__Z17gatherpointKerneliiiPKfPKiPfiiiPKfPKiPf:
.LFB2043:
	.cfi_startproc
	endbr64
	subq	$168, %rsp
	.cfi_def_cfa_offset 176
	movl	%edi, 12(%rsp)
	leaq	56(%rsp), %rdi
	movl	%esi, 8(%rsp)
	leaq	68(%rsp), %rsi
	movl	%edx, 4(%rsp)
	leaq	40(%rsp), %rdx
	movq	%fs:40, %rax
	movq	%rax, 152(%rsp)
	xorl	%eax, %eax
	leaq	12(%rsp), %rax
	movq	%rcx, 16(%rsp)
	leaq	48(%rsp), %rcx
	movq	%rax, 104(%rsp)
	leaq	8(%rsp), %rax
	movq	%rax, 112(%rsp)
	leaq	4(%rsp), %rax
	movq	%rax, 120(%rsp)
	leaq	16(%rsp), %rax
	movq	%rax, 128(%rsp)
	leaq	24(%rsp), %rax
	movq	%rax, 136(%rsp)
	leaq	32(%rsp), %rax
	movq	%rax, 144(%rsp)
	movabsq	$4294967297, %rax
	movq	%r8, 24(%rsp)
	movq	%r9, 32(%rsp)
	movq	%rax, 56(%rsp)
	movl	$1, 64(%rsp)
	movq	%rax, 68(%rsp)
	movl	$1, 76(%rsp)
	call	__cudaPopCallConfiguration@PLT
	testl	%eax, %eax
	jne	.L28
	pushq	48(%rsp)
	.cfi_def_cfa_offset 184
	leaq	_Z17gatherpointKerneliiiPKfPKiPf(%rip), %rdi
	pushq	48(%rsp)
	.cfi_def_cfa_offset 192
	movq	84(%rsp), %rcx
	movl	92(%rsp), %r8d
	movq	72(%rsp), %rsi
	movl	80(%rsp), %edx
	leaq	120(%rsp), %r9
	call	cudaLaunchKernel@PLT
	popq	%rax
	.cfi_def_cfa_offset 184
	popq	%rdx
	.cfi_def_cfa_offset 176
.L28:
	movq	152(%rsp), %rax
	subq	%fs:40, %rax
	je	.L30
	call	__stack_chk_fail@PLT
.L30:
	addq	$168, %rsp
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE2043:
	.size	_Z46__device_stub__Z17gatherpointKerneliiiPKfPKiPfiiiPKfPKiPf, .-_Z46__device_stub__Z17gatherpointKerneliiiPKfPKiPfiiiPKfPKiPf
	.globl	_Z17gatherpointKerneliiiPKfPKiPf
	.type	_Z17gatherpointKerneliiiPKfPKiPf, @function
_Z17gatherpointKerneliiiPKfPKiPf:
.LFB2044:
	.cfi_startproc
	endbr64
	jmp	_Z46__device_stub__Z17gatherpointKerneliiiPKfPKiPfiiiPKfPKiPf
	.cfi_endproc
.LFE2044:
	.size	_Z17gatherpointKerneliiiPKfPKiPf, .-_Z17gatherpointKerneliiiPKfPKiPf
	.globl	_Z19gatherpointLauncheriiiPKfPKiPf
	.type	_Z19gatherpointLauncheriiiPKfPKiPf, @function
_Z19gatherpointLauncheriiiPKfPKiPf:
.LFB2011:
	.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
	movq	%rcx, %r13
	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
	movl	%edi, %ebx
	movabsq	$34359738370, %rdi
	subq	$40, %rsp
	.cfi_def_cfa_offset 96
	call	__cudaPushCallConfiguration@PLT
	testl	%eax, %eax
	jne	.L33
	addq	$40, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	movq	%r15, %r9
	movq	%r14, %r8
	movq	%r13, %rcx
	movl	%r12d, %edx
	movl	%ebp, %esi
	movl	%ebx, %edi
	popq	%rbx
	.cfi_def_cfa_offset 48
	popq	%rbp
	.cfi_def_cfa_offset 40
	popq	%r12
	.cfi_def_cfa_offset 32
	popq	%r13
	.cfi_def_cfa_offset 24
	popq	%r14
	.cfi_def_cfa_offset 16
	popq	%r15
	.cfi_def_cfa_offset 8
	jmp	_Z46__device_stub__Z17gatherpointKerneliiiPKfPKiPfiiiPKfPKiPf
.L33:
	.cfi_restore_state
	addq	$40, %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
.LFE2011:
	.size	_Z19gatherpointLauncheriiiPKfPKiPf, .-_Z19gatherpointLauncheriiiPKfPKiPf
	.globl	_Z50__device_stub__Z21scatteraddpointKerneliiiPKfPKiPfiiiPKfPKiPf
	.type	_Z50__device_stub__Z21scatteraddpointKerneliiiPKfPKiPfiiiPKfPKiPf, @function
_Z50__device_stub__Z21scatteraddpointKerneliiiPKfPKiPfiiiPKfPKiPf:
.LFB2045:
	.cfi_startproc
	endbr64
	subq	$168, %rsp
	.cfi_def_cfa_offset 176
	movl	%edi, 12(%rsp)
	leaq	56(%rsp), %rdi
	movl	%esi, 8(%rsp)
	leaq	68(%rsp), %rsi
	movl	%edx, 4(%rsp)
	leaq	40(%rsp), %rdx
	movq	%fs:40, %rax
	movq	%rax, 152(%rsp)
	xorl	%eax, %eax
	leaq	12(%rsp), %rax
	movq	%rcx, 16(%rsp)
	leaq	48(%rsp), %rcx
	movq	%rax, 104(%rsp)
	leaq	8(%rsp), %rax
	movq	%rax, 112(%rsp)
	leaq	4(%rsp), %rax
	movq	%rax, 120(%rsp)
	leaq	16(%rsp), %rax
	movq	%rax, 128(%rsp)
	leaq	24(%rsp), %rax
	movq	%rax, 136(%rsp)
	leaq	32(%rsp), %rax
	movq	%rax, 144(%rsp)
	movabsq	$4294967297, %rax
	movq	%r8, 24(%rsp)
	movq	%r9, 32(%rsp)
	movq	%rax, 56(%rsp)
	movl	$1, 64(%rsp)
	movq	%rax, 68(%rsp)
	movl	$1, 76(%rsp)
	call	__cudaPopCallConfiguration@PLT
	testl	%eax, %eax
	jne	.L36
	pushq	48(%rsp)
	.cfi_def_cfa_offset 184
	leaq	_Z21scatteraddpointKerneliiiPKfPKiPf(%rip), %rdi
	pushq	48(%rsp)
	.cfi_def_cfa_offset 192
	movq	84(%rsp), %rcx
	movl	92(%rsp), %r8d
	movq	72(%rsp), %rsi
	movl	80(%rsp), %edx
	leaq	120(%rsp), %r9
	call	cudaLaunchKernel@PLT
	popq	%rax
	.cfi_def_cfa_offset 184
	popq	%rdx
	.cfi_def_cfa_offset 176
.L36:
	movq	152(%rsp), %rax
	subq	%fs:40, %rax
	je	.L38
	call	__stack_chk_fail@PLT
.L38:
	addq	$168, %rsp
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE2045:
	.size	_Z50__device_stub__Z21scatteraddpointKerneliiiPKfPKiPfiiiPKfPKiPf, .-_Z50__device_stub__Z21scatteraddpointKerneliiiPKfPKiPfiiiPKfPKiPf
	.globl	_Z21scatteraddpointKerneliiiPKfPKiPf
	.type	_Z21scatteraddpointKerneliiiPKfPKiPf, @function
_Z21scatteraddpointKerneliiiPKfPKiPf:
.LFB2046:
	.cfi_startproc
	endbr64
	jmp	_Z50__device_stub__Z21scatteraddpointKerneliiiPKfPKiPfiiiPKfPKiPf
	.cfi_endproc
.LFE2046:
	.size	_Z21scatteraddpointKerneliiiPKfPKiPf, .-_Z21scatteraddpointKerneliiiPKfPKiPf
	.globl	_Z23scatteraddpointLauncheriiiPKfPKiPf
	.type	_Z23scatteraddpointLauncheriiiPKfPKiPf, @function
_Z23scatteraddpointLauncheriiiPKfPKiPf:
.LFB2012:
	.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
	movq	%rcx, %r13
	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
	movl	%edi, %ebx
	movabsq	$34359738370, %rdi
	subq	$40, %rsp
	.cfi_def_cfa_offset 96
	call	__cudaPushCallConfiguration@PLT
	testl	%eax, %eax
	jne	.L41
	addq	$40, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	movq	%r15, %r9
	movq	%r14, %r8
	movq	%r13, %rcx
	movl	%r12d, %edx
	movl	%ebp, %esi
	movl	%ebx, %edi
	popq	%rbx
	.cfi_def_cfa_offset 48
	popq	%rbp
	.cfi_def_cfa_offset 40
	popq	%r12
	.cfi_def_cfa_offset 32
	popq	%r13
	.cfi_def_cfa_offset 24
	popq	%r14
	.cfi_def_cfa_offset 16
	popq	%r15
	.cfi_def_cfa_offset 8
	jmp	_Z50__device_stub__Z21scatteraddpointKerneliiiPKfPKiPfiiiPKfPKiPf
.L41:
	.cfi_restore_state
	addq	$40, %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
.LFE2012:
	.size	_Z23scatteraddpointLauncheriiiPKfPKiPf, .-_Z23scatteraddpointLauncheriiiPKfPKiPf
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"_Z21scatteraddpointKerneliiiPKfPKiPf"
.LC1:
	.string	"_Z17gatherpointKerneliiiPKfPKiPf"
.LC2:
	.string	"_Z27farthestpointsamplingKerneliiiPKfPfPi"
.LC3:
	.string	"_Z18binarysearchKerneliiiPKfS0_Pi"
.LC4:
	.string	"_Z12cumsumKerneliiPKfPf"
	.section	.text.startup,"ax",@progbits
	.type	_ZL24__sti____cudaRegisterAllv, @function
_ZL24__sti____cudaRegisterAllv:
.LFB2048:
	.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	_Z21scatteraddpointKerneliiiPKfPKiPf(%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	_Z17gatherpointKerneliiiPKfPKiPf(%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	_Z27farthestpointsamplingKerneliiiPKfPfPi(%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	.LC3(%rip), %rdx
	orl	$-1, %r8d
	leaq	_Z18binarysearchKerneliiiPKfS0_Pi(%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	.LC4(%rip), %rdx
	orl	$-1, %r8d
	leaq	_Z12cumsumKerneliiPKfPf(%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
.LFE2048:
	.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>
/* Furthest point sampling GPU implementation
 * Original author: Haoqiang Fan
 * Modified by Charles R. Qi
 * All Rights Reserved. 2017.
 */

__global__ void cumsumKernel(int b, int n, const float* __restrict__ inp,
                             float* __restrict__ out) {
    const int BlockSize = 2048;
    const int paddingLevel = 5;
    __shared__ float buffer4[BlockSize * 4];
    __shared__ float buffer[BlockSize + (BlockSize >> paddingLevel)];
    for (int i = blockIdx.x; i < b; i += gridDim.x) {
        float runningsum = 0, runningsum2 = 0;
        for (int j = 0; j < n; j += BlockSize * 4) {
            int n24_i = min(n - j, BlockSize * 4);
            int n24 = (n24_i + 3) & ~3;
            int n2 = n24 >> 2;
            for (int k = threadIdx.x * 4; k < n24_i; k += blockDim.x * 4) {
                if (k + 3 < n24_i) {
                    float v1 = inp[i * n + j + k];
                    float v2 = inp[i * n + j + k + 1];
                    v2 += v1;
                    float v3 = inp[i * n + j + k + 2];
                    float v4 = inp[i * n + j + k + 3];
                    v4 += v3;
                    v3 += v2;
                    v4 += v2;
                    buffer4[k] = v1;
                    buffer4[k + 1] = v2;
                    buffer4[k + 2] = v3;
                    buffer4[k + 3] = v4;
                    buffer[(k >> 2) + (k >> (2 + paddingLevel))] = v4;
                } else {
                    float v = 0;
                    for (int k2 = k; k2 < n24_i; k2++) {
                        v += inp[i * n + j + k2];
                        buffer4[k2] = v;
                    }
                    for (int k2 = n24_i; k2 < n24; k2++) {
                        buffer4[k2] = v;
                    }
                    buffer[(k >> 2) + (k >> (2 + paddingLevel))] = v;
                }
            }
            int u = 0;
            for (; (2 << u) <= n2; u++) {
                __syncthreads();
                for (int k = threadIdx.x; k < int(n2 >> (u + 1));
                     k += blockDim.x) {
                    int i1 = (((k << 1) + 2) << u) - 1;
                    int i2 = (((k << 1) + 1) << u) - 1;
                    i1 += i1 >> paddingLevel;
                    i2 += i2 >> paddingLevel;
                    buffer[i1] += buffer[i2];
                }
            }
            u--;
            for (; u >= 0; u--) {
                __syncthreads();
                for (int k = threadIdx.x; k < int((n2 - (1 << u)) >> (u + 1));
                     k += blockDim.x) {
                    int i1 = (((k << 1) + 3) << u) - 1;
                    int i2 = (((k << 1) + 2) << u) - 1;
                    i1 += i1 >> paddingLevel;
                    i2 += i2 >> paddingLevel;
                    buffer[i1] += buffer[i2];
                }
            }
            __syncthreads();
            for (int k = threadIdx.x * 4; k < n24; k += blockDim.x * 4) {
                if (k != 0) {
                    int k2 = ((k >> 2) - 1) + (((k >> 2) - 1) >> paddingLevel);
                    buffer4[k] += buffer[k2];
                    buffer4[k + 1] += buffer[k2];
                    buffer4[k + 2] += buffer[k2];
                    buffer4[k + 3] += buffer[k2];
                }
            }
            __syncthreads();
            for (int k = threadIdx.x; k < n24_i; k += blockDim.x) {
                out[i * n + j + k] = buffer4[k] + runningsum;
            }
            float t =
                buffer[(n2 - 1) + ((n2 - 1) >> paddingLevel)] + runningsum2;
            float r2 = runningsum + t;
            runningsum2 = t - (r2 - runningsum);
            runningsum = r2;
            __syncthreads();
        }
    }
}

__global__ void binarysearchKernel(int b, int n, int m,
                                   const float* __restrict__ dataset,
                                   const float* __restrict__ query,
                                   int* __restrict__ result) {
    int base = 1;
    while (base < n) base <<= 1;
    for (int i = blockIdx.x; i < b; i += gridDim.x) {
        for (int j = blockIdx.y * blockDim.x + threadIdx.x; j < m;
             j += blockDim.x * gridDim.y) {
            float q = query[i * m + j] * dataset[i * n + n - 1];
            int r = n - 1;
            for (int k = base; k >= 1; k >>= 1)
                if (r >= k && dataset[i * n + r - k] >= q) r -= k;
            result[i * m + j] = r;
        }
    }
}
__global__ void farthestpointsamplingKernel(int b, int n, int m,
                                            const float* __restrict__ dataset,
                                            float* __restrict__ temp,
                                            int* __restrict__ idxs) {
    if (m <= 0) return;
    const int BlockSize = 512;
    __shared__ float dists[BlockSize];
    __shared__ int dists_i[BlockSize];
    const int BufferSize = 3072;
    __shared__ float buf[BufferSize * 3];
    for (int i = blockIdx.x; i < b; i += gridDim.x) {
        int old = 0;
        if (threadIdx.x == 0) idxs[i * m + 0] = old;
        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) * 3; j += blockDim.x) {
            buf[j] = dataset[i * n * 3 + j];
        }
        __syncthreads();
        for (int j = 1; j < m; j++) {
            int besti = 0;
            float best = -1;
            float x1 = dataset[i * n * 3 + old * 3 + 0];
            float y1 = dataset[i * n * 3 + old * 3 + 1];
            float z1 = dataset[i * n * 3 + old * 3 + 2];
            for (int k = threadIdx.x; k < n; k += blockDim.x) {
                float td = temp[blockIdx.x * n + k];
                float x2, y2, z2;
                if (k < BufferSize) {
                    x2 = buf[k * 3 + 0];
                    y2 = buf[k * 3 + 1];
                    z2 = buf[k * 3 + 2];
                } else {
                    x2 = dataset[i * n * 3 + k * 3 + 0];
                    y2 = dataset[i * n * 3 + k * 3 + 1];
                    z2 = dataset[i * n * 3 + k * 3 + 2];
                }
                float d = (x2 - x1) * (x2 - x1) + (y2 - y1) * (y2 - y1) +
                          (z2 - z1) * (z2 - z1);
                float d2 = min(d, td);
                if (d2 != td) temp[blockIdx.x * n + k] = d2;
                if (d2 > best) {
                    best = d2;
                    besti = k;
                }
            }
            dists[threadIdx.x] = best;
            dists_i[threadIdx.x] = besti;
            for (int u = 0; (1 << u) < blockDim.x; u++) {
                __syncthreads();
                if (threadIdx.x < (blockDim.x >> (u + 1))) {
                    int i1 = (threadIdx.x * 2) << u;
                    int i2 = (threadIdx.x * 2 + 1) << u;
                    if (dists[i1] < dists[i2]) {
                        dists[i1] = dists[i2];
                        dists_i[i1] = dists_i[i2];
                    }
                }
            }
            __syncthreads();
            old = dists_i[0];
            if (threadIdx.x == 0) idxs[i * m + j] = old;
        }
    }
}

__global__ void gatherpointKernel(int b, int n, int m,
                                  const float* __restrict__ inp,
                                  const int* __restrict__ idx,
                                  float* __restrict__ out) {
    for (int i = blockIdx.x; i < b; i += gridDim.x) {
        for (int j = blockIdx.y * blockDim.x + threadIdx.x; j < m;
             j += blockDim.x * gridDim.y) {
            int a = idx[i * m + j];
            out[(i * m + j) * 3 + 0] = inp[(i * n + a) * 3 + 0];
            out[(i * m + j) * 3 + 1] = inp[(i * n + a) * 3 + 1];
            out[(i * m + j) * 3 + 2] = inp[(i * n + a) * 3 + 2];
        }
    }
}

__global__ void scatteraddpointKernel(int b, int n, int m,
                                      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 = blockIdx.y * blockDim.x + threadIdx.x; j < m;
             j += blockDim.x * gridDim.y) {
            int a = idx[i * m + j];
            atomicAdd(&inp_g[(i * n + a) * 3 + 0], out_g[(i * m + j) * 3 + 0]);
            atomicAdd(&inp_g[(i * n + a) * 3 + 1], out_g[(i * m + j) * 3 + 1]);
            atomicAdd(&inp_g[(i * n + a) * 3 + 2], out_g[(i * m + j) * 3 + 2]);
        }
    }
}

void cumsumLauncher(int b, int n, const float* inp, float* out) {
    cumsumKernel<<<32, 512>>>(b, n, inp, out);
}
// require b*n working space
void probsampleLauncher(int b, int n, int m, const float* inp_p,
                        const float* inp_r, float* temp, int* out) {
    cumsumKernel<<<32, 512>>>(b, n, inp_p, temp);
    binarysearchKernel<<<dim3(32, 8, 1), 512>>>(b, n, m, temp, inp_r, out);
}
// require 32*n working space
void farthestpointsamplingLauncher(int b, int n, int m, const float* inp,
                                   float* temp, int* out) {
    farthestpointsamplingKernel<<<32, 512>>>(b, n, m, inp, temp, out);
}
void gatherpointLauncher(int b, int n, int m, const float* inp, const int* idx,
                         float* out) {
    gatherpointKernel<<<dim3(2, 8, 1), 512>>>(b, n, m, inp, idx, out);
}
void scatteraddpointLauncher(int b, int n, int m, const float* out_g,
                             const int* idx, float* inp_g) {
    scatteraddpointKernel<<<dim3(2, 8, 1), 512>>>(b, n, m, out_g, idx, inp_g);
}

	.text
	.file	"tf_sampling.hip"
	.globl	_Z27__device_stub__cumsumKerneliiPKfPf # -- Begin function _Z27__device_stub__cumsumKerneliiPKfPf
	.type	_Z27__device_stub__cumsumKerneliiPKfPf,@function
_Z27__device_stub__cumsumKerneliiPKfPf: # @_Z27__device_stub__cumsumKerneliiPKfPf
	.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	$112, %rsp
	.cfi_def_cfa_offset 160
	.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	40(%rsp), %rsi
	movq	%rdx, (%rsi)
	leaq	32(%rsp), %rdx
	movq	%rcx, (%rdx)
	leaq	80(%rsp), %rbx
	movq	%rax, (%rbx)
	movq	%rdi, 8(%rbx)
	movq	%rsi, 16(%rbx)
	movq	%rdx, 24(%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	$_Z12cumsumKerneliiPKfPf, %edi
	movq	%rbx, %r9
	pushq	(%r13)
	.cfi_adjust_cfa_offset 8
	pushq	(%r12)
	.cfi_adjust_cfa_offset 8
	callq	hipLaunchKernel
	addq	$128, %rsp
	.cfi_adjust_cfa_offset -128
	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	_Z27__device_stub__cumsumKerneliiPKfPf, .Lfunc_end0-_Z27__device_stub__cumsumKerneliiPKfPf
	.cfi_endproc
                                        # -- End function
	.globl	_Z33__device_stub__binarysearchKerneliiiPKfS0_Pi # -- Begin function _Z33__device_stub__binarysearchKerneliiiPKfS0_Pi
	.type	_Z33__device_stub__binarysearchKerneliiiPKfS0_Pi,@function
_Z33__device_stub__binarysearchKerneliiiPKfS0_Pi: # @_Z33__device_stub__binarysearchKerneliiiPKfS0_Pi
	.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	20(%rsp), %rax
	movl	%edi, (%rax)
	leaq	16(%rsp), %rdi
	movl	%esi, (%rdi)
	leaq	12(%rsp), %rsi
	movl	%edx, (%rsi)
	leaq	56(%rsp), %rdx
	movq	%rcx, (%rdx)
	leaq	48(%rsp), %rcx
	movq	%r8, (%rcx)
	leaq	40(%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	80(%rsp), %r14
	leaq	64(%rsp), %r15
	leaq	32(%rsp), %r12
	leaq	24(%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	$_Z18binarysearchKerneliiiPKfS0_Pi, %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_end1:
	.size	_Z33__device_stub__binarysearchKerneliiiPKfS0_Pi, .Lfunc_end1-_Z33__device_stub__binarysearchKerneliiiPKfS0_Pi
	.cfi_endproc
                                        # -- End function
	.globl	_Z42__device_stub__farthestpointsamplingKerneliiiPKfPfPi # -- Begin function _Z42__device_stub__farthestpointsamplingKerneliiiPKfPfPi
	.type	_Z42__device_stub__farthestpointsamplingKerneliiiPKfPfPi,@function
_Z42__device_stub__farthestpointsamplingKerneliiiPKfPfPi: # @_Z42__device_stub__farthestpointsamplingKerneliiiPKfPfPi
	.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	20(%rsp), %rax
	movl	%edi, (%rax)
	leaq	16(%rsp), %rdi
	movl	%esi, (%rdi)
	leaq	12(%rsp), %rsi
	movl	%edx, (%rsi)
	leaq	56(%rsp), %rdx
	movq	%rcx, (%rdx)
	leaq	48(%rsp), %rcx
	movq	%r8, (%rcx)
	leaq	40(%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	80(%rsp), %r14
	leaq	64(%rsp), %r15
	leaq	32(%rsp), %r12
	leaq	24(%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	$_Z27farthestpointsamplingKerneliiiPKfPfPi, %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	_Z42__device_stub__farthestpointsamplingKerneliiiPKfPfPi, .Lfunc_end2-_Z42__device_stub__farthestpointsamplingKerneliiiPKfPfPi
	.cfi_endproc
                                        # -- End function
	.globl	_Z32__device_stub__gatherpointKerneliiiPKfPKiPf # -- Begin function _Z32__device_stub__gatherpointKerneliiiPKfPKiPf
	.type	_Z32__device_stub__gatherpointKerneliiiPKfPKiPf,@function
_Z32__device_stub__gatherpointKerneliiiPKfPKiPf: # @_Z32__device_stub__gatherpointKerneliiiPKfPKiPf
	.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	20(%rsp), %rax
	movl	%edi, (%rax)
	leaq	16(%rsp), %rdi
	movl	%esi, (%rdi)
	leaq	12(%rsp), %rsi
	movl	%edx, (%rsi)
	leaq	56(%rsp), %rdx
	movq	%rcx, (%rdx)
	leaq	48(%rsp), %rcx
	movq	%r8, (%rcx)
	leaq	40(%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	80(%rsp), %r14
	leaq	64(%rsp), %r15
	leaq	32(%rsp), %r12
	leaq	24(%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	$_Z17gatherpointKerneliiiPKfPKiPf, %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_end3:
	.size	_Z32__device_stub__gatherpointKerneliiiPKfPKiPf, .Lfunc_end3-_Z32__device_stub__gatherpointKerneliiiPKfPKiPf
	.cfi_endproc
                                        # -- End function
	.globl	_Z36__device_stub__scatteraddpointKerneliiiPKfPKiPf # -- Begin function _Z36__device_stub__scatteraddpointKerneliiiPKfPKiPf
	.type	_Z36__device_stub__scatteraddpointKerneliiiPKfPKiPf,@function
_Z36__device_stub__scatteraddpointKerneliiiPKfPKiPf: # @_Z36__device_stub__scatteraddpointKerneliiiPKfPKiPf
	.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	20(%rsp), %rax
	movl	%edi, (%rax)
	leaq	16(%rsp), %rdi
	movl	%esi, (%rdi)
	leaq	12(%rsp), %rsi
	movl	%edx, (%rsi)
	leaq	56(%rsp), %rdx
	movq	%rcx, (%rdx)
	leaq	48(%rsp), %rcx
	movq	%r8, (%rcx)
	leaq	40(%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	80(%rsp), %r14
	leaq	64(%rsp), %r15
	leaq	32(%rsp), %r12
	leaq	24(%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	$_Z21scatteraddpointKerneliiiPKfPKiPf, %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	_Z36__device_stub__scatteraddpointKerneliiiPKfPKiPf, .Lfunc_end4-_Z36__device_stub__scatteraddpointKerneliiiPKfPKiPf
	.cfi_endproc
                                        # -- End function
	.globl	_Z14cumsumLauncheriiPKfPf       # -- Begin function _Z14cumsumLauncheriiPKfPf
	.type	_Z14cumsumLauncheriiPKfPf,@function
_Z14cumsumLauncheriiPKfPf:              # @_Z14cumsumLauncheriiPKfPf
	.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	%rbx
	.cfi_def_cfa_offset 40
	pushq	%rax
	.cfi_def_cfa_offset 48
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	.cfi_offset %rbp, -16
	movq	%rcx, %rbx
	movq	%rdx, %r14
	movl	%esi, %ebp
	movl	%edi, %r15d
	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 40
	popq	%rbx
	.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 48
	movl	%r15d, %edi
	movl	%ebp, %esi
	movq	%r14, %rdx
	movq	%rbx, %rcx
	addq	$8, %rsp
	.cfi_def_cfa_offset 40
	popq	%rbx
	.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	_Z27__device_stub__cumsumKerneliiPKfPf # TAILCALL
.Lfunc_end5:
	.size	_Z14cumsumLauncheriiPKfPf, .Lfunc_end5-_Z14cumsumLauncheriiPKfPf
	.cfi_endproc
                                        # -- End function
	.globl	_Z18probsampleLauncheriiiPKfS0_PfPi # -- Begin function _Z18probsampleLauncheriiiPKfS0_PfPi
	.type	_Z18probsampleLauncheriiiPKfS0_PfPi,@function
_Z18probsampleLauncheriiiPKfS0_PfPi:    # @_Z18probsampleLauncheriiiPKfS0_PfPi
	.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	$24, %rsp
	.cfi_def_cfa_offset 80
	.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, %r14
	movq	%r8, 16(%rsp)                   # 8-byte Spill
	movq	%rcx, %r15
	movl	%edx, %ebp
	movl	%esi, %r12d
	movl	%edi, %r13d
	movq	80(%rsp), %rax
	movq	%rax, 8(%rsp)                   # 8-byte Spill
	movabsq	$4294967808, %rbx               # imm = 0x100000200
	leaq	-480(%rbx), %rdi
	movl	$1, %esi
	movq	%rbx, %rdx
	movl	$1, %ecx
	xorl	%r8d, %r8d
	xorl	%r9d, %r9d
	callq	__hipPushCallConfiguration
	testl	%eax, %eax
	jne	.LBB6_2
# %bb.1:
	movl	%r13d, %edi
	movl	%r12d, %esi
	movq	%r15, %rdx
	movq	%r14, %rcx
	callq	_Z27__device_stub__cumsumKerneliiPKfPf
.LBB6_2:
	movabsq	$34359738400, %rdi              # imm = 0x800000020
	movl	$1, %esi
	movq	%rbx, %rdx
	movl	$1, %ecx
	xorl	%r8d, %r8d
	xorl	%r9d, %r9d
	callq	__hipPushCallConfiguration
	testl	%eax, %eax
	je	.LBB6_4
# %bb.3:
	addq	$24, %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
.LBB6_4:
	.cfi_def_cfa_offset 80
	movl	%r13d, %edi
	movl	%r12d, %esi
	movl	%ebp, %edx
	movq	%r14, %rcx
	movq	16(%rsp), %r8                   # 8-byte Reload
	movq	8(%rsp), %r9                    # 8-byte Reload
	addq	$24, %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	_Z33__device_stub__binarysearchKerneliiiPKfS0_Pi # TAILCALL
.Lfunc_end6:
	.size	_Z18probsampleLauncheriiiPKfS0_PfPi, .Lfunc_end6-_Z18probsampleLauncheriiiPKfS0_PfPi
	.cfi_endproc
                                        # -- End function
	.globl	_Z29farthestpointsamplingLauncheriiiPKfPfPi # -- Begin function _Z29farthestpointsamplingLauncheriiiPKfPfPi
	.type	_Z29farthestpointsamplingLauncheriiiPKfPfPi,@function
_Z29farthestpointsamplingLauncheriiiPKfPfPi: # @_Z29farthestpointsamplingLauncheriiiPKfPfPi
	.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
	movq	%rcx, %r15
	movl	%edx, %ebp
	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	.LBB7_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
.LBB7_2:
	.cfi_def_cfa_offset 64
	movl	%r13d, %edi
	movl	%r12d, %esi
	movl	%ebp, %edx
	movq	%r15, %rcx
	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	_Z42__device_stub__farthestpointsamplingKerneliiiPKfPfPi # TAILCALL
.Lfunc_end7:
	.size	_Z29farthestpointsamplingLauncheriiiPKfPfPi, .Lfunc_end7-_Z29farthestpointsamplingLauncheriiiPKfPfPi
	.cfi_endproc
                                        # -- End function
	.globl	_Z19gatherpointLauncheriiiPKfPKiPf # -- Begin function _Z19gatherpointLauncheriiiPKfPKiPf
	.type	_Z19gatherpointLauncheriiiPKfPKiPf,@function
_Z19gatherpointLauncheriiiPKfPKiPf:     # @_Z19gatherpointLauncheriiiPKfPKiPf
	.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
	movq	%rcx, %r15
	movl	%edx, %ebp
	movl	%esi, %r12d
	movl	%edi, %r13d
	movabsq	$34359738370, %rdi              # imm = 0x800000002
	movabsq	$4294967808, %rdx               # imm = 0x100000200
	movl	$1, %esi
	movl	$1, %ecx
	xorl	%r8d, %r8d
	xorl	%r9d, %r9d
	callq	__hipPushCallConfiguration
	testl	%eax, %eax
	je	.LBB8_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
.LBB8_2:
	.cfi_def_cfa_offset 64
	movl	%r13d, %edi
	movl	%r12d, %esi
	movl	%ebp, %edx
	movq	%r15, %rcx
	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	_Z32__device_stub__gatherpointKerneliiiPKfPKiPf # TAILCALL
.Lfunc_end8:
	.size	_Z19gatherpointLauncheriiiPKfPKiPf, .Lfunc_end8-_Z19gatherpointLauncheriiiPKfPKiPf
	.cfi_endproc
                                        # -- End function
	.globl	_Z23scatteraddpointLauncheriiiPKfPKiPf # -- Begin function _Z23scatteraddpointLauncheriiiPKfPKiPf
	.type	_Z23scatteraddpointLauncheriiiPKfPKiPf,@function
_Z23scatteraddpointLauncheriiiPKfPKiPf: # @_Z23scatteraddpointLauncheriiiPKfPKiPf
	.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
	movq	%rcx, %r15
	movl	%edx, %ebp
	movl	%esi, %r12d
	movl	%edi, %r13d
	movabsq	$34359738370, %rdi              # imm = 0x800000002
	movabsq	$4294967808, %rdx               # imm = 0x100000200
	movl	$1, %esi
	movl	$1, %ecx
	xorl	%r8d, %r8d
	xorl	%r9d, %r9d
	callq	__hipPushCallConfiguration
	testl	%eax, %eax
	je	.LBB9_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
.LBB9_2:
	.cfi_def_cfa_offset 64
	movl	%r13d, %edi
	movl	%r12d, %esi
	movl	%ebp, %edx
	movq	%r15, %rcx
	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__scatteraddpointKerneliiiPKfPKiPf # TAILCALL
.Lfunc_end9:
	.size	_Z23scatteraddpointLauncheriiiPKfPKiPf, .Lfunc_end9-_Z23scatteraddpointLauncheriiiPKfPKiPf
	.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	.LBB10_2
# %bb.1:
	movl	$__hip_fatbin_wrapper, %edi
	callq	__hipRegisterFatBinary
	movq	%rax, %rbx
	movq	%rax, __hip_gpubin_handle(%rip)
.LBB10_2:
	xorps	%xmm0, %xmm0
	movups	%xmm0, 16(%rsp)
	movups	%xmm0, (%rsp)
	movl	$_Z12cumsumKerneliiPKfPf, %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	$_Z18binarysearchKerneliiiPKfS0_Pi, %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	$_Z27farthestpointsamplingKerneliiiPKfPfPi, %esi
	movl	$.L__unnamed_3, %edx
	movl	$.L__unnamed_3, %ecx
	movq	%rbx, %rdi
	movl	$-1, %r8d
	xorl	%r9d, %r9d
	callq	__hipRegisterFunction
	xorps	%xmm0, %xmm0
	movups	%xmm0, 16(%rsp)
	movups	%xmm0, (%rsp)
	movl	$_Z17gatherpointKerneliiiPKfPKiPf, %esi
	movl	$.L__unnamed_4, %edx
	movl	$.L__unnamed_4, %ecx
	movq	%rbx, %rdi
	movl	$-1, %r8d
	xorl	%r9d, %r9d
	callq	__hipRegisterFunction
	xorps	%xmm0, %xmm0
	movups	%xmm0, 16(%rsp)
	movups	%xmm0, (%rsp)
	movl	$_Z21scatteraddpointKerneliiiPKfPKiPf, %esi
	movl	$.L__unnamed_5, %edx
	movl	$.L__unnamed_5, %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_end10:
	.size	__hip_module_ctor, .Lfunc_end10-__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	.LBB11_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
.LBB11_2:
	retq
.Lfunc_end11:
	.size	__hip_module_dtor, .Lfunc_end11-__hip_module_dtor
	.cfi_endproc
                                        # -- End function
	.type	_Z12cumsumKerneliiPKfPf,@object # @_Z12cumsumKerneliiPKfPf
	.section	.rodata,"a",@progbits
	.globl	_Z12cumsumKerneliiPKfPf
	.p2align	3, 0x0
_Z12cumsumKerneliiPKfPf:
	.quad	_Z27__device_stub__cumsumKerneliiPKfPf
	.size	_Z12cumsumKerneliiPKfPf, 8

	.type	_Z18binarysearchKerneliiiPKfS0_Pi,@object # @_Z18binarysearchKerneliiiPKfS0_Pi
	.globl	_Z18binarysearchKerneliiiPKfS0_Pi
	.p2align	3, 0x0
_Z18binarysearchKerneliiiPKfS0_Pi:
	.quad	_Z33__device_stub__binarysearchKerneliiiPKfS0_Pi
	.size	_Z18binarysearchKerneliiiPKfS0_Pi, 8

	.type	_Z27farthestpointsamplingKerneliiiPKfPfPi,@object # @_Z27farthestpointsamplingKerneliiiPKfPfPi
	.globl	_Z27farthestpointsamplingKerneliiiPKfPfPi
	.p2align	3, 0x0
_Z27farthestpointsamplingKerneliiiPKfPfPi:
	.quad	_Z42__device_stub__farthestpointsamplingKerneliiiPKfPfPi
	.size	_Z27farthestpointsamplingKerneliiiPKfPfPi, 8

	.type	_Z17gatherpointKerneliiiPKfPKiPf,@object # @_Z17gatherpointKerneliiiPKfPKiPf
	.globl	_Z17gatherpointKerneliiiPKfPKiPf
	.p2align	3, 0x0
_Z17gatherpointKerneliiiPKfPKiPf:
	.quad	_Z32__device_stub__gatherpointKerneliiiPKfPKiPf
	.size	_Z17gatherpointKerneliiiPKfPKiPf, 8

	.type	_Z21scatteraddpointKerneliiiPKfPKiPf,@object # @_Z21scatteraddpointKerneliiiPKfPKiPf
	.globl	_Z21scatteraddpointKerneliiiPKfPKiPf
	.p2align	3, 0x0
_Z21scatteraddpointKerneliiiPKfPKiPf:
	.quad	_Z36__device_stub__scatteraddpointKerneliiiPKfPKiPf
	.size	_Z21scatteraddpointKerneliiiPKfPKiPf, 8

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

	.type	.L__unnamed_2,@object           # @1
.L__unnamed_2:
	.asciz	"_Z18binarysearchKerneliiiPKfS0_Pi"
	.size	.L__unnamed_2, 34

	.type	.L__unnamed_3,@object           # @2
.L__unnamed_3:
	.asciz	"_Z27farthestpointsamplingKerneliiiPKfPfPi"
	.size	.L__unnamed_3, 42

	.type	.L__unnamed_4,@object           # @3
.L__unnamed_4:
	.asciz	"_Z17gatherpointKerneliiiPKfPKiPf"
	.size	.L__unnamed_4, 33

	.type	.L__unnamed_5,@object           # @4
.L__unnamed_5:
	.asciz	"_Z21scatteraddpointKerneliiiPKfPKiPf"
	.size	.L__unnamed_5, 37

	.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 _Z27__device_stub__cumsumKerneliiPKfPf
	.addrsig_sym _Z33__device_stub__binarysearchKerneliiiPKfS0_Pi
	.addrsig_sym _Z42__device_stub__farthestpointsamplingKerneliiiPKfPfPi
	.addrsig_sym _Z32__device_stub__gatherpointKerneliiiPKfPKiPf
	.addrsig_sym _Z36__device_stub__scatteraddpointKerneliiiPKfPKiPf
	.addrsig_sym __hip_module_ctor
	.addrsig_sym __hip_module_dtor
	.addrsig_sym _Z12cumsumKerneliiPKfPf
	.addrsig_sym _Z18binarysearchKerneliiiPKfS0_Pi
	.addrsig_sym _Z27farthestpointsamplingKerneliiiPKfPfPi
	.addrsig_sym _Z17gatherpointKerneliiiPKfPKiPf
	.addrsig_sym _Z21scatteraddpointKerneliiiPKfPKiPf
	.addrsig_sym __hip_fatbin
	.addrsig_sym __hip_fatbin_wrapper
	.addrsig_sym __hip_cuid_

	.text
	.amdgcn_target "amdgcn-amd-amdhsa--gfx1100"
	.protected	_Z12cumsumKerneliiPKfPf ; -- Begin function _Z12cumsumKerneliiPKfPf
	.globl	_Z12cumsumKerneliiPKfPf
	.p2align	8
	.type	_Z12cumsumKerneliiPKfPf,@function
_Z12cumsumKerneliiPKfPf:                ; @_Z12cumsumKerneliiPKfPf
; %bb.0:
	s_load_b64 s[2:3], s[0:1], 0x0
	s_waitcnt lgkmcnt(0)
	s_cmp_ge_i32 s15, s2
	s_cbranch_scc1 .LBB0_39
; %bb.1:                                ; %.preheader166.lr.ph
	s_clause 0x1
	s_load_b32 s10, s[0:1], 0x18
	s_load_b128 s[4:7], s[0:1], 0x8
	v_lshlrev_b32_e32 v7, 2, v0
	v_lshlrev_b32_e32 v1, 1, v0
	s_mul_i32 s11, s15, s3
	s_cmp_gt_i32 s3, 0
	v_lshlrev_b32_e32 v9, 4, v0
	v_add_nc_u32_e32 v8, s11, v7
	v_or_b32_e32 v10, 1, v1
	v_add_nc_u32_e32 v11, 2, v1
	s_cselect_b32 s12, -1, 0
	s_add_u32 s8, s0, 24
	s_addc_u32 s9, s1, 0
	s_waitcnt lgkmcnt(0)
	s_mul_i32 s1, s10, s3
.LBB0_2:                                ; %.preheader166
                                        ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_4 Depth 2
                                        ;       Child Loop BB0_6 Depth 3
                                        ;         Child Loop BB0_8 Depth 4
                                        ;         Child Loop BB0_10 Depth 4
                                        ;       Child Loop BB0_16 Depth 3
                                        ;         Child Loop BB0_18 Depth 4
                                        ;       Child Loop BB0_23 Depth 3
                                        ;         Child Loop BB0_25 Depth 4
                                        ;       Child Loop BB0_30 Depth 3
                                        ;       Child Loop BB0_36 Depth 3
	s_and_not1_b32 vcc_lo, exec_lo, s12
	s_cbranch_vccnz .LBB0_38
; %bb.3:                                ; %.lr.ph202
                                        ;   in Loop: Header=BB0_2 Depth=1
	v_dual_mov_b32 v13, 0 :: v_dual_mov_b32 v12, v8
	v_mov_b32_e32 v14, 0
	s_mul_i32 s13, s15, s3
	s_mov_b32 s14, 0
	s_mov_b32 s16, s11
	s_mov_b32 s17, s3
.LBB0_4:                                ;   Parent Loop BB0_2 Depth=1
                                        ; =>  This Loop Header: Depth=2
                                        ;       Child Loop BB0_6 Depth 3
                                        ;         Child Loop BB0_8 Depth 4
                                        ;         Child Loop BB0_10 Depth 4
                                        ;       Child Loop BB0_16 Depth 3
                                        ;         Child Loop BB0_18 Depth 4
                                        ;       Child Loop BB0_23 Depth 3
                                        ;         Child Loop BB0_25 Depth 4
                                        ;       Child Loop BB0_30 Depth 3
                                        ;       Child Loop BB0_36 Depth 3
	s_sub_i32 s19, s3, s14
	s_mov_b32 s22, exec_lo
	s_min_i32 s18, s19, 0x2000
	s_delay_alu instid0(SALU_CYCLE_1) | instskip(NEXT) | instid1(SALU_CYCLE_1)
	s_add_i32 s21, s18, 3
	s_and_b32 s20, s21, -4
	v_cmpx_gt_i32_e64 s18, v7
	s_cbranch_execz .LBB0_14
; %bb.5:                                ; %.lr.ph174
                                        ;   in Loop: Header=BB0_4 Depth=2
	s_load_b32 s0, s[8:9], 0xc
	s_min_i32 s24, s17, 0x2000
	s_add_i32 s23, s14, s13
	s_lshl_b32 s24, s24, 2
	s_cmp_lt_i32 s18, s20
	v_dual_mov_b32 v15, v9 :: v_dual_mov_b32 v16, v7
	v_mov_b32_e32 v5, v12
	s_cselect_b32 s25, -1, 0
	s_mov_b32 s28, 0
	s_waitcnt lgkmcnt(0)
	s_and_b32 s0, s0, 0xffff
	s_delay_alu instid0(SALU_CYCLE_1)
	s_lshl_b32 s26, s0, 2
	s_lshl_b32 s27, s0, 4
.LBB0_6:                                ;   Parent Loop BB0_2 Depth=1
                                        ;     Parent Loop BB0_4 Depth=2
                                        ; =>    This Loop Header: Depth=3
                                        ;         Child Loop BB0_8 Depth 4
                                        ;         Child Loop BB0_10 Depth 4
	v_or_b32_e32 v1, 3, v16
                                        ; implicit-def: $vgpr4
	s_mov_b32 s0, exec_lo
	s_delay_alu instid0(VALU_DEP_1)
	v_cmpx_le_i32_e64 s18, v1
	s_xor_b32 s29, exec_lo, s0
	s_cbranch_execz .LBB0_11
; %bb.7:                                ; %.lr.ph.preheader
                                        ;   in Loop: Header=BB0_6 Depth=3
	v_ashrrev_i32_e32 v6, 31, v5
	v_dual_mov_b32 v4, 0 :: v_dual_mov_b32 v3, v15
	s_mov_b32 s30, 0
	s_delay_alu instid0(VALU_DEP_2) | instskip(SKIP_1) | instid1(VALU_DEP_2)
	v_lshlrev_b64 v[1:2], 2, v[5:6]
	v_mov_b32_e32 v6, v16
	v_add_co_u32 v1, vcc_lo, s4, v1
	s_delay_alu instid0(VALU_DEP_3)
	v_add_co_ci_u32_e32 v2, vcc_lo, s5, v2, vcc_lo
.LBB0_8:                                ; %.lr.ph
                                        ;   Parent Loop BB0_2 Depth=1
                                        ;     Parent Loop BB0_4 Depth=2
                                        ;       Parent Loop BB0_6 Depth=3
                                        ; =>      This Inner Loop Header: Depth=4
	global_load_b32 v17, v[1:2], off
	v_add_nc_u32_e32 v6, 1, v6
	v_add_co_u32 v1, vcc_lo, v1, 4
	v_add_co_ci_u32_e32 v2, vcc_lo, 0, v2, vcc_lo
	s_delay_alu instid0(VALU_DEP_3) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_cmp_le_i32_e64 s0, s18, v6
	s_or_b32 s30, s0, s30
	s_waitcnt vmcnt(0)
	v_add_f32_e32 v4, v4, v17
	ds_store_b32 v3, v4
	v_add_nc_u32_e32 v3, 4, v3
	s_and_not1_b32 exec_lo, exec_lo, s30
	s_cbranch_execnz .LBB0_8
; %bb.9:                                ; %.preheader
                                        ;   in Loop: Header=BB0_6 Depth=3
	s_or_b32 exec_lo, exec_lo, s30
	s_delay_alu instid0(SALU_CYCLE_1)
	s_and_not1_b32 vcc_lo, exec_lo, s25
	s_mov_b32 s0, s24
	s_mov_b32 s30, s18
	s_cbranch_vccnz .LBB0_11
.LBB0_10:                               ; %.lr.ph170
                                        ;   Parent Loop BB0_2 Depth=1
                                        ;     Parent Loop BB0_4 Depth=2
                                        ;       Parent Loop BB0_6 Depth=3
                                        ; =>      This Inner Loop Header: Depth=4
	v_mov_b32_e32 v1, s0
	s_add_i32 s30, s30, 1
	s_add_i32 s0, s0, 4
	s_cmp_lt_i32 s30, s20
	ds_store_b32 v1, v4
	s_cbranch_scc1 .LBB0_10
.LBB0_11:                               ; %Flow272
                                        ;   in Loop: Header=BB0_6 Depth=3
	s_and_not1_saveexec_b32 s0, s29
	s_cbranch_execz .LBB0_13
; %bb.12:                               ;   in Loop: Header=BB0_6 Depth=3
	v_add_nc_u32_e32 v1, s23, v16
	v_lshlrev_b32_e32 v6, 2, v16
	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, s4, v1
	v_add_co_ci_u32_e32 v2, vcc_lo, s5, v2, vcc_lo
	global_load_b128 v[1:4], v[1:2], off
	s_waitcnt vmcnt(0)
	v_add_f32_e32 v2, v1, v2
	v_add_f32_e32 v4, v3, v4
	s_delay_alu instid0(VALU_DEP_1)
	v_dual_add_f32 v3, v3, v2 :: v_dual_add_f32 v4, v2, v4
	ds_store_b128 v6, v[1:4]
.LBB0_13:                               ; %._crit_edge
                                        ;   in Loop: Header=BB0_6 Depth=3
	s_or_b32 exec_lo, exec_lo, s0
	v_lshrrev_b32_e32 v1, 2, v16
	v_ashrrev_i32_e32 v2, 7, v16
	v_add_nc_u32_e32 v16, s26, v16
	v_add_nc_u32_e32 v5, s26, v5
	v_add_nc_u32_e32 v15, s27, v15
	s_delay_alu instid0(VALU_DEP_4) | instskip(NEXT) | instid1(VALU_DEP_4)
	v_add_lshl_u32 v1, v1, v2, 2
	v_cmp_le_i32_e32 vcc_lo, s18, v16
	ds_store_b32 v1, v4 offset:32768
	s_or_b32 s28, vcc_lo, s28
	s_delay_alu instid0(SALU_CYCLE_1)
	s_and_not1_b32 exec_lo, exec_lo, s28
	s_cbranch_execnz .LBB0_6
.LBB0_14:                               ; %Flow274
                                        ;   in Loop: Header=BB0_4 Depth=2
	s_or_b32 exec_lo, exec_lo, s22
	s_ashr_i32 s21, s21, 2
	s_mov_b32 s0, 0
	s_cmp_lt_i32 s21, 2
	s_cbranch_scc1 .LBB0_22
; %bb.15:                               ; %.lr.ph181.preheader
                                        ;   in Loop: Header=BB0_4 Depth=2
	s_mov_b32 s22, 0
.LBB0_16:                               ; %.lr.ph181
                                        ;   Parent Loop BB0_2 Depth=1
                                        ;     Parent Loop BB0_4 Depth=2
                                        ; =>    This Loop Header: Depth=3
                                        ;         Child Loop BB0_18 Depth 4
	s_delay_alu instid0(SALU_CYCLE_1)
	s_add_i32 s0, s22, 1
	s_mov_b32 s24, exec_lo
	s_lshr_b32 s23, s21, s0
	s_waitcnt lgkmcnt(0)
	s_barrier
	buffer_gl0_inv
	v_cmpx_gt_i32_e64 s23, v0
	s_cbranch_execz .LBB0_19
; %bb.17:                               ; %.lr.ph177
                                        ;   in Loop: Header=BB0_16 Depth=3
	s_load_b32 s25, s[8:9], 0xc
	v_dual_mov_b32 v1, v10 :: v_dual_mov_b32 v2, v0
	s_mov_b32 s27, 0
	s_waitcnt lgkmcnt(0)
	s_and_b32 s25, s25, 0xffff
	s_delay_alu instid0(SALU_CYCLE_1)
	s_lshl_b32 s26, s25, 1
.LBB0_18:                               ;   Parent Loop BB0_2 Depth=1
                                        ;     Parent Loop BB0_4 Depth=2
                                        ;       Parent Loop BB0_16 Depth=3
                                        ; =>      This Inner Loop Header: Depth=4
	v_add_nc_u32_e32 v3, 1, v1
	v_lshl_add_u32 v4, v1, s22, -1
	v_add_nc_u32_e32 v2, s25, v2
	v_add_nc_u32_e32 v1, s26, v1
	s_delay_alu instid0(VALU_DEP_4) | instskip(NEXT) | instid1(VALU_DEP_4)
	v_lshl_add_u32 v3, v3, s22, -1
	v_ashrrev_i32_e32 v5, 5, v4
	s_delay_alu instid0(VALU_DEP_4) | instskip(NEXT) | instid1(VALU_DEP_3)
	v_cmp_le_i32_e32 vcc_lo, s23, v2
	v_ashrrev_i32_e32 v6, 5, v3
	s_delay_alu instid0(VALU_DEP_3) | instskip(SKIP_1) | instid1(VALU_DEP_2)
	v_add_lshl_u32 v4, v5, v4, 2
	s_or_b32 s27, vcc_lo, s27
	v_add_lshl_u32 v3, v6, v3, 2
	ds_load_b32 v4, v4 offset:32768
	ds_load_b32 v5, v3 offset:32768
	s_waitcnt lgkmcnt(0)
	v_add_f32_e32 v4, v4, v5
	ds_store_b32 v3, v4 offset:32768
	s_and_not1_b32 exec_lo, exec_lo, s27
	s_cbranch_execnz .LBB0_18
.LBB0_19:                               ; %Flow267
                                        ;   in Loop: Header=BB0_16 Depth=3
	s_or_b32 exec_lo, exec_lo, s24
; %bb.20:                               ; %.loopexit162
                                        ;   in Loop: Header=BB0_16 Depth=3
	s_lshl_b32 s22, 4, s22
	s_delay_alu instid0(SALU_CYCLE_1)
	s_cmp_le_i32 s22, s21
	s_cbranch_scc0 .LBB0_22
; %bb.21:                               ;   in Loop: Header=BB0_16 Depth=3
	s_mov_b32 s22, s0
	s_branch .LBB0_16
.LBB0_22:                               ; %Flow269
                                        ;   in Loop: Header=BB0_4 Depth=2
	s_cmp_lt_i32 s0, 1
	s_cbranch_scc1 .LBB0_28
.LBB0_23:                               ; %.lr.ph189
                                        ;   Parent Loop BB0_2 Depth=1
                                        ;     Parent Loop BB0_4 Depth=2
                                        ; =>    This Loop Header: Depth=3
                                        ;         Child Loop BB0_25 Depth 4
	s_add_i32 s22, s0, -1
	s_mov_b32 s24, exec_lo
	s_lshl_b32 s23, -1, s22
	s_waitcnt lgkmcnt(0)
	s_add_i32 s23, s23, s21
	s_barrier
	s_ashr_i32 s23, s23, s0
	buffer_gl0_inv
	v_cmpx_gt_i32_e64 s23, v0
	s_cbranch_execz .LBB0_26
; %bb.24:                               ; %.lr.ph185
                                        ;   in Loop: Header=BB0_23 Depth=3
	s_load_b32 s25, s[8:9], 0xc
	v_dual_mov_b32 v1, v11 :: v_dual_mov_b32 v2, v0
	s_mov_b32 s27, 0
	s_waitcnt lgkmcnt(0)
	s_and_b32 s25, s25, 0xffff
	s_delay_alu instid0(SALU_CYCLE_1)
	s_lshl_b32 s26, s25, 1
.LBB0_25:                               ;   Parent Loop BB0_2 Depth=1
                                        ;     Parent Loop BB0_4 Depth=2
                                        ;       Parent Loop BB0_23 Depth=3
                                        ; =>      This Inner Loop Header: Depth=4
	v_add_nc_u32_e32 v3, 1, v1
	v_lshl_add_u32 v4, v1, s22, -1
	v_add_nc_u32_e32 v2, s25, v2
	v_add_nc_u32_e32 v1, s26, v1
	s_delay_alu instid0(VALU_DEP_4) | instskip(NEXT) | instid1(VALU_DEP_4)
	v_lshl_add_u32 v3, v3, s22, -1
	v_ashrrev_i32_e32 v5, 5, v4
	s_delay_alu instid0(VALU_DEP_4) | instskip(NEXT) | instid1(VALU_DEP_3)
	v_cmp_le_i32_e32 vcc_lo, s23, v2
	v_ashrrev_i32_e32 v6, 5, v3
	s_delay_alu instid0(VALU_DEP_3) | instskip(SKIP_1) | instid1(VALU_DEP_2)
	v_add_lshl_u32 v4, v5, v4, 2
	s_or_b32 s27, vcc_lo, s27
	v_add_lshl_u32 v3, v6, v3, 2
	ds_load_b32 v4, v4 offset:32768
	ds_load_b32 v5, v3 offset:32768
	s_waitcnt lgkmcnt(0)
	v_add_f32_e32 v4, v4, v5
	ds_store_b32 v3, v4 offset:32768
	s_and_not1_b32 exec_lo, exec_lo, s27
	s_cbranch_execnz .LBB0_25
.LBB0_26:                               ; %Flow263
                                        ;   in Loop: Header=BB0_23 Depth=3
	s_or_b32 exec_lo, exec_lo, s24
; %bb.27:                               ; %.loopexit
                                        ;   in Loop: Header=BB0_23 Depth=3
	s_cmp_lt_i32 s0, 2
	s_mov_b32 s0, s22
	s_cbranch_scc0 .LBB0_23
.LBB0_28:                               ; %._crit_edge190
                                        ;   in Loop: Header=BB0_4 Depth=2
	s_mov_b32 s0, exec_lo
	s_waitcnt lgkmcnt(0)
	s_barrier
	buffer_gl0_inv
	v_cmpx_gt_i32_e64 s20, v7
	s_cbranch_execz .LBB0_33
; %bb.29:                               ; %.lr.ph193
                                        ;   in Loop: Header=BB0_4 Depth=2
	s_load_b32 s22, s[8:9], 0xc
	v_dual_mov_b32 v1, v9 :: v_dual_mov_b32 v2, v7
	s_mov_b32 s24, 0
	s_waitcnt lgkmcnt(0)
	s_and_b32 s23, s22, 0xffff
	s_delay_alu instid0(SALU_CYCLE_1)
	s_lshl_b32 s22, s23, 2
	s_lshl_b32 s23, s23, 4
.LBB0_30:                               ;   Parent Loop BB0_2 Depth=1
                                        ;     Parent Loop BB0_4 Depth=2
                                        ; =>    This Inner Loop Header: Depth=3
	s_mov_b32 s25, exec_lo
	v_cmpx_ne_u32_e32 0, v2
	s_cbranch_execz .LBB0_32
; %bb.31:                               ;   in Loop: Header=BB0_30 Depth=3
	v_ashrrev_i32_e32 v3, 2, v2
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_add_nc_u32_e32 v3, -1, v3
	v_ashrrev_i32_e32 v4, 5, v3
	s_delay_alu instid0(VALU_DEP_1)
	v_add_lshl_u32 v15, v4, v3, 2
	ds_load_b128 v[3:6], v1
	ds_load_b32 v15, v15 offset:32768
	s_waitcnt lgkmcnt(0)
	v_add_f32_e32 v4, v15, v4
	v_add_f32_e32 v3, v15, v3
	v_add_f32_e32 v5, v15, v5
	v_add_f32_e32 v6, v15, v6
	ds_store_b128 v1, v[3:6]
.LBB0_32:                               ;   in Loop: Header=BB0_30 Depth=3
	s_or_b32 exec_lo, exec_lo, s25
	v_add_nc_u32_e32 v2, s22, v2
	v_add_nc_u32_e32 v1, s23, v1
	s_delay_alu instid0(VALU_DEP_2) | instskip(SKIP_1) | instid1(SALU_CYCLE_1)
	v_cmp_le_i32_e32 vcc_lo, s20, v2
	s_or_b32 s24, vcc_lo, s24
	s_and_not1_b32 exec_lo, exec_lo, s24
	s_cbranch_execnz .LBB0_30
.LBB0_33:                               ; %Flow261
                                        ;   in Loop: Header=BB0_4 Depth=2
	s_or_b32 exec_lo, exec_lo, s0
; %bb.34:                               ; %._crit_edge194
                                        ;   in Loop: Header=BB0_4 Depth=2
	v_cmp_gt_i32_e32 vcc_lo, s19, v0
	s_waitcnt lgkmcnt(0)
	s_barrier
	buffer_gl0_inv
	s_and_saveexec_b32 s19, vcc_lo
	s_cbranch_execz .LBB0_37
; %bb.35:                               ; %.lr.ph197
                                        ;   in Loop: Header=BB0_4 Depth=2
	s_load_b32 s0, s[8:9], 0xc
	v_dual_mov_b32 v1, v7 :: v_dual_mov_b32 v2, v0
	s_mov_b32 s23, 0
	s_waitcnt lgkmcnt(0)
	s_and_b32 s20, s0, 0xffff
	s_delay_alu instid0(SALU_CYCLE_1)
	s_lshl_b32 s22, s20, 2
.LBB0_36:                               ;   Parent Loop BB0_2 Depth=1
                                        ;     Parent Loop BB0_4 Depth=2
                                        ; =>    This Inner Loop Header: Depth=3
	ds_load_b32 v5, v1
	v_add_nc_u32_e32 v3, s16, v2
	v_add_nc_u32_e32 v2, s20, v2
	v_add_nc_u32_e32 v1, s22, v1
	s_delay_alu instid0(VALU_DEP_3) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_ashrrev_i32_e32 v4, 31, v3
	v_lshlrev_b64 v[3:4], 2, v[3:4]
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_add_co_u32 v3, s0, s6, v3
	v_add_co_ci_u32_e64 v4, s0, s7, v4, s0
	s_waitcnt lgkmcnt(0)
	v_add_f32_e32 v5, v13, v5
	v_cmp_le_i32_e32 vcc_lo, s18, v2
	global_store_b32 v[3:4], v5, off
	s_or_b32 s23, vcc_lo, s23
	s_delay_alu instid0(SALU_CYCLE_1)
	s_and_not1_b32 exec_lo, exec_lo, s23
	s_cbranch_execnz .LBB0_36
.LBB0_37:                               ; %Flow259
                                        ;   in Loop: Header=BB0_4 Depth=2
	s_or_b32 exec_lo, exec_lo, s19
	s_add_i32 s21, s21, -1
	s_addk_i32 s14, 0x2000
	s_ashr_i32 s0, s21, 5
	s_addk_i32 s17, 0xe000
	s_add_i32 s0, s0, s21
	s_addk_i32 s16, 0x2000
	s_lshl_b32 s0, s0, 2
	s_cmp_ge_i32 s14, s3
	v_dual_mov_b32 v1, s0 :: v_dual_add_nc_u32 v12, 0x2000, v12
	ds_load_b32 v1, v1 offset:32768
	s_waitcnt lgkmcnt(0)
	s_waitcnt_vscnt null, 0x0
	s_barrier
	buffer_gl0_inv
	v_add_f32_e32 v1, v14, v1
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_add_f32_e32 v2, v13, v1
	v_sub_f32_e32 v3, v2, v13
	s_delay_alu instid0(VALU_DEP_1)
	v_dual_mov_b32 v13, v2 :: v_dual_sub_f32 v14, v1, v3
	s_cbranch_scc0 .LBB0_4
.LBB0_38:                               ; %._crit_edge203
                                        ;   in Loop: Header=BB0_2 Depth=1
	v_add_nc_u32_e32 v8, s1, v8
	s_add_i32 s15, s10, s15
	s_add_i32 s11, s11, s1
	s_cmp_ge_i32 s15, s2
	s_cbranch_scc0 .LBB0_2
.LBB0_39:                               ; %._crit_edge205
	s_endpgm
	.section	.rodata,"a",@progbits
	.p2align	6, 0x0
	.amdhsa_kernel _Z12cumsumKerneliiPKfPf
		.amdhsa_group_segment_fixed_size 41216
		.amdhsa_private_segment_fixed_size 0
		.amdhsa_kernarg_size 280
		.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 18
		.amdhsa_next_free_sgpr 31
		.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	_Z12cumsumKerneliiPKfPf, .Lfunc_end0-_Z12cumsumKerneliiPKfPf
                                        ; -- End function
	.section	.AMDGPU.csdata,"",@progbits
; Kernel info:
; codeLenInByte = 1548
; NumSgprs: 33
; NumVgprs: 18
; ScratchSize: 0
; MemoryBound: 0
; FloatMode: 240
; IeeeMode: 1
; LDSByteSize: 41216 bytes/workgroup (compile time only)
; SGPRBlocks: 4
; VGPRBlocks: 2
; NumSGPRsForWavesPerEU: 33
; NumVGPRsForWavesPerEU: 18
; 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	_Z18binarysearchKerneliiiPKfS0_Pi ; -- Begin function _Z18binarysearchKerneliiiPKfS0_Pi
	.globl	_Z18binarysearchKerneliiiPKfS0_Pi
	.p2align	8
	.type	_Z18binarysearchKerneliiiPKfS0_Pi,@function
_Z18binarysearchKerneliiiPKfS0_Pi:      ; @_Z18binarysearchKerneliiiPKfS0_Pi
; %bb.0:
	s_clause 0x1
	s_load_b256 s[4:11], s[0:1], 0x0
	s_load_b64 s[2:3], s[0:1], 0x20
	s_mov_b32 s12, 1
.LBB1_1:                                ; =>This Inner Loop Header: Depth=1
	s_waitcnt lgkmcnt(0)
	s_mov_b32 s7, s12
	s_lshl_b32 s12, s12, 1
	s_cmp_lt_i32 s7, s5
	s_cbranch_scc1 .LBB1_1
; %bb.2:
	s_cmp_ge_i32 s14, s4
	s_cbranch_scc1 .LBB1_17
; %bb.3:                                ; %.lr.ph54
	s_clause 0x1
	s_load_b32 s17, s[0:1], 0x34
	s_load_b32 s16, s[0:1], 0x28
	s_add_u32 s12, s0, 40
	s_addc_u32 s13, s1, 0
	s_waitcnt lgkmcnt(0)
	s_and_b32 s17, s17, 0xffff
	s_delay_alu instid0(SALU_CYCLE_1)
	v_mad_u64_u32 v[1:2], null, s15, s17, v[0:1]
	s_add_i32 s15, s5, -1
	s_cmp_gt_i32 s7, 0
	s_cselect_b32 s18, -1, 0
	s_add_u32 s19, s8, -4
	s_addc_u32 s20, s9, -1
	s_delay_alu instid0(VALU_DEP_1)
	v_cmp_gt_i32_e64 s0, s6, v1
.LBB1_4:                                ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB1_6 Depth 2
                                        ;       Child Loop BB1_8 Depth 3
	s_delay_alu instid0(VALU_DEP_1)
	s_and_saveexec_b32 s21, s0
	s_cbranch_execz .LBB1_15
; %bb.5:                                ; %.lr.ph50
                                        ;   in Loop: Header=BB1_4 Depth=1
	s_mul_i32 s22, s14, s5
	s_load_b32 s1, s[12:13], 0x4
	s_add_i32 s24, s22, s5
	v_mov_b32_e32 v0, v1
	s_ashr_i32 s25, s24, 31
	s_mov_b32 s26, 0
	s_lshl_b64 s[24:25], s[24:25], 2
	s_delay_alu instid0(SALU_CYCLE_1)
	s_add_u32 s24, s19, s24
	s_addc_u32 s25, s20, s25
	s_load_b32 s23, s[24:25], 0x0
	s_mul_i32 s24, s14, s6
	s_waitcnt lgkmcnt(0)
	s_mul_i32 s25, s1, s17
.LBB1_6:                                ;   Parent Loop BB1_4 Depth=1
                                        ; =>  This Loop Header: Depth=2
                                        ;       Child Loop BB1_8 Depth 3
	v_add_nc_u32_e32 v2, s24, v0
	v_mov_b32_e32 v4, s15
	s_and_not1_b32 vcc_lo, exec_lo, s18
	s_delay_alu instid0(VALU_DEP_2) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_ashrrev_i32_e32 v3, 31, v2
	v_lshlrev_b64 v[2:3], 2, v[2:3]
	s_cbranch_vccnz .LBB1_14
; %bb.7:                                ; %.lr.ph.preheader
                                        ;   in Loop: Header=BB1_6 Depth=2
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_2)
	v_add_co_u32 v4, vcc_lo, s10, v2
	v_add_co_ci_u32_e32 v5, vcc_lo, s11, v3, vcc_lo
	s_mov_b32 s1, s7
	global_load_b32 v4, v[4:5], off
	s_waitcnt vmcnt(0)
	v_dual_mul_f32 v5, s23, v4 :: v_dual_mov_b32 v4, s15
.LBB1_8:                                ; %.lr.ph
                                        ;   Parent Loop BB1_4 Depth=1
                                        ;     Parent Loop BB1_6 Depth=2
                                        ; =>    This Inner Loop Header: Depth=3
	s_mov_b32 s27, exec_lo
	s_delay_alu instid0(VALU_DEP_1)
	v_cmpx_le_i32_e64 s1, v4
	s_cbranch_execz .LBB1_12
; %bb.9:                                ;   in Loop: Header=BB1_8 Depth=3
	v_add_nc_u32_e32 v6, s22, v4
	s_mov_b32 s28, exec_lo
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_subrev_nc_u32_e32 v6, s1, v6
	v_ashrrev_i32_e32 v7, 31, v6
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_lshlrev_b64 v[6:7], 2, v[6:7]
	v_add_co_u32 v6, vcc_lo, s8, v6
	s_delay_alu instid0(VALU_DEP_2)
	v_add_co_ci_u32_e32 v7, vcc_lo, s9, v7, vcc_lo
	global_load_b32 v6, v[6:7], off
	s_waitcnt vmcnt(0)
	v_cmpx_ge_f32_e32 v6, v5
; %bb.10:                               ;   in Loop: Header=BB1_8 Depth=3
	v_subrev_nc_u32_e32 v4, s1, v4
; %bb.11:                               ; %Flow
                                        ;   in Loop: Header=BB1_8 Depth=3
	s_or_b32 exec_lo, exec_lo, s28
.LBB1_12:                               ;   in Loop: Header=BB1_8 Depth=3
	s_delay_alu instid0(SALU_CYCLE_1)
	s_or_b32 exec_lo, exec_lo, s27
	s_lshr_b32 s27, s1, 1
	s_cmp_lt_u32 s1, 2
	s_cbranch_scc1 .LBB1_14
; %bb.13:                               ;   in Loop: Header=BB1_8 Depth=3
	s_mov_b32 s1, s27
	s_branch .LBB1_8
.LBB1_14:                               ; %._crit_edge
                                        ;   in Loop: Header=BB1_6 Depth=2
	v_add_nc_u32_e32 v0, s25, v0
	s_delay_alu instid0(VALU_DEP_2) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_add_co_u32 v2, s1, s2, v2
	v_add_co_ci_u32_e64 v3, s1, s3, v3, s1
	s_delay_alu instid0(VALU_DEP_3) | instskip(SKIP_2) | instid1(SALU_CYCLE_1)
	v_cmp_le_i32_e32 vcc_lo, s6, v0
	global_store_b32 v[2:3], v4, off
	s_or_b32 s26, vcc_lo, s26
	s_and_not1_b32 exec_lo, exec_lo, s26
	s_cbranch_execnz .LBB1_6
.LBB1_15:                               ; %Flow68
                                        ;   in Loop: Header=BB1_4 Depth=1
	s_or_b32 exec_lo, exec_lo, s21
; %bb.16:                               ; %._crit_edge51
                                        ;   in Loop: Header=BB1_4 Depth=1
	s_add_i32 s14, s16, s14
	s_delay_alu instid0(SALU_CYCLE_1)
	s_cmp_ge_i32 s14, s4
	s_cbranch_scc0 .LBB1_4
.LBB1_17:                               ; %._crit_edge55
	s_nop 0
	s_sendmsg sendmsg(MSG_DEALLOC_VGPRS)
	s_endpgm
	.section	.rodata,"a",@progbits
	.p2align	6, 0x0
	.amdhsa_kernel _Z18binarysearchKerneliiiPKfS0_Pi
		.amdhsa_group_segment_fixed_size 0
		.amdhsa_private_segment_fixed_size 0
		.amdhsa_kernarg_size 296
		.amdhsa_user_sgpr_count 14
		.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 1
		.amdhsa_system_sgpr_workgroup_id_z 0
		.amdhsa_system_sgpr_workgroup_info 0
		.amdhsa_system_vgpr_workitem_id 0
		.amdhsa_next_free_vgpr 8
		.amdhsa_next_free_sgpr 29
		.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	_Z18binarysearchKerneliiiPKfS0_Pi, .Lfunc_end1-_Z18binarysearchKerneliiiPKfS0_Pi
                                        ; -- End function
	.section	.AMDGPU.csdata,"",@progbits
; Kernel info:
; codeLenInByte = 488
; NumSgprs: 31
; NumVgprs: 8
; ScratchSize: 0
; MemoryBound: 0
; FloatMode: 240
; IeeeMode: 1
; LDSByteSize: 0 bytes/workgroup (compile time only)
; SGPRBlocks: 3
; VGPRBlocks: 0
; NumSGPRsForWavesPerEU: 31
; NumVGPRsForWavesPerEU: 8
; Occupancy: 16
; WaveLimiterHint : 0
; COMPUTE_PGM_RSRC2:SCRATCH_EN: 0
; COMPUTE_PGM_RSRC2:USER_SGPR: 14
; COMPUTE_PGM_RSRC2:TRAP_HANDLER: 0
; COMPUTE_PGM_RSRC2:TGID_X_EN: 1
; COMPUTE_PGM_RSRC2:TGID_Y_EN: 1
; COMPUTE_PGM_RSRC2:TGID_Z_EN: 0
; COMPUTE_PGM_RSRC2:TIDIG_COMP_CNT: 0
	.text
	.protected	_Z27farthestpointsamplingKerneliiiPKfPfPi ; -- Begin function _Z27farthestpointsamplingKerneliiiPKfPfPi
	.globl	_Z27farthestpointsamplingKerneliiiPKfPfPi
	.p2align	8
	.type	_Z27farthestpointsamplingKerneliiiPKfPfPi,@function
_Z27farthestpointsamplingKerneliiiPKfPfPi: ; @_Z27farthestpointsamplingKerneliiiPKfPfPi
; %bb.0:
	s_load_b128 s[8:11], s[0:1], 0x0
	s_waitcnt lgkmcnt(0)
	s_cmp_lt_i32 s10, 1
	s_cbranch_scc1 .LBB2_33
; %bb.1:
	s_cmp_ge_i32 s15, s8
	s_cbranch_scc1 .LBB2_33
; %bb.2:                                ; %.lr.ph142
	s_clause 0x2
	s_load_b32 s11, s[0:1], 0x28
	s_load_b128 s[16:19], s[0:1], 0x10
	s_load_b64 s[6:7], s[0:1], 0x20
	s_mul_i32 s14, s15, s9
	s_add_u32 s12, s0, 40
	v_dual_mov_b32 v2, 0 :: v_dual_lshlrev_b32 v13, 2, v0
	v_lshlrev_b32_e32 v14, 1, v0
	v_dual_mov_b32 v20, 0x7e967699 :: v_dual_add_nc_u32 v1, s14, v0
	s_addc_u32 s13, s1, 0
	s_min_i32 s24, s9, 0xc00
	v_cmp_eq_u32_e64 s2, 0, v0
	s_mul_i32 s24, s24, 3
	v_cmp_gt_i32_e64 s3, s9, v0
	v_mul_u32_u24_e32 v15, 12, v0
	v_cmp_gt_i32_e64 s0, s24, v0
	v_or_b32_e32 v16, 0x9000, v13
	v_add_nc_u32_e32 v17, 0x9800, v13
	v_or_b32_e32 v18, 1, v14
	v_lshl_add_u32 v19, v1, 1, v1
	s_cmp_lg_u32 s10, 1
	s_waitcnt lgkmcnt(0)
	s_mul_i32 s27, s11, s9
	s_cselect_b32 s25, -1, 0
	s_mul_i32 s26, s14, 3
	s_mul_i32 s27, s27, 3
	s_mov_b64 s[4:5], src_shared_base
.LBB2_3:                                ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB2_7 Depth 2
                                        ;     Child Loop BB2_10 Depth 2
                                        ;     Child Loop BB2_13 Depth 2
                                        ;       Child Loop BB2_15 Depth 3
                                        ;       Child Loop BB2_25 Depth 3
	s_mul_i32 s20, s15, s10
	s_and_saveexec_b32 s1, s2
	s_cbranch_execz .LBB2_5
; %bb.4:                                ;   in Loop: Header=BB2_3 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_5:                                ;   in Loop: Header=BB2_3 Depth=1
	s_or_b32 exec_lo, exec_lo, s1
	s_and_saveexec_b32 s4, s3
	s_cbranch_execz .LBB2_8
; %bb.6:                                ; %.lr.ph
                                        ;   in Loop: Header=BB2_3 Depth=1
	s_load_b32 s1, s[12:13], 0xc
	v_mov_b32_e32 v3, v0
	s_mov_b32 s22, 0
	s_waitcnt lgkmcnt(0)
	s_and_b32 s21, s1, 0xffff
.LBB2_7:                                ;   Parent Loop BB2_3 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, s14, 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, s1, s18, v4
	s_delay_alu instid0(VALU_DEP_1)
	v_add_co_ci_u32_e64 v5, s1, s19, v5, s1
	global_store_b32 v[4:5], v20, off
	s_and_not1_b32 exec_lo, exec_lo, s22
	s_cbranch_execnz .LBB2_7
.LBB2_8:                                ; %Flow174
                                        ;   in Loop: Header=BB2_3 Depth=1
	s_or_b32 exec_lo, exec_lo, s4
	s_and_saveexec_b32 s1, s0
	s_cbranch_execz .LBB2_11
; %bb.9:                                ; %.lr.ph123
                                        ;   in Loop: Header=BB2_3 Depth=1
	s_load_b32 s4, s[12:13], 0xc
	v_mov_b32_e32 v1, v13
	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_10:                               ;   Parent Loop BB2_3 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	v_add_nc_u32_e32 v4, s26, 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, s24, 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_10
.LBB2_11:                               ; %Flow172
                                        ;   in Loop: Header=BB2_3 Depth=1
	s_or_b32 exec_lo, exec_lo, s1
	s_delay_alu instid0(SALU_CYCLE_1)
	s_and_not1_b32 vcc_lo, exec_lo, s25
	s_waitcnt lgkmcnt(0)
	s_waitcnt_vscnt null, 0x0
	s_barrier
	buffer_gl0_inv
	s_cbranch_vccnz .LBB2_32
; %bb.12:                               ; %.lr.ph138
                                        ;   in Loop: Header=BB2_3 Depth=1
	s_load_b32 s1, s[12:13], 0xc
	s_mul_i32 s28, s15, s9
	s_mov_b32 s29, 1
	s_waitcnt lgkmcnt(0)
	s_and_b32 s21, s1, 0xffff
	s_mov_b32 s1, 0
	s_cmp_gt_u32 s21, 1
	s_mul_i32 s31, s21, 12
	s_cselect_b32 s30, -1, 0
	s_mul_i32 s33, s21, 3
.LBB2_13:                               ;   Parent Loop BB2_3 Depth=1
                                        ; =>  This Loop Header: Depth=2
                                        ;       Child Loop BB2_15 Depth 3
                                        ;       Child Loop BB2_25 Depth 3
	v_dual_mov_b32 v21, 0 :: v_dual_mov_b32 v22, -1.0
	s_and_saveexec_b32 s34, s3
	s_cbranch_execz .LBB2_23
; %bb.14:                               ; %.lr.ph128.preheader
                                        ;   in Loop: Header=BB2_13 Depth=2
	s_add_i32 s1, s1, s28
	v_dual_mov_b32 v21, 0 :: v_dual_mov_b32 v22, -1.0
	s_mul_i32 s22, s1, 3
	v_dual_mov_b32 v3, v19 :: v_dual_mov_b32 v24, v0
	s_ashr_i32 s23, s22, 31
	v_mov_b32_e32 v23, v15
	s_lshl_b64 s[22:23], s[22:23], 2
	s_delay_alu instid0(SALU_CYCLE_1)
	s_add_u32 s36, s16, s22
	s_addc_u32 s37, s17, s23
	s_clause 0x1
	s_load_b64 s[22:23], s[36:37], 0x0
	s_load_b32 s35, s[36:37], 0x8
	s_mov_b32 s36, 0
.LBB2_15:                               ; %.lr.ph128
                                        ;   Parent Loop BB2_3 Depth=1
                                        ;     Parent Loop BB2_13 Depth=2
                                        ; =>    This Inner Loop Header: Depth=3
	v_add_nc_u32_e32 v1, s14, v24
	s_mov_b32 s1, exec_lo
                                        ; implicit-def: $vgpr11_vgpr12
                                        ; implicit-def: $vgpr9_vgpr10
                                        ; implicit-def: $vgpr7_vgpr8
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_lshlrev_b64 v[5:6], 2, v[1:2]
	v_add_co_u32 v5, vcc_lo, s18, v5
	s_delay_alu instid0(VALU_DEP_2)
	v_add_co_ci_u32_e32 v6, vcc_lo, s19, v6, vcc_lo
	global_load_b32 v1, v[5:6], off
	v_cmpx_lt_i32_e32 0xbff, v24
	s_xor_b32 s1, exec_lo, s1
; %bb.16:                               ;   in Loop: Header=BB2_15 Depth=3
	v_ashrrev_i32_e32 v4, 31, v3
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_lshlrev_b64 v[7:8], 2, v[3:4]
	v_add_co_u32 v7, vcc_lo, s16, v7
	s_delay_alu instid0(VALU_DEP_2) | instskip(NEXT) | instid1(VALU_DEP_2)
	v_add_co_ci_u32_e32 v8, vcc_lo, s17, v8, vcc_lo
	v_add_co_u32 v9, vcc_lo, v7, 4
	s_delay_alu instid0(VALU_DEP_2)
	v_add_co_ci_u32_e32 v10, vcc_lo, 0, v8, vcc_lo
	v_add_co_u32 v11, vcc_lo, v7, 8
	v_add_co_ci_u32_e32 v12, vcc_lo, 0, v8, vcc_lo
; %bb.17:                               ; %Flow166
                                        ;   in Loop: Header=BB2_15 Depth=3
	s_and_not1_saveexec_b32 s37, s1
; %bb.18:                               ;   in Loop: Header=BB2_15 Depth=3
	v_add_nc_u32_e32 v4, 4, v23
	v_add_nc_u32_e32 v10, 8, v23
	v_cmp_ne_u32_e32 vcc_lo, -1, v23
	s_delay_alu instid0(VALU_DEP_3) | instskip(NEXT) | instid1(VALU_DEP_3)
	v_cmp_ne_u32_e64 s1, -1, v4
	v_cmp_ne_u32_e64 s4, -1, v10
	v_cndmask_b32_e64 v8, 0, s5, vcc_lo
	v_cndmask_b32_e32 v7, 0, v23, vcc_lo
	s_delay_alu instid0(VALU_DEP_4) | instskip(NEXT) | instid1(VALU_DEP_4)
	v_cndmask_b32_e64 v9, 0, v4, s1
	v_cndmask_b32_e64 v11, 0, v10, s4
	v_cndmask_b32_e64 v10, 0, s5, s1
	v_cndmask_b32_e64 v12, 0, s5, s4
; %bb.19:                               ;   in Loop: Header=BB2_15 Depth=3
	s_or_b32 exec_lo, exec_lo, s37
	flat_load_b32 v4, v[7:8]
	flat_load_b32 v7, v[9:10]
	flat_load_b32 v8, v[11:12]
	s_mov_b32 s1, exec_lo
	s_waitcnt vmcnt(1) lgkmcnt(0)
	v_dual_subrev_f32 v4, s22, v4 :: v_dual_subrev_f32 v7, s23, v7
	s_waitcnt vmcnt(0)
	v_subrev_f32_e32 v8, s35, v8
	s_delay_alu instid0(VALU_DEP_2) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_mul_f32_e32 v4, v4, v4
	v_dual_fmac_f32 v4, v7, v7 :: v_dual_max_f32 v7, v1, v1
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_fmac_f32_e32 v4, v8, v8
	v_min_f32_e32 v4, v4, v7
	s_delay_alu instid0(VALU_DEP_1)
	v_cmpx_neq_f32_e32 v4, v1
	s_cbranch_execz .LBB2_21
; %bb.20:                               ;   in Loop: Header=BB2_15 Depth=3
	global_store_b32 v[5:6], v4, off
.LBB2_21:                               ;   in Loop: Header=BB2_15 Depth=3
	s_or_b32 exec_lo, exec_lo, s1
	v_cmp_gt_f32_e32 vcc_lo, v4, v22
	v_add_nc_u32_e32 v3, s33, v3
	v_add_nc_u32_e32 v23, s31, v23
	v_cndmask_b32_e32 v21, v21, v24, vcc_lo
	v_add_nc_u32_e32 v24, s21, v24
	v_cndmask_b32_e32 v22, v22, v4, vcc_lo
	s_delay_alu instid0(VALU_DEP_2) | instskip(SKIP_1) | instid1(SALU_CYCLE_1)
	v_cmp_le_i32_e32 vcc_lo, s9, v24
	s_or_b32 s36, vcc_lo, s36
	s_and_not1_b32 exec_lo, exec_lo, s36
	s_cbranch_execnz .LBB2_15
; %bb.22:                               ; %Flow167
                                        ;   in Loop: Header=BB2_13 Depth=2
	s_or_b32 exec_lo, exec_lo, s36
.LBB2_23:                               ; %Flow168
                                        ;   in Loop: Header=BB2_13 Depth=2
	s_delay_alu instid0(SALU_CYCLE_1) | instskip(NEXT) | instid1(SALU_CYCLE_1)
	s_or_b32 exec_lo, exec_lo, s34
	s_and_not1_b32 vcc_lo, exec_lo, s30
	ds_store_b32 v16, v22
	ds_store_b32 v17, v21
	s_cbranch_vccnz .LBB2_29
; %bb.24:                               ; %.lr.ph133.preheader
                                        ;   in Loop: Header=BB2_13 Depth=2
	s_mov_b32 s1, 0
.LBB2_25:                               ; %.lr.ph133
                                        ;   Parent Loop BB2_3 Depth=1
                                        ;     Parent Loop BB2_13 Depth=2
                                        ; =>    This Inner Loop Header: Depth=3
	s_delay_alu instid0(SALU_CYCLE_1)
	s_mov_b32 s4, s1
	s_add_i32 s1, s1, 1
	s_waitcnt lgkmcnt(0)
	s_waitcnt_vscnt null, 0x0
	s_lshr_b32 s22, s21, s1
	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_28
; %bb.26:                               ;   in Loop: Header=BB2_25 Depth=3
	v_lshlrev_b32_e32 v1, s4, v14
	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:36864
	ds_load_b32 v3, v4 offset:36864
	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_28
; %bb.27:                               ;   in Loop: Header=BB2_25 Depth=3
	ds_load_b32 v4, v4 offset:38912
	v_add_nc_u32_e32 v5, 0x9000, v1
	ds_store_b32 v5, v3
	s_waitcnt lgkmcnt(1)
	ds_store_b32 v1, v4 offset:38912
.LBB2_28:                               ;   in Loop: Header=BB2_25 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_25
.LBB2_29:                               ; %._crit_edge134
                                        ;   in Loop: Header=BB2_13 Depth=2
	s_waitcnt lgkmcnt(0)
	s_waitcnt_vscnt null, 0x0
	s_barrier
	buffer_gl0_inv
	ds_load_b32 v1, v2 offset:38912
	s_waitcnt lgkmcnt(0)
	v_readfirstlane_b32 s1, v1
	s_and_saveexec_b32 s4, s2
	s_cbranch_execz .LBB2_31
; %bb.30:                               ;   in Loop: Header=BB2_13 Depth=2
	s_add_i32 s22, s29, s20
	s_delay_alu instid0(VALU_DEP_1) | instskip(SKIP_1) | instid1(SALU_CYCLE_1)
	v_mov_b32_e32 v1, s1
	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_31:                               ;   in Loop: Header=BB2_13 Depth=2
	s_or_b32 exec_lo, exec_lo, s4
	s_add_i32 s29, s29, 1
	s_delay_alu instid0(SALU_CYCLE_1)
	s_cmp_eq_u32 s29, s10
	s_cbranch_scc0 .LBB2_13
.LBB2_32:                               ; %._crit_edge139
                                        ;   in Loop: Header=BB2_3 Depth=1
	v_add_nc_u32_e32 v19, s27, v19
	s_add_i32 s15, s11, s15
	s_add_i32 s26, s26, s27
	s_cmp_ge_i32 s15, s8
	s_cbranch_scc0 .LBB2_3
.LBB2_33:                               ; %.loopexit
	s_nop 0
	s_sendmsg sendmsg(MSG_DEALLOC_VGPRS)
	s_endpgm
	.section	.rodata,"a",@progbits
	.p2align	6, 0x0
	.amdhsa_kernel _Z27farthestpointsamplingKerneliiiPKfPfPi
		.amdhsa_group_segment_fixed_size 40960
		.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 25
		.amdhsa_next_free_sgpr 38
		.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	_Z27farthestpointsamplingKerneliiiPKfPfPi, .Lfunc_end2-_Z27farthestpointsamplingKerneliiiPKfPfPi
                                        ; -- End function
	.section	.AMDGPU.csdata,"",@progbits
; Kernel info:
; codeLenInByte = 1320
; NumSgprs: 40
; NumVgprs: 25
; ScratchSize: 0
; MemoryBound: 0
; FloatMode: 240
; IeeeMode: 1
; LDSByteSize: 40960 bytes/workgroup (compile time only)
; SGPRBlocks: 4
; VGPRBlocks: 3
; NumSGPRsForWavesPerEU: 40
; NumVGPRsForWavesPerEU: 25
; 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	_Z17gatherpointKerneliiiPKfPKiPf ; -- Begin function _Z17gatherpointKerneliiiPKfPKiPf
	.globl	_Z17gatherpointKerneliiiPKfPKiPf
	.p2align	8
	.type	_Z17gatherpointKerneliiiPKfPKiPf,@function
_Z17gatherpointKerneliiiPKfPKiPf:       ; @_Z17gatherpointKerneliiiPKfPKiPf
; %bb.0:
	s_load_b128 s[4:7], s[0:1], 0x0
	s_waitcnt lgkmcnt(0)
	s_cmp_ge_i32 s14, s4
	s_cbranch_scc1 .LBB3_6
; %bb.1:                                ; %.lr.ph43
	s_clause 0x3
	s_load_b32 s16, s[0:1], 0x34
	s_load_b32 s7, s[0:1], 0x28
	s_load_b128 s[8:11], s[0:1], 0x10
	s_load_b64 s[2:3], s[0:1], 0x20
	s_add_u32 s12, s0, 40
	s_addc_u32 s13, s1, 0
	s_waitcnt lgkmcnt(0)
	s_and_b32 s16, s16, 0xffff
	s_mul_i32 s17, s7, s6
	s_mul_i32 s0, s15, s16
	s_mul_i32 s15, s14, s6
	v_add_nc_u32_e32 v2, s0, v0
	v_add3_u32 v0, s0, s15, v0
	s_mul_i32 s18, s17, 3
	s_mul_i32 s19, s16, 3
	s_delay_alu instid0(VALU_DEP_2) | instskip(NEXT) | instid1(VALU_DEP_2)
	v_cmp_gt_i32_e32 vcc_lo, s6, v2
	v_lshl_add_u32 v3, v0, 1, v0
.LBB3_2:                                ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB3_4 Depth 2
	s_and_saveexec_b32 s20, vcc_lo
	s_cbranch_execz .LBB3_5
; %bb.3:                                ; %.lr.ph
                                        ;   in Loop: Header=BB3_2 Depth=1
	s_load_b32 s0, s[12:13], 0x4
	s_delay_alu instid0(VALU_DEP_1)
	v_mov_b32_e32 v0, v3
	v_mov_b32_e32 v4, v2
	s_mul_i32 s21, s14, s5
	s_mov_b32 s24, 0
	s_waitcnt lgkmcnt(0)
	s_mul_i32 s22, s0, s16
	s_mul_i32 s23, s19, s0
.LBB3_4:                                ;   Parent Loop BB3_2 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	v_add_nc_u32_e32 v5, s15, v4
	v_add_nc_u32_e32 v4, s22, v4
	s_delay_alu instid0(VALU_DEP_2) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_ashrrev_i32_e32 v6, 31, v5
	v_lshlrev_b64 v[5:6], 2, v[5:6]
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_add_co_u32 v5, s0, s10, v5
	v_add_co_ci_u32_e64 v6, s0, s11, v6, s0
	global_load_b32 v1, v[5:6], off
	s_waitcnt vmcnt(0)
	v_add_nc_u32_e32 v1, s21, v1
	s_delay_alu instid0(VALU_DEP_1) | instskip(SKIP_1) | instid1(VALU_DEP_2)
	v_lshl_add_u32 v5, v1, 1, v1
	v_ashrrev_i32_e32 v1, 31, v0
	v_ashrrev_i32_e32 v6, 31, v5
	s_delay_alu instid0(VALU_DEP_2) | instskip(SKIP_1) | instid1(VALU_DEP_3)
	v_lshlrev_b64 v[8:9], 2, v[0:1]
	v_add_nc_u32_e32 v0, s23, v0
	v_lshlrev_b64 v[5:6], 2, v[5:6]
	s_delay_alu instid0(VALU_DEP_3) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_add_co_u32 v8, s1, s2, v8
	v_add_co_ci_u32_e64 v9, s1, s3, v9, s1
	s_delay_alu instid0(VALU_DEP_3) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_add_co_u32 v5, s0, s8, v5
	v_add_co_ci_u32_e64 v6, s0, s9, v6, s0
	v_cmp_le_i32_e64 s0, s6, v4
	global_load_b96 v[5:7], v[5:6], off
	s_or_b32 s24, s0, s24
	s_waitcnt vmcnt(0)
	global_store_b96 v[8:9], v[5:7], off
	s_and_not1_b32 exec_lo, exec_lo, s24
	s_cbranch_execnz .LBB3_4
.LBB3_5:                                ; %Flow59
                                        ;   in Loop: Header=BB3_2 Depth=1
	s_or_b32 exec_lo, exec_lo, s20
	s_delay_alu instid0(VALU_DEP_1)
	v_add_nc_u32_e32 v3, s18, v3
	s_add_i32 s14, s7, s14
	s_add_i32 s15, s15, s17
	s_cmp_ge_i32 s14, s4
	s_cbranch_scc0 .LBB3_2
.LBB3_6:                                ; %._crit_edge44
	s_nop 0
	s_sendmsg sendmsg(MSG_DEALLOC_VGPRS)
	s_endpgm
	.section	.rodata,"a",@progbits
	.p2align	6, 0x0
	.amdhsa_kernel _Z17gatherpointKerneliiiPKfPKiPf
		.amdhsa_group_segment_fixed_size 0
		.amdhsa_private_segment_fixed_size 0
		.amdhsa_kernarg_size 296
		.amdhsa_user_sgpr_count 14
		.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 1
		.amdhsa_system_sgpr_workgroup_id_z 0
		.amdhsa_system_sgpr_workgroup_info 0
		.amdhsa_system_vgpr_workitem_id 0
		.amdhsa_next_free_vgpr 10
		.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_end3:
	.size	_Z17gatherpointKerneliiiPKfPKiPf, .Lfunc_end3-_Z17gatherpointKerneliiiPKfPKiPf
                                        ; -- End function
	.section	.AMDGPU.csdata,"",@progbits
; Kernel info:
; codeLenInByte = 396
; NumSgprs: 27
; NumVgprs: 10
; ScratchSize: 0
; MemoryBound: 0
; FloatMode: 240
; IeeeMode: 1
; LDSByteSize: 0 bytes/workgroup (compile time only)
; SGPRBlocks: 3
; VGPRBlocks: 1
; NumSGPRsForWavesPerEU: 27
; NumVGPRsForWavesPerEU: 10
; Occupancy: 16
; WaveLimiterHint : 1
; COMPUTE_PGM_RSRC2:SCRATCH_EN: 0
; COMPUTE_PGM_RSRC2:USER_SGPR: 14
; COMPUTE_PGM_RSRC2:TRAP_HANDLER: 0
; COMPUTE_PGM_RSRC2:TGID_X_EN: 1
; COMPUTE_PGM_RSRC2:TGID_Y_EN: 1
; COMPUTE_PGM_RSRC2:TGID_Z_EN: 0
; COMPUTE_PGM_RSRC2:TIDIG_COMP_CNT: 0
	.text
	.protected	_Z21scatteraddpointKerneliiiPKfPKiPf ; -- Begin function _Z21scatteraddpointKerneliiiPKfPKiPf
	.globl	_Z21scatteraddpointKerneliiiPKfPKiPf
	.p2align	8
	.type	_Z21scatteraddpointKerneliiiPKfPKiPf,@function
_Z21scatteraddpointKerneliiiPKfPKiPf:   ; @_Z21scatteraddpointKerneliiiPKfPKiPf
; %bb.0:
	s_load_b128 s[4:7], s[0:1], 0x0
	s_waitcnt lgkmcnt(0)
	s_cmp_ge_i32 s14, s4
	s_cbranch_scc1 .LBB4_12
; %bb.1:                                ; %.lr.ph43
	s_clause 0x3
	s_load_b32 s16, s[0:1], 0x34
	s_load_b32 s7, s[0:1], 0x28
	s_load_b128 s[8:11], s[0:1], 0x10
	s_load_b64 s[2:3], s[0:1], 0x20
	s_add_u32 s12, s0, 40
	s_addc_u32 s13, s1, 0
	s_waitcnt lgkmcnt(0)
	s_and_b32 s1, s16, 0xffff
	s_delay_alu instid0(SALU_CYCLE_1) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_mad_u64_u32 v[1:2], null, s15, s1, v[0:1]
	v_cmp_gt_i32_e32 vcc_lo, s6, v1
.LBB4_2:                                ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB4_4 Depth 2
                                        ;       Child Loop BB4_5 Depth 3
                                        ;       Child Loop BB4_7 Depth 3
                                        ;       Child Loop BB4_9 Depth 3
	s_and_saveexec_b32 s15, vcc_lo
	s_cbranch_execz .LBB4_11
; %bb.3:                                ; %.lr.ph
                                        ;   in Loop: Header=BB4_2 Depth=1
	s_load_b32 s18, s[12:13], 0x4
	v_mov_b32_e32 v0, v1
	s_mul_i32 s16, s14, s6
	s_mul_i32 s17, s14, s5
	s_mov_b32 s19, 0
	s_waitcnt lgkmcnt(0)
	s_mul_i32 s18, s18, s1
.LBB4_4:                                ;   Parent Loop BB4_2 Depth=1
                                        ; =>  This Loop Header: Depth=2
                                        ;       Child Loop BB4_5 Depth 3
                                        ;       Child Loop BB4_7 Depth 3
                                        ;       Child Loop BB4_9 Depth 3
	v_add_nc_u32_e32 v2, s16, v0
	s_mov_b32 s20, 0
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_ashrrev_i32_e32 v3, 31, v2
	v_lshlrev_b64 v[3:4], 2, v[2:3]
	v_lshl_add_u32 v2, v2, 1, v2
	s_delay_alu instid0(VALU_DEP_2) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_add_co_u32 v3, s0, s10, v3
	v_add_co_ci_u32_e64 v4, s0, s11, v4, s0
	global_load_b32 v3, v[3:4], off
	s_waitcnt vmcnt(0)
	v_add_nc_u32_e32 v3, s17, v3
	s_delay_alu instid0(VALU_DEP_1) | instskip(SKIP_1) | instid1(VALU_DEP_2)
	v_lshl_add_u32 v4, v3, 1, v3
	v_ashrrev_i32_e32 v3, 31, v2
	v_ashrrev_i32_e32 v5, 31, v4
	s_delay_alu instid0(VALU_DEP_2) | instskip(NEXT) | instid1(VALU_DEP_2)
	v_lshlrev_b64 v[2:3], 2, v[2:3]
	v_lshlrev_b64 v[6:7], 2, v[4:5]
	s_delay_alu instid0(VALU_DEP_2) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_add_co_u32 v4, s0, s8, v2
	v_add_co_ci_u32_e64 v5, s0, s9, v3, s0
	s_delay_alu instid0(VALU_DEP_3) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_add_co_u32 v2, s0, s2, v6
	v_add_co_ci_u32_e64 v3, s0, s3, v7, s0
	global_load_b32 v8, v[4:5], off
	global_load_b32 v7, v[2:3], off
.LBB4_5:                                ; %atomicrmw.start
                                        ;   Parent Loop BB4_2 Depth=1
                                        ;     Parent Loop BB4_4 Depth=2
                                        ; =>    This Inner Loop Header: Depth=3
	s_waitcnt vmcnt(0)
	v_add_f32_e32 v6, v7, v8
	global_atomic_cmpswap_b32 v6, v[2:3], v[6:7], off glc
	s_waitcnt vmcnt(0)
	v_cmp_eq_u32_e64 s0, v6, v7
	v_mov_b32_e32 v7, v6
	s_delay_alu instid0(VALU_DEP_2) | instskip(NEXT) | instid1(SALU_CYCLE_1)
	s_or_b32 s20, s0, s20
	s_and_not1_b32 exec_lo, exec_lo, s20
	s_cbranch_execnz .LBB4_5
; %bb.6:                                ; %atomicrmw.end
                                        ;   in Loop: Header=BB4_4 Depth=2
	s_or_b32 exec_lo, exec_lo, s20
	global_load_b32 v8, v[4:5], off offset:4
	global_load_b32 v7, v[2:3], off offset:4
	s_mov_b32 s20, 0
.LBB4_7:                                ; %atomicrmw.start46
                                        ;   Parent Loop BB4_2 Depth=1
                                        ;     Parent Loop BB4_4 Depth=2
                                        ; =>    This Inner Loop Header: Depth=3
	s_waitcnt vmcnt(0)
	v_add_f32_e32 v6, v7, v8
	global_atomic_cmpswap_b32 v6, v[2:3], v[6:7], off offset:4 glc
	s_waitcnt vmcnt(0)
	v_cmp_eq_u32_e64 s0, v6, v7
	v_mov_b32_e32 v7, v6
	s_delay_alu instid0(VALU_DEP_2) | instskip(NEXT) | instid1(SALU_CYCLE_1)
	s_or_b32 s20, s0, s20
	s_and_not1_b32 exec_lo, exec_lo, s20
	s_cbranch_execnz .LBB4_7
; %bb.8:                                ; %atomicrmw.end45
                                        ;   in Loop: Header=BB4_4 Depth=2
	s_or_b32 exec_lo, exec_lo, s20
	global_load_b32 v6, v[4:5], off offset:8
	global_load_b32 v5, v[2:3], off offset:8
	s_mov_b32 s20, 0
.LBB4_9:                                ; %atomicrmw.start52
                                        ;   Parent Loop BB4_2 Depth=1
                                        ;     Parent Loop BB4_4 Depth=2
                                        ; =>    This Inner Loop Header: Depth=3
	s_waitcnt vmcnt(0)
	v_add_f32_e32 v4, v5, v6
	global_atomic_cmpswap_b32 v4, v[2:3], v[4:5], off offset:8 glc
	s_waitcnt vmcnt(0)
	v_cmp_eq_u32_e64 s0, v4, v5
	v_mov_b32_e32 v5, v4
	s_delay_alu instid0(VALU_DEP_2) | instskip(NEXT) | instid1(SALU_CYCLE_1)
	s_or_b32 s20, s0, s20
	s_and_not1_b32 exec_lo, exec_lo, s20
	s_cbranch_execnz .LBB4_9
; %bb.10:                               ; %atomicrmw.end51
                                        ;   in Loop: Header=BB4_4 Depth=2
	s_or_b32 exec_lo, exec_lo, s20
	v_add_nc_u32_e32 v0, s18, v0
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_cmp_le_i32_e64 s0, s6, v0
	s_or_b32 s19, s0, s19
	s_delay_alu instid0(SALU_CYCLE_1)
	s_and_not1_b32 exec_lo, exec_lo, s19
	s_cbranch_execnz .LBB4_4
.LBB4_11:                               ; %Flow67
                                        ;   in Loop: Header=BB4_2 Depth=1
	s_or_b32 exec_lo, exec_lo, s15
	s_add_i32 s14, s7, s14
	s_delay_alu instid0(SALU_CYCLE_1)
	s_cmp_ge_i32 s14, s4
	s_cbranch_scc0 .LBB4_2
.LBB4_12:                               ; %._crit_edge44
	s_endpgm
	.section	.rodata,"a",@progbits
	.p2align	6, 0x0
	.amdhsa_kernel _Z21scatteraddpointKerneliiiPKfPKiPf
		.amdhsa_group_segment_fixed_size 0
		.amdhsa_private_segment_fixed_size 0
		.amdhsa_kernarg_size 296
		.amdhsa_user_sgpr_count 14
		.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 1
		.amdhsa_system_sgpr_workgroup_id_z 0
		.amdhsa_system_sgpr_workgroup_info 0
		.amdhsa_system_vgpr_workitem_id 0
		.amdhsa_next_free_vgpr 9
		.amdhsa_next_free_sgpr 21
		.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_end4:
	.size	_Z21scatteraddpointKerneliiiPKfPKiPf, .Lfunc_end4-_Z21scatteraddpointKerneliiiPKfPKiPf
                                        ; -- End function
	.section	.AMDGPU.csdata,"",@progbits
; Kernel info:
; codeLenInByte = 548
; NumSgprs: 23
; NumVgprs: 9
; ScratchSize: 0
; MemoryBound: 0
; FloatMode: 240
; IeeeMode: 1
; LDSByteSize: 0 bytes/workgroup (compile time only)
; SGPRBlocks: 2
; VGPRBlocks: 1
; NumSGPRsForWavesPerEU: 23
; NumVGPRsForWavesPerEU: 9
; Occupancy: 16
; WaveLimiterHint : 1
; COMPUTE_PGM_RSRC2:SCRATCH_EN: 0
; COMPUTE_PGM_RSRC2:USER_SGPR: 14
; COMPUTE_PGM_RSRC2:TRAP_HANDLER: 0
; COMPUTE_PGM_RSRC2:TGID_X_EN: 1
; COMPUTE_PGM_RSRC2:TGID_Y_EN: 1
; 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
      - .actual_access:  read_only
        .address_space:  global
        .offset:         8
        .size:           8
        .value_kind:     global_buffer
      - .actual_access:  write_only
        .address_space:  global
        .offset:         16
        .size:           8
        .value_kind:     global_buffer
      - .offset:         24
        .size:           4
        .value_kind:     hidden_block_count_x
      - .offset:         28
        .size:           4
        .value_kind:     hidden_block_count_y
      - .offset:         32
        .size:           4
        .value_kind:     hidden_block_count_z
      - .offset:         36
        .size:           2
        .value_kind:     hidden_group_size_x
      - .offset:         38
        .size:           2
        .value_kind:     hidden_group_size_y
      - .offset:         40
        .size:           2
        .value_kind:     hidden_group_size_z
      - .offset:         42
        .size:           2
        .value_kind:     hidden_remainder_x
      - .offset:         44
        .size:           2
        .value_kind:     hidden_remainder_y
      - .offset:         46
        .size:           2
        .value_kind:     hidden_remainder_z
      - .offset:         64
        .size:           8
        .value_kind:     hidden_global_offset_x
      - .offset:         72
        .size:           8
        .value_kind:     hidden_global_offset_y
      - .offset:         80
        .size:           8
        .value_kind:     hidden_global_offset_z
      - .offset:         88
        .size:           2
        .value_kind:     hidden_grid_dims
    .group_segment_fixed_size: 41216
    .kernarg_segment_align: 8
    .kernarg_segment_size: 280
    .language:       OpenCL C
    .language_version:
      - 2
      - 0
    .max_flat_workgroup_size: 1024
    .name:           _Z12cumsumKerneliiPKfPf
    .private_segment_fixed_size: 0
    .sgpr_count:     33
    .sgpr_spill_count: 0
    .symbol:         _Z12cumsumKerneliiPKfPf.kd
    .uniform_work_group_size: 1
    .uses_dynamic_stack: false
    .vgpr_count:     18
    .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
      - .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:           _Z18binarysearchKerneliiiPKfS0_Pi
    .private_segment_fixed_size: 0
    .sgpr_count:     31
    .sgpr_spill_count: 0
    .symbol:         _Z18binarysearchKerneliiiPKfS0_Pi.kd
    .uniform_work_group_size: 1
    .uses_dynamic_stack: false
    .vgpr_count:     8
    .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
      - .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: 40960
    .kernarg_segment_align: 8
    .kernarg_segment_size: 296
    .language:       OpenCL C
    .language_version:
      - 2
      - 0
    .max_flat_workgroup_size: 1024
    .name:           _Z27farthestpointsamplingKerneliiiPKfPfPi
    .private_segment_fixed_size: 0
    .sgpr_count:     40
    .sgpr_spill_count: 0
    .symbol:         _Z27farthestpointsamplingKerneliiiPKfPfPi.kd
    .uniform_work_group_size: 1
    .uses_dynamic_stack: false
    .vgpr_count:     25
    .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
      - .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:           _Z17gatherpointKerneliiiPKfPKiPf
    .private_segment_fixed_size: 0
    .sgpr_count:     27
    .sgpr_spill_count: 0
    .symbol:         _Z17gatherpointKerneliiiPKfPKiPf.kd
    .uniform_work_group_size: 1
    .uses_dynamic_stack: false
    .vgpr_count:     10
    .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
      - .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:           _Z21scatteraddpointKerneliiiPKfPKiPf
    .private_segment_fixed_size: 0
    .sgpr_count:     23
    .sgpr_spill_count: 0
    .symbol:         _Z21scatteraddpointKerneliiiPKfPKiPf.kd
    .uniform_work_group_size: 1
    .uses_dynamic_stack: false
    .vgpr_count:     9
    .vgpr_spill_count: 0
    .wavefront_size: 32
    .workgroup_processor_mode: 1
amdhsa.target:   amdgcn-amd-amdhsa--gfx1100
amdhsa.version:
  - 1
  - 2
...

	.end_amdgpu_metadata
