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

#define ONE_MB 1024*1024
#define SIXTEEN_MB 16*1024*1024
#define FOUR_MB 4*1024*1024



__global__ void testKernel1 (){

}

__global__ void testKernel2 (int *array1, int *resultArray){

  int index = threadIdx.x + blockIdx.x*blockDim.x;
  resultArray[index] = array1[index];
}

__global__ void testKernel3(int *c_array, int *transpose_array, int width){

  int index = threadIdx.x + blockIdx.x * blockDim.x;
  transpose_array[((int)(index/width) + ((index%width)*(width)))] = c_array[index];
}


int main() {
  float time_in_ms = 0.0f;
  cudaEvent_t start, stop;
  cudaError_t err=cudaSuccess;
  //===========TASK 1============================
  cudaEventCreate(&start);
  cudaEventCreate(&stop);
  cudaEventRecord(start,0);
  testKernel1<<<1,1>>>();
  cudaEventRecord(stop,0);
  cudaEventSynchronize(stop); //Wait till the event is executed.
  cudaEventElapsedTime(&time_in_ms,start,stop);
  printf("Time for empty kernel to exexute:%fms\n\n",time_in_ms);
  cudaEventDestroy(start);
  cudaEventDestroy(stop);
  //========TASK 1 end============================

  //=======TASK 2=================================
  int *array1 = (int *) malloc(ONE_MB);
  int *c_array;
  cudaEventCreate(&start);
  cudaEventCreate(&stop);

  for (int i = 0; i < ONE_MB/sizeof(int); i++) {
    array1[i] = i;
  }

  cudaMalloc((void **)&c_array, ONE_MB);
  cudaEventRecord(start,0);
  cudaMemcpy(c_array, array1, ONE_MB, cudaMemcpyHostToDevice);
  cudaEventRecord(stop,0);
  cudaEventSynchronize(stop);
  cudaEventElapsedTime(&time_in_ms,start,stop);
  printf("Time for memory copy of %d bytes is :%fms\n\n",ONE_MB,time_in_ms);
  cudaEventDestroy(start);
  cudaEventDestroy(stop);
  cudaFree(c_array);
  //==============TASK 2 end======================

  //=============TASK 3===========================
  int *arrayCopy = (int *) malloc(ONE_MB),*c_arrayCopy;
  cudaEventCreate(&start);
  cudaEventCreate(&stop);
  cudaMalloc((void **)&c_array, ONE_MB);
  cudaMalloc((void **)&c_arrayCopy, ONE_MB);
  cudaMemcpy(c_array, array1, ONE_MB, cudaMemcpyHostToDevice);
  //testKernel2<<<256,1024>>>(c_array,c_arrayCopy);
  cudaEventRecord(start,0);
  cudaMemcpy(arrayCopy, c_arrayCopy, ONE_MB, cudaMemcpyDeviceToHost);
  cudaEventRecord(stop,0);
  cudaEventSynchronize(stop);
  time_in_ms = 0.0f;
  cudaEventElapsedTime(&time_in_ms,start,stop);
  printf("Time to copy %d bytes from device to host = %fms\n",ONE_MB,time_in_ms);
  printf("Effective bandwidth = %f GB/s \n\n", ONE_MB/time_in_ms/1e6);
  cudaFree(c_array);
  cudaFree(c_arrayCopy);
  free(array1);
  free(arrayCopy);
  cudaEventDestroy(start);
  cudaEventDestroy(stop);
  //============TASK 3 end==================================

  //============TASK 4====================================
  arrayCopy = (int *) malloc(SIXTEEN_MB);
  array1 = (int *) malloc(SIXTEEN_MB);
  for (int i = 0; i < (SIXTEEN_MB)/sizeof(int); i++) {
    array1[i] = i;
  }
  cudaEventCreate(&start);
  cudaEventCreate(&stop);
  cudaMalloc((void **)&c_array, 16*ONE_MB);
  cudaMalloc((void **)&c_arrayCopy, 16*ONE_MB);
  cudaEventRecord(start,0);
  cudaMemcpy(c_array, array1, SIXTEEN_MB, cudaMemcpyHostToDevice);
  //testKernel2<<<4096,1024>>>(c_array,c_arrayCopy);
  cudaMemcpy(arrayCopy, c_arrayCopy, SIXTEEN_MB, cudaMemcpyDeviceToHost);
  cudaEventRecord(stop,0);
  cudaEventSynchronize(stop);
  time_in_ms = 0.0f;
  cudaEventElapsedTime(&time_in_ms,start,stop);
  printf("Time to copy %d bytes from device to host = %fms\n",SIXTEEN_MB,time_in_ms);
  printf("Effective bandwidth = %f GB/s \n\n", (SIXTEEN_MB)/time_in_ms/1e6);
  cudaFree(c_array);
  cudaFree(c_arrayCopy);
  free(array1);
  free(arrayCopy);
  cudaEventDestroy(start);
  cudaEventDestroy(stop);
  //===================TASK 4 end========================

  //===================TASK 5============================
  int *c_array1,*c_array2, number_of_steams = 2;
  int *resultArray1, *resultArray2;

  cudaMallocHost((void **)&resultArray1, SIXTEEN_MB);
  cudaMallocHost((void **)&resultArray2, SIXTEEN_MB);
  cudaMallocHost((void **)&array1, SIXTEEN_MB);

  cudaMalloc((void **)&c_array1, SIXTEEN_MB);
  cudaMalloc((void **)&c_array2, SIXTEEN_MB);

  for (int i = 0; i < (SIXTEEN_MB)/sizeof(int); i++) {
    array1[i] = i;
  }
  cudaEventCreate(&start);
  cudaEventCreate(&stop);

  cudaStream_t stream[number_of_steams];
  for (int i = 0; i < number_of_steams; i++) {
    cudaStreamCreate(&stream[i]);
  }
  cudaEventRecord(start,0);
  //for(int i=0;i<number_of_steams;i++){
    cudaMemcpyAsync(c_array1,array1,SIXTEEN_MB,cudaMemcpyHostToDevice,stream[0]);
    cudaMemcpyAsync(c_array2,array1,SIXTEEN_MB,cudaMemcpyHostToDevice,stream[1]);
  //}
  cudaMemcpyAsync(resultArray1,c_array1,SIXTEEN_MB,cudaMemcpyDeviceToHost,stream[0]);
  cudaMemcpyAsync(resultArray2,c_array2,SIXTEEN_MB,cudaMemcpyDeviceToHost,stream[1]);
  cudaEventRecord(stop,0);
  cudaEventSynchronize(stop);
  time_in_ms = 0.0;
  cudaEventElapsedTime(&time_in_ms,start,stop);
  printf("Time for async data transfer of 2 arrays each of %d bytes multiple arrays is = %fms\n",SIXTEEN_MB, time_in_ms);
  printf("Bandwidth for async data transfer of 2 arrays is : %f \n\n",(SIXTEEN_MB)/time_in_ms/1e6);
  cudaFree(c_array1);
  cudaFree(c_array2);
  cudaFreeHost(resultArray1);
  cudaFreeHost(resultArray2);
  cudaFreeHost(array1);
  cudaEventDestroy(start);
  cudaEventDestroy(stop);

  //==================TASK 5 end=========================


  //=================TASK 6================================
  cudaEventCreate(&start);
  cudaEventCreate(&stop);
  int *array4mb = (int *) malloc(FOUR_MB*sizeof(int));
  int width = 1024;
  for(int i=0; i<FOUR_MB; i++){
    array4mb[i] = i;
  }

  int *cuda_array_4mb, *transpose_4MB;
  cudaMalloc((void **)&cuda_array_4mb,FOUR_MB*(sizeof(int)));
  cudaMalloc((void **)&transpose_4MB,FOUR_MB*(sizeof(int)));
  cudaMemcpy(cuda_array_4mb, array4mb, FOUR_MB*(sizeof(int)), cudaMemcpyHostToDevice);
  cudaEventRecord(start,0);
  testKernel3<<<4096,1024>>>(cuda_array_4mb, transpose_4MB,width);
  cudaEventRecord(stop,0);
  cudaEventSynchronize(stop);
  cudaMemcpy(array4mb, transpose_4MB, FOUR_MB*(sizeof(int)), cudaMemcpyDeviceToHost);
  time_in_ms = 0.0;
  cudaEventElapsedTime(&time_in_ms,start,stop);
  printf("Bandwidth for array of dimension %d is %fGFLOPS\n\n",FOUR_MB,(FOUR_MB)/time_in_ms/1e6);
  //=================Task 6 end============================



  err=cudaGetLastError();
	if(err!=cudaSuccess) {
		fprintf(stderr,"Error executing the kernel - %s\n",
				 cudaGetErrorString(err));
		exit(EXIT_FAILURE);
	}

  cudaDeviceProp deviceProperties;
  cudaGetDeviceProperties(&deviceProperties,0);
  printf("Device name: %s\n", deviceProperties.name);
  printf("Memory Clock Rate (KHz): %d\n",deviceProperties.memoryClockRate);
  printf("Memory Bus Width (bits): %d\n",deviceProperties.memoryBusWidth);
  printf("Peak Memory Bandwidth (GB/s): %f\n",
    2.0*deviceProperties.memoryClockRate*(deviceProperties.memoryBusWidth/8)/1.0e6);
  printf("Registers per multiprocessors: %d\n\n",deviceProperties.regsPerMultiprocessor);
}

	.file	"tmpxft_0033116b_00000000-6_Performance_measure.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	_Z30__device_stub__Z11testKernel1vv
	.type	_Z30__device_stub__Z11testKernel1vv, @function
