/*
nvcc -o foo.out
*/

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

// global declarations
typedef struct {
  int width;
  int height;
  float* elements;
} Matrix;

// functions
int print_mat_by_row(const Matrix M){
  int i,j;
  int n,d;
  
  n = M.height;
  d = M.width;
  
  printf("\nprinting matrix rows -- size: %d, rank: %d\n",n,d);
  for (i=0; i<n; i++)
    {
      printf("row(%d)[",i);
      for (j=0; j<d; j++)
  	{
	  printf(" %g ",M.elements[i * M.width + j]);
	}
      printf("]\n");
    }
  printf("\n");
  return 0;
}

__global__ void matrix_multiply_kernel(Matrix A, const Matrix B, const Matrix C, int aHeight, int aWidth, int bHeight, int bWidth){
  int x,j,k;
  float p;
  x = blockIdx.x;
  
  if (x < aHeight){    
    for(j=0; j< bWidth; j++){       // the num of cols in B
      p=0;                          // reset product to 0
      for(k=0; k < aWidth; k++){    // the num of cols in  A awa num rows in B
	p+=A.elements[x * aWidth + k] * B.elements[k * bWidth + j];
      }
      C.elements[x * bWidth + j] = p;
    }
  }
}

int main (void)
{
  // allocate host variables
  Matrix A,B,C;
  A.height = 4;
  A.width = 2;
  A.elements = (float*) malloc(A.width * A.height * sizeof(float));

  B.height = 2;
  B.width = 3;
  B.elements = (float*) malloc(B.width * B.height * sizeof(float));

  C.height = A.height;
  C.width = B.width;
  C.elements = (float*) malloc(C.width * C.height * sizeof(float));

  // allocate device variables
  Matrix dev_A, dev_B, dev_C;
  cudaMalloc((void**) &dev_A.elements, A.height * A.width * sizeof(float));
  cudaMalloc((void**) &dev_B.elements, B.height * B.width * sizeof(float));
  cudaMalloc((void**) &dev_C.elements, C.height * C.width * sizeof(float));

  // populate host matrices -- in general M.elements[row * M.width + col] = value; 
  A.elements[0 * A.width + 0] = 1;
  A.elements[0 * A.width + 1] = 2;
  A.elements[1 * A.width + 0] = 3;
  A.elements[1 * A.width + 1] = 4;
  A.elements[2 * A.width + 0] = 5;
  A.elements[2 * A.width + 1] = 6;
  A.elements[3 * A.width + 0] = 7;
  A.elements[3 * A.width + 1] = 8;

  B.elements[0 * B.width + 0] = 1;
  B.elements[0 * B.width + 1] = 2;
  B.elements[0 * B.width + 2] = 3;
  B.elements[1 * B.width + 0] = 4;
  B.elements[1 * B.width + 1] = 5;
  B.elements[1 * B.width + 2] = 6;

  // print out the matrices
  print_mat_by_row(A);
  print_mat_by_row(B);
   
  // copy to device
  cudaMemcpy(dev_A.elements, A.elements, A.height * A.width * sizeof(float),cudaMemcpyHostToDevice);
  cudaMemcpy(dev_B.elements, B.elements, B.height * B.width * sizeof(float),cudaMemcpyHostToDevice);
  cudaMemcpy(dev_C.elements, C.elements, C.height * C.width * sizeof(float),cudaMemcpyHostToDevice);

  // invoke the kernel
  matrix_multiply_kernel<<<A.height,1>>>(dev_A,dev_B,dev_C, A.height, A.width, B.height, B.width);

  // Read C from device memory
  cudaMemcpy(C.elements, dev_C.elements, C.height * C.width * sizeof(float),cudaMemcpyDeviceToHost);
  print_mat_by_row(C);
    
  // free up memory
  cudaFree(dev_A.elements);
  cudaFree(dev_B.elements);
  cudaFree(dev_C.elements);

  free(A.elements);
  free(B.elements);
  free(C.elements);
  
  return 0;
}

	.file	"tmpxft_0039f290_00000000-6_CudaMatrixMultiply.cudafe1.cpp"
	.text
#APP

#NO_APP
	.type	_ZL26__cudaUnregisterBinaryUtilv, @function
_ZL26__cudaUnregisterBinaryUtilv:
.LFB2031:
	.cfi_startproc
	endbr64
	movq	_ZL20__cudaFatCubinHandle(%rip), %rdi
	jmp	__cudaUnregisterFatBinary@PLT
	.cfi_endproc
.LFE2031:
	.size	_ZL26__cudaUnregisterBinaryUtilv, .-_ZL26__cudaUnregisterBinaryUtilv
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"\nprinting matrix rows -- size: %d, rank: %d\n"
.LC1:
	.string	"row(%d)["
.LC2:
	.string	" %g "
.LC3:
	.string	"]\n"
.LC4:
	.string	"\n"
	.text
	.globl	_Z16print_mat_by_row6Matrix
	.type	_Z16print_mat_by_row6Matrix, @function
_Z16print_mat_by_row6Matrix:
.LFB2027:
	.cfi_startproc
	endbr64
	pushq	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	movq	%rdi, %rax
	movl	%edi, %ecx
	movl	%edi, %r15d
	pushq	%r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	shrq	$32, %rax
	pushq	%r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	movl	%eax, %edx
	movq	%rsi, %r13
	movl	%eax, %r14d
	pushq	%r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	leaq	.LC0(%rip), %rsi
	xorl	%eax, %eax
	xorl	%r12d, %r12d
	pushq	%rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	xorl	%ebp, %ebp
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	movq	%rdi, %rbx
	movl	$2, %edi
	subq	$24, %rsp
	.cfi_def_cfa_offset 80
	call	__printf_chk@PLT
