#include <stdio.h>
#include <assert.h>

//const int TILE_DIM = 32;
//const int BLOCK_ROWS = 32;
const int thread = 32;
const int NUM_REPS = 100;
const int nx = 2000;
const int ny = 2000;


//Uni10 Transpose
__global__ void transposeUni10(const double *A, size_t M, size_t N, double *AT)
{
  size_t y = blockIdx.y * blockDim.y + threadIdx.y;
  size_t x = blockIdx.x * blockDim.x + threadIdx.x;
  if(y < M && x < N)
    AT[x * M + y] = A[y * N + x];
}

//Yours Transpose
__global__ void transpose10(const double *A, size_t M, size_t N, double *AT)
{
  //
}

// Convenience function for checking CUDA runtime API results
// can be wrapped around any runtime API call. No-op in release builds.
inline
cudaError_t checkCuda(cudaError_t result)
{
#if defined(DEBUG) || defined(_DEBUG)
  if (result != cudaSuccess) {
    fprintf(stderr, "CUDA Runtime Error: %s\n", cudaGetErrorString(result));
    assert(result == cudaSuccess);
  }
#endif
  return result;
}

// Check errors and print GB/s
void postprocess(const double *ref, const double *res, int n, double ms)
{
  bool passed = true;
  for (int i = 0; i < n; i++)
    if (res[i] != ref[i]) {
      printf("%d %f %f\n", i, res[i], ref[i]);
      printf("%25s\n", "*** FAILED ***");
      passed = false;
      break;
    }
  if (passed)
    printf("%20.2f\n", 2 * n * sizeof(double) * 1e-6 * NUM_REPS / ms );
}

int main(int argc, char **argv)
{
  size_t M = nx;
  size_t N = ny;
  const int mem_size = nx*ny*sizeof(double);

  int devId = 0;
  if (argc > 1) devId = atoi(argv[1]);

  cudaDeviceProp prop;
  checkCuda( cudaGetDeviceProperties(&prop, devId));
  printf("\nDevice : %s\n", prop.name);
  //printf("Matrix size: %d %d, Block size: %d %d, Tile size: %d %d\n", 
  //       nx, ny, TILE_DIM, BLOCK_ROWS, TILE_DIM, TILE_DIM);
  
  checkCuda( cudaSetDevice(devId) );

  double *h_idata = (double*)malloc(mem_size);
  double *h_cdata = (double*)malloc(mem_size);
  double *h_tdata = (double*)malloc(mem_size);
  double *gold    = (double*)malloc(mem_size);
  
  double *d_idata, *d_cdata, *d_tdata;
  checkCuda( cudaMalloc(&d_idata, mem_size) );
  checkCuda( cudaMalloc(&d_cdata, mem_size) );
  checkCuda( cudaMalloc(&d_tdata, mem_size) );

  // host
  for (int j = 0; j < ny; j++)
    for (int i = 0; i < nx; i++)
      h_idata[j*nx + i] = j*nx + i;

  // correct result for error checking
  for (int j = 0; j < ny; j++)
    for (int i = 0; i < nx; i++)
      gold[j*nx + i] = h_idata[i*nx + j];
  
  // device
  checkCuda( cudaMemcpy(d_idata, h_idata, mem_size, cudaMemcpyHostToDevice) );
  
  // events for timing
  cudaEvent_t startEvent, stopEvent;
  checkCuda( cudaEventCreate(&startEvent) );
  checkCuda( cudaEventCreate(&stopEvent) );
  float ms;

  // ------------
  // time kernels
  // ------------
  printf("%25s%25s\n", "Routine", "Bandwidth (GB/s)");
  
  // --------------
  // transposeUni10 (Naive)
  // --------------

  dim3 dimGrid( (N + thread - 1) / thread, (M + thread - 1) / thread, 1);
  dim3 dimBlock(thread, thread, 1);

  printf("%25s", "uni10 transpose");
  checkCuda( cudaMemset(d_tdata, 0, mem_size) );
  // warmup
  transposeUni10<<<dimGrid, dimBlock>>>(d_idata, M, N, d_tdata);
  checkCuda( cudaEventRecord(startEvent, 0) );
  for (int i = 0; i < NUM_REPS; i++)
     transposeUni10<<<dimGrid, dimBlock>>>(d_idata, M, N, d_tdata);
  checkCuda( cudaEventRecord(stopEvent, 0) );
  checkCuda( cudaEventSynchronize(stopEvent) );
  checkCuda( cudaEventElapsedTime(&ms, startEvent, stopEvent) );
  checkCuda( cudaMemcpy(h_tdata, d_tdata, mem_size, cudaMemcpyDeviceToHost) );
  postprocess(gold, h_tdata, nx * ny, ms);
  printf("dimGrid: %d %d %d. dimBlock: %d %d %d\n",
         dimGrid.x, dimGrid.y, dimGrid.z, dimBlock.x, dimBlock.y, dimBlock.z);


  // --------------
  // Your transpose 
  // --------------

  printf("%25s", "uni10 transpose");
  checkCuda( cudaMemset(d_tdata, 0, mem_size) );
  // warmup
  transposeUni10<<<dimGrid, dimBlock>>>(d_idata, M, N, d_tdata);
  checkCuda( cudaEventRecord(startEvent, 0) );
  for (int i = 0; i < NUM_REPS; i++)
     transposeUni10<<<dimGrid, dimBlock>>>(d_idata, M, N, d_tdata);
  checkCuda( cudaEventRecord(stopEvent, 0) );
  checkCuda( cudaEventSynchronize(stopEvent) );
  checkCuda( cudaEventElapsedTime(&ms, startEvent, stopEvent) );
  checkCuda( cudaMemcpy(h_tdata, d_tdata, mem_size, cudaMemcpyDeviceToHost) );
  postprocess(gold, h_tdata, nx * ny, ms);
  printf("dimGrid: %d %d %d. dimBlock: %d %d %d\n",
         dimGrid.x, dimGrid.y, dimGrid.z, dimBlock.x, dimBlock.y, dimBlock.z);



  // cleanup
  checkCuda( cudaEventDestroy(startEvent) );
  checkCuda( cudaEventDestroy(stopEvent) );
  checkCuda( cudaFree(d_tdata) );
  checkCuda( cudaFree(d_cdata) );
  checkCuda( cudaFree(d_idata) );
  free(h_idata);
  free(h_tdata);
  free(h_cdata);
  free(gold);
}

	.file	"tmpxft_00349959_00000000-6_transpose.cudafe1.cpp"
	.text
#APP

#NO_APP
	.type	_ZL26__cudaUnregisterBinaryUtilv, @function
_ZL26__cudaUnregisterBinaryUtilv:
.LFB2032:
	.cfi_startproc
	endbr64
	movq	_ZL20__cudaFatCubinHandle(%rip), %rdi
	jmp	__cudaUnregisterFatBinary@PLT
	.cfi_endproc
.LFE2032:
	.size	_ZL26__cudaUnregisterBinaryUtilv, .-_ZL26__cudaUnregisterBinaryUtilv
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d %f %f\n"
.LC1:
	.string	"*** FAILED ***"
.LC2:
	.string	"%25s\n"
.LC5:
	.string	"%20.2f\n"
	.text
	.globl	_Z11postprocessPKdS0_id
	.type	_Z11postprocessPKdS0_id, @function
_Z11postprocessPKdS0_id:
.LFB2028:
	.cfi_startproc
	endbr64
	movaps	%xmm0, %xmm2
	xorl	%eax, %eax
.L3:
	cmpl	%eax, %edx
	jle	.L13
	leaq	1(%rax), %rcx
	movsd	(%rsi,%rax,8), %xmm0
	movsd	-8(%rdi,%rcx,8), %xmm1
	ucomisd	%xmm1, %xmm0
	jp	.L9
	je	.L8