_Z30__device_stub__Z11testKernel1vv:
.LFB2052:
	.cfi_startproc
	endbr64
	subq	$88, %rsp
	.cfi_def_cfa_offset 96
	movq	%fs:40, %rax
	movq	%rax, 72(%rsp)
	movabsq	$4294967297, %rax
	leaq	8(%rsp), %rcx
	movq	%rsp, %rdx
	leaq	28(%rsp), %rsi
	leaq	16(%rsp), %rdi
	movl	$1, 24(%rsp)
	movl	$1, 36(%rsp)
	movq	%rax, 16(%rsp)
	movq	%rax, 28(%rsp)
	call	__cudaPopCallConfiguration@PLT
	testl	%eax, %eax
	jne	.L2
	pushq	8(%rsp)
	.cfi_def_cfa_offset 104
	leaq	_Z11testKernel1v(%rip), %rdi
	pushq	8(%rsp)
	.cfi_def_cfa_offset 112
	movq	44(%rsp), %rcx
	movl	52(%rsp), %r8d
	movq	32(%rsp), %rsi
	movl	40(%rsp), %edx
	leaq	80(%rsp), %r9
	call	cudaLaunchKernel@PLT
	popq	%rax
	.cfi_def_cfa_offset 104
	popq	%rdx
	.cfi_def_cfa_offset 96
.L2:
	movq	72(%rsp), %rax
	subq	%fs:40, %rax
	je	.L4
	call	__stack_chk_fail@PLT
.L4:
	addq	$88, %rsp
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE2052:
	.size	_Z30__device_stub__Z11testKernel1vv, .-_Z30__device_stub__Z11testKernel1vv
	.globl	_Z11testKernel1v
	.type	_Z11testKernel1v, @function
_Z11testKernel1v:
.LFB2053:
	.cfi_startproc
	endbr64
	jmp	_Z30__device_stub__Z11testKernel1vv
	.cfi_endproc
.LFE2053:
	.size	_Z11testKernel1v, .-_Z11testKernel1v
	.globl	_Z33__device_stub__Z11testKernel2PiS_PiS_
	.type	_Z33__device_stub__Z11testKernel2PiS_PiS_, @function