.L3:
	cmpl	%r14d, %ebp
	jge	.L9
	movl	%ebp, %edx
	leaq	.LC1(%rip), %rsi
	movl	$2, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	movslq	%r12d, %rdx
	xorl	%ecx, %ecx
	salq	$2, %rdx
.L4:
	cmpl	%r15d, %ecx
	jge	.L10
	leaq	.LC2(%rip), %rsi
	movl	$2, %edi
	movb	$1, %al
	movl	%ecx, 12(%rsp)
	movq	%rdx, (%rsp)
	cvtss2sd	(%rdx,%r13), %xmm0
	call	__printf_chk@PLT
	movl	12(%rsp), %ecx
	movq	(%rsp), %rdx
	incl	%ecx
	addq	$4, %rdx
	jmp	.L4
.L10:
	leaq	.LC3(%rip), %rsi
	movl	$2, %edi
	xorl	%eax, %eax
	incl	%ebp
	call	__printf_chk@PLT
	addl	%ebx, %r12d
	jmp	.L3
.L9:
	leaq	.LC4(%rip), %rsi
	movl	$2, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	addq	$24, %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	_Z16print_mat_by_row6Matrix, .-_Z16print_mat_by_row6Matrix
	.globl	_Z55__device_stub__Z22matrix_multiply_kernel6MatrixS_S_iiiiR6MatrixRKS_S2_iiii
	.type	_Z55__device_stub__Z22matrix_multiply_kernel6MatrixS_S_iiiiR6MatrixRKS_S2_iiii, @function
_Z55__device_stub__Z22matrix_multiply_kernel6MatrixS_S_iiiiR6MatrixRKS_S2_iiii:
.LFB2053:
	.cfi_startproc
	endbr64
	subq	$152, %rsp
	.cfi_def_cfa_offset 160
	movl	%ecx, 12(%rsp)
	leaq	24(%rsp), %rcx
	movl	%r8d, 8(%rsp)
	movl	%r9d, 4(%rsp)
	movq	%fs:40, %rax
	movq	%rax, 136(%rsp)
	xorl	%eax, %eax
	leaq	12(%rsp), %rax
	movq	%rdi, 80(%rsp)
	leaq	32(%rsp), %rdi
	movq	%rax, 104(%rsp)
	leaq	8(%rsp), %rax
	movq	%rax, 112(%rsp)
	leaq	4(%rsp), %rax
	movq	%rax, 120(%rsp)
	leaq	160(%rsp), %rax
	movq	%rsi, 88(%rsp)
	leaq	44(%rsp), %rsi
	movq	%rdx, 96(%rsp)
	leaq	16(%rsp), %rdx
	movq	%rax, 128(%rsp)
	movabsq	$4294967297, %rax
	movq	%rax, 32(%rsp)
	movl	$1, 40(%rsp)
	movq	%rax, 44(%rsp)
	movl	$1, 52(%rsp)
	call	__cudaPopCallConfiguration@PLT
	testl	%eax, %eax
	jne	.L11
	pushq	24(%rsp)
	.cfi_def_cfa_offset 168
	leaq	_Z22matrix_multiply_kernel6MatrixS_S_iiii(%rip), %rdi
	pushq	24(%rsp)
	.cfi_def_cfa_offset 176
	movq	60(%rsp), %rcx
	movl	68(%rsp), %r8d
	movq	48(%rsp), %rsi
	movl	56(%rsp), %edx
	leaq	96(%rsp), %r9
	call	cudaLaunchKernel@PLT
	popq	%rax
	.cfi_def_cfa_offset 168
	popq	%rdx
	.cfi_def_cfa_offset 160
.L11:
	movq	136(%rsp), %rax
	subq	%fs:40, %rax
	je	.L13
	call	__stack_chk_fail@PLT
.L13:
	addq	$152, %rsp
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE2053:
	.size	_Z55__device_stub__Z22matrix_multiply_kernel6MatrixS_S_iiiiR6MatrixRKS_S2_iiii, .-_Z55__device_stub__Z22matrix_multiply_kernel6MatrixS_S_iiiiR6MatrixRKS_S2_iiii
	.globl	_Z22matrix_multiply_kernel6MatrixS_S_iiii
	.type	_Z22matrix_multiply_kernel6MatrixS_S_iiii, @function
_Z22matrix_multiply_kernel6MatrixS_S_iiii:
.LFB2054:
	.cfi_startproc
	endbr64
	subq	$56, %rsp
	.cfi_def_cfa_offset 64
	movq	%rdi, 32(%rsp)
	leaq	32(%rsp), %rdi
	movq	%rsi, 40(%rsp)
	leaq	16(%rsp), %rsi
	movq	%rdx, 16(%rsp)
	movq	%rsp, %rdx
	movq	%rcx, 24(%rsp)
	movq	%r8, (%rsp)
	movq	%r9, 8(%rsp)
	pushq	%rax
	.cfi_def_cfa_offset 72
	movl	96(%rsp), %eax
	pushq	%rax
	.cfi_def_cfa_offset 80
	movl	96(%rsp), %r9d
	movl	88(%rsp), %r8d
	movl	80(%rsp), %ecx
	call	_Z55__device_stub__Z22matrix_multiply_kernel6MatrixS_S_iiiiR6MatrixRKS_S2_iiii
	addq	$72, %rsp
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE2054:
	.size	_Z22matrix_multiply_kernel6MatrixS_S_iiii, .-_Z22matrix_multiply_kernel6MatrixS_S_iiii
	.section	.text.startup,"ax",@progbits
	.globl	main
	.type	main, @function
