
/************************************************
 * Simple CUDA example to transfer data CPU-GPU *
 ************************************************/

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

#define CUDA_SAFE_CALL( call ) {                                         \
 cudaError_t err = call;                                                 \
 if( cudaSuccess != err ) {                                              \
   fprintf(stderr,"CUDA: error occurred in cuda routine. Exiting...\n"); \
   exit(err);                                                            \
 } }

#define	A(i,j)		A[ (j) + ((i)*(n)) ]
#define	B(i,j) 		B[ (j) + ((i)*(n)) ]

int main( int argc, char *argv[] ) {
  unsigned int m, n;
  unsigned int i, j;

  /* Generating input data */
  if( argc<3 ) {
    printf("Usage: %s rows cols \n",argv[0]);
    exit(-1);
  }
  sscanf(argv[1],"%d",&m);
  sscanf(argv[2],"%d",&n);

  /* STEP 1: Allocate memory for three m-by-n matrices called A and B in the host */
  float *A, *B, *C;
  A = (float*) malloc( m*n*sizeof(float) );
  C = (float*) malloc( m*n*sizeof(float) );
  B = (float*) malloc( m*n*sizeof(float) );

  for(int i=0;i<m;i++){
    for(int j=0;j<n;j++){
      A(i,j) = ( 2.0f * (float) rand() / 1.0f ) - 1.0f;
    }
  }

  /* STEP 2: Fill matrices A and B with real values between -1.0 and 1.0 */
  float *d_A, *d_B, *d_C;

  cudaEvent_t start, stop;
  float elapsedTime;

  CUDA_SAFE_CALL( cudaEventCreate(&start) );
  CUDA_SAFE_CALL( cudaEventRecord(start,0) );

  /* STEP 3: Allocate memory for three m-by-n matrices into the device memory */
  CUDA_SAFE_CALL( cudaMalloc( (void**) &d_A, m*n*sizeof(float) ) );
  CUDA_SAFE_CALL( cudaMalloc( (void**) &d_B, m*n*sizeof(float) ) );
  CUDA_SAFE_CALL( cudaMalloc( (void**) &d_C, m*n*sizeof(float) ) );
  
  /* STEP 4: Copy host memory (only matrices A and B) to the device memory (matrices d_A and d_B) */
  CUDA_SAFE_CALL( cudaMemcpy(d_A, A, m*n*sizeof(float), cudaMemcpyHostToDevice) );
  CUDA_SAFE_CALL( cudaMemcpy(d_B, B, m*n*sizeof(float), cudaMemcpyHostToDevice) );


  /* STEP 5: Copy back from device memory into the host memory only data cohrresponding to matrix C (d_C) */
  CUDA_SAFE_CALL( cudaMemcpy(C, d_C, m*n*sizeof(float), cudaMemcpyDeviceToHost) );

  /* STEP 6: Deallocate device memory */
  CUDA_SAFE_CALL( cudaFree(d_A) );
  CUDA_SAFE_CALL( cudaFree(d_B) );
  CUDA_SAFE_CALL( cudaFree(d_C) );

    
  CUDA_SAFE_CALL( cudaEventCreate(&stop) );
  CUDA_SAFE_CALL( cudaEventRecord(stop,0) );
  CUDA_SAFE_CALL( cudaEventSynchronize(stop) );
  CUDA_SAFE_CALL( cudaEventElapsedTime(&elapsedTime, start,stop); );

  printf("Time: %f\n", elapsedTime);

  /* STEP 7: Deallocate host memory */
  free(A);
  free(B);
  free(C);
}


	.file	"tmpxft_003baa76_00000000-6_TimingExample.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
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"Usage: %s rows cols \n"
.LC1:
	.string	"%d"
.LC3:
	.string	"CUDA: error occurred in cuda routine. Exiting...\n"
.LC4:
	.string	"Time: %f\n"
	.section	.text.startup,"ax",@progbits
	.globl	main
	.type	main, @function
