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

#define SIZE 1024*1024
#define nTHREAD 512

__global__ void min(float *input, float *out) {
	__shared__ float sData[nTHREAD];
	int tid = threadIdx.x;
	int iter = tid + blockIdx.x*blockDim.x;
	sData[tid] = input[iter];
	__syncthreads();
	for(int s = blockDim.x/2; s > 0; s /= 2) {
		if(iter < (s+blockIdx.x*blockDim.x)) {
			sData[tid] = (sData[tid] < sData[tid+s]) ? sData[tid] : sData[tid+s];  
		}
		__syncthreads();
	}
	if(tid == 0) {		
		out[blockIdx.x] = sData[0]; 
	}
}

__global__ void max(float *input, float *out) {
	__shared__ float sData[nTHREAD];
	int tid = threadIdx.x;
	int iter = tid + blockIdx.x*blockDim.x;
	sData[tid] = input[iter];
	__syncthreads();
	for(int s = blockDim.x/2; s > 0; s /= 2) {
		if(iter < (s+blockIdx.x*blockDim.x)) {
			sData[tid] = (sData[tid] > sData[tid+s]) ? sData[tid] : sData[tid+s];  
		}
		__syncthreads();
	}
	if(tid == 0) {		
		out[blockIdx.x] = sData[0]; 
	}
}

__global__ void sumTotal(float *input, float *out) {
	__shared__ float sData[nTHREAD];
	int tid = threadIdx.x;
	int iter = tid + blockIdx.x*blockDim.x;
	sData[tid] = input[iter];
	__syncthreads();
	for(int s = blockDim.x/2; s > 0; s /= 2) {
		if(iter < (s+blockIdx.x*blockDim.x)) {
			sData[tid] = sData[tid] + sData[tid+s];  
		}
		__syncthreads();
	}
	if(tid == 0) {		
		out[blockIdx.x] = sData[0]; 
	}
}

__global__ void subNsquare(float *input, float *out, float *mean) {
	__shared__ float sData[nTHREAD];
	int tid = threadIdx.x;
	int iter = tid + blockIdx.x*blockDim.x;
	sData[tid] = input[iter];
	out[iter] = pow(sData[tid] - *mean, 2);
}

__global__ void subNpowr4(float *input, float *out, float *mean) {
	__shared__ float sData[nTHREAD];
	int tid = threadIdx.x;
	int iter = tid + blockIdx.x*blockDim.x;
	sData[tid] = input[iter];
	out[iter] = pow(sData[tid] -* mean, 4); 
}

int main() {
	float *input, *out, *_input, *_out;
	cudaEvent_t start, stop;
	float _time = 0.0;
	time_t seconds;	
	
	cudaEventCreate(&start);	
	cudaEventCreate(&stop);
	input = (float*)malloc(sizeof(float)*SIZE);
	out = (float*)malloc(sizeof(float)*SIZE);
	time(&seconds);
	srand((unsigned int)seconds);

	float stdv = 0,mv = 0,kr = 0;	
	for(int i = 0; i < SIZE; i++) {
		input[i] = (float)rand()/(float)(RAND_MAX) * SIZE;mv += input[i];
		//input[i] = (int)rand()%SIZE;
		//input[i] = SIZE - i;
	}
	mv /= SIZE; for(int j=0;j<SIZE;j++){stdv += pow(input[j]-mv, 2);}stdv /= SIZE; printf("Act std = %f\n", sqrt(stdv));
	for(int j=0;j<SIZE;j++){kr += pow(input[j]-mv, 4);}kr /= SIZE; kr /= pow(stdv, 4); printf("Act kr = %f\n", kr);
	cudaError_t err1, err2;
	err1 = cudaMalloc((void**)&_input, sizeof(float)*SIZE);
	err2 = cudaMalloc((void**)&_out, sizeof(float)*SIZE);
	if(err1 != cudaSuccess || err2 != cudaSuccess) {
		printf("Error in allocation %d %d\n", err1, err2);
		exit(0);
	}
	
	// Minimum Calculation
	cudaMemcpy(_input, input, sizeof(float)*SIZE, cudaMemcpyHostToDevice);
	
	cudaEventRecord(start, 0);
	int flag = 0;
	int block = SIZE/nTHREAD, remainder;
	while(block > 1) {
		if(flag == 0) {
			min<<<block,nTHREAD >>>(_input, _out);
			flag = 1;
		}
		else {
			min<<<block,nTHREAD >>>(_out, _input);
			flag = 0;
		}
		remainder = block;
		block /= nTHREAD;
	}
	if(flag == 0) {
		min<<<1, remainder>>>(_input, _out);
		cudaMemcpy(out, _out, sizeof(float)*SIZE, cudaMemcpyDeviceToHost);
	}
	else {
		min<<<1, remainder>>>(_out, _input);	
		cudaMemcpy(out, _input, sizeof(float)*SIZE, cudaMemcpyDeviceToHost);
	}
	cudaEventRecord(stop, 0);
	cudaEventSynchronize(stop);
	cudaEventElapsedTime(&_time, start, stop);
	printf("Elapsed Time(MIN) = %f\n", _time);
	
	cudaMemcpy(out, _out, sizeof(float)*SIZE, cudaMemcpyDeviceToHost);
	printf("MIN = %f\n",out[0]);
	
	// Maximum Calculation
	cudaMemcpy(_input, input, sizeof(float)*SIZE, cudaMemcpyHostToDevice);
	
	cudaEventRecord(start, 0);
	flag = 0;
	block = SIZE/nTHREAD;
	while(block > 1) {
		if(flag == 0) {
			max<<<block,nTHREAD >>>(_input, _out);
			flag = 1;
		}
		else {
			max<<<block,nTHREAD >>>(_out, _input);
			flag = 0;
		}
		remainder = block;
		block /= nTHREAD;
	}
	if(flag == 0) {
		max<<<1, remainder>>>(_input, _out);
		cudaMemcpy(out, _out, sizeof(float)*SIZE, cudaMemcpyDeviceToHost);
	}
	else {
		max<<<1, remainder>>>(_out, _input);	
		cudaMemcpy(out, _input, sizeof(float)*SIZE, cudaMemcpyDeviceToHost);
	}
	cudaEventRecord(stop, 0);
	cudaEventSynchronize(stop);
	cudaEventElapsedTime(&_time, start, stop);
	printf("Elapsed Time(MAX) = %.5f\n", _time);
	
	cudaMemcpy(out, _out, sizeof(float)*SIZE, cudaMemcpyDeviceToHost);
	printf("MAX = %f\n",out[0]);
	
	// STD calculation
	cudaMemcpy(_input, input, sizeof(float)*SIZE, cudaMemcpyHostToDevice);
	
	cudaEventRecord(start, 0);
	flag = 0;
	block = SIZE/nTHREAD;
	while(block > 1) {
		if(flag == 0) {
			sumTotal<<<block, nTHREAD>>>(_input, _out);
			flag = 1;
		}
		else {
			sumTotal<<<block,nTHREAD >>>(_out, _input);
			flag = 0;
		}
		remainder = block;
		block /= nTHREAD;
	}
	if(flag == 0) {
		sumTotal<<<1, remainder>>>(_input, _out);
		cudaMemcpy(out, _out, sizeof(float)*SIZE, cudaMemcpyDeviceToHost);
	}
	else {
		sumTotal<<<1, remainder>>>(_out, _input);	
		cudaMemcpy(out, _input, sizeof(float)*SIZE, cudaMemcpyDeviceToHost);
	}
	
	float mean = out[0], *_mean = NULL;
	mean /= SIZE;
	printf("MEAN = %f\n",mean);
	
	cudaMalloc((void**)&_mean, sizeof(float));
	cudaMemcpy(_mean, &mean, sizeof(float), cudaMemcpyHostToDevice);
	
	block = SIZE/nTHREAD;
	cudaMemcpy(_input, input, sizeof(float)*SIZE, cudaMemcpyHostToDevice);
	subNsquare<<<block, nTHREAD>>>(_input, _out, _mean);
	cudaMemcpy(out, _out, sizeof(float)*SIZE, cudaMemcpyDeviceToHost);	
	cudaMemcpy(_input, out, sizeof(float)*SIZE, cudaMemcpyHostToDevice);	
	flag = 0;
	block = SIZE/nTHREAD;
	while(block > 1) {
		if(flag == 0) {
			sumTotal<<<block, nTHREAD>>>(_input, _out);
			flag = 1;
		}
		else {
			sumTotal<<<block,nTHREAD >>>(_out, _input);
			flag = 0;
		}
		remainder = block;
		block /= nTHREAD;
	}
	if(flag == 0) {
		sumTotal<<<1, remainder>>>(_input, _out);
		cudaMemcpy(out, _out, sizeof(float)*SIZE, cudaMemcpyDeviceToHost);
	}
	else {
		sumTotal<<<1, remainder>>>(_out, _input);	
		cudaMemcpy(out, _input, sizeof(float)*SIZE, cudaMemcpyDeviceToHost);
	}
	cudaEventRecord(stop, 0);
	cudaEventSynchronize(stop);
	cudaEventElapsedTime(&_time, start, stop);
	printf("Elapsed Time(STD) = %.5f\n", _time);
	
	float std = out[0];
	std /= SIZE;
	std = sqrt(std);
	printf("STD = %f\n", std);
	
	// Kurtosis calculation

	cudaMemcpy(_input, input, sizeof(float)*SIZE, cudaMemcpyHostToDevice);
	
	cudaEventRecord(start, 0);
	block = SIZE/nTHREAD;
	subNpowr4<<<block, nTHREAD>>>(_input, _out, _mean);

	cudaMemcpy(out, _out, sizeof(float)*SIZE, cudaMemcpyDeviceToHost);	
	cudaMemcpy(_input, out, sizeof(float)*SIZE, cudaMemcpyHostToDevice);	
	flag = 0;
	block = SIZE/nTHREAD;
	while(block > 1) {
		if(flag == 0) {
			sumTotal<<<block, nTHREAD>>>(_input, _out);
			flag = 1;
		}
		else {
			sumTotal<<<block,nTHREAD >>>(_out, _input);
			flag = 0;
		}
		remainder = block;
		block /= nTHREAD;
	}
	if(flag == 0) {
		sumTotal<<<1, remainder>>>(_input, _out);
		cudaMemcpy(out, _out, sizeof(float)*SIZE, cudaMemcpyDeviceToHost);
	}
	else {
		sumTotal<<<1, remainder>>>(_out, _input);	
		cudaMemcpy(out, _input, sizeof(float)*SIZE, cudaMemcpyDeviceToHost);
	}
	cudaEventRecord(stop, 0);
	cudaEventSynchronize(stop);
	cudaEventElapsedTime(&_time, start, stop);
	printf("Elapsed Time(kurtosis) = %.5f\n", _time);
	
	float kurtosis = out[0];
	kurtosis /= SIZE;
	kurtosis /= pow(std, 4);
	printf("Kurtosis = %f\n", kurtosis);

	cudaFree(_input);
	cudaFree(_out);
	cudaFree(_mean);
}

	.file	"tmpxft_0033af4f_00000000-6_new.cudafe1.cpp"
	.text
#APP

#NO_APP
	.type	_ZL26__cudaUnregisterBinaryUtilv, @function
_ZL26__cudaUnregisterBinaryUtilv:
.LFB2030:
	.cfi_startproc
	endbr64
	movq	_ZL20__cudaFatCubinHandle(%rip), %rdi
	jmp	__cudaUnregisterFatBinary@PLT
	.cfi_endproc
.LFE2030:
	.size	_ZL26__cudaUnregisterBinaryUtilv, .-_ZL26__cudaUnregisterBinaryUtilv
	.globl	_Z24__device_stub__Z3minPfS_PfS_
	.type	_Z24__device_stub__Z3minPfS_PfS_, @function
_Z24__device_stub__Z3minPfS_PfS_:
.LFB2052:
	.cfi_startproc
	endbr64
	subq	$120, %rsp
	.cfi_def_cfa_offset 128
	movq	%rdi, 8(%rsp)
	leaq	32(%rsp), %rcx
	leaq	24(%rsp), %rdx
	movq	%rsi, (%rsp)
	leaq	40(%rsp), %rdi
	leaq	52(%rsp), %rsi
	movq	%fs:40, %rax
	movq	%rax, 104(%rsp)
	xorl	%eax, %eax
	leaq	8(%rsp), %rax
	movl	$1, 48(%rsp)
	movq	%rax, 88(%rsp)
	movq	%rsp, %rax
	movq	%rax, 96(%rsp)
	movabsq	$4294967297, %rax
	movq	%rax, 40(%rsp)
	movq	%rax, 52(%rsp)
	movl	$1, 60(%rsp)
	call	__cudaPopCallConfiguration@PLT
	testl	%eax, %eax
	jne	.L2
	pushq	32(%rsp)
	.cfi_def_cfa_offset 136
	leaq	_Z3minPfS_(%rip), %rdi
	pushq	32(%rsp)
	.cfi_def_cfa_offset 144
	movq	68(%rsp), %rcx
	movl	76(%rsp), %r8d
	movq	56(%rsp), %rsi
	movl	64(%rsp), %edx
	leaq	104(%rsp), %r9
	call	cudaLaunchKernel@PLT
	popq	%rax
	.cfi_def_cfa_offset 136
	popq	%rdx
	.cfi_def_cfa_offset 128
.L2:
	movq	104(%rsp), %rax
	subq	%fs:40, %rax
	je	.L4
	call	__stack_chk_fail@PLT
.L4:
	addq	$120, %rsp
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE2052:
	.size	_Z24__device_stub__Z3minPfS_PfS_, .-_Z24__device_stub__Z3minPfS_PfS_
	.globl	_Z3minPfS_
	.type	_Z3minPfS_, @function
_Z3minPfS_:
.LFB2053:
	.cfi_startproc
	endbr64
	jmp	_Z24__device_stub__Z3minPfS_PfS_
	.cfi_endproc
.LFE2053:
	.size	_Z3minPfS_, .-_Z3minPfS_
	.globl	_Z24__device_stub__Z3maxPfS_PfS_
	.type	_Z24__device_stub__Z3maxPfS_PfS_, @function
_Z24__device_stub__Z3maxPfS_PfS_:
.LFB2054:
	.cfi_startproc
	endbr64
	subq	$120, %rsp
	.cfi_def_cfa_offset 128
	movq	%rdi, 8(%rsp)
	leaq	32(%rsp), %rcx
	leaq	24(%rsp), %rdx
	movq	%rsi, (%rsp)
	leaq	40(%rsp), %rdi
	leaq	52(%rsp), %rsi
	movq	%fs:40, %rax
	movq	%rax, 104(%rsp)
	xorl	%eax, %eax
	leaq	8(%rsp), %rax
	movl	$1, 48(%rsp)
	movq	%rax, 88(%rsp)
	movq	%rsp, %rax
	movq	%rax, 96(%rsp)
	movabsq	$4294967297, %rax
	movq	%rax, 40(%rsp)
	movq	%rax, 52(%rsp)
	movl	$1, 60(%rsp)
	call	__cudaPopCallConfiguration@PLT
	testl	%eax, %eax
	jne	.L8
	pushq	32(%rsp)
	.cfi_def_cfa_offset 136
	leaq	_Z3maxPfS_(%rip), %rdi
	pushq	32(%rsp)
	.cfi_def_cfa_offset 144
	movq	68(%rsp), %rcx
	movl	76(%rsp), %r8d
	movq	56(%rsp), %rsi
	movl	64(%rsp), %edx
	leaq	104(%rsp), %r9
	call	cudaLaunchKernel@PLT
	popq	%rax
	.cfi_def_cfa_offset 136
	popq	%rdx
	.cfi_def_cfa_offset 128
.L8:
	movq	104(%rsp), %rax
	subq	%fs:40, %rax
	je	.L10
	call	__stack_chk_fail@PLT
.L10:
	addq	$120, %rsp
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE2054:
	.size	_Z24__device_stub__Z3maxPfS_PfS_, .-_Z24__device_stub__Z3maxPfS_PfS_
	.globl	_Z3maxPfS_
	.type	_Z3maxPfS_, @function
_Z3maxPfS_:
.LFB2055:
	.cfi_startproc
	endbr64
	jmp	_Z24__device_stub__Z3maxPfS_PfS_
	.cfi_endproc
.LFE2055:
	.size	_Z3maxPfS_, .-_Z3maxPfS_
	.globl	_Z29__device_stub__Z8sumTotalPfS_PfS_
	.type	_Z29__device_stub__Z8sumTotalPfS_PfS_, @function
_Z29__device_stub__Z8sumTotalPfS_PfS_:
.LFB2056:
	.cfi_startproc
	endbr64
	subq	$120, %rsp
	.cfi_def_cfa_offset 128
	movq	%rdi, 8(%rsp)
	leaq	32(%rsp), %rcx
	leaq	24(%rsp), %rdx
	movq	%rsi, (%rsp)
	leaq	40(%rsp), %rdi
	leaq	52(%rsp), %rsi
	movq	%fs:40, %rax
	movq	%rax, 104(%rsp)
	xorl	%eax, %eax
	leaq	8(%rsp), %rax
	movl	$1, 48(%rsp)
	movq	%rax, 88(%rsp)
	movq	%rsp, %rax
	movq	%rax, 96(%rsp)
	movabsq	$4294967297, %rax
	movq	%rax, 40(%rsp)
	movq	%rax, 52(%rsp)
	movl	$1, 60(%rsp)
	call	__cudaPopCallConfiguration@PLT
	testl	%eax, %eax
	jne	.L13
	pushq	32(%rsp)
	.cfi_def_cfa_offset 136
	leaq	_Z8sumTotalPfS_(%rip), %rdi
	pushq	32(%rsp)
	.cfi_def_cfa_offset 144
	movq	68(%rsp), %rcx
	movl	76(%rsp), %r8d
	movq	56(%rsp), %rsi
	movl	64(%rsp), %edx
	leaq	104(%rsp), %r9
	call	cudaLaunchKernel@PLT
	popq	%rax
	.cfi_def_cfa_offset 136
	popq	%rdx
	.cfi_def_cfa_offset 128
.L13:
	movq	104(%rsp), %rax
	subq	%fs:40, %rax
	je	.L15
	call	__stack_chk_fail@PLT
.L15:
	addq	$120, %rsp
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE2056:
	.size	_Z29__device_stub__Z8sumTotalPfS_PfS_, .-_Z29__device_stub__Z8sumTotalPfS_PfS_
	.globl	_Z8sumTotalPfS_
	.type	_Z8sumTotalPfS_, @function
_Z8sumTotalPfS_:
.LFB2057:
	.cfi_startproc
	endbr64
	jmp	_Z29__device_stub__Z8sumTotalPfS_PfS_
	.cfi_endproc
.LFE2057:
	.size	_Z8sumTotalPfS_, .-_Z8sumTotalPfS_
	.globl	_Z34__device_stub__Z10subNsquarePfS_S_PfS_S_
	.type	_Z34__device_stub__Z10subNsquarePfS_S_PfS_S_, @function
_Z34__device_stub__Z10subNsquarePfS_S_PfS_S_:
.LFB2058:
	.cfi_startproc
	endbr64
	subq	$136, %rsp
	.cfi_def_cfa_offset 144
	movq	%rdi, 24(%rsp)
	leaq	40(%rsp), %rcx
	leaq	48(%rsp), %rdi
	movq	%rsi, 16(%rsp)
	leaq	60(%rsp), %rsi
	movq	%rdx, 8(%rsp)
	leaq	32(%rsp), %rdx
	movq	%fs:40, %rax
	movq	%rax, 120(%rsp)
	xorl	%eax, %eax
	leaq	24(%rsp), %rax
	movl	$1, 56(%rsp)
	movq	%rax, 96(%rsp)
	leaq	16(%rsp), %rax
	movq	%rax, 104(%rsp)
	leaq	8(%rsp), %rax
	movq	%rax, 112(%rsp)
	movabsq	$4294967297, %rax
	movq	%rax, 48(%rsp)
	movq	%rax, 60(%rsp)
	movl	$1, 68(%rsp)
	call	__cudaPopCallConfiguration@PLT
	testl	%eax, %eax
	jne	.L18
	pushq	40(%rsp)
	.cfi_def_cfa_offset 152
	leaq	_Z10subNsquarePfS_S_(%rip), %rdi
	pushq	40(%rsp)
	.cfi_def_cfa_offset 160
	movq	76(%rsp), %rcx
	movl	84(%rsp), %r8d
	movq	64(%rsp), %rsi
	movl	72(%rsp), %edx
	leaq	112(%rsp), %r9
	call	cudaLaunchKernel@PLT
	popq	%rax
	.cfi_def_cfa_offset 152
	popq	%rdx
	.cfi_def_cfa_offset 144
