#include <stdio.h>
#include <iostream>
#include <string.h>
/***DEFINING THE DEFINES FOR THE ARRAY INDICES****************************/
//#define N 1
#define C 384
#define H 15
#define W 15
#define R 3
#define S 3
#define M 384
#define E 13
#define F 13
#define U 1
using namespace std;
int main(int argc, char* argv[])
{
int batch_size = atoi(argv[1]);
/*************INITALIZING MATRICES*********************************/
float IP[batch_size][C][H][W];
float OP[batch_size][M][F][E];
float WT[M][C][R][S];
int a,b,c,d;
/*INITIALIZING WEIGHT MATRIX*/
for(a=0; a<M; a++){
	for (b=0; b<C; b++){
		for (c=0; c<R; c++){
			for(d=0; d<S; d++){
				WT[a][b][c][d] = (float)rand()/(float)(RAND_MAX+1.0);
}
}	
}
}
printf("hello after weight\n");
/*INITIALIZING OUTPUT MATRIX*/
for(a=0; a<batch_size; a++){
	for (b=0; b<M; b++){
		for (c=0; c<F; c++){
			for(d=0; d<E; d++){
				OP[a][b][c][d] = 0;
}
}	
}
}
printf("hello after op init\n");
/*INITIALIZING INPUT MATRIX*/
for(a=0; a<batch_size; a++){
	for (b=0; b<C; b++){
		for (c=0; c<H; c++){
			for(d=0; d<W; d++){
				if((c==0)||(d==0)||(c==14)||(d==14))
				IP[a][b][c][d] = 0;//zero padding to eliminate spurious values along the edges to align stride and filter boundary properly with image boundary
				else
				IP[a][b][c][d] = (float)rand()/(float)(RAND_MAX+1.0);;
}
}	
}
}
printf("hello after ininting input mat\n");
/***NAIVE 7 LAYER LOOP IMPLEMENTATION***/
int n,m,x,y,i,j,k;
for(n=0; n<batch_size; n++){
	for (m=0; m<M; m++){
		for (x=0; x<F; x++){
			for(y=0; y<E; y++){
				OP[n][m][x][y] = 0; // adding bias to output
				for (i=0; i<R; i++){
					for (j=0; j<S; j++){
						for(k=0; k<C; k++){
							OP[n][m][x][y] += IP[n][k][U*x+i][U*y+j]*WT[m][k][i][j];
							}
						}
					}
                 /*****ACTIVATION FUNCTION-RELU*******/
if(OP[n][m][x][y] < 0) 
	OP[n][m][x][y] = 0;

					}
				}	
			}
		}
/**print outputs**/
string filename ="layer_4_"+to_string(batch_size);
FILE *fp=fopen(filename.c_str(),"w+");

int e,f,g,h;
for(e=0; e<batch_size; e++){
	for (f=0; f<M; f++){
		for (g=0; g<F; g++){
			for(h=0; h<E; h++){
				//printf("the output is %f for index %d,%d,%d,%d.\n",OP[e][f][g][h], e,f,g,h);
				//fprintf(fp,"%f,%d,%d,%d,%d.\n",OP[e][f][g][h], e,f,g,h);
				fprintf(fp,"%f\n",OP[e][f][g][h]);


}
}	
}
}
fclose(fp);
return 0;
}



	.file	"tmpxft_003a9968_00000000-6_0-cnn_4th_layer_cpu.cudafe1.cpp"
	.text
#APP
	.globl _ZSt21ios_base_library_initv

#NO_APP
	.type	_ZL26__cudaUnregisterBinaryUtilv, @function
_ZL26__cudaUnregisterBinaryUtilv:
.LFB3638:
	.cfi_startproc
	endbr64
	movq	_ZL20__cudaFatCubinHandle(%rip), %rdi
	jmp	__cudaUnregisterFatBinary@PLT
	.cfi_endproc
.LFE3638:
	.size	_ZL26__cudaUnregisterBinaryUtilv, .-_ZL26__cudaUnregisterBinaryUtilv
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC2:
	.string	"hello after weight\n"
.LC3:
	.string	"hello after op init\n"
.LC4:
	.string	"hello after ininting input mat\n"
.LC6:
	.string	"layer_4_"
.LC7:
	.string	"w+"
.LC8:
	.string	"%f\n"
.LC5:
	.string	"00010203040506070809101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899"
	.section	.text.startup,"ax",@progbits
	.globl	main
	.type	main, @function
main:
.LFB3635:
	.cfi_startproc
	.cfi_personality 0x9b,DW.ref.__gxx_personality_v0
	.cfi_lsda 0x1b,.LLSDA3635
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	pushq	%r15
	pushq	%r14
	pushq	%r13
	pushq	%r12
	pushq	%rbx
	leaq	-5308416(%rsp), %r11
.LPSRL0:
	subq	$4096, %rsp
	orq	$0, (%rsp)
	cmpq	%r11, %rsp
	jne	.LPSRL0
	subq	$392, %rsp
	.cfi_offset 15, -24
	.cfi_offset 14, -32
	.cfi_offset 13, -40
	.cfi_offset 12, -48
	.cfi_offset 3, -56
	movq	8(%rsi), %rdi
	movq	%fs:40, %rax
	movq	%rax, -56(%rbp)
	xorl	%eax, %eax
	call	atoi@PLT
	movq	%rsp, %rcx
	movl	%eax, -5308756(%rbp)
	cltq
	imulq	$345600, %rax, %rdx
	movq	%rdx, %rsi
	andq	$-4096, %rsi
	subq	%rsi, %rcx
.L3:
	cmpq	%rcx, %rsp
	je	.L4
	subq	$4096, %rsp
	orq	$0, 4088(%rsp)
	jmp	.L3
.L4:
	andl	$4095, %edx
	subq	%rdx, %rsp
	testq	%rdx, %rdx
	je	.L5
	orq	$0, -8(%rsp,%rdx)
.L5:
	imulq	$259584, %rax, %rax
	movq	%rsp, -5308800(%rbp)
	movq	%rsp, %rdx
	movq	%rax, %rcx
	andq	$-4096, %rcx
	subq	%rcx, %rdx
.L6:
	cmpq	%rdx, %rsp
	je	.L7
	subq	$4096, %rsp
	orq	$0, 4088(%rsp)
	jmp	.L6
.L7:
	andl	$4095, %eax
	subq	%rax, %rsp
	testq	%rax, %rax
	je	.L8
	orq	$0, -8(%rsp,%rax)
.L8:
	movq	%rsp, -5308768(%rbp)
	xorl	%ebx, %ebx