.L9:
	pushq	%rdx
	.cfi_def_cfa_offset 16
	leaq	.LC0(%rip), %rsi
	movl	%eax, %edx
	movl	$2, %edi
	movb	$2, %al
	call	__printf_chk@PLT
	leaq	.LC1(%rip), %rdx
	xorl	%eax, %eax
	popq	%rcx
	.cfi_def_cfa_offset 8
	leaq	.LC2(%rip), %rsi
	movl	$2, %edi
	jmp	__printf_chk@PLT
.L8:
	movq	%rcx, %rax
	jmp	.L3
.L13:
	addl	%edx, %edx
	movslq	%edx, %rdx
	salq	$3, %rdx
	js	.L6
	cvtsi2sdq	%rdx, %xmm1
	jmp	.L7
.L6:
	shrq	%rdx
	cvtsi2sdq	%rdx, %xmm1
	addsd	%xmm1, %xmm1
.L7:
	mulsd	.LC3(%rip), %xmm1
	leaq	.LC5(%rip), %rsi
	movl	$2, %edi
	movb	$1, %al
	mulsd	.LC4(%rip), %xmm1
	movaps	%xmm1, %xmm0
	divsd	%xmm2, %xmm0
	jmp	__printf_chk@PLT
	.cfi_endproc
.LFE2028:
	.size	_Z11postprocessPKdS0_id, .-_Z11postprocessPKdS0_id
	.globl	_Z39__device_stub__Z14transposeUni10PKdmmPdPKdmmPd
	.type	_Z39__device_stub__Z14transposeUni10PKdmmPdPKdmmPd, @function
_Z39__device_stub__Z14transposeUni10PKdmmPdPKdmmPd:
.LFB2054:
	.cfi_startproc
	endbr64
	subq	$152, %rsp
	.cfi_def_cfa_offset 160
	movq	%rdi, 24(%rsp)
	leaq	56(%rsp), %rdi
	movq	%rsi, 16(%rsp)
	leaq	68(%rsp), %rsi
	movq	%rdx, 8(%rsp)
	leaq	40(%rsp), %rdx
	movq	%rcx, (%rsp)
	leaq	48(%rsp), %rcx
	movq	%fs:40, %rax
	movq	%rax, 136(%rsp)
	xorl	%eax, %eax
	leaq	24(%rsp), %rax
	movl	$1, 64(%rsp)
	movq	%rax, 104(%rsp)
	leaq	16(%rsp), %rax
	movq	%rax, 112(%rsp)
	leaq	8(%rsp), %rax
	movq	%rax, 120(%rsp)
	movq	%rsp, %rax
	movq	%rax, 128(%rsp)
	movabsq	$4294967297, %rax
	movq	%rax, 56(%rsp)
	movq	%rax, 68(%rsp)
	movl	$1, 76(%rsp)
	call	__cudaPopCallConfiguration@PLT
	testl	%eax, %eax
	jne	.L14
	pushq	48(%rsp)
	.cfi_def_cfa_offset 168
	leaq	_Z14transposeUni10PKdmmPd(%rip), %rdi
	pushq	48(%rsp)
	.cfi_def_cfa_offset 176
	movq	84(%rsp), %rcx
	movl	92(%rsp), %r8d
	movq	72(%rsp), %rsi
	movl	80(%rsp), %edx
	leaq	120(%rsp), %r9
	call	cudaLaunchKernel@PLT
	popq	%rax
	.cfi_def_cfa_offset 168
	popq	%rdx
	.cfi_def_cfa_offset 160
.L14:
	movq	136(%rsp), %rax
	subq	%fs:40, %rax
	je	.L16
	call	__stack_chk_fail@PLT
.L16:
	addq	$152, %rsp
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE2054:
	.size	_Z39__device_stub__Z14transposeUni10PKdmmPdPKdmmPd, .-_Z39__device_stub__Z14transposeUni10PKdmmPdPKdmmPd
	.globl	_Z14transposeUni10PKdmmPd
	.type	_Z14transposeUni10PKdmmPd, @function
_Z14transposeUni10PKdmmPd:
.LFB2055:
	.cfi_startproc
	endbr64
	jmp	_Z39__device_stub__Z14transposeUni10PKdmmPdPKdmmPd
	.cfi_endproc
.LFE2055:
	.size	_Z14transposeUni10PKdmmPd, .-_Z14transposeUni10PKdmmPd
	.section	.rodata.str1.1
.LC6:
	.string	"\nDevice : %s\n"
.LC7:
	.string	"Bandwidth (GB/s)"
.LC8:
	.string	"Routine"
.LC9:
	.string	"%25s%25s\n"
.LC10:
	.string	"uni10 transpose"
.LC11:
	.string	"%25s"
.LC12:
	.string	"dimGrid: %d %d %d. dimBlock: %d %d %d\n"
	.section	.text.startup,"ax",@progbits
	.globl	main
	.type	main, @function
main:
.LFB2029:
	.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	$1144, %rsp
	.cfi_def_cfa_offset 1200
	movq	%fs:40, %rax
	movq	%rax, 1128(%rsp)
	xorl	%eax, %eax
	decl	%edi
	jle	.L39
	movq	8(%rsi), %rdi
	call	atoi@PLT
	movl	%eax, %ebx
	jmp	.L20
.L39:
	xorl	%ebx, %ebx
.L20:
	leaq	96(%rsp), %rbp
	movl	%ebx, %esi
	movq	%rbp, %rdi
	call	cudaGetDeviceProperties_v2@PLT
	movq	%rbp, %rdx
	movl	$2, %edi
	xorl	%eax, %eax
	leaq	.LC6(%rip), %rsi
	call	__printf_chk@PLT
	movl	%ebx, %edi
	call	cudaSetDevice@PLT
	movl	$32000000, %edi
	call	malloc@PLT
	movl	$32000000, %edi
	movq	%rax, %rbp
	call	malloc@PLT
	movl	$32000000, %edi
	movq	%rax, 8(%rsp)
	call	malloc@PLT
	leaq	32(%rsp), %rdi
	movl	$32000000, %esi
	movq	%rax, %rbx
	call	cudaMalloc@PLT
	leaq	40(%rsp), %rdi
	movl	$32000000, %esi
	call	cudaMalloc@PLT
	leaq	48(%rsp), %rdi
	movl	$32000000, %esi
	call	cudaMalloc@PLT
	movq	%rbp, %rcx
	xorl	%edx, %edx
.L21:
	xorl	%eax, %eax
.L22:
	leal	(%rdx,%rax), %esi
	cvtsi2sdl	%esi, %xmm0
	movsd	%xmm0, (%rcx,%rax,8)
	incq	%rax
	cmpq	$2000, %rax
	jne	.L22
	addl	$2000, %edx
	addq	$16000, %rcx
	cmpl	$4000000, %edx
	jne	.L21
	xorl	%eax, %eax
.L23:
	imulq	$16000, %rax, %rcx
	leaq	0(%rbp,%rax,8), %rsi
	xorl	%edx, %edx
	addq	%rbx, %rcx
.L24:
	movsd	(%rsi), %xmm0
	addq	$16000, %rsi
	movsd	%xmm0, (%rcx,%rdx,8)
	incq	%rdx
	cmpq	$2000, %rdx
	jne	.L24
	incq	%rax
	cmpq	$2000, %rax
	jne	.L23
	movq	32(%rsp), %rdi
	movl	$1, %ecx
	movl	$32000000, %edx
	movq	%rbp, %rsi
	leaq	.LC10(%rip), %r15
	leaq	.LC11(%rip), %r14
	call	cudaMemcpy@PLT
	leaq	56(%rsp), %rdi
	call	cudaEventCreate@PLT
	leaq	64(%rsp), %rdi
	call	cudaEventCreate@PLT
	leaq	.LC7(%rip), %rcx
	movl	$2, %edi
	xorl	%eax, %eax
	leaq	.LC8(%rip), %rdx
	leaq	.LC9(%rip), %rsi
	call	__printf_chk@PLT
	movq	%r15, %rdx
	movq	%r14, %rsi
	movl	$2, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	movq	48(%rsp), %rdi
	xorl	%esi, %esi
	movl	$32000000, %edx
	call	cudaMemset@PLT
	xorl	%r9d, %r9d
	xorl	%r8d, %r8d
	movl	$1, %ecx
	movabsq	$270582939711, %rdi
	movl	$1, %esi
	movabsq	$137438953504, %rdx
	movl	$1, 80(%rsp)
	movq	%rdi, 72(%rsp)
	movq	%rdx, 84(%rsp)
	movl	$1, 92(%rsp)
	call	__cudaPushCallConfiguration@PLT
	testl	%eax, %eax
	jne	.L26
	movq	48(%rsp), %rcx
	movq	32(%rsp), %rdi
	movl	$2000, %edx
	movl	$2000, %esi
	call	_Z39__device_stub__Z14transposeUni10PKdmmPdPKdmmPd
