//#include<stdio.h>
#include <iostream>
#include <vector>

__global__ void gaxpymm(double *y, double *a, double *b, int m, int n, int p){
	int bid = blockIdx.x;
        int tid = threadIdx.x;
	extern __shared__ double dots_s[];
	if(bid<m)
		if(tid<n){
			for(int c=0;c<p;c++)
				dots_s[bid*n*p+tid*p+c] = a[bid*n+tid] * *(b+(tid*p+c));
	__syncthreads();
	if(tid == 0){
		for(int c=0;c<p;c++)
			for(int i=1;i<n;i++){
				dots_s[bid*n*p+c] +=dots_s[bid*n*p+i*p+c];
//			printf("y=%d, dots_s=%d, bid=%d, tid=%d, i=%d, n=%d\n",dots_s[bid*n], dots_s[bid*n+i],bid,tid,i,n);
			}
		for(int c=0;c<p;c++)
			*(y+(bid*p+c))=dots_s[bid*n*p+c];
//		printf("y[%d]=%d, bid=%d, tid=%d\n",bid,y[bid],bid,tid);
		}
	}
}

std::vector<double> matrixMatrixMultiplication(double* a, double* b, int mc, int nc, int pc){
	int* m, *n, *p;
	m = &mc;
	n = &nc;
	p = &pc;
	std::vector<double> y(mc*pc,0);
	double *device_y, *device_a, *device_b;
	int *device_m, *device_n, *device_p;
	//alojando en device
	cudaMalloc((void **)&device_y, sizeof(double)*mc*pc);
	cudaMalloc((void **)&device_a, sizeof(double)*mc*nc);
	cudaMalloc((void **)&device_b, sizeof(double)*nc*pc);
	cudaMalloc((void **)&device_m, sizeof(int));
	cudaMalloc((void **)&device_n, sizeof(int));
	cudaMalloc((void **)&device_p, sizeof(int));
	//copiamos arreglos a, x a la GPU
	cudaMemcpy(device_a,a,mc*nc*sizeof(double), cudaMemcpyHostToDevice);
	cudaMemcpy(device_b,b,nc*pc*sizeof(double), cudaMemcpyHostToDevice);
	cudaMemcpy(device_y,y.data(),mc*pc*sizeof(double), cudaMemcpyHostToDevice);
	cudaMemcpy(device_m,m,sizeof(int), cudaMemcpyHostToDevice);
	cudaMemcpy(device_n,n,sizeof(int), cudaMemcpyHostToDevice);
	cudaMemcpy(device_p,p,sizeof(int), cudaMemcpyHostToDevice);
	//mandamos a llamar a suma_vect:
	gaxpymm<<<mc,nc,sizeof(double)*mc*nc*pc>>>(device_y,device_a,device_b,mc,nc,pc);
//	for(unsigned i=0; i<y.size();i++)
//		std::cout << "yi[i] = " << y[i] << "\n";
	//copia del resultado al arreglo y:
	cudaMemcpy(y.data(),device_y,mc*pc*sizeof(double),cudaMemcpyDeviceToHost);
//	for(unsigned i=0; i<y.size();i++)
//		std::cout << "yf[i] = " << y[i] << "\n";
	cudaFree(device_y);
	cudaFree(device_a);
	cudaFree(device_b);
	cudaFree(device_m);
	cudaFree(device_n);
	cudaFree(device_p);
	return y;
}


	.file	"tmpxft_0031026d_00000000-6_matrixMatrixMult.cudafe1.cpp"
	.text
#APP
	.globl _ZSt21ios_base_library_initv

#NO_APP
	.type	_ZL26__cudaUnregisterBinaryUtilv, @function
_ZL26__cudaUnregisterBinaryUtilv:
.LFB4010:
	.cfi_startproc
	endbr64
	movq	_ZL20__cudaFatCubinHandle(%rip), %rdi
	jmp	__cudaUnregisterFatBinary@PLT
	.cfi_endproc
.LFE4010:
	.size	_ZL26__cudaUnregisterBinaryUtilv, .-_ZL26__cudaUnregisterBinaryUtilv
	.globl	_Z33__device_stub__Z7gaxpymmPdS_S_iiiPdS_S_iii
	.type	_Z33__device_stub__Z7gaxpymmPdS_S_iiiPdS_S_iii, @function
_Z33__device_stub__Z7gaxpymmPdS_S_iiiPdS_S_iii:
.LFB4032:
	.cfi_startproc
	endbr64
	subq	$184, %rsp
	.cfi_def_cfa_offset 192
	movq	%rdi, 40(%rsp)
	leaq	72(%rsp), %rdi
	movq	%rsi, 32(%rsp)
	leaq	84(%rsp), %rsi
	movq	%rdx, 24(%rsp)
	leaq	56(%rsp), %rdx
	movl	%ecx, 20(%rsp)
	leaq	64(%rsp), %rcx
	movl	%r8d, 16(%rsp)
	movl	%r9d, 12(%rsp)
	movq	%fs:40, %rax
	movq	%rax, 168(%rsp)
	xorl	%eax, %eax
	leaq	40(%rsp), %rax
	movl	$1, 80(%rsp)
	movq	%rax, 120(%rsp)
	leaq	32(%rsp), %rax
	movq	%rax, 128(%rsp)
	leaq	24(%rsp), %rax
	movq	%rax, 136(%rsp)
	leaq	20(%rsp), %rax
	movq	%rax, 144(%rsp)
	leaq	16(%rsp), %rax
	movq	%rax, 152(%rsp)
	leaq	12(%rsp), %rax
	movq	%rax, 160(%rsp)
	movabsq	$4294967297, %rax
	movq	%rax, 72(%rsp)
	movq	%rax, 84(%rsp)
	movl	$1, 92(%rsp)
	call	__cudaPopCallConfiguration@PLT
	testl	%eax, %eax
	jne	.L2
	pushq	64(%rsp)
	.cfi_def_cfa_offset 200
	leaq	_Z7gaxpymmPdS_S_iii(%rip), %rdi
	pushq	64(%rsp)
	.cfi_def_cfa_offset 208
	movq	100(%rsp), %rcx
	movl	108(%rsp), %r8d
	movq	88(%rsp), %rsi
	movl	96(%rsp), %edx
	leaq	136(%rsp), %r9
	call	cudaLaunchKernel@PLT
	popq	%rax
	.cfi_def_cfa_offset 200
	popq	%rdx
	.cfi_def_cfa_offset 192