.L9:
	leaq	-5308676(%rbp), %rax
	xorl	%r12d, %r12d
	movq	%rax, -5308792(%rbp)
	leaq	(%rax,%rbx), %rdx
.L15:
	leaq	(%rdx,%r12), %r15
	movl	$3, %r14d
.L13:
	xorl	%r13d, %r13d
.L10:
	movq	%rdx, -5308776(%rbp)
	call	rand@PLT
	movq	-5308776(%rbp), %rdx
	cvtsi2ssl	%eax, %xmm0
	mulss	.LC1(%rip), %xmm0
	movss	%xmm0, (%r15,%r13,4)
	incq	%r13
	cmpq	$3, %r13
	jne	.L10
	addq	$12, %r15
	decl	%r14d
	jne	.L13
	addq	$36, %r12
	cmpq	$13824, %r12
	jne	.L15
	addq	$13824, %rbx
	cmpq	$5308416, %rbx
	jne	.L9
	leaq	.LC2(%rip), %rsi
	movl	$2, %edi
	xorl	%eax, %eax
.LEHB0:
	call	__printf_chk@PLT
	movq	-5308768(%rbp), %r8
	xorl	%esi, %esi
	xorl	%eax, %eax
.L16:
	cmpl	%esi, -5308756(%rbp)
	jle	.L84
	movq	%r8, %rdx
	movl	$384, %r9d
.L17:
	movq	%rdx, %rdi
	movl	$169, %ecx
	addq	$676, %rdx
	rep stosl
	decl	%r9d
	jne	.L17
	incq	%rsi
	addq	$259584, %r8
	jmp	.L16
.L84:
	leaq	.LC3(%rip), %rsi
	xorl	%eax, %eax
	xorl	%r15d, %r15d
	xorl	%r14d, %r14d
	movl	$2, %edi
	movl	$16385, %ebx
	call	__printf_chk@PLT
.L18:
	movl	-5308756(%rbp), %eax
	cmpl	%eax, %r14d
	jge	.L85
	movq	-5308800(%rbp), %rax
	xorl	%r13d, %r13d
	leaq	(%rax,%r15), %rdi
.L24:
	leaq	(%rdi,%r13), %rdx
	xorl	%r12d, %r12d
.L23:
	movl	%r12d, %ecx
	movq	%rbx, %rax
	shrq	%cl, %rax
	xorl	%ecx, %ecx
	movq	%rax, -5308776(%rbp)
.L20:
	movq	-5308776(%rbp), %rsi
	movq	%rbx, %rax
	xorps	%xmm0, %xmm0
	shrq	%cl, %rax
	orq	%rsi, %rax
	testb	$1, %al
	jne	.L19
	movq	%rdi, -5308816(%rbp)
	movq	%rdx, -5308808(%rbp)
	movq	%rcx, -5308784(%rbp)
	call	rand@PLT
	movq	-5308816(%rbp), %rdi
	movq	-5308808(%rbp), %rdx
	cvtsi2ssl	%eax, %xmm0
	mulss	.LC1(%rip), %xmm0
	movq	-5308784(%rbp), %rcx
.L19:
	movss	%xmm0, (%rdx,%rcx,4)
	incq	%rcx
	cmpq	$15, %rcx
	jne	.L20
	incl	%r12d
	addq	$60, %rdx
	cmpl	$15, %r12d
	jne	.L23
	addq	$900, %r13
	cmpq	$345600, %r13
	jne	.L24
	incl	%r14d
	addq	$345600, %r15
	jmp	.L18
.L85:
	leaq	.LC4(%rip), %rsi
	movl	$2, %edi
	xorl	%eax, %eax
	xorl	%ebx, %ebx
	call	__printf_chk@PLT
.LEHE0:
	xorl	%r14d, %r14d
	xorl	%r11d, %r11d
	xorps	%xmm2, %xmm2
.L25:
	movl	-5308756(%rbp), %eax
	cmpl	%eax, %r11d
	jge	.L86
	xorl	%eax, %eax
	xorl	%esi, %esi
	movq	%rax, -5308784(%rbp)
	movq	-5308768(%rbp), %rax
	addq	%r14, %rax
	movq	%rax, -5308840(%rbp)
.L37:
	movq	-5308840(%rbp), %rax
	movq	%rbx, -5308776(%rbp)
	xorl	%r15d, %r15d
	leaq	(%rax,%rsi), %rdi
.L36:
	movq	%rdi, %rdx
	xorl	%eax, %eax
.L33:
	movq	-5308800(%rbp), %rcx
	movq	-5308784(%rbp), %r8
	xorps	%xmm0, %xmm0
	movl	$3, -5308808(%rbp)
	movq	-5308776(%rbp), %r10
	leaq	(%rcx,%rax,4), %rcx
	movq	%rcx, -5308832(%rbp)
.L26:
	movq	-5308832(%rbp), %rcx
	leaq	(%rcx,%r10,4), %r9
	movq	-5308792(%rbp), %rcx
	leaq	(%rcx,%r8,4), %rcx
	movq	%rcx, -5308824(%rbp)
	xorl	%ecx, %ecx
.L30:
	movq	-5308824(%rbp), %r12
	movl	$384, -5308816(%rbp)
	leaq	(%rcx,%r12), %r13
	movq	%r9, %r12
.L27:
	movss	(%r12), %xmm1
	mulss	0(%r13), %xmm1
	addq	$36, %r13
	addq	$900, %r12
	decl	-5308816(%rbp)
	addss	%xmm1, %xmm0
	jne	.L27
	addq	$4, %rcx
	addq	$4, %r9
	cmpq	$12, %rcx
	jne	.L30
	addq	$15, %r10
	addq	$3, %r8
	decl	-5308808(%rbp)
	jne	.L26
	comiss	%xmm0, %xmm2
	ja	.L31
	movss	%xmm0, (%rdx)
	jmp	.L32
.L31:
	movl	$0x00000000, (%rdx)
.L32:
	incq	%rax
	addq	$4, %rdx
	cmpq	$13, %rax
	jne	.L33
	incq	%r15
	addq	$15, -5308776(%rbp)
	addq	$52, %rdi
	cmpq	$13, %r15
	jne	.L36
	addq	$676, %rsi
	addq	$3456, -5308784(%rbp)
	cmpq	$259584, %rsi
	jne	.L37
	incl	%r11d
	addq	$86400, %rbx
	addq	$259584, %r14
	jmp	.L25