main:
.LFB2027:
	.cfi_startproc
	endbr64
	pushq	%r14
	.cfi_def_cfa_offset 16
	.cfi_offset 14, -16
	pushq	%r13
	.cfi_def_cfa_offset 24
	.cfi_offset 13, -24
	pushq	%r12
	.cfi_def_cfa_offset 32
	.cfi_offset 12, -32
	pushq	%rbp
	.cfi_def_cfa_offset 40
	.cfi_offset 6, -40
	pushq	%rbx
	.cfi_def_cfa_offset 48
	.cfi_offset 3, -48
	movq	%rsi, %rbx
	subq	$64, %rsp
	.cfi_def_cfa_offset 112
	movq	%fs:40, %rax
	movq	%rax, 56(%rsp)
	xorl	%eax, %eax
	cmpl	$2, %edi
	jg	.L3
	movq	(%rsi), %rdx
	movl	$2, %edi
	leaq	.LC0(%rip), %rsi
	call	__printf_chk@PLT
	orl	$-1, %edi
	jmp	.L25
.L3:
	movq	8(%rsi), %rdi
	leaq	.LC1(%rip), %rbp
	xorl	%eax, %eax
	xorl	%r13d, %r13d
	movq	%rbp, %rsi
	leaq	4(%rsp), %rdx
	call	__isoc23_sscanf@PLT
	movq	16(%rbx), %rdi
	movq	%rbp, %rsi
	xorl	%eax, %eax
	leaq	8(%rsp), %rdx
	call	__isoc23_sscanf@PLT
	movl	4(%rsp), %ebx
	imull	8(%rsp), %ebx
	salq	$2, %rbx
	movq	%rbx, %rdi
	call	malloc@PLT
	movq	%rbx, %rdi
	movq	%rax, %rbp
	call	malloc@PLT
	movq	%rbx, %rdi
	movq	%rax, %r12
	call	malloc@PLT
	movq	%rax, %rbx
.L4:
	cmpl	4(%rsp), %r13d
	jnb	.L28
	xorl	%r14d, %r14d
.L6:
	cmpl	8(%rsp), %r14d
	jnb	.L29
	call	rand@PLT
	movl	%eax, %edx
	movl	8(%rsp), %eax
	cvtsi2ssl	%edx, %xmm0
	imull	%r13d, %eax
	addss	%xmm0, %xmm0
	subss	.LC2(%rip), %xmm0
	addl	%r14d, %eax
	incl	%r14d
	movl	%eax, %eax
	movss	%xmm0, 0(%rbp,%rax,4)
	jmp	.L6
.L29:
	incl	%r13d
	jmp	.L4
.L28:
	leaq	40(%rsp), %rdi
	call	cudaEventCreate@PLT
	movl	%eax, %r13d
	testl	%eax, %eax
	je	.L7
.L26:
	movq	stderr(%rip), %rdi
	leaq	.LC3(%rip), %rdx
	movl	$2, %esi
	xorl	%eax, %eax
	call	__fprintf_chk@PLT
	movl	%r13d, %edi
.L25:
	call	exit@PLT