.L26:
	movq	56(%rsp), %rdi
	xorl	%esi, %esi
	movl	$100, %r12d
	call	cudaEventRecord@PLT
.L28:
	movl	92(%rsp), %ecx
	movq	84(%rsp), %rdx
	xorl	%r9d, %r9d
	xorl	%r8d, %r8d
	movq	72(%rsp), %rdi
	movl	80(%rsp), %esi
	call	__cudaPushCallConfiguration@PLT
	testl	%eax, %eax
	jne	.L27
	movq	48(%rsp), %rcx
	movq	32(%rsp), %rdi
	movl	$2000, %edx
	movl	$2000, %esi
	call	_Z39__device_stub__Z14transposeUni10PKdmmPdPKdmmPd
.L27:
	decl	%r12d
	jne	.L28
	movq	64(%rsp), %rdi
	xorl	%esi, %esi
	leaq	28(%rsp), %r13
	leaq	.LC12(%rip), %r12
	call	cudaEventRecord@PLT
	movq	64(%rsp), %rdi
	call	cudaEventSynchronize@PLT
	movq	64(%rsp), %rdx
	movq	56(%rsp), %rsi
	movq	%r13, %rdi
	call	cudaEventElapsedTime@PLT
	movq	48(%rsp), %rsi
	movq	8(%rsp), %rdi
	movl	$2, %ecx
	movl	$32000000, %edx
	call	cudaMemcpy@PLT
	movq	8(%rsp), %rsi
	movl	$4000000, %edx
	movq	%rbx, %rdi
	cvtss2sd	28(%rsp), %xmm0
	call	_Z11postprocessPKdS0_id
	pushq	$1
	.cfi_def_cfa_offset 1208
	movl	$32, %r9d
	movq	%r12, %rsi
	pushq	$32
	.cfi_def_cfa_offset 1216
	movl	$1, %r8d
	movl	$63, %ecx
	xorl	%eax, %eax
	movl	$63, %edx
	movl	$2, %edi
	call	__printf_chk@PLT
	popq	%rcx
	.cfi_def_cfa_offset 1208
	movq	%r15, %rdx
	popq	%rsi
	.cfi_def_cfa_offset 1200
	movl	$2, %edi
	movq	%r14, %rsi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	movq	48(%rsp), %rdi
	xorl	%esi, %esi
	movl	$32000000, %edx
	call	cudaMemset@PLT
	movl	92(%rsp), %ecx
	movl	80(%rsp), %esi
	xorl	%r9d, %r9d
	movq	84(%rsp), %rdx
	movq	72(%rsp), %rdi
	xorl	%r8d, %r8d
	call	__cudaPushCallConfiguration@PLT
	testl	%eax, %eax
	jne	.L29
	movq	48(%rsp), %rcx
	movq	32(%rsp), %rdi
	movl	$2000, %edx
	movl	$2000, %esi
	call	_Z39__device_stub__Z14transposeUni10PKdmmPdPKdmmPd
.L29:
	movq	56(%rsp), %rdi
	xorl	%esi, %esi
	movl	$100, %r14d
	call	cudaEventRecord@PLT
.L31:
	movl	92(%rsp), %ecx
	movq	84(%rsp), %rdx
	xorl	%r9d, %r9d
	xorl	%r8d, %r8d
	movq	72(%rsp), %rdi
	movl	80(%rsp), %esi
	call	__cudaPushCallConfiguration@PLT
	testl	%eax, %eax
	jne	.L30
	movq	48(%rsp), %rcx
	movq	32(%rsp), %rdi
	movl	$2000, %edx
	movl	$2000, %esi
	call	_Z39__device_stub__Z14transposeUni10PKdmmPdPKdmmPd
.L30:
	decl	%r14d
	jne	.L31
	movq	64(%rsp), %rdi
	xorl	%esi, %esi
	call	cudaEventRecord@PLT
	movq	64(%rsp), %rdi
	call	cudaEventSynchronize@PLT
	movq	64(%rsp), %rdx
	movq	56(%rsp), %rsi
	movq	%r13, %rdi
	call	cudaEventElapsedTime@PLT
	movq	48(%rsp), %rsi
	movq	8(%rsp), %rdi
	movl	$2, %ecx
	movl	$32000000, %edx
	call	cudaMemcpy@PLT
	movq	8(%rsp), %rsi
	movl	$4000000, %edx
	movq	%rbx, %rdi
	cvtss2sd	28(%rsp), %xmm0
	call	_Z11postprocessPKdS0_id
	pushq	$1
	.cfi_def_cfa_offset 1208
	movl	$32, %r9d
	movq	%r12, %rsi
	pushq	$32
	.cfi_def_cfa_offset 1216
	movl	$1, %r8d
	movl	$63, %ecx
	xorl	%eax, %eax
	movl	$63, %edx
	movl	$2, %edi
	call	__printf_chk@PLT
	popq	%rax
	.cfi_def_cfa_offset 1208
	popq	%rdx
	.cfi_def_cfa_offset 1200
	movq	56(%rsp), %rdi
	call	cudaEventDestroy@PLT
	movq	64(%rsp), %rdi
	call	cudaEventDestroy@PLT
	movq	48(%rsp), %rdi
	call	cudaFree@PLT
	movq	40(%rsp), %rdi
	call	cudaFree@PLT
	movq	32(%rsp), %rdi
	call	cudaFree@PLT
	movq	%rbp, %rdi
	call	free@PLT
	movq	8(%rsp), %rdi
	call	free@PLT
	movq	%rbx, %rdi
	call	free@PLT
	movq	1128(%rsp), %rax
	subq	%fs:40, %rax
	je	.L32
	call	__stack_chk_fail@PLT
.L32:
	addq	$1144, %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
.LFE2029:
	.size	main, .-main
	.text
	.globl	_Z36__device_stub__Z11transpose10PKdmmPdPKdmmPd
	.type	_Z36__device_stub__Z11transpose10PKdmmPdPKdmmPd, @function
_Z36__device_stub__Z11transpose10PKdmmPdPKdmmPd:
.LFB2056:
	.cfi_startproc
	endbr64
	subq	$152, %rsp
	.cfi_def_cfa_offset 160
	movq	%rdi, 24(%rsp)
	leaq	56(%rsp), %rdi
	movq	%rsi, 16(%rsp)
	leaq	68(%rsp), %rsi
	movq	%rdx, 8(%rsp)
	leaq	40(%rsp), %rdx
	movq	%rcx, (%rsp)
	leaq	48(%rsp), %rcx
	movq	%fs:40, %rax
	movq	%rax, 136(%rsp)
	xorl	%eax, %eax
	leaq	24(%rsp), %rax
	movl	$1, 64(%rsp)
	movq	%rax, 104(%rsp)
	leaq	16(%rsp), %rax
	movq	%rax, 112(%rsp)
	leaq	8(%rsp), %rax
	movq	%rax, 120(%rsp)
	movq	%rsp, %rax
	movq	%rax, 128(%rsp)
	movabsq	$4294967297, %rax
	movq	%rax, 56(%rsp)
	movq	%rax, 68(%rsp)
	movl	$1, 76(%rsp)
	call	__cudaPopCallConfiguration@PLT
	testl	%eax, %eax
	jne	.L41
	pushq	48(%rsp)
	.cfi_def_cfa_offset 168
	leaq	_Z11transpose10PKdmmPd(%rip), %rdi
	pushq	48(%rsp)
	.cfi_def_cfa_offset 176
	movq	84(%rsp), %rcx
	movl	92(%rsp), %r8d
	movq	72(%rsp), %rsi
	movl	80(%rsp), %edx
	leaq	120(%rsp), %r9
	call	cudaLaunchKernel@PLT
	popq	%rax
	.cfi_def_cfa_offset 168
	popq	%rdx
	.cfi_def_cfa_offset 160