main:
.LFB2028:
	.cfi_startproc
	endbr64
	pushq	%r12
	.cfi_def_cfa_offset 16
	.cfi_offset 12, -16
	movl	$32, %edi
	pushq	%rbp
	.cfi_def_cfa_offset 24
	.cfi_offset 6, -24
	pushq	%rbx
	.cfi_def_cfa_offset 32
	.cfi_offset 3, -32
	addq	$-128, %rsp
	.cfi_def_cfa_offset 160
	movq	%fs:40, %rax
	movq	%rax, 120(%rsp)
	xorl	%eax, %eax
	call	malloc@PLT
	movl	$24, %edi
	movq	%rax, %rbx
	call	malloc@PLT
	movl	$48, %edi
	movq	%rax, %rbp
	call	malloc@PLT
	leaq	32(%rsp), %rdi
	movl	$32, %esi
	movq	%rax, %r12
	call	cudaMalloc@PLT
	leaq	48(%rsp), %rdi
	movl	$24, %esi
	call	cudaMalloc@PLT
	leaq	64(%rsp), %rdi
	movl	$48, %esi
	call	cudaMalloc@PLT
	movabsq	$4611686019492741120, %rcx
	movabsq	$4647714816524288000, %rdx
	movabsq	$4665729215040061440, %rax
	movabsq	$4683743613553737728, %rsi
	movq	%rcx, (%rbx)
	movabsq	$17179869186, %rdi
	movq	%rdx, 8(%rbx)
	movq	%rcx, 0(%rbp)
	movq	%rdx, 8(%rbp)
	movq	%rsi, 24(%rbx)
	movq	%rbx, %rsi
	movq	%rax, 16(%rbx)
	movq	%rax, 16(%rbp)
	call	_Z16print_mat_by_row6Matrix
	movq	%rbp, %rsi
	movabsq	$8589934595, %rdi
	call	_Z16print_mat_by_row6Matrix
	movq	32(%rsp), %rdi
	movl	$1, %ecx
	movq	%rbx, %rsi
	movl	$32, %edx
	call	cudaMemcpy@PLT
	movq	48(%rsp), %rdi
	movl	$1, %ecx
	movq	%rbp, %rsi
	movl	$24, %edx
	call	cudaMemcpy@PLT
	movq	64(%rsp), %rdi
	movl	$1, %ecx
	movq	%r12, %rsi
	movl	$48, %edx
	call	cudaMemcpy@PLT
	movl	$1073741825, %edi
	xorl	%r9d, %r9d
	xorl	%r8d, %r8d
	salq	$2, %rdi
	movl	$1, %ecx
	movl	$1, %esi
	movabsq	$4294967297, %rdx
	call	__cudaPushCallConfiguration@PLT
	testl	%eax, %eax
	jne	.L18
	movups	24(%rsp), %xmm0
	movups	40(%rsp), %xmm1
	leaq	104(%rsp), %rdx
	leaq	88(%rsp), %rsi
	movups	56(%rsp), %xmm2
	leaq	72(%rsp), %rdi
	movl	$4, %ecx
	movl	$2, %r9d
	movups	%xmm0, 72(%rsp)
	movl	$2, %r8d
	movups	%xmm1, 88(%rsp)
	movups	%xmm2, 104(%rsp)
	pushq	%rax
	.cfi_def_cfa_offset 168
	pushq	$3
	.cfi_def_cfa_offset 176
	call	_Z55__device_stub__Z22matrix_multiply_kernel6MatrixS_S_iiiiR6MatrixRKS_S2_iiii
	popq	%rdx
	.cfi_def_cfa_offset 168
	popq	%rcx
	.cfi_def_cfa_offset 160
.L18:
	movq	64(%rsp), %rsi
	movl	$2, %ecx
	movl	$48, %edx
	movq	%r12, %rdi
	call	cudaMemcpy@PLT
	movq	%r12, %rsi
	movabsq	$17179869187, %rdi
	call	_Z16print_mat_by_row6Matrix
	movq	32(%rsp), %rdi
	call	cudaFree@PLT
	movq	48(%rsp), %rdi
	call	cudaFree@PLT
	movq	64(%rsp), %rdi
	call	cudaFree@PLT
	movq	%rbx, %rdi
	call	free@PLT
	movq	%rbp, %rdi
	call	free@PLT
	movq	%r12, %rdi
	call	free@PLT
	movq	120(%rsp), %rax
	subq	%fs:40, %rax
	je	.L19
	call	__stack_chk_fail@PLT
.L19:
	subq	$-128, %rsp
	.cfi_def_cfa_offset 32
	xorl	%eax, %eax
	popq	%rbx
	.cfi_def_cfa_offset 24
	popq	%rbp
	.cfi_def_cfa_offset 16
	popq	%r12
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE2028:
	.size	main, .-main
	.section	.rodata.str1.1