.L86:
	movl	%eax, %r14d
	movl	%eax, %ebx
	movl	$1, %r13d
	movl	$10000, %ecx
	shrl	$31, %r14d
	negl	%ebx
	cmovs	%eax, %ebx
	movl	%ebx, %eax
.L43:
	cmpl	$9, %eax
	jbe	.L39
	cmpl	$99, %eax
	ja	.L40
	incl	%r13d
	jmp	.L39
.L40:
	cmpl	$999, %eax
	ja	.L41
	addl	$2, %r13d
	jmp	.L39
.L41:
	cmpl	$9999, %eax
	ja	.L42
	addl	$3, %r13d
	jmp	.L39
.L42:
	movl	%eax, %eax
	xorl	%edx, %edx
	addl	$4, %r13d
	divq	%rcx
	jmp	.L43
.L39:
	leaq	-5308712(%rbp), %r12
	leal	(%r14,%r13), %esi
	movl	$45, %edx
	decl	%r13d
	leaq	-5308696(%rbp), %rax
	movq	%r12, %rdi
	movq	%rax, -5308712(%rbp)
	call	_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructEmc@PLT
	movzbl	%r14b, %r8d
	movl	$201, %ecx
	leaq	-257(%rbp), %rdi
	leaq	.LC5(%rip), %rsi
	addq	-5308712(%rbp), %r8
	rep movsb
	movl	$100, %ecx
.L44:
	cmpl	$99, %ebx
	jbe	.L87
	movl	%ebx, %eax
	xorl	%edx, %edx
	movl	%r13d, %esi
	divl	%ecx
	addl	%edx, %edx
	movl	%eax, %ebx
	leal	1(%rdx), %eax
	movb	-257(%rbp,%rdx), %dl
	movb	-257(%rbp,%rax), %al
	movb	%al, (%r8,%rsi)
	leal	-1(%r13), %eax
	subl	$2, %r13d
	movb	%dl, (%r8,%rax)
	jmp	.L44
.L87:
	leal	48(%rbx), %eax
	cmpl	$9, %ebx
	jbe	.L47
	addl	%ebx, %ebx
	leal	1(%rbx), %eax
	movb	-257(%rbp,%rax), %al
	movb	%al, 1(%r8)
	movb	-257(%rbp,%rbx), %al
.L47:
	movb	%al, (%r8)
	leaq	.LC6(%rip), %rdx
	xorl	%esi, %esi
	movq	%r12, %rdi
.LEHB1:
	call	_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6insertEmPKc@PLT
.LEHE1:
	movq	%rax, %rsi
	leaq	-5308744(%rbp), %rax
	movq	%rax, %rdi
	movq	%rax, -5308776(%rbp)
	call	_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC1EOS4_@PLT
	movq	%r12, %rdi
	call	_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE10_M_disposeEv@PLT
	movq	-5308744(%rbp), %rdi
	leaq	.LC7(%rip), %rsi
.LEHB2:
	call	fopen@PLT
	movq	%rax, -5308784(%rbp)
	xorl	%r14d, %r14d
	xorl	%r15d, %r15d
.L48:
	movl	-5308756(%rbp), %eax
	cmpl	%eax, %r15d
	jge	.L88
	xorl	%r12d, %r12d
.L53:
	movq	-5308768(%rbp), %rax
	movl	$13, -5308792(%rbp)
	leaq	(%rax,%r14), %rbx
	addq	%r12, %rbx
.L52:
	xorl	%r13d, %r13d
.L49:
	movq	-5308784(%rbp), %rdi
	leaq	.LC8(%rip), %rdx
	movl	$2, %esi
	movb	$1, %al
	cvtss2sd	(%rbx,%r13,4), %xmm0
	call	__fprintf_chk@PLT
	incq	%r13
	cmpq	$13, %r13
	jne	.L49
	addq	$52, %rbx
	decl	-5308792(%rbp)
	jne	.L52
	addq	$676, %r12
	cmpq	$259584, %r12
	jne	.L53
	incl	%r15d
	addq	$259584, %r14
	jmp	.L48
.L88:
	movq	-5308784(%rbp), %rdi
	call	fclose@PLT
.LEHE2:
	movq	-5308776(%rbp), %rdi
	call	_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE10_M_disposeEv@PLT
	movq	-56(%rbp), %rax
	subq	%fs:40, %rax
	je	.L58
	jmp	.L79
.L65:
	endbr64
	movq	%rax, %rbx
.L54:
	movq	%r12, %rdi
	jmp	.L82
.L66:
	endbr64
	movq	%rax, %rbx
.L56:
	movq	-5308776(%rbp), %rdi
.L82:
	call	_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE10_M_disposeEv@PLT
	movq	-56(%rbp), %rax
	subq	%fs:40, %rax
	jne	.L79
	movq	%rbx, %rdi
.LEHB3:
	call	_Unwind_Resume@PLT
.LEHE3:
.L79:
	call	__stack_chk_fail@PLT
.L58:
	leaq	-40(%rbp), %rsp
	xorl	%eax, %eax
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE3635:
	.globl	__gxx_personality_v0
	.section	.gcc_except_table,"a",@progbits
.LLSDA3635:
	.byte	0xff
	.byte	0xff
	.byte	0x1
	.uleb128 .LLSDACSE3635-.LLSDACSB3635
.LLSDACSB3635:
	.uleb128 .LEHB0-.LFB3635
	.uleb128 .LEHE0-.LEHB0
	.uleb128 0
	.uleb128 0
	.uleb128 .LEHB1-.LFB3635
	.uleb128 .LEHE1-.LEHB1
	.uleb128 .L65-.LFB3635
	.uleb128 0
	.uleb128 .LEHB2-.LFB3635
	.uleb128 .LEHE2-.LEHB2
	.uleb128 .L66-.LFB3635
	.uleb128 0
	.uleb128 .LEHB3-.LFB3635
	.uleb128 .LEHE3-.LEHB3
	.uleb128 0
	.uleb128 0
.LLSDACSE3635:
	.section	.text.startup
	.size	main, .-main
	.type	_ZL24__sti____cudaRegisterAllv, @function
_ZL24__sti____cudaRegisterAllv:
.LFB3661:
	.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
.LFE3661:
	.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
.LC1:
	.long	805306368
	.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 <hip/hip_runtime.h>