.L41:
	movq	136(%rsp), %rax
	subq	%fs:40, %rax
	je	.L43
	call	__stack_chk_fail@PLT
.L43:
	addq	$152, %rsp
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE2056:
	.size	_Z36__device_stub__Z11transpose10PKdmmPdPKdmmPd, .-_Z36__device_stub__Z11transpose10PKdmmPdPKdmmPd
	.globl	_Z11transpose10PKdmmPd
	.type	_Z11transpose10PKdmmPd, @function
_Z11transpose10PKdmmPd:
.LFB2057:
	.cfi_startproc
	endbr64
	jmp	_Z36__device_stub__Z11transpose10PKdmmPdPKdmmPd
	.cfi_endproc
.LFE2057:
	.size	_Z11transpose10PKdmmPd, .-_Z11transpose10PKdmmPd
	.section	.rodata.str1.1
.LC13:
	.string	"_Z11transpose10PKdmmPd"
.LC14:
	.string	"_Z14transposeUni10PKdmmPd"
	.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	.LC13(%rip), %rdx
	movq	%rax, %rdi
	movq	%rax, %rbx
	pushq	$0
	.cfi_def_cfa_offset 40
	movq	%rdx, %rcx
	leaq	_Z11transpose10PKdmmPd(%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	.LC14(%rip), %rdx
	orl	$-1, %r8d
	leaq	_Z14transposeUni10PKdmmPd(%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.cst8,"aM",@progbits,8
	.align 8
.LC3:
	.long	-1598689907
	.long	1051772663
	.align 8
.LC4:
	.long	0
	.long	1079574528
	.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 <assert.h>

//const int TILE_DIM = 32;
//const int BLOCK_ROWS = 32;
const int thread = 32;
const int NUM_REPS = 100;
const int nx = 2000;
const int ny = 2000;


//Uni10 Transpose
__global__ void transposeUni10(const double *A, size_t M, size_t N, double *AT)
{
  size_t y = blockIdx.y * blockDim.y + threadIdx.y;
  size_t x = blockIdx.x * blockDim.x + threadIdx.x;
  if(y < M && x < N)
    AT[x * M + y] = A[y * N + x];
}

//Yours Transpose
__global__ void transpose10(const double *A, size_t M, size_t N, double *AT)
{
  //
}

// Convenience function for checking CUDA runtime API results
// can be wrapped around any runtime API call. No-op in release builds.
inline
hipError_t checkCuda(hipError_t result)
{
#if defined(DEBUG) || defined(_DEBUG)
  if (result != hipSuccess) {
    fprintf(stderr, "CUDA Runtime Error: %s\n", hipGetErrorString(result));
    assert(result == hipSuccess);
  }
#endif
  return result;
}

// Check errors and print GB/s
void postprocess(const double *ref, const double *res, int n, double ms)
{
  bool passed = true;
  for (int i = 0; i < n; i++)
    if (res[i] != ref[i]) {
      printf("%d %f %f\n", i, res[i], ref[i]);
      printf("%25s\n", "*** FAILED ***");
      passed = false;
      break;
    }
  if (passed)
    printf("%20.2f\n", 2 * n * sizeof(double) * 1e-6 * NUM_REPS / ms );
}

int main(int argc, char **argv)
{
  size_t M = nx;
  size_t N = ny;
  const int mem_size = nx*ny*sizeof(double);

  int devId = 0;
  if (argc > 1) devId = atoi(argv[1]);

  hipDeviceProp_t prop;
  checkCuda( hipGetDeviceProperties(&prop, devId));
  printf("\nDevice : %s\n", prop.name);
  //printf("Matrix size: %d %d, Block size: %d %d, Tile size: %d %d\n", 
  //       nx, ny, TILE_DIM, BLOCK_ROWS, TILE_DIM, TILE_DIM);
  
  checkCuda( hipSetDevice(devId) );

  double *h_idata = (double*)malloc(mem_size);
  double *h_cdata = (double*)malloc(mem_size);
  double *h_tdata = (double*)malloc(mem_size);
  double *gold    = (double*)malloc(mem_size);
  
  double *d_idata, *d_cdata, *d_tdata;
  checkCuda( hipMalloc(&d_idata, mem_size) );
  checkCuda( hipMalloc(&d_cdata, mem_size) );
  checkCuda( hipMalloc(&d_tdata, mem_size) );

  // host
  for (int j = 0; j < ny; j++)
    for (int i = 0; i < nx; i++)
      h_idata[j*nx + i] = j*nx + i;

  // correct result for error checking
  for (int j = 0; j < ny; j++)
    for (int i = 0; i < nx; i++)
      gold[j*nx + i] = h_idata[i*nx + j];
  
  // device
  checkCuda( hipMemcpy(d_idata, h_idata, mem_size, hipMemcpyHostToDevice) );
  
  // events for timing
  hipEvent_t startEvent, stopEvent;
  checkCuda( hipEventCreate(&startEvent) );
  checkCuda( hipEventCreate(&stopEvent) );
  float ms;

  // ------------
  // time kernels
  // ------------
  printf("%25s%25s\n", "Routine", "Bandwidth (GB/s)");
  
  // --------------
  // transposeUni10 (Naive)
  // --------------

  dim3 dimGrid( (N + thread - 1) / thread, (M + thread - 1) / thread, 1);
  dim3 dimBlock(thread, thread, 1);

  printf("%25s", "uni10 transpose");
  checkCuda( hipMemset(d_tdata, 0, mem_size) );
  // warmup
  transposeUni10<<<dimGrid, dimBlock>>>(d_idata, M, N, d_tdata);
  checkCuda( hipEventRecord(startEvent, 0) );
  for (int i = 0; i < NUM_REPS; i++)
     transposeUni10<<<dimGrid, dimBlock>>>(d_idata, M, N, d_tdata);
  checkCuda( hipEventRecord(stopEvent, 0) );
  checkCuda( hipEventSynchronize(stopEvent) );
  checkCuda( hipEventElapsedTime(&ms, startEvent, stopEvent) );
  checkCuda( hipMemcpy(h_tdata, d_tdata, mem_size, hipMemcpyDeviceToHost) );
  postprocess(gold, h_tdata, nx * ny, ms);
  printf("dimGrid: %d %d %d. dimBlock: %d %d %d\n",
         dimGrid.x, dimGrid.y, dimGrid.z, dimBlock.x, dimBlock.y, dimBlock.z);


  // --------------
  // Your transpose 
  // --------------

  printf("%25s", "uni10 transpose");
  checkCuda( hipMemset(d_tdata, 0, mem_size) );
  // warmup
  transposeUni10<<<dimGrid, dimBlock>>>(d_idata, M, N, d_tdata);
  checkCuda( hipEventRecord(startEvent, 0) );
  for (int i = 0; i < NUM_REPS; i++)
     transposeUni10<<<dimGrid, dimBlock>>>(d_idata, M, N, d_tdata);
  checkCuda( hipEventRecord(stopEvent, 0) );
  checkCuda( hipEventSynchronize(stopEvent) );
  checkCuda( hipEventElapsedTime(&ms, startEvent, stopEvent) );
  checkCuda( hipMemcpy(h_tdata, d_tdata, mem_size, hipMemcpyDeviceToHost) );
  postprocess(gold, h_tdata, nx * ny, ms);
  printf("dimGrid: %d %d %d. dimBlock: %d %d %d\n",
         dimGrid.x, dimGrid.y, dimGrid.z, dimBlock.x, dimBlock.y, dimBlock.z);



  // cleanup
  checkCuda( hipEventDestroy(startEvent) );
  checkCuda( hipEventDestroy(stopEvent) );
  checkCuda( hipFree(d_tdata) );
  checkCuda( hipFree(d_cdata) );
  checkCuda( hipFree(d_idata) );
  free(h_idata);
  free(h_tdata);
  free(h_cdata);
  free(gold);
}

	.text
	.file	"transpose.hip"
	.globl	_Z29__device_stub__transposeUni10PKdmmPd # -- Begin function _Z29__device_stub__transposeUni10PKdmmPd
	.type	_Z29__device_stub__transposeUni10PKdmmPd,@function
_Z29__device_stub__transposeUni10PKdmmPd: # @_Z29__device_stub__transposeUni10PKdmmPd
	.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), %rdi
	movq	%rsi, (%rdi)
	leaq	24(%rsp), %rsi
	movq	%rdx, (%rsi)
	leaq	16(%rsp), %rdx
	movq	%rcx, (%rdx)
	leaq	80(%rsp), %rbx
	movq	%rax, (%rbx)
	movq	%rdi, 8(%rbx)
	movq	%rsi, 16(%rbx)
	movq	%rdx, 24(%rbx)
	leaq	64(%rsp), %r14
	leaq	48(%rsp), %r15
	leaq	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	$_Z14transposeUni10PKdmmPd, %edi
	movq	%rbx, %r9
	pushq	(%r13)
	.cfi_adjust_cfa_offset 8
	pushq	(%r12)
	.cfi_adjust_cfa_offset 8
	callq	hipLaunchKernel
	addq	$128, %rsp
	.cfi_adjust_cfa_offset -128
	popq	%rbx
	.cfi_def_cfa_offset 40
	popq	%r12
	.cfi_def_cfa_offset 32
	popq	%r13
	.cfi_def_cfa_offset 24
	popq	%r14
	.cfi_def_cfa_offset 16
	popq	%r15
	.cfi_def_cfa_offset 8
	retq
.Lfunc_end0:
	.size	_Z29__device_stub__transposeUni10PKdmmPd, .Lfunc_end0-_Z29__device_stub__transposeUni10PKdmmPd
	.cfi_endproc
                                        # -- End function
	.globl	_Z26__device_stub__transpose10PKdmmPd # -- Begin function _Z26__device_stub__transpose10PKdmmPd
	.type	_Z26__device_stub__transpose10PKdmmPd,@function
_Z26__device_stub__transpose10PKdmmPd:  # @_Z26__device_stub__transpose10PKdmmPd
	.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), %rdi
	movq	%rsi, (%rdi)
	leaq	24(%rsp), %rsi
	movq	%rdx, (%rsi)
	leaq	16(%rsp), %rdx
	movq	%rcx, (%rdx)
	leaq	80(%rsp), %rbx
	movq	%rax, (%rbx)
	movq	%rdi, 8(%rbx)
	movq	%rsi, 16(%rbx)
	movq	%rdx, 24(%rbx)
	leaq	64(%rsp), %r14
	leaq	48(%rsp), %r15
	leaq	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	$_Z11transpose10PKdmmPd, %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_end1:
	.size	_Z26__device_stub__transpose10PKdmmPd, .Lfunc_end1-_Z26__device_stub__transpose10PKdmmPd
	.cfi_endproc
                                        # -- End function
	.section	.rodata.cst16,"aM",@progbits,16
	.p2align	4, 0x0                          # -- Begin function _Z11postprocessPKdS0_id