.L2:
	movq	168(%rsp), %rax
	subq	%fs:40, %rax
	je	.L4
	call	__stack_chk_fail@PLT
.L4:
	addq	$184, %rsp
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE4032:
	.size	_Z33__device_stub__Z7gaxpymmPdS_S_iiiPdS_S_iii, .-_Z33__device_stub__Z7gaxpymmPdS_S_iiiPdS_S_iii
	.globl	_Z7gaxpymmPdS_S_iii
	.type	_Z7gaxpymmPdS_S_iii, @function
_Z7gaxpymmPdS_S_iii:
.LFB4033:
	.cfi_startproc
	endbr64
	jmp	_Z33__device_stub__Z7gaxpymmPdS_S_iiiPdS_S_iii
	.cfi_endproc
.LFE4033:
	.size	_Z7gaxpymmPdS_S_iii, .-_Z7gaxpymmPdS_S_iii
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"cannot create std::vector larger than max_size()"
	.text
	.globl	_Z26matrixMatrixMultiplicationPdS_iii
	.type	_Z26matrixMatrixMultiplicationPdS_iii, @function
_Z26matrixMatrixMultiplicationPdS_iii:
.LFB3998:
	.cfi_startproc
	.cfi_personality 0x9b,DW.ref.__gxx_personality_v0
	.cfi_lsda 0x1b,.LLSDA3998
	endbr64
	pushq	%r14
	.cfi_def_cfa_offset 16
	.cfi_offset 14, -16
	movl	%ecx, %r14d
	pushq	%r13
	.cfi_def_cfa_offset 24
	.cfi_offset 13, -24
	imull	%r9d, %r14d
	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
	movslq	%r14d, %r14
	subq	$96, %rsp
	.cfi_def_cfa_offset 144
	movl	%ecx, 12(%rsp)
	movl	%r8d, 8(%rsp)
	movl	%r9d, 4(%rsp)
	movq	%fs:40, %rax
	movq	%rax, 88(%rsp)
	xorl	%eax, %eax
	movabsq	$1152921504606846975, %rax
	cmpq	%r14, %rax
	jnb	.L9
	movq	88(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L32
	leaq	.LC0(%rip), %rdi
.LEHB0:
	call	_ZSt20__throw_length_errorPKc@PLT
.L9:
	xorl	%eax, %eax
	movq	%rdi, %rbx
	movq	%rsi, %r13
	movq	%rdx, %r12
	movq	%rax, (%rdi)
	leaq	0(,%r14,8), %rbp
	movq	%rax, 8(%rdi)
	movq	%rax, 16(%rdi)
	xorl	%eax, %eax
	testq	%r14, %r14
	je	.L11
	movq	%rbp, %rdi
	call	_Znwm@PLT
.LEHE0:
.L11:
	addq	%rax, %rbp
	movq	%rax, (%rbx)
	movq	%rbp, 16(%rbx)
	testq	%r14, %r14
	je	.L12
.L13:
	cmpq	%rax, %rbp
	je	.L12
	movq	$0x000000000, (%rax)
	addq	$8, %rax
	jmp	.L13
.L12:
	movq	%rax, 8(%rbx)
	movslq	12(%rsp), %rsi
	leaq	16(%rsp), %rdi
	movslq	4(%rsp), %rax
	imulq	%rax, %rsi
	salq	$3, %rsi
.LEHB1:
	call	cudaMalloc@PLT
	movslq	12(%rsp), %rsi
	movslq	8(%rsp), %rax
	leaq	24(%rsp), %rdi
	imulq	%rax, %rsi
	salq	$3, %rsi
	call	cudaMalloc@PLT
	movslq	8(%rsp), %rsi
	movslq	4(%rsp), %rax
	leaq	32(%rsp), %rdi
	imulq	%rax, %rsi
	salq	$3, %rsi
	call	cudaMalloc@PLT
	leaq	40(%rsp), %rdi
	movl	$4, %esi
	call	cudaMalloc@PLT
	leaq	48(%rsp), %rdi
	movl	$4, %esi
	call	cudaMalloc@PLT
	leaq	56(%rsp), %rdi
	movl	$4, %esi
	call	cudaMalloc@PLT
	movl	12(%rsp), %edx
	imull	8(%rsp), %edx
	movl	$1, %ecx
	movq	%r13, %rsi
	movq	24(%rsp), %rdi
	movslq	%edx, %rdx
	salq	$3, %rdx
	call	cudaMemcpy@PLT
	movl	8(%rsp), %edx
	imull	4(%rsp), %edx
	movl	$1, %ecx
	movq	%r12, %rsi
	movq	32(%rsp), %rdi
	movslq	%edx, %rdx
	salq	$3, %rdx
	call	cudaMemcpy@PLT
	movl	12(%rsp), %edx
	imull	4(%rsp), %edx
	movl	$1, %ecx
	movq	(%rbx), %rsi
	movq	16(%rsp), %rdi
	movslq	%edx, %rdx
	salq	$3, %rdx
	call	cudaMemcpy@PLT
	movq	40(%rsp), %rdi
	leaq	12(%rsp), %rsi
	movl	$1, %ecx
	movl	$4, %edx
	call	cudaMemcpy@PLT
	movq	48(%rsp), %rdi
	leaq	8(%rsp), %rsi
	movl	$1, %ecx
	movl	$4, %edx
	call	cudaMemcpy@PLT
	movq	56(%rsp), %rdi
	leaq	4(%rsp), %rsi
	movl	$1, %ecx
	movl	$4, %edx
	call	cudaMemcpy@PLT
	movslq	8(%rsp), %rsi
	movslq	12(%rsp), %rax
	xorl	%r9d, %r9d
	movq	%rax, %rcx
	imulq	%rsi, %rax
	movq	%rsi, %rdx
	movslq	4(%rsp), %rsi
	movl	%edx, 76(%rsp)
	movabsq	$4294967297, %rdx
	movq	%rdx, 68(%rsp)
	imulq	%rsi, %rax
	movq	%rdx, 80(%rsp)
	movl	72(%rsp), %esi
	movl	%ecx, 64(%rsp)
	movq	76(%rsp), %rdx
	movl	84(%rsp), %ecx
	movq	64(%rsp), %rdi
	leaq	0(,%rax,8), %r8
	call	__cudaPushCallConfiguration@PLT
	movl	4(%rsp), %r9d
	movl	12(%rsp), %ecx
	movq	16(%rsp), %rdi
	testl	%eax, %eax
	jne	.L15
	movl	8(%rsp), %r8d
	movq	32(%rsp), %rdx
	movq	24(%rsp), %rsi
	call	_Z33__device_stub__Z7gaxpymmPdS_S_iiiPdS_S_iii
.L15:
	movl	12(%rsp), %edx
	imull	4(%rsp), %edx
	movl	$2, %ecx
	movq	16(%rsp), %rsi
	movq	(%rbx), %rdi
	movslq	%edx, %rdx
	salq	$3, %rdx
	call	cudaMemcpy@PLT
	movq	16(%rsp), %rdi
	call	cudaFree@PLT
	movq	24(%rsp), %rdi
	call	cudaFree@PLT
	movq	32(%rsp), %rdi
	call	cudaFree@PLT
	movq	40(%rsp), %rdi
	call	cudaFree@PLT
	movq	48(%rsp), %rdi
	call	cudaFree@PLT
	movq	56(%rsp), %rdi
	call	cudaFree@PLT
.LEHE1:
	jmp	.L33
.L21:
	endbr64
	movq	%rax, %rbp
.L16:
	movq	(%rbx), %rdi
	movq	16(%rbx), %rsi
	subq	%rdi, %rsi
	testq	%rdi, %rdi
	je	.L17
	call	_ZdlPvm@PLT
.L17:
	movq	88(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L32
	movq	%rbp, %rdi
.LEHB2:
	call	_Unwind_Resume@PLT
.LEHE2:
.L33:
	movq	88(%rsp), %rax
	subq	%fs:40, %rax
	je	.L19
.L32:
	call	__stack_chk_fail@PLT
.L19:
	addq	$96, %rsp
	.cfi_def_cfa_offset 48
	movq	%rbx, %rax
	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
.LFE3998:
	.globl	__gxx_personality_v0
	.section	.gcc_except_table,"a",@progbits
.LLSDA3998:
	.byte	0xff
	.byte	0xff
	.byte	0x1
	.uleb128 .LLSDACSE3998-.LLSDACSB3998
.LLSDACSB3998:
	.uleb128 .LEHB0-.LFB3998
	.uleb128 .LEHE0-.LEHB0
	.uleb128 0
	.uleb128 0
	.uleb128 .LEHB1-.LFB3998
	.uleb128 .LEHE1-.LEHB1
	.uleb128 .L21-.LFB3998
	.uleb128 0
	.uleb128 .LEHB2-.LFB3998
	.uleb128 .LEHE2-.LEHB2
	.uleb128 0
	.uleb128 0
.LLSDACSE3998:
	.text
	.size	_Z26matrixMatrixMultiplicationPdS_iii, .-_Z26matrixMatrixMultiplicationPdS_iii
	.section	.rodata.str1.1
.LC2:
	.string	"_Z7gaxpymmPdS_S_iii"
	.section	.text.startup,"ax",@progbits
	.type	_ZL24__sti____cudaRegisterAllv, @function
_ZL24__sti____cudaRegisterAllv:
.LFB4035:
	.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	.LC2(%rip), %rdx
	movq	%rax, %rdi
	leaq	_Z7gaxpymmPdS_S_iii(%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
.LFE4035:
	.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
	.hidden	DW.ref.__gxx_personality_v0
	.weak	DW.ref.__gxx_personality_v0
	.section	.data.rel.local.DW.ref.__gxx_personality_v0,"awG",@progbits,DW.ref.__gxx_personality_v0,comdat
	.align 8
	.type	DW.ref.__gxx_personality_v0, @object
	.size	DW.ref.__gxx_personality_v0, 8
DW.ref.__gxx_personality_v0:
	.quad	__gxx_personality_v0
	.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<stdio.h>

#include <hip/hip_runtime.h>
#include <iostream>
#include <vector>

__global__ void gaxpymm(double *y, double *a, double *b, int m, int n, int p){
	int bid = blockIdx.x;
        int tid = threadIdx.x;
	extern __shared__ double dots_s[];
	if(bid<m)
		if(tid<n){
			for(int c=0;c<p;c++)
				dots_s[bid*n*p+tid*p+c] = a[bid*n+tid] * *(b+(tid*p+c));
	__syncthreads();
	if(tid == 0){
		for(int c=0;c<p;c++)
			for(int i=1;i<n;i++){
				dots_s[bid*n*p+c] +=dots_s[bid*n*p+i*p+c];
//			printf("y=%d, dots_s=%d, bid=%d, tid=%d, i=%d, n=%d\n",dots_s[bid*n], dots_s[bid*n+i],bid,tid,i,n);
			}
		for(int c=0;c<p;c++)
			*(y+(bid*p+c))=dots_s[bid*n*p+c];
//		printf("y[%d]=%d, bid=%d, tid=%d\n",bid,y[bid],bid,tid);
		}
	}
}

std::vector<double> matrixMatrixMultiplication(double* a, double* b, int mc, int nc, int pc){
	int* m, *n, *p;
	m = &mc;
	n = &nc;
	p = &pc;
	std::vector<double> y(mc*pc,0);
	double *device_y, *device_a, *device_b;
	int *device_m, *device_n, *device_p;
	//alojando en device
	hipMalloc((void **)&device_y, sizeof(double)*mc*pc);
	hipMalloc((void **)&device_a, sizeof(double)*mc*nc);
	hipMalloc((void **)&device_b, sizeof(double)*nc*pc);
	hipMalloc((void **)&device_m, sizeof(int));
	hipMalloc((void **)&device_n, sizeof(int));
	hipMalloc((void **)&device_p, sizeof(int));
	//copiamos arreglos a, x a la GPU
	hipMemcpy(device_a,a,mc*nc*sizeof(double), hipMemcpyHostToDevice);
	hipMemcpy(device_b,b,nc*pc*sizeof(double), hipMemcpyHostToDevice);
	hipMemcpy(device_y,y.data(),mc*pc*sizeof(double), hipMemcpyHostToDevice);
	hipMemcpy(device_m,m,sizeof(int), hipMemcpyHostToDevice);
	hipMemcpy(device_n,n,sizeof(int), hipMemcpyHostToDevice);
	hipMemcpy(device_p,p,sizeof(int), hipMemcpyHostToDevice);
	//mandamos a llamar a suma_vect:
	gaxpymm<<<mc,nc,sizeof(double)*mc*nc*pc>>>(device_y,device_a,device_b,mc,nc,pc);
//	for(unsigned i=0; i<y.size();i++)
//		std::cout << "yi[i] = " << y[i] << "\n";
	//copia del resultado al arreglo y:
	hipMemcpy(y.data(),device_y,mc*pc*sizeof(double),hipMemcpyDeviceToHost);
//	for(unsigned i=0; i<y.size();i++)
//		std::cout << "yf[i] = " << y[i] << "\n";
	hipFree(device_y);
	hipFree(device_a);
	hipFree(device_b);
	hipFree(device_m);
	hipFree(device_n);
	hipFree(device_p);
	return y;
}


	.text
	.file	"matrixMatrixMult.hip"
                                        # Start of file scope inline assembly
	.globl	_ZSt21ios_base_library_initv

                                        # End of file scope inline assembly
	.globl	_Z22__device_stub__gaxpymmPdS_S_iii # -- Begin function _Z22__device_stub__gaxpymmPdS_S_iii
	.type	_Z22__device_stub__gaxpymmPdS_S_iii,@function
_Z22__device_stub__gaxpymmPdS_S_iii:    # @_Z22__device_stub__gaxpymmPdS_S_iii
	.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	$144, %rsp
	.cfi_def_cfa_offset 192
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r13, -32
	.cfi_offset %r14, -24
	.cfi_offset %r15, -16
	leaq	56(%rsp), %rax
	movq	%rdi, (%rax)
	leaq	48(%rsp), %rdi
	movq	%rsi, (%rdi)
	leaq	40(%rsp), %rsi
	movq	%rdx, (%rsi)
	leaq	20(%rsp), %rdx
	movl	%ecx, (%rdx)
	leaq	16(%rsp), %rcx
	movl	%r8d, (%rcx)
	leaq	12(%rsp), %r8
	movl	%r9d, (%r8)
	leaq	96(%rsp), %rbx
	movq	%rax, (%rbx)
	movq	%rdi, 8(%rbx)
	movq	%rsi, 16(%rbx)
	movq	%rdx, 24(%rbx)
	movq	%rcx, 32(%rbx)
	movq	%r8, 40(%rbx)
	leaq	80(%rsp), %r14
	leaq	64(%rsp), %r15
	leaq	32(%rsp), %r12
	leaq	24(%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	$_Z7gaxpymmPdS_S_iii, %edi
	movq	%rbx, %r9
	pushq	(%r13)
	.cfi_adjust_cfa_offset 8
	pushq	(%r12)
	.cfi_adjust_cfa_offset 8
	callq	hipLaunchKernel
	addq	$160, %rsp
	.cfi_adjust_cfa_offset -160
	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	_Z22__device_stub__gaxpymmPdS_S_iii, .Lfunc_end0-_Z22__device_stub__gaxpymmPdS_S_iii
	.cfi_endproc
                                        # -- End function
	.globl	_Z26matrixMatrixMultiplicationPdS_iii # -- Begin function _Z26matrixMatrixMultiplicationPdS_iii
	.type	_Z26matrixMatrixMultiplicationPdS_iii,@function
_Z26matrixMatrixMultiplicationPdS_iii:  # @_Z26matrixMatrixMultiplicationPdS_iii
.Lfunc_begin0:
	.cfi_startproc
	.cfi_personality 3, __gxx_personality_v0
	.cfi_lsda 3, .Lexception0
# %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	pushq	%r15
	.cfi_def_cfa_offset 24
	pushq	%r14
	.cfi_def_cfa_offset 32
	pushq	%r13
	.cfi_def_cfa_offset 40
	pushq	%r12
	.cfi_def_cfa_offset 48
	pushq	%rbx
	.cfi_def_cfa_offset 56
	subq	$104, %rsp
	.cfi_def_cfa_offset 160
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	.cfi_offset %rbp, -16
	movl	%r9d, %ebp
	movl	%r8d, %r12d
	movl	%ecx, %r15d
	movq	%rdx, 88(%rsp)                  # 8-byte Spill
	movq	%rsi, 96(%rsp)                  # 8-byte Spill
	movl	%ecx, 16(%rsp)
	movl	%r8d, 20(%rsp)
	movl	%r9d, 12(%rsp)
	movl	%r9d, %eax
	imull	%ecx, %eax
	movslq	%eax, %rsi
	leaq	24(%rsp), %rdx
	movq	$0, (%rdx)
	leaq	40(%rsp), %rcx
	movq	%rdi, 32(%rsp)                  # 8-byte Spill
	movq	%rsi, 80(%rsp)                  # 8-byte Spill
	callq	_ZNSt6vectorIdSaIdEEC2EmRKdRKS0_
	movslq	%r15d, %rbx
	shlq	$3, %rbx
	movslq	%ebp, %r14
	movq	%rbx, %rsi
	imulq	%r14, %rsi
.Ltmp0:
	leaq	24(%rsp), %rdi
	callq	hipMalloc
.Ltmp1:
# %bb.1:
	movslq	%r12d, %r13
	imulq	%r13, %rbx
.Ltmp2:
	leaq	40(%rsp), %rdi
	movq	%rbx, %rsi
	callq	hipMalloc
.Ltmp3:
# %bb.2:
	imulq	%r14, %r13
	shlq	$3, %r13
.Ltmp4:
	leaq	48(%rsp), %rdi
	movq	%r13, %rsi
	callq	hipMalloc
.Ltmp5:
# %bb.3:
.Ltmp6:
	leaq	72(%rsp), %rdi
	movl	$4, %esi
	callq	hipMalloc
.Ltmp7:
# %bb.4:
.Ltmp8:
	leaq	64(%rsp), %rdi
	movl	$4, %esi
	callq	hipMalloc
.Ltmp9:
# %bb.5:
.Ltmp10:
	leaq	56(%rsp), %rdi
	movl	$4, %esi
	callq	hipMalloc
.Ltmp11:
# %bb.6:
	movq	40(%rsp), %rdi
	imull	%r12d, %r15d
	movslq	%r15d, %rdx
	shlq	$3, %rdx
.Ltmp12:
	movq	96(%rsp), %rsi                  # 8-byte Reload
	movl	$1, %ecx
	callq	hipMemcpy
.Ltmp13:
# %bb.7:
	movq	48(%rsp), %rdi
	imull	%r12d, %ebp
	movslq	%ebp, %rdx
	shlq	$3, %rdx
.Ltmp14:
	movq	88(%rsp), %rsi                  # 8-byte Reload
	movl	$1, %ecx
	callq	hipMemcpy
.Ltmp15:
# %bb.8:
	movq	24(%rsp), %rdi
	movq	32(%rsp), %rax                  # 8-byte Reload
	movq	(%rax), %rsi
	movq	80(%rsp), %rdx                  # 8-byte Reload
	shlq	$3, %rdx
.Ltmp16:
	movl	$1, %ecx
	callq	hipMemcpy
.Ltmp17:
# %bb.9:
	movq	72(%rsp), %rdi
.Ltmp18:
	leaq	16(%rsp), %rsi
	movl	$4, %edx
	movl	$1, %ecx
	callq	hipMemcpy
.Ltmp19:
# %bb.10:
	movq	64(%rsp), %rdi
.Ltmp20:
	leaq	20(%rsp), %rsi
	movl	$4, %edx
	movl	$1, %ecx
	callq	hipMemcpy
.Ltmp21:
# %bb.11:
	movq	56(%rsp), %rdi
.Ltmp22:
	leaq	12(%rsp), %rsi
	movl	$4, %edx
	movl	$1, %ecx
	callq	hipMemcpy
.Ltmp23:
# %bb.12:
	movl	16(%rsp), %edi
	movl	20(%rsp), %edx
	movslq	%edi, %rax
	movslq	%edx, %rcx
	imulq	%rax, %rcx
	movslq	12(%rsp), %r8
	imulq	%rcx, %r8
	shlq	$3, %r8
	btsq	$32, %rdi
	btsq	$32, %rdx
.Ltmp24:
	movl	$1, %esi
	movl	$1, %ecx
	xorl	%r9d, %r9d
	callq	__hipPushCallConfiguration
.Ltmp25:
# %bb.13:
	testl	%eax, %eax
	jne	.LBB1_15
# %bb.14:
	movq	24(%rsp), %rdi
	movq	40(%rsp), %rsi
	movq	48(%rsp), %rdx
	movl	16(%rsp), %ecx
	movl	20(%rsp), %r8d
	movl	12(%rsp), %r9d
.Ltmp26:
	callq	_Z22__device_stub__gaxpymmPdS_S_iii
.Ltmp27:
.LBB1_15:
	movq	32(%rsp), %rax                  # 8-byte Reload
	movq	(%rax), %rdi
	movq	24(%rsp), %rsi
	movslq	16(%rsp), %rax
	movslq	12(%rsp), %rdx
	imulq	%rax, %rdx
	shlq	$3, %rdx
.Ltmp28:
	movl	$2, %ecx
	callq	hipMemcpy
.Ltmp29:
# %bb.16:
	movq	24(%rsp), %rdi
.Ltmp30:
	callq	hipFree
.Ltmp31:
# %bb.17:
	movq	40(%rsp), %rdi
.Ltmp32:
	callq	hipFree
.Ltmp33:
# %bb.18:
	movq	48(%rsp), %rdi
.Ltmp34:
	callq	hipFree
.Ltmp35:
# %bb.19:
	movq	72(%rsp), %rdi
.Ltmp36:
	callq	hipFree
.Ltmp37:
# %bb.20:
	movq	64(%rsp), %rdi
.Ltmp38:
	callq	hipFree
.Ltmp39:
# %bb.21:
	movq	56(%rsp), %rdi
.Ltmp40:
	callq	hipFree
.Ltmp41:
# %bb.22:
	movq	32(%rsp), %rax                  # 8-byte Reload
	addq	$104, %rsp
	.cfi_def_cfa_offset 56
	popq	%rbx
	.cfi_def_cfa_offset 48
	popq	%r12
	.cfi_def_cfa_offset 40
	popq	%r13
	.cfi_def_cfa_offset 32
	popq	%r14
	.cfi_def_cfa_offset 24
	popq	%r15
	.cfi_def_cfa_offset 16
	popq	%rbp
	.cfi_def_cfa_offset 8
	retq
.LBB1_23:
	.cfi_def_cfa_offset 160
.Ltmp42:
	movq	%rax, %rbx
	movq	32(%rsp), %rax                  # 8-byte Reload
	movq	(%rax), %rdi
	testq	%rdi, %rdi
	je	.LBB1_25
# %bb.24:
	callq	_ZdlPv
.LBB1_25:                               # %_ZNSt6vectorIdSaIdEED2Ev.exit
	movq	%rbx, %rdi
	callq	_Unwind_Resume@PLT
.Lfunc_end1:
	.size	_Z26matrixMatrixMultiplicationPdS_iii, .Lfunc_end1-_Z26matrixMatrixMultiplicationPdS_iii
	.cfi_endproc
	.section	.gcc_except_table,"a",@progbits
	.p2align	2, 0x0
GCC_except_table1:
.Lexception0:
	.byte	255                             # @LPStart Encoding = omit
	.byte	255                             # @TType Encoding = omit
	.byte	1                               # Call site Encoding = uleb128
	.uleb128 .Lcst_end0-.Lcst_begin0
.Lcst_begin0:
	.uleb128 .Lfunc_begin0-.Lfunc_begin0    # >> Call Site 1 <<
	.uleb128 .Ltmp0-.Lfunc_begin0           #   Call between .Lfunc_begin0 and .Ltmp0
	.byte	0                               #     has no landing pad
	.byte	0                               #   On action: cleanup
	.uleb128 .Ltmp0-.Lfunc_begin0           # >> Call Site 2 <<
	.uleb128 .Ltmp41-.Ltmp0                 #   Call between .Ltmp0 and .Ltmp41
	.uleb128 .Ltmp42-.Lfunc_begin0          #     jumps to .Ltmp42
	.byte	0                               #   On action: cleanup
	.uleb128 .Ltmp41-.Lfunc_begin0          # >> Call Site 3 <<
	.uleb128 .Lfunc_end1-.Ltmp41            #   Call between .Ltmp41 and .Lfunc_end1
	.byte	0                               #     has no landing pad
	.byte	0                               #   On action: cleanup
.Lcst_end0:
	.p2align	2, 0x0
                                        # -- End function
	.section	.text._ZNSt6vectorIdSaIdEEC2EmRKdRKS0_,"axG",@progbits,_ZNSt6vectorIdSaIdEEC2EmRKdRKS0_,comdat
	.weak	_ZNSt6vectorIdSaIdEEC2EmRKdRKS0_ # -- Begin function _ZNSt6vectorIdSaIdEEC2EmRKdRKS0_
	.p2align	1, 0x90
	.type	_ZNSt6vectorIdSaIdEEC2EmRKdRKS0_,@function
_ZNSt6vectorIdSaIdEEC2EmRKdRKS0_:       # @_ZNSt6vectorIdSaIdEEC2EmRKdRKS0_
	.cfi_startproc
# %bb.0:
	pushq	%r15
	.cfi_def_cfa_offset 16
	pushq	%r14
	.cfi_def_cfa_offset 24
	pushq	%r12
	.cfi_def_cfa_offset 32
	pushq	%rbx
	.cfi_def_cfa_offset 40
	pushq	%rax
	.cfi_def_cfa_offset 48
	.cfi_offset %rbx, -40
	.cfi_offset %r12, -32
	.cfi_offset %r14, -24
	.cfi_offset %r15, -16
	movq	%rsi, %rax
	shrq	$60, %rax
	jne	.LBB2_6
# %bb.1:                                # %_ZNSt6vectorIdSaIdEE17_S_check_init_lenEmRKS0_.exit
	movq	%rsi, %r14
	movq	%rdi, %rbx
	xorps	%xmm0, %xmm0
	movups	%xmm0, (%rdi)
	movq	$0, 16(%rdi)
	testq	%rsi, %rsi
	je	.LBB2_2
# %bb.3:
	movq	%rdx, %r15
	xorl	%r12d, %r12d
	movq	%rbx, %rdi
	movq	%r14, %rsi
	xorl	%edx, %edx
	callq	_ZNSt15__new_allocatorIdE8allocateEmPKv
	movq	%rax, (%rbx)
	leaq	(%rax,%r14,8), %rcx
	movq	%rcx, 16(%rbx)
	movsd	(%r15), %xmm0                   # xmm0 = mem[0],zero
	shlq	$3, %r14
.LBB2_4:                                # %.lr.ph.i.i.i.i.i.i.i.i
                                        # =>This Inner Loop Header: Depth=1
	movsd	%xmm0, (%rax,%r12)
	addq	$8, %r12
	cmpq	%r12, %r14
	jne	.LBB2_4
	jmp	.LBB2_5
.LBB2_2:                                # %_ZNSt12_Vector_baseIdSaIdEEC2EmRKS0_.exit.thread
	movups	%xmm0, (%rbx)
	movq	$0, 16(%rbx)
	xorl	%ecx, %ecx
.LBB2_5:                                # %.loopexit
	movq	%rcx, 8(%rbx)
	addq	$8, %rsp
	.cfi_def_cfa_offset 40
	popq	%rbx
	.cfi_def_cfa_offset 32
	popq	%r12
	.cfi_def_cfa_offset 24
	popq	%r14
	.cfi_def_cfa_offset 16
	popq	%r15
	.cfi_def_cfa_offset 8
	retq
.LBB2_6:
	.cfi_def_cfa_offset 48
	movl	$.L.str, %edi
	callq	_ZSt20__throw_length_errorPKc
.Lfunc_end2:
	.size	_ZNSt6vectorIdSaIdEEC2EmRKdRKS0_, .Lfunc_end2-_ZNSt6vectorIdSaIdEEC2EmRKdRKS0_
	.cfi_endproc
                                        # -- End function
	.section	.text._ZNSt15__new_allocatorIdE8allocateEmPKv,"axG",@progbits,_ZNSt15__new_allocatorIdE8allocateEmPKv,comdat
	.weak	_ZNSt15__new_allocatorIdE8allocateEmPKv # -- Begin function _ZNSt15__new_allocatorIdE8allocateEmPKv
	.p2align	1, 0x90
	.type	_ZNSt15__new_allocatorIdE8allocateEmPKv,@function
_ZNSt15__new_allocatorIdE8allocateEmPKv: # @_ZNSt15__new_allocatorIdE8allocateEmPKv
	.cfi_startproc
# %bb.0:
	pushq	%rax
	.cfi_def_cfa_offset 16
	movq	%rsi, %rax
	shrq	$60, %rax
	jne	.LBB3_1
# %bb.3:
	shlq	$3, %rsi
	movq	%rsi, %rdi
	popq	%rax
	.cfi_def_cfa_offset 8
	jmp	_Znwm                           # TAILCALL
.LBB3_1:
	.cfi_def_cfa_offset 16
	shrq	$61, %rsi
	je	.LBB3_2
# %bb.4:
	callq	_ZSt28__throw_bad_array_new_lengthv
.LBB3_2:
	callq	_ZSt17__throw_bad_allocv
.Lfunc_end3:
	.size	_ZNSt15__new_allocatorIdE8allocateEmPKv, .Lfunc_end3-_ZNSt15__new_allocatorIdE8allocateEmPKv
	.cfi_endproc
                                        # -- End function
	.text
	.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	.LBB4_2
# %bb.1:
	movl	$__hip_fatbin_wrapper, %edi
	callq	__hipRegisterFatBinary
	movq	%rax, %rdi
	movq	%rax, __hip_gpubin_handle(%rip)
.LBB4_2:
	xorps	%xmm0, %xmm0
	movups	%xmm0, 16(%rsp)
	movups	%xmm0, (%rsp)
	movl	$_Z7gaxpymmPdS_S_iii, %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_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	_Z7gaxpymmPdS_S_iii,@object     # @_Z7gaxpymmPdS_S_iii
	.section	.rodata,"a",@progbits
	.globl	_Z7gaxpymmPdS_S_iii
	.p2align	3, 0x0
_Z7gaxpymmPdS_S_iii:
	.quad	_Z22__device_stub__gaxpymmPdS_S_iii
	.size	_Z7gaxpymmPdS_S_iii, 8

	.type	.L.str,@object                  # @.str
	.section	.rodata.str1.1,"aMS",@progbits,1
.L.str:
	.asciz	"cannot create std::vector larger than max_size()"
	.size	.L.str, 49

	.type	.L__unnamed_1,@object           # @0
.L__unnamed_1:
	.asciz	"_Z7gaxpymmPdS_S_iii"
	.size	.L__unnamed_1, 20

	.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 _Z22__device_stub__gaxpymmPdS_S_iii
	.addrsig_sym __gxx_personality_v0
	.addrsig_sym __hip_module_ctor
	.addrsig_sym __hip_module_dtor
	.addrsig_sym _Unwind_Resume
	.addrsig_sym _Z7gaxpymmPdS_S_iii
	.addrsig_sym __hip_fatbin
	.addrsig_sym __hip_fatbin_wrapper
	.addrsig_sym __hip_cuid_

	.text
	.amdgcn_target "amdgcn-amd-amdhsa--gfx1100"
	.protected	_Z7gaxpymmPdS_S_iii     ; -- Begin function _Z7gaxpymmPdS_S_iii
	.globl	_Z7gaxpymmPdS_S_iii
	.p2align	8
	.type	_Z7gaxpymmPdS_S_iii,@function
_Z7gaxpymmPdS_S_iii:                    ; @_Z7gaxpymmPdS_S_iii
; %bb.0:
	s_load_b128 s[4:7], s[0:1], 0x18
	s_waitcnt lgkmcnt(0)
	v_cmp_gt_i32_e32 vcc_lo, s5, v0
	s_cmp_lt_i32 s15, s4
	s_cselect_b32 s2, -1, 0
	s_delay_alu instid0(SALU_CYCLE_1) | instskip(NEXT) | instid1(SALU_CYCLE_1)
	s_and_b32 s2, s2, vcc_lo
	s_and_saveexec_b32 s3, s2
	s_cbranch_execz .LBB0_12
; %bb.1:                                ; %.preheader60
	s_clause 0x1
	s_load_b128 s[8:11], s[0:1], 0x0
	s_load_b64 s[0:1], s[0:1], 0x10
	s_cmp_lt_i32 s6, 1
	s_cselect_b32 s2, -1, 0
	s_delay_alu instid0(SALU_CYCLE_1)
	s_and_b32 vcc_lo, exec_lo, s2
	s_cbranch_vccnz .LBB0_4
; %bb.2:                                ; %.lr.ph
	v_mad_u64_u32 v[3:4], null, s15, s5, v[0:1]
	v_mov_b32_e32 v5, 0
	s_delay_alu instid0(VALU_DEP_2) | instskip(SKIP_1) | instid1(VALU_DEP_2)
	v_ashrrev_i32_e32 v4, 31, v3
	v_mul_lo_u32 v6, s6, v3
	v_lshlrev_b64 v[1:2], 3, v[3:4]
	v_mul_lo_u32 v4, v0, s6
	s_waitcnt lgkmcnt(0)
	s_delay_alu instid0(VALU_DEP_2) | instskip(NEXT) | instid1(VALU_DEP_3)
	v_add_co_u32 v1, vcc_lo, s10, v1
	v_add_co_ci_u32_e32 v2, vcc_lo, s11, v2, vcc_lo
	s_delay_alu instid0(VALU_DEP_3)
	v_lshlrev_b64 v[3:4], 3, v[4:5]
	v_lshl_add_u32 v5, v6, 3, 0
	global_load_b64 v[1:2], v[1:2], off
	v_add_co_u32 v3, vcc_lo, s0, v3
	v_add_co_ci_u32_e32 v4, vcc_lo, s1, v4, vcc_lo
	s_mov_b32 s0, s6
.LBB0_3:                                ; =>This Inner Loop Header: Depth=1
	global_load_b64 v[6:7], v[3:4], off
	v_add_co_u32 v3, vcc_lo, v3, 8
	v_add_co_ci_u32_e32 v4, vcc_lo, 0, v4, vcc_lo
	s_add_i32 s0, s0, -1
	s_delay_alu instid0(SALU_CYCLE_1)
	s_cmp_eq_u32 s0, 0
	s_waitcnt vmcnt(0)
	v_mul_f64 v[6:7], v[1:2], v[6:7]
	ds_store_b64 v5, v[6:7]
	v_add_nc_u32_e32 v5, 8, v5
	s_cbranch_scc0 .LBB0_3
.LBB0_4:                                ; %._crit_edge
	v_cmp_eq_u32_e32 vcc_lo, 0, v0
	s_waitcnt lgkmcnt(0)
	s_xor_b32 s1, s2, -1
	s_mov_b32 s0, 0
	s_barrier
	s_and_b32 s1, vcc_lo, s1
	buffer_gl0_inv
	s_and_b32 exec_lo, exec_lo, s1
	s_cbranch_execz .LBB0_12
; %bb.5:                                ; %.preheader58.lr.ph
	s_cmp_gt_i32 s5, 1
	s_mul_i32 s2, s15, s5
	s_cselect_b32 s1, -1, 0
	s_add_i32 s3, s2, 1
	s_mul_i32 s2, s2, s6
	s_mul_i32 s3, s6, s3
	s_lshl_b32 s7, s6, 3
	s_lshl_b32 s4, s3, 3
	s_add_i32 s3, s5, -1
	s_add_i32 s4, s4, 0
.LBB0_6:                                ; %.preheader58
                                        ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_8 Depth 2
	s_and_not1_b32 vcc_lo, exec_lo, s1
	s_cbranch_vccnz .LBB0_9
; %bb.7:                                ; %.lr.ph63
                                        ;   in Loop: Header=BB0_6 Depth=1
	s_add_i32 s10, s0, s2
	s_mov_b32 s11, s3
	s_lshl_b32 s10, s10, 3
	s_delay_alu instid0(SALU_CYCLE_1) | instskip(NEXT) | instid1(SALU_CYCLE_1)
	s_add_i32 s10, s10, 0
	v_mov_b32_e32 v2, s10
	s_mov_b32 s10, s4
	ds_load_b64 v[0:1], v2
.LBB0_8:                                ;   Parent Loop BB0_6 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	v_mov_b32_e32 v3, s10
	s_add_i32 s11, s11, -1
	s_add_i32 s10, s10, s7
	s_cmp_eq_u32 s11, 0
	ds_load_b64 v[3:4], v3
	s_waitcnt lgkmcnt(0)
	v_add_f64 v[0:1], v[3:4], v[0:1]
	ds_store_b64 v2, v[0:1]
	s_cbranch_scc0 .LBB0_8
.LBB0_9:                                ; %._crit_edge64
                                        ;   in Loop: Header=BB0_6 Depth=1
	s_add_i32 s0, s0, 1
	s_add_i32 s4, s4, 8
	s_cmp_eq_u32 s0, s6
	s_cbranch_scc0 .LBB0_6
; %bb.10:                               ; %.preheader
	s_mul_i32 s0, s15, s6
	v_mov_b32_e32 v0, 0
	s_ashr_i32 s1, s0, 31
	s_mul_i32 s4, s0, s5
	s_lshl_b64 s[2:3], s[0:1], 3
	s_delay_alu instid0(SALU_CYCLE_1) | instskip(SKIP_2) | instid1(SALU_CYCLE_1)
	s_add_u32 s0, s8, s2
	s_addc_u32 s1, s9, s3
	s_lshl_b32 s2, s4, 3
	s_add_i32 s2, s2, 0
.LBB0_11:                               ; =>This Inner Loop Header: Depth=1
	s_delay_alu instid0(SALU_CYCLE_1)
	v_mov_b32_e32 v1, s2
	s_add_i32 s6, s6, -1
	ds_load_b64 v[1:2], v1
	s_waitcnt lgkmcnt(0)
	global_store_b64 v0, v[1:2], s[0:1]
	s_add_u32 s0, s0, 8
	s_addc_u32 s1, s1, 0
	s_add_i32 s2, s2, 8
	s_cmp_lg_u32 s6, 0
	s_cbranch_scc1 .LBB0_11
.LBB0_12:                               ; %.loopexit
	s_nop 0
	s_sendmsg sendmsg(MSG_DEALLOC_VGPRS)
	s_endpgm
	.section	.rodata,"a",@progbits
	.p2align	6, 0x0
	.amdhsa_kernel _Z7gaxpymmPdS_S_iii
		.amdhsa_group_segment_fixed_size 0
		.amdhsa_private_segment_fixed_size 0
		.amdhsa_kernarg_size 36
		.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 8
		.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	_Z7gaxpymmPdS_S_iii, .Lfunc_end0-_Z7gaxpymmPdS_S_iii
                                        ; -- End function
	.section	.AMDGPU.csdata,"",@progbits
; Kernel info:
; codeLenInByte = 540
; NumSgprs: 18
; NumVgprs: 8
; ScratchSize: 0
; MemoryBound: 0
; FloatMode: 240
; IeeeMode: 1
; LDSByteSize: 0 bytes/workgroup (compile time only)
; SGPRBlocks: 2
; VGPRBlocks: 0
; NumSGPRsForWavesPerEU: 18
; NumVGPRsForWavesPerEU: 8
; Occupancy: 16
; WaveLimiterHint : 0
; COMPUTE_PGM_RSRC2:SCRATCH_EN: 0
; COMPUTE_PGM_RSRC2:USER_SGPR: 15
; COMPUTE_PGM_RSRC2:TRAP_HANDLER: 0
; COMPUTE_PGM_RSRC2:TGID_X_EN: 1
; COMPUTE_PGM_RSRC2:TGID_Y_EN: 0
; COMPUTE_PGM_RSRC2:TGID_Z_EN: 0
; COMPUTE_PGM_RSRC2:TIDIG_COMP_CNT: 0
	.text
	.p2alignl 7, 3214868480
	.fill 96, 4, 3214868480
	.type	__hip_cuid_,@object             ; @__hip_cuid_
	.section	.bss,"aw",@nobits
	.globl	__hip_cuid_
__hip_cuid_:
	.byte	0                               ; 0x0
	.size	__hip_cuid_, 1

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

	.end_amdgpu_metadata