.L7:
	movq	40(%rsp), %rdi
	xorl	%esi, %esi
	call	cudaEventRecord@PLT
	movl	%eax, %r13d
	testl	%eax, %eax
	jne	.L26
	movl	4(%rsp), %esi
	imull	8(%rsp), %esi
	leaq	16(%rsp), %rdi
	salq	$2, %rsi
	call	cudaMalloc@PLT
	movl	%eax, %r13d
	testl	%eax, %eax
	jne	.L26
	movl	4(%rsp), %esi
	imull	8(%rsp), %esi
	leaq	24(%rsp), %rdi
	salq	$2, %rsi
	call	cudaMalloc@PLT
	movl	%eax, %r13d
	testl	%eax, %eax
	jne	.L26
	movl	4(%rsp), %esi
	imull	8(%rsp), %esi
	leaq	32(%rsp), %rdi
	salq	$2, %rsi
	call	cudaMalloc@PLT
	movl	%eax, %r13d
	testl	%eax, %eax
	jne	.L26
	movl	4(%rsp), %edx
	imull	8(%rsp), %edx
	movl	$1, %ecx
	movq	%rbp, %rsi
	movq	16(%rsp), %rdi
	salq	$2, %rdx
	call	cudaMemcpy@PLT
	movl	%eax, %r13d
	testl	%eax, %eax
	jne	.L26
	movl	4(%rsp), %edx
	imull	8(%rsp), %edx
	movl	$1, %ecx
	movq	%rbx, %rsi
	movq	24(%rsp), %rdi
	salq	$2, %rdx
	call	cudaMemcpy@PLT
	movl	%eax, %r13d
	testl	%eax, %eax
	jne	.L26
	movl	4(%rsp), %edx
	imull	8(%rsp), %edx
	movl	$2, %ecx
	movq	%r12, %rdi
	movq	32(%rsp), %rsi
	salq	$2, %rdx
	call	cudaMemcpy@PLT
	movl	%eax, %r13d
	testl	%eax, %eax
	jne	.L26
	movq	16(%rsp), %rdi
	call	cudaFree@PLT
	movl	%eax, %r13d
	testl	%eax, %eax
	jne	.L26
	movq	24(%rsp), %rdi
	call	cudaFree@PLT
	movl	%eax, %r13d
	testl	%eax, %eax
	jne	.L26
	movq	32(%rsp), %rdi
	call	cudaFree@PLT
	movl	%eax, %r13d
	testl	%eax, %eax
	jne	.L26
	leaq	48(%rsp), %rdi
	call	cudaEventCreate@PLT
	movl	%eax, %r13d
	testl	%eax, %eax
	jne	.L26
	movq	48(%rsp), %rdi
	xorl	%esi, %esi
	call	cudaEventRecord@PLT
	movl	%eax, %r13d
	testl	%eax, %eax
	jne	.L26
	movq	48(%rsp), %rdi
	call	cudaEventSynchronize@PLT
	movl	%eax, %r13d
	testl	%eax, %eax
	jne	.L26
	movq	48(%rsp), %rdx
	movq	40(%rsp), %rsi
	leaq	12(%rsp), %rdi
	call	cudaEventElapsedTime@PLT
	movl	%eax, %r13d
	testl	%eax, %eax
	jne	.L26
	leaq	.LC4(%rip), %rsi
	movl	$2, %edi
	movb	$1, %al
	cvtss2sd	12(%rsp), %xmm0
	call	__printf_chk@PLT
	movq	%rbp, %rdi
	call	free@PLT
	movq	%rbx, %rdi
	call	free@PLT
	movq	%r12, %rdi
	call	free@PLT
	movq	56(%rsp), %rax
	subq	%fs:40, %rax
	je	.L22
	call	__stack_chk_fail@PLT
.L22:
	addq	$64, %rsp
	.cfi_def_cfa_offset 48
	xorl	%eax, %eax
	popq	%rbx
	.cfi_def_cfa_offset 40
	popq	%rbp
	.cfi_def_cfa_offset 32
	popq	%r12
	.cfi_def_cfa_offset 24
	popq	%r13
	.cfi_def_cfa_offset 16
	popq	%r14
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE2027:
	.size	main, .-main
	.type	_ZL24__sti____cudaRegisterAllv, @function
_ZL24__sti____cudaRegisterAllv:
.LFB2053:
	.cfi_startproc
	endbr64
	pushq	%rax
	.cfi_def_cfa_offset 16
	leaq	_ZL15__fatDeviceText(%rip), %rdi
	call	__cudaRegisterFatBinary@PLT
	movq	%rax, %rdi
	movq	%rax, _ZL20__cudaFatCubinHandle(%rip)
	call	__cudaRegisterFatBinaryEnd@PLT
	leaq	_ZL26__cudaUnregisterBinaryUtilv(%rip), %rdi
	popq	%rdx
	.cfi_def_cfa_offset 8
	jmp	atexit@PLT
	.cfi_endproc
.LFE2053:
	.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
.LC2:
	.long	1065353216
	.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:


/************************************************
 * Simple CUDA example to transfer data CPU-GPU *
 ************************************************/


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

#define CUDA_SAFE_CALL( call ) {                                         \
 hipError_t err = call;                                                 \
 if( hipSuccess != err ) {                                              \
   fprintf(stderr,"CUDA: error occurred in cuda routine. Exiting...\n"); \
   exit(err);                                                            \
 } }