#include <stdio.h>
#include <iostream>
#include <string.h>
/***DEFINING THE DEFINES FOR THE ARRAY INDICES****************************/
//#define N 1
#define C 384
#define H 15
#define W 15
#define R 3
#define S 3
#define M 384
#define E 13
#define F 13
#define U 1
using namespace std;
int main(int argc, char* argv[])
{
int batch_size = atoi(argv[1]);
/*************INITALIZING MATRICES*********************************/
float IP[batch_size][C][H][W];
float OP[batch_size][M][F][E];
float WT[M][C][R][S];
int a,b,c,d;
/*INITIALIZING WEIGHT MATRIX*/
for(a=0; a<M; a++){
	for (b=0; b<C; b++){
		for (c=0; c<R; c++){
			for(d=0; d<S; d++){
				WT[a][b][c][d] = (float)rand()/(float)(RAND_MAX+1.0);
}
}	
}
}
printf("hello after weight\n");
/*INITIALIZING OUTPUT MATRIX*/
for(a=0; a<batch_size; a++){
	for (b=0; b<M; b++){
		for (c=0; c<F; c++){
			for(d=0; d<E; d++){
				OP[a][b][c][d] = 0;
}
}	
}
}
printf("hello after op init\n");
/*INITIALIZING INPUT MATRIX*/
for(a=0; a<batch_size; a++){
	for (b=0; b<C; b++){
		for (c=0; c<H; c++){
			for(d=0; d<W; d++){
				if((c==0)||(d==0)||(c==14)||(d==14))
				IP[a][b][c][d] = 0;//zero padding to eliminate spurious values along the edges to align stride and filter boundary properly with image boundary
				else
				IP[a][b][c][d] = (float)rand()/(float)(RAND_MAX+1.0);;
}
}	
}
}
printf("hello after ininting input mat\n");
/***NAIVE 7 LAYER LOOP IMPLEMENTATION***/
int n,m,x,y,i,j,k;
for(n=0; n<batch_size; n++){
	for (m=0; m<M; m++){
		for (x=0; x<F; x++){
			for(y=0; y<E; y++){
				OP[n][m][x][y] = 0; // adding bias to output
				for (i=0; i<R; i++){
					for (j=0; j<S; j++){
						for(k=0; k<C; k++){
							OP[n][m][x][y] += IP[n][k][U*x+i][U*y+j]*WT[m][k][i][j];
							}
						}
					}
                 /*****ACTIVATION FUNCTION-RELU*******/
if(OP[n][m][x][y] < 0) 
	OP[n][m][x][y] = 0;

					}
				}	
			}
		}
/**print outputs**/
string filename ="layer_4_"+to_string(batch_size);
FILE *fp=fopen(filename.c_str(),"w+");

int e,f,g,h;
for(e=0; e<batch_size; e++){
	for (f=0; f<M; f++){
		for (g=0; g<F; g++){
			for(h=0; h<E; h++){
				//printf("the output is %f for index %d,%d,%d,%d.\n",OP[e][f][g][h], e,f,g,h);
				//fprintf(fp,"%f,%d,%d,%d,%d.\n",OP[e][f][g][h], e,f,g,h);
				fprintf(fp,"%f\n",OP[e][f][g][h]);


}
}	
}
}
fclose(fp);
return 0;
}



	.text
	.file	"0-cnn_4th_layer_cpu.hip"
                                        # Start of file scope inline assembly
	.globl	_ZSt21ios_base_library_initv

                                        # End of file scope inline assembly
	.section	.rodata.cst4,"aM",@progbits,4
	.p2align	2, 0x0                          # -- Begin function main
.LCPI0_0:
	.long	0x30000000                      # float 4.65661287E-10
	.text
	.globl	main
	.type	main,@function
main:                                   # @main
.Lfunc_begin0:
	.cfi_startproc
	.cfi_personality 3, __gxx_personality_v0
	.cfi_lsda 3, .Lexception0
# %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r15
	pushq	%r14
	pushq	%r13
	pushq	%r12
	pushq	%rbx
	subq	$5308552, %rsp                  # imm = 0x510088
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	8(%rsi), %rdi
	callq	atoi
	movl	%eax, %ecx
	movq	%rsp, %rdx
	imulq	$345600, %rcx, %rax             # imm = 0x54600
	subq	%rax, %rdx
	movq	%rdx, -80(%rbp)                 # 8-byte Spill
	movq	%rdx, %rsp
	movq	%rsp, %rax
	movq	%rcx, -48(%rbp)                 # 8-byte Spill
	imulq	$259584, %rcx, %rcx             # imm = 0x3F600
	movq	%rcx, -88(%rbp)                 # 8-byte Spill
	subq	%rcx, %rax
	movq	%rax, -72(%rbp)                 # 8-byte Spill
	movq	%rax, %rsp
	leaq	-5308592(%rbp), %rbx
	xorl	%eax, %eax
.LBB0_1:                                # %.preheader159
                                        # =>This Loop Header: Depth=1
                                        #     Child Loop BB0_2 Depth 2
                                        #       Child Loop BB0_3 Depth 3
                                        #         Child Loop BB0_4 Depth 4
	movq	%rax, -56(%rbp)                 # 8-byte Spill
	movq	%rbx, -64(%rbp)                 # 8-byte Spill
	xorl	%r13d, %r13d
.LBB0_2:                                # %.preheader158
                                        #   Parent Loop BB0_1 Depth=1
                                        # =>  This Loop Header: Depth=2
                                        #       Child Loop BB0_3 Depth 3
                                        #         Child Loop BB0_4 Depth 4
	movq	%rbx, %r12
	xorl	%r14d, %r14d
.LBB0_3:                                # %.preheader157
                                        #   Parent Loop BB0_1 Depth=1
                                        #     Parent Loop BB0_2 Depth=2
                                        # =>    This Loop Header: Depth=3
                                        #         Child Loop BB0_4 Depth 4
	xorl	%r15d, %r15d
.LBB0_4:                                #   Parent Loop BB0_1 Depth=1
                                        #     Parent Loop BB0_2 Depth=2
                                        #       Parent Loop BB0_3 Depth=3
                                        # =>      This Inner Loop Header: Depth=4
	callq	rand
	movss	.LCPI0_0(%rip), %xmm1           # xmm1 = mem[0],zero,zero,zero
	xorps	%xmm0, %xmm0
	cvtsi2ss	%eax, %xmm0
	mulss	%xmm1, %xmm0
	movss	%xmm0, (%r12,%r15,4)
	incq	%r15
	cmpq	$3, %r15
	jne	.LBB0_4
# %bb.5:                                #   in Loop: Header=BB0_3 Depth=3
	incq	%r14
	addq	$12, %r12
	cmpq	$3, %r14
	jne	.LBB0_3