.L18:
	movq	120(%rsp), %rax
	subq	%fs:40, %rax
	je	.L20
	call	__stack_chk_fail@PLT
.L20:
	addq	$136, %rsp
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE2058:
	.size	_Z34__device_stub__Z10subNsquarePfS_S_PfS_S_, .-_Z34__device_stub__Z10subNsquarePfS_S_PfS_S_
	.globl	_Z10subNsquarePfS_S_
	.type	_Z10subNsquarePfS_S_, @function
_Z10subNsquarePfS_S_:
.LFB2059:
	.cfi_startproc
	endbr64
	jmp	_Z34__device_stub__Z10subNsquarePfS_S_PfS_S_
	.cfi_endproc
.LFE2059:
	.size	_Z10subNsquarePfS_S_, .-_Z10subNsquarePfS_S_
	.globl	_Z32__device_stub__Z9subNpowr4PfS_S_PfS_S_
	.type	_Z32__device_stub__Z9subNpowr4PfS_S_PfS_S_, @function
_Z32__device_stub__Z9subNpowr4PfS_S_PfS_S_:
.LFB2060:
	.cfi_startproc
	endbr64
	subq	$136, %rsp
	.cfi_def_cfa_offset 144
	movq	%rdi, 24(%rsp)
	leaq	40(%rsp), %rcx
	leaq	48(%rsp), %rdi
	movq	%rsi, 16(%rsp)
	leaq	60(%rsp), %rsi
	movq	%rdx, 8(%rsp)
	leaq	32(%rsp), %rdx
	movq	%fs:40, %rax
	movq	%rax, 120(%rsp)
	xorl	%eax, %eax
	leaq	24(%rsp), %rax
	movl	$1, 56(%rsp)
	movq	%rax, 96(%rsp)
	leaq	16(%rsp), %rax
	movq	%rax, 104(%rsp)
	leaq	8(%rsp), %rax
	movq	%rax, 112(%rsp)
	movabsq	$4294967297, %rax
	movq	%rax, 48(%rsp)
	movq	%rax, 60(%rsp)
	movl	$1, 68(%rsp)
	call	__cudaPopCallConfiguration@PLT
	testl	%eax, %eax
	jne	.L23
	pushq	40(%rsp)
	.cfi_def_cfa_offset 152
	leaq	_Z9subNpowr4PfS_S_(%rip), %rdi
	pushq	40(%rsp)
	.cfi_def_cfa_offset 160
	movq	76(%rsp), %rcx
	movl	84(%rsp), %r8d
	movq	64(%rsp), %rsi
	movl	72(%rsp), %edx
	leaq	112(%rsp), %r9
	call	cudaLaunchKernel@PLT
	popq	%rax
	.cfi_def_cfa_offset 152
	popq	%rdx
	.cfi_def_cfa_offset 144
.L23:
	movq	120(%rsp), %rax
	subq	%fs:40, %rax
	je	.L25
	call	__stack_chk_fail@PLT
.L25:
	addq	$136, %rsp
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE2060:
	.size	_Z32__device_stub__Z9subNpowr4PfS_S_PfS_S_, .-_Z32__device_stub__Z9subNpowr4PfS_S_PfS_S_
	.globl	_Z9subNpowr4PfS_S_
	.type	_Z9subNpowr4PfS_S_, @function
_Z9subNpowr4PfS_S_:
.LFB2061:
	.cfi_startproc
	endbr64
	jmp	_Z32__device_stub__Z9subNpowr4PfS_S_PfS_S_
	.cfi_endproc
.LFE2061:
	.size	_Z9subNpowr4PfS_S_, .-_Z9subNpowr4PfS_S_
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC4:
	.string	"Act std = %f\n"
.LC6:
	.string	"Act kr = %f\n"
.LC7:
	.string	"Error in allocation %d %d\n"
.LC8:
	.string	"Elapsed Time(MIN) = %f\n"
.LC9:
	.string	"MIN = %f\n"
.LC10:
	.string	"Elapsed Time(MAX) = %.5f\n"
.LC11:
	.string	"MAX = %f\n"
.LC12:
	.string	"MEAN = %f\n"
.LC13:
	.string	"Elapsed Time(STD) = %.5f\n"
.LC14:
	.string	"STD = %f\n"
.LC15:
	.string	"Elapsed Time(kurtosis) = %.5f\n"
.LC16:
	.string	"Kurtosis = %f\n"
	.section	.text.startup,"ax",@progbits
	.globl	main
	.type	main, @function
main:
.LFB2027:
	.cfi_startproc
	endbr64
	pushq	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	pushq	%r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	pushq	%r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	pushq	%r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	xorl	%r12d, %r12d
	pushq	%rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	subq	$120, %rsp
	.cfi_def_cfa_offset 176
	movq	%fs:40, %rax
	movq	%rax, 104(%rsp)
	xorl	%eax, %eax
	leaq	48(%rsp), %rdi
	movl	$0x00000000, 24(%rsp)
	call	cudaEventCreate@PLT
	leaq	56(%rsp), %rdi
	call	cudaEventCreate@PLT
	movl	$4194304, %edi
	call	malloc@PLT
	movl	$4194304, %edi
	movq	%rax, %rbp
	call	malloc@PLT
	leaq	64(%rsp), %rdi
	movq	%rax, %rbx
	call	time@PLT
	movl	64(%rsp), %edi
	call	srand@PLT
	xorps	%xmm1, %xmm1
.L29:
	movss	%xmm1, 8(%rsp)
	call	rand@PLT
	movss	.LC2(%rip), %xmm2
	movss	8(%rsp), %xmm1
	cvtsi2ssl	%eax, %xmm0
	mulss	.LC1(%rip), %xmm0
	mulss	%xmm2, %xmm0
	mulss	%xmm2, %xmm0
	movss	%xmm0, 0(%rbp,%r12,4)
	incq	%r12
	addss	%xmm0, %xmm1
	cmpq	$1048576, %r12
	jne	.L29
	mulss	.LC3(%rip), %xmm1
	xorl	%eax, %eax
	xorps	%xmm0, %xmm0
	movss	%xmm1, 8(%rsp)
.L30:
	movss	0(%rbp,%rax,4), %xmm1
	subss	8(%rsp), %xmm1
	cvtss2sd	%xmm0, %xmm0
	incq	%rax
	cvtss2sd	%xmm1, %xmm1
	mulsd	%xmm1, %xmm1
	addsd	%xmm1, %xmm0
	cvtsd2ss	%xmm0, %xmm0
	cmpq	$1048576, %rax
	jne	.L30
	mulss	.LC3(%rip), %xmm0
	xorl	%r12d, %r12d
	movd	%xmm0, %r15d
	call	sqrtf@PLT
	leaq	.LC4(%rip), %rsi
	movl	$2, %edi
	movb	$1, %al
	cvtss2sd	%xmm0, %xmm0
	call	__printf_chk@PLT
	xorps	%xmm2, %xmm2
.L31:
	movss	0(%rbp,%r12,4), %xmm0
	subss	8(%rsp), %xmm0
	movss	%xmm2, 12(%rsp)
	incq	%r12
	movsd	.LC5(%rip), %xmm1
	cvtss2sd	%xmm0, %xmm0
	call	pow@PLT
	movss	12(%rsp), %xmm2
	cvtss2sd	%xmm2, %xmm2
	addsd	%xmm0, %xmm2
	cvtsd2ss	%xmm2, %xmm2
	cmpq	$1048576, %r12
	jne	.L31
	movsd	.LC5(%rip), %xmm1
	movd	%r15d, %xmm4
	movss	%xmm2, 8(%rsp)
	cvtss2sd	%xmm4, %xmm0
	call	pow@PLT
	movss	8(%rsp), %xmm2
	leaq	.LC6(%rip), %rsi
	movb	$1, %al
	mulss	.LC3(%rip), %xmm2
	movl	$2, %edi
	cvtss2sd	%xmm2, %xmm2
	divsd	%xmm0, %xmm2
	cvtsd2ss	%xmm2, %xmm2
	cvtss2sd	%xmm2, %xmm0
	call	__printf_chk@PLT
	leaq	32(%rsp), %rdi
	movl	$4194304, %esi
	call	cudaMalloc@PLT
	leaq	40(%rsp), %rdi
	movl	$4194304, %esi
	movl	%eax, %r12d
	call	cudaMalloc@PLT
	movl	%eax, %ecx
	movl	%r12d, %eax
	orl	%ecx, %eax
	je	.L32
	movl	$2, %edi
	movl	%r12d, %edx
	leaq	.LC7(%rip), %rsi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	xorl	%edi, %edi
	call	exit@PLT
.L32:
	movq	32(%rsp), %rdi
	movl	$1, %ecx
	movl	$4194304, %edx
	movq	%rbp, %rsi
	movl	$2, %r14d
	movl	$2048, %r12d
	movabsq	$4294967808, %r13
	call	cudaMemcpy@PLT
	movq	48(%rsp), %rdi
	xorl	%esi, %esi
	call	cudaEventRecord@PLT
	xorl	%eax, %eax
.L37:
	testl	%eax, %eax
	movl	%r12d, 80(%rsp)
	movl	$0, %r9d
	movq	%r13, %rdx
	movq	%r13, 92(%rsp)
	movl	$0, %r8d
	movl	$1, %ecx
	movabsq	$4294967297, %rax
	movq	%rax, 84(%rsp)
	movq	80(%rsp), %rdi
	movl	$1, 100(%rsp)
	movl	88(%rsp), %esi
	jne	.L33
	call	__cudaPushCallConfiguration@PLT
	testl	%eax, %eax
	jne	.L34
	movq	40(%rsp), %rsi
	movq	32(%rsp), %rdi
	call	_Z24__device_stub__Z3minPfS_PfS_
.L34:
	movl	$1, %eax
	jmp	.L35
.L33:
	call	__cudaPushCallConfiguration@PLT
	testl	%eax, %eax
	jne	.L36
	movq	32(%rsp), %rsi
	movq	40(%rsp), %rdi
	call	_Z24__device_stub__Z3minPfS_PfS_
.L36:
	xorl	%eax, %eax
.L35:
	sarl	$9, %r12d
	decl	%r14d
	je	.L95
	movl	$1, %r14d
	jmp	.L37
.L95:
	testl	%eax, %eax
	movl	$1, 100(%rsp)
	movabsq	$4294967300, %rdx
	movabsq	$4294967297, %rdi
	movq	%rdx, 92(%rsp)
	movl	$1, %ecx
	movl	$1, %esi
	movl	$0, %r9d
	movq	%rdi, 80(%rsp)
	movl	$0, %r8d
	movl	$1, 88(%rsp)
	jne	.L38
	call	__cudaPushCallConfiguration@PLT
	testl	%eax, %eax
	jne	.L39
	movq	40(%rsp), %rsi
	movq	32(%rsp), %rdi
	call	_Z24__device_stub__Z3minPfS_PfS_
.L39:
	movq	40(%rsp), %rsi
	movl	$2, %ecx
	movl	$4194304, %edx
	jmp	.L90
.L38:
	call	__cudaPushCallConfiguration@PLT
	testl	%eax, %eax
	jne	.L41
	movq	32(%rsp), %rsi
	movq	40(%rsp), %rdi
	call	_Z24__device_stub__Z3minPfS_PfS_
.L41:
	movq	32(%rsp), %rsi
	movl	$2, %ecx
	movl	$4194304, %edx
.L90:
	movq	%rbx, %rdi
	leaq	24(%rsp), %r12
	movl	$2, %r15d
	movl	$2048, %r13d
	call	cudaMemcpy@PLT
	movq	56(%rsp), %rdi
	xorl	%esi, %esi
	movabsq	$4294967808, %r14
	call	cudaEventRecord@PLT
	movq	56(%rsp), %rdi
	call	cudaEventSynchronize@PLT
	movq	56(%rsp), %rdx
	movq	48(%rsp), %rsi
	movq	%r12, %rdi
	call	cudaEventElapsedTime@PLT
	leaq	.LC8(%rip), %rsi
	movl	$2, %edi
	movb	$1, %al
	cvtss2sd	24(%rsp), %xmm0
	call	__printf_chk@PLT
	movq	40(%rsp), %rsi
	movl	$2, %ecx
	movl	$4194304, %edx
	movq	%rbx, %rdi
	call	cudaMemcpy@PLT
	movl	$2, %edi
	movb	$1, %al
	leaq	.LC9(%rip), %rsi
	cvtss2sd	(%rbx), %xmm0
	call	__printf_chk@PLT
	movq	32(%rsp), %rdi
	movq	%rbp, %rsi
	movl	$1, %ecx
	movl	$4194304, %edx
	call	cudaMemcpy@PLT
	movq	48(%rsp), %rdi
	xorl	%esi, %esi
	call	cudaEventRecord@PLT
	xorl	%eax, %eax
.L46:
	testl	%eax, %eax
	movl	%r13d, 80(%rsp)
	movl	$0, %r9d
	movq	%r14, %rdx
	movq	%r14, 92(%rsp)
	movl	$0, %r8d
	movl	$1, %ecx
	movabsq	$4294967297, %rax
	movq	%rax, 84(%rsp)
	movq	80(%rsp), %rdi
	movl	$1, 100(%rsp)
	movl	88(%rsp), %esi
	jne	.L42
	call	__cudaPushCallConfiguration@PLT
	testl	%eax, %eax
	jne	.L43
	movq	40(%rsp), %rsi
	movq	32(%rsp), %rdi
	call	_Z24__device_stub__Z3maxPfS_PfS_
.L43:
	movl	$1, %eax
	jmp	.L44
.L42:
	call	__cudaPushCallConfiguration@PLT
	testl	%eax, %eax
	jne	.L45
	movq	32(%rsp), %rsi
	movq	40(%rsp), %rdi
	call	_Z24__device_stub__Z3maxPfS_PfS_
.L45:
	xorl	%eax, %eax
.L44:
	sarl	$9, %r13d
	decl	%r15d
	je	.L96
	movl	$1, %r15d
	jmp	.L46
.L96:
	testl	%eax, %eax
	movl	$1, 100(%rsp)
	movabsq	$4294967300, %rdx
	movabsq	$4294967297, %rdi
	movq	%rdx, 92(%rsp)
	movl	$1, %ecx
	movl	$1, %esi
	movl	$0, %r9d
	movq	%rdi, 80(%rsp)
	movl	$0, %r8d
	movl	$1, 88(%rsp)
	jne	.L47
	call	__cudaPushCallConfiguration@PLT
	testl	%eax, %eax
	jne	.L48
	movq	40(%rsp), %rsi
	movq	32(%rsp), %rdi
	call	_Z24__device_stub__Z3maxPfS_PfS_
.L48:
	movq	40(%rsp), %rsi
	movl	$2, %ecx
	movl	$4194304, %edx
	jmp	.L91
.L47:
	call	__cudaPushCallConfiguration@PLT
	testl	%eax, %eax
	jne	.L50
	movq	32(%rsp), %rsi
	movq	40(%rsp), %rdi
	call	_Z24__device_stub__Z3maxPfS_PfS_
.L50:
	movq	32(%rsp), %rsi
	movl	$2, %ecx
	movl	$4194304, %edx
.L91:
	movq	%rbx, %rdi
	movl	$2, %r15d
	movl	$2048, %r13d
	movabsq	$4294967808, %r14
	call	cudaMemcpy@PLT
	movq	56(%rsp), %rdi
	xorl	%esi, %esi
	call	cudaEventRecord@PLT
	movq	56(%rsp), %rdi
	call	cudaEventSynchronize@PLT
	movq	56(%rsp), %rdx
	movq	48(%rsp), %rsi
	movq	%r12, %rdi
	call	cudaEventElapsedTime@PLT
	leaq	.LC10(%rip), %rsi
	movl	$2, %edi
	movb	$1, %al
	cvtss2sd	24(%rsp), %xmm0
	call	__printf_chk@PLT
	movq	40(%rsp), %rsi
	movl	$2, %ecx
	movl	$4194304, %edx
	movq	%rbx, %rdi
	call	cudaMemcpy@PLT
	movl	$2, %edi
	movb	$1, %al
	leaq	.LC11(%rip), %rsi
	cvtss2sd	(%rbx), %xmm0
	call	__printf_chk@PLT
	movq	32(%rsp), %rdi
	movq	%rbp, %rsi
	movl	$1, %ecx
	movl	$4194304, %edx
	call	cudaMemcpy@PLT
	movq	48(%rsp), %rdi
	xorl	%esi, %esi
	call	cudaEventRecord@PLT
	xorl	%eax, %eax
.L55:
	testl	%eax, %eax
	movl	%r13d, 80(%rsp)
	movl	$0, %r9d
	movq	%r14, %rdx
	movq	%r14, 92(%rsp)
	movl	$0, %r8d
	movl	$1, %ecx
	movabsq	$4294967297, %rax
	movq	%rax, 84(%rsp)
	movq	80(%rsp), %rdi
	movl	$1, 100(%rsp)
	movl	88(%rsp), %esi
	jne	.L51
	call	__cudaPushCallConfiguration@PLT
	testl	%eax, %eax
	jne	.L52
	movq	40(%rsp), %rsi
	movq	32(%rsp), %rdi
	call	_Z29__device_stub__Z8sumTotalPfS_PfS_
.L52:
	movl	$1, %eax
	jmp	.L53
.L51:
	call	__cudaPushCallConfiguration@PLT
	testl	%eax, %eax
	jne	.L54
	movq	32(%rsp), %rsi
	movq	40(%rsp), %rdi
	call	_Z29__device_stub__Z8sumTotalPfS_PfS_
.L54:
	xorl	%eax, %eax
.L53:
	sarl	$9, %r13d
	decl	%r15d
	je	.L97
	movl	$1, %r15d
	jmp	.L55
.L97:
	testl	%eax, %eax
	movl	$1, 100(%rsp)
	movabsq	$4294967300, %rdx
	movabsq	$4294967297, %rdi
	movq	%rdx, 92(%rsp)
	movl	$1, %ecx
	movl	$1, %esi
	movl	$0, %r9d
	movq	%rdi, 80(%rsp)
	movl	$0, %r8d
	movl	$1, 88(%rsp)
	jne	.L56
	call	__cudaPushCallConfiguration@PLT
	testl	%eax, %eax
	jne	.L57
	movq	40(%rsp), %rsi
	movq	32(%rsp), %rdi
	call	_Z29__device_stub__Z8sumTotalPfS_PfS_
.L57:
	movq	40(%rsp), %rsi
	movl	$2, %ecx
	movl	$4194304, %edx
	jmp	.L92
.L56:
	call	__cudaPushCallConfiguration@PLT
	testl	%eax, %eax
	jne	.L59
	movq	32(%rsp), %rsi
	movq	40(%rsp), %rdi
	call	_Z29__device_stub__Z8sumTotalPfS_PfS_
.L59:
	movq	32(%rsp), %rsi
	movl	$2, %ecx
	movl	$4194304, %edx
.L92:
	movq	%rbx, %rdi
	call	cudaMemcpy@PLT
	movss	.LC3(%rip), %xmm0
	mulss	(%rbx), %xmm0
	xorl	%eax, %eax
	movq	%rax, 72(%rsp)
	leaq	.LC12(%rip), %rsi
	movl	$2, %edi
	movb	$1, %al
	movss	%xmm0, 28(%rsp)
	cvtss2sd	%xmm0, %xmm0
	call	__printf_chk@PLT
	leaq	72(%rsp), %rdi
	movl	$4, %esi
	call	cudaMalloc@PLT
	movq	72(%rsp), %rdi
	leaq	28(%rsp), %rsi
	movl	$1, %ecx
	movl	$4, %edx
	call	cudaMemcpy@PLT
	movq	32(%rsp), %rdi
	movl	$1, %ecx
	movq	%rbp, %rsi
	movl	$4194304, %edx
	call	cudaMemcpy@PLT
	movl	$8388609, %edx
	xorl	%r9d, %r9d
	xorl	%r8d, %r8d
	movl	$2097153, %edi
	salq	$9, %rdx
	movl	$1, %ecx
	movl	$1, %esi
	salq	$11, %rdi
	movq	%rdx, 92(%rsp)
	movl	$1, 100(%rsp)
	movq	%rdi, 80(%rsp)
	movl	$1, 88(%rsp)
	call	__cudaPushCallConfiguration@PLT
	testl	%eax, %eax
	jne	.L60
	movq	72(%rsp), %rdx
	movq	40(%rsp), %rsi
	movq	32(%rsp), %rdi
	call	_Z34__device_stub__Z10subNsquarePfS_S_PfS_S_