#define	A(i,j)		A[ (j) + ((i)*(n)) ]
#define	B(i,j) 		B[ (j) + ((i)*(n)) ]

int main( int argc, char *argv[] ) {
  unsigned int m, n;
  unsigned int i, j;

  /* Generating input data */
  if( argc<3 ) {
    printf("Usage: %s rows cols \n",argv[0]);
    exit(-1);
  }
  sscanf(argv[1],"%d",&m);
  sscanf(argv[2],"%d",&n);

  /* STEP 1: Allocate memory for three m-by-n matrices called A and B in the host */
  float *A, *B, *C;
  A = (float*) malloc( m*n*sizeof(float) );
  C = (float*) malloc( m*n*sizeof(float) );
  B = (float*) malloc( m*n*sizeof(float) );

  for(int i=0;i<m;i++){
    for(int j=0;j<n;j++){
      A(i,j) = ( 2.0f * (float) rand() / 1.0f ) - 1.0f;
    }
  }

  /* STEP 2: Fill matrices A and B with real values between -1.0 and 1.0 */
  float *d_A, *d_B, *d_C;

  hipEvent_t start, stop;
  float elapsedTime;

  CUDA_SAFE_CALL( hipEventCreate(&start) );
  CUDA_SAFE_CALL( hipEventRecord(start,0) );

  /* STEP 3: Allocate memory for three m-by-n matrices into the device memory */
  CUDA_SAFE_CALL( hipMalloc( (void**) &d_A, m*n*sizeof(float) ) );
  CUDA_SAFE_CALL( hipMalloc( (void**) &d_B, m*n*sizeof(float) ) );
  CUDA_SAFE_CALL( hipMalloc( (void**) &d_C, m*n*sizeof(float) ) );
  
  /* STEP 4: Copy host memory (only matrices A and B) to the device memory (matrices d_A and d_B) */
  CUDA_SAFE_CALL( hipMemcpy(d_A, A, m*n*sizeof(float), hipMemcpyHostToDevice) );
  CUDA_SAFE_CALL( hipMemcpy(d_B, B, m*n*sizeof(float), hipMemcpyHostToDevice) );


  /* STEP 5: Copy back from device memory into the host memory only data cohrresponding to matrix C (d_C) */
  CUDA_SAFE_CALL( hipMemcpy(C, d_C, m*n*sizeof(float), hipMemcpyDeviceToHost) );

  /* STEP 6: Deallocate device memory */
  CUDA_SAFE_CALL( hipFree(d_A) );
  CUDA_SAFE_CALL( hipFree(d_B) );
  CUDA_SAFE_CALL( hipFree(d_C) );

    
  CUDA_SAFE_CALL( hipEventCreate(&stop) );
  CUDA_SAFE_CALL( hipEventRecord(stop,0) );
  CUDA_SAFE_CALL( hipEventSynchronize(stop) );
  CUDA_SAFE_CALL( hipEventElapsedTime(&elapsedTime, start,stop); );

  printf("Time: %f\n", elapsedTime);

  /* STEP 7: Deallocate host memory */
  free(A);
  free(B);
  free(C);
}


	.text
	.file	"TimingExample.hip"
	.section	.rodata.cst4,"aM",@progbits,4
	.p2align	2, 0x0                          # -- Begin function main
.LCPI0_0:
	.long	0xbf800000                      # float -1
	.text
	.globl	main
	.type	main,@function
main:                                   # @main
	.cfi_startproc
# %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	pushq	%r15
	.cfi_def_cfa_offset 24
	pushq	%r14
	.cfi_def_cfa_offset 32
	pushq	%r13
	.cfi_def_cfa_offset 40
	pushq	%r12
	.cfi_def_cfa_offset 48
	pushq	%rbx
	.cfi_def_cfa_offset 56
	subq	$56, %rsp
	.cfi_def_cfa_offset 112
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	.cfi_offset %rbp, -16
	movq	%rsi, %rbx
	cmpl	$2, %edi
	jle	.LBB0_25