# %bb.6:                                #   in Loop: Header=BB0_2 Depth=2
	incq	%r13
	addq	$36, %rbx
	cmpq	$384, %r13                      # imm = 0x180
	jne	.LBB0_2
# %bb.7:                                #   in Loop: Header=BB0_1 Depth=1
	movq	-56(%rbp), %rax                 # 8-byte Reload
	incq	%rax
	movq	-64(%rbp), %rbx                 # 8-byte Reload
	addq	$13824, %rbx                    # imm = 0x3600
	cmpq	$384, %rax                      # imm = 0x180
	jne	.LBB0_1
# %bb.8:
	movl	$.Lstr, %edi
	callq	puts@PLT
	cmpl	$0, -48(%rbp)                   # 4-byte Folded Reload
	jle	.LBB0_9
# %bb.10:                               # %.preheader153.preheader
	xorl	%ebx, %ebx
	movq	-72(%rbp), %rdi                 # 8-byte Reload
	xorl	%esi, %esi
	movq	-88(%rbp), %rdx                 # 8-byte Reload
	callq	memset@PLT
	movl	$.Lstr.1, %edi
	callq	puts@PLT
	movq	-80(%rbp), %r14                 # 8-byte Reload
.LBB0_11:                               # %.preheader153
                                        # =>This Loop Header: Depth=1
                                        #     Child Loop BB0_12 Depth 2
                                        #       Child Loop BB0_13 Depth 3
                                        #         Child Loop BB0_14 Depth 4
	movq	%rbx, -64(%rbp)                 # 8-byte Spill
	movq	%r14, -56(%rbp)                 # 8-byte Spill
	xorl	%ebx, %ebx
.LBB0_12:                               # %.preheader152
                                        #   Parent Loop BB0_11 Depth=1
                                        # =>  This Loop Header: Depth=2
                                        #       Child Loop BB0_13 Depth 3
                                        #         Child Loop BB0_14 Depth 4
	movq	%r14, %r15
	xorl	%r12d, %r12d
.LBB0_13:                               # %.preheader151
                                        #   Parent Loop BB0_11 Depth=1
                                        #     Parent Loop BB0_12 Depth=2
                                        # =>    This Loop Header: Depth=3
                                        #         Child Loop BB0_14 Depth 4
	xorl	%r13d, %r13d
.LBB0_14:                               #   Parent Loop BB0_11 Depth=1
                                        #     Parent Loop BB0_12 Depth=2
                                        #       Parent Loop BB0_13 Depth=3
                                        # =>      This Inner Loop Header: Depth=4
	xorps	%xmm0, %xmm0
	cmpq	$14, %r13
	je	.LBB0_19
# %bb.15:                               #   in Loop: Header=BB0_14 Depth=4
	cmpq	$14, %r12
	je	.LBB0_19
# %bb.16:                               #   in Loop: Header=BB0_14 Depth=4
	testq	%r12, %r12
	je	.LBB0_19
# %bb.17:                               #   in Loop: Header=BB0_14 Depth=4
	testq	%r13, %r13
	je	.LBB0_19
# %bb.18:                               #   in Loop: Header=BB0_14 Depth=4
	callq	rand
	xorps	%xmm0, %xmm0
	cvtsi2ss	%eax, %xmm0
	mulss	.LCPI0_0(%rip), %xmm0
.LBB0_19:                               #   in Loop: Header=BB0_14 Depth=4
	movss	%xmm0, (%r15,%r13,4)
	incq	%r13
	cmpq	$15, %r13
	jne	.LBB0_14
# %bb.20:                               #   in Loop: Header=BB0_13 Depth=3
	incq	%r12
	addq	$60, %r15
	cmpq	$15, %r12
	jne	.LBB0_13
# %bb.21:                               #   in Loop: Header=BB0_12 Depth=2
	incq	%rbx
	addq	$900, %r14                      # imm = 0x384
	cmpq	$384, %rbx                      # imm = 0x180
	jne	.LBB0_12
# %bb.22:                               #   in Loop: Header=BB0_11 Depth=1
	movq	-64(%rbp), %rbx                 # 8-byte Reload
	incq	%rbx
	movq	-56(%rbp), %r14                 # 8-byte Reload
	addq	$345600, %r14                   # imm = 0x54600
	cmpq	-48(%rbp), %rbx                 # 8-byte Folded Reload
	jne	.LBB0_11
# %bb.23:                               # %._crit_edge175
	movl	$.Lstr.2, %edi
	callq	puts@PLT
	cmpl	$0, -48(%rbp)                   # 4-byte Folded Reload
	jle	.LBB0_38
# %bb.24:                               # %.preheader150.preheader
	xorl	%eax, %eax
.LBB0_25:                               # %.preheader150
                                        # =>This Loop Header: Depth=1
                                        #     Child Loop BB0_26 Depth 2
                                        #       Child Loop BB0_27 Depth 3
                                        #         Child Loop BB0_28 Depth 4
                                        #           Child Loop BB0_29 Depth 5
                                        #             Child Loop BB0_30 Depth 6
                                        #               Child Loop BB0_31 Depth 7
	movq	%rax, -96(%rbp)                 # 8-byte Spill
	imulq	$259584, %rax, %rax             # imm = 0x3F600
	addq	-72(%rbp), %rax                 # 8-byte Folded Reload
	movq	%rax, -88(%rbp)                 # 8-byte Spill
	leaq	-5308592(%rbp), %rax
	xorl	%ecx, %ecx
.LBB0_26:                               # %.preheader149
                                        #   Parent Loop BB0_25 Depth=1
                                        # =>  This Loop Header: Depth=2
                                        #       Child Loop BB0_27 Depth 3
                                        #         Child Loop BB0_28 Depth 4
                                        #           Child Loop BB0_29 Depth 5
                                        #             Child Loop BB0_30 Depth 6
                                        #               Child Loop BB0_31 Depth 7
	movq	%rcx, -104(%rbp)                # 8-byte Spill
	imulq	$676, %rcx, %rcx                # imm = 0x2A4
	movq	%rcx, -56(%rbp)                 # 8-byte Spill
	movq	-80(%rbp), %rdi                 # 8-byte Reload
	xorl	%r10d, %r10d
.LBB0_27:                               # %.preheader148
                                        #   Parent Loop BB0_25 Depth=1
                                        #     Parent Loop BB0_26 Depth=2
                                        # =>    This Loop Header: Depth=3
                                        #         Child Loop BB0_28 Depth 4
                                        #           Child Loop BB0_29 Depth 5
                                        #             Child Loop BB0_30 Depth 6
                                        #               Child Loop BB0_31 Depth 7
	imulq	$52, %r10, %r11
	addq	-56(%rbp), %r11                 # 8-byte Folded Reload
	addq	-88(%rbp), %r11                 # 8-byte Folded Reload
	movq	%rdi, -64(%rbp)                 # 8-byte Spill
	xorl	%r12d, %r12d