.L60:
	movq	40(%rsp), %rsi
	movl	$2, %ecx
	movl	$4194304, %edx
	movq	%rbx, %rdi
	movl	$2, %r15d
	movl	$2048, %r13d
	movabsq	$4294967808, %r14
	call	cudaMemcpy@PLT
	movq	32(%rsp), %rdi
	movl	$1, %ecx
	movq	%rbx, %rsi
	movl	$4194304, %edx
	call	cudaMemcpy@PLT
	xorl	%eax, %eax
.L65:
	testl	%eax, %eax
	movl	%r13d, 80(%rsp)
	movl	$0, %r9d
	movq	%r14, %rdx
	movq	%r14, 92(%rsp)
	movl	$0, %r8d
	movl	$1, %ecx
	movabsq	$4294967297, %rax
	movq	%rax, 84(%rsp)
	movq	80(%rsp), %rdi
	movl	$1, 100(%rsp)
	movl	88(%rsp), %esi
	jne	.L61
	call	__cudaPushCallConfiguration@PLT
	testl	%eax, %eax
	jne	.L62
	movq	40(%rsp), %rsi
	movq	32(%rsp), %rdi
	call	_Z29__device_stub__Z8sumTotalPfS_PfS_
.L62:
	movl	$1, %eax
	jmp	.L63
.L61:
	call	__cudaPushCallConfiguration@PLT
	testl	%eax, %eax
	jne	.L64
	movq	32(%rsp), %rsi
	movq	40(%rsp), %rdi
	call	_Z29__device_stub__Z8sumTotalPfS_PfS_
.L64:
	xorl	%eax, %eax
.L63:
	sarl	$9, %r13d
	decl	%r15d
	je	.L98
	movl	$1, %r15d
	jmp	.L65
.L98:
	testl	%eax, %eax
	movl	$1, 100(%rsp)
	movabsq	$4294967300, %rdx
	movabsq	$4294967297, %rdi
	movq	%rdx, 92(%rsp)
	movl	$1, %ecx
	movl	$1, %esi
	movl	$0, %r9d
	movq	%rdi, 80(%rsp)
	movl	$0, %r8d
	movl	$1, 88(%rsp)
	jne	.L66
	call	__cudaPushCallConfiguration@PLT
	testl	%eax, %eax
	jne	.L67
	movq	40(%rsp), %rsi
	movq	32(%rsp), %rdi
	call	_Z29__device_stub__Z8sumTotalPfS_PfS_
.L67:
	movq	40(%rsp), %rsi
	movl	$2, %ecx
	movl	$4194304, %edx
	jmp	.L93
.L66:
	call	__cudaPushCallConfiguration@PLT
	testl	%eax, %eax
	jne	.L69
	movq	32(%rsp), %rsi
	movq	40(%rsp), %rdi
	call	_Z29__device_stub__Z8sumTotalPfS_PfS_
.L69:
	movq	32(%rsp), %rsi
	movl	$2, %ecx
	movl	$4194304, %edx
.L93:
	movq	%rbx, %rdi
	call	cudaMemcpy@PLT
	movq	56(%rsp), %rdi
	xorl	%esi, %esi
	call	cudaEventRecord@PLT
	movq	56(%rsp), %rdi
	call	cudaEventSynchronize@PLT
	movq	56(%rsp), %rdx
	movq	48(%rsp), %rsi
	movq	%r12, %rdi
	call	cudaEventElapsedTime@PLT
	leaq	.LC13(%rip), %rsi
	movl	$2, %edi
	movb	$1, %al
	cvtss2sd	24(%rsp), %xmm0
	call	__printf_chk@PLT
	movss	.LC3(%rip), %xmm0
	mulss	(%rbx), %xmm0
	call	sqrtf@PLT
	leaq	.LC14(%rip), %rsi
	movl	$2, %edi
	movb	$1, %al
	cvtss2sd	%xmm0, %xmm5
	movaps	%xmm5, %xmm0
	movq	%xmm5, %r15
	call	__printf_chk@PLT
	movq	32(%rsp), %rdi
	movl	$1, %ecx
	movq	%rbp, %rsi
	movl	$4194304, %edx
	call	cudaMemcpy@PLT
	movq	48(%rsp), %rdi
	xorl	%esi, %esi
	call	cudaEventRecord@PLT
	movl	$8388609, %edx
	xorl	%r9d, %r9d
	xorl	%r8d, %r8d
	movl	$2097153, %edi
	salq	$9, %rdx
	movl	$1, %ecx
	movl	$1, %esi
	salq	$11, %rdi
	movq	%rdx, 92(%rsp)
	movl	$1, 100(%rsp)
	movq	%rdi, 80(%rsp)
	movl	$1, 88(%rsp)
	call	__cudaPushCallConfiguration@PLT
	testl	%eax, %eax
	jne	.L70
	movq	72(%rsp), %rdx
	movq	40(%rsp), %rsi
	movq	32(%rsp), %rdi
	call	_Z32__device_stub__Z9subNpowr4PfS_S_PfS_S_
.L70:
	movq	40(%rsp), %rsi
	movl	$2, %ecx
	movl	$4194304, %edx
	movq	%rbx, %rdi
	movl	$2, %r14d
	movl	$2048, %ebp
	movabsq	$4294967808, %r13
	call	cudaMemcpy@PLT
	movq	32(%rsp), %rdi
	movl	$1, %ecx
	movq	%rbx, %rsi
	movl	$4194304, %edx
	call	cudaMemcpy@PLT
	xorl	%eax, %eax
.L75:
	testl	%eax, %eax
	movl	%ebp, 80(%rsp)
	movl	$0, %r9d
	movq	%r13, %rdx
	movq	%r13, 92(%rsp)
	movl	$0, %r8d
	movl	$1, %ecx
	movabsq	$4294967297, %rax
	movq	%rax, 84(%rsp)
	movq	80(%rsp), %rdi
	movl	$1, 100(%rsp)
	movl	88(%rsp), %esi
	jne	.L71
	call	__cudaPushCallConfiguration@PLT
	testl	%eax, %eax
	jne	.L72
	movq	40(%rsp), %rsi
	movq	32(%rsp), %rdi
	call	_Z29__device_stub__Z8sumTotalPfS_PfS_
.L72:
	movl	$1, %eax
	jmp	.L73
.L71:
	call	__cudaPushCallConfiguration@PLT
	testl	%eax, %eax
	jne	.L74
	movq	32(%rsp), %rsi
	movq	40(%rsp), %rdi
	call	_Z29__device_stub__Z8sumTotalPfS_PfS_
.L74:
	xorl	%eax, %eax
.L73:
	sarl	$9, %ebp
	decl	%r14d
	je	.L99
	movl	$1, %r14d
	jmp	.L75
.L99:
	testl	%eax, %eax
	movl	$1, 100(%rsp)
	movabsq	$4294967300, %rdx
	movabsq	$4294967297, %rdi
	movq	%rdx, 92(%rsp)
	movl	$1, %ecx
	movl	$1, %esi
	movl	$0, %r9d
	movq	%rdi, 80(%rsp)
	movl	$0, %r8d
	movl	$1, 88(%rsp)
	jne	.L76
	call	__cudaPushCallConfiguration@PLT
	testl	%eax, %eax
	jne	.L77
	movq	40(%rsp), %rsi
	movq	32(%rsp), %rdi
	call	_Z29__device_stub__Z8sumTotalPfS_PfS_
.L77:
	movq	40(%rsp), %rsi
	movl	$2, %ecx
	movl	$4194304, %edx
	jmp	.L94
.L76:
	call	__cudaPushCallConfiguration@PLT
	testl	%eax, %eax
	jne	.L79
	movq	32(%rsp), %rsi
	movq	40(%rsp), %rdi
	call	_Z29__device_stub__Z8sumTotalPfS_PfS_
.L79:
	movq	32(%rsp), %rsi
	movl	$2, %ecx
	movl	$4194304, %edx
.L94:
	movq	%rbx, %rdi
	call	cudaMemcpy@PLT
	movq	56(%rsp), %rdi
	xorl	%esi, %esi
	call	cudaEventRecord@PLT
	movq	56(%rsp), %rdi
	call	cudaEventSynchronize@PLT
	movq	56(%rsp), %rdx
	movq	48(%rsp), %rsi
	movq	%r12, %rdi
	call	cudaEventElapsedTime@PLT
	leaq	.LC15(%rip), %rsi
	movl	$2, %edi
	movb	$1, %al
	cvtss2sd	24(%rsp), %xmm0
	call	__printf_chk@PLT
	movss	(%rbx), %xmm6
	movsd	.LC5(%rip), %xmm1
	movq	%r15, %xmm0
	movss	%xmm6, 8(%rsp)
	call	pow@PLT
	leaq	.LC16(%rip), %rsi
	movl	$2, %edi
	movb	$1, %al
	movaps	%xmm0, %xmm1
	movss	.LC3(%rip), %xmm0
	mulss	8(%rsp), %xmm0
	cvtss2sd	%xmm0, %xmm0
	divsd	%xmm1, %xmm0
	cvtsd2ss	%xmm0, %xmm0
	cvtss2sd	%xmm0, %xmm0
	call	__printf_chk@PLT
	movq	32(%rsp), %rdi
	call	cudaFree@PLT
	movq	40(%rsp), %rdi
	call	cudaFree@PLT
	movq	72(%rsp), %rdi
	call	cudaFree@PLT
	movq	104(%rsp), %rax
	subq	%fs:40, %rax
	je	.L80
	call	__stack_chk_fail@PLT
.L80:
	addq	$120, %rsp
	.cfi_def_cfa_offset 56
	xorl	%eax, %eax
	popq	%rbx
	.cfi_def_cfa_offset 48
	popq	%rbp
	.cfi_def_cfa_offset 40
	popq	%r12
	.cfi_def_cfa_offset 32
	popq	%r13
	.cfi_def_cfa_offset 24
	popq	%r14
	.cfi_def_cfa_offset 16
	popq	%r15
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE2027:
	.size	main, .-main
	.section	.rodata.str1.1
.LC17:
	.string	"_Z9subNpowr4PfS_S_"
.LC18:
	.string	"_Z10subNsquarePfS_S_"
.LC19:
	.string	"_Z8sumTotalPfS_"
.LC20:
	.string	"_Z3maxPfS_"
.LC21:
	.string	"_Z3minPfS_"
	.section	.text.startup
	.type	_ZL24__sti____cudaRegisterAllv, @function