.LC5:
	.string	"_Z22matrix_multiply_kernel6MatrixS_S_iiii"
	.section	.text.startup
	.type	_ZL24__sti____cudaRegisterAllv, @function
_ZL24__sti____cudaRegisterAllv:
.LFB2056:
	.cfi_startproc
	endbr64
	pushq	%rax
	.cfi_def_cfa_offset 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	.LC5(%rip), %rdx
	movq	%rax, %rdi
	leaq	_Z22matrix_multiply_kernel6MatrixS_S_iiii(%rip), %rsi
	pushq	$0
	.cfi_def_cfa_offset 40
	movq	%rdx, %rcx
	pushq	$0
	.cfi_def_cfa_offset 48
	movq	%rax, _ZL20__cudaFatCubinHandle(%rip)
	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	%rdx
	.cfi_def_cfa_offset 8
	jmp	atexit@PLT
	.cfi_endproc
.LFE2056:
	.size	_ZL24__sti____cudaRegisterAllv, .-_ZL24__sti____cudaRegisterAllv
	.section	.init_array,"aw"
	.align 8
	.quad	_ZL24__sti____cudaRegisterAllv
	.section	.nvFatBinSegment,"aw"
	.align 8
	.type	_ZL15__fatDeviceText, @object
	.size	_ZL15__fatDeviceText, 24
_ZL15__fatDeviceText:
	.long	1180844977
	.long	1
	.quad	fatbinData
	.quad	0
	.local	_ZL20__cudaFatCubinHandle
	.comm	_ZL20__cudaFatCubinHandle,8,8
	.ident	"GCC: (Ubuntu 13.3.0-6ubuntu2~24.04) 13.3.0"
	.section	.note.GNU-stack,"",@progbits
	.section	.note.gnu.property,"a"
	.align 8
	.long	1f - 0f
	.long	4f - 1f
	.long	5
0:
	.string	"GNU"
1:
	.align 8
	.long	0xc0000002
	.long	3f - 2f
2:
	.long	0x3
3:
	.align 8
4:

/*
nvcc -o foo.out
*/


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

// global declarations
typedef struct {
  int width;
  int height;
  float* elements;
} Matrix;

// functions
int print_mat_by_row(const Matrix M){
  int i,j;
  int n,d;
  
  n = M.height;
  d = M.width;
  
  printf("\nprinting matrix rows -- size: %d, rank: %d\n",n,d);
  for (i=0; i<n; i++)
    {
      printf("row(%d)[",i);
      for (j=0; j<d; j++)
  	{
	  printf(" %g ",M.elements[i * M.width + j]);
	}
      printf("]\n");
    }
  printf("\n");
  return 0;
}

__global__ void matrix_multiply_kernel(Matrix A, const Matrix B, const Matrix C, int aHeight, int aWidth, int bHeight, int bWidth){
  int x,j,k;
  float p;
  x = blockIdx.x;
  
  if (x < aHeight){    
    for(j=0; j< bWidth; j++){       // the num of cols in B
      p=0;                          // reset product to 0
      for(k=0; k < aWidth; k++){    // the num of cols in  A awa num rows in B
	p+=A.elements[x * aWidth + k] * B.elements[k * bWidth + j];
      }
      C.elements[x * bWidth + j] = p;
    }
  }
}

int main (void)
{
  // allocate host variables
  Matrix A,B,C;
  A.height = 4;
  A.width = 2;
  A.elements = (float*) malloc(A.width * A.height * sizeof(float));

  B.height = 2;
  B.width = 3;
  B.elements = (float*) malloc(B.width * B.height * sizeof(float));

  C.height = A.height;
  C.width = B.width;
  C.elements = (float*) malloc(C.width * C.height * sizeof(float));

  // allocate device variables
  Matrix dev_A, dev_B, dev_C;
  hipMalloc((void**) &dev_A.elements, A.height * A.width * sizeof(float));
  hipMalloc((void**) &dev_B.elements, B.height * B.width * sizeof(float));
  hipMalloc((void**) &dev_C.elements, C.height * C.width * sizeof(float));

  // populate host matrices -- in general M.elements[row * M.width + col] = value; 
  A.elements[0 * A.width + 0] = 1;
  A.elements[0 * A.width + 1] = 2;
  A.elements[1 * A.width + 0] = 3;
  A.elements[1 * A.width + 1] = 4;
  A.elements[2 * A.width + 0] = 5;
  A.elements[2 * A.width + 1] = 6;
  A.elements[3 * A.width + 0] = 7;
  A.elements[3 * A.width + 1] = 8;

  B.elements[0 * B.width + 0] = 1;
  B.elements[0 * B.width + 1] = 2;
  B.elements[0 * B.width + 2] = 3;
  B.elements[1 * B.width + 0] = 4;
  B.elements[1 * B.width + 1] = 5;
  B.elements[1 * B.width + 2] = 6;

  // print out the matrices
  print_mat_by_row(A);
  print_mat_by_row(B);
   
  // copy to device
  hipMemcpy(dev_A.elements, A.elements, A.height * A.width * sizeof(float),hipMemcpyHostToDevice);
  hipMemcpy(dev_B.elements, B.elements, B.height * B.width * sizeof(float),hipMemcpyHostToDevice);
  hipMemcpy(dev_C.elements, C.elements, C.height * C.width * sizeof(float),hipMemcpyHostToDevice);

  // invoke the kernel
  matrix_multiply_kernel<<<A.height,1>>>(dev_A,dev_B,dev_C, A.height, A.width, B.height, B.width);

  // Read C from device memory
  hipMemcpy(C.elements, dev_C.elements, C.height * C.width * sizeof(float),hipMemcpyDeviceToHost);
  print_mat_by_row(C);
    
  // free up memory
  hipFree(dev_A.elements);
  hipFree(dev_B.elements);
  hipFree(dev_C.elements);

  free(A.elements);
  free(B.elements);
  free(C.elements);
  
  return 0;
}

	.text
	.file	"CudaMatrixMultiply.hip"
	.globl	_Z16print_mat_by_row6Matrix     # -- Begin function _Z16print_mat_by_row6Matrix
	.type	_Z16print_mat_by_row6Matrix,@function