# %bb.1:
	movq	8(%rbx), %rdi
	xorl	%ebp, %ebp
	leaq	4(%rsp), %r14
	movl	$.L.str.1, %esi
	movq	%r14, %rdx
	xorl	%eax, %eax
	callq	__isoc23_sscanf
	movq	16(%rbx), %rdi
	movq	%rsp, %rbx
	movl	$.L.str.1, %esi
	movq	%rbx, %rdx
	xorl	%eax, %eax
	callq	__isoc23_sscanf
	movl	(%r14), %r13d
	movl	(%rbx), %r12d
	movl	%r12d, %r15d
	imull	%r13d, %r15d
	shlq	$2, %r15
	movq	%r15, %rdi
	callq	malloc
	movq	%rax, %r14
	movq	%r15, %rdi
	callq	malloc
	movq	%rax, %rbx
	movq	%r15, %rdi
	callq	malloc
	movq	%rax, %r15
	testl	%r13d, %r13d
	je	.LBB0_6
.LBB0_2:                                # %.preheader
                                        # =>This Loop Header: Depth=1
                                        #     Child Loop BB0_9 Depth 2
	testl	%r12d, %r12d
	je	.LBB0_3
# %bb.8:                                # %.lr.ph.preheader
                                        #   in Loop: Header=BB0_2 Depth=1
	xorl	%r13d, %r13d
.LBB0_9:                                # %.lr.ph
                                        #   Parent Loop BB0_2 Depth=1
                                        # =>  This Inner Loop Header: Depth=2
	callq	rand
	movss	.LCPI0_0(%rip), %xmm1           # xmm1 = mem[0],zero,zero,zero
	xorps	%xmm0, %xmm0
	cvtsi2ss	%eax, %xmm0
	addss	%xmm0, %xmm0
	addss	%xmm1, %xmm0
	movl	(%rsp), %r12d
	movl	%ebp, %eax
	imull	%r12d, %eax
	addl	%r13d, %eax
	movss	%xmm0, (%r14,%rax,4)
	incl	%r13d
	cmpl	%r12d, %r13d
	jb	.LBB0_9
# %bb.4:                                # %._crit_edge.loopexit
                                        #   in Loop: Header=BB0_2 Depth=1
	movl	4(%rsp), %r13d
	jmp	.LBB0_5
.LBB0_3:                                #   in Loop: Header=BB0_2 Depth=1
	xorl	%r12d, %r12d
.LBB0_5:                                # %._crit_edge
                                        #   in Loop: Header=BB0_2 Depth=1
	incl	%ebp
	cmpl	%r13d, %ebp
	jb	.LBB0_2
.LBB0_6:                                # %._crit_edge79
	leaq	24(%rsp), %rdi
	callq	hipEventCreate
	testl	%eax, %eax
	jne	.LBB0_7
# %bb.10:
	movq	24(%rsp), %rdi
	xorl	%esi, %esi
	callq	hipEventRecord
	testl	%eax, %eax
	jne	.LBB0_7
# %bb.11:
	movl	(%rsp), %esi
	imull	4(%rsp), %esi
	shlq	$2, %rsi
	leaq	48(%rsp), %rdi
	callq	hipMalloc
	testl	%eax, %eax
	jne	.LBB0_7
# %bb.12:
	movl	(%rsp), %esi
	imull	4(%rsp), %esi
	shlq	$2, %rsi
	leaq	40(%rsp), %rdi
	callq	hipMalloc
	testl	%eax, %eax
	jne	.LBB0_7
# %bb.13:
	movl	(%rsp), %esi
	imull	4(%rsp), %esi
	shlq	$2, %rsi
	leaq	32(%rsp), %rdi
	callq	hipMalloc
	testl	%eax, %eax
	jne	.LBB0_7
# %bb.14:
	movq	48(%rsp), %rdi
	movl	(%rsp), %edx
	imull	4(%rsp), %edx
	shlq	$2, %rdx
	movq	%r14, %rsi
	movl	$1, %ecx
	callq	hipMemcpy
	testl	%eax, %eax
	jne	.LBB0_7