_Z33__device_stub__Z11testKernel2PiS_PiS_:
.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	_Z11testKernel2PiS_(%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	_Z33__device_stub__Z11testKernel2PiS_PiS_, .-_Z33__device_stub__Z11testKernel2PiS_PiS_
	.globl	_Z11testKernel2PiS_
	.type	_Z11testKernel2PiS_, @function
_Z11testKernel2PiS_:
.LFB2055:
	.cfi_startproc
	endbr64
	jmp	_Z33__device_stub__Z11testKernel2PiS_PiS_
	.cfi_endproc
.LFE2055:
	.size	_Z11testKernel2PiS_, .-_Z11testKernel2PiS_
	.globl	_Z34__device_stub__Z11testKernel3PiS_iPiS_i
	.type	_Z34__device_stub__Z11testKernel3PiS_iPiS_i, @function
_Z34__device_stub__Z11testKernel3PiS_iPiS_i:
.LFB2056:
	.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
	movl	%edx, 12(%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	12(%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	.L13
	pushq	40(%rsp)
	.cfi_def_cfa_offset 152
	leaq	_Z11testKernel3PiS_i(%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
.L13:
	movq	120(%rsp), %rax
	subq	%fs:40, %rax
	je	.L15
	call	__stack_chk_fail@PLT
.L15:
	addq	$136, %rsp
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE2056:
	.size	_Z34__device_stub__Z11testKernel3PiS_iPiS_i, .-_Z34__device_stub__Z11testKernel3PiS_iPiS_i
	.globl	_Z11testKernel3PiS_i
	.type	_Z11testKernel3PiS_i, @function
_Z11testKernel3PiS_i:
.LFB2057:
	.cfi_startproc
	endbr64
	jmp	_Z34__device_stub__Z11testKernel3PiS_iPiS_i
	.cfi_endproc
.LFE2057:
	.size	_Z11testKernel3PiS_i, .-_Z11testKernel3PiS_i
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC1:
	.string	"Time for empty kernel to exexute:%fms\n\n"
.LC2:
	.string	"Time for memory copy of %d bytes is :%fms\n\n"
.LC3:
	.string	"Time to copy %d bytes from device to host = %fms\n"
.LC6:
	.string	"Effective bandwidth = %f GB/s \n\n"
.LC8:
	.string	"Time for async data transfer of 2 arrays each of %d bytes multiple arrays is = %fms\n"
.LC9:
	.string	"Bandwidth for async data transfer of 2 arrays is : %f \n\n"
.LC11:
	.string	"Bandwidth for array of dimension %d is %fGFLOPS\n\n"
.LC12:
	.string	"Error executing the kernel - %s\n"
.LC13:
	.string	"Device name: %s\n"
.LC14:
	.string	"Memory Clock Rate (KHz): %d\n"
.LC15:
	.string	"Memory Bus Width (bits): %d\n"
.LC16:
	.string	"Peak Memory Bandwidth (GB/s): %f\n"
.LC17:
	.string	"Registers per multiprocessors: %d\n\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
	pushq	%rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	subq	$1208, %rsp
	.cfi_def_cfa_offset 1264
	movq	%fs:40, %rax
	movq	%rax, 1192(%rsp)
	xorl	%eax, %eax
	leaq	32(%rsp), %rbx
	movl	$0x00000000, 28(%rsp)
	movq	%rbx, %rdi
	call	cudaEventCreate@PLT
	leaq	40(%rsp), %rax
	movq	%rax, %rdi
	movq	%rax, (%rsp)
	call	cudaEventCreate@PLT
	movq	32(%rsp), %rdi
	xorl	%esi, %esi
	call	cudaEventRecord@PLT
	xorl	%r9d, %r9d
	xorl	%r8d, %r8d
	movl	$1, %ecx
	movabsq	$4294967297, %rdi
	movl	$1, %esi
	movl	$1, 140(%rsp)
	movq	%rdi, %rdx
	movq	%rdi, 120(%rsp)
	movq	%rdi, 132(%rsp)
	movl	$1, 128(%rsp)
	call	__cudaPushCallConfiguration@PLT
	testl	%eax, %eax
	jne	.L19
	call	_Z30__device_stub__Z11testKernel1vv
.L19:
	movq	40(%rsp), %rdi
	xorl	%esi, %esi
	call	cudaEventRecord@PLT
	movq	40(%rsp), %rdi
	call	cudaEventSynchronize@PLT
	movq	40(%rsp), %rdx
	leaq	28(%rsp), %rax
	movq	32(%rsp), %rsi
	movq	%rax, %rdi
	movq	%rax, 8(%rsp)
	call	cudaEventElapsedTime@PLT
	leaq	.LC1(%rip), %rsi
	movl	$2, %edi
	movb	$1, %al
	cvtss2sd	28(%rsp), %xmm0
	call	__printf_chk@PLT
	movq	32(%rsp), %rdi
	call	cudaEventDestroy@PLT
	movq	40(%rsp), %rdi
	call	cudaEventDestroy@PLT
	movl	$1048576, %edi
	call	malloc@PLT
	movq	%rbx, %rdi
	movq	%rax, 48(%rsp)
	call	cudaEventCreate@PLT
	movq	(%rsp), %rdi
	call	cudaEventCreate@PLT
	movq	48(%rsp), %rdx
	xorl	%eax, %eax
.L20:
	movl	%eax, (%rdx,%rax,4)
	incq	%rax
	cmpq	$262144, %rax
	jne	.L20
	leaq	56(%rsp), %r12
	movl	$1048576, %esi
	leaq	64(%rsp), %r15
	movq	%r12, %rdi
	leaq	.LC3(%rip), %r14
	leaq	.LC6(%rip), %r13
	call	cudaMalloc@PLT
	movq	32(%rsp), %rdi
	xorl	%esi, %esi
	call	cudaEventRecord@PLT
	movq	48(%rsp), %rsi
	movq	56(%rsp), %rdi
	movl	$1, %ecx
	movl	$1048576, %edx
	call	cudaMemcpy@PLT
	movq	40(%rsp), %rdi
	xorl	%esi, %esi
	call	cudaEventRecord@PLT
	movq	40(%rsp), %rdi
	call	cudaEventSynchronize@PLT
	movq	40(%rsp), %rdx
	movq	32(%rsp), %rsi
	movq	8(%rsp), %rdi
	call	cudaEventElapsedTime@PLT
	movl	$1048576, %edx
	leaq	.LC2(%rip), %rsi
	movb	$1, %al
	movl	$2, %edi
	cvtss2sd	28(%rsp), %xmm0
	call	__printf_chk@PLT
	movq	32(%rsp), %rdi
	call	cudaEventDestroy@PLT
	movq	40(%rsp), %rdi
	call	cudaEventDestroy@PLT
	movq	56(%rsp), %rdi
	call	cudaFree@PLT
	movl	$1048576, %edi
	call	malloc@PLT
	movq	%rbx, %rdi
	movq	%rax, %rbp
	call	cudaEventCreate@PLT
	movq	(%rsp), %rdi
	call	cudaEventCreate@PLT
	movl	$1048576, %esi
	movq	%r12, %rdi
	call	cudaMalloc@PLT
	movl	$1048576, %esi
	movq	%r15, %rdi
	call	cudaMalloc@PLT
	movq	48(%rsp), %rsi
	movq	56(%rsp), %rdi
	movl	$1, %ecx
	movl	$1048576, %edx
	call	cudaMemcpy@PLT
	movq	32(%rsp), %rdi
	xorl	%esi, %esi
	call	cudaEventRecord@PLT
	movq	64(%rsp), %rsi
	movl	$2, %ecx
	movq	%rbp, %rdi
	movl	$1048576, %edx
	call	cudaMemcpy@PLT
	movq	40(%rsp), %rdi
	xorl	%esi, %esi
	call	cudaEventRecord@PLT
	movq	40(%rsp), %rdi
	call	cudaEventSynchronize@PLT
	movq	40(%rsp), %rdx
	movq	32(%rsp), %rsi
	movl	$0x00000000, 28(%rsp)
	movq	8(%rsp), %rdi
	call	cudaEventElapsedTime@PLT
	movl	$1048576, %edx
	movq	%r14, %rsi
	movb	$1, %al
	movl	$2, %edi
	cvtss2sd	28(%rsp), %xmm0
	call	__printf_chk@PLT
	movq	%r13, %rsi
	movl	$2, %edi
	movb	$1, %al
	movss	.LC4(%rip), %xmm0
	divss	28(%rsp), %xmm0
	cvtss2sd	%xmm0, %xmm0
	divsd	.LC5(%rip), %xmm0
	call	__printf_chk@PLT
	movq	56(%rsp), %rdi
	call	cudaFree@PLT
	movq	64(%rsp), %rdi
	call	cudaFree@PLT
	movq	48(%rsp), %rdi
	call	free@PLT
	movq	%rbp, %rdi
	call	free@PLT
	movq	32(%rsp), %rdi
	call	cudaEventDestroy@PLT
	movq	40(%rsp), %rdi
	call	cudaEventDestroy@PLT
	movl	$16777216, %edi
	call	malloc@PLT
	movl	$16777216, %edi
	movq	%rax, %rbp
	call	malloc@PLT
	xorl	%edx, %edx
	movq	%rax, 48(%rsp)
.L21:
	movl	%edx, (%rax,%rdx,4)
	incq	%rdx
	cmpq	$4194304, %rdx
	jne	.L21
	movq	%rbx, %rdi
	call	cudaEventCreate@PLT
	movq	(%rsp), %rdi
	call	cudaEventCreate@PLT
	movl	$16777216, %esi
	movq	%r12, %rdi
	call	cudaMalloc@PLT
	movl	$16777216, %esi
	movq	%r15, %rdi
	call	cudaMalloc@PLT
	movq	32(%rsp), %rdi
	xorl	%esi, %esi
	call	cudaEventRecord@PLT
	movq	48(%rsp), %rsi
	movq	56(%rsp), %rdi
	movl	$1, %ecx
	movl	$16777216, %edx
	call	cudaMemcpy@PLT
	movq	64(%rsp), %rsi
	movl	$2, %ecx
	movq	%rbp, %rdi
	movl	$16777216, %edx
	call	cudaMemcpy@PLT
	movq	40(%rsp), %rdi
	xorl	%esi, %esi
	call	cudaEventRecord@PLT
	movq	40(%rsp), %rdi
	call	cudaEventSynchronize@PLT
	movq	40(%rsp), %rdx
	movq	32(%rsp), %rsi
	movl	$0x00000000, 28(%rsp)
	movq	8(%rsp), %rdi
	call	cudaEventElapsedTime@PLT
	movl	$16777216, %edx
	movq	%r14, %rsi
	movb	$1, %al
	movl	$2, %edi
	cvtss2sd	28(%rsp), %xmm0
	call	__printf_chk@PLT
	movq	%r13, %rsi
	movl	$2, %edi
	movb	$1, %al
	movss	.LC7(%rip), %xmm0
	divss	28(%rsp), %xmm0
	cvtss2sd	%xmm0, %xmm0
	divsd	.LC5(%rip), %xmm0
	call	__printf_chk@PLT
	movq	56(%rsp), %rdi
	call	cudaFree@PLT
	movq	64(%rsp), %rdi
	call	cudaFree@PLT
	movq	48(%rsp), %rdi
	call	free@PLT
	movq	%rbp, %rdi
	call	free@PLT
	movq	32(%rsp), %rdi
	call	cudaEventDestroy@PLT
	movq	40(%rsp), %rdi
	call	cudaEventDestroy@PLT
	leaq	88(%rsp), %rdi
	movl	$16777216, %esi
	call	cudaMallocHost@PLT
	leaq	96(%rsp), %rdi
	movl	$16777216, %esi
	call	cudaMallocHost@PLT
	leaq	48(%rsp), %rdi
	movl	$16777216, %esi
	call	cudaMallocHost@PLT
	leaq	72(%rsp), %rdi
	movl	$16777216, %esi
	call	cudaMalloc@PLT
	leaq	80(%rsp), %rdi
	movl	$16777216, %esi
	call	cudaMalloc@PLT
	movq	48(%rsp), %rdx
	xorl	%eax, %eax
.L22:
	movl	%eax, (%rdx,%rax,4)
	incq	%rax
	cmpq	$4194304, %rax
	jne	.L22
	movq	%rbx, %rdi
	call	cudaEventCreate@PLT
	movq	(%rsp), %rdi
	call	cudaEventCreate@PLT
	leaq	144(%rsp), %rdi
	call	cudaStreamCreate@PLT
	leaq	152(%rsp), %rdi
	call	cudaStreamCreate@PLT
	movq	32(%rsp), %rdi
	xorl	%esi, %esi
	call	cudaEventRecord@PLT
	movq	48(%rsp), %rsi
	movq	72(%rsp), %rdi
	movl	$1, %ecx
	movq	144(%rsp), %r8
	movl	$16777216, %edx
	call	cudaMemcpyAsync@PLT
	movq	48(%rsp), %rsi
	movq	80(%rsp), %rdi
	movl	$1, %ecx
	movq	152(%rsp), %r8
	movl	$16777216, %edx
	call	cudaMemcpyAsync@PLT
	movq	72(%rsp), %rsi
	movq	88(%rsp), %rdi
	movl	$2, %ecx
	movq	144(%rsp), %r8
	movl	$16777216, %edx
	call	cudaMemcpyAsync@PLT
	movq	80(%rsp), %rsi
	movq	96(%rsp), %rdi
	movl	$2, %ecx
	movq	152(%rsp), %r8
	movl	$16777216, %edx
	call	cudaMemcpyAsync@PLT
	movq	40(%rsp), %rdi
	xorl	%esi, %esi
	call	cudaEventRecord@PLT
	movq	40(%rsp), %rdi
	call	cudaEventSynchronize@PLT
	movq	40(%rsp), %rdx
	movq	32(%rsp), %rsi
	movl	$0x00000000, 28(%rsp)
	movq	8(%rsp), %rdi
	call	cudaEventElapsedTime@PLT
	movl	$16777216, %edx
	leaq	.LC8(%rip), %rsi
	movb	$1, %al
	movl	$2, %edi
	cvtss2sd	28(%rsp), %xmm0
	call	__printf_chk@PLT
	leaq	.LC9(%rip), %rsi
	movb	$1, %al
	movl	$2, %edi
	movss	.LC7(%rip), %xmm0
	divss	28(%rsp), %xmm0
	cvtss2sd	%xmm0, %xmm0
	divsd	.LC5(%rip), %xmm0
	call	__printf_chk@PLT
	movq	72(%rsp), %rdi
	call	cudaFree@PLT
	movq	80(%rsp), %rdi
	call	cudaFree@PLT
	movq	88(%rsp), %rdi
	call	cudaFreeHost@PLT
	movq	96(%rsp), %rdi
	call	cudaFreeHost@PLT
	movq	48(%rsp), %rdi
	call	cudaFreeHost@PLT
	movq	32(%rsp), %rdi
	call	cudaEventDestroy@PLT
	movq	40(%rsp), %rdi
	call	cudaEventDestroy@PLT
	movq	%rbx, %rdi
	call	cudaEventCreate@PLT
	movq	(%rsp), %rdi
	call	cudaEventCreate@PLT
	movl	$16777216, %edi
	call	malloc@PLT
	movq	%rax, %rbx
	xorl	%eax, %eax
.L23:
	movl	%eax, (%rbx,%rax,4)
	incq	%rax
	cmpq	$4194304, %rax
	jne	.L23
	leaq	104(%rsp), %rdi
	movl	$16777216, %esi
	call	cudaMalloc@PLT
	leaq	112(%rsp), %rdi
	movl	$16777216, %esi
	call	cudaMalloc@PLT
	movq	104(%rsp), %rdi
	movl	$1, %ecx
	movq	%rbx, %rsi
	movl	$16777216, %edx
	call	cudaMemcpy@PLT
	movq	32(%rsp), %rdi
	xorl	%esi, %esi
	call	cudaEventRecord@PLT
	movl	$4194305, %edx
	xorl	%r9d, %r9d
	xorl	%r8d, %r8d
	movl	$1048577, %edi
	salq	$10, %rdx
	movl	$1, %ecx
	movl	$1, %esi
	salq	$12, %rdi
	movq	%rdx, 132(%rsp)
	movl	$1, 140(%rsp)
	movq	%rdi, 120(%rsp)
	movl	$1, 128(%rsp)
	call	__cudaPushCallConfiguration@PLT
	testl	%eax, %eax
	jne	.L24
	movq	112(%rsp), %rsi
	movq	104(%rsp), %rdi
	movl	$1024, %edx
	call	_Z34__device_stub__Z11testKernel3PiS_iPiS_i
.L24:
	movq	40(%rsp), %rdi
	xorl	%esi, %esi
	call	cudaEventRecord@PLT
	movq	40(%rsp), %rdi
	call	cudaEventSynchronize@PLT
	movq	112(%rsp), %rsi
	movl	$2, %ecx
	movq	%rbx, %rdi
	movl	$16777216, %edx
	call	cudaMemcpy@PLT
	movq	40(%rsp), %rdx
	movq	32(%rsp), %rsi
	movl	$0x00000000, 28(%rsp)
	movq	8(%rsp), %rdi
	call	cudaEventElapsedTime@PLT
	movl	$2, %edi
	movl	$4194304, %edx
	movb	$1, %al
	leaq	.LC11(%rip), %rsi
	movss	.LC10(%rip), %xmm0
	divss	28(%rsp), %xmm0
	cvtss2sd	%xmm0, %xmm0
	divsd	.LC5(%rip), %xmm0
	call	__printf_chk@PLT
	call	cudaGetLastError@PLT
	movl	%eax, %edi
	testl	%eax, %eax
	je	.L25
	call	cudaGetErrorString@PLT
	movq	stderr(%rip), %rdi
	movl	$2, %esi
	leaq	.LC12(%rip), %rdx
	movq	%rax, %rcx
	xorl	%eax, %eax
	call	__fprintf_chk@PLT
	movl	$1, %edi
	call	exit@PLT
.L25:
	leaq	160(%rsp), %rbx
	xorl	%esi, %esi
	movq	%rbx, %rdi
	call	cudaGetDeviceProperties_v2@PLT
	movq	%rbx, %rdx
	movl	$2, %edi
	xorl	%eax, %eax
	leaq	.LC13(%rip), %rsi
	call	__printf_chk@PLT
	movl	768(%rsp), %edx
	leaq	.LC14(%rip), %rsi
	xorl	%eax, %eax
	movl	$2, %edi
	call	__printf_chk@PLT
	movl	772(%rsp), %edx
	leaq	.LC15(%rip), %rsi
	xorl	%eax, %eax
	movl	$2, %edi
	call	__printf_chk@PLT
	movl	$8, %ecx
	movl	$2, %edi
	movl	772(%rsp), %eax
	cvtsi2sdl	768(%rsp), %xmm0
	leaq	.LC16(%rip), %rsi
	cltd
	idivl	%ecx
	addsd	%xmm0, %xmm0
	cvtsi2sdl	%eax, %xmm1
	movb	$1, %al
	mulsd	%xmm1, %xmm0
	divsd	.LC5(%rip), %xmm0
	call	__printf_chk@PLT
	xorl	%eax, %eax
	movl	808(%rsp), %edx
	leaq	.LC17(%rip), %rsi
	movl	$2, %edi
	call	__printf_chk@PLT
	movq	1192(%rsp), %rax
	subq	%fs:40, %rax
	je	.L26
	call	__stack_chk_fail@PLT
.L26:
	addq	$1208, %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
.LC18:
	.string	"_Z11testKernel3PiS_i"
.LC19:
	.string	"_Z11testKernel2PiS_"
.LC20:
	.string	"_Z11testKernel1v"
	.section	.text.startup
	.type	_ZL24__sti____cudaRegisterAllv, @function
_ZL24__sti____cudaRegisterAllv:
.LFB2059:
	.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	.LC18(%rip), %rdx
	movq	%rax, %rdi
	movq	%rax, %rbx
	pushq	$0
	.cfi_def_cfa_offset 40
	movq	%rdx, %rcx
	leaq	_Z11testKernel3PiS_i(%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	.LC19(%rip), %rdx
	orl	$-1, %r8d
	leaq	_Z11testKernel2PiS_(%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	_Z11testKernel1v(%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
.LFE2059:
	.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
.LC4:
	.long	1233125376
	.section	.rodata.cst8,"aM",@progbits,8
	.align 8
.LC5:
	.long	0
	.long	1093567616
	.section	.rodata.cst4
	.align 4
.LC7:
	.long	1266679808
	.align 4
.LC10:
	.long	1249902592
	.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>

#define ONE_MB 1024*1024
#define SIXTEEN_MB 16*1024*1024
#define FOUR_MB 4*1024*1024



__global__ void testKernel1 (){

}

__global__ void testKernel2 (int *array1, int *resultArray){

  int index = threadIdx.x + blockIdx.x*blockDim.x;
  resultArray[index] = array1[index];
}

__global__ void testKernel3(int *c_array, int *transpose_array, int width){

  int index = threadIdx.x + blockIdx.x * blockDim.x;
  transpose_array[((int)(index/width) + ((index%width)*(width)))] = c_array[index];
}


int main() {
  float time_in_ms = 0.0f;
  hipEvent_t start, stop;
  hipError_t err=hipSuccess;
  //===========TASK 1============================
  hipEventCreate(&start);
  hipEventCreate(&stop);
  hipEventRecord(start,0);
  testKernel1<<<1,1>>>();
  hipEventRecord(stop,0);
  hipEventSynchronize(stop); //Wait till the event is executed.
  hipEventElapsedTime(&time_in_ms,start,stop);
  printf("Time for empty kernel to exexute:%fms\n\n",time_in_ms);
  hipEventDestroy(start);
  hipEventDestroy(stop);
  //========TASK 1 end============================

  //=======TASK 2=================================
  int *array1 = (int *) malloc(ONE_MB);
  int *c_array;
  hipEventCreate(&start);
  hipEventCreate(&stop);

  for (int i = 0; i < ONE_MB/sizeof(int); i++) {
    array1[i] = i;
  }

  hipMalloc((void **)&c_array, ONE_MB);
  hipEventRecord(start,0);
  hipMemcpy(c_array, array1, ONE_MB, hipMemcpyHostToDevice);
  hipEventRecord(stop,0);
  hipEventSynchronize(stop);
  hipEventElapsedTime(&time_in_ms,start,stop);
  printf("Time for memory copy of %d bytes is :%fms\n\n",ONE_MB,time_in_ms);
  hipEventDestroy(start);
  hipEventDestroy(stop);
  hipFree(c_array);
  //==============TASK 2 end======================

  //=============TASK 3===========================
  int *arrayCopy = (int *) malloc(ONE_MB),*c_arrayCopy;
  hipEventCreate(&start);
  hipEventCreate(&stop);
  hipMalloc((void **)&c_array, ONE_MB);
  hipMalloc((void **)&c_arrayCopy, ONE_MB);
  hipMemcpy(c_array, array1, ONE_MB, hipMemcpyHostToDevice);
  //testKernel2<<<256,1024>>>(c_array,c_arrayCopy);
  hipEventRecord(start,0);
  hipMemcpy(arrayCopy, c_arrayCopy, ONE_MB, hipMemcpyDeviceToHost);
  hipEventRecord(stop,0);
  hipEventSynchronize(stop);
  time_in_ms = 0.0f;
  hipEventElapsedTime(&time_in_ms,start,stop);
  printf("Time to copy %d bytes from device to host = %fms\n",ONE_MB,time_in_ms);
  printf("Effective bandwidth = %f GB/s \n\n", ONE_MB/time_in_ms/1e6);
  hipFree(c_array);
  hipFree(c_arrayCopy);
  free(array1);
  free(arrayCopy);
  hipEventDestroy(start);
  hipEventDestroy(stop);
  //============TASK 3 end==================================

  //============TASK 4====================================
  arrayCopy = (int *) malloc(SIXTEEN_MB);
  array1 = (int *) malloc(SIXTEEN_MB);
  for (int i = 0; i < (SIXTEEN_MB)/sizeof(int); i++) {
    array1[i] = i;
  }
  hipEventCreate(&start);
  hipEventCreate(&stop);
  hipMalloc((void **)&c_array, 16*ONE_MB);
  hipMalloc((void **)&c_arrayCopy, 16*ONE_MB);
  hipEventRecord(start,0);
  hipMemcpy(c_array, array1, SIXTEEN_MB, hipMemcpyHostToDevice);
  //testKernel2<<<4096,1024>>>(c_array,c_arrayCopy);
  hipMemcpy(arrayCopy, c_arrayCopy, SIXTEEN_MB, hipMemcpyDeviceToHost);
  hipEventRecord(stop,0);
  hipEventSynchronize(stop);
  time_in_ms = 0.0f;
  hipEventElapsedTime(&time_in_ms,start,stop);
  printf("Time to copy %d bytes from device to host = %fms\n",SIXTEEN_MB,time_in_ms);
  printf("Effective bandwidth = %f GB/s \n\n", (SIXTEEN_MB)/time_in_ms/1e6);
  hipFree(c_array);
  hipFree(c_arrayCopy);
  free(array1);
  free(arrayCopy);
  hipEventDestroy(start);
  hipEventDestroy(stop);
  //===================TASK 4 end========================

  //===================TASK 5============================
  int *c_array1,*c_array2, number_of_steams = 2;
  int *resultArray1, *resultArray2;

  hipHostMalloc((void **)&resultArray1, SIXTEEN_MB, hipHostMallocDefault);
  hipHostMalloc((void **)&resultArray2, SIXTEEN_MB, hipHostMallocDefault);
  hipHostMalloc((void **)&array1, SIXTEEN_MB, hipHostMallocDefault);

  hipMalloc((void **)&c_array1, SIXTEEN_MB);
  hipMalloc((void **)&c_array2, SIXTEEN_MB);

  for (int i = 0; i < (SIXTEEN_MB)/sizeof(int); i++) {
    array1[i] = i;
  }
  hipEventCreate(&start);
  hipEventCreate(&stop);

  hipStream_t stream[number_of_steams];
  for (int i = 0; i < number_of_steams; i++) {
    hipStreamCreate(&stream[i]);
  }
  hipEventRecord(start,0);
  //for(int i=0;i<number_of_steams;i++){
    hipMemcpyAsync(c_array1,array1,SIXTEEN_MB,hipMemcpyHostToDevice,stream[0]);
    hipMemcpyAsync(c_array2,array1,SIXTEEN_MB,hipMemcpyHostToDevice,stream[1]);
  //}
  hipMemcpyAsync(resultArray1,c_array1,SIXTEEN_MB,hipMemcpyDeviceToHost,stream[0]);
  hipMemcpyAsync(resultArray2,c_array2,SIXTEEN_MB,hipMemcpyDeviceToHost,stream[1]);
  hipEventRecord(stop,0);
  hipEventSynchronize(stop);
  time_in_ms = 0.0;
  hipEventElapsedTime(&time_in_ms,start,stop);
  printf("Time for async data transfer of 2 arrays each of %d bytes multiple arrays is = %fms\n",SIXTEEN_MB, time_in_ms);
  printf("Bandwidth for async data transfer of 2 arrays is : %f \n\n",(SIXTEEN_MB)/time_in_ms/1e6);
  hipFree(c_array1);
  hipFree(c_array2);
  hipHostFree(resultArray1);
  hipHostFree(resultArray2);
  hipHostFree(array1);
  hipEventDestroy(start);
  hipEventDestroy(stop);

  //==================TASK 5 end=========================


  //=================TASK 6================================
  hipEventCreate(&start);
  hipEventCreate(&stop);
  int *array4mb = (int *) malloc(FOUR_MB*sizeof(int));
  int width = 1024;
  for(int i=0; i<FOUR_MB; i++){
    array4mb[i] = i;
  }

  int *cuda_array_4mb, *transpose_4MB;
  hipMalloc((void **)&cuda_array_4mb,FOUR_MB*(sizeof(int)));
  hipMalloc((void **)&transpose_4MB,FOUR_MB*(sizeof(int)));
  hipMemcpy(cuda_array_4mb, array4mb, FOUR_MB*(sizeof(int)), hipMemcpyHostToDevice);
  hipEventRecord(start,0);
  testKernel3<<<4096,1024>>>(cuda_array_4mb, transpose_4MB,width);
  hipEventRecord(stop,0);
  hipEventSynchronize(stop);
  hipMemcpy(array4mb, transpose_4MB, FOUR_MB*(sizeof(int)), hipMemcpyDeviceToHost);
  time_in_ms = 0.0;
  hipEventElapsedTime(&time_in_ms,start,stop);
  printf("Bandwidth for array of dimension %d is %fGFLOPS\n\n",FOUR_MB,(FOUR_MB)/time_in_ms/1e6);
  //=================Task 6 end============================



  err=hipGetLastError();
	if(err!=hipSuccess) {
		fprintf(stderr,"Error executing the kernel - %s\n",
				 hipGetErrorString(err));
		exit(EXIT_FAILURE);
	}

  hipDeviceProp_t deviceProperties;
  hipGetDeviceProperties(&deviceProperties,0);
  printf("Device name: %s\n", deviceProperties.name);
  printf("Memory Clock Rate (KHz): %d\n",deviceProperties.memoryClockRate);
  printf("Memory Bus Width (bits): %d\n",deviceProperties.memoryBusWidth);
  printf("Peak Memory Bandwidth (GB/s): %f\n",
    2.0*deviceProperties.memoryClockRate*(deviceProperties.memoryBusWidth/8)/1.0e6);
  printf("Registers per multiprocessors: %d\n\n",deviceProperties.regsPerMultiprocessor);
}

	.text
	.file	"Performance_measure.hip"
	.globl	_Z26__device_stub__testKernel1v # -- Begin function _Z26__device_stub__testKernel1v
	.type	_Z26__device_stub__testKernel1v,@function
_Z26__device_stub__testKernel1v:        # @_Z26__device_stub__testKernel1v
	.cfi_startproc
# %bb.0:
	pushq	%r15
	.cfi_def_cfa_offset 16
	pushq	%r14
	.cfi_def_cfa_offset 24
	pushq	%r12
	.cfi_def_cfa_offset 32
	pushq	%rbx
	.cfi_def_cfa_offset 40
	subq	$56, %rsp
	.cfi_def_cfa_offset 96
	.cfi_offset %rbx, -40
	.cfi_offset %r12, -32
	.cfi_offset %r14, -24
	.cfi_offset %r15, -16
	leaq	40(%rsp), %rbx
	leaq	24(%rsp), %r14
	leaq	16(%rsp), %r15
	leaq	8(%rsp), %r12
	movq	%rbx, %rdi
	movq	%r14, %rsi
	movq	%r15, %rdx
	movq	%r12, %rcx
	callq	__hipPopCallConfiguration
	movq	(%rbx), %rsi
	movl	8(%rbx), %edx
	movq	(%r14), %rcx
	movl	8(%r14), %r8d
	movq	%rsp, %r9
	movl	$_Z11testKernel1v, %edi
	pushq	(%r12)
	.cfi_adjust_cfa_offset 8
	pushq	(%r15)
	.cfi_adjust_cfa_offset 8
	callq	hipLaunchKernel
	addq	$72, %rsp
	.cfi_adjust_cfa_offset -72
	popq	%rbx
	.cfi_def_cfa_offset 32
	popq	%r12
	.cfi_def_cfa_offset 24
	popq	%r14
	.cfi_def_cfa_offset 16
	popq	%r15
	.cfi_def_cfa_offset 8
	retq
.Lfunc_end0:
	.size	_Z26__device_stub__testKernel1v, .Lfunc_end0-_Z26__device_stub__testKernel1v
	.cfi_endproc
                                        # -- End function
	.globl	_Z26__device_stub__testKernel2PiS_ # -- Begin function _Z26__device_stub__testKernel2PiS_
	.type	_Z26__device_stub__testKernel2PiS_,@function
_Z26__device_stub__testKernel2PiS_:     # @_Z26__device_stub__testKernel2PiS_
	.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	$_Z11testKernel2PiS_, %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	_Z26__device_stub__testKernel2PiS_, .Lfunc_end1-_Z26__device_stub__testKernel2PiS_
	.cfi_endproc
                                        # -- End function
	.globl	_Z26__device_stub__testKernel3PiS_i # -- Begin function _Z26__device_stub__testKernel3PiS_i
	.type	_Z26__device_stub__testKernel3PiS_i,@function
_Z26__device_stub__testKernel3PiS_i:    # @_Z26__device_stub__testKernel3PiS_i
	.cfi_startproc
# %bb.0:
	pushq	%r15
	.cfi_def_cfa_offset 16
	pushq	%r14
	.cfi_def_cfa_offset 24
	pushq	%r13
	.cfi_def_cfa_offset 32
	pushq	%r12
	.cfi_def_cfa_offset 40
	pushq	%rbx
	.cfi_def_cfa_offset 48
	subq	$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	12(%rsp), %rsi
	movl	%edx, (%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	24(%rsp), %r12
	leaq	16(%rsp), %r13
	movq	%r14, %rdi
	movq	%r15, %rsi
	movq	%r12, %rdx
	movq	%r13, %rcx
	callq	__hipPopCallConfiguration
	movq	(%r14), %rsi
	movl	8(%r14), %edx
	movq	(%r15), %rcx
	movl	8(%r15), %r8d
	movl	$_Z11testKernel3PiS_i, %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_end2:
	.size	_Z26__device_stub__testKernel3PiS_i, .Lfunc_end2-_Z26__device_stub__testKernel3PiS_i
	.cfi_endproc
                                        # -- End function
	.section	.rodata.cst4,"aM",@progbits,4
	.p2align	2, 0x0                          # -- Begin function main
.LCPI3_0:
	.long	0x49800000                      # float 1048576
.LCPI3_2:
	.long	0x4b800000                      # float 16777216
.LCPI3_3:
	.long	0x4a800000                      # float 4194304
	.section	.rodata.cst8,"aM",@progbits,8
	.p2align	3, 0x0
.LCPI3_1:
	.quad	0x412e848000000000              # double 1.0E+6
	.text
	.globl	main
	.type	main,@function
main:                                   # @main
	.cfi_startproc
# %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r15
	pushq	%r14
	pushq	%r13
	pushq	%r12
	pushq	%rbx
	subq	$1576, %rsp                     # imm = 0x628
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movabsq	$4294967297, %r14               # imm = 0x100000001
	movl	$0, -44(%rbp)
	leaq	-56(%rbp), %rbx
	movq	%rbx, %rdi
	callq	hipEventCreate
	leaq	-64(%rbp), %rdi
	callq	hipEventCreate
	movq	(%rbx), %rdi
	xorl	%esi, %esi
	callq	hipEventRecord
	movq	%r14, %rdi
	movl	$1, %esi
	movq	%r14, %rdx
	movl	$1, %ecx
	xorl	%r8d, %r8d
	xorl	%r9d, %r9d
	callq	__hipPushCallConfiguration
	testl	%eax, %eax
	jne	.LBB3_2
# %bb.1:
	callq	_Z26__device_stub__testKernel1v
.LBB3_2:
	leaq	-64(%rbp), %rbx
	movq	(%rbx), %rdi
	xorl	%r12d, %r12d
	xorl	%esi, %esi
	callq	hipEventRecord
	movq	(%rbx), %rdi
	callq	hipEventSynchronize
	leaq	-56(%rbp), %r15
	movq	(%r15), %rsi
	movq	(%rbx), %rdx
	leaq	-44(%rbp), %r14
	movq	%r14, %rdi
	callq	hipEventElapsedTime
	cvtss2sd	(%r14), %xmm0
	movl	$.L.str, %edi
	movb	$1, %al
	callq	printf
	movq	(%r15), %rdi
	callq	hipEventDestroy
	movq	(%rbx), %rdi
	callq	hipEventDestroy
	movl	$1048576, %edi                  # imm = 0x100000
	callq	malloc
	movq	%rax, %r14
	movq	%r15, %rdi
	callq	hipEventCreate
	movq	%rbx, %rdi
	callq	hipEventCreate
.LBB3_3:                                # =>This Inner Loop Header: Depth=1
	movl	%r12d, (%r14,%r12,4)
	incq	%r12
	cmpq	$262144, %r12                   # imm = 0x40000
	jne	.LBB3_3
# %bb.4:
	leaq	-72(%rbp), %rdi
	movl	$1048576, %esi                  # imm = 0x100000
	movq	%rdi, %rbx
	callq	hipMalloc
	leaq	-56(%rbp), %rax
	movq	(%rax), %rdi
	movq	%rax, %r15
	xorl	%r12d, %r12d
	xorl	%esi, %esi
	callq	hipEventRecord
	movq	(%rbx), %rdi
	movl	$1048576, %edx                  # imm = 0x100000
	movq	%r14, %rsi
	movl	$1, %ecx
	callq	hipMemcpy
	leaq	-64(%rbp), %rbx
	movq	(%rbx), %rdi
	xorl	%esi, %esi
	callq	hipEventRecord
	movq	(%rbx), %rdi
	callq	hipEventSynchronize
	movq	(%r15), %rsi
	movq	(%rbx), %rdx
	movq	%rbx, %r13
	leaq	-44(%rbp), %rbx
	movq	%rbx, %rdi
	callq	hipEventElapsedTime
	xorps	%xmm0, %xmm0
	cvtss2sd	(%rbx), %xmm0
	movl	$.L.str.1, %edi
	movl	$1048576, %esi                  # imm = 0x100000
	movb	$1, %al
	callq	printf
	movq	(%r15), %rdi
	callq	hipEventDestroy
	movq	(%r13), %rdi
	movq	%r13, %rbx
	callq	hipEventDestroy
	leaq	-72(%rbp), %r13
	movq	(%r13), %rdi
	callq	hipFree
	movl	$1048576, %edi                  # imm = 0x100000
	callq	malloc
	movq	%rax, %r15
	leaq	-56(%rbp), %rdi
	callq	hipEventCreate
	movq	%rbx, %rdi
	callq	hipEventCreate
	movl	$1048576, %esi                  # imm = 0x100000
	movq	%r13, %rdi
	movq	%r13, %rbx
	callq	hipMalloc
	leaq	-128(%rbp), %r13
	movl	$1048576, %esi                  # imm = 0x100000
	movq	%r13, %rdi
	callq	hipMalloc
	movq	(%rbx), %rdi
	movl	$1048576, %edx                  # imm = 0x100000
	movq	%r14, %rsi
	movl	$1, %ecx
	callq	hipMemcpy
	leaq	-56(%rbp), %rax
	movq	(%rax), %rdi
	xorl	%esi, %esi
	callq	hipEventRecord
	movq	(%r13), %rsi
	movl	$1048576, %edx                  # imm = 0x100000
	movq	%r15, %rdi
	movl	$2, %ecx
	callq	hipMemcpy
	leaq	-64(%rbp), %rbx
	movq	(%rbx), %rdi
	xorl	%esi, %esi
	callq	hipEventRecord
	movq	(%rbx), %rdi
	callq	hipEventSynchronize
	leaq	-44(%rbp), %rdi
	movl	$0, (%rdi)
	leaq	-56(%rbp), %rax
	movq	(%rax), %rsi
	movq	(%rbx), %rdx
	movq	%rdi, %rbx
	callq	hipEventElapsedTime
	xorps	%xmm0, %xmm0
	cvtss2sd	(%rbx), %xmm0
	movl	$.L.str.2, %edi
	movl	$1048576, %esi                  # imm = 0x100000
	movb	$1, %al
	callq	printf
	movss	.LCPI3_0(%rip), %xmm0           # xmm0 = mem[0],zero,zero,zero
	divss	(%rbx), %xmm0
	cvtss2sd	%xmm0, %xmm0
	divsd	.LCPI3_1(%rip), %xmm0
	movl	$.L.str.3, %edi
	movb	$1, %al
	callq	printf
	leaq	-72(%rbp), %rax
	movq	(%rax), %rdi
	callq	hipFree
	movq	(%r13), %rdi
	callq	hipFree
	movq	%r14, %rdi
	callq	free
	movq	%r15, %rdi
	callq	free
	leaq	-56(%rbp), %rax
	movq	(%rax), %rdi
	callq	hipEventDestroy
	leaq	-64(%rbp), %rax
	movq	(%rax), %rdi
	callq	hipEventDestroy
	movl	$16777216, %edi                 # imm = 0x1000000
	callq	malloc
	movq	%rax, %r13
	movl	$16777216, %edi                 # imm = 0x1000000
	callq	malloc
	movq	%rax, %r15
	movq	%rax, -80(%rbp)
.LBB3_5:                                # =>This Inner Loop Header: Depth=1
	movl	%r12d, (%r15,%r12,4)
	incq	%r12
	cmpq	$4194304, %r12                  # imm = 0x400000
	jne	.LBB3_5
# %bb.6:
	leaq	-56(%rbp), %rdi
	movq	%rdi, %r14
	callq	hipEventCreate
	leaq	-64(%rbp), %rdi
	callq	hipEventCreate
	leaq	-72(%rbp), %rbx
	movl	$16777216, %esi                 # imm = 0x1000000
	movq	%rbx, %rdi
	callq	hipMalloc
	leaq	-128(%rbp), %r12
	movl	$16777216, %esi                 # imm = 0x1000000
	movq	%r12, %rdi
	callq	hipMalloc
	movq	(%r14), %rdi
	xorl	%r14d, %r14d
	xorl	%esi, %esi
	callq	hipEventRecord
	movq	(%rbx), %rdi
	movl	$16777216, %edx                 # imm = 0x1000000
	movq	%r15, %rsi
	movl	$1, %ecx
	callq	hipMemcpy
	movq	(%r12), %rsi
	movl	$16777216, %edx                 # imm = 0x1000000
	movq	%r13, %rdi
	movl	$2, %ecx
	callq	hipMemcpy
	leaq	-64(%rbp), %rax
	movq	(%rax), %rdi
	xorl	%esi, %esi
	callq	hipEventRecord
	leaq	-64(%rbp), %rbx
	movq	(%rbx), %rdi
	callq	hipEventSynchronize
	movq	%r13, %r12
	leaq	-44(%rbp), %r13
	movl	$0, (%r13)
	leaq	-56(%rbp), %rax
	movq	(%rax), %rsi
	movq	(%rbx), %rdx
	movq	%r13, %rdi
	callq	hipEventElapsedTime
	cvtss2sd	(%r13), %xmm0
	movl	$.L.str.2, %edi
	movl	$16777216, %esi                 # imm = 0x1000000
	movb	$1, %al
	callq	printf
	movss	.LCPI3_2(%rip), %xmm0           # xmm0 = mem[0],zero,zero,zero
	divss	(%r13), %xmm0
	cvtss2sd	%xmm0, %xmm0
	divsd	.LCPI3_1(%rip), %xmm0
	movl	$.L.str.3, %edi
	movb	$1, %al
	callq	printf
	leaq	-72(%rbp), %rax
	movq	(%rax), %rdi
	callq	hipFree
	leaq	-128(%rbp), %rax
	movq	(%rax), %rdi
	callq	hipFree
	movq	%r15, %rdi
	callq	free
	movq	%r12, %rdi
	callq	free
	leaq	-56(%rbp), %rax
	movq	(%rax), %rdi
	callq	hipEventDestroy
	movq	(%rbx), %rdi
	callq	hipEventDestroy
	leaq	-120(%rbp), %rdi
	movl	$16777216, %esi                 # imm = 0x1000000
	xorl	%edx, %edx
	callq	hipHostMalloc
	leaq	-112(%rbp), %rdi
	movl	$16777216, %esi                 # imm = 0x1000000
	xorl	%edx, %edx
	callq	hipHostMalloc
	leaq	-80(%rbp), %rbx
	movl	$16777216, %esi                 # imm = 0x1000000
	movq	%rbx, %rdi
	xorl	%edx, %edx
	callq	hipHostMalloc
	leaq	-96(%rbp), %rdi
	movl	$16777216, %esi                 # imm = 0x1000000
	callq	hipMalloc
	leaq	-88(%rbp), %rdi
	movl	$16777216, %esi                 # imm = 0x1000000
	callq	hipMalloc
	movq	(%rbx), %rax
.LBB3_7:                                # =>This Inner Loop Header: Depth=1
	movl	%r14d, (%rax,%r14,4)
	incq	%r14
	cmpq	$4194304, %r14                  # imm = 0x400000
	jne	.LBB3_7
# %bb.8:                                # %.critedge
	leaq	-56(%rbp), %r14
	movq	%r14, %rdi
	callq	hipEventCreate
	leaq	-64(%rbp), %r15
	movq	%r15, %rdi
	callq	hipEventCreate
	movq	%rsp, %r12
	movq	%rsp, %rbx
	leaq	-16(%rbx), %rdi
	movq	%rdi, %rsp
	callq	hipStreamCreate
	leaq	-8(%rbx), %rdi
	callq	hipStreamCreate
	movq	(%r14), %rdi
	xorl	%r13d, %r13d
	xorl	%esi, %esi
	callq	hipEventRecord
	movq	-96(%rbp), %rdi
	movq	-80(%rbp), %rsi
	movq	-16(%rbx), %r8
	movl	$16777216, %edx                 # imm = 0x1000000
	movl	$1, %ecx
	callq	hipMemcpyAsync
	movq	-88(%rbp), %rdi
	movq	-80(%rbp), %rsi
	movq	-8(%rbx), %r8
	movl	$16777216, %edx                 # imm = 0x1000000
	movl	$1, %ecx
	callq	hipMemcpyAsync
	movq	-120(%rbp), %rdi
	movq	-96(%rbp), %rsi
	movq	-16(%rbx), %r8
	movl	$16777216, %edx                 # imm = 0x1000000
	movl	$2, %ecx
	callq	hipMemcpyAsync
	movq	-112(%rbp), %rdi
	movq	-88(%rbp), %rsi
	movq	-8(%rbx), %r8
	movl	$16777216, %edx                 # imm = 0x1000000
	movl	$2, %ecx
	callq	hipMemcpyAsync
	movq	(%r15), %rdi
	xorl	%esi, %esi
	callq	hipEventRecord
	movq	(%r15), %rdi
	callq	hipEventSynchronize
	leaq	-44(%rbp), %rbx
	movl	$0, (%rbx)
	movq	(%r14), %rsi
	movq	(%r15), %rdx
	movq	%rbx, %rdi
	callq	hipEventElapsedTime
	cvtss2sd	(%rbx), %xmm0
	movl	$.L.str.4, %edi
	movl	$16777216, %esi                 # imm = 0x1000000
	movb	$1, %al
	callq	printf
	movss	.LCPI3_2(%rip), %xmm0           # xmm0 = mem[0],zero,zero,zero
	divss	(%rbx), %xmm0
	cvtss2sd	%xmm0, %xmm0
	divsd	.LCPI3_1(%rip), %xmm0
	movl	$.L.str.5, %edi
	movb	$1, %al
	callq	printf
	movq	-96(%rbp), %rdi
	callq	hipFree
	movq	-88(%rbp), %rdi
	callq	hipFree
	movq	-120(%rbp), %rdi
	callq	hipHostFree
	movq	-112(%rbp), %rdi
	callq	hipHostFree
	movq	-80(%rbp), %rdi
	callq	hipHostFree
	movq	(%r14), %rdi
	callq	hipEventDestroy
	movq	(%r15), %rdi
	callq	hipEventDestroy
	movq	%r14, %rdi
	callq	hipEventCreate
	movq	%r15, %rdi
	callq	hipEventCreate
	movl	$16777216, %edi                 # imm = 0x1000000
	callq	malloc
	movq	%rax, %rbx
.LBB3_9:                                # =>This Inner Loop Header: Depth=1
	movl	%r13d, (%rbx,%r13,4)
	incq	%r13
	cmpq	$4194304, %r13                  # imm = 0x400000
	jne	.LBB3_9
# %bb.10:
	leaq	-136(%rbp), %r14
	movl	$16777216, %esi                 # imm = 0x1000000
	movq	%r14, %rdi
	callq	hipMalloc
	leaq	-104(%rbp), %rdi
	movl	$16777216, %esi                 # imm = 0x1000000
	callq	hipMalloc
	movq	(%r14), %rdi
	movl	$16777216, %edx                 # imm = 0x1000000
	movq	%rbx, %rsi
	movl	$1, %ecx
	callq	hipMemcpy
	movq	-56(%rbp), %rdi
	xorl	%esi, %esi
	callq	hipEventRecord
	movabsq	$4294967297, %rdi               # imm = 0x100000001
	leaq	1023(%rdi), %rdx
	addq	$4095, %rdi                     # imm = 0xFFF
	movl	$1, %esi
	movl	$1, %ecx
	xorl	%r8d, %r8d
	xorl	%r9d, %r9d
	callq	__hipPushCallConfiguration
	testl	%eax, %eax
	jne	.LBB3_12
# %bb.11:
	movq	-136(%rbp), %rdi
	movq	-104(%rbp), %rsi
	movl	$1024, %edx                     # imm = 0x400
	callq	_Z26__device_stub__testKernel3PiS_i
.LBB3_12:
	movq	-64(%rbp), %rdi
	xorl	%esi, %esi
	callq	hipEventRecord
	movq	-64(%rbp), %rdi
	callq	hipEventSynchronize
	movq	-104(%rbp), %rsi
	movl	$16777216, %edx                 # imm = 0x1000000
	movq	%rbx, %rdi
	movl	$2, %ecx
	callq	hipMemcpy
	leaq	-44(%rbp), %rbx
	movl	$0, (%rbx)
	movq	-56(%rbp), %rsi
	movq	-64(%rbp), %rdx
	movq	%rbx, %rdi
	callq	hipEventElapsedTime
	movss	.LCPI3_3(%rip), %xmm0           # xmm0 = mem[0],zero,zero,zero
	divss	(%rbx), %xmm0
	cvtss2sd	%xmm0, %xmm0
	divsd	.LCPI3_1(%rip), %xmm0
	movl	$.L.str.6, %edi
	movl	$4194304, %esi                  # imm = 0x400000
	movb	$1, %al
	callq	printf
	callq	hipGetLastError
	testl	%eax, %eax
	jne	.LBB3_14
# %bb.13:
	leaq	-1608(%rbp), %rbx
	movq	%rbx, %rdi
	xorl	%esi, %esi
	callq	hipGetDevicePropertiesR0600
	movl	$.L.str.8, %edi
	movq	%rbx, %rsi
	xorl	%eax, %eax
	callq	printf
	movl	608(%rbx), %esi
	movl	$.L.str.9, %edi
	xorl	%eax, %eax
	callq	printf
	movl	612(%rbx), %esi
	movl	$.L.str.10, %edi
	xorl	%eax, %eax
	callq	printf
	cvtsi2sdl	608(%rbx), %xmm1
	movl	612(%rbx), %eax
	leal	7(%rax), %ecx
	testl	%eax, %eax
	cmovnsl	%eax, %ecx
	sarl	$3, %ecx
	xorps	%xmm0, %xmm0
	cvtsi2sd	%ecx, %xmm0
	addsd	%xmm1, %xmm1
	mulsd	%xmm1, %xmm0
	divsd	.LCPI3_1(%rip), %xmm0
	movl	$.L.str.11, %edi
	movb	$1, %al
	callq	printf
	movl	648(%rbx), %esi
	movl	$.L.str.12, %edi
	xorl	%eax, %eax
	callq	printf
	movq	%r12, %rsp
	xorl	%eax, %eax
	leaq	-40(%rbp), %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	.cfi_def_cfa %rsp, 8
	retq
.LBB3_14:
	.cfi_def_cfa %rbp, 16
	movq	stderr(%rip), %rbx
	movl	%eax, %edi
	callq	hipGetErrorString
	movl	$.L.str.7, %esi
	movq	%rbx, %rdi
	movq	%rax, %rdx
	xorl	%eax, %eax
	callq	fprintf
	movl	$1, %edi
	callq	exit
.Lfunc_end3:
	.size	main, .Lfunc_end3-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	.LBB4_2
# %bb.1:
	movl	$__hip_fatbin_wrapper, %edi
	callq	__hipRegisterFatBinary
	movq	%rax, %rbx
	movq	%rax, __hip_gpubin_handle(%rip)
.LBB4_2:
	xorps	%xmm0, %xmm0
	movups	%xmm0, 16(%rsp)
	movups	%xmm0, (%rsp)
	movl	$_Z11testKernel1v, %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	$_Z11testKernel2PiS_, %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	$_Z11testKernel3PiS_i, %esi
	movl	$.L__unnamed_3, %edx
	movl	$.L__unnamed_3, %ecx
	movq	%rbx, %rdi
	movl	$-1, %r8d
	xorl	%r9d, %r9d
	callq	__hipRegisterFunction
	movl	$__hip_module_dtor, %edi
	addq	$32, %rsp
	.cfi_def_cfa_offset 16
	popq	%rbx
	.cfi_def_cfa_offset 8
	jmp	atexit                          # TAILCALL
.Lfunc_end4:
	.size	__hip_module_ctor, .Lfunc_end4-__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	.LBB5_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
.LBB5_2:
	retq
.Lfunc_end5:
	.size	__hip_module_dtor, .Lfunc_end5-__hip_module_dtor
	.cfi_endproc
                                        # -- End function
	.type	_Z11testKernel1v,@object        # @_Z11testKernel1v
	.section	.rodata,"a",@progbits
	.globl	_Z11testKernel1v
	.p2align	3, 0x0
_Z11testKernel1v:
	.quad	_Z26__device_stub__testKernel1v
	.size	_Z11testKernel1v, 8

	.type	_Z11testKernel2PiS_,@object     # @_Z11testKernel2PiS_
	.globl	_Z11testKernel2PiS_
	.p2align	3, 0x0
_Z11testKernel2PiS_:
	.quad	_Z26__device_stub__testKernel2PiS_
	.size	_Z11testKernel2PiS_, 8

	.type	_Z11testKernel3PiS_i,@object    # @_Z11testKernel3PiS_i
	.globl	_Z11testKernel3PiS_i
	.p2align	3, 0x0
_Z11testKernel3PiS_i:
	.quad	_Z26__device_stub__testKernel3PiS_i
	.size	_Z11testKernel3PiS_i, 8

	.type	.L.str,@object                  # @.str
	.section	.rodata.str1.1,"aMS",@progbits,1
.L.str:
	.asciz	"Time for empty kernel to exexute:%fms\n\n"
	.size	.L.str, 40

	.type	.L.str.1,@object                # @.str.1
.L.str.1:
	.asciz	"Time for memory copy of %d bytes is :%fms\n\n"
	.size	.L.str.1, 44

	.type	.L.str.2,@object                # @.str.2
.L.str.2:
	.asciz	"Time to copy %d bytes from device to host = %fms\n"
	.size	.L.str.2, 50

	.type	.L.str.3,@object                # @.str.3
.L.str.3:
	.asciz	"Effective bandwidth = %f GB/s \n\n"
	.size	.L.str.3, 33

	.type	.L.str.4,@object                # @.str.4
.L.str.4:
	.asciz	"Time for async data transfer of 2 arrays each of %d bytes multiple arrays is = %fms\n"
	.size	.L.str.4, 85

	.type	.L.str.5,@object                # @.str.5
.L.str.5:
	.asciz	"Bandwidth for async data transfer of 2 arrays is : %f \n\n"
	.size	.L.str.5, 57

	.type	.L.str.6,@object                # @.str.6
.L.str.6:
	.asciz	"Bandwidth for array of dimension %d is %fGFLOPS\n\n"
	.size	.L.str.6, 50

	.type	.L.str.7,@object                # @.str.7
.L.str.7:
	.asciz	"Error executing the kernel - %s\n"
	.size	.L.str.7, 33

	.type	.L.str.8,@object                # @.str.8
.L.str.8:
	.asciz	"Device name: %s\n"
	.size	.L.str.8, 17

	.type	.L.str.9,@object                # @.str.9
.L.str.9:
	.asciz	"Memory Clock Rate (KHz): %d\n"
	.size	.L.str.9, 29

	.type	.L.str.10,@object               # @.str.10
.L.str.10:
	.asciz	"Memory Bus Width (bits): %d\n"
	.size	.L.str.10, 29

	.type	.L.str.11,@object               # @.str.11
.L.str.11:
	.asciz	"Peak Memory Bandwidth (GB/s): %f\n"
	.size	.L.str.11, 34

	.type	.L.str.12,@object               # @.str.12
.L.str.12:
	.asciz	"Registers per multiprocessors: %d\n\n"
	.size	.L.str.12, 36

	.type	.L__unnamed_1,@object           # @0
.L__unnamed_1:
	.asciz	"_Z11testKernel1v"
	.size	.L__unnamed_1, 17

	.type	.L__unnamed_2,@object           # @1
.L__unnamed_2:
	.asciz	"_Z11testKernel2PiS_"
	.size	.L__unnamed_2, 20

	.type	.L__unnamed_3,@object           # @2
.L__unnamed_3:
	.asciz	"_Z11testKernel3PiS_i"
	.size	.L__unnamed_3, 21

	.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 _Z26__device_stub__testKernel1v
	.addrsig_sym _Z26__device_stub__testKernel2PiS_
	.addrsig_sym _Z26__device_stub__testKernel3PiS_i
	.addrsig_sym __hip_module_ctor
	.addrsig_sym __hip_module_dtor
	.addrsig_sym _Z11testKernel1v
	.addrsig_sym _Z11testKernel2PiS_
	.addrsig_sym _Z11testKernel3PiS_i
	.addrsig_sym __hip_fatbin
	.addrsig_sym __hip_fatbin_wrapper
	.addrsig_sym __hip_cuid_

	.text
	.amdgcn_target "amdgcn-amd-amdhsa--gfx1100"
	.protected	_Z11testKernel1v        ; -- Begin function _Z11testKernel1v
	.globl	_Z11testKernel1v
	.p2align	8
	.type	_Z11testKernel1v,@function
_Z11testKernel1v:                       ; @_Z11testKernel1v
; %bb.0:
	s_endpgm
	.section	.rodata,"a",@progbits
	.p2align	6, 0x0
	.amdhsa_kernel _Z11testKernel1v
		.amdhsa_group_segment_fixed_size 0
		.amdhsa_private_segment_fixed_size 0
		.amdhsa_kernarg_size 0
		.amdhsa_user_sgpr_count 15
		.amdhsa_user_sgpr_dispatch_ptr 0
		.amdhsa_user_sgpr_queue_ptr 0
		.amdhsa_user_sgpr_kernarg_segment_ptr 0
		.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 1
		.amdhsa_next_free_sgpr 1
		.amdhsa_reserve_vcc 0
		.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	_Z11testKernel1v, .Lfunc_end0-_Z11testKernel1v
                                        ; -- End function
	.section	.AMDGPU.csdata,"",@progbits
; Kernel info:
; codeLenInByte = 4
; NumSgprs: 0
; NumVgprs: 0
; ScratchSize: 0
; MemoryBound: 0
; FloatMode: 240
; IeeeMode: 1
; LDSByteSize: 0 bytes/workgroup (compile time only)
; SGPRBlocks: 0
; VGPRBlocks: 0
; NumSGPRsForWavesPerEU: 1
; NumVGPRsForWavesPerEU: 1
; 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	_Z11testKernel2PiS_     ; -- Begin function _Z11testKernel2PiS_
	.globl	_Z11testKernel2PiS_
	.p2align	8
	.type	_Z11testKernel2PiS_,@function
_Z11testKernel2PiS_:                    ; @_Z11testKernel2PiS_
; %bb.0:
	s_clause 0x1
	s_load_b32 s4, s[0:1], 0x1c
	s_load_b128 s[0:3], s[0:1], 0x0
	s_waitcnt lgkmcnt(0)
	s_and_b32 s4, s4, 0xffff
	s_delay_alu instid0(SALU_CYCLE_1) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_mad_u64_u32 v[1:2], null, s15, s4, v[0:1]
	v_ashrrev_i32_e32 v2, 31, v1
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_lshlrev_b64 v[0:1], 2, v[1:2]
	v_add_co_u32 v2, vcc_lo, s0, v0
	s_delay_alu instid0(VALU_DEP_2)
	v_add_co_ci_u32_e32 v3, vcc_lo, s1, v1, vcc_lo
	v_add_co_u32 v0, vcc_lo, s2, v0
	v_add_co_ci_u32_e32 v1, vcc_lo, s3, v1, vcc_lo
	global_load_b32 v2, v[2:3], off
	s_waitcnt vmcnt(0)
	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 _Z11testKernel2PiS_
		.amdhsa_group_segment_fixed_size 0
		.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 4
		.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	_Z11testKernel2PiS_, .Lfunc_end1-_Z11testKernel2PiS_
                                        ; -- End function
	.section	.AMDGPU.csdata,"",@progbits
; Kernel info:
; codeLenInByte = 120
; NumSgprs: 18
; NumVgprs: 4
; ScratchSize: 0
; MemoryBound: 0
; FloatMode: 240
; IeeeMode: 1
; LDSByteSize: 0 bytes/workgroup (compile time only)
; SGPRBlocks: 2
; VGPRBlocks: 0
; NumSGPRsForWavesPerEU: 18
; NumVGPRsForWavesPerEU: 4
; 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	_Z11testKernel3PiS_i    ; -- Begin function _Z11testKernel3PiS_i
	.globl	_Z11testKernel3PiS_i
	.p2align	8
	.type	_Z11testKernel3PiS_i,@function
_Z11testKernel3PiS_i:                   ; @_Z11testKernel3PiS_i
; %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_b32 s0, s[0:1], 0x10
	s_waitcnt lgkmcnt(0)
	s_and_b32 s2, s2, 0xffff
	s_ashr_i32 s1, s0, 31
	v_mad_u64_u32 v[1:2], null, s15, s2, v[0:1]
	s_add_i32 s2, s0, s1
	s_delay_alu instid0(SALU_CYCLE_1) | instskip(NEXT) | instid1(SALU_CYCLE_1)
	s_xor_b32 s2, s2, s1
	v_cvt_f32_u32_e32 v0, s2
	s_sub_i32 s3, 0, s2
	s_delay_alu instid0(VALU_DEP_2) | instskip(NEXT) | instid1(VALU_DEP_2)
	v_ashrrev_i32_e32 v2, 31, v1
	v_rcp_iflag_f32_e32 v0, v0
	s_delay_alu instid0(VALU_DEP_1) | instskip(SKIP_1) | instid1(VALU_DEP_2)
	v_lshlrev_b64 v[3:4], 2, v[1:2]
	v_add_nc_u32_e32 v5, v1, v2
	v_add_co_u32 v3, vcc_lo, s4, v3
	s_delay_alu instid0(VALU_DEP_3)
	v_add_co_ci_u32_e32 v4, vcc_lo, s5, v4, vcc_lo
	s_waitcnt_depctr 0xfff
	v_mul_f32_e32 v0, 0x4f7ffffe, v0
	v_xor_b32_e32 v5, v5, v2
	v_xor_b32_e32 v2, s1, v2
	global_load_b32 v3, v[3:4], off
	v_cvt_u32_f32_e32 v0, v0
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_mul_lo_u32 v4, s3, v0
	v_mul_hi_u32 v4, v0, v4
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_add_nc_u32_e32 v0, v0, v4
	v_mul_hi_u32 v0, v5, v0
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_mul_lo_u32 v4, v0, s2
	v_sub_nc_u32_e32 v4, v5, v4
	s_delay_alu instid0(VALU_DEP_1) | instskip(SKIP_1) | instid1(VALU_DEP_2)
	v_subrev_nc_u32_e32 v6, s2, v4
	v_cmp_le_u32_e32 vcc_lo, s2, v4
	v_dual_cndmask_b32 v4, v4, v6 :: v_dual_add_nc_u32 v5, 1, v0
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_2)
	v_cndmask_b32_e32 v0, v0, v5, vcc_lo
	v_cmp_le_u32_e32 vcc_lo, s2, v4
	s_delay_alu instid0(VALU_DEP_2) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_add_nc_u32_e32 v5, 1, v0
	v_cndmask_b32_e32 v0, v0, v5, vcc_lo
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_xor_b32_e32 v0, v0, v2
	v_sub_nc_u32_e32 v0, v0, v2
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_mul_lo_u32 v2, v0, s0
	v_sub_nc_u32_e32 v4, v1, v2
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_mad_u64_u32 v[1:2], null, v4, s0, v[0:1]
	v_ashrrev_i32_e32 v2, 31, v1
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_lshlrev_b64 v[0:1], 2, v[1:2]
	v_add_co_u32 v0, vcc_lo, s6, v0
	s_delay_alu instid0(VALU_DEP_2)
	v_add_co_ci_u32_e32 v1, vcc_lo, s7, v1, vcc_lo
	s_waitcnt vmcnt(0)
	global_store_b32 v[0:1], v3, off
	s_nop 0
	s_sendmsg sendmsg(MSG_DEALLOC_VGPRS)
	s_endpgm
	.section	.rodata,"a",@progbits
	.p2align	6, 0x0
	.amdhsa_kernel _Z11testKernel3PiS_i
		.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 7
		.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	_Z11testKernel3PiS_i, .Lfunc_end2-_Z11testKernel3PiS_i
                                        ; -- End function
	.section	.AMDGPU.csdata,"",@progbits
; Kernel info:
; codeLenInByte = 340
; NumSgprs: 18
; NumVgprs: 7
; ScratchSize: 0
; MemoryBound: 0
; FloatMode: 240
; IeeeMode: 1
; LDSByteSize: 0 bytes/workgroup (compile time only)
; SGPRBlocks: 2
; VGPRBlocks: 0
; NumSGPRsForWavesPerEU: 18
; NumVGPRsForWavesPerEU: 7
; 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:           []
    .group_segment_fixed_size: 0
    .kernarg_segment_align: 4
    .kernarg_segment_size: 0
    .language:       OpenCL C
    .language_version:
      - 2
      - 0
    .max_flat_workgroup_size: 1024
    .name:           _Z11testKernel1v
    .private_segment_fixed_size: 0
    .sgpr_count:     0
    .sgpr_spill_count: 0
    .symbol:         _Z11testKernel1v.kd
    .uniform_work_group_size: 1
    .uses_dynamic_stack: false
    .vgpr_count:     0
    .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: 0
    .kernarg_segment_align: 8
    .kernarg_segment_size: 272
    .language:       OpenCL C
    .language_version:
      - 2
      - 0
    .max_flat_workgroup_size: 1024
    .name:           _Z11testKernel2PiS_
    .private_segment_fixed_size: 0
    .sgpr_count:     18
    .sgpr_spill_count: 0
    .symbol:         _Z11testKernel2PiS_.kd
    .uniform_work_group_size: 1
    .uses_dynamic_stack: false
    .vgpr_count:     4
    .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:     by_value
      - .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:           _Z11testKernel3PiS_i
    .private_segment_fixed_size: 0
    .sgpr_count:     18
    .sgpr_spill_count: 0
    .symbol:         _Z11testKernel3PiS_i.kd
    .uniform_work_group_size: 1
    .uses_dynamic_stack: false
    .vgpr_count:     7
    .vgpr_spill_count: 0
    .wavefront_size: 32
    .workgroup_processor_mode: 1
amdhsa.target:   amdgcn-amd-amdhsa--gfx1100
amdhsa.version:
  - 1
  - 2
...

	.end_amdgpu_metadata