_Z16print_mat_by_row6Matrix:            # @_Z16print_mat_by_row6Matrix
	.cfi_startproc
# %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	pushq	%r15
	.cfi_def_cfa_offset 24
	pushq	%r14
	.cfi_def_cfa_offset 32
	pushq	%r13
	.cfi_def_cfa_offset 40
	pushq	%r12
	.cfi_def_cfa_offset 48
	pushq	%rbx
	.cfi_def_cfa_offset 56
	subq	$24, %rsp
	.cfi_def_cfa_offset 80
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	.cfi_offset %rbp, -16
	movq	%rsi, 8(%rsp)                   # 8-byte Spill
	movq	%rdi, %r14
	movq	%rdi, %rbx
	shrq	$32, %rbx
	movl	$.L.str, %edi
	movl	%ebx, %esi
	movl	%r14d, %edx
	xorl	%eax, %eax
	callq	printf
	movq	%rbx, 16(%rsp)                  # 8-byte Spill
	testl	%ebx, %ebx
	jle	.LBB0_6
# %bb.1:                                # %.lr.ph16
	movl	%r14d, %r13d
	xorl	%ebp, %ebp
	xorl	%r12d, %r12d
.LBB0_2:                                # =>This Loop Header: Depth=1
                                        #     Child Loop BB0_4 Depth 2
	movl	$.L.str.1, %edi
	movl	%r12d, %esi
	xorl	%eax, %eax
	callq	printf
	testl	%r14d, %r14d
	jle	.LBB0_5
# %bb.3:                                # %.lr.ph
                                        #   in Loop: Header=BB0_2 Depth=1
	movl	%ebp, %eax
	movq	8(%rsp), %rcx                   # 8-byte Reload
	leaq	(%rcx,%rax,4), %rbx
	xorl	%r15d, %r15d
.LBB0_4:                                #   Parent Loop BB0_2 Depth=1
                                        # =>  This Inner Loop Header: Depth=2
	xorps	%xmm0, %xmm0
	cvtss2sd	(%rbx,%r15,4), %xmm0
	movl	$.L.str.2, %edi
	movb	$1, %al
	callq	printf
	incq	%r15
	cmpq	%r15, %r13
	jne	.LBB0_4
.LBB0_5:                                # %._crit_edge
                                        #   in Loop: Header=BB0_2 Depth=1
	movl	$.Lstr, %edi
	callq	puts@PLT
	incq	%r12
	addl	%r14d, %ebp
	cmpq	16(%rsp), %r12                  # 8-byte Folded Reload
	jne	.LBB0_2
.LBB0_6:                                # %._crit_edge17
	movl	$10, %edi
	callq	putchar@PLT
	xorl	%eax, %eax
	addq	$24, %rsp
	.cfi_def_cfa_offset 56
	popq	%rbx
	.cfi_def_cfa_offset 48
	popq	%r12
	.cfi_def_cfa_offset 40
	popq	%r13
	.cfi_def_cfa_offset 32
	popq	%r14
	.cfi_def_cfa_offset 24
	popq	%r15
	.cfi_def_cfa_offset 16
	popq	%rbp
	.cfi_def_cfa_offset 8
	retq
.Lfunc_end0:
	.size	_Z16print_mat_by_row6Matrix, .Lfunc_end0-_Z16print_mat_by_row6Matrix
	.cfi_endproc
                                        # -- End function
	.globl	_Z37__device_stub__matrix_multiply_kernel6MatrixS_S_iiii # -- Begin function _Z37__device_stub__matrix_multiply_kernel6MatrixS_S_iiii
	.type	_Z37__device_stub__matrix_multiply_kernel6MatrixS_S_iiii,@function