.LCPI2_0:
	.long	1127219200                      # 0x43300000
	.long	1160773632                      # 0x45300000
	.long	0                               # 0x0
	.long	0                               # 0x0
.LCPI2_1:
	.quad	0x4330000000000000              # double 4503599627370496
	.quad	0x4530000000000000              # double 1.9342813113834067E+25
	.section	.rodata.cst8,"aM",@progbits,8
	.p2align	3, 0x0
.LCPI2_2:
	.quad	0x3eb0c6f7a0b5ed8d              # double 9.9999999999999995E-7
.LCPI2_3:
	.quad	0x4059000000000000              # double 100
	.text
	.globl	_Z11postprocessPKdS0_id
	.type	_Z11postprocessPKdS0_id,@function
_Z11postprocessPKdS0_id:                # @_Z11postprocessPKdS0_id
	.cfi_startproc
# %bb.0:
	pushq	%rax
	.cfi_def_cfa_offset 16
	testl	%edx, %edx
	jle	.LBB2_4
# %bb.1:                                # %.lr.ph.preheader
	movl	%edx, %ecx
	xorl	%eax, %eax
.LBB2_2:                                # %.lr.ph
                                        # =>This Inner Loop Header: Depth=1
	movsd	(%rsi,%rax,8), %xmm2            # xmm2 = mem[0],zero
	movsd	(%rdi,%rax,8), %xmm1            # xmm1 = mem[0],zero
	ucomisd	%xmm1, %xmm2
	jne	.LBB2_5
	jp	.LBB2_5
# %bb.3:                                #   in Loop: Header=BB2_2 Depth=1
	incq	%rax
	cmpq	%rax, %rcx
	jne	.LBB2_2
.LBB2_4:                                # %.critedge
	addl	%edx, %edx
	movslq	%edx, %rax
	shlq	$3, %rax
	movq	%rax, %xmm2
	punpckldq	.LCPI2_0(%rip), %xmm2   # xmm2 = xmm2[0],mem[0],xmm2[1],mem[1]
	subpd	.LCPI2_1(%rip), %xmm2
	movapd	%xmm2, %xmm1
	unpckhpd	%xmm2, %xmm1                    # xmm1 = xmm1[1],xmm2[1]
	addsd	%xmm2, %xmm1
	mulsd	.LCPI2_2(%rip), %xmm1
	mulsd	.LCPI2_3(%rip), %xmm1
	divsd	%xmm0, %xmm1
	movl	$.L.str.3, %edi
	movapd	%xmm1, %xmm0
	movb	$1, %al
	popq	%rcx
	.cfi_def_cfa_offset 8
	jmp	printf                          # TAILCALL
.LBB2_5:
	.cfi_def_cfa_offset 16
	movl	$.L.str, %edi
	movl	%eax, %esi
	movapd	%xmm2, %xmm0
	movb	$2, %al
	callq	printf
	movl	$.L.str.1, %edi
	movl	$.L.str.2, %esi
	xorl	%eax, %eax
	popq	%rcx
	.cfi_def_cfa_offset 8
	jmp	printf                          # TAILCALL
.Lfunc_end2:
	.size	_Z11postprocessPKdS0_id, .Lfunc_end2-_Z11postprocessPKdS0_id
	.cfi_endproc
                                        # -- End function
	.globl	main                            # -- Begin function 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	$1528, %rsp                     # imm = 0x5F8
	.cfi_def_cfa_offset 1584
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	.cfi_offset %rbp, -16
	xorl	%ebx, %ebx
	cmpl	$2, %edi
	jl	.LBB3_2
# %bb.1:
	movq	8(%rsi), %rdi
	callq	atoi
	movl	%eax, %ebx
.LBB3_2:
	leaq	56(%rsp), %r14
	movq	%r14, %rdi
	movl	%ebx, %esi
	callq	hipGetDevicePropertiesR0600
	xorl	%r12d, %r12d
	movl	$.L.str.4, %edi
	movq	%r14, %rsi
	xorl	%eax, %eax
	callq	printf
	movl	%ebx, %edi
	callq	hipSetDevice
	movl	$32000000, %edi                 # imm = 0x1E84800
	callq	malloc
	movq	%rax, %rbx
	movl	$32000000, %edi                 # imm = 0x1E84800
	callq	malloc
	movq	%rax, %r14
	movl	$32000000, %edi                 # imm = 0x1E84800
	callq	malloc
	movq	%rax, %r15
	leaq	24(%rsp), %rdi
	movl	$32000000, %esi                 # imm = 0x1E84800
	callq	hipMalloc
	leaq	48(%rsp), %rdi
	movl	$32000000, %esi                 # imm = 0x1E84800
	callq	hipMalloc
	leaq	8(%rsp), %rdi
	movl	$32000000, %esi                 # imm = 0x1E84800
	callq	hipMalloc
	movl	$2000, %eax                     # imm = 0x7D0
	xorl	%ecx, %ecx