_ZL24__sti____cudaRegisterAllv:
.LFB2063:
	.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	.LC17(%rip), %rdx
	movq	%rax, %rdi
	movq	%rax, %rbx
	pushq	$0
	.cfi_def_cfa_offset 40
	movq	%rdx, %rcx
	leaq	_Z9subNpowr4PfS_S_(%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	.LC18(%rip), %rdx
	orl	$-1, %r8d
	leaq	_Z10subNsquarePfS_S_(%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	.LC19(%rip), %rdx
	orl	$-1, %r8d
	leaq	_Z8sumTotalPfS_(%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	.LC20(%rip), %rdx
	orl	$-1, %r8d
	leaq	_Z3maxPfS_(%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	.LC21(%rip), %rdx
	orl	$-1, %r8d
	leaq	_Z3minPfS_(%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
.LFE2063:
	.size	_ZL24__sti____cudaRegisterAllv, .-_ZL24__sti____cudaRegisterAllv
	.section	.init_array,"aw"
	.align 8
	.quad	_ZL24__sti____cudaRegisterAllv
	.section	.nvFatBinSegment,"aw"
	.align 8
	.type	_ZL15__fatDeviceText, @object
	.size	_ZL15__fatDeviceText, 24
_ZL15__fatDeviceText:
	.long	1180844977
	.long	1
	.quad	fatbinData
	.quad	0
	.local	_ZL20__cudaFatCubinHandle
	.comm	_ZL20__cudaFatCubinHandle,8,8
	.section	.rodata.cst4,"aM",@progbits,4
	.align 4
.LC1:
	.long	805306368
	.align 4
.LC2:
	.long	1149239296
	.align 4
.LC3:
	.long	897581056
	.section	.rodata.cst8,"aM",@progbits,8
	.align 8
.LC5:
	.long	0
	.long	1074790400
	.ident	"GCC: (Ubuntu 13.3.0-6ubuntu2~24.04) 13.3.0"
	.section	.note.GNU-stack,"",@progbits
	.section	.note.gnu.property,"a"
	.align 8
	.long	1f - 0f
	.long	4f - 1f
	.long	5
0:
	.string	"GNU"
1:
	.align 8
	.long	0xc0000002
	.long	3f - 2f
2:
	.long	0x3
3:
	.align 8
4:


#include <hip/hip_runtime.h>
#include <stdio.h>
#include <stdlib.h>
#include <time.h>

#define SIZE 1024*1024
#define nTHREAD 512

__global__ void min(float *input, float *out) {
	__shared__ float sData[nTHREAD];
	int tid = threadIdx.x;
	int iter = tid + blockIdx.x*blockDim.x;
	sData[tid] = input[iter];
	__syncthreads();
	for(int s = blockDim.x/2; s > 0; s /= 2) {
		if(iter < (s+blockIdx.x*blockDim.x)) {
			sData[tid] = (sData[tid] < sData[tid+s]) ? sData[tid] : sData[tid+s];  
		}
		__syncthreads();
	}
	if(tid == 0) {		
		out[blockIdx.x] = sData[0]; 
	}
}

__global__ void max(float *input, float *out) {
	__shared__ float sData[nTHREAD];
	int tid = threadIdx.x;
	int iter = tid + blockIdx.x*blockDim.x;
	sData[tid] = input[iter];
	__syncthreads();
	for(int s = blockDim.x/2; s > 0; s /= 2) {
		if(iter < (s+blockIdx.x*blockDim.x)) {
			sData[tid] = (sData[tid] > sData[tid+s]) ? sData[tid] : sData[tid+s];  
		}
		__syncthreads();
	}
	if(tid == 0) {		
		out[blockIdx.x] = sData[0]; 
	}
}

__global__ void sumTotal(float *input, float *out) {
	__shared__ float sData[nTHREAD];
	int tid = threadIdx.x;
	int iter = tid + blockIdx.x*blockDim.x;
	sData[tid] = input[iter];
	__syncthreads();
	for(int s = blockDim.x/2; s > 0; s /= 2) {
		if(iter < (s+blockIdx.x*blockDim.x)) {
			sData[tid] = sData[tid] + sData[tid+s];  
		}
		__syncthreads();
	}
	if(tid == 0) {		
		out[blockIdx.x] = sData[0]; 
	}
}

__global__ void subNsquare(float *input, float *out, float *mean) {
	__shared__ float sData[nTHREAD];
	int tid = threadIdx.x;
	int iter = tid + blockIdx.x*blockDim.x;
	sData[tid] = input[iter];
	out[iter] = pow(sData[tid] - *mean, 2);
}

__global__ void subNpowr4(float *input, float *out, float *mean) {
	__shared__ float sData[nTHREAD];
	int tid = threadIdx.x;
	int iter = tid + blockIdx.x*blockDim.x;
	sData[tid] = input[iter];
	out[iter] = pow(sData[tid] -* mean, 4); 
}

int main() {
	float *input, *out, *_input, *_out;
	hipEvent_t start, stop;
	float _time = 0.0;
	time_t seconds;	
	
	hipEventCreate(&start);	
	hipEventCreate(&stop);
	input = (float*)malloc(sizeof(float)*SIZE);
	out = (float*)malloc(sizeof(float)*SIZE);
	time(&seconds);
	srand((unsigned int)seconds);

	float stdv = 0,mv = 0,kr = 0;	
	for(int i = 0; i < SIZE; i++) {
		input[i] = (float)rand()/(float)(RAND_MAX) * SIZE;mv += input[i];
		//input[i] = (int)rand()%SIZE;
		//input[i] = SIZE - i;
	}
	mv /= SIZE; for(int j=0;j<SIZE;j++){stdv += pow(input[j]-mv, 2);}stdv /= SIZE; printf("Act std = %f\n", sqrt(stdv));
	for(int j=0;j<SIZE;j++){kr += pow(input[j]-mv, 4);}kr /= SIZE; kr /= pow(stdv, 4); printf("Act kr = %f\n", kr);
	hipError_t err1, err2;
	err1 = hipMalloc((void**)&_input, sizeof(float)*SIZE);
	err2 = hipMalloc((void**)&_out, sizeof(float)*SIZE);
	if(err1 != hipSuccess || err2 != hipSuccess) {
		printf("Error in allocation %d %d\n", err1, err2);
		exit(0);
	}
	
	// Minimum Calculation
	hipMemcpy(_input, input, sizeof(float)*SIZE, hipMemcpyHostToDevice);
	
	hipEventRecord(start, 0);
	int flag = 0;
	int block = SIZE/nTHREAD, remainder;
	while(block > 1) {
		if(flag == 0) {
			min<<<block,nTHREAD >>>(_input, _out);
			flag = 1;
		}
		else {
			min<<<block,nTHREAD >>>(_out, _input);
			flag = 0;
		}
		remainder = block;
		block /= nTHREAD;
	}
	if(flag == 0) {
		min<<<1, remainder>>>(_input, _out);
		hipMemcpy(out, _out, sizeof(float)*SIZE, hipMemcpyDeviceToHost);
	}
	else {
		min<<<1, remainder>>>(_out, _input);	
		hipMemcpy(out, _input, sizeof(float)*SIZE, hipMemcpyDeviceToHost);
	}
	hipEventRecord(stop, 0);
	hipEventSynchronize(stop);
	hipEventElapsedTime(&_time, start, stop);
	printf("Elapsed Time(MIN) = %f\n", _time);
	
	hipMemcpy(out, _out, sizeof(float)*SIZE, hipMemcpyDeviceToHost);
	printf("MIN = %f\n",out[0]);
	
	// Maximum Calculation
	hipMemcpy(_input, input, sizeof(float)*SIZE, hipMemcpyHostToDevice);
	
	hipEventRecord(start, 0);
	flag = 0;
	block = SIZE/nTHREAD;
	while(block > 1) {
		if(flag == 0) {
			max<<<block,nTHREAD >>>(_input, _out);
			flag = 1;
		}
		else {
			max<<<block,nTHREAD >>>(_out, _input);
			flag = 0;
		}
		remainder = block;
		block /= nTHREAD;
	}
	if(flag == 0) {
		max<<<1, remainder>>>(_input, _out);
		hipMemcpy(out, _out, sizeof(float)*SIZE, hipMemcpyDeviceToHost);
	}
	else {
		max<<<1, remainder>>>(_out, _input);	
		hipMemcpy(out, _input, sizeof(float)*SIZE, hipMemcpyDeviceToHost);
	}
	hipEventRecord(stop, 0);
	hipEventSynchronize(stop);
	hipEventElapsedTime(&_time, start, stop);
	printf("Elapsed Time(MAX) = %.5f\n", _time);
	
	hipMemcpy(out, _out, sizeof(float)*SIZE, hipMemcpyDeviceToHost);
	printf("MAX = %f\n",out[0]);
	
	// STD calculation
	hipMemcpy(_input, input, sizeof(float)*SIZE, hipMemcpyHostToDevice);
	
	hipEventRecord(start, 0);
	flag = 0;
	block = SIZE/nTHREAD;
	while(block > 1) {
		if(flag == 0) {
			sumTotal<<<block, nTHREAD>>>(_input, _out);
			flag = 1;
		}
		else {
			sumTotal<<<block,nTHREAD >>>(_out, _input);
			flag = 0;
		}
		remainder = block;
		block /= nTHREAD;
	}
	if(flag == 0) {
		sumTotal<<<1, remainder>>>(_input, _out);
		hipMemcpy(out, _out, sizeof(float)*SIZE, hipMemcpyDeviceToHost);
	}
	else {
		sumTotal<<<1, remainder>>>(_out, _input);	
		hipMemcpy(out, _input, sizeof(float)*SIZE, hipMemcpyDeviceToHost);
	}
	
	float mean = out[0], *_mean = NULL;
	mean /= SIZE;
	printf("MEAN = %f\n",mean);
	
	hipMalloc((void**)&_mean, sizeof(float));
	hipMemcpy(_mean, &mean, sizeof(float), hipMemcpyHostToDevice);
	
	block = SIZE/nTHREAD;
	hipMemcpy(_input, input, sizeof(float)*SIZE, hipMemcpyHostToDevice);
	subNsquare<<<block, nTHREAD>>>(_input, _out, _mean);
	hipMemcpy(out, _out, sizeof(float)*SIZE, hipMemcpyDeviceToHost);	
	hipMemcpy(_input, out, sizeof(float)*SIZE, hipMemcpyHostToDevice);	
	flag = 0;
	block = SIZE/nTHREAD;
	while(block > 1) {
		if(flag == 0) {
			sumTotal<<<block, nTHREAD>>>(_input, _out);
			flag = 1;
		}
		else {
			sumTotal<<<block,nTHREAD >>>(_out, _input);
			flag = 0;
		}
		remainder = block;
		block /= nTHREAD;
	}
	if(flag == 0) {
		sumTotal<<<1, remainder>>>(_input, _out);
		hipMemcpy(out, _out, sizeof(float)*SIZE, hipMemcpyDeviceToHost);
	}
	else {
		sumTotal<<<1, remainder>>>(_out, _input);	
		hipMemcpy(out, _input, sizeof(float)*SIZE, hipMemcpyDeviceToHost);
	}
	hipEventRecord(stop, 0);
	hipEventSynchronize(stop);
	hipEventElapsedTime(&_time, start, stop);
	printf("Elapsed Time(STD) = %.5f\n", _time);
	
	float std = out[0];
	std /= SIZE;
	std = sqrt(std);
	printf("STD = %f\n", std);
	
	// Kurtosis calculation

	hipMemcpy(_input, input, sizeof(float)*SIZE, hipMemcpyHostToDevice);
	
	hipEventRecord(start, 0);
	block = SIZE/nTHREAD;
	subNpowr4<<<block, nTHREAD>>>(_input, _out, _mean);

	hipMemcpy(out, _out, sizeof(float)*SIZE, hipMemcpyDeviceToHost);	
	hipMemcpy(_input, out, sizeof(float)*SIZE, hipMemcpyHostToDevice);	
	flag = 0;
	block = SIZE/nTHREAD;
	while(block > 1) {
		if(flag == 0) {
			sumTotal<<<block, nTHREAD>>>(_input, _out);
			flag = 1;
		}
		else {
			sumTotal<<<block,nTHREAD >>>(_out, _input);
			flag = 0;
		}
		remainder = block;
		block /= nTHREAD;
	}
	if(flag == 0) {
		sumTotal<<<1, remainder>>>(_input, _out);
		hipMemcpy(out, _out, sizeof(float)*SIZE, hipMemcpyDeviceToHost);
	}
	else {
		sumTotal<<<1, remainder>>>(_out, _input);	
		hipMemcpy(out, _input, sizeof(float)*SIZE, hipMemcpyDeviceToHost);
	}
	hipEventRecord(stop, 0);
	hipEventSynchronize(stop);
	hipEventElapsedTime(&_time, start, stop);
	printf("Elapsed Time(kurtosis) = %.5f\n", _time);
	
	float kurtosis = out[0];
	kurtosis /= SIZE;
	kurtosis /= pow(std, 4);
	printf("Kurtosis = %f\n", kurtosis);

	hipFree(_input);
	hipFree(_out);
	hipFree(_mean);
}

	.text
	.file	"new.hip"
	.globl	_Z18__device_stub__minPfS_      # -- Begin function _Z18__device_stub__minPfS_
	.type	_Z18__device_stub__minPfS_,@function
_Z18__device_stub__minPfS_:             # @_Z18__device_stub__minPfS_
	.cfi_startproc
# %bb.0:
	pushq	%r15
	.cfi_def_cfa_offset 16
	pushq	%r14
	.cfi_def_cfa_offset 24
	pushq	%r13
	.cfi_def_cfa_offset 32
	pushq	%r12
	.cfi_def_cfa_offset 40
	pushq	%rbx
	.cfi_def_cfa_offset 48
	subq	$80, %rsp
	.cfi_def_cfa_offset 128
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r13, -32
	.cfi_offset %r14, -24
	.cfi_offset %r15, -16
	leaq	24(%rsp), %rax
	movq	%rdi, (%rax)
	leaq	16(%rsp), %rcx
	movq	%rsi, (%rcx)
	leaq	64(%rsp), %rbx
	movq	%rax, (%rbx)
	movq	%rcx, 8(%rbx)
	leaq	48(%rsp), %r14
	leaq	32(%rsp), %r15
	leaq	8(%rsp), %r12
	movq	%rsp, %r13
	movq	%r14, %rdi
	movq	%r15, %rsi
	movq	%r12, %rdx
	movq	%r13, %rcx
	callq	__hipPopCallConfiguration
	movq	(%r14), %rsi
	movl	8(%r14), %edx
	movq	(%r15), %rcx
	movl	8(%r15), %r8d
	movl	$_Z3minPfS_, %edi
	movq	%rbx, %r9
	pushq	(%r13)
	.cfi_adjust_cfa_offset 8
	pushq	(%r12)
	.cfi_adjust_cfa_offset 8
	callq	hipLaunchKernel
	addq	$96, %rsp
	.cfi_adjust_cfa_offset -96
	popq	%rbx
	.cfi_def_cfa_offset 40
	popq	%r12
	.cfi_def_cfa_offset 32
	popq	%r13
	.cfi_def_cfa_offset 24
	popq	%r14
	.cfi_def_cfa_offset 16
	popq	%r15
	.cfi_def_cfa_offset 8
	retq
.Lfunc_end0:
	.size	_Z18__device_stub__minPfS_, .Lfunc_end0-_Z18__device_stub__minPfS_
	.cfi_endproc
                                        # -- End function
	.globl	_Z18__device_stub__maxPfS_      # -- Begin function _Z18__device_stub__maxPfS_
	.type	_Z18__device_stub__maxPfS_,@function
_Z18__device_stub__maxPfS_:             # @_Z18__device_stub__maxPfS_
	.cfi_startproc
# %bb.0:
	pushq	%r15
	.cfi_def_cfa_offset 16
	pushq	%r14
	.cfi_def_cfa_offset 24
	pushq	%r13
	.cfi_def_cfa_offset 32
	pushq	%r12
	.cfi_def_cfa_offset 40
	pushq	%rbx
	.cfi_def_cfa_offset 48
	subq	$80, %rsp
	.cfi_def_cfa_offset 128
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r13, -32
	.cfi_offset %r14, -24
	.cfi_offset %r15, -16
	leaq	24(%rsp), %rax
	movq	%rdi, (%rax)
	leaq	16(%rsp), %rcx
	movq	%rsi, (%rcx)
	leaq	64(%rsp), %rbx
	movq	%rax, (%rbx)
	movq	%rcx, 8(%rbx)
	leaq	48(%rsp), %r14
	leaq	32(%rsp), %r15
	leaq	8(%rsp), %r12
	movq	%rsp, %r13
	movq	%r14, %rdi
	movq	%r15, %rsi
	movq	%r12, %rdx
	movq	%r13, %rcx
	callq	__hipPopCallConfiguration
	movq	(%r14), %rsi
	movl	8(%r14), %edx
	movq	(%r15), %rcx
	movl	8(%r15), %r8d
	movl	$_Z3maxPfS_, %edi
	movq	%rbx, %r9
	pushq	(%r13)
	.cfi_adjust_cfa_offset 8
	pushq	(%r12)
	.cfi_adjust_cfa_offset 8
	callq	hipLaunchKernel
	addq	$96, %rsp
	.cfi_adjust_cfa_offset -96
	popq	%rbx
	.cfi_def_cfa_offset 40
	popq	%r12
	.cfi_def_cfa_offset 32
	popq	%r13
	.cfi_def_cfa_offset 24
	popq	%r14
	.cfi_def_cfa_offset 16
	popq	%r15
	.cfi_def_cfa_offset 8
	retq
.Lfunc_end1:
	.size	_Z18__device_stub__maxPfS_, .Lfunc_end1-_Z18__device_stub__maxPfS_
	.cfi_endproc
                                        # -- End function
	.globl	_Z23__device_stub__sumTotalPfS_ # -- Begin function _Z23__device_stub__sumTotalPfS_
	.type	_Z23__device_stub__sumTotalPfS_,@function
_Z23__device_stub__sumTotalPfS_:        # @_Z23__device_stub__sumTotalPfS_
	.cfi_startproc
# %bb.0:
	pushq	%r15
	.cfi_def_cfa_offset 16
	pushq	%r14
	.cfi_def_cfa_offset 24
	pushq	%r13
	.cfi_def_cfa_offset 32
	pushq	%r12
	.cfi_def_cfa_offset 40
	pushq	%rbx
	.cfi_def_cfa_offset 48
	subq	$80, %rsp
	.cfi_def_cfa_offset 128
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r13, -32
	.cfi_offset %r14, -24
	.cfi_offset %r15, -16
	leaq	24(%rsp), %rax
	movq	%rdi, (%rax)
	leaq	16(%rsp), %rcx
	movq	%rsi, (%rcx)
	leaq	64(%rsp), %rbx
	movq	%rax, (%rbx)
	movq	%rcx, 8(%rbx)
	leaq	48(%rsp), %r14
	leaq	32(%rsp), %r15
	leaq	8(%rsp), %r12
	movq	%rsp, %r13
	movq	%r14, %rdi
	movq	%r15, %rsi
	movq	%r12, %rdx
	movq	%r13, %rcx
	callq	__hipPopCallConfiguration
	movq	(%r14), %rsi
	movl	8(%r14), %edx
	movq	(%r15), %rcx
	movl	8(%r15), %r8d
	movl	$_Z8sumTotalPfS_, %edi
	movq	%rbx, %r9
	pushq	(%r13)
	.cfi_adjust_cfa_offset 8
	pushq	(%r12)
	.cfi_adjust_cfa_offset 8
	callq	hipLaunchKernel
	addq	$96, %rsp
	.cfi_adjust_cfa_offset -96
	popq	%rbx
	.cfi_def_cfa_offset 40
	popq	%r12
	.cfi_def_cfa_offset 32
	popq	%r13
	.cfi_def_cfa_offset 24
	popq	%r14
	.cfi_def_cfa_offset 16
	popq	%r15
	.cfi_def_cfa_offset 8
	retq
.Lfunc_end2:
	.size	_Z23__device_stub__sumTotalPfS_, .Lfunc_end2-_Z23__device_stub__sumTotalPfS_
	.cfi_endproc
                                        # -- End function
	.globl	_Z25__device_stub__subNsquarePfS_S_ # -- Begin function _Z25__device_stub__subNsquarePfS_S_
	.type	_Z25__device_stub__subNsquarePfS_S_,@function
_Z25__device_stub__subNsquarePfS_S_:    # @_Z25__device_stub__subNsquarePfS_S_
	.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	40(%rsp), %rax
	movq	%rdi, (%rax)
	leaq	32(%rsp), %rcx
	movq	%rsi, (%rcx)
	leaq	24(%rsp), %rsi
	movq	%rdx, (%rsi)
	leaq	80(%rsp), %rbx
	movq	%rax, (%rbx)
	movq	%rcx, 8(%rbx)
	movq	%rsi, 16(%rbx)
	leaq	64(%rsp), %r14
	leaq	48(%rsp), %r15
	leaq	16(%rsp), %r12
	leaq	8(%rsp), %r13
	movq	%r14, %rdi
	movq	%r15, %rsi
	movq	%r12, %rdx
	movq	%r13, %rcx
	callq	__hipPopCallConfiguration
	movq	(%r14), %rsi
	movl	8(%r14), %edx
	movq	(%r15), %rcx
	movl	8(%r15), %r8d
	movl	$_Z10subNsquarePfS_S_, %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_end3:
	.size	_Z25__device_stub__subNsquarePfS_S_, .Lfunc_end3-_Z25__device_stub__subNsquarePfS_S_
	.cfi_endproc
                                        # -- End function
	.globl	_Z24__device_stub__subNpowr4PfS_S_ # -- Begin function _Z24__device_stub__subNpowr4PfS_S_
	.type	_Z24__device_stub__subNpowr4PfS_S_,@function
_Z24__device_stub__subNpowr4PfS_S_:     # @_Z24__device_stub__subNpowr4PfS_S_
	.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	40(%rsp), %rax
	movq	%rdi, (%rax)
	leaq	32(%rsp), %rcx
	movq	%rsi, (%rcx)
	leaq	24(%rsp), %rsi
	movq	%rdx, (%rsi)
	leaq	80(%rsp), %rbx
	movq	%rax, (%rbx)
	movq	%rcx, 8(%rbx)
	movq	%rsi, 16(%rbx)
	leaq	64(%rsp), %r14
	leaq	48(%rsp), %r15
	leaq	16(%rsp), %r12
	leaq	8(%rsp), %r13
	movq	%r14, %rdi
	movq	%r15, %rsi
	movq	%r12, %rdx
	movq	%r13, %rcx
	callq	__hipPopCallConfiguration
	movq	(%r14), %rsi
	movl	8(%r14), %edx
	movq	(%r15), %rcx
	movl	8(%r15), %r8d
	movl	$_Z9subNpowr4PfS_S_, %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_end4:
	.size	_Z24__device_stub__subNpowr4PfS_S_, .Lfunc_end4-_Z24__device_stub__subNpowr4PfS_S_
	.cfi_endproc
                                        # -- End function
	.section	.rodata.cst4,"aM",@progbits,4
	.p2align	2, 0x0                          # -- Begin function main
.LCPI5_0:
	.long	0x30000000                      # float 4.65661287E-10
.LCPI5_1:
	.long	0x44800000                      # float 1024
.LCPI5_2:
	.long	0x35800000                      # float 9.53674316E-7
	.section	.rodata.cst8,"aM",@progbits,8
	.p2align	3, 0x0
.LCPI5_3:
	.quad	0x4010000000000000              # double 4
	.text
	.globl	main
	.type	main,@function
main:                                   # @main
	.cfi_startproc
# %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	pushq	%r15
	.cfi_def_cfa_offset 24
	pushq	%r14
	.cfi_def_cfa_offset 32
	pushq	%r13
	.cfi_def_cfa_offset 40
	pushq	%r12
	.cfi_def_cfa_offset 48
	pushq	%rbx
	.cfi_def_cfa_offset 56
	subq	$104, %rsp
	.cfi_def_cfa_offset 160
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	.cfi_offset %rbp, -16
	movl	$0, 36(%rsp)
	leaq	48(%rsp), %rdi
	callq	hipEventCreate
	leaq	16(%rsp), %rdi
	callq	hipEventCreate
	movl	$4194304, %edi                  # imm = 0x400000
	callq	malloc
	movq	%rax, %r15
	movl	$4194304, %edi                  # imm = 0x400000
	callq	malloc
	movq	%rax, 56(%rsp)                  # 8-byte Spill
	leaq	96(%rsp), %r14
	movq	%r14, %rdi
	callq	time
	movl	(%r14), %edi
	callq	srand
	xorps	%xmm2, %xmm2
	xorl	%ebx, %ebx
.LBB5_1:                                # =>This Inner Loop Header: Depth=1
	movss	%xmm2, 24(%rsp)                 # 4-byte Spill
	callq	rand
	movss	24(%rsp), %xmm2                 # 4-byte Reload
                                        # xmm2 = mem[0],zero,zero,zero
	xorps	%xmm0, %xmm0
	cvtsi2ss	%eax, %xmm0
	mulss	.LCPI5_0(%rip), %xmm0
	movss	.LCPI5_1(%rip), %xmm1           # xmm1 = mem[0],zero,zero,zero
	mulss	%xmm1, %xmm0
	mulss	%xmm1, %xmm0
	movss	%xmm0, (%r15,%rbx,4)
	addss	%xmm0, %xmm2
	incq	%rbx
	cmpq	$1048576, %rbx                  # imm = 0x100000
	jne	.LBB5_1
# %bb.2:
	mulss	.LCPI5_2(%rip), %xmm2
	xorps	%xmm0, %xmm0
	xorl	%eax, %eax
.LBB5_3:                                # =>This Inner Loop Header: Depth=1
	movss	(%r15,%rax,4), %xmm1            # xmm1 = mem[0],zero,zero,zero
	subss	%xmm2, %xmm1
	cvtss2sd	%xmm1, %xmm1
	mulsd	%xmm1, %xmm1
	cvtss2sd	%xmm0, %xmm0
	addsd	%xmm1, %xmm0
	cvtsd2ss	%xmm0, %xmm0
	incq	%rax
	cmpq	$1048576, %rax                  # imm = 0x100000
	jne	.LBB5_3
# %bb.4:
	mulss	.LCPI5_2(%rip), %xmm0
	cvtss2sd	%xmm0, %xmm0
	xorps	%xmm1, %xmm1
	ucomisd	%xmm1, %xmm0
	movss	%xmm2, 24(%rsp)                 # 4-byte Spill
	movsd	%xmm0, 64(%rsp)                 # 8-byte Spill
	jb	.LBB5_6
# %bb.5:
	sqrtsd	%xmm0, %xmm0
	jmp	.LBB5_7
.LBB5_6:                                # %call.sqrt
	callq	sqrt
.LBB5_7:                                # %.split
	movl	$.L.str, %edi
	movb	$1, %al
	callq	printf
	xorps	%xmm0, %xmm0
	xorl	%ebx, %ebx
.LBB5_8:                                # =>This Inner Loop Header: Depth=1
	movss	%xmm0, 40(%rsp)                 # 4-byte Spill
	movss	(%r15,%rbx,4), %xmm0            # xmm0 = mem[0],zero,zero,zero
	subss	24(%rsp), %xmm0                 # 4-byte Folded Reload
	cvtss2sd	%xmm0, %xmm0
	movsd	.LCPI5_3(%rip), %xmm1           # xmm1 = mem[0],zero
	callq	pow
	xorps	%xmm1, %xmm1
	cvtss2sd	40(%rsp), %xmm1                 # 4-byte Folded Reload
	addsd	%xmm0, %xmm1
	xorps	%xmm0, %xmm0
	cvtsd2ss	%xmm1, %xmm0
	incq	%rbx
	cmpq	$1048576, %rbx                  # imm = 0x100000
	jne	.LBB5_8
# %bb.9:
	mulss	.LCPI5_2(%rip), %xmm0
	movss	%xmm0, 40(%rsp)                 # 4-byte Spill
	movsd	.LCPI5_3(%rip), %xmm1           # xmm1 = mem[0],zero
	movsd	64(%rsp), %xmm0                 # 8-byte Reload
                                        # xmm0 = mem[0],zero
	callq	pow
	xorps	%xmm1, %xmm1
	cvtss2sd	40(%rsp), %xmm1                 # 4-byte Folded Reload
	divsd	%xmm0, %xmm1
	xorps	%xmm0, %xmm0
	cvtsd2ss	%xmm1, %xmm0
	cvtss2sd	%xmm0, %xmm0
	movl	$.L.str.1, %edi
	movb	$1, %al
	callq	printf
	movq	%rsp, %rdi
	movl	$4194304, %esi                  # imm = 0x400000
	callq	hipMalloc
	movl	%eax, %ebp
	leaq	8(%rsp), %r14
	movl	$4194304, %esi                  # imm = 0x400000
	movq	%r14, %rdi
	callq	hipMalloc
	movl	%ebp, %ecx
	orl	%eax, %ecx
	jne	.LBB5_88
# %bb.10:
	movabsq	$4294967808, %r12               # imm = 0x100000200
	movq	(%rsp), %rdi
	movl	$4194304, %edx                  # imm = 0x400000
	movq	%r15, %rsi
	movl	$1, %ecx
	callq	hipMemcpy
	movq	48(%rsp), %rdi
	xorl	%ebx, %ebx
	xorl	%esi, %esi
	callq	hipEventRecord
	movl	$2048, %ebp                     # imm = 0x800
.LBB5_11:                               # =>This Inner Loop Header: Depth=1
	movl	%ebx, %r13d
	movl	%ebp, %eax
	leaq	(%r12,%rax), %rdi
	addq	$-512, %rdi                     # imm = 0xFE00
	movl	$1, %esi
	movq	%r12, %rdx
	movl	$1, %ecx
	xorl	%r8d, %r8d
	xorl	%r9d, %r9d
	callq	__hipPushCallConfiguration
	testl	%ebx, %ebx
	jne	.LBB5_14
# %bb.12:                               #   in Loop: Header=BB5_11 Depth=1
	movl	$1, %ebx
	testl	%eax, %eax
	jne	.LBB5_17
# %bb.13:                               #   in Loop: Header=BB5_11 Depth=1
	movq	(%rsp), %rdi
	movq	8(%rsp), %rsi
	jmp	.LBB5_16
.LBB5_14:                               #   in Loop: Header=BB5_11 Depth=1
	xorl	%ebx, %ebx
	testl	%eax, %eax
	jne	.LBB5_17
# %bb.15:                               #   in Loop: Header=BB5_11 Depth=1
	movq	8(%rsp), %rdi
	movq	(%rsp), %rsi
.LBB5_16:                               #   in Loop: Header=BB5_11 Depth=1
	callq	_Z18__device_stub__minPfS_
.LBB5_17:                               #   in Loop: Header=BB5_11 Depth=1
	movl	%ebp, %eax
	shrl	$9, %eax
	cmpl	$1023, %ebp                     # imm = 0x3FF
	movl	%eax, %ebp
	ja	.LBB5_11
# %bb.18:
	leaq	-511(%r12), %rdi
	leaq	-508(%r12), %rdx
	movq	%rdi, 40(%rsp)                  # 8-byte Spill
	movl	$1, %esi
	movq	%rdx, 24(%rsp)                  # 8-byte Spill
	movl	$1, %ecx
	xorl	%r8d, %r8d
	xorl	%r9d, %r9d
	callq	__hipPushCallConfiguration
	testl	%r13d, %r13d
	je	.LBB5_21
# %bb.19:
	testl	%eax, %eax
	movq	56(%rsp), %rbx                  # 8-byte Reload
	jne	.LBB5_24
# %bb.20:
	movq	(%rsp), %rdi
	movq	8(%rsp), %rsi
	jmp	.LBB5_23
.LBB5_21:
	movq	%rsp, %r14
	testl	%eax, %eax
	movq	56(%rsp), %rbx                  # 8-byte Reload
	jne	.LBB5_24
# %bb.22:
	movq	8(%rsp), %rdi
	movq	(%rsp), %rsi
.LBB5_23:
	callq	_Z18__device_stub__minPfS_
.LBB5_24:
	movq	(%r14), %rsi
	movl	$4194304, %edx                  # imm = 0x400000
	movq	%rbx, %rdi
	movl	$2, %ecx
	callq	hipMemcpy
	movq	16(%rsp), %rdi
	xorl	%r13d, %r13d
	xorl	%esi, %esi
	callq	hipEventRecord
	movq	16(%rsp), %rdi
	callq	hipEventSynchronize
	movq	48(%rsp), %rsi
	movq	16(%rsp), %rdx
	leaq	36(%rsp), %r14
	movq	%r14, %rdi
	callq	hipEventElapsedTime
	cvtss2sd	(%r14), %xmm0
	movl	$.L.str.3, %edi
	movb	$1, %al
	callq	printf
	movq	8(%rsp), %rsi
	movl	$4194304, %edx                  # imm = 0x400000
	movq	%rbx, %rdi
	movl	$2, %ecx
	callq	hipMemcpy
	xorps	%xmm0, %xmm0
	cvtss2sd	(%rbx), %xmm0
	movl	$.L.str.4, %edi
	movb	$1, %al
	callq	printf
	movq	(%rsp), %rdi
	movl	$4194304, %edx                  # imm = 0x400000
	movq	%r15, %rsi
	movl	$1, %ecx
	callq	hipMemcpy
	movq	48(%rsp), %rdi
	xorl	%esi, %esi
	callq	hipEventRecord
	movl	$2048, %ebp                     # imm = 0x800
.LBB5_25:                               # =>This Inner Loop Header: Depth=1
	movl	%r13d, %r14d
	movl	%ebp, %eax
	leaq	(%r12,%rax), %rdi
	addq	$-512, %rdi                     # imm = 0xFE00
	movl	$1, %esi
	movq	%r12, %rdx
	movl	$1, %ecx
	xorl	%r8d, %r8d
	xorl	%r9d, %r9d
	callq	__hipPushCallConfiguration
	testl	%r13d, %r13d
	jne	.LBB5_28
# %bb.26:                               #   in Loop: Header=BB5_25 Depth=1
	movl	$1, %r13d
	testl	%eax, %eax
	jne	.LBB5_31
# %bb.27:                               #   in Loop: Header=BB5_25 Depth=1
	movq	(%rsp), %rdi
	movq	8(%rsp), %rsi
	jmp	.LBB5_30
.LBB5_28:                               #   in Loop: Header=BB5_25 Depth=1
	xorl	%r13d, %r13d
	testl	%eax, %eax
	jne	.LBB5_31
# %bb.29:                               #   in Loop: Header=BB5_25 Depth=1
	movq	8(%rsp), %rdi
	movq	(%rsp), %rsi
.LBB5_30:                               #   in Loop: Header=BB5_25 Depth=1
	callq	_Z18__device_stub__maxPfS_
.LBB5_31:                               #   in Loop: Header=BB5_25 Depth=1
	movl	%ebp, %eax
	shrl	$9, %eax
	cmpl	$1023, %ebp                     # imm = 0x3FF
	movl	%eax, %ebp
	ja	.LBB5_25
# %bb.32:
	movq	40(%rsp), %rdi                  # 8-byte Reload
	movl	$1, %esi
	movq	24(%rsp), %rdx                  # 8-byte Reload
	movl	$1, %ecx
	xorl	%r8d, %r8d
	xorl	%r9d, %r9d
	callq	__hipPushCallConfiguration
	testl	%r14d, %r14d
	je	.LBB5_35
# %bb.33:
	leaq	8(%rsp), %rbx
	testl	%eax, %eax
	jne	.LBB5_38
# %bb.34:
	movq	(%rsp), %rdi
	movq	8(%rsp), %rsi
	jmp	.LBB5_37
.LBB5_35:
	movq	%rsp, %rbx
	testl	%eax, %eax
	jne	.LBB5_38
# %bb.36:
	movq	8(%rsp), %rdi
	movq	(%rsp), %rsi
.LBB5_37:
	callq	_Z18__device_stub__maxPfS_
.LBB5_38:
	movq	(%rbx), %rsi
	movl	$4194304, %edx                  # imm = 0x400000
	movq	56(%rsp), %rbx                  # 8-byte Reload
	movq	%rbx, %rdi
	movl	$2, %ecx
	callq	hipMemcpy
	movq	16(%rsp), %rdi
	xorl	%r13d, %r13d
	xorl	%esi, %esi
	callq	hipEventRecord
	movq	16(%rsp), %rdi
	callq	hipEventSynchronize
	movq	48(%rsp), %rsi
	movq	16(%rsp), %rdx
	leaq	36(%rsp), %r14
	movq	%r14, %rdi
	callq	hipEventElapsedTime
	xorps	%xmm0, %xmm0
	cvtss2sd	(%r14), %xmm0
	movl	$.L.str.5, %edi
	movb	$1, %al
	callq	printf
	movq	8(%rsp), %rsi
	movl	$4194304, %edx                  # imm = 0x400000
	movq	%rbx, %rdi
	movl	$2, %ecx
	callq	hipMemcpy
	xorps	%xmm0, %xmm0
	cvtss2sd	(%rbx), %xmm0
	movl	$.L.str.6, %edi
	movb	$1, %al
	callq	printf
	movq	(%rsp), %rdi
	movl	$4194304, %edx                  # imm = 0x400000
	movq	%r15, %rsi
	movl	$1, %ecx
	callq	hipMemcpy
	movq	48(%rsp), %rdi
	xorl	%esi, %esi
	callq	hipEventRecord
	movl	$2048, %ebp                     # imm = 0x800
.LBB5_39:                               # =>This Inner Loop Header: Depth=1
	movl	%r13d, %r14d
	movl	%ebp, %eax
	leaq	(%r12,%rax), %rdi
	addq	$-512, %rdi                     # imm = 0xFE00
	movl	$1, %esi
	movq	%r12, %rdx
	movl	$1, %ecx
	xorl	%r8d, %r8d
	xorl	%r9d, %r9d
	callq	__hipPushCallConfiguration
	testl	%r13d, %r13d
	jne	.LBB5_42
# %bb.40:                               #   in Loop: Header=BB5_39 Depth=1
	movl	$1, %r13d
	testl	%eax, %eax
	jne	.LBB5_45
# %bb.41:                               #   in Loop: Header=BB5_39 Depth=1
	movq	(%rsp), %rdi
	movq	8(%rsp), %rsi
	jmp	.LBB5_44
.LBB5_42:                               #   in Loop: Header=BB5_39 Depth=1
	xorl	%r13d, %r13d
	testl	%eax, %eax
	jne	.LBB5_45
# %bb.43:                               #   in Loop: Header=BB5_39 Depth=1
	movq	8(%rsp), %rdi
	movq	(%rsp), %rsi
.LBB5_44:                               #   in Loop: Header=BB5_39 Depth=1
	callq	_Z23__device_stub__sumTotalPfS_
.LBB5_45:                               #   in Loop: Header=BB5_39 Depth=1
	movl	%ebp, %eax
	shrl	$9, %eax
	cmpl	$1023, %ebp                     # imm = 0x3FF
	movl	%eax, %ebp
	ja	.LBB5_39
# %bb.46:
	movq	40(%rsp), %rdi                  # 8-byte Reload
	movl	$1, %esi
	movq	24(%rsp), %rdx                  # 8-byte Reload
	movl	$1, %ecx
	xorl	%r8d, %r8d
	xorl	%r9d, %r9d
	callq	__hipPushCallConfiguration
	testl	%r14d, %r14d
	je	.LBB5_49
# %bb.47:
	leaq	8(%rsp), %rbx
	testl	%eax, %eax
	jne	.LBB5_52
# %bb.48:
	movq	(%rsp), %rdi
	movq	8(%rsp), %rsi
	jmp	.LBB5_51
.LBB5_49:
	movq	%rsp, %rbx
	testl	%eax, %eax
	jne	.LBB5_52
# %bb.50:
	movq	8(%rsp), %rdi
	movq	(%rsp), %rsi
.LBB5_51:
	callq	_Z23__device_stub__sumTotalPfS_
.LBB5_52:
	movq	(%rbx), %rsi
	movl	$4194304, %edx                  # imm = 0x400000
	movq	56(%rsp), %rbx                  # 8-byte Reload
	movq	%rbx, %rdi
	movl	$2, %ecx
	callq	hipMemcpy
	movss	(%rbx), %xmm0                   # xmm0 = mem[0],zero,zero,zero
	leaq	72(%rsp), %r14
	mulss	.LCPI5_2(%rip), %xmm0
	movq	$0, (%r14)
	leaq	92(%rsp), %r13
	movss	%xmm0, (%r13)
	cvtss2sd	%xmm0, %xmm0
	movl	$.L.str.7, %edi
	movb	$1, %al
	callq	printf
	movl	$4, %esi
	movq	%r14, %rdi
	callq	hipMalloc
	movq	(%r14), %rdi
	movl	$4, %edx
	movq	%r13, %rsi
	movl	$1, %ecx
	callq	hipMemcpy
	movq	(%rsp), %rdi
	movl	$4194304, %edx                  # imm = 0x400000
	movq	%r15, %rsi
	movl	$1, %ecx
	callq	hipMemcpy
	leaq	1536(%r12), %rdi
	xorl	%r13d, %r13d
	movq	%rdi, 64(%rsp)                  # 8-byte Spill
	movl	$1, %esi
	movq	%r12, %rdx
	movl	$1, %ecx
	xorl	%r8d, %r8d
	xorl	%r9d, %r9d
	callq	__hipPushCallConfiguration
	testl	%eax, %eax
	jne	.LBB5_54
# %bb.53:
	movq	(%rsp), %rdi
	movq	8(%rsp), %rsi
	movq	72(%rsp), %rdx
	callq	_Z25__device_stub__subNsquarePfS_S_
.LBB5_54:
	movq	8(%rsp), %rsi
	movl	$4194304, %edx                  # imm = 0x400000
	movq	%rbx, %rdi
	movl	$2, %ecx
	callq	hipMemcpy
	movq	(%rsp), %rdi
	movl	$4194304, %edx                  # imm = 0x400000
	movq	%rbx, %rsi
	movl	$1, %ecx
	callq	hipMemcpy
	movl	$2048, %r14d                    # imm = 0x800
.LBB5_55:                               # =>This Inner Loop Header: Depth=1
	movl	%r13d, %ebp
	movl	%r14d, %eax
	leaq	(%r12,%rax), %rdi
	addq	$-512, %rdi                     # imm = 0xFE00
	movl	$1, %esi
	movq	%r12, %rdx
	movl	$1, %ecx
	xorl	%r8d, %r8d
	xorl	%r9d, %r9d
	callq	__hipPushCallConfiguration
	testl	%r13d, %r13d
	jne	.LBB5_58
# %bb.56:                               #   in Loop: Header=BB5_55 Depth=1
	movl	$1, %r13d
	testl	%eax, %eax
	jne	.LBB5_61
# %bb.57:                               #   in Loop: Header=BB5_55 Depth=1
	movq	(%rsp), %rdi
	movq	8(%rsp), %rsi
	jmp	.LBB5_60
.LBB5_58:                               #   in Loop: Header=BB5_55 Depth=1
	xorl	%r13d, %r13d
	testl	%eax, %eax
	jne	.LBB5_61
# %bb.59:                               #   in Loop: Header=BB5_55 Depth=1
	movq	8(%rsp), %rdi
	movq	(%rsp), %rsi
.LBB5_60:                               #   in Loop: Header=BB5_55 Depth=1
	callq	_Z23__device_stub__sumTotalPfS_
.LBB5_61:                               #   in Loop: Header=BB5_55 Depth=1
	movl	%r14d, %eax
	shrl	$9, %eax
	cmpl	$1023, %r14d                    # imm = 0x3FF
	movl	%eax, %r14d
	ja	.LBB5_55
# %bb.62:
	movq	40(%rsp), %rdi                  # 8-byte Reload
	movl	$1, %esi
	movq	24(%rsp), %rdx                  # 8-byte Reload
	movl	$1, %ecx
	xorl	%r8d, %r8d
	xorl	%r9d, %r9d
	callq	__hipPushCallConfiguration
	testl	%ebp, %ebp
	je	.LBB5_65
# %bb.63:
	leaq	8(%rsp), %rbx
	testl	%eax, %eax
	jne	.LBB5_68
# %bb.64:
	movq	(%rsp), %rdi
	movq	8(%rsp), %rsi
	jmp	.LBB5_67
.LBB5_65:
	movq	%rsp, %rbx
	testl	%eax, %eax
	jne	.LBB5_68
# %bb.66:
	movq	8(%rsp), %rdi
	movq	(%rsp), %rsi
.LBB5_67:
	callq	_Z23__device_stub__sumTotalPfS_
.LBB5_68:
	movq	(%rbx), %rsi
	movl	$4194304, %edx                  # imm = 0x400000
	movq	56(%rsp), %rbx                  # 8-byte Reload
	movq	%rbx, %rdi
	movl	$2, %ecx
	callq	hipMemcpy
	movq	16(%rsp), %rdi
	xorl	%esi, %esi
	callq	hipEventRecord
	movq	16(%rsp), %rdi
	callq	hipEventSynchronize
	movq	48(%rsp), %rsi
	movq	16(%rsp), %rdx
	leaq	36(%rsp), %r13
	movq	%r13, %rdi
	callq	hipEventElapsedTime
	cvtss2sd	(%r13), %xmm0
	movl	$.L.str.8, %edi
	movb	$1, %al
	callq	printf
	movss	(%rbx), %xmm0                   # xmm0 = mem[0],zero,zero,zero
	mulss	.LCPI5_2(%rip), %xmm0
	xorps	%xmm1, %xmm1
	ucomiss	%xmm1, %xmm0
	jb	.LBB5_70
# %bb.69:
	sqrtss	%xmm0, %xmm0
	jmp	.LBB5_71
.LBB5_70:                               # %call.sqrt426
	callq	sqrtf@PLT
.LBB5_71:                               # %.split425
	cvtss2sd	%xmm0, %xmm0
	movl	$.L.str.9, %edi
	movsd	%xmm0, 80(%rsp)                 # 8-byte Spill
	movb	$1, %al
	callq	printf
	movq	(%rsp), %rdi
	movl	$4194304, %edx                  # imm = 0x400000
	movq	%r15, %rsi
	movl	$1, %ecx
	callq	hipMemcpy
	movq	48(%rsp), %rdi
	xorl	%r15d, %r15d
	xorl	%esi, %esi
	callq	hipEventRecord
	movq	64(%rsp), %rdi                  # 8-byte Reload
	movl	$1, %esi
	movq	%r12, %rdx
	movl	$1, %ecx
	xorl	%r8d, %r8d
	xorl	%r9d, %r9d
	callq	__hipPushCallConfiguration
	testl	%eax, %eax
	jne	.LBB5_73
# %bb.72:
	movq	(%rsp), %rdi
	movq	8(%rsp), %rsi
	movq	72(%rsp), %rdx
	callq	_Z24__device_stub__subNpowr4PfS_S_
.LBB5_73:
	movq	8(%rsp), %rsi
	movl	$4194304, %edx                  # imm = 0x400000
	movq	%rbx, %rdi
	movl	$2, %ecx
	callq	hipMemcpy
	movq	(%rsp), %rdi
	movl	$4194304, %edx                  # imm = 0x400000
	movq	%rbx, %rsi
	movl	$1, %ecx
	callq	hipMemcpy
	movl	$2048, %r14d                    # imm = 0x800
.LBB5_74:                               # =>This Inner Loop Header: Depth=1
	movl	%r15d, %ebp
	movl	%r14d, %eax
	leaq	(%r12,%rax), %rdi
	addq	$-512, %rdi                     # imm = 0xFE00
	movl	$1, %esi
	movq	%r12, %rdx
	movl	$1, %ecx
	xorl	%r8d, %r8d
	xorl	%r9d, %r9d
	callq	__hipPushCallConfiguration
	testl	%r15d, %r15d
	jne	.LBB5_77
# %bb.75:                               #   in Loop: Header=BB5_74 Depth=1
	movl	$1, %r15d
	testl	%eax, %eax
	jne	.LBB5_80
# %bb.76:                               #   in Loop: Header=BB5_74 Depth=1
	movq	(%rsp), %rdi
	movq	8(%rsp), %rsi
	jmp	.LBB5_79
.LBB5_77:                               #   in Loop: Header=BB5_74 Depth=1
	xorl	%r15d, %r15d
	testl	%eax, %eax
	jne	.LBB5_80
# %bb.78:                               #   in Loop: Header=BB5_74 Depth=1
	movq	8(%rsp), %rdi
	movq	(%rsp), %rsi
.LBB5_79:                               #   in Loop: Header=BB5_74 Depth=1
	callq	_Z23__device_stub__sumTotalPfS_
.LBB5_80:                               #   in Loop: Header=BB5_74 Depth=1
	movl	%r14d, %eax
	shrl	$9, %eax
	cmpl	$1023, %r14d                    # imm = 0x3FF
	movl	%eax, %r14d
	ja	.LBB5_74
# %bb.81:
	movq	40(%rsp), %rdi                  # 8-byte Reload
	movl	$1, %esi
	movq	24(%rsp), %rdx                  # 8-byte Reload
	movl	$1, %ecx
	xorl	%r8d, %r8d
	xorl	%r9d, %r9d
	callq	__hipPushCallConfiguration
	testl	%ebp, %ebp
	je	.LBB5_84
# %bb.82:
	leaq	8(%rsp), %r14
	testl	%eax, %eax
	jne	.LBB5_87
# %bb.83:
	movq	(%rsp), %rdi
	movq	8(%rsp), %rsi
	callq	_Z23__device_stub__sumTotalPfS_
	jmp	.LBB5_87
.LBB5_84:
	testl	%eax, %eax
	jne	.LBB5_86
# %bb.85:
	movq	8(%rsp), %rdi
	movq	(%rsp), %rsi
	callq	_Z23__device_stub__sumTotalPfS_
.LBB5_86:
	movq	%rsp, %r14
.LBB5_87:
	movq	(%r14), %rsi
	movl	$4194304, %edx                  # imm = 0x400000
	movq	%rbx, %rdi
	movl	$2, %ecx
	callq	hipMemcpy
	movq	16(%rsp), %rdi
	xorl	%esi, %esi
	callq	hipEventRecord
	movq	16(%rsp), %rdi
	callq	hipEventSynchronize
	movq	48(%rsp), %rsi
	movq	16(%rsp), %rdx
	leaq	36(%rsp), %r14
	movq	%r14, %rdi
	callq	hipEventElapsedTime
	cvtss2sd	(%r14), %xmm0
	movl	$.L.str.10, %edi
	movb	$1, %al
	callq	printf
	movss	(%rbx), %xmm0                   # xmm0 = mem[0],zero,zero,zero
	mulss	.LCPI5_2(%rip), %xmm0
	movss	%xmm0, 24(%rsp)                 # 4-byte Spill
	movsd	.LCPI5_3(%rip), %xmm1           # xmm1 = mem[0],zero
	movsd	80(%rsp), %xmm0                 # 8-byte Reload
                                        # xmm0 = mem[0],zero
	callq	pow
	xorps	%xmm1, %xmm1
	cvtss2sd	24(%rsp), %xmm1                 # 4-byte Folded Reload
	divsd	%xmm0, %xmm1
	xorps	%xmm0, %xmm0
	cvtsd2ss	%xmm1, %xmm0
	cvtss2sd	%xmm0, %xmm0
	movl	$.L.str.11, %edi
	movb	$1, %al
	callq	printf
	movq	(%rsp), %rdi
	callq	hipFree
	movq	8(%rsp), %rdi
	callq	hipFree
	movq	72(%rsp), %rdi
	callq	hipFree
	xorl	%eax, %eax
	addq	$104, %rsp
	.cfi_def_cfa_offset 56
	popq	%rbx
	.cfi_def_cfa_offset 48
	popq	%r12
	.cfi_def_cfa_offset 40
	popq	%r13
	.cfi_def_cfa_offset 32
	popq	%r14
	.cfi_def_cfa_offset 24
	popq	%r15
	.cfi_def_cfa_offset 16
	popq	%rbp
	.cfi_def_cfa_offset 8
	retq
.LBB5_88:
	.cfi_def_cfa_offset 160
	movl	$.L.str.2, %edi
	movl	%ebp, %esi
	movl	%eax, %edx
	xorl	%eax, %eax
	callq	printf
	xorl	%edi, %edi
	callq	exit
.Lfunc_end5:
	.size	main, .Lfunc_end5-main
	.cfi_endproc
                                        # -- End function
	.p2align	4, 0x90                         # -- Begin function __hip_module_ctor
	.type	__hip_module_ctor,@function
__hip_module_ctor:                      # @__hip_module_ctor
	.cfi_startproc
# %bb.0:
	pushq	%rbx
	.cfi_def_cfa_offset 16
	subq	$32, %rsp
	.cfi_def_cfa_offset 48
	.cfi_offset %rbx, -16
	movq	__hip_gpubin_handle(%rip), %rbx
	testq	%rbx, %rbx
	jne	.LBB6_2
# %bb.1:
	movl	$__hip_fatbin_wrapper, %edi
	callq	__hipRegisterFatBinary
	movq	%rax, %rbx
	movq	%rax, __hip_gpubin_handle(%rip)
.LBB6_2:
	xorps	%xmm0, %xmm0
	movups	%xmm0, 16(%rsp)
	movups	%xmm0, (%rsp)
	movl	$_Z3minPfS_, %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	$_Z3maxPfS_, %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	$_Z8sumTotalPfS_, %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	$_Z10subNsquarePfS_S_, %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	$_Z9subNpowr4PfS_S_, %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_end6:
	.size	__hip_module_ctor, .Lfunc_end6-__hip_module_ctor
	.cfi_endproc
                                        # -- End function
	.p2align	4, 0x90                         # -- Begin function __hip_module_dtor
	.type	__hip_module_dtor,@function
__hip_module_dtor:                      # @__hip_module_dtor
	.cfi_startproc
# %bb.0:
	movq	__hip_gpubin_handle(%rip), %rdi
	testq	%rdi, %rdi
	je	.LBB7_2
# %bb.1:
	pushq	%rax
	.cfi_def_cfa_offset 16
	callq	__hipUnregisterFatBinary
	movq	$0, __hip_gpubin_handle(%rip)
	addq	$8, %rsp
	.cfi_def_cfa_offset 8
.LBB7_2:
	retq
.Lfunc_end7:
	.size	__hip_module_dtor, .Lfunc_end7-__hip_module_dtor
	.cfi_endproc
                                        # -- End function
	.type	_Z3minPfS_,@object              # @_Z3minPfS_
	.section	.rodata,"a",@progbits
	.globl	_Z3minPfS_
	.p2align	3, 0x0
_Z3minPfS_:
	.quad	_Z18__device_stub__minPfS_
	.size	_Z3minPfS_, 8

	.type	_Z3maxPfS_,@object              # @_Z3maxPfS_
	.globl	_Z3maxPfS_
	.p2align	3, 0x0
_Z3maxPfS_:
	.quad	_Z18__device_stub__maxPfS_
	.size	_Z3maxPfS_, 8

	.type	_Z8sumTotalPfS_,@object         # @_Z8sumTotalPfS_
	.globl	_Z8sumTotalPfS_
	.p2align	3, 0x0
_Z8sumTotalPfS_:
	.quad	_Z23__device_stub__sumTotalPfS_
	.size	_Z8sumTotalPfS_, 8

	.type	_Z10subNsquarePfS_S_,@object    # @_Z10subNsquarePfS_S_
	.globl	_Z10subNsquarePfS_S_
	.p2align	3, 0x0
_Z10subNsquarePfS_S_:
	.quad	_Z25__device_stub__subNsquarePfS_S_
	.size	_Z10subNsquarePfS_S_, 8

	.type	_Z9subNpowr4PfS_S_,@object      # @_Z9subNpowr4PfS_S_
	.globl	_Z9subNpowr4PfS_S_
	.p2align	3, 0x0
_Z9subNpowr4PfS_S_:
	.quad	_Z24__device_stub__subNpowr4PfS_S_
	.size	_Z9subNpowr4PfS_S_, 8

	.type	.L.str,@object                  # @.str
	.section	.rodata.str1.1,"aMS",@progbits,1
.L.str:
	.asciz	"Act std = %f\n"
	.size	.L.str, 14

	.type	.L.str.1,@object                # @.str.1
.L.str.1:
	.asciz	"Act kr = %f\n"
	.size	.L.str.1, 13

	.type	.L.str.2,@object                # @.str.2
.L.str.2:
	.asciz	"Error in allocation %d %d\n"
	.size	.L.str.2, 27

	.type	.L.str.3,@object                # @.str.3
.L.str.3:
	.asciz	"Elapsed Time(MIN) = %f\n"
	.size	.L.str.3, 24

	.type	.L.str.4,@object                # @.str.4
.L.str.4:
	.asciz	"MIN = %f\n"
	.size	.L.str.4, 10

	.type	.L.str.5,@object                # @.str.5
.L.str.5:
	.asciz	"Elapsed Time(MAX) = %.5f\n"
	.size	.L.str.5, 26

	.type	.L.str.6,@object                # @.str.6
.L.str.6:
	.asciz	"MAX = %f\n"
	.size	.L.str.6, 10

	.type	.L.str.7,@object                # @.str.7
.L.str.7:
	.asciz	"MEAN = %f\n"
	.size	.L.str.7, 11

	.type	.L.str.8,@object                # @.str.8
.L.str.8:
	.asciz	"Elapsed Time(STD) = %.5f\n"
	.size	.L.str.8, 26

	.type	.L.str.9,@object                # @.str.9
.L.str.9:
	.asciz	"STD = %f\n"
	.size	.L.str.9, 10

	.type	.L.str.10,@object               # @.str.10
.L.str.10:
	.asciz	"Elapsed Time(kurtosis) = %.5f\n"
	.size	.L.str.10, 31

	.type	.L.str.11,@object               # @.str.11
.L.str.11:
	.asciz	"Kurtosis = %f\n"
	.size	.L.str.11, 15

	.type	.L__unnamed_1,@object           # @0
.L__unnamed_1:
	.asciz	"_Z3minPfS_"
	.size	.L__unnamed_1, 11

	.type	.L__unnamed_2,@object           # @1
.L__unnamed_2:
	.asciz	"_Z3maxPfS_"
	.size	.L__unnamed_2, 11

	.type	.L__unnamed_3,@object           # @2
.L__unnamed_3:
	.asciz	"_Z8sumTotalPfS_"
	.size	.L__unnamed_3, 16

	.type	.L__unnamed_4,@object           # @3
.L__unnamed_4:
	.asciz	"_Z10subNsquarePfS_S_"
	.size	.L__unnamed_4, 21

	.type	.L__unnamed_5,@object           # @4
.L__unnamed_5:
	.asciz	"_Z9subNpowr4PfS_S_"
	.size	.L__unnamed_5, 19

	.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 _Z18__device_stub__minPfS_
	.addrsig_sym _Z18__device_stub__maxPfS_
	.addrsig_sym _Z23__device_stub__sumTotalPfS_
	.addrsig_sym _Z25__device_stub__subNsquarePfS_S_
	.addrsig_sym _Z24__device_stub__subNpowr4PfS_S_
	.addrsig_sym __hip_module_ctor
	.addrsig_sym __hip_module_dtor
	.addrsig_sym _Z3minPfS_
	.addrsig_sym _Z3maxPfS_
	.addrsig_sym _Z8sumTotalPfS_
	.addrsig_sym _Z10subNsquarePfS_S_
	.addrsig_sym _Z9subNpowr4PfS_S_
	.addrsig_sym __hip_fatbin
	.addrsig_sym __hip_fatbin_wrapper
	.addrsig_sym __hip_cuid_

	.text
	.amdgcn_target "amdgcn-amd-amdhsa--gfx1100"
	.protected	_Z3minPfS_              ; -- Begin function _Z3minPfS_
	.globl	_Z3minPfS_
	.p2align	8
	.type	_Z3minPfS_,@function
_Z3minPfS_:                             ; @_Z3minPfS_
; %bb.0:
	s_clause 0x1
	s_load_b32 s5, s[0:1], 0x1c
	s_load_b128 s[0:3], s[0:1], 0x0
	s_mov_b32 s4, s15
	s_waitcnt lgkmcnt(0)
	s_and_b32 s5, s5, 0xffff
	s_delay_alu instid0(SALU_CYCLE_1) | instskip(SKIP_2) | instid1(VALU_DEP_1)
	s_mul_i32 s6, s15, s5
	s_cmp_lt_u32 s5, 2
	v_add_nc_u32_e32 v1, s6, v0
	v_ashrrev_i32_e32 v2, 31, v1
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_lshlrev_b64 v[2:3], 2, v[1:2]
	v_add_co_u32 v2, vcc_lo, s0, v2
	s_delay_alu instid0(VALU_DEP_2)
	v_add_co_ci_u32_e32 v3, vcc_lo, s1, v3, vcc_lo
	global_load_b32 v3, v[2:3], off
	v_lshlrev_b32_e32 v2, 2, v0
	s_waitcnt vmcnt(0)
	ds_store_b32 v2, v3
	s_waitcnt lgkmcnt(0)
	s_barrier
.LBB0_1:                                ; =>This Inner Loop Header: Depth=1
	buffer_gl0_inv
	s_cbranch_scc1 .LBB0_5
; %bb.2:                                ; %.lr.ph
                                        ;   in Loop: Header=BB0_1 Depth=1
	s_lshr_b32 s0, s5, 1
	s_delay_alu instid0(SALU_CYCLE_1) | instskip(NEXT) | instid1(SALU_CYCLE_1)
	s_add_i32 s1, s0, s6
	v_cmp_gt_u32_e32 vcc_lo, s1, v1
	s_and_saveexec_b32 s1, vcc_lo
	s_cbranch_execz .LBB0_4
; %bb.3:                                ;   in Loop: Header=BB0_1 Depth=1
	v_lshl_add_u32 v3, s0, 2, v2
	ds_load_b32 v4, v2
	ds_load_b32 v3, v3
	s_waitcnt lgkmcnt(0)
	v_cmp_lt_f32_e32 vcc_lo, v4, v3
	v_cndmask_b32_e32 v3, v3, v4, vcc_lo
	ds_store_b32 v2, v3
.LBB0_4:                                ;   in Loop: Header=BB0_1 Depth=1
	s_or_b32 exec_lo, exec_lo, s1
	s_waitcnt lgkmcnt(0)
	s_barrier
	s_cmp_lt_u32 s5, 4
	s_mov_b32 s5, s0
	s_branch .LBB0_1
.LBB0_5:                                ; %._crit_edge
	s_mov_b32 s5, 0
	s_mov_b32 s0, exec_lo
	v_cmpx_eq_u32_e32 0, v0
	s_cbranch_execz .LBB0_7
; %bb.6:
	v_mov_b32_e32 v0, 0
	s_lshl_b64 s[0:1], s[4:5], 2
	s_delay_alu instid0(SALU_CYCLE_1)
	s_add_u32 s0, s2, s0
	s_addc_u32 s1, s3, s1
	ds_load_b32 v1, v0
	s_waitcnt lgkmcnt(0)
	global_store_b32 v0, v1, s[0:1]
.LBB0_7:
	s_nop 0
	s_sendmsg sendmsg(MSG_DEALLOC_VGPRS)
	s_endpgm
	.section	.rodata,"a",@progbits
	.p2align	6, 0x0
	.amdhsa_kernel _Z3minPfS_
		.amdhsa_group_segment_fixed_size 2048
		.amdhsa_private_segment_fixed_size 0
		.amdhsa_kernarg_size 272
		.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 5
		.amdhsa_next_free_sgpr 16
		.amdhsa_float_round_mode_32 0
		.amdhsa_float_round_mode_16_64 0
		.amdhsa_float_denorm_mode_32 3
		.amdhsa_float_denorm_mode_16_64 3
		.amdhsa_dx10_clamp 1
		.amdhsa_ieee_mode 1
		.amdhsa_fp16_overflow 0
		.amdhsa_workgroup_processor_mode 1
		.amdhsa_memory_ordered 1
		.amdhsa_forward_progress 0
		.amdhsa_shared_vgpr_count 0
		.amdhsa_exception_fp_ieee_invalid_op 0
		.amdhsa_exception_fp_denorm_src 0
		.amdhsa_exception_fp_ieee_div_zero 0
		.amdhsa_exception_fp_ieee_overflow 0
		.amdhsa_exception_fp_ieee_underflow 0
		.amdhsa_exception_fp_ieee_inexact 0
		.amdhsa_exception_int_div_zero 0
	.end_amdhsa_kernel
	.text
.Lfunc_end0:
	.size	_Z3minPfS_, .Lfunc_end0-_Z3minPfS_
                                        ; -- End function
	.section	.AMDGPU.csdata,"",@progbits
; Kernel info:
; codeLenInByte = 288
; NumSgprs: 18
; NumVgprs: 5
; ScratchSize: 0
; MemoryBound: 0
; FloatMode: 240
; IeeeMode: 1
; LDSByteSize: 2048 bytes/workgroup (compile time only)
; SGPRBlocks: 2
; VGPRBlocks: 0
; NumSGPRsForWavesPerEU: 18
; NumVGPRsForWavesPerEU: 5
; 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	_Z3maxPfS_              ; -- Begin function _Z3maxPfS_
	.globl	_Z3maxPfS_
	.p2align	8
	.type	_Z3maxPfS_,@function
_Z3maxPfS_:                             ; @_Z3maxPfS_
; %bb.0:
	s_clause 0x1
	s_load_b32 s5, s[0:1], 0x1c
	s_load_b128 s[0:3], s[0:1], 0x0
	s_mov_b32 s4, s15
	s_waitcnt lgkmcnt(0)
	s_and_b32 s5, s5, 0xffff
	s_delay_alu instid0(SALU_CYCLE_1) | instskip(SKIP_2) | instid1(VALU_DEP_1)
	s_mul_i32 s6, s15, s5
	s_cmp_lt_u32 s5, 2
	v_add_nc_u32_e32 v1, s6, v0
	v_ashrrev_i32_e32 v2, 31, v1
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_lshlrev_b64 v[2:3], 2, v[1:2]
	v_add_co_u32 v2, vcc_lo, s0, v2
	s_delay_alu instid0(VALU_DEP_2)
	v_add_co_ci_u32_e32 v3, vcc_lo, s1, v3, vcc_lo
	global_load_b32 v3, v[2:3], off
	v_lshlrev_b32_e32 v2, 2, v0
	s_waitcnt vmcnt(0)
	ds_store_b32 v2, v3
	s_waitcnt lgkmcnt(0)
	s_barrier
.LBB1_1:                                ; =>This Inner Loop Header: Depth=1
	buffer_gl0_inv
	s_cbranch_scc1 .LBB1_5
; %bb.2:                                ; %.lr.ph
                                        ;   in Loop: Header=BB1_1 Depth=1
	s_lshr_b32 s0, s5, 1
	s_delay_alu instid0(SALU_CYCLE_1) | instskip(NEXT) | instid1(SALU_CYCLE_1)
	s_add_i32 s1, s0, s6
	v_cmp_gt_u32_e32 vcc_lo, s1, v1
	s_and_saveexec_b32 s1, vcc_lo
	s_cbranch_execz .LBB1_4
; %bb.3:                                ;   in Loop: Header=BB1_1 Depth=1
	v_lshl_add_u32 v3, s0, 2, v2
	ds_load_b32 v4, v2
	ds_load_b32 v3, v3
	s_waitcnt lgkmcnt(0)
	v_cmp_gt_f32_e32 vcc_lo, v4, v3
	v_cndmask_b32_e32 v3, v3, v4, vcc_lo
	ds_store_b32 v2, v3
.LBB1_4:                                ;   in Loop: Header=BB1_1 Depth=1
	s_or_b32 exec_lo, exec_lo, s1
	s_waitcnt lgkmcnt(0)
	s_barrier
	s_cmp_lt_u32 s5, 4
	s_mov_b32 s5, s0
	s_branch .LBB1_1
.LBB1_5:                                ; %._crit_edge
	s_mov_b32 s5, 0
	s_mov_b32 s0, exec_lo
	v_cmpx_eq_u32_e32 0, v0
	s_cbranch_execz .LBB1_7
; %bb.6:
	v_mov_b32_e32 v0, 0
	s_lshl_b64 s[0:1], s[4:5], 2
	s_delay_alu instid0(SALU_CYCLE_1)
	s_add_u32 s0, s2, s0
	s_addc_u32 s1, s3, s1
	ds_load_b32 v1, v0
	s_waitcnt lgkmcnt(0)
	global_store_b32 v0, v1, s[0:1]
.LBB1_7:
	s_nop 0
	s_sendmsg sendmsg(MSG_DEALLOC_VGPRS)
	s_endpgm
	.section	.rodata,"a",@progbits
	.p2align	6, 0x0
	.amdhsa_kernel _Z3maxPfS_
		.amdhsa_group_segment_fixed_size 2048
		.amdhsa_private_segment_fixed_size 0
		.amdhsa_kernarg_size 272
		.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 5
		.amdhsa_next_free_sgpr 16
		.amdhsa_float_round_mode_32 0
		.amdhsa_float_round_mode_16_64 0
		.amdhsa_float_denorm_mode_32 3
		.amdhsa_float_denorm_mode_16_64 3
		.amdhsa_dx10_clamp 1
		.amdhsa_ieee_mode 1
		.amdhsa_fp16_overflow 0
		.amdhsa_workgroup_processor_mode 1
		.amdhsa_memory_ordered 1
		.amdhsa_forward_progress 0
		.amdhsa_shared_vgpr_count 0
		.amdhsa_exception_fp_ieee_invalid_op 0
		.amdhsa_exception_fp_denorm_src 0
		.amdhsa_exception_fp_ieee_div_zero 0
		.amdhsa_exception_fp_ieee_overflow 0
		.amdhsa_exception_fp_ieee_underflow 0
		.amdhsa_exception_fp_ieee_inexact 0
		.amdhsa_exception_int_div_zero 0
	.end_amdhsa_kernel
	.text
.Lfunc_end1:
	.size	_Z3maxPfS_, .Lfunc_end1-_Z3maxPfS_
                                        ; -- End function
	.section	.AMDGPU.csdata,"",@progbits
; Kernel info:
; codeLenInByte = 288
; NumSgprs: 18
; NumVgprs: 5
; ScratchSize: 0
; MemoryBound: 0
; FloatMode: 240
; IeeeMode: 1
; LDSByteSize: 2048 bytes/workgroup (compile time only)
; SGPRBlocks: 2
; VGPRBlocks: 0
; NumSGPRsForWavesPerEU: 18
; NumVGPRsForWavesPerEU: 5
; 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	_Z8sumTotalPfS_         ; -- Begin function _Z8sumTotalPfS_
	.globl	_Z8sumTotalPfS_
	.p2align	8
	.type	_Z8sumTotalPfS_,@function
_Z8sumTotalPfS_:                        ; @_Z8sumTotalPfS_
; %bb.0:
	s_clause 0x1
	s_load_b32 s5, s[0:1], 0x1c
	s_load_b128 s[0:3], s[0:1], 0x0
	s_mov_b32 s4, s15
	s_waitcnt lgkmcnt(0)
	s_and_b32 s5, s5, 0xffff
	s_delay_alu instid0(SALU_CYCLE_1) | instskip(SKIP_2) | instid1(VALU_DEP_1)
	s_mul_i32 s6, s15, s5
	s_cmp_lt_u32 s5, 2
	v_add_nc_u32_e32 v1, s6, v0
	v_ashrrev_i32_e32 v2, 31, v1
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_lshlrev_b64 v[2:3], 2, v[1:2]
	v_add_co_u32 v2, vcc_lo, s0, v2
	s_delay_alu instid0(VALU_DEP_2)
	v_add_co_ci_u32_e32 v3, vcc_lo, s1, v3, vcc_lo
	global_load_b32 v3, v[2:3], off
	v_lshlrev_b32_e32 v2, 2, v0
	s_waitcnt vmcnt(0)
	ds_store_b32 v2, v3
	s_waitcnt lgkmcnt(0)
	s_barrier
.LBB2_1:                                ; =>This Inner Loop Header: Depth=1
	buffer_gl0_inv
	s_cbranch_scc1 .LBB2_5
; %bb.2:                                ; %.lr.ph
                                        ;   in Loop: Header=BB2_1 Depth=1
	s_lshr_b32 s0, s5, 1
	s_delay_alu instid0(SALU_CYCLE_1) | instskip(NEXT) | instid1(SALU_CYCLE_1)
	s_add_i32 s1, s0, s6
	v_cmp_gt_u32_e32 vcc_lo, s1, v1
	s_and_saveexec_b32 s1, vcc_lo
	s_cbranch_execz .LBB2_4
; %bb.3:                                ;   in Loop: Header=BB2_1 Depth=1
	v_lshl_add_u32 v3, s0, 2, v2
	ds_load_b32 v4, v2
	ds_load_b32 v3, v3
	s_waitcnt lgkmcnt(0)
	v_add_f32_e32 v3, v4, v3
	ds_store_b32 v2, v3
.LBB2_4:                                ;   in Loop: Header=BB2_1 Depth=1
	s_or_b32 exec_lo, exec_lo, s1
	s_waitcnt lgkmcnt(0)
	s_barrier
	s_cmp_lt_u32 s5, 4
	s_mov_b32 s5, s0
	s_branch .LBB2_1
.LBB2_5:                                ; %._crit_edge
	s_mov_b32 s5, 0
	s_mov_b32 s0, exec_lo
	v_cmpx_eq_u32_e32 0, v0
	s_cbranch_execz .LBB2_7
; %bb.6:
	v_mov_b32_e32 v0, 0
	s_lshl_b64 s[0:1], s[4:5], 2
	s_delay_alu instid0(SALU_CYCLE_1)
	s_add_u32 s0, s2, s0
	s_addc_u32 s1, s3, s1
	ds_load_b32 v1, v0
	s_waitcnt lgkmcnt(0)
	global_store_b32 v0, v1, s[0:1]
.LBB2_7:
	s_nop 0
	s_sendmsg sendmsg(MSG_DEALLOC_VGPRS)
	s_endpgm
	.section	.rodata,"a",@progbits
	.p2align	6, 0x0
	.amdhsa_kernel _Z8sumTotalPfS_
		.amdhsa_group_segment_fixed_size 2048
		.amdhsa_private_segment_fixed_size 0
		.amdhsa_kernarg_size 272
		.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 5
		.amdhsa_next_free_sgpr 16
		.amdhsa_float_round_mode_32 0
		.amdhsa_float_round_mode_16_64 0
		.amdhsa_float_denorm_mode_32 3
		.amdhsa_float_denorm_mode_16_64 3
		.amdhsa_dx10_clamp 1
		.amdhsa_ieee_mode 1
		.amdhsa_fp16_overflow 0
		.amdhsa_workgroup_processor_mode 1
		.amdhsa_memory_ordered 1
		.amdhsa_forward_progress 0
		.amdhsa_shared_vgpr_count 0
		.amdhsa_exception_fp_ieee_invalid_op 0
		.amdhsa_exception_fp_denorm_src 0
		.amdhsa_exception_fp_ieee_div_zero 0
		.amdhsa_exception_fp_ieee_overflow 0
		.amdhsa_exception_fp_ieee_underflow 0
		.amdhsa_exception_fp_ieee_inexact 0
		.amdhsa_exception_int_div_zero 0
	.end_amdhsa_kernel
	.text
.Lfunc_end2:
	.size	_Z8sumTotalPfS_, .Lfunc_end2-_Z8sumTotalPfS_
                                        ; -- End function
	.section	.AMDGPU.csdata,"",@progbits
; Kernel info:
; codeLenInByte = 284
; NumSgprs: 18
; NumVgprs: 5
; ScratchSize: 0
; MemoryBound: 0
; FloatMode: 240
; IeeeMode: 1
; LDSByteSize: 2048 bytes/workgroup (compile time only)
; SGPRBlocks: 2
; VGPRBlocks: 0
; NumSGPRsForWavesPerEU: 18
; NumVGPRsForWavesPerEU: 5
; 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	_Z10subNsquarePfS_S_    ; -- Begin function _Z10subNsquarePfS_S_
	.globl	_Z10subNsquarePfS_S_
	.p2align	8
	.type	_Z10subNsquarePfS_S_,@function
_Z10subNsquarePfS_S_:                   ; @_Z10subNsquarePfS_S_
; %bb.0:
	s_clause 0x2
	s_load_b32 s2, s[0:1], 0x24
	s_load_b128 s[4:7], s[0:1], 0x0
	s_load_b64 s[0:1], s[0:1], 0x10
	s_waitcnt lgkmcnt(0)
	s_and_b32 s2, s2, 0xffff
	s_load_b32 s0, s[0:1], 0x0
	v_mad_u64_u32 v[1:2], null, s15, s2, v[0:1]
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_ashrrev_i32_e32 v2, 31, v1
	v_lshlrev_b64 v[0:1], 2, v[1:2]
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_2)
	v_add_co_u32 v2, vcc_lo, s4, v0
	v_add_co_ci_u32_e32 v3, vcc_lo, s5, v1, vcc_lo
	global_load_b32 v2, v[2:3], off
	s_waitcnt vmcnt(0) lgkmcnt(0)
	v_subrev_f32_e32 v2, s0, v2
	s_mov_b32 s0, 0x3e76c4e1
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_frexp_mant_f32_e64 v3, |v2|
	v_cmp_gt_f32_e32 vcc_lo, 0x3f2aaaab, v3
	v_cndmask_b32_e64 v4, 0, 1, vcc_lo
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_ldexp_f32 v3, v3, v4
	v_add_f32_e32 v4, 1.0, v3
	v_add_f32_e32 v6, -1.0, v3
	s_delay_alu instid0(VALU_DEP_2) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_add_f32_e32 v8, -1.0, v4
	v_sub_f32_e32 v3, v3, v8
	v_rcp_f32_e32 v5, v4
	s_waitcnt_depctr 0xfff
	v_mul_f32_e32 v7, v6, v5
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_mul_f32_e32 v9, v4, v7
	v_fma_f32 v4, v7, v4, -v9
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_fmac_f32_e32 v4, v7, v3
	v_add_f32_e32 v3, v9, v4
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_dual_sub_f32 v8, v6, v3 :: v_dual_sub_f32 v9, v3, v9
	v_sub_f32_e32 v4, v9, v4
	s_delay_alu instid0(VALU_DEP_2) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_sub_f32_e32 v6, v6, v8
	v_sub_f32_e32 v3, v6, v3
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_add_f32_e32 v3, v4, v3
	v_add_f32_e32 v3, v8, v3
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_mul_f32_e32 v3, v5, v3
	v_add_f32_e32 v4, v7, v3
	s_delay_alu instid0(VALU_DEP_1) | instskip(SKIP_1) | instid1(VALU_DEP_1)
	v_mul_f32_e32 v6, v4, v4
	v_sub_f32_e32 v5, v4, v7
	v_sub_f32_e32 v3, v3, v5
	s_delay_alu instid0(VALU_DEP_3) | instskip(NEXT) | instid1(VALU_DEP_2)
	v_fma_f32 v5, v4, v4, -v6
	v_add_f32_e32 v7, v3, v3
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_fmac_f32_e32 v5, v4, v7
	v_add_f32_e32 v7, v6, v5
	s_delay_alu instid0(VALU_DEP_1) | instskip(SKIP_2) | instid1(VALU_DEP_2)
	v_fmaak_f32 v8, s0, v7, 0x3e91f4c4
	v_sub_f32_e32 v6, v7, v6
	v_cmp_neq_f32_e64 s0, 0x7f800000, |v2|
	v_dual_fmaak_f32 v8, v7, v8, 0x3ecccdef :: v_dual_sub_f32 v5, v5, v6
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_mul_f32_e32 v9, v7, v8
	v_fma_f32 v6, v7, v8, -v9
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_fmac_f32_e32 v6, v5, v8
	v_add_f32_e32 v8, v9, v6
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_dual_sub_f32 v9, v8, v9 :: v_dual_add_f32 v10, 0x3f2aaaaa, v8
	v_dual_mul_f32 v11, v4, v7 :: v_dual_sub_f32 v6, v6, v9
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_3)
	v_fma_f32 v12, v7, v4, -v11
	v_add_f32_e32 v9, 0xbf2aaaaa, v10
	s_delay_alu instid0(VALU_DEP_3) | instskip(NEXT) | instid1(VALU_DEP_3)
	v_add_f32_e32 v6, 0x31739010, v6
	v_fmac_f32_e32 v12, v7, v3
	s_delay_alu instid0(VALU_DEP_3) | instskip(SKIP_1) | instid1(VALU_DEP_3)
	v_sub_f32_e32 v8, v8, v9
	v_ldexp_f32 v3, v3, 1
	v_fmac_f32_e32 v12, v5, v4
	v_ldexp_f32 v4, v4, 1
	s_delay_alu instid0(VALU_DEP_2) | instskip(SKIP_1) | instid1(VALU_DEP_1)
	v_add_f32_e32 v7, v11, v12
	v_add_f32_e32 v6, v6, v8
	v_add_f32_e32 v5, v10, v6
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_4)
	v_sub_f32_e32 v8, v10, v5
	v_mul_f32_e32 v9, v7, v5
	v_sub_f32_e32 v10, v7, v11
	s_delay_alu instid0(VALU_DEP_3) | instskip(NEXT) | instid1(VALU_DEP_3)
	v_add_f32_e32 v6, v6, v8
	v_fma_f32 v8, v7, v5, -v9
	s_delay_alu instid0(VALU_DEP_3) | instskip(NEXT) | instid1(VALU_DEP_2)
	v_sub_f32_e32 v10, v12, v10
	v_fmac_f32_e32 v8, v7, v6
	v_frexp_exp_i32_f32_e32 v6, v2
	s_delay_alu instid0(VALU_DEP_2) | instskip(NEXT) | instid1(VALU_DEP_2)
	v_fmac_f32_e32 v8, v10, v5
	v_subrev_co_ci_u32_e32 v5, vcc_lo, 0, v6, vcc_lo
	s_delay_alu instid0(VALU_DEP_2) | instskip(NEXT) | instid1(VALU_DEP_2)
	v_add_f32_e32 v6, v9, v8
	v_cvt_f32_i32_e32 v5, v5
	s_delay_alu instid0(VALU_DEP_2) | instskip(NEXT) | instid1(VALU_DEP_2)
	v_sub_f32_e32 v9, v6, v9
	v_dual_mul_f32 v10, 0x3f317218, v5 :: v_dual_add_f32 v7, v4, v6
	s_delay_alu instid0(VALU_DEP_2) | instskip(NEXT) | instid1(VALU_DEP_2)
	v_sub_f32_e32 v8, v8, v9
	v_fma_f32 v9, 0x3f317218, v5, -v10
	s_delay_alu instid0(VALU_DEP_2) | instskip(NEXT) | instid1(VALU_DEP_2)
	v_add_f32_e32 v3, v3, v8
	v_dual_fmamk_f32 v5, v5, 0xb102e308, v9 :: v_dual_sub_f32 v4, v7, v4
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_sub_f32_e32 v4, v6, v4
	v_dual_add_f32 v3, v3, v4 :: v_dual_add_f32 v4, v10, v5
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_add_f32_e32 v6, v7, v3
	v_dual_add_f32 v8, v4, v6 :: v_dual_sub_f32 v7, v6, v7
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_2)
	v_sub_f32_e32 v9, v8, v4
	v_dual_sub_f32 v10, v4, v10 :: v_dual_sub_f32 v3, v3, v7
	s_delay_alu instid0(VALU_DEP_2) | instskip(NEXT) | instid1(VALU_DEP_2)
	v_sub_f32_e32 v11, v8, v9
	v_dual_sub_f32 v5, v5, v10 :: v_dual_sub_f32 v6, v6, v9
	s_delay_alu instid0(VALU_DEP_2) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_sub_f32_e32 v4, v4, v11
	v_dual_add_f32 v7, v5, v3 :: v_dual_add_f32 v4, v6, v4
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_2)
	v_sub_f32_e32 v6, v7, v5
	v_add_f32_e32 v4, v7, v4
	s_delay_alu instid0(VALU_DEP_2) | instskip(SKIP_1) | instid1(VALU_DEP_2)
	v_sub_f32_e32 v7, v7, v6
	v_sub_f32_e32 v3, v3, v6
	v_sub_f32_e32 v5, v5, v7
	s_delay_alu instid0(VALU_DEP_4) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_add_f32_e32 v9, v8, v4
	v_dual_add_f32 v3, v3, v5 :: v_dual_sub_f32 v6, v9, v8
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_sub_f32_e32 v4, v4, v6
	v_add_f32_e32 v3, v3, v4
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_add_f32_e32 v4, v9, v3
	v_sub_f32_e32 v5, v4, v9
	v_add_f32_e32 v6, v4, v4
	v_mul_f32_e32 v7, 0, v4
	s_delay_alu instid0(VALU_DEP_3) | instskip(NEXT) | instid1(VALU_DEP_3)
	v_sub_f32_e32 v3, v3, v5
	v_fma_f32 v4, v4, 2.0, -v6
	v_cmp_class_f32_e64 vcc_lo, v6, 0x204
	s_delay_alu instid0(VALU_DEP_3) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_fmac_f32_e32 v7, 2.0, v3
	v_add_f32_e32 v3, v4, v7
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_add_f32_e32 v4, v6, v3
	v_cndmask_b32_e32 v5, v4, v6, vcc_lo
	s_delay_alu instid0(VALU_DEP_1) | instskip(SKIP_2) | instid1(VALU_DEP_2)
	v_cmp_eq_f32_e32 vcc_lo, 0x42b17218, v5
	v_cndmask_b32_e64 v7, 0, 0x37000000, vcc_lo
	v_cmp_neq_f32_e64 vcc_lo, 0x7f800000, |v5|
	v_sub_f32_e32 v8, v5, v7
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_mul_f32_e32 v9, 0x3fb8aa3b, v8
	v_fma_f32 v10, 0x3fb8aa3b, v8, -v9
	v_rndne_f32_e32 v11, v9
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_dual_fmamk_f32 v10, v8, 0x32a5705f, v10 :: v_dual_sub_f32 v9, v9, v11
	v_add_f32_e32 v9, v9, v10
	v_sub_f32_e32 v4, v4, v6
	v_cvt_i32_f32_e32 v6, v11
	s_delay_alu instid0(VALU_DEP_3) | instskip(NEXT) | instid1(VALU_DEP_2)
	v_exp_f32_e32 v9, v9
	v_sub_f32_e32 v3, v3, v4
	s_delay_alu instid0(VALU_DEP_1) | instskip(SKIP_3) | instid1(VALU_DEP_1)
	v_cndmask_b32_e32 v3, 0, v3, vcc_lo
	v_cmp_ngt_f32_e32 vcc_lo, 0xc2ce8ed0, v8
	s_waitcnt_depctr 0xfff
	v_ldexp_f32 v4, v9, v6
	v_dual_add_f32 v3, v7, v3 :: v_dual_cndmask_b32 v4, 0, v4
	v_cmp_nlt_f32_e32 vcc_lo, 0x42b17218, v8
	s_delay_alu instid0(VALU_DEP_2) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_cndmask_b32_e32 v4, 0x7f800000, v4, vcc_lo
	v_fma_f32 v3, v4, v3, v4
	v_cmp_eq_f32_e32 vcc_lo, 0x7f800000, v4
	s_delay_alu instid0(VALU_DEP_2) | instskip(SKIP_1) | instid1(VALU_DEP_2)
	v_cndmask_b32_e32 v3, v3, v4, vcc_lo
	v_cmp_neq_f32_e32 vcc_lo, 0, v2
	v_cndmask_b32_e64 v3, 0x7f800000, |v3|, s0
	s_delay_alu instid0(VALU_DEP_1)
	v_cndmask_b32_e32 v2, 0, v3, vcc_lo
	v_add_co_u32 v0, vcc_lo, s6, v0
	v_add_co_ci_u32_e32 v1, vcc_lo, s7, v1, vcc_lo
	global_store_b32 v[0:1], v2, off
	s_nop 0
	s_sendmsg sendmsg(MSG_DEALLOC_VGPRS)
	s_endpgm
	.section	.rodata,"a",@progbits
	.p2align	6, 0x0
	.amdhsa_kernel _Z10subNsquarePfS_S_
		.amdhsa_group_segment_fixed_size 0
		.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 13
		.amdhsa_next_free_sgpr 16
		.amdhsa_float_round_mode_32 0
		.amdhsa_float_round_mode_16_64 0
		.amdhsa_float_denorm_mode_32 3
		.amdhsa_float_denorm_mode_16_64 3
		.amdhsa_dx10_clamp 1
		.amdhsa_ieee_mode 1
		.amdhsa_fp16_overflow 0
		.amdhsa_workgroup_processor_mode 1
		.amdhsa_memory_ordered 1
		.amdhsa_forward_progress 0
		.amdhsa_shared_vgpr_count 0
		.amdhsa_exception_fp_ieee_invalid_op 0
		.amdhsa_exception_fp_denorm_src 0
		.amdhsa_exception_fp_ieee_div_zero 0
		.amdhsa_exception_fp_ieee_overflow 0
		.amdhsa_exception_fp_ieee_underflow 0
		.amdhsa_exception_fp_ieee_inexact 0
		.amdhsa_exception_int_div_zero 0
	.end_amdhsa_kernel
	.text