.LBB0_28:                               #   Parent Loop BB0_25 Depth=1
                                        #     Parent Loop BB0_26 Depth=2
                                        #       Parent Loop BB0_27 Depth=3
                                        # =>      This Loop Header: Depth=4
                                        #           Child Loop BB0_29 Depth 5
                                        #             Child Loop BB0_30 Depth 6
                                        #               Child Loop BB0_31 Depth 7
	leaq	(%r11,%r12,4), %r13
	xorps	%xmm0, %xmm0
	movq	%rax, %rsi
	movq	%rdi, %r15
	xorl	%ecx, %ecx
.LBB0_29:                               # %.preheader147
                                        #   Parent Loop BB0_25 Depth=1
                                        #     Parent Loop BB0_26 Depth=2
                                        #       Parent Loop BB0_27 Depth=3
                                        #         Parent Loop BB0_28 Depth=4
                                        # =>        This Loop Header: Depth=5
                                        #             Child Loop BB0_30 Depth 6
                                        #               Child Loop BB0_31 Depth 7
	movq	%rsi, %rbx
	movq	%r15, %r9
	xorl	%edx, %edx
.LBB0_30:                               # %.preheader146
                                        #   Parent Loop BB0_25 Depth=1
                                        #     Parent Loop BB0_26 Depth=2
                                        #       Parent Loop BB0_27 Depth=3
                                        #         Parent Loop BB0_28 Depth=4
                                        #           Parent Loop BB0_29 Depth=5
                                        # =>          This Loop Header: Depth=6
                                        #               Child Loop BB0_31 Depth 7
	xorl	%r8d, %r8d
	movq	%r9, %r14
.LBB0_31:                               #   Parent Loop BB0_25 Depth=1
                                        #     Parent Loop BB0_26 Depth=2
                                        #       Parent Loop BB0_27 Depth=3
                                        #         Parent Loop BB0_28 Depth=4
                                        #           Parent Loop BB0_29 Depth=5
                                        #             Parent Loop BB0_30 Depth=6
                                        # =>            This Inner Loop Header: Depth=7
	movss	(%r14), %xmm1                   # xmm1 = mem[0],zero,zero,zero
	mulss	(%rbx,%r8), %xmm1
	addss	%xmm1, %xmm0
	addq	$900, %r14                      # imm = 0x384
	addq	$36, %r8
	cmpq	$13824, %r8                     # imm = 0x3600
	jne	.LBB0_31
# %bb.32:                               #   in Loop: Header=BB0_30 Depth=6
	incq	%rdx
	addq	$4, %r9
	addq	$4, %rbx
	cmpq	$3, %rdx
	jne	.LBB0_30
# %bb.33:                               #   in Loop: Header=BB0_29 Depth=5
	incq	%rcx
	addq	$60, %r15
	addq	$12, %rsi
	cmpq	$3, %rcx
	jne	.LBB0_29
# %bb.34:                               #   in Loop: Header=BB0_28 Depth=4
	xorps	%xmm1, %xmm1
	maxss	%xmm0, %xmm1
	movss	%xmm1, (%r13)
	incq	%r12
	addq	$4, %rdi
	cmpq	$13, %r12
	jne	.LBB0_28
# %bb.35:                               #   in Loop: Header=BB0_27 Depth=3
	incq	%r10
	movq	-64(%rbp), %rdi                 # 8-byte Reload
	addq	$60, %rdi
	cmpq	$13, %r10
	jne	.LBB0_27
# %bb.36:                               #   in Loop: Header=BB0_26 Depth=2
	movq	-104(%rbp), %rcx                # 8-byte Reload
	incq	%rcx
	addq	$13824, %rax                    # imm = 0x3600
	cmpq	$384, %rcx                      # imm = 0x180
	jne	.LBB0_26
# %bb.37:                               #   in Loop: Header=BB0_25 Depth=1
	movq	-96(%rbp), %rax                 # 8-byte Reload
	incq	%rax
	addq	$345600, -80(%rbp)              # 8-byte Folded Spill
                                        # imm = 0x54600
	cmpq	-48(%rbp), %rax                 # 8-byte Folded Reload
	jne	.LBB0_25
	jmp	.LBB0_38
.LBB0_9:                                # %._crit_edge175.thread
	movl	$.Lstr.1, %edi
	callq	puts@PLT
	movl	$.Lstr.2, %edi
	callq	puts@PLT
.LBB0_38:                               # %._crit_edge189
	movq	-48(%rbp), %rax                 # 8-byte Reload
	movl	%eax, %r14d
	negl	%r14d
	cmovsl	%eax, %r14d
	movl	$1, %r15d
	cmpl	$10, %r14d
	jb	.LBB0_47
# %bb.39:                               # %.lr.ph.i.i.preheader
	movl	$4, %r15d
	movl	$3518437209, %eax               # imm = 0xD1B71759
	movl	%r14d, %ecx
.LBB0_40:                               # %.lr.ph.i.i
                                        # =>This Inner Loop Header: Depth=1
	cmpl	$99, %ecx
	jbe	.LBB0_41
# %bb.42:                               #   in Loop: Header=BB0_40 Depth=1
	cmpl	$999, %ecx                      # imm = 0x3E7
	jbe	.LBB0_43
# %bb.44:                               #   in Loop: Header=BB0_40 Depth=1
	cmpl	$10000, %ecx                    # imm = 0x2710
	jb	.LBB0_47
# %bb.45:                               #   in Loop: Header=BB0_40 Depth=1
	movl	%ecx, %edx
	imulq	%rax, %rdx
	shrq	$45, %rdx
	addl	$4, %r15d
	cmpl	$99999, %ecx                    # imm = 0x1869F
	movl	%edx, %ecx
	ja	.LBB0_40
# %bb.46:                               # %_ZNSt8__detail14__to_chars_lenIjEEjT_i.exit.i.loopexit
	addl	$-3, %r15d
	jmp	.LBB0_47
.LBB0_41:
	addl	$-2, %r15d
	jmp	.LBB0_47
.LBB0_43:
	decl	%r15d
.LBB0_47:                               # %_ZNSt8__detail14__to_chars_lenIjEEjT_i.exit.i
	movq	-48(%rbp), %rbx                 # 8-byte Reload
                                        # kill: def $ebx killed $ebx killed $rbx def $rbx
	shrl	$31, %ebx
	leal	(%r15,%rbx), %esi
	leaq	-152(%rbp), %r13
	movq	%r13, -16(%r13)