.LBB3_3:                                # %.preheader118
                                        # =>This Loop Header: Depth=1
                                        #     Child Loop BB3_4 Depth 2
	movl	$2000, %edx                     # imm = 0x7D0
	movq	%r12, %rsi
.LBB3_4:                                #   Parent Loop BB3_3 Depth=1
                                        # =>  This Inner Loop Header: Depth=2
	xorps	%xmm0, %xmm0
	cvtsi2sd	%esi, %xmm0
	movsd	%xmm0, (%rbx,%rsi,8)
	incq	%rsi
	decq	%rdx
	jne	.LBB3_4
# %bb.5:                                #   in Loop: Header=BB3_3 Depth=1
	incq	%rcx
	addq	%rax, %r12
	cmpq	%rax, %rcx
	jne	.LBB3_3
# %bb.6:                                # %.preheader.preheader
	xorl	%eax, %eax
	movq	%rbx, %rcx
	movq	%r15, %rdx
.LBB3_7:                                # %.preheader
                                        # =>This Loop Header: Depth=1
                                        #     Child Loop BB3_8 Depth 2
	movq	%rcx, %rsi
	xorl	%edi, %edi
.LBB3_8:                                #   Parent Loop BB3_7 Depth=1
                                        # =>  This Inner Loop Header: Depth=2
	movsd	(%rsi), %xmm0                   # xmm0 = mem[0],zero
	movsd	%xmm0, (%rdx,%rdi,8)
	incq	%rdi
	addq	$16000, %rsi                    # imm = 0x3E80
	cmpq	$2000, %rdi                     # imm = 0x7D0
	jne	.LBB3_8
# %bb.9:                                #   in Loop: Header=BB3_7 Depth=1
	incq	%rax
	addq	$16000, %rdx                    # imm = 0x3E80
	addq	$8, %rcx
	cmpq	$2000, %rax                     # imm = 0x7D0
	jne	.LBB3_7
# %bb.10:
	movabsq	$270582939711, %r12             # imm = 0x3F0000003F
	movabsq	$137438953504, %r13             # imm = 0x2000000020
	movq	24(%rsp), %rdi
	movl	$32000000, %edx                 # imm = 0x1E84800
	movq	%rbx, %rsi
	movl	$1, %ecx
	callq	hipMemcpy
	leaq	32(%rsp), %rdi
	callq	hipEventCreate
	leaq	16(%rsp), %rdi
	callq	hipEventCreate
	movl	$.L.str.5, %edi
	movl	$.L.str.6, %esi
	movl	$.L.str.7, %edx
	xorl	%eax, %eax
	callq	printf
	movl	$.L.str.8, %edi
	movl	$.L.str.9, %esi
	xorl	%eax, %eax
	callq	printf
	movq	8(%rsp), %rdi
	movl	$32000000, %edx                 # imm = 0x1E84800
	xorl	%esi, %esi
	callq	hipMemset
	movq	%r12, %rdi
	movl	$1, %esi
	movq	%r13, %rdx
	movl	$1, %ecx
	xorl	%r8d, %r8d
	xorl	%r9d, %r9d
	callq	__hipPushCallConfiguration
	testl	%eax, %eax
	jne	.LBB3_12
# %bb.11:
	movq	24(%rsp), %rdi
	movq	8(%rsp), %rcx
	movl	$2000, %esi                     # imm = 0x7D0
	movl	$2000, %edx                     # imm = 0x7D0
	callq	_Z29__device_stub__transposeUni10PKdmmPd
.LBB3_12:
	movq	32(%rsp), %rdi
	xorl	%esi, %esi
	callq	hipEventRecord
	movl	$100, %ebp
.LBB3_13:                               # =>This Inner Loop Header: Depth=1
	movq	%r12, %rdi
	movl	$1, %esi
	movq	%r13, %rdx
	movl	$1, %ecx
	xorl	%r8d, %r8d
	xorl	%r9d, %r9d
	callq	__hipPushCallConfiguration
	testl	%eax, %eax
	jne	.LBB3_15
# %bb.14:                               #   in Loop: Header=BB3_13 Depth=1
	movq	24(%rsp), %rdi
	movq	8(%rsp), %rcx
	movl	$2000, %esi                     # imm = 0x7D0
	movl	$2000, %edx                     # imm = 0x7D0
	callq	_Z29__device_stub__transposeUni10PKdmmPd
.LBB3_15:                               #   in Loop: Header=BB3_13 Depth=1
	decl	%ebp
	jne	.LBB3_13
# %bb.16:
	movq	16(%rsp), %rdi
	xorl	%esi, %esi
	callq	hipEventRecord
	movq	16(%rsp), %rdi
	callq	hipEventSynchronize
	movq	32(%rsp), %rsi
	movq	16(%rsp), %rdx
	leaq	44(%rsp), %rbp
	movq	%rbp, %rdi
	callq	hipEventElapsedTime
	movq	8(%rsp), %rsi
	movl	$32000000, %edx                 # imm = 0x1E84800
	movq	%r14, %rdi
	movl	$2, %ecx
	callq	hipMemcpy
	cvtss2sd	(%rbp), %xmm0
	movq	%r15, %rdi
	movq	%r14, %rsi
	movl	$4000000, %edx                  # imm = 0x3D0900
	callq	_Z11postprocessPKdS0_id
	movl	$1, (%rsp)
	movl	$.L.str.10, %edi
	movl	$63, %esi
	movl	$63, %edx
	movl	$1, %ecx
	movl	$32, %r8d
	movl	$32, %r9d
	xorl	%eax, %eax
	callq	printf
	movl	$.L.str.8, %edi
	movl	$.L.str.9, %esi
	xorl	%eax, %eax
	callq	printf
	movq	8(%rsp), %rdi
	movl	$32000000, %edx                 # imm = 0x1E84800
	xorl	%esi, %esi
	callq	hipMemset
	movq	%r12, %rdi
	movl	$1, %esi
	movq	%r13, %rdx
	movl	$1, %ecx
	xorl	%r8d, %r8d
	xorl	%r9d, %r9d
	callq	__hipPushCallConfiguration
	testl	%eax, %eax
	jne	.LBB3_18
# %bb.17:
	movq	24(%rsp), %rdi
	movq	8(%rsp), %rcx
	movl	$2000, %esi                     # imm = 0x7D0
	movl	$2000, %edx                     # imm = 0x7D0
	callq	_Z29__device_stub__transposeUni10PKdmmPd
.LBB3_18:
	movq	32(%rsp), %rdi
	xorl	%esi, %esi
	callq	hipEventRecord
	movl	$100, %ebp
.LBB3_19:                               # =>This Inner Loop Header: Depth=1
	movq	%r12, %rdi
	movl	$1, %esi
	movq	%r13, %rdx
	movl	$1, %ecx
	xorl	%r8d, %r8d
	xorl	%r9d, %r9d
	callq	__hipPushCallConfiguration
	testl	%eax, %eax
	jne	.LBB3_21
# %bb.20:                               #   in Loop: Header=BB3_19 Depth=1
	movq	24(%rsp), %rdi
	movq	8(%rsp), %rcx
	movl	$2000, %esi                     # imm = 0x7D0
	movl	$2000, %edx                     # imm = 0x7D0
	callq	_Z29__device_stub__transposeUni10PKdmmPd
.LBB3_21:                               #   in Loop: Header=BB3_19 Depth=1
	decl	%ebp
	jne	.LBB3_19