.Lfunc_end3:
	.size	_Z10subNsquarePfS_S_, .Lfunc_end3-_Z10subNsquarePfS_S_
                                        ; -- End function
	.section	.AMDGPU.csdata,"",@progbits
; Kernel info:
; codeLenInByte = 1064
; NumSgprs: 18
; NumVgprs: 13
; ScratchSize: 0
; MemoryBound: 0
; FloatMode: 240
; IeeeMode: 1
; LDSByteSize: 0 bytes/workgroup (compile time only)
; SGPRBlocks: 2
; VGPRBlocks: 1
; NumSGPRsForWavesPerEU: 18
; NumVGPRsForWavesPerEU: 13
; Occupancy: 16
; WaveLimiterHint : 0
; COMPUTE_PGM_RSRC2:SCRATCH_EN: 0
; COMPUTE_PGM_RSRC2:USER_SGPR: 15
; COMPUTE_PGM_RSRC2:TRAP_HANDLER: 0
; COMPUTE_PGM_RSRC2:TGID_X_EN: 1
; COMPUTE_PGM_RSRC2:TGID_Y_EN: 0
; COMPUTE_PGM_RSRC2:TGID_Z_EN: 0
; COMPUTE_PGM_RSRC2:TIDIG_COMP_CNT: 0
	.text
	.protected	_Z9subNpowr4PfS_S_      ; -- Begin function _Z9subNpowr4PfS_S_
	.globl	_Z9subNpowr4PfS_S_
	.p2align	8
	.type	_Z9subNpowr4PfS_S_,@function