.Ltmp0:
	leaq	-168(%rbp), %rdi
	movl	$45, %edx
	callq	_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructEmc
.Ltmp1:
# %bb.48:                               # %_ZNSt7__cxx119to_stringEi.exit
	movl	%ebx, %edi
	leaq	-168(%rbp), %r12
	addq	(%r12), %rdi
	movl	%r15d, %esi
	movl	%r14d, %edx
	callq	_ZNSt8__detail18__to_chars_10_implIjEEvPcjT_
.Ltmp3:
	movl	$.L.str.3, %ecx
	movl	$8, %r8d
	movq	%r12, %rdi
	xorl	%esi, %esi
	xorl	%edx, %edx
	callq	_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE7replaceEmmPKcm
.Ltmp4:
# %bb.49:                               # %.noexc
	movq	%rax, %r15
	leaq	-120(%rbp), %r12
	movq	%r12, -16(%r12)
	movq	(%rax), %rax
	movq	%r15, %rbx
	addq	$16, %rbx
	cmpq	%rbx, %rax
	je	.LBB0_50
# %bb.51:                               # %_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE11_M_is_localEv.exit.i.i
	movq	%rax, -136(%rbp)
	movq	16(%r15), %rcx
	movq	%rcx, -120(%rbp)
	movq	8(%r15), %r14
	jmp	.LBB0_52
.LBB0_50:
	movq	8(%r15), %r14
	leaq	1(%r14), %rdx
	movq	%r12, %rdi
	movq	%rax, %rsi
	callq	memcpy@PLT
	movq	%r12, %rax
.LBB0_52:
	movq	%r14, -128(%rbp)
	movq	%rbx, (%r15)
	movq	$0, 8(%r15)
	movb	$0, 16(%r15)
	movq	-168(%rbp), %rdi
	cmpq	%r13, %rdi
	je	.LBB0_54
# %bb.53:                               # %_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE11_M_is_localEv.exit.i.i137
	callq	_ZdlPv
	movq	-136(%rbp), %rax
.LBB0_54:                               # %_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev.exit
	movl	$.L.str.4, %esi
	movq	%rax, %rdi
	callq	fopen
	movq	%rax, %r15
	cmpl	$0, -48(%rbp)                   # 4-byte Folded Reload
	movq	-72(%rbp), %r12                 # 8-byte Reload
	jle	.LBB0_63
# %bb.55:                               # %.preheader145.preheader
	xorl	%ecx, %ecx
.LBB0_56:                               # %.preheader145
                                        # =>This Loop Header: Depth=1
                                        #     Child Loop BB0_57 Depth 2
                                        #       Child Loop BB0_58 Depth 3
                                        #         Child Loop BB0_59 Depth 4
	movq	%rcx, -56(%rbp)                 # 8-byte Spill
	movq	%r12, -72(%rbp)                 # 8-byte Spill
	xorl	%r13d, %r13d
.LBB0_57:                               # %.preheader144
                                        #   Parent Loop BB0_56 Depth=1
                                        # =>  This Loop Header: Depth=2
                                        #       Child Loop BB0_58 Depth 3
                                        #         Child Loop BB0_59 Depth 4
	movq	%r12, -64(%rbp)                 # 8-byte Spill
	xorl	%ebx, %ebx
.LBB0_58:                               # %.preheader
                                        #   Parent Loop BB0_56 Depth=1
                                        #     Parent Loop BB0_57 Depth=2
                                        # =>    This Loop Header: Depth=3
                                        #         Child Loop BB0_59 Depth 4
	xorl	%r14d, %r14d
.LBB0_59:                               #   Parent Loop BB0_56 Depth=1
                                        #     Parent Loop BB0_57 Depth=2
                                        #       Parent Loop BB0_58 Depth=3
                                        # =>      This Inner Loop Header: Depth=4
	xorps	%xmm0, %xmm0
	cvtss2sd	(%r12,%r14,4), %xmm0
	movl	$.L.str.5, %esi
	movq	%r15, %rdi
	movb	$1, %al
	callq	fprintf
	incq	%r14
	cmpq	$13, %r14
	jne	.LBB0_59
# %bb.60:                               #   in Loop: Header=BB0_58 Depth=3
	incq	%rbx
	addq	$52, %r12
	cmpq	$13, %rbx
	jne	.LBB0_58
# %bb.61:                               #   in Loop: Header=BB0_57 Depth=2
	incq	%r13
	movq	-64(%rbp), %r12                 # 8-byte Reload
	addq	$676, %r12                      # imm = 0x2A4
	cmpq	$384, %r13                      # imm = 0x180
	jne	.LBB0_57
# %bb.62:                               #   in Loop: Header=BB0_56 Depth=1
	movq	-56(%rbp), %rcx                 # 8-byte Reload
	incq	%rcx
	movq	-72(%rbp), %r12                 # 8-byte Reload
	addq	$259584, %r12                   # imm = 0x3F600
	cmpq	-48(%rbp), %rcx                 # 8-byte Folded Reload
	jne	.LBB0_56
.LBB0_63:                               # %._crit_edge194
	movq	%r15, %rdi
	callq	fclose
	movq	-136(%rbp), %rdi
	leaq	-120(%rbp), %rax
	cmpq	%rax, %rdi
	je	.LBB0_65
# %bb.64:                               # %_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE11_M_is_localEv.exit.i.i141
	callq	_ZdlPv
.LBB0_65:                               # %_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev.exit143
	xorl	%eax, %eax
	leaq	-40(%rbp), %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	.cfi_def_cfa %rsp, 8
	retq
.LBB0_66:
	.cfi_def_cfa %rbp, 16
.Ltmp5:
	movq	%rax, %rbx
	movq	-168(%rbp), %rdi
	cmpq	%r13, %rdi
	je	.LBB0_68
# %bb.67:                               # %_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE11_M_is_localEv.exit.i.i138
	callq	_ZdlPv
.LBB0_68:                               # %_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev.exit140
	movq	%rbx, %rdi
	callq	_Unwind_Resume@PLT
.LBB0_69:
.Ltmp2:
	movq	%rax, %rdi
	callq	__clang_call_terminate
.Lfunc_end0:
	.size	main, .Lfunc_end0-main
	.cfi_endproc
	.section	.gcc_except_table,"a",@progbits
	.p2align	2, 0x0