_Z37__device_stub__matrix_multiply_kernel6MatrixS_S_iiii: # @_Z37__device_stub__matrix_multiply_kernel6MatrixS_S_iiii
	.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	$160, %rsp
	.cfi_def_cfa_offset 208
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r13, -32
	.cfi_offset %r14, -24
	.cfi_offset %r15, -16
	leaq	80(%rsp), %rax
	movq	%rdi, (%rax)
	movq	%rsi, 8(%rax)
	leaq	64(%rsp), %rsi
	movq	%rdx, (%rsi)
	movq	%rcx, 8(%rsi)
	leaq	48(%rsp), %rcx
	movq	%r8, (%rcx)
	movq	%r9, 8(%rcx)
	leaq	96(%rsp), %rbx
	movq	%rax, (%rbx)
	movq	%rsi, 8(%rbx)
	movq	%rcx, 16(%rbx)
	leaq	208(%rsp), %rax
	movq	%rax, 24(%rbx)
	leaq	216(%rsp), %rax
	movq	%rax, 32(%rbx)
	leaq	224(%rsp), %rax
	movq	%rax, 40(%rbx)
	leaq	232(%rsp), %rax
	movq	%rax, 48(%rbx)
	leaq	32(%rsp), %r14
	leaq	16(%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	$_Z22matrix_multiply_kernel6MatrixS_S_iiii, %edi
	movq	%rbx, %r9
	pushq	(%r13)
	.cfi_adjust_cfa_offset 8
	pushq	(%r12)
	.cfi_adjust_cfa_offset 8
	callq	hipLaunchKernel
	addq	$176, %rsp
	.cfi_adjust_cfa_offset -176
	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	_Z37__device_stub__matrix_multiply_kernel6MatrixS_S_iiii, .Lfunc_end1-_Z37__device_stub__matrix_multiply_kernel6MatrixS_S_iiii
	.cfi_endproc
                                        # -- End function
	.section	.rodata.cst16,"aM",@progbits,16
	.p2align	4, 0x0                          # -- Begin function main
.LCPI2_0:
	.long	0x3f800000                      # float 1
	.long	0x40000000                      # float 2
	.long	0x40400000                      # float 3
	.long	0x40800000                      # float 4
.LCPI2_1:
	.long	0x40a00000                      # float 5
	.long	0x40c00000                      # float 6
	.long	0x40e00000                      # float 7
	.long	0x41000000                      # float 8
	.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
	movabsq	$17179869186, %r12              # imm = 0x400000002
	movl	$32, %edi
	callq	malloc
	movq	%rax, %rbx
	movl	$24, %edi
	callq	malloc
	movq	%rax, %r14
	movl	$48, %edi
	callq	malloc
	movq	%rax, %r15
	leaq	48(%rsp), %r13
	movl	$32, %esi
	movq	%r13, %rdi
	callq	hipMalloc
	leaq	32(%rsp), %rbp
	movl	$24, %esi
	movq	%rbp, %rdi
	callq	hipMalloc
	leaq	16(%rsp), %rdi
	movl	$48, %esi
	callq	hipMalloc
	movaps	.LCPI2_0(%rip), %xmm0           # xmm0 = [1.0E+0,2.0E+0,3.0E+0,4.0E+0]
	movups	%xmm0, (%rbx)
	movaps	.LCPI2_1(%rip), %xmm1           # xmm1 = [5.0E+0,6.0E+0,7.0E+0,8.0E+0]
	movups	%xmm1, 16(%rbx)
	movups	%xmm0, (%r14)
	movabsq	$4665729215040061440, %rax      # imm = 0x40C0000040A00000
	movq	%rax, 16(%r14)
	movq	%r12, %rdi
	movq	%rbx, %rsi
	callq	_Z16print_mat_by_row6Matrix
	movabsq	$8589934595, %rdi               # imm = 0x200000003
	movq	%r14, %rsi
	callq	_Z16print_mat_by_row6Matrix
	movq	(%r13), %rdi
	movl	$32, %edx
	movq	%rbx, %rsi
	movl	$1, %ecx
	callq	hipMemcpy
	movq	(%rbp), %rdi
	movl	$24, %edx
	movq	%r14, %rsi
	movl	$1, %ecx
	callq	hipMemcpy
	leaq	16(%rsp), %rax
	movq	(%rax), %rdi
	movl	$48, %edx
	movq	%r15, %rsi
	movl	$1, %ecx
	callq	hipMemcpy
	movabsq	$4294967297, %rdx               # imm = 0x100000001
	leaq	3(%rdx), %rdi
	movl	$1, %esi
	movl	$1, %ecx
	xorl	%r8d, %r8d
	xorl	%r9d, %r9d
	callq	__hipPushCallConfiguration
	testl	%eax, %eax
	jne	.LBB2_2
# %bb.1:
	movq	40(%rsp), %rdi
	movq	48(%rsp), %rsi
	movq	24(%rsp), %rdx
	movq	32(%rsp), %rcx
	movq	8(%rsp), %r8
	movq	16(%rsp), %r9
	movl	$2, %eax
	pushq	$3
	.cfi_adjust_cfa_offset 8
	pushq	%rax
	.cfi_adjust_cfa_offset 8
	pushq	%rax
	.cfi_adjust_cfa_offset 8
	pushq	$4
	.cfi_adjust_cfa_offset 8
	callq	_Z37__device_stub__matrix_multiply_kernel6MatrixS_S_iiii
	addq	$32, %rsp
	.cfi_adjust_cfa_offset -32
.LBB2_2:
	movq	16(%rsp), %rsi
	movl	$48, %edx
	movq	%r15, %rdi
	movl	$2, %ecx
	callq	hipMemcpy
	incq	%r12
	movq	%r12, %rdi
	movq	%r15, %rsi
	callq	_Z16print_mat_by_row6Matrix
	movq	48(%rsp), %rdi
	callq	hipFree
	movq	32(%rsp), %rdi
	callq	hipFree
	movq	16(%rsp), %rdi
	callq	hipFree
	movq	%rbx, %rdi
	callq	free
	movq	%r14, %rdi
	callq	free
	movq	%r15, %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
.Lfunc_end2:
	.size	main, .Lfunc_end2-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:
	subq	$40, %rsp
	.cfi_def_cfa_offset 48
	movq	__hip_gpubin_handle(%rip), %rdi
	testq	%rdi, %rdi
	jne	.LBB3_2
# %bb.1:
	movl	$__hip_fatbin_wrapper, %edi
	callq	__hipRegisterFatBinary
	movq	%rax, %rdi
	movq	%rax, __hip_gpubin_handle(%rip)
.LBB3_2:
	xorps	%xmm0, %xmm0
	movups	%xmm0, 16(%rsp)
	movups	%xmm0, (%rsp)
	movl	$_Z22matrix_multiply_kernel6MatrixS_S_iiii, %esi
	movl	$.L__unnamed_1, %edx
	movl	$.L__unnamed_1, %ecx
	movl	$-1, %r8d
	xorl	%r9d, %r9d
	callq	__hipRegisterFunction
	movl	$__hip_module_dtor, %edi
	addq	$40, %rsp
	.cfi_def_cfa_offset 8
	jmp	atexit                          # TAILCALL
.Lfunc_end3:
	.size	__hip_module_ctor, .Lfunc_end3-__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	.LBB4_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
.LBB4_2:
	retq
.Lfunc_end4:
	.size	__hip_module_dtor, .Lfunc_end4-__hip_module_dtor
	.cfi_endproc
                                        # -- End function
	.type	.L.str,@object                  # @.str
	.section	.rodata.str1.1,"aMS",@progbits,1
.L.str:
	.asciz	"\nprinting matrix rows -- size: %d, rank: %d\n"
	.size	.L.str, 45

	.type	.L.str.1,@object                # @.str.1
.L.str.1:
	.asciz	"row(%d)["
	.size	.L.str.1, 9

	.type	.L.str.2,@object                # @.str.2
.L.str.2:
	.asciz	" %g "
	.size	.L.str.2, 5

	.type	_Z22matrix_multiply_kernel6MatrixS_S_iiii,@object # @_Z22matrix_multiply_kernel6MatrixS_S_iiii
	.section	.rodata,"a",@progbits
	.globl	_Z22matrix_multiply_kernel6MatrixS_S_iiii
	.p2align	3, 0x0
_Z22matrix_multiply_kernel6MatrixS_S_iiii:
	.quad	_Z37__device_stub__matrix_multiply_kernel6MatrixS_S_iiii
	.size	_Z22matrix_multiply_kernel6MatrixS_S_iiii, 8

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

	.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

	.type	.Lstr,@object                   # @str
	.section	.rodata.str1.1,"aMS",@progbits,1
.Lstr:
	.asciz	"]"
	.size	.Lstr, 2

	.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 _Z37__device_stub__matrix_multiply_kernel6MatrixS_S_iiii
	.addrsig_sym __hip_module_ctor
	.addrsig_sym __hip_module_dtor
	.addrsig_sym _Z22matrix_multiply_kernel6MatrixS_S_iiii
	.addrsig_sym __hip_fatbin
	.addrsig_sym __hip_fatbin_wrapper
	.addrsig_sym __hip_cuid_

	.text
	.amdgcn_target "amdgcn-amd-amdhsa--gfx1100"
	.protected	_Z22matrix_multiply_kernel6MatrixS_S_iiii ; -- Begin function _Z22matrix_multiply_kernel6MatrixS_S_iiii
	.globl	_Z22matrix_multiply_kernel6MatrixS_S_iiii
	.p2align	8
	.type	_Z22matrix_multiply_kernel6MatrixS_S_iiii,@function
_Z22matrix_multiply_kernel6MatrixS_S_iiii: ; @_Z22matrix_multiply_kernel6MatrixS_S_iiii
; %bb.0:
	s_clause 0x1
	s_load_b64 s[2:3], s[0:1], 0x30
	s_load_b32 s4, s[0:1], 0x3c
	s_waitcnt lgkmcnt(0)
	s_cmp_ge_i32 s15, s2
	s_cselect_b32 s2, -1, 0
	s_cmp_lt_i32 s4, 1
	s_cselect_b32 s5, -1, 0
	s_delay_alu instid0(SALU_CYCLE_1) | instskip(NEXT) | instid1(SALU_CYCLE_1)
	s_or_b32 s2, s2, s5
	s_and_b32 vcc_lo, exec_lo, s2
	s_cbranch_vccnz .LBB0_6
; %bb.1:                                ; %.preheader.lr.ph
	s_clause 0x2
	s_load_b64 s[12:13], s[0:1], 0x8
	s_load_b64 s[6:7], s[0:1], 0x18
	s_load_b64 s[8:9], s[0:1], 0x28
	s_cmp_gt_i32 s3, 0
	s_mul_i32 s10, s15, s3
	s_cselect_b32 s0, -1, 0
	s_ashr_i32 s11, s10, 31
	v_cndmask_b32_e64 v0, 0, 1, s0
	s_ashr_i32 s5, s4, 31
	s_mul_i32 s2, s15, s4
	s_lshl_b64 s[14:15], s[10:11], 2
	s_lshl_b64 s[10:11], s[4:5], 2
	v_cmp_ne_u32_e64 s0, 1, v0
	v_mov_b32_e32 v0, 0
	s_mov_b32 s1, 0
	s_waitcnt lgkmcnt(0)
	s_add_u32 s12, s12, s14
	s_addc_u32 s13, s13, s15
.LBB0_2:                                ; %.preheader
                                        ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_4 Depth 2
	v_mov_b32_e32 v1, 0
	s_and_b32 vcc_lo, exec_lo, s0
	s_cbranch_vccnz .LBB0_5
; %bb.3:                                ; %.lr.ph.preheader
                                        ;   in Loop: Header=BB0_2 Depth=1
	v_mov_b32_e32 v1, 0
	s_mov_b64 s[14:15], s[12:13]
	s_mov_b64 s[16:17], s[6:7]
	s_mov_b32 s5, s3
.LBB0_4:                                ; %.lr.ph
                                        ;   Parent Loop BB0_2 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	s_clause 0x1
	global_load_b32 v2, v0, s[14:15]
	global_load_b32 v3, v0, s[16:17]
	s_add_i32 s5, s5, -1
	s_add_u32 s16, s16, s10
	s_addc_u32 s17, s17, s11
	s_add_u32 s14, s14, 4
	s_addc_u32 s15, s15, 0
	s_cmp_lg_u32 s5, 0
	s_waitcnt vmcnt(0)
	v_fmac_f32_e32 v1, v2, v3
	s_cbranch_scc1 .LBB0_4
.LBB0_5:                                ; %._crit_edge
                                        ;   in Loop: Header=BB0_2 Depth=1
	s_add_i32 s14, s1, s2
	s_delay_alu instid0(SALU_CYCLE_1) | instskip(NEXT) | instid1(SALU_CYCLE_1)
	s_ashr_i32 s15, s14, 31
	s_lshl_b64 s[14:15], s[14:15], 2
	s_delay_alu instid0(SALU_CYCLE_1)
	s_add_u32 s14, s8, s14
	s_addc_u32 s15, s9, s15
	s_add_i32 s1, s1, 1
	s_add_u32 s6, s6, 4
	s_addc_u32 s7, s7, 0
	s_cmp_lg_u32 s1, s4
	global_store_b32 v0, v1, s[14:15]
	s_cbranch_scc1 .LBB0_2
.LBB0_6:                                ; %.loopexit
	s_nop 0
	s_sendmsg sendmsg(MSG_DEALLOC_VGPRS)
	s_endpgm
	.section	.rodata,"a",@progbits
	.p2align	6, 0x0
	.amdhsa_kernel _Z22matrix_multiply_kernel6MatrixS_S_iiii
		.amdhsa_group_segment_fixed_size 0
		.amdhsa_private_segment_fixed_size 0
		.amdhsa_kernarg_size 64
		.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 18
		.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	_Z22matrix_multiply_kernel6MatrixS_S_iiii, .Lfunc_end0-_Z22matrix_multiply_kernel6MatrixS_S_iiii
                                        ; -- End function
	.section	.AMDGPU.csdata,"",@progbits
; Kernel info:
; codeLenInByte = 304
; NumSgprs: 20
; NumVgprs: 4
; ScratchSize: 0
; MemoryBound: 0
; FloatMode: 240
; IeeeMode: 1
; LDSByteSize: 0 bytes/workgroup (compile time only)
; SGPRBlocks: 2
; VGPRBlocks: 0
; NumSGPRsForWavesPerEU: 20
; 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
	.p2alignl 7, 3214868480
	.fill 96, 4, 3214868480
	.type	__hip_cuid_,@object             ; @__hip_cuid_
	.section	.bss,"aw",@nobits
	.globl	__hip_cuid_
__hip_cuid_:
	.byte	0                               ; 0x0
	.size	__hip_cuid_, 1

	.ident	"AMD clang version 18.0.0git (https://github.com/RadeonOpenCompute/llvm-project roc-6.3.2 25012 e5bf7e55c91490b07c49d8960fa7983d864936c4)"
	.section	".note.GNU-stack","",@progbits
	.addrsig
	.addrsig_sym __hip_cuid_
	.amdgpu_metadata
---
amdhsa.kernels:
  - .args:
      - .offset:         0
        .size:           16
        .value_kind:     by_value
      - .offset:         16
        .size:           16
        .value_kind:     by_value
      - .offset:         32
        .size:           16
        .value_kind:     by_value
      - .offset:         48
        .size:           4
        .value_kind:     by_value
      - .offset:         52
        .size:           4
        .value_kind:     by_value
      - .offset:         56
        .size:           4
        .value_kind:     by_value
      - .offset:         60
        .size:           4
        .value_kind:     by_value
    .group_segment_fixed_size: 0
    .kernarg_segment_align: 8
    .kernarg_segment_size: 64
    .language:       OpenCL C
    .language_version:
      - 2
      - 0
    .max_flat_workgroup_size: 1024
    .name:           _Z22matrix_multiply_kernel6MatrixS_S_iiii
    .private_segment_fixed_size: 0
    .sgpr_count:     20
    .sgpr_spill_count: 0
    .symbol:         _Z22matrix_multiply_kernel6MatrixS_S_iiii.kd
    .uniform_work_group_size: 1
    .uses_dynamic_stack: false
    .vgpr_count:     4
    .vgpr_spill_count: 0
    .wavefront_size: 32
    .workgroup_processor_mode: 1
amdhsa.target:   amdgcn-amd-amdhsa--gfx1100
amdhsa.version:
  - 1
  - 2
...

	.end_amdgpu_metadata