# %bb.15:
	movq	40(%rsp), %rdi
	movl	(%rsp), %edx
	imull	4(%rsp), %edx
	shlq	$2, %rdx
	movq	%r15, %rsi
	movl	$1, %ecx
	callq	hipMemcpy
	testl	%eax, %eax
	jne	.LBB0_7
# %bb.16:
	movq	32(%rsp), %rsi
	movl	(%rsp), %edx
	imull	4(%rsp), %edx
	shlq	$2, %rdx
	movq	%rbx, %rdi
	movl	$2, %ecx
	callq	hipMemcpy
	testl	%eax, %eax
	jne	.LBB0_7
# %bb.17:
	movq	48(%rsp), %rdi
	callq	hipFree
	testl	%eax, %eax
	jne	.LBB0_7
# %bb.18:
	movq	40(%rsp), %rdi
	callq	hipFree
	testl	%eax, %eax
	jne	.LBB0_7
# %bb.19:
	movq	32(%rsp), %rdi
	callq	hipFree
	testl	%eax, %eax
	jne	.LBB0_7
# %bb.20:
	leaq	8(%rsp), %rdi
	callq	hipEventCreate
	testl	%eax, %eax
	jne	.LBB0_7
# %bb.21:
	movq	8(%rsp), %rdi
	xorl	%esi, %esi
	callq	hipEventRecord
	testl	%eax, %eax
	jne	.LBB0_7
# %bb.22:
	movq	8(%rsp), %rdi
	callq	hipEventSynchronize
	testl	%eax, %eax
	jne	.LBB0_7
# %bb.23:
	movq	24(%rsp), %rsi
	movq	8(%rsp), %rdx
	leaq	20(%rsp), %rdi
	callq	hipEventElapsedTime
	testl	%eax, %eax
	jne	.LBB0_7
# %bb.24:
	cvtss2sd	20(%rsp), %xmm0
	movl	$.L.str.3, %edi
	movb	$1, %al
	callq	printf
	movq	%r14, %rdi
	callq	free
	movq	%r15, %rdi
	callq	free
	movq	%rbx, %rdi
	callq	free
	xorl	%eax, %eax
	addq	$56, %rsp
	.cfi_def_cfa_offset 56
	popq	%rbx
	.cfi_def_cfa_offset 48
	popq	%r12
	.cfi_def_cfa_offset 40
	popq	%r13
	.cfi_def_cfa_offset 32
	popq	%r14
	.cfi_def_cfa_offset 24
	popq	%r15
	.cfi_def_cfa_offset 16
	popq	%rbp
	.cfi_def_cfa_offset 8
	retq
.LBB0_7:
	.cfi_def_cfa_offset 112
	movl	%eax, %ebp
	movq	stderr(%rip), %rcx
	movl	$.L.str.2, %edi
	movl	$49, %esi
	movl	$1, %edx
	callq	fwrite@PLT
	movl	%ebp, %edi
	callq	exit
.LBB0_25:
	movq	(%rbx), %rsi
	movl	$.L.str, %edi
	xorl	%eax, %eax
	callq	printf
	movl	$-1, %edi
	callq	exit
.Lfunc_end0:
	.size	main, .Lfunc_end0-main
	.cfi_endproc
                                        # -- End function
	.type	.L.str,@object                  # @.str
	.section	.rodata.str1.1,"aMS",@progbits,1
.L.str:
	.asciz	"Usage: %s rows cols \n"
	.size	.L.str, 22

	.type	.L.str.1,@object                # @.str.1
.L.str.1:
	.asciz	"%d"
	.size	.L.str.1, 3

	.type	.L.str.2,@object                # @.str.2
.L.str.2:
	.asciz	"CUDA: error occurred in cuda routine. Exiting...\n"
	.size	.L.str.2, 50

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

	.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 __hip_cuid_

	.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_
	.amdgcn_target "amdgcn-amd-amdhsa--gfx1100"
	.amdgpu_metadata
---
amdhsa.kernels:  []
amdhsa.target:   amdgcn-amd-amdhsa--gfx1100
amdhsa.version:
  - 1
  - 2
...

	.end_amdgpu_metadata