GCC_except_table0:
.Lexception0:
	.byte	255                             # @LPStart Encoding = omit
	.byte	3                               # @TType Encoding = udata4
	.uleb128 .Lttbase0-.Lttbaseref0
.Lttbaseref0:
	.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 .Ltmp1-.Ltmp0                  #   Call between .Ltmp0 and .Ltmp1
	.uleb128 .Ltmp2-.Lfunc_begin0           #     jumps to .Ltmp2
	.byte	1                               #   On action: 1
	.uleb128 .Ltmp3-.Lfunc_begin0           # >> Call Site 3 <<
	.uleb128 .Ltmp4-.Ltmp3                  #   Call between .Ltmp3 and .Ltmp4
	.uleb128 .Ltmp5-.Lfunc_begin0           #     jumps to .Ltmp5
	.byte	0                               #   On action: cleanup
	.uleb128 .Ltmp4-.Lfunc_begin0           # >> Call Site 4 <<
	.uleb128 .Lfunc_end0-.Ltmp4             #   Call between .Ltmp4 and .Lfunc_end0
	.byte	0                               #     has no landing pad
	.byte	0                               #   On action: cleanup
.Lcst_end0:
	.byte	1                               # >> Action Record 1 <<
                                        #   Catch TypeInfo 1
	.byte	0                               #   No further actions
	.p2align	2, 0x0
                                        # >> Catch TypeInfos <<
	.long	0                               # TypeInfo 1
.Lttbase0:
	.p2align	2, 0x0
                                        # -- End function
	.section	.text.__clang_call_terminate,"axG",@progbits,__clang_call_terminate,comdat
	.hidden	__clang_call_terminate          # -- Begin function __clang_call_terminate
	.weak	__clang_call_terminate
	.type	__clang_call_terminate,@function
__clang_call_terminate:                 # @__clang_call_terminate
	.cfi_startproc
# %bb.0:
	pushq	%rax
	.cfi_def_cfa_offset 16
	callq	__cxa_begin_catch
	callq	_ZSt9terminatev
.Lfunc_end1:
	.size	__clang_call_terminate, .Lfunc_end1-__clang_call_terminate
	.cfi_endproc
                                        # -- End function
	.section	.text._ZNSt8__detail18__to_chars_10_implIjEEvPcjT_,"axG",@progbits,_ZNSt8__detail18__to_chars_10_implIjEEvPcjT_,comdat
	.weak	_ZNSt8__detail18__to_chars_10_implIjEEvPcjT_ # -- Begin function _ZNSt8__detail18__to_chars_10_implIjEEvPcjT_
	.type	_ZNSt8__detail18__to_chars_10_implIjEEvPcjT_,@function
_ZNSt8__detail18__to_chars_10_implIjEEvPcjT_: # @_ZNSt8__detail18__to_chars_10_implIjEEvPcjT_
	.cfi_startproc
# %bb.0:
                                        # kill: def $esi killed $esi def $rsi
	cmpl	$100, %edx
	jb	.LBB2_1
# %bb.2:                                # %.lr.ph.preheader
	decl	%esi
.LBB2_3:                                # %.lr.ph
                                        # =>This Inner Loop Header: Depth=1
	movl	%edx, %eax
	imulq	$1374389535, %rax, %rax         # imm = 0x51EB851F
	shrq	$37, %rax
	imull	$100, %eax, %ecx
	movl	%edx, %r8d
	subl	%ecx, %r8d
	movb	.L__const._ZNSt8__detail18__to_chars_10_implIjEEvPcjT_.__digits+1(%r8,%r8), %cl
	movl	%esi, %r9d
	movb	%cl, (%rdi,%r9)
	movb	.L__const._ZNSt8__detail18__to_chars_10_implIjEEvPcjT_.__digits(%r8,%r8), %cl
	leal	-1(%rsi), %r8d
	movb	%cl, (%rdi,%r8)
	addl	$-2, %esi
	cmpl	$9999, %edx                     # imm = 0x270F
	movl	%eax, %edx
	ja	.LBB2_3
	jmp	.LBB2_4
.LBB2_1:
	movl	%edx, %eax
.LBB2_4:                                # %._crit_edge
	cmpl	$10, %eax
	jb	.LBB2_6
# %bb.5:
	movl	%eax, %eax
	leaq	(%rax,%rax), %rcx
	movl	%ecx, %ecx
	movb	.L__const._ZNSt8__detail18__to_chars_10_implIjEEvPcjT_.__digits+1(%rcx), %cl
	movb	%cl, 1(%rdi)
	movb	.L__const._ZNSt8__detail18__to_chars_10_implIjEEvPcjT_.__digits(%rax,%rax), %al
	jmp	.LBB2_7
.LBB2_6:
	orb	$48, %al
.LBB2_7:
	movb	%al, (%rdi)
	retq
.Lfunc_end2:
	.size	_ZNSt8__detail18__to_chars_10_implIjEEvPcjT_, .Lfunc_end2-_ZNSt8__detail18__to_chars_10_implIjEEvPcjT_
	.cfi_endproc
                                        # -- End function
	.type	.L.str.3,@object                # @.str.3
	.section	.rodata.str1.1,"aMS",@progbits,1
.L.str.3:
	.asciz	"layer_4_"
	.size	.L.str.3, 9

	.type	.L.str.4,@object                # @.str.4
.L.str.4:
	.asciz	"w+"
	.size	.L.str.4, 3

	.type	.L.str.5,@object                # @.str.5
.L.str.5:
	.asciz	"%f\n"
	.size	.L.str.5, 4

	.type	.L__const._ZNSt8__detail18__to_chars_10_implIjEEvPcjT_.__digits,@object # @__const._ZNSt8__detail18__to_chars_10_implIjEEvPcjT_.__digits
	.section	.rodata.str1.16,"aMS",@progbits,1
	.p2align	4, 0x0
.L__const._ZNSt8__detail18__to_chars_10_implIjEEvPcjT_.__digits:
	.asciz	"00010203040506070809101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899"
	.size	.L__const._ZNSt8__detail18__to_chars_10_implIjEEvPcjT_.__digits, 201

	.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	"hello after weight"
	.size	.Lstr, 19

	.type	.Lstr.1,@object                 # @str.1
.Lstr.1:
	.asciz	"hello after op init"
	.size	.Lstr.1, 20

	.type	.Lstr.2,@object                 # @str.2
.Lstr.2:
	.asciz	"hello after ininting input mat"
	.size	.Lstr.2, 31

	.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 __gxx_personality_v0
	.addrsig_sym _Unwind_Resume
	.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