# %bb.22:
	movq	16(%rsp), %rdi
	xorl	%esi, %esi
	callq	hipEventRecord
	movq	16(%rsp), %rdi
	callq	hipEventSynchronize
	movq	32(%rsp), %rsi
	movq	16(%rsp), %rdx
	leaq	44(%rsp), %r12
	movq	%r12, %rdi
	callq	hipEventElapsedTime
	movq	8(%rsp), %rsi
	movl	$32000000, %edx                 # imm = 0x1E84800
	movq	%r14, %rdi
	movl	$2, %ecx
	callq	hipMemcpy
	xorps	%xmm0, %xmm0
	cvtss2sd	(%r12), %xmm0
	movq	%r15, %rdi
	movq	%r14, %rsi
	movl	$4000000, %edx                  # imm = 0x3D0900
	callq	_Z11postprocessPKdS0_id
	movl	$1, (%rsp)
	movl	$.L.str.10, %edi
	movl	$63, %esi
	movl	$63, %edx
	movl	$1, %ecx
	movl	$32, %r8d
	movl	$32, %r9d
	xorl	%eax, %eax
	callq	printf
	movq	32(%rsp), %rdi
	callq	hipEventDestroy
	movq	16(%rsp), %rdi
	callq	hipEventDestroy
	movq	8(%rsp), %rdi
	callq	hipFree
	movq	48(%rsp), %rdi
	callq	hipFree
	movq	24(%rsp), %rdi
	callq	hipFree
	movq	%rbx, %rdi
	callq	free
	movq	%r14, %rdi
	callq	free
	movq	%r15, %rdi
	callq	free
	xorl	%eax, %eax
	addq	$1528, %rsp                     # imm = 0x5F8
	.cfi_def_cfa_offset 56
	popq	%rbx
	.cfi_def_cfa_offset 48
	popq	%r12
	.cfi_def_cfa_offset 40
	popq	%r13
	.cfi_def_cfa_offset 32
	popq	%r14
	.cfi_def_cfa_offset 24
	popq	%r15
	.cfi_def_cfa_offset 16
	popq	%rbp
	.cfi_def_cfa_offset 8
	retq
.Lfunc_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	$_Z14transposeUni10PKdmmPd, %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	$_Z11transpose10PKdmmPd, %esi
	movl	$.L__unnamed_2, %edx
	movl	$.L__unnamed_2, %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	_Z14transposeUni10PKdmmPd,@object # @_Z14transposeUni10PKdmmPd
	.section	.rodata,"a",@progbits
	.globl	_Z14transposeUni10PKdmmPd
	.p2align	3, 0x0
_Z14transposeUni10PKdmmPd:
	.quad	_Z29__device_stub__transposeUni10PKdmmPd
	.size	_Z14transposeUni10PKdmmPd, 8

	.type	_Z11transpose10PKdmmPd,@object  # @_Z11transpose10PKdmmPd
	.globl	_Z11transpose10PKdmmPd
	.p2align	3, 0x0
_Z11transpose10PKdmmPd:
	.quad	_Z26__device_stub__transpose10PKdmmPd
	.size	_Z11transpose10PKdmmPd, 8

	.type	.L.str,@object                  # @.str
	.section	.rodata.str1.1,"aMS",@progbits,1
.L.str:
	.asciz	"%d %f %f\n"
	.size	.L.str, 10

	.type	.L.str.1,@object                # @.str.1
.L.str.1:
	.asciz	"%25s\n"
	.size	.L.str.1, 6

	.type	.L.str.2,@object                # @.str.2
.L.str.2:
	.asciz	"*** FAILED ***"
	.size	.L.str.2, 15

	.type	.L.str.3,@object                # @.str.3
.L.str.3:
	.asciz	"%20.2f\n"
	.size	.L.str.3, 8

	.type	.L.str.4,@object                # @.str.4
.L.str.4:
	.asciz	"\nDevice : %s\n"
	.size	.L.str.4, 14

	.type	.L.str.5,@object                # @.str.5
.L.str.5:
	.asciz	"%25s%25s\n"
	.size	.L.str.5, 10

	.type	.L.str.6,@object                # @.str.6
.L.str.6:
	.asciz	"Routine"
	.size	.L.str.6, 8

	.type	.L.str.7,@object                # @.str.7
.L.str.7:
	.asciz	"Bandwidth (GB/s)"
	.size	.L.str.7, 17

	.type	.L.str.8,@object                # @.str.8
.L.str.8:
	.asciz	"%25s"
	.size	.L.str.8, 5

	.type	.L.str.9,@object                # @.str.9
.L.str.9:
	.asciz	"uni10 transpose"
	.size	.L.str.9, 16

	.type	.L.str.10,@object               # @.str.10
.L.str.10:
	.asciz	"dimGrid: %d %d %d. dimBlock: %d %d %d\n"
	.size	.L.str.10, 39

	.type	.L__unnamed_1,@object           # @0
.L__unnamed_1:
	.asciz	"_Z14transposeUni10PKdmmPd"
	.size	.L__unnamed_1, 26

	.type	.L__unnamed_2,@object           # @1
.L__unnamed_2:
	.asciz	"_Z11transpose10PKdmmPd"
	.size	.L__unnamed_2, 23

	.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 _Z29__device_stub__transposeUni10PKdmmPd
	.addrsig_sym _Z26__device_stub__transpose10PKdmmPd
	.addrsig_sym __hip_module_ctor
	.addrsig_sym __hip_module_dtor
	.addrsig_sym _Z14transposeUni10PKdmmPd
	.addrsig_sym _Z11transpose10PKdmmPd
	.addrsig_sym __hip_fatbin
	.addrsig_sym __hip_fatbin_wrapper
	.addrsig_sym __hip_cuid_

	.text
	.amdgcn_target "amdgcn-amd-amdhsa--gfx1100"
	.protected	_Z14transposeUni10PKdmmPd ; -- Begin function _Z14transposeUni10PKdmmPd
	.globl	_Z14transposeUni10PKdmmPd
	.p2align	8
	.type	_Z14transposeUni10PKdmmPd,@function
_Z14transposeUni10PKdmmPd:              ; @_Z14transposeUni10PKdmmPd
; %bb.0:
	s_clause 0x1
	s_load_b32 s2, s[0:1], 0x2c
	s_load_b256 s[4:11], s[0:1], 0x0
	v_bfe_u32 v2, v0, 10, 10
	v_and_b32_e32 v4, 0x3ff, v0
	s_waitcnt lgkmcnt(0)
	s_lshr_b32 s0, s2, 16
	s_delay_alu instid0(VALU_DEP_2) | instid1(SALU_CYCLE_1)
	v_mad_u64_u32 v[0:1], null, s15, s0, v[2:3]
	v_mov_b32_e32 v1, 0
	s_and_b32 s0, s2, 0xffff
	s_delay_alu instid0(SALU_CYCLE_1) | instskip(NEXT) | instid1(VALU_DEP_2)
	v_mad_u64_u32 v[2:3], null, s14, s0, v[4:5]
	v_mov_b32_e32 v3, v1
	s_delay_alu instid0(VALU_DEP_4) | instskip(NEXT) | instid1(VALU_DEP_2)
	v_cmp_gt_u64_e32 vcc_lo, s[6:7], v[0:1]
	v_cmp_gt_u64_e64 s0, s[8:9], v[2:3]
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(SALU_CYCLE_1)
	s_and_b32 s0, vcc_lo, s0
	s_and_saveexec_b32 s1, s0
	s_cbranch_execz .LBB0_2