_Z9subNpowr4PfS_S_:                     ; @_Z9subNpowr4PfS_S_
; %bb.0:
	s_clause 0x2
	s_load_b32 s2, s[0:1], 0x24
	s_load_b128 s[4:7], s[0:1], 0x0
	s_load_b64 s[0:1], s[0:1], 0x10
	s_waitcnt lgkmcnt(0)
	s_and_b32 s2, s2, 0xffff
	s_load_b32 s0, s[0:1], 0x0
	v_mad_u64_u32 v[1:2], null, s15, s2, v[0:1]
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_ashrrev_i32_e32 v2, 31, v1
	v_lshlrev_b64 v[0:1], 2, v[1:2]
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_2)
	v_add_co_u32 v2, vcc_lo, s4, v0
	v_add_co_ci_u32_e32 v3, vcc_lo, s5, v1, vcc_lo
	global_load_b32 v2, v[2:3], off
	s_waitcnt vmcnt(0) lgkmcnt(0)
	v_subrev_f32_e32 v2, s0, v2
	s_mov_b32 s0, 0x3e76c4e1
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_frexp_mant_f32_e64 v3, |v2|
	v_cmp_gt_f32_e32 vcc_lo, 0x3f2aaaab, v3
	v_cndmask_b32_e64 v4, 0, 1, vcc_lo
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_ldexp_f32 v3, v3, v4
	v_add_f32_e32 v4, 1.0, v3
	v_add_f32_e32 v6, -1.0, v3
	s_delay_alu instid0(VALU_DEP_2) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_add_f32_e32 v8, -1.0, v4
	v_sub_f32_e32 v3, v3, v8
	v_rcp_f32_e32 v5, v4
	s_waitcnt_depctr 0xfff
	v_mul_f32_e32 v7, v6, v5
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_mul_f32_e32 v9, v4, v7
	v_fma_f32 v4, v7, v4, -v9
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_fmac_f32_e32 v4, v7, v3
	v_add_f32_e32 v3, v9, v4
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_dual_sub_f32 v8, v6, v3 :: v_dual_sub_f32 v9, v3, v9
	v_sub_f32_e32 v4, v9, v4
	s_delay_alu instid0(VALU_DEP_2) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_sub_f32_e32 v6, v6, v8
	v_sub_f32_e32 v3, v6, v3
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_add_f32_e32 v3, v4, v3
	v_add_f32_e32 v3, v8, v3
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_mul_f32_e32 v3, v5, v3
	v_add_f32_e32 v4, v7, v3
	s_delay_alu instid0(VALU_DEP_1) | instskip(SKIP_1) | instid1(VALU_DEP_1)
	v_mul_f32_e32 v6, v4, v4
	v_sub_f32_e32 v5, v4, v7
	v_sub_f32_e32 v3, v3, v5
	s_delay_alu instid0(VALU_DEP_3) | instskip(NEXT) | instid1(VALU_DEP_2)
	v_fma_f32 v5, v4, v4, -v6
	v_add_f32_e32 v7, v3, v3
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_fmac_f32_e32 v5, v4, v7
	v_add_f32_e32 v7, v6, v5
	s_delay_alu instid0(VALU_DEP_1) | instskip(SKIP_2) | instid1(VALU_DEP_2)
	v_fmaak_f32 v8, s0, v7, 0x3e91f4c4
	v_sub_f32_e32 v6, v7, v6
	v_cmp_neq_f32_e64 s0, 0x7f800000, |v2|
	v_dual_fmaak_f32 v8, v7, v8, 0x3ecccdef :: v_dual_sub_f32 v5, v5, v6
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_mul_f32_e32 v9, v7, v8
	v_fma_f32 v6, v7, v8, -v9
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_fmac_f32_e32 v6, v5, v8
	v_add_f32_e32 v8, v9, v6
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_dual_sub_f32 v9, v8, v9 :: v_dual_add_f32 v10, 0x3f2aaaaa, v8
	v_dual_mul_f32 v11, v4, v7 :: v_dual_sub_f32 v6, v6, v9
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_3)
	v_fma_f32 v12, v7, v4, -v11
	v_add_f32_e32 v9, 0xbf2aaaaa, v10
	s_delay_alu instid0(VALU_DEP_3) | instskip(NEXT) | instid1(VALU_DEP_3)
	v_add_f32_e32 v6, 0x31739010, v6
	v_fmac_f32_e32 v12, v7, v3
	s_delay_alu instid0(VALU_DEP_3) | instskip(SKIP_1) | instid1(VALU_DEP_3)
	v_sub_f32_e32 v8, v8, v9
	v_ldexp_f32 v3, v3, 1
	v_fmac_f32_e32 v12, v5, v4
	v_ldexp_f32 v4, v4, 1
	s_delay_alu instid0(VALU_DEP_2) | instskip(SKIP_1) | instid1(VALU_DEP_1)
	v_add_f32_e32 v7, v11, v12
	v_add_f32_e32 v6, v6, v8
	v_add_f32_e32 v5, v10, v6
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_4)
	v_sub_f32_e32 v8, v10, v5
	v_mul_f32_e32 v9, v7, v5
	v_sub_f32_e32 v10, v7, v11
	s_delay_alu instid0(VALU_DEP_3) | instskip(NEXT) | instid1(VALU_DEP_3)
	v_add_f32_e32 v6, v6, v8
	v_fma_f32 v8, v7, v5, -v9
	s_delay_alu instid0(VALU_DEP_3) | instskip(NEXT) | instid1(VALU_DEP_2)
	v_sub_f32_e32 v10, v12, v10
	v_fmac_f32_e32 v8, v7, v6
	v_frexp_exp_i32_f32_e32 v6, v2
	s_delay_alu instid0(VALU_DEP_2) | instskip(NEXT) | instid1(VALU_DEP_2)
	v_fmac_f32_e32 v8, v10, v5
	v_subrev_co_ci_u32_e32 v5, vcc_lo, 0, v6, vcc_lo
	s_delay_alu instid0(VALU_DEP_2) | instskip(NEXT) | instid1(VALU_DEP_2)
	v_add_f32_e32 v6, v9, v8
	v_cvt_f32_i32_e32 v5, v5
	s_delay_alu instid0(VALU_DEP_2) | instskip(NEXT) | instid1(VALU_DEP_2)
	v_sub_f32_e32 v9, v6, v9
	v_dual_mul_f32 v10, 0x3f317218, v5 :: v_dual_add_f32 v7, v4, v6
	s_delay_alu instid0(VALU_DEP_2) | instskip(NEXT) | instid1(VALU_DEP_2)
	v_sub_f32_e32 v8, v8, v9
	v_fma_f32 v9, 0x3f317218, v5, -v10
	s_delay_alu instid0(VALU_DEP_2) | instskip(NEXT) | instid1(VALU_DEP_2)
	v_add_f32_e32 v3, v3, v8
	v_dual_fmamk_f32 v5, v5, 0xb102e308, v9 :: v_dual_sub_f32 v4, v7, v4
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_sub_f32_e32 v4, v6, v4
	v_dual_add_f32 v3, v3, v4 :: v_dual_add_f32 v4, v10, v5
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_add_f32_e32 v6, v7, v3
	v_dual_add_f32 v8, v4, v6 :: v_dual_sub_f32 v7, v6, v7
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_2)
	v_sub_f32_e32 v9, v8, v4
	v_dual_sub_f32 v10, v4, v10 :: v_dual_sub_f32 v3, v3, v7
	s_delay_alu instid0(VALU_DEP_2) | instskip(NEXT) | instid1(VALU_DEP_2)
	v_sub_f32_e32 v11, v8, v9
	v_dual_sub_f32 v5, v5, v10 :: v_dual_sub_f32 v6, v6, v9
	s_delay_alu instid0(VALU_DEP_2) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_sub_f32_e32 v4, v4, v11
	v_dual_add_f32 v7, v5, v3 :: v_dual_add_f32 v4, v6, v4
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_2)
	v_sub_f32_e32 v6, v7, v5
	v_add_f32_e32 v4, v7, v4
	s_delay_alu instid0(VALU_DEP_2) | instskip(SKIP_1) | instid1(VALU_DEP_2)
	v_sub_f32_e32 v7, v7, v6
	v_sub_f32_e32 v3, v3, v6
	v_sub_f32_e32 v5, v5, v7
	s_delay_alu instid0(VALU_DEP_4) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_add_f32_e32 v9, v8, v4
	v_dual_add_f32 v3, v3, v5 :: v_dual_sub_f32 v6, v9, v8
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_sub_f32_e32 v4, v4, v6
	v_add_f32_e32 v3, v3, v4
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_add_f32_e32 v4, v9, v3
	v_sub_f32_e32 v5, v4, v9
	v_mul_f32_e32 v7, 0, v4
	s_delay_alu instid0(VALU_DEP_2) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_sub_f32_e32 v3, v3, v5
	v_dual_fmac_f32 v7, 4.0, v3 :: v_dual_mul_f32 v6, 4.0, v4
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_fma_f32 v4, v4, 4.0, -v6
	v_add_f32_e32 v3, v4, v7
	v_cmp_class_f32_e64 vcc_lo, v6, 0x204
	s_delay_alu instid0(VALU_DEP_2) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_add_f32_e32 v4, v6, v3
	v_cndmask_b32_e32 v5, v4, v6, vcc_lo
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_4)
	v_cmp_eq_f32_e32 vcc_lo, 0x42b17218, v5
	v_cndmask_b32_e64 v7, 0, 0x37000000, vcc_lo
	v_cmp_neq_f32_e64 vcc_lo, 0x7f800000, |v5|
	s_delay_alu instid0(VALU_DEP_2) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_sub_f32_e32 v8, v5, v7
	v_mul_f32_e32 v9, 0x3fb8aa3b, v8
	s_delay_alu instid0(VALU_DEP_1) | instskip(SKIP_1) | instid1(VALU_DEP_1)
	v_fma_f32 v10, 0x3fb8aa3b, v8, -v9
	v_rndne_f32_e32 v11, v9
	v_dual_fmamk_f32 v10, v8, 0x32a5705f, v10 :: v_dual_sub_f32 v9, v9, v11
	s_delay_alu instid0(VALU_DEP_1) | instskip(SKIP_2) | instid1(VALU_DEP_3)
	v_add_f32_e32 v9, v9, v10
	v_sub_f32_e32 v4, v4, v6
	v_cvt_i32_f32_e32 v6, v11
	v_exp_f32_e32 v9, v9
	s_delay_alu instid0(VALU_DEP_2) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_sub_f32_e32 v3, v3, v4
	v_cndmask_b32_e32 v3, 0, v3, vcc_lo
	v_cmp_ngt_f32_e32 vcc_lo, 0xc2ce8ed0, v8
	s_waitcnt_depctr 0xfff
	v_ldexp_f32 v4, v9, v6
	s_delay_alu instid0(VALU_DEP_1) | instskip(SKIP_1) | instid1(VALU_DEP_2)
	v_cndmask_b32_e32 v4, 0, v4, vcc_lo
	v_cmp_nlt_f32_e32 vcc_lo, 0x42b17218, v8
	v_dual_add_f32 v3, v7, v3 :: v_dual_cndmask_b32 v4, 0x7f800000, v4
	s_delay_alu instid0(VALU_DEP_1) | instskip(SKIP_1) | instid1(VALU_DEP_2)
	v_fma_f32 v3, v4, v3, v4
	v_cmp_eq_f32_e32 vcc_lo, 0x7f800000, v4
	v_cndmask_b32_e32 v3, v3, v4, vcc_lo
	v_cmp_neq_f32_e32 vcc_lo, 0, v2
	s_delay_alu instid0(VALU_DEP_2) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_cndmask_b32_e64 v3, 0x7f800000, |v3|, s0
	v_cndmask_b32_e32 v2, 0, v3, vcc_lo
	v_add_co_u32 v0, vcc_lo, s6, v0
	v_add_co_ci_u32_e32 v1, vcc_lo, s7, v1, vcc_lo
	global_store_b32 v[0:1], v2, off
	s_nop 0
	s_sendmsg sendmsg(MSG_DEALLOC_VGPRS)
	s_endpgm
	.section	.rodata,"a",@progbits
	.p2align	6, 0x0
	.amdhsa_kernel _Z9subNpowr4PfS_S_
		.amdhsa_group_segment_fixed_size 0
		.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 13
		.amdhsa_next_free_sgpr 16
		.amdhsa_float_round_mode_32 0
		.amdhsa_float_round_mode_16_64 0
		.amdhsa_float_denorm_mode_32 3
		.amdhsa_float_denorm_mode_16_64 3
		.amdhsa_dx10_clamp 1
		.amdhsa_ieee_mode 1
		.amdhsa_fp16_overflow 0
		.amdhsa_workgroup_processor_mode 1
		.amdhsa_memory_ordered 1
		.amdhsa_forward_progress 0
		.amdhsa_shared_vgpr_count 0
		.amdhsa_exception_fp_ieee_invalid_op 0
		.amdhsa_exception_fp_denorm_src 0
		.amdhsa_exception_fp_ieee_div_zero 0
		.amdhsa_exception_fp_ieee_overflow 0
		.amdhsa_exception_fp_ieee_underflow 0
		.amdhsa_exception_fp_ieee_inexact 0
		.amdhsa_exception_int_div_zero 0
	.end_amdhsa_kernel
	.text
.Lfunc_end4:
	.size	_Z9subNpowr4PfS_S_, .Lfunc_end4-_Z9subNpowr4PfS_S_
                                        ; -- End function
	.section	.AMDGPU.csdata,"",@progbits
; Kernel info:
; codeLenInByte = 1064
; NumSgprs: 18
; NumVgprs: 13
; ScratchSize: 0
; MemoryBound: 0
; FloatMode: 240
; IeeeMode: 1
; LDSByteSize: 0 bytes/workgroup (compile time only)
; SGPRBlocks: 2
; VGPRBlocks: 1
; NumSGPRsForWavesPerEU: 18
; NumVGPRsForWavesPerEU: 13
; Occupancy: 16
; WaveLimiterHint : 0
; COMPUTE_PGM_RSRC2:SCRATCH_EN: 0
; COMPUTE_PGM_RSRC2:USER_SGPR: 15
; COMPUTE_PGM_RSRC2:TRAP_HANDLER: 0
; COMPUTE_PGM_RSRC2:TGID_X_EN: 1
; COMPUTE_PGM_RSRC2:TGID_Y_EN: 0
; COMPUTE_PGM_RSRC2:TGID_Z_EN: 0
; COMPUTE_PGM_RSRC2:TIDIG_COMP_CNT: 0
	.text
	.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:
      - .address_space:  global
        .offset:         0
        .size:           8
        .value_kind:     global_buffer
      - .address_space:  global
        .offset:         8
        .size:           8
        .value_kind:     global_buffer
      - .offset:         16
        .size:           4
        .value_kind:     hidden_block_count_x
      - .offset:         20
        .size:           4
        .value_kind:     hidden_block_count_y
      - .offset:         24
        .size:           4
        .value_kind:     hidden_block_count_z
      - .offset:         28
        .size:           2
        .value_kind:     hidden_group_size_x
      - .offset:         30
        .size:           2
        .value_kind:     hidden_group_size_y
      - .offset:         32
        .size:           2
        .value_kind:     hidden_group_size_z
      - .offset:         34
        .size:           2
        .value_kind:     hidden_remainder_x
      - .offset:         36
        .size:           2
        .value_kind:     hidden_remainder_y
      - .offset:         38
        .size:           2
        .value_kind:     hidden_remainder_z
      - .offset:         56
        .size:           8
        .value_kind:     hidden_global_offset_x
      - .offset:         64
        .size:           8
        .value_kind:     hidden_global_offset_y
      - .offset:         72
        .size:           8
        .value_kind:     hidden_global_offset_z
      - .offset:         80
        .size:           2
        .value_kind:     hidden_grid_dims
    .group_segment_fixed_size: 2048
    .kernarg_segment_align: 8
    .kernarg_segment_size: 272
    .language:       OpenCL C
    .language_version:
      - 2
      - 0
    .max_flat_workgroup_size: 1024
    .name:           _Z3minPfS_
    .private_segment_fixed_size: 0
    .sgpr_count:     18
    .sgpr_spill_count: 0
    .symbol:         _Z3minPfS_.kd
    .uniform_work_group_size: 1
    .uses_dynamic_stack: false
    .vgpr_count:     5
    .vgpr_spill_count: 0
    .wavefront_size: 32
    .workgroup_processor_mode: 1
  - .args:
      - .address_space:  global
        .offset:         0
        .size:           8
        .value_kind:     global_buffer
      - .address_space:  global
        .offset:         8
        .size:           8
        .value_kind:     global_buffer
      - .offset:         16
        .size:           4
        .value_kind:     hidden_block_count_x
      - .offset:         20
        .size:           4
        .value_kind:     hidden_block_count_y
      - .offset:         24
        .size:           4
        .value_kind:     hidden_block_count_z
      - .offset:         28
        .size:           2
        .value_kind:     hidden_group_size_x
      - .offset:         30
        .size:           2
        .value_kind:     hidden_group_size_y
      - .offset:         32
        .size:           2
        .value_kind:     hidden_group_size_z
      - .offset:         34
        .size:           2
        .value_kind:     hidden_remainder_x
      - .offset:         36
        .size:           2
        .value_kind:     hidden_remainder_y
      - .offset:         38
        .size:           2
        .value_kind:     hidden_remainder_z
      - .offset:         56
        .size:           8
        .value_kind:     hidden_global_offset_x
      - .offset:         64
        .size:           8
        .value_kind:     hidden_global_offset_y
      - .offset:         72
        .size:           8
        .value_kind:     hidden_global_offset_z
      - .offset:         80
        .size:           2
        .value_kind:     hidden_grid_dims
    .group_segment_fixed_size: 2048
    .kernarg_segment_align: 8
    .kernarg_segment_size: 272
    .language:       OpenCL C
    .language_version:
      - 2
      - 0
    .max_flat_workgroup_size: 1024
    .name:           _Z3maxPfS_
    .private_segment_fixed_size: 0
    .sgpr_count:     18
    .sgpr_spill_count: 0
    .symbol:         _Z3maxPfS_.kd
    .uniform_work_group_size: 1
    .uses_dynamic_stack: false
    .vgpr_count:     5
    .vgpr_spill_count: 0
    .wavefront_size: 32
    .workgroup_processor_mode: 1
  - .args:
      - .address_space:  global
        .offset:         0
        .size:           8
        .value_kind:     global_buffer
      - .address_space:  global
        .offset:         8
        .size:           8
        .value_kind:     global_buffer
      - .offset:         16
        .size:           4
        .value_kind:     hidden_block_count_x
      - .offset:         20
        .size:           4
        .value_kind:     hidden_block_count_y
      - .offset:         24
        .size:           4
        .value_kind:     hidden_block_count_z
      - .offset:         28
        .size:           2
        .value_kind:     hidden_group_size_x
      - .offset:         30
        .size:           2
        .value_kind:     hidden_group_size_y
      - .offset:         32
        .size:           2
        .value_kind:     hidden_group_size_z
      - .offset:         34
        .size:           2
        .value_kind:     hidden_remainder_x
      - .offset:         36
        .size:           2
        .value_kind:     hidden_remainder_y
      - .offset:         38
        .size:           2
        .value_kind:     hidden_remainder_z
      - .offset:         56
        .size:           8
        .value_kind:     hidden_global_offset_x
      - .offset:         64
        .size:           8
        .value_kind:     hidden_global_offset_y
      - .offset:         72
        .size:           8
        .value_kind:     hidden_global_offset_z
      - .offset:         80
        .size:           2
        .value_kind:     hidden_grid_dims
    .group_segment_fixed_size: 2048
    .kernarg_segment_align: 8
    .kernarg_segment_size: 272
    .language:       OpenCL C
    .language_version:
      - 2
      - 0
    .max_flat_workgroup_size: 1024
    .name:           _Z8sumTotalPfS_
    .private_segment_fixed_size: 0
    .sgpr_count:     18
    .sgpr_spill_count: 0
    .symbol:         _Z8sumTotalPfS_.kd
    .uniform_work_group_size: 1
    .uses_dynamic_stack: false
    .vgpr_count:     5
    .vgpr_spill_count: 0
    .wavefront_size: 32
    .workgroup_processor_mode: 1
  - .args:
      - .address_space:  global
        .offset:         0
        .size:           8
        .value_kind:     global_buffer
      - .address_space:  global
        .offset:         8
        .size:           8
        .value_kind:     global_buffer
      - .address_space:  global
        .offset:         16
        .size:           8
        .value_kind:     global_buffer
      - .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: 0
    .kernarg_segment_align: 8
    .kernarg_segment_size: 280
    .language:       OpenCL C
    .language_version:
      - 2
      - 0
    .max_flat_workgroup_size: 1024
    .name:           _Z10subNsquarePfS_S_
    .private_segment_fixed_size: 0
    .sgpr_count:     18
    .sgpr_spill_count: 0
    .symbol:         _Z10subNsquarePfS_S_.kd
    .uniform_work_group_size: 1
    .uses_dynamic_stack: false
    .vgpr_count:     13
    .vgpr_spill_count: 0
    .wavefront_size: 32
    .workgroup_processor_mode: 1
  - .args:
      - .address_space:  global
        .offset:         0
        .size:           8
        .value_kind:     global_buffer
      - .address_space:  global
        .offset:         8
        .size:           8
        .value_kind:     global_buffer
      - .address_space:  global
        .offset:         16
        .size:           8
        .value_kind:     global_buffer
      - .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: 0
    .kernarg_segment_align: 8
    .kernarg_segment_size: 280
    .language:       OpenCL C
    .language_version:
      - 2
      - 0
    .max_flat_workgroup_size: 1024
    .name:           _Z9subNpowr4PfS_S_
    .private_segment_fixed_size: 0
    .sgpr_count:     18
    .sgpr_spill_count: 0
    .symbol:         _Z9subNpowr4PfS_S_.kd
    .uniform_work_group_size: 1
    .uses_dynamic_stack: false
    .vgpr_count:     13
    .vgpr_spill_count: 0
    .wavefront_size: 32
    .workgroup_processor_mode: 1
amdhsa.target:   amdgcn-amd-amdhsa--gfx1100
amdhsa.version:
  - 1
  - 2
...

	.end_amdgpu_metadata