; %bb.1:
	v_mad_u64_u32 v[4:5], null, v0, s8, 0
	s_delay_alu instid0(VALU_DEP_1) | instskip(SKIP_1) | instid1(VALU_DEP_2)
	v_mad_u64_u32 v[6:7], null, v0, s9, v[5:6]
	v_lshlrev_b64 v[0:1], 3, v[0:1]
	v_mov_b32_e32 v5, v6
	v_lshlrev_b64 v[6:7], 3, v[2:3]
	s_delay_alu instid0(VALU_DEP_2) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_lshlrev_b64 v[4:5], 3, v[4:5]
	v_add_co_u32 v3, vcc_lo, s4, v4
	s_delay_alu instid0(VALU_DEP_2) | instskip(NEXT) | instid1(VALU_DEP_2)
	v_add_co_ci_u32_e32 v4, vcc_lo, s5, v5, vcc_lo
	v_add_co_u32 v3, vcc_lo, v3, v6
	s_delay_alu instid0(VALU_DEP_2) | instskip(SKIP_3) | instid1(VALU_DEP_1)
	v_add_co_ci_u32_e32 v4, vcc_lo, v4, v7, vcc_lo
	v_mad_u64_u32 v[5:6], null, v2, s6, 0
	global_load_b64 v[3:4], v[3:4], off
	v_mad_u64_u32 v[7:8], null, v2, s7, v[6:7]
	v_mov_b32_e32 v6, v7
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_lshlrev_b64 v[5:6], 3, v[5:6]
	v_add_co_u32 v2, vcc_lo, s10, v5
	s_delay_alu instid0(VALU_DEP_2) | instskip(NEXT) | instid1(VALU_DEP_2)
	v_add_co_ci_u32_e32 v5, vcc_lo, s11, v6, vcc_lo
	v_add_co_u32 v0, vcc_lo, v2, v0
	s_delay_alu instid0(VALU_DEP_2)
	v_add_co_ci_u32_e32 v1, vcc_lo, v5, v1, vcc_lo
	s_waitcnt vmcnt(0)
	global_store_b64 v[0:1], v[3:4], off
.LBB0_2:
	s_nop 0
	s_sendmsg sendmsg(MSG_DEALLOC_VGPRS)
	s_endpgm
	.section	.rodata,"a",@progbits
	.p2align	6, 0x0
	.amdhsa_kernel _Z14transposeUni10PKdmmPd
		.amdhsa_group_segment_fixed_size 0
		.amdhsa_private_segment_fixed_size 0
		.amdhsa_kernarg_size 288
		.amdhsa_user_sgpr_count 14
		.amdhsa_user_sgpr_dispatch_ptr 0
		.amdhsa_user_sgpr_queue_ptr 0
		.amdhsa_user_sgpr_kernarg_segment_ptr 1
		.amdhsa_user_sgpr_dispatch_id 0
		.amdhsa_user_sgpr_private_segment_size 0
		.amdhsa_wavefront_size32 1
		.amdhsa_uses_dynamic_stack 0
		.amdhsa_enable_private_segment 0
		.amdhsa_system_sgpr_workgroup_id_x 1
		.amdhsa_system_sgpr_workgroup_id_y 1
		.amdhsa_system_sgpr_workgroup_id_z 0
		.amdhsa_system_sgpr_workgroup_info 0
		.amdhsa_system_vgpr_workitem_id 1
		.amdhsa_next_free_vgpr 9
		.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	_Z14transposeUni10PKdmmPd, .Lfunc_end0-_Z14transposeUni10PKdmmPd
                                        ; -- End function
	.section	.AMDGPU.csdata,"",@progbits
; Kernel info:
; codeLenInByte = 296
; NumSgprs: 18
; NumVgprs: 9
; ScratchSize: 0
; MemoryBound: 0
; FloatMode: 240
; IeeeMode: 1
; LDSByteSize: 0 bytes/workgroup (compile time only)
; SGPRBlocks: 2
; VGPRBlocks: 1
; NumSGPRsForWavesPerEU: 18
; NumVGPRsForWavesPerEU: 9
; Occupancy: 16
; WaveLimiterHint : 0
; COMPUTE_PGM_RSRC2:SCRATCH_EN: 0
; COMPUTE_PGM_RSRC2:USER_SGPR: 14
; COMPUTE_PGM_RSRC2:TRAP_HANDLER: 0
; COMPUTE_PGM_RSRC2:TGID_X_EN: 1
; COMPUTE_PGM_RSRC2:TGID_Y_EN: 1
; COMPUTE_PGM_RSRC2:TGID_Z_EN: 0
; COMPUTE_PGM_RSRC2:TIDIG_COMP_CNT: 1
	.text
	.protected	_Z11transpose10PKdmmPd  ; -- Begin function _Z11transpose10PKdmmPd
	.globl	_Z11transpose10PKdmmPd
	.p2align	8
	.type	_Z11transpose10PKdmmPd,@function
_Z11transpose10PKdmmPd:                 ; @_Z11transpose10PKdmmPd
; %bb.0:
	s_endpgm
	.section	.rodata,"a",@progbits
	.p2align	6, 0x0
	.amdhsa_kernel _Z11transpose10PKdmmPd
		.amdhsa_group_segment_fixed_size 0
		.amdhsa_private_segment_fixed_size 0
		.amdhsa_kernarg_size 32
		.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 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_end1:
	.size	_Z11transpose10PKdmmPd, .Lfunc_end1-_Z11transpose10PKdmmPd
                                        ; -- 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
	.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
      - .offset:         8
        .size:           8
        .value_kind:     by_value
      - .offset:         16
        .size:           8
        .value_kind:     by_value
      - .address_space:  global
        .offset:         24
        .size:           8
        .value_kind:     global_buffer
      - .offset:         32
        .size:           4
        .value_kind:     hidden_block_count_x
      - .offset:         36
        .size:           4
        .value_kind:     hidden_block_count_y
      - .offset:         40
        .size:           4
        .value_kind:     hidden_block_count_z
      - .offset:         44
        .size:           2
        .value_kind:     hidden_group_size_x
      - .offset:         46
        .size:           2
        .value_kind:     hidden_group_size_y
      - .offset:         48
        .size:           2
        .value_kind:     hidden_group_size_z
      - .offset:         50
        .size:           2
        .value_kind:     hidden_remainder_x
      - .offset:         52
        .size:           2
        .value_kind:     hidden_remainder_y
      - .offset:         54
        .size:           2
        .value_kind:     hidden_remainder_z
      - .offset:         72
        .size:           8
        .value_kind:     hidden_global_offset_x
      - .offset:         80
        .size:           8
        .value_kind:     hidden_global_offset_y
      - .offset:         88
        .size:           8
        .value_kind:     hidden_global_offset_z
      - .offset:         96
        .size:           2
        .value_kind:     hidden_grid_dims
    .group_segment_fixed_size: 0
    .kernarg_segment_align: 8
    .kernarg_segment_size: 288
    .language:       OpenCL C
    .language_version:
      - 2
      - 0
    .max_flat_workgroup_size: 1024
    .name:           _Z14transposeUni10PKdmmPd
    .private_segment_fixed_size: 0
    .sgpr_count:     18
    .sgpr_spill_count: 0
    .symbol:         _Z14transposeUni10PKdmmPd.kd
    .uniform_work_group_size: 1
    .uses_dynamic_stack: false
    .vgpr_count:     9
    .vgpr_spill_count: 0
    .wavefront_size: 32
    .workgroup_processor_mode: 1
  - .args:
      - .address_space:  global
        .offset:         0
        .size:           8
        .value_kind:     global_buffer
      - .offset:         8
        .size:           8
        .value_kind:     by_value
      - .offset:         16
        .size:           8
        .value_kind:     by_value
      - .address_space:  global
        .offset:         24
        .size:           8
        .value_kind:     global_buffer
    .group_segment_fixed_size: 0
    .kernarg_segment_align: 8
    .kernarg_segment_size: 32
    .language:       OpenCL C
    .language_version:
      - 2
      - 0
    .max_flat_workgroup_size: 1024
    .name:           _Z11transpose10PKdmmPd
    .private_segment_fixed_size: 0
    .sgpr_count:     0
    .sgpr_spill_count: 0
    .symbol:         _Z11transpose10PKdmmPd.kd
    .uniform_work_group_size: 1
    .uses_dynamic_stack: false
    .vgpr_count:     0
    .vgpr_spill_count: 0
    .wavefront_size: 32
    .workgroup_processor_mode: 1
amdhsa.target:   amdgcn-amd-amdhsa--gfx1100
amdhsa.version:
  - 1
  - 2
...

	.end_amdgpu_metadata
