/*
 * Find BLANK and replace your own code.
 * And submit report why do you replace the blank that way.
 */

#include<stdlib.h>
#include<iostream>
#include<fstream>
#include<vector>
#include<string>

#define TILE_WIDTH 2   /* set TILE_WIDTH 16 for the evaluation! */
#define MAXPOOL_INPUT_FILENAME "input.txt"
#define A_FILENAME "a.txt"
#define B_FILENAME "b.txt"
#define C_FILENAME "c.txt"

using namespace std;

__global__ void maxpool(float *input, float *output, const int input_size, const int filter_size) {
    // input : input_matrix address
    // output : output buffer address
    // input_size : width, height of input matrix
    // filter_size : filter_size of maxpolling
    // all input, output matrices are vectorized

    int col = blockDim.x * blockIdx.x + threadIdx.x;
    int row = blockDim.y * blockIdx.y + threadIdx.y;

    // out of bound

    // CHANGE
}

__global__ void gemm(float *a, float *b, float *c, const float alpha, const float beta, float *output, const int input_size){
    // a, b, c : input matrix address
    // alpha, beta : input constant
    // output : output buffer address
    // input_size : width, height of input matrix
    // all input, output matrices are vectorized

    int tx = threadIdx.x, ty = threadIdx.y;
    int bx = blockIdx.x,  by = blockIdx.y;

    int row = by*blockDim.y + ty;
    int col = bx*blockDim.x + tx;
    
    if(row>=input_size ||col>=input_size) { return; }
    
    // allocate 2D tiles in __shared__ memory
    __shared__ float s_a[TILE_WIDTH][TILE_WIDTH];
    __shared__ float s_b[TILE_WIDTH][TILE_WIDTH];

    float result = 0;

    // make sure you handle the case when the matrix sizes are not
    // multiple of TILE_WIDTH!
    // loop over the tiles of the input in phases
    for(int p = 0; p < input_size/TILE_WIDTH; ++p){
        // CHANGE

        // You need to use __syncthreads() a few times
        // to synchronize the threads in a thread block.
    }

    // write out the result to output[row*input_size + col] 
    // CHANGE
}


int main(int argc, char **argv) {
    if(argc < 4) {
        cout << "usage : " << argv[0] << " input_size filter_size alpha beta\n" << "example : " << argv[0] << " 100 2 0.5 0.8\n";
        return 1;
    }
    const int input_size = stoi(argv[1]);
    const int filter_size = stoi(argv[2]); // used for maxpooling
    const float alpha = stof(argv[3]);
    const float beta = stof(argv[4]);
    const int maxpool_output_size = input_size/filter_size;

    // check input_size is power of 2
    if(input_size == 0 && (input_size & (input_size-1))){
        cout << "input_size must be power of 2\n";
        return 1;
    }

    if(filter_size == 0){
        cout << "filter_size cannot be 0\n";
        return 1;
    }

    float maxpool_input[input_size*input_size];
    float a[input_size*input_size];
    float b[input_size*input_size];
    float c[input_size*input_size];
    
    // read input matrices 
    ifstream input_in(MAXPOOL_INPUT_FILENAME);
    ifstream a_in(A_FILENAME);
    ifstream b_in(B_FILENAME);
    ifstream c_in(C_FILENAME);

    for (int i = 0; i < input_size*input_size; ++i) {
        input_in >> maxpool_input[i];
        a_in >> a[i];
        b_in >> b[i];
        c_in >> c[i];
    }
    
    // prints inputs for debugging.
    cout<<"filter size : "<<filter_size;
    cout<<"\n========== MAXPOOL_INPUT ==========\n";
    for (int i = 0; i < input_size * input_size; ++i) {
        if(i%input_size==0) cout<<"\n";
        cout<<maxpool_input[i]<<" ";
    }
    cout<<"\nalpha : "<<alpha<<'\n';
    cout<<"========== A ==========\n";
    for (int i = 0; i < input_size * input_size; ++i) {
        if(i%input_size==0) cout<<"\n";
        cout<<a[i]<<" ";
    }
    cout<<"\n========== B ==========\n";
    for (int i = 0; i < input_size * input_size; ++i) {
        if(i%input_size==0) cout<<"\n";
        cout<<b[i]<<" ";
    }
    cout<<"\nbeta : "<<beta<<'\n';
    cout<<"========== C ==========\n";
    for (int i = 0; i < input_size * input_size; ++i) {
        if(i%input_size==0) cout<<"\n";
        cout<<c[i]<<" ";
    }
    cout<<'\n';
       
    // set thread, block dimensions
    const dim3 block_size(TILE_WIDTH, TILE_WIDTH);
    const dim3 num_of_maxpool_blocks(maxpool_output_size/block_size.x+1, maxpool_output_size/block_size.y+1);
    const dim3 num_of_blocks(input_size/block_size.x+1, input_size/block_size.y+1);

    // memory allocation for the device
    float *dev_mem_a, *dev_mem_b, *dev_mem_c, *dev_mem_input, *gemm_output, *maxpool_output;
    cudaMalloc(&dev_mem_a, sizeof(float) * input_size * input_size);
    cudaMalloc(&dev_mem_b, sizeof(float) * input_size * input_size);
    cudaMalloc(&dev_mem_c, sizeof(float) * input_size * input_size);
    cudaMalloc(&gemm_output, sizeof(float) * input_size * input_size);
    cudaMalloc(&dev_mem_input, sizeof(float) * input_size * input_size);
    cudaMalloc(&maxpool_output, sizeof(float) * maxpool_output_size * maxpool_output_size);
    
    // copy variable to device memory
    cudaMemcpy(dev_mem_a, &a, sizeof(float) * input_size * input_size, cudaMemcpyHostToDevice);
    cudaMemcpy(dev_mem_b, &b, sizeof(float) * input_size * input_size, cudaMemcpyHostToDevice);
    cudaMemcpy(dev_mem_c, &c, sizeof(float) * input_size * input_size, cudaMemcpyHostToDevice);
    cudaMemcpy(dev_mem_input, &maxpool_input, sizeof(float) * input_size * input_size, cudaMemcpyHostToDevice);

    // launch CUDA kernels

    // First launch gemm kernel
    gemm<<<num_of_blocks, block_size>>>(dev_mem_a, dev_mem_b, dev_mem_c, alpha, beta, gemm_output, input_size);
    cudaDeviceSynchronize();
    cudaError_t error = cudaGetLastError();
    if(error!=cudaSuccess) {
        fprintf(stderr, "ERROR %s\n", cudaGetErrorString(error));
        return 1;
    }
 
    // Then run maxpooling
    maxpool<<<num_of_maxpool_blocks, block_size>>>(dev_mem_input, maxpool_output, input_size, filter_size);
    cudaDeviceSynchronize();
    error = cudaGetLastError();
    if(error!=cudaSuccess) {
        fprintf(stderr, "ERROR %s\n", cudaGetErrorString(error));
        return 1;
    }
 
    // allocate output buf in main memory
    float *gemm_output_buf = (float*) malloc (sizeof(float)*input_size*input_size);
    float *maxpool_output_buf = (float*) malloc (sizeof(float)*maxpool_output_size*maxpool_output_size);
    
    // copy results from device to host
    cudaMemcpy(gemm_output_buf, gemm_output, sizeof(float)*input_size*input_size, cudaMemcpyDeviceToHost);
    cudaMemcpy(maxpool_output_buf, maxpool_output, sizeof(float)*maxpool_output_size*maxpool_output_size, cudaMemcpyDeviceToHost);
    
    // prints the results
    cout<<"\n========== GEMM OUTPUT ==========\n";
    for (int i = 0; i < input_size * input_size; ++i) {
        if(i%input_size==0) cout<<"\n";
        cout<<gemm_output_buf[i]<<" ";
    }
    cout<<"\n========== MAXPOOL OUTPUT ==========\n";
    for (int i = 0; i < maxpool_output_size * maxpool_output_size; ++i) {
        if(i%maxpool_output_size==0) cout<<"\n";
        cout<<maxpool_output_buf[i]<<" ";
    }
    cout<<'\n';

    cudaFree(dev_mem_a);
    cudaFree(dev_mem_b);
    cudaFree(dev_mem_c);
    cudaFree(gemm_output);
    cudaFree(dev_mem_input);
    cudaFree(maxpool_output);
    free(gemm_output_buf);
    free(maxpool_output_buf);
    return 0;
}

	.file	"tmpxft_00280243_00000000-6_hw6.cudafe1.cpp"
	.text
#APP
	.globl _ZSt21ios_base_library_initv

#NO_APP
	.type	_ZL26__cudaUnregisterBinaryUtilv, @function
_ZL26__cudaUnregisterBinaryUtilv:
.LFB4132:
	.cfi_startproc
	endbr64
	movq	_ZL20__cudaFatCubinHandle(%rip), %rdi
	jmp	__cudaUnregisterFatBinary@PLT
	.cfi_endproc
.LFE4132:
	.size	_ZL26__cudaUnregisterBinaryUtilv, .-_ZL26__cudaUnregisterBinaryUtilv
	.type	_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_c.isra.0, @function
_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_c.isra.0:
.LFB4839:
	.cfi_startproc
	subq	$24, %rsp
	.cfi_def_cfa_offset 32
	movq	(%rdi), %rax
	movb	%sil, 12(%rsp)
	movq	-24(%rax), %rax
	cmpq	$0, 16(%rdi,%rax)
	je	.L3
	leaq	12(%rsp), %rsi
	movl	$1, %edx
	call	_ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l@PLT
	jmp	.L2
.L3:
	movsbl	12(%rsp), %esi
	call	_ZNSo3putEc@PLT
.L2:
	addq	$24, %rsp
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE4839:
	.size	_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_c.isra.0, .-_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_c.isra.0
	.globl	_Z30__device_stub__Z7maxpoolPfS_iiPfS_ii
	.type	_Z30__device_stub__Z7maxpoolPfS_iiPfS_ii, @function
_Z30__device_stub__Z7maxpoolPfS_iiPfS_ii:
.LFB4154:
	.cfi_startproc
	endbr64
	subq	$152, %rsp
	.cfi_def_cfa_offset 160
	movq	%rdi, 24(%rsp)
	leaq	56(%rsp), %rdi
	movq	%rsi, 16(%rsp)
	leaq	68(%rsp), %rsi
	movl	%edx, 12(%rsp)
	leaq	40(%rsp), %rdx
	movl	%ecx, 8(%rsp)
	leaq	48(%rsp), %rcx
	movq	%fs:40, %rax
	movq	%rax, 136(%rsp)
	xorl	%eax, %eax
	leaq	24(%rsp), %rax
	movl	$1, 64(%rsp)
	movq	%rax, 104(%rsp)
	leaq	16(%rsp), %rax
	movq	%rax, 112(%rsp)
	leaq	12(%rsp), %rax
	movq	%rax, 120(%rsp)
	leaq	8(%rsp), %rax
	movq	%rax, 128(%rsp)
	movabsq	$4294967297, %rax
	movq	%rax, 56(%rsp)
	movq	%rax, 68(%rsp)
	movl	$1, 76(%rsp)
	call	__cudaPopCallConfiguration@PLT
	testl	%eax, %eax
	jne	.L7
	pushq	48(%rsp)
	.cfi_def_cfa_offset 168
	leaq	_Z7maxpoolPfS_ii(%rip), %rdi
	pushq	48(%rsp)
	.cfi_def_cfa_offset 176
	movq	84(%rsp), %rcx
	movl	92(%rsp), %r8d
	movq	72(%rsp), %rsi
	movl	80(%rsp), %edx
	leaq	120(%rsp), %r9
	call	cudaLaunchKernel@PLT
	popq	%rax
	.cfi_def_cfa_offset 168
	popq	%rdx
	.cfi_def_cfa_offset 160
.L7:
	movq	136(%rsp), %rax
	subq	%fs:40, %rax
	je	.L9
	call	__stack_chk_fail@PLT
.L9:
	addq	$152, %rsp
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE4154:
	.size	_Z30__device_stub__Z7maxpoolPfS_iiPfS_ii, .-_Z30__device_stub__Z7maxpoolPfS_iiPfS_ii
	.globl	_Z7maxpoolPfS_ii
	.type	_Z7maxpoolPfS_ii, @function
_Z7maxpoolPfS_ii:
.LFB4155:
	.cfi_startproc
	endbr64
	jmp	_Z30__device_stub__Z7maxpoolPfS_iiPfS_ii
	.cfi_endproc
.LFE4155:
	.size	_Z7maxpoolPfS_ii, .-_Z7maxpoolPfS_ii
	.globl	_Z32__device_stub__Z4gemmPfS_S_ffS_iPfS_S_ffS_i
	.type	_Z32__device_stub__Z4gemmPfS_S_ffS_iPfS_S_ffS_i, @function
_Z32__device_stub__Z4gemmPfS_S_ffS_iPfS_S_ffS_i:
.LFB4156:
	.cfi_startproc
	endbr64
	subq	$184, %rsp
	.cfi_def_cfa_offset 192
	movq	%rdi, 40(%rsp)
	leaq	64(%rsp), %rdi
	movq	%rsi, 32(%rsp)
	leaq	76(%rsp), %rsi
	movq	%rdx, 24(%rsp)
	leaq	48(%rsp), %rdx
	movq	%rcx, 8(%rsp)
	leaq	56(%rsp), %rcx
	movl	%r8d, 4(%rsp)
	movss	%xmm0, 20(%rsp)
	movss	%xmm1, 16(%rsp)
	movq	%fs:40, %rax
	movq	%rax, 168(%rsp)
	xorl	%eax, %eax
	leaq	40(%rsp), %rax
	movl	$1, 72(%rsp)
	movq	%rax, 112(%rsp)
	leaq	32(%rsp), %rax
	movq	%rax, 120(%rsp)
	leaq	24(%rsp), %rax
	movq	%rax, 128(%rsp)
	leaq	20(%rsp), %rax
	movq	%rax, 136(%rsp)
	leaq	16(%rsp), %rax
	movq	%rax, 144(%rsp)
	leaq	8(%rsp), %rax
	movq	%rax, 152(%rsp)
	leaq	4(%rsp), %rax
	movq	%rax, 160(%rsp)
	movabsq	$4294967297, %rax
	movq	%rax, 64(%rsp)
	movq	%rax, 76(%rsp)
	movl	$1, 84(%rsp)
	call	__cudaPopCallConfiguration@PLT
	testl	%eax, %eax
	jne	.L12
	pushq	56(%rsp)
	.cfi_def_cfa_offset 200
	leaq	_Z4gemmPfS_S_ffS_i(%rip), %rdi
	pushq	56(%rsp)
	.cfi_def_cfa_offset 208
	movq	92(%rsp), %rcx
	movl	100(%rsp), %r8d
	movq	80(%rsp), %rsi
	movl	88(%rsp), %edx
	leaq	128(%rsp), %r9
	call	cudaLaunchKernel@PLT
	popq	%rax
	.cfi_def_cfa_offset 200
	popq	%rdx
	.cfi_def_cfa_offset 192
.L12:
	movq	168(%rsp), %rax
	subq	%fs:40, %rax
	je	.L14
	call	__stack_chk_fail@PLT
.L14:
	addq	$184, %rsp
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE4156:
	.size	_Z32__device_stub__Z4gemmPfS_S_ffS_iPfS_S_ffS_i, .-_Z32__device_stub__Z4gemmPfS_S_ffS_iPfS_S_ffS_i
	.globl	_Z4gemmPfS_S_ffS_i
	.type	_Z4gemmPfS_S_ffS_i, @function
_Z4gemmPfS_S_ffS_i:
.LFB4157:
	.cfi_startproc
	endbr64
	jmp	_Z32__device_stub__Z4gemmPfS_S_ffS_iPfS_S_ffS_i
	.cfi_endproc
.LFE4157:
	.size	_Z4gemmPfS_S_ffS_i, .-_Z4gemmPfS_S_ffS_i
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"_Z4gemmPfS_S_ffS_i"
.LC1:
	.string	"_Z7maxpoolPfS_ii"
	.section	.text.startup,"ax",@progbits
	.type	_ZL24__sti____cudaRegisterAllv, @function
_ZL24__sti____cudaRegisterAllv:
.LFB4159:
	.cfi_startproc
	endbr64
	pushq	%rbx
	.cfi_def_cfa_offset 16
	.cfi_offset 3, -16
	leaq	_ZL15__fatDeviceText(%rip), %rdi
	call	__cudaRegisterFatBinary@PLT
	pushq	$0
	.cfi_def_cfa_offset 24
	xorl	%r9d, %r9d
	orl	$-1, %r8d
	pushq	$0
	.cfi_def_cfa_offset 32
	leaq	.LC0(%rip), %rdx
	movq	%rax, %rdi
	movq	%rax, %rbx
	pushq	$0
	.cfi_def_cfa_offset 40
	movq	%rdx, %rcx
	leaq	_Z4gemmPfS_S_ffS_i(%rip), %rsi
	pushq	$0
	.cfi_def_cfa_offset 48
	movq	%rax, _ZL20__cudaFatCubinHandle(%rip)
	call	__cudaRegisterFunction@PLT
	addq	$32, %rsp
	.cfi_def_cfa_offset 16
	movq	%rbx, %rdi
	xorl	%r9d, %r9d
	pushq	$0
	.cfi_def_cfa_offset 24
	leaq	.LC1(%rip), %rdx
	orl	$-1, %r8d
	leaq	_Z7maxpoolPfS_ii(%rip), %rsi
	pushq	$0
	.cfi_def_cfa_offset 32
	movq	%rdx, %rcx
	pushq	$0
	.cfi_def_cfa_offset 40
	pushq	$0
	.cfi_def_cfa_offset 48
	call	__cudaRegisterFunction@PLT
	movq	_ZL20__cudaFatCubinHandle(%rip), %rdi
	addq	$32, %rsp
	.cfi_def_cfa_offset 16
	call	__cudaRegisterFatBinaryEnd@PLT
	leaq	_ZL26__cudaUnregisterBinaryUtilv(%rip), %rdi
	popq	%rbx
	.cfi_def_cfa_offset 8
	jmp	atexit@PLT
	.cfi_endproc
.LFE4159:
	.size	_ZL24__sti____cudaRegisterAllv, .-_ZL24__sti____cudaRegisterAllv
	.section	.init_array,"aw"
	.align 8
	.quad	_ZL24__sti____cudaRegisterAllv
	.section	.text._ZZN9__gnu_cxx6__stoaIlicJiEEET0_PFT_PKT1_PPS3_DpT2_EPKcS5_PmS9_EN11_Save_errnoD2Ev,"axG",@progbits,_ZZN9__gnu_cxx6__stoaIlicJiEEET0_PFT_PKT1_PPS3_DpT2_EPKcS5_PmS9_EN11_Save_errnoD5Ev,comdat
	.align 2
	.weak	_ZZN9__gnu_cxx6__stoaIlicJiEEET0_PFT_PKT1_PPS3_DpT2_EPKcS5_PmS9_EN11_Save_errnoD2Ev
	.type	_ZZN9__gnu_cxx6__stoaIlicJiEEET0_PFT_PKT1_PPS3_DpT2_EPKcS5_PmS9_EN11_Save_errnoD2Ev, @function
_ZZN9__gnu_cxx6__stoaIlicJiEEET0_PFT_PKT1_PPS3_DpT2_EPKcS5_PmS9_EN11_Save_errnoD2Ev:
.LFB4238:
	.cfi_startproc
	endbr64
	pushq	%rbx
	.cfi_def_cfa_offset 16
	.cfi_offset 3, -16
	movq	%rdi, %rbx
	call	__errno_location@PLT
	cmpl	$0, (%rax)
	jne	.L19
	movl	(%rbx), %edx
	movl	%edx, (%rax)
.L19:
	popq	%rbx
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE4238:
	.size	_ZZN9__gnu_cxx6__stoaIlicJiEEET0_PFT_PKT1_PPS3_DpT2_EPKcS5_PmS9_EN11_Save_errnoD2Ev, .-_ZZN9__gnu_cxx6__stoaIlicJiEEET0_PFT_PKT1_PPS3_DpT2_EPKcS5_PmS9_EN11_Save_errnoD2Ev
	.weak	_ZZN9__gnu_cxx6__stoaIlicJiEEET0_PFT_PKT1_PPS3_DpT2_EPKcS5_PmS9_EN11_Save_errnoD1Ev
	.set	_ZZN9__gnu_cxx6__stoaIlicJiEEET0_PFT_PKT1_PPS3_DpT2_EPKcS5_PmS9_EN11_Save_errnoD1Ev,_ZZN9__gnu_cxx6__stoaIlicJiEEET0_PFT_PKT1_PPS3_DpT2_EPKcS5_PmS9_EN11_Save_errnoD2Ev
	.section	.text._ZN9__gnu_cxx6__stoaIlicJiEEET0_PFT_PKT1_PPS3_DpT2_EPKcS5_PmS9_,"axG",@progbits,_ZN9__gnu_cxx6__stoaIlicJiEEET0_PFT_PKT1_PPS3_DpT2_EPKcS5_PmS9_,comdat
	.weak	_ZN9__gnu_cxx6__stoaIlicJiEEET0_PFT_PKT1_PPS3_DpT2_EPKcS5_PmS9_
	.type	_ZN9__gnu_cxx6__stoaIlicJiEEET0_PFT_PKT1_PPS3_DpT2_EPKcS5_PmS9_, @function
_ZN9__gnu_cxx6__stoaIlicJiEEET0_PFT_PKT1_PPS3_DpT2_EPKcS5_PmS9_:
.LFB4233:
	.cfi_startproc
	.cfi_personality 0x9b,DW.ref.__gxx_personality_v0
	.cfi_lsda 0x1b,.LLSDA4233
	endbr64
	pushq	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	movq	%rdi, %r15
	pushq	%r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	movq	%rsi, %r14
	pushq	%r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	pushq	%r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	movq	%rcx, %r12
	pushq	%rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	movq	%rdx, %rbx
	subq	$56, %rsp
	.cfi_def_cfa_offset 112
	movl	%r8d, 12(%rsp)
	leaq	28(%rsp), %r13
	movq	%fs:40, %rax
	movq	%rax, 40(%rsp)
	xorl	%eax, %eax
	call	__errno_location@PLT
	movl	12(%rsp), %edx
	leaq	32(%rsp), %rsi
	movq	%rbx, %rdi
	movq	%rax, %rbp
	movl	(%rax), %eax
	movl	%eax, 28(%rsp)
	xorl	%eax, %eax
	movl	%eax, 0(%rbp)
.LEHB0:
	call	*%r15
	movq	32(%rsp), %rdx
	cmpq	%rbx, %rdx
	jne	.L23
	movq	40(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L36
	movq	%r14, %rdi
	call	_ZSt24__throw_invalid_argumentPKc@PLT
.L23:
	cmpl	$34, 0(%rbp)
	je	.L25
	movl	$2147483648, %ecx
	movl	$4294967295, %esi
	addq	%rax, %rcx
	cmpq	%rcx, %rsi
	jnb	.L26
.L25:
	movq	40(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L36
	movq	%r14, %rdi
	call	_ZSt20__throw_out_of_rangePKc@PLT
.LEHE0:
.L26:
	testq	%r12, %r12
	je	.L28
	subq	%rbx, %rdx
	movq	%rdx, (%r12)
.L28:
	movq	%r13, %rdi
	movl	%eax, 12(%rsp)
	call	_ZZN9__gnu_cxx6__stoaIlicJiEEET0_PFT_PKT1_PPS3_DpT2_EPKcS5_PmS9_EN11_Save_errnoD1Ev
	movl	12(%rsp), %eax
	movq	40(%rsp), %rdx
	subq	%fs:40, %rdx
	je	.L31
	jmp	.L36
.L32:
	endbr64
	movq	%rax, %rbx
.L29:
	movq	%r13, %rdi
	call	_ZZN9__gnu_cxx6__stoaIlicJiEEET0_PFT_PKT1_PPS3_DpT2_EPKcS5_PmS9_EN11_Save_errnoD1Ev
	movq	40(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L36
	movq	%rbx, %rdi
.LEHB1:
	call	_Unwind_Resume@PLT
.LEHE1:
.L36:
	call	__stack_chk_fail@PLT
.L31:
	addq	$56, %rsp
	.cfi_def_cfa_offset 56
	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
.LFE4233:
	.globl	__gxx_personality_v0
	.section	.gcc_except_table._ZN9__gnu_cxx6__stoaIlicJiEEET0_PFT_PKT1_PPS3_DpT2_EPKcS5_PmS9_,"aG",@progbits,_ZN9__gnu_cxx6__stoaIlicJiEEET0_PFT_PKT1_PPS3_DpT2_EPKcS5_PmS9_,comdat
.LLSDA4233:
	.byte	0xff
	.byte	0xff
	.byte	0x1
	.uleb128 .LLSDACSE4233-.LLSDACSB4233
.LLSDACSB4233:
	.uleb128 .LEHB0-.LFB4233
	.uleb128 .LEHE0-.LEHB0
	.uleb128 .L32-.LFB4233
	.uleb128 0
	.uleb128 .LEHB1-.LFB4233
	.uleb128 .LEHE1-.LEHB1
	.uleb128 0
	.uleb128 0
.LLSDACSE4233:
	.section	.text._ZN9__gnu_cxx6__stoaIlicJiEEET0_PFT_PKT1_PPS3_DpT2_EPKcS5_PmS9_,"axG",@progbits,_ZN9__gnu_cxx6__stoaIlicJiEEET0_PFT_PKT1_PPS3_DpT2_EPKcS5_PmS9_,comdat
	.size	_ZN9__gnu_cxx6__stoaIlicJiEEET0_PFT_PKT1_PPS3_DpT2_EPKcS5_PmS9_, .-_ZN9__gnu_cxx6__stoaIlicJiEEET0_PFT_PKT1_PPS3_DpT2_EPKcS5_PmS9_
	.section	.text._ZZN9__gnu_cxx6__stoaIffcJEEET0_PFT_PKT1_PPS3_DpT2_EPKcS5_PmS9_EN11_Save_errnoD2Ev,"axG",@progbits,_ZZN9__gnu_cxx6__stoaIffcJEEET0_PFT_PKT1_PPS3_DpT2_EPKcS5_PmS9_EN11_Save_errnoD5Ev,comdat
	.align 2
	.weak	_ZZN9__gnu_cxx6__stoaIffcJEEET0_PFT_PKT1_PPS3_DpT2_EPKcS5_PmS9_EN11_Save_errnoD2Ev
	.type	_ZZN9__gnu_cxx6__stoaIffcJEEET0_PFT_PKT1_PPS3_DpT2_EPKcS5_PmS9_EN11_Save_errnoD2Ev, @function
_ZZN9__gnu_cxx6__stoaIffcJEEET0_PFT_PKT1_PPS3_DpT2_EPKcS5_PmS9_EN11_Save_errnoD2Ev:
.LFB4283:
	.cfi_startproc
	endbr64
	pushq	%rbx
	.cfi_def_cfa_offset 16
	.cfi_offset 3, -16
	movq	%rdi, %rbx
	call	__errno_location@PLT
	cmpl	$0, (%rax)
	jne	.L39
	movl	(%rbx), %edx
	movl	%edx, (%rax)
.L39:
	popq	%rbx
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE4283:
	.size	_ZZN9__gnu_cxx6__stoaIffcJEEET0_PFT_PKT1_PPS3_DpT2_EPKcS5_PmS9_EN11_Save_errnoD2Ev, .-_ZZN9__gnu_cxx6__stoaIffcJEEET0_PFT_PKT1_PPS3_DpT2_EPKcS5_PmS9_EN11_Save_errnoD2Ev
	.weak	_ZZN9__gnu_cxx6__stoaIffcJEEET0_PFT_PKT1_PPS3_DpT2_EPKcS5_PmS9_EN11_Save_errnoD1Ev
	.set	_ZZN9__gnu_cxx6__stoaIffcJEEET0_PFT_PKT1_PPS3_DpT2_EPKcS5_PmS9_EN11_Save_errnoD1Ev,_ZZN9__gnu_cxx6__stoaIffcJEEET0_PFT_PKT1_PPS3_DpT2_EPKcS5_PmS9_EN11_Save_errnoD2Ev
	.section	.text._ZN9__gnu_cxx6__stoaIffcJEEET0_PFT_PKT1_PPS3_DpT2_EPKcS5_PmS9_,"axG",@progbits,_ZN9__gnu_cxx6__stoaIffcJEEET0_PFT_PKT1_PPS3_DpT2_EPKcS5_PmS9_,comdat
	.weak	_ZN9__gnu_cxx6__stoaIffcJEEET0_PFT_PKT1_PPS3_DpT2_EPKcS5_PmS9_
	.type	_ZN9__gnu_cxx6__stoaIffcJEEET0_PFT_PKT1_PPS3_DpT2_EPKcS5_PmS9_, @function
_ZN9__gnu_cxx6__stoaIffcJEEET0_PFT_PKT1_PPS3_DpT2_EPKcS5_PmS9_:
.LFB4278:
	.cfi_startproc
	.cfi_personality 0x9b,DW.ref.__gxx_personality_v0
	.cfi_lsda 0x1b,.LLSDA4278
	endbr64
	pushq	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	movq	%rdi, %r15
	pushq	%r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	movq	%rsi, %r14
	pushq	%r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	pushq	%r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	movq	%rcx, %r12
	pushq	%rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	movq	%rdx, %rbx
	subq	$56, %rsp
	.cfi_def_cfa_offset 112
	movq	%fs:40, %rax
	movq	%rax, 40(%rsp)
	xorl	%eax, %eax
	leaq	28(%rsp), %r13
	call	__errno_location@PLT
	leaq	32(%rsp), %rsi
	movq	%rbx, %rdi
	movq	%rax, %rbp
	movl	(%rax), %eax
	movl	%eax, 28(%rsp)
	xorl	%eax, %eax
	movl	%eax, 0(%rbp)
.LEHB2:
	call	*%r15
	movq	32(%rsp), %rax
	cmpq	%rbx, %rax
	jne	.L43
	movq	40(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L55
	movq	%r14, %rdi
	call	_ZSt24__throw_invalid_argumentPKc@PLT
.L43:
	cmpl	$34, 0(%rbp)
	jne	.L45
	movq	40(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L55
	movq	%r14, %rdi
	call	_ZSt20__throw_out_of_rangePKc@PLT
.LEHE2:
.L45:
	testq	%r12, %r12
	je	.L47
	subq	%rbx, %rax
	movq	%rax, (%r12)
.L47:
	movq	%r13, %rdi
	movss	%xmm0, 12(%rsp)
	call	_ZZN9__gnu_cxx6__stoaIffcJEEET0_PFT_PKT1_PPS3_DpT2_EPKcS5_PmS9_EN11_Save_errnoD1Ev
	movss	12(%rsp), %xmm0
	movq	40(%rsp), %rax
	subq	%fs:40, %rax
	je	.L50
	jmp	.L55
.L51:
	endbr64
	movq	%rax, %rbx
.L48:
	movq	%r13, %rdi
	call	_ZZN9__gnu_cxx6__stoaIffcJEEET0_PFT_PKT1_PPS3_DpT2_EPKcS5_PmS9_EN11_Save_errnoD1Ev
	movq	40(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L55
	movq	%rbx, %rdi
.LEHB3:
	call	_Unwind_Resume@PLT
.LEHE3:
.L55:
	call	__stack_chk_fail@PLT
.L50:
	addq	$56, %rsp
	.cfi_def_cfa_offset 56
	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
.LFE4278:
	.section	.gcc_except_table._ZN9__gnu_cxx6__stoaIffcJEEET0_PFT_PKT1_PPS3_DpT2_EPKcS5_PmS9_,"aG",@progbits,_ZN9__gnu_cxx6__stoaIffcJEEET0_PFT_PKT1_PPS3_DpT2_EPKcS5_PmS9_,comdat
.LLSDA4278:
	.byte	0xff
	.byte	0xff
	.byte	0x1
	.uleb128 .LLSDACSE4278-.LLSDACSB4278
.LLSDACSB4278:
	.uleb128 .LEHB2-.LFB4278
	.uleb128 .LEHE2-.LEHB2
	.uleb128 .L51-.LFB4278
	.uleb128 0
	.uleb128 .LEHB3-.LFB4278
	.uleb128 .LEHE3-.LEHB3
	.uleb128 0
	.uleb128 0
.LLSDACSE4278:
	.section	.text._ZN9__gnu_cxx6__stoaIffcJEEET0_PFT_PKT1_PPS3_DpT2_EPKcS5_PmS9_,"axG",@progbits,_ZN9__gnu_cxx6__stoaIffcJEEET0_PFT_PKT1_PPS3_DpT2_EPKcS5_PmS9_,comdat
	.size	_ZN9__gnu_cxx6__stoaIffcJEEET0_PFT_PKT1_PPS3_DpT2_EPKcS5_PmS9_, .-_ZN9__gnu_cxx6__stoaIffcJEEET0_PFT_PKT1_PPS3_DpT2_EPKcS5_PmS9_
	.section	.rodata._ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_.str1.1,"aMS",@progbits,1
.LC2:
	.string	"basic_string: construction from null is not valid"
	.section	.text._ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_,"axG",@progbits,_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC5IS3_EEPKcRKS3_,comdat
	.align 2
	.weak	_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_
	.type	_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_, @function
_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_:
.LFB4477:
	.cfi_startproc
	endbr64
	pushq	%r12
	.cfi_def_cfa_offset 16
	.cfi_offset 12, -16
	pushq	%rbp
	.cfi_def_cfa_offset 24
	.cfi_offset 6, -24
	pushq	%rbx
	.cfi_def_cfa_offset 32
	.cfi_offset 3, -32
	subq	$16, %rsp
	.cfi_def_cfa_offset 48
	movq	%fs:40, %rax
	movq	%rax, 8(%rsp)
	xorl	%eax, %eax
	leaq	16(%rdi), %rax
	movq	%rax, (%rdi)
	testq	%rsi, %rsi
	jne	.L59
	movq	8(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L64
	leaq	.LC2(%rip), %rdi
	call	_ZSt19__throw_logic_errorPKc@PLT
.L59:
	movq	%rdi, %rbx
	movq	%rsi, %rdi
	movq	%rsi, %rbp
	call	strlen@PLT
	movq	%rax, (%rsp)
	leaq	0(%rbp,%rax), %r12
	cmpq	$15, %rax
	jbe	.L61
	movq	%rsp, %rsi
	xorl	%edx, %edx
	movq	%rbx, %rdi
	call	_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9_M_createERmm@PLT
	movq	%rax, (%rbx)
	movq	(%rsp), %rax
	movq	%rax, 16(%rbx)
.L61:
	movq	(%rbx), %rdi
	movq	%r12, %rdx
	movq	%rbp, %rsi
	call	_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE13_S_copy_charsEPcPKcS7_@PLT
	movq	(%rsp), %rax
	movq	(%rbx), %rdx
	movq	%rax, 8(%rbx)
	movb	$0, (%rdx,%rax)
	movq	8(%rsp), %rax
	subq	%fs:40, %rax
	je	.L62
.L64:
	call	__stack_chk_fail@PLT
.L62:
	addq	$16, %rsp
	.cfi_def_cfa_offset 32
	popq	%rbx
	.cfi_def_cfa_offset 24
	popq	%rbp
	.cfi_def_cfa_offset 16
	popq	%r12
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE4477:
	.size	_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_, .-_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_
	.weak	_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC1IS3_EEPKcRKS3_
	.set	_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC1IS3_EEPKcRKS3_,_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_
	.section	.rodata.str1.1
.LC3:
	.string	"usage : "
.LC4:
	.string	" input_size filter_size alpha beta\n"
.LC5:
	.string	"example : "
.LC6:
	.string	" 100 2 0.5 0.8\n"
.LC7:
	.string	"stoi"
.LC8:
	.string	"stof"
.LC9:
	.string	"filter_size cannot be 0\n"
.LC10:
	.string	"input.txt"
.LC11:
	.string	"a.txt"
.LC12:
	.string	"b.txt"
.LC13:
	.string	"c.txt"
.LC14:
	.string	"filter size : "
.LC15:
	.string	"\n========== MAXPOOL_INPUT ==========\n"
.LC16:
	.string	"\n"
.LC17:
	.string	" "
.LC18:
	.string	"\nalpha : "
.LC19:
	.string	"========== A ==========\n"
.LC20:
	.string	"\n========== B ==========\n"
.LC21:
	.string	"\nbeta : "
.LC22:
	.string	"========== C ==========\n"
.LC23:
	.string	"ERROR %s\n"
.LC24:
	.string	"\n========== GEMM OUTPUT ==========\n"
.LC25:
	.string	"\n========== MAXPOOL OUTPUT ==========\n"
	.section	.text.startup
	.globl	main
	.type	main, @function
main:
.LFB4129:
	.cfi_startproc
	.cfi_personality 0x9b,DW.ref.__gxx_personality_v0
	.cfi_lsda 0x1b,.LLSDA4129
	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
	.cfi_offset 15, -24
	.cfi_offset 14, -32
	.cfi_offset 13, -40
	.cfi_offset 12, -48
	.cfi_offset 3, -56
	movq	%rsi, %rbx
	subq	$2248, %rsp
	movq	%fs:40, %rax
	movq	%rax, -56(%rbp)
	xorl	%eax, %eax
	cmpl	$3, %edi
	jg	.L66
	leaq	.LC3(%rip), %rsi
	leaq	_ZSt4cout(%rip), %rdi
.LEHB4:
	call	_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc@PLT
	movq	(%rbx), %rsi
	movq	%rax, %rdi
	call	_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc@PLT
	leaq	.LC4(%rip), %rsi
	movq	%rax, %rdi
	call	_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc@PLT
	leaq	.LC5(%rip), %rsi
	movq	%rax, %rdi
	call	_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc@PLT
	movq	(%rbx), %rsi
	movq	%rax, %rdi
	call	_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc@PLT
	leaq	.LC6(%rip), %rsi
	movq	%rax, %rdi
	jmp	.L153
.L66:
	leaq	-576(%rbp), %rax
	movq	8(%rsi), %rsi
	leaq	-2148(%rbp), %r12
	movq	%r12, %rdx
	movq	%rax, %rdi
	movq	%rax, -2232(%rbp)
	leaq	.LC7(%rip), %r13
	call	_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC1IS3_EEPKcRKS3_
.LEHE4:
	movl	$10, %r8d
	xorl	%ecx, %ecx
	movq	%r13, %rsi
	movq	-576(%rbp), %rdx
	movq	__isoc23_strtol@GOTPCREL(%rip), %rdi
.LEHB5:
	call	_ZN9__gnu_cxx6__stoaIlicJiEEET0_PFT_PKT1_PPS3_DpT2_EPKcS5_PmS9_
.LEHE5:
	movq	-2232(%rbp), %rdi
	movl	%eax, %r15d
	call	_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE10_M_disposeEv@PLT
	movq	16(%rbx), %rsi
	movq	-2232(%rbp), %rdi
	movq	%r12, %rdx
.LEHB6:
	call	_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC1IS3_EEPKcRKS3_
.LEHE6:
	movl	$10, %r8d
	xorl	%ecx, %ecx
	movq	%r13, %rsi
	movq	-576(%rbp), %rdx
	movq	__isoc23_strtol@GOTPCREL(%rip), %rdi
.LEHB7:
	call	_ZN9__gnu_cxx6__stoaIlicJiEEET0_PFT_PKT1_PPS3_DpT2_EPKcS5_PmS9_
.LEHE7:
	movq	-2232(%rbp), %rdi
	movl	%eax, -2240(%rbp)
	leaq	.LC8(%rip), %r13
	call	_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE10_M_disposeEv@PLT
	movq	24(%rbx), %rsi
	movq	-2232(%rbp), %rdi
	movq	%r12, %rdx
.LEHB8:
	call	_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC1IS3_EEPKcRKS3_
.LEHE8:
	movq	-576(%rbp), %rdx
	xorl	%ecx, %ecx
	movq	%r13, %rsi
	movq	strtof@GOTPCREL(%rip), %rdi
.LEHB9:
	call	_ZN9__gnu_cxx6__stoaIffcJEEET0_PFT_PKT1_PPS3_DpT2_EPKcS5_PmS9_
.LEHE9:
	movq	-2232(%rbp), %rdi
	movss	%xmm0, -2284(%rbp)
	call	_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE10_M_disposeEv@PLT
	movq	32(%rbx), %rsi
	movq	-2232(%rbp), %rdi
	movq	%r12, %rdx
.LEHB10:
	call	_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC1IS3_EEPKcRKS3_
.LEHE10:
	movq	-576(%rbp), %rdx
	xorl	%ecx, %ecx
	movq	%r13, %rsi
	movq	strtof@GOTPCREL(%rip), %rdi
.LEHB11:
	call	_ZN9__gnu_cxx6__stoaIffcJEEET0_PFT_PKT1_PPS3_DpT2_EPKcS5_PmS9_
.LEHE11:
	movq	-2232(%rbp), %rdi
	movss	%xmm0, -2288(%rbp)
	call	_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE10_M_disposeEv@PLT
	cmpl	$0, -2240(%rbp)
	jne	.L68
	leaq	.LC9(%rip), %rsi
	leaq	_ZSt4cout(%rip), %rdi
.L153:
.LEHB12:
	call	_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc@PLT
	movl	$1, %ebx
	jmp	.L65
.L68:
	movl	%r15d, %r13d
	movq	%rsp, %rcx
	imull	%r15d, %r13d
	movslq	%r13d, %r12
	leaq	15(,%r12,4), %rax
	movq	%rax, %rsi
	movq	%rax, %rdx
	andq	$-4096, %rsi
	andq	$-16, %rdx
	subq	%rsi, %rcx
.L70:
	cmpq	%rcx, %rsp
	je	.L71
	subq	$4096, %rsp
	orq	$0, 4088(%rsp)
	jmp	.L70
.L71:
	andl	$4095, %edx
	subq	%rdx, %rsp
	testq	%rdx, %rdx
	je	.L72
	orq	$0, -8(%rsp,%rdx)
.L72:
	movq	%rax, %rsi
	movq	%rsp, -2256(%rbp)
	movq	%rax, %rdx
	movq	%rsp, %rcx
	andq	$-4096, %rsi
	andq	$-16, %rdx
	subq	%rsi, %rcx
.L73:
	cmpq	%rcx, %rsp
	je	.L74
	subq	$4096, %rsp
	orq	$0, 4088(%rsp)
	jmp	.L73
.L74:
	andl	$4095, %edx
	subq	%rdx, %rsp
	testq	%rdx, %rdx
	je	.L75
	orq	$0, -8(%rsp,%rdx)
.L75:
	movq	%rax, %rsi
	movq	%rsp, -2264(%rbp)
	movq	%rax, %rdx
	movq	%rsp, %rcx
	andq	$-4096, %rsi
	andq	$-16, %rdx
	subq	%rsi, %rcx
.L76:
	cmpq	%rcx, %rsp
	je	.L77
	subq	$4096, %rsp
	orq	$0, 4088(%rsp)
	jmp	.L76
.L77:
	andl	$4095, %edx
	subq	%rdx, %rsp
	testq	%rdx, %rdx
	je	.L78
	orq	$0, -8(%rsp,%rdx)
.L78:
	movq	%rsp, -2272(%rbp)
	movq	%rax, %rdx
	movq	%rsp, %rcx
	andq	$-4096, %rax
	andq	$-16, %rdx
	subq	%rax, %rcx
.L79:
	cmpq	%rcx, %rsp
	je	.L80
	subq	$4096, %rsp
	orq	$0, 4088(%rsp)
	jmp	.L79
.L80:
	movq	%rdx, %rax
	andl	$4095, %eax
	subq	%rax, %rsp
	testq	%rax, %rax
	je	.L81
	orq	$0, -8(%rsp,%rax)
.L81:
	leaq	-2136(%rbp), %rax
	movl	$8, %edx
	leaq	.LC10(%rip), %rsi
	movq	%rsp, -2280(%rbp)
	movq	%rax, %rdi
	movq	%rax, -2248(%rbp)
	call	_ZNSt14basic_ifstreamIcSt11char_traitsIcEEC1EPKcSt13_Ios_Openmode@PLT
.LEHE12:
	leaq	-1616(%rbp), %rdi
	movl	$8, %edx
	leaq	.LC11(%rip), %rsi
.LEHB13:
	call	_ZNSt14basic_ifstreamIcSt11char_traitsIcEEC1EPKcSt13_Ios_Openmode@PLT
.LEHE13:
	leaq	-1096(%rbp), %rdi
	movl	$8, %edx
	leaq	.LC12(%rip), %rsi
.LEHB14:
	call	_ZNSt14basic_ifstreamIcSt11char_traitsIcEEC1EPKcSt13_Ios_Openmode@PLT
.LEHE14:
	movq	-2232(%rbp), %rdi
	movl	$8, %edx
	leaq	.LC13(%rip), %rsi
.LEHB15:
	call	_ZNSt14basic_ifstreamIcSt11char_traitsIcEEC1EPKcSt13_Ios_Openmode@PLT
.LEHE15:
	salq	$2, %r12
	xorl	%ebx, %ebx
	leaq	-1616(%rbp), %r14
.L82:
	cmpq	%r12, %rbx
	je	.L162
	movq	-2256(%rbp), %rax
	movq	-2248(%rbp), %rdi
	leaq	(%rax,%rbx), %rsi
.LEHB16:
	call	_ZNSi10_M_extractIfEERSiRT_@PLT
	movq	-2264(%rbp), %rax
	movq	%r14, %rdi
	leaq	(%rax,%rbx), %rsi
	call	_ZNSi10_M_extractIfEERSiRT_@PLT
	movq	-2272(%rbp), %rax
	leaq	-1096(%rbp), %rdi
	leaq	(%rax,%rbx), %rsi
	call	_ZNSi10_M_extractIfEERSiRT_@PLT
	movq	-2280(%rbp), %rax
	movq	-2232(%rbp), %rdi
	leaq	(%rax,%rbx), %rsi
	call	_ZNSi10_M_extractIfEERSiRT_@PLT
	addq	$4, %rbx
	jmp	.L82
.L162:
	leaq	_ZSt4cout(%rip), %rbx
	leaq	.LC14(%rip), %rsi
	movq	%rbx, %rdi
	call	_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc@PLT
	movl	-2240(%rbp), %esi
	movq	%rax, %rdi
	call	_ZNSolsEi@PLT
	leaq	.LC15(%rip), %rsi
	movq	%rbx, %rdi
	call	_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc@PLT
	xorl	%r12d, %r12d
	leaq	.LC16(%rip), %r14
.L84:
	movl	%r12d, %eax
	cmpl	%r12d, %r13d
	jle	.L163
	cltd
	idivl	%r15d
	testl	%edx, %edx
	jne	.L85
	movq	%r14, %rsi
	movq	%rbx, %rdi
	call	_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc@PLT
.L85:
	movq	-2256(%rbp), %rax
	movq	%rbx, %rdi
	cvtss2sd	(%rax,%r12,4), %xmm0
	call	_ZNSo9_M_insertIdEERSoT_@PLT
	movq	%rax, %rdi
	leaq	.LC17(%rip), %rsi
	call	_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc@PLT
	incq	%r12
	jmp	.L84
.L163:
	leaq	.LC18(%rip), %rsi
	movq	%rbx, %rdi
	call	_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc@PLT
	movq	%rax, %rdi
	cvtss2sd	-2284(%rbp), %xmm0
	call	_ZNSo9_M_insertIdEERSoT_@PLT
	movq	%rax, %rdi
	movl	$10, %esi
	call	_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_c.isra.0
	leaq	.LC19(%rip), %rsi
	movq	%rbx, %rdi
	call	_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc@PLT
	xorl	%r12d, %r12d
	leaq	.LC16(%rip), %r14
.L87:
	movl	%r12d, %eax
	cmpl	%r12d, %r13d
	jle	.L164
	cltd
	idivl	%r15d
	testl	%edx, %edx
	jne	.L88
	movq	%r14, %rsi
	movq	%rbx, %rdi
	call	_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc@PLT
.L88:
	movq	-2264(%rbp), %rax
	movq	%rbx, %rdi
	cvtss2sd	(%rax,%r12,4), %xmm0
	call	_ZNSo9_M_insertIdEERSoT_@PLT
	movq	%rax, %rdi
	leaq	.LC17(%rip), %rsi
	call	_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc@PLT
	incq	%r12
	jmp	.L87
.L164:
	leaq	.LC20(%rip), %rsi
	movq	%rbx, %rdi
	call	_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc@PLT
	xorl	%r12d, %r12d
	leaq	.LC16(%rip), %r14
.L90:
	movl	%r12d, %eax
	cmpl	%r12d, %r13d
	jle	.L165
	cltd
	idivl	%r15d
	testl	%edx, %edx
	jne	.L91
	movq	%r14, %rsi
	movq	%rbx, %rdi
	call	_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc@PLT
.L91:
	movq	-2272(%rbp), %rax
	movq	%rbx, %rdi
	cvtss2sd	(%rax,%r12,4), %xmm0
	call	_ZNSo9_M_insertIdEERSoT_@PLT
	movq	%rax, %rdi
	leaq	.LC17(%rip), %rsi
	call	_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc@PLT
	incq	%r12
	jmp	.L90
.L165:
	leaq	.LC21(%rip), %rsi
	movq	%rbx, %rdi
	call	_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc@PLT
	movq	%rax, %rdi
	cvtss2sd	-2288(%rbp), %xmm0
	call	_ZNSo9_M_insertIdEERSoT_@PLT
	movq	%rax, %rdi
	movl	$10, %esi
	call	_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_c.isra.0
	leaq	.LC22(%rip), %rsi
	movq	%rbx, %rdi
	call	_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc@PLT
	xorl	%r12d, %r12d
	leaq	.LC16(%rip), %r14
.L93:
	movl	%r12d, %eax
	cmpl	%r12d, %r13d
	jle	.L166
	cltd
	idivl	%r15d
	testl	%edx, %edx
	jne	.L94
	movq	%r14, %rsi
	movq	%rbx, %rdi
	call	_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc@PLT
.L94:
	movq	-2280(%rbp), %rax
	movq	%rbx, %rdi
	cvtss2sd	(%rax,%r12,4), %xmm0
	call	_ZNSo9_M_insertIdEERSoT_@PLT
	movq	%rax, %rdi
	leaq	.LC17(%rip), %rsi
	call	_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc@PLT
	incq	%r12
	jmp	.L93
.L166:
	movl	$10, %esi
	movq	%rbx, %rdi
	call	_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_c.isra.0
	movl	%r15d, %eax
	leaq	-2224(%rbp), %rdi
	movl	$1, -2164(%rbp)
	movl	$1, -2152(%rbp)
	cltd
	idivl	-2240(%rbp)
	movl	$1, -2140(%rbp)
	movl	%eax, %ebx
	shrl	%eax
	incl	%eax
	movl	%eax, -2160(%rbp)
	movl	%eax, -2156(%rbp)
	movl	%r15d, %eax
	shrl	%eax
	incl	%eax
	movl	%eax, -2148(%rbp)
	movl	%eax, -2144(%rbp)
	movslq	%r15d, %rax
	imulq	%rax, %rax
	leaq	0(,%rax,4), %r14
	movq	%r14, %rsi
	call	cudaMalloc@PLT
	leaq	-2216(%rbp), %rdi
	movq	%r14, %rsi
	call	cudaMalloc@PLT
	leaq	-2208(%rbp), %rdi
	movq	%r14, %rsi
	call	cudaMalloc@PLT
	leaq	-2192(%rbp), %rdi
	movq	%r14, %rsi
	call	cudaMalloc@PLT
	leaq	-2200(%rbp), %rdi
	movq	%r14, %rsi
	call	cudaMalloc@PLT
	movslq	%ebx, %rax
	leaq	-2184(%rbp), %rdi
	imulq	%rax, %rax
	salq	$2, %rax
	movq	%rax, %rsi
	movq	%rax, -2248(%rbp)
	call	cudaMalloc@PLT
	movq	-2264(%rbp), %rsi
	movq	-2224(%rbp), %rdi
	movl	$1, %ecx
	movq	%r14, %rdx
	call	cudaMemcpy@PLT
	movq	-2272(%rbp), %rsi
	movq	-2216(%rbp), %rdi
	movl	$1, %ecx
	movq	%r14, %rdx
	call	cudaMemcpy@PLT
	movq	-2280(%rbp), %rsi
	movq	-2208(%rbp), %rdi
	movl	$1, %ecx
	movq	%r14, %rdx
	call	cudaMemcpy@PLT
	movq	-2256(%rbp), %rsi
	movq	-2200(%rbp), %rdi
	movl	$1, %ecx
	movq	%r14, %rdx
	call	cudaMemcpy@PLT
	movl	-2164(%rbp), %ecx
	xorl	%r9d, %r9d
	xorl	%r8d, %r8d
	movq	-2148(%rbp), %rdi
	movabsq	$8589934594, %rdx
	movl	-2140(%rbp), %esi
	movq	%rdx, -2172(%rbp)
	call	__cudaPushCallConfiguration@PLT
	testl	%eax, %eax
	jne	.L96
	movq	-2192(%rbp), %rcx
	movss	-2288(%rbp), %xmm1
	movl	%r15d, %r8d
	movss	-2284(%rbp), %xmm0
	movq	-2208(%rbp), %rdx
	movq	-2216(%rbp), %rsi
	movq	-2224(%rbp), %rdi
	call	_Z32__device_stub__Z4gemmPfS_S_ffS_iPfS_S_ffS_i
.L96:
	call	cudaDeviceSynchronize@PLT
	call	cudaGetLastError@PLT
	movl	%eax, %edi
	testl	%eax, %eax
	je	.L97
.L159:
	call	cudaGetErrorString@PLT
	movq	stderr(%rip), %rdi
	movq	%rax, %rcx
	movl	$2, %esi
	xorl	%eax, %eax
	leaq	.LC23(%rip), %rdx
	call	__fprintf_chk@PLT
	movl	$1, %ebx
	jmp	.L98
.L97:
	movl	-2164(%rbp), %ecx
	movq	-2172(%rbp), %rdx
	xorl	%r9d, %r9d
	xorl	%r8d, %r8d
	movq	-2160(%rbp), %rdi
	movl	-2152(%rbp), %esi
	call	__cudaPushCallConfiguration@PLT
	testl	%eax, %eax
	jne	.L99
	movl	-2240(%rbp), %ecx
	movq	-2184(%rbp), %rsi
	movl	%r15d, %edx
	movq	-2200(%rbp), %rdi
	call	_Z30__device_stub__Z7maxpoolPfS_iiPfS_ii
.L99:
	call	cudaDeviceSynchronize@PLT
	call	cudaGetLastError@PLT
	movl	%eax, %edi
	testl	%eax, %eax
	jne	.L159
	movq	%r14, %rdi
	call	malloc@PLT
	movq	-2248(%rbp), %rdi
	movq	%rax, -2240(%rbp)
	call	malloc@PLT
	movq	-2192(%rbp), %rsi
	movl	$2, %ecx
	movq	%r14, %rdx
	movq	-2240(%rbp), %rdi
	movq	%rax, %r12
	call	cudaMemcpy@PLT
	movq	-2248(%rbp), %rdx
	movq	-2184(%rbp), %rsi
	movl	$2, %ecx
	movq	%r12, %rdi
	call	cudaMemcpy@PLT
	leaq	.LC24(%rip), %rsi
	leaq	_ZSt4cout(%rip), %rdi
	call	_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc@PLT
	xorl	%r14d, %r14d
.L102:
	movl	%r14d, %eax
	cmpl	%r14d, %r13d
	jle	.L167
	cltd
	idivl	%r15d
	testl	%edx, %edx
	jne	.L103
	leaq	.LC16(%rip), %rsi
	leaq	_ZSt4cout(%rip), %rdi
	call	_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc@PLT
.L103:
	movq	-2240(%rbp), %rax
	leaq	_ZSt4cout(%rip), %rdi
	cvtss2sd	(%rax,%r14,4), %xmm0
	call	_ZNSo9_M_insertIdEERSoT_@PLT
	movq	%rax, %rdi
	leaq	.LC17(%rip), %rsi
	call	_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc@PLT
	incq	%r14
	jmp	.L102
.L167:
	leaq	.LC25(%rip), %rsi
	leaq	_ZSt4cout(%rip), %rdi
	call	_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc@PLT
	movl	%ebx, %r15d
	xorl	%r14d, %r14d
	imull	%ebx, %r15d
.L105:
	movl	%r14d, %eax
	cmpl	%r14d, %r15d
	jle	.L168
	cltd
	idivl	%ebx
	testl	%edx, %edx
	jne	.L106
	leaq	.LC16(%rip), %rsi
	leaq	_ZSt4cout(%rip), %rdi
	call	_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc@PLT
.L106:
	leaq	_ZSt4cout(%rip), %rdi
	cvtss2sd	(%r12,%r14,4), %xmm0
	call	_ZNSo9_M_insertIdEERSoT_@PLT
	movq	%rax, %rdi
	leaq	.LC17(%rip), %rsi
	call	_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc@PLT
	incq	%r14
	jmp	.L105
.L168:
	movl	$10, %esi
	leaq	_ZSt4cout(%rip), %rdi
	call	_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_c.isra.0
	movq	-2224(%rbp), %rdi
	call	cudaFree@PLT
	movq	-2216(%rbp), %rdi
	call	cudaFree@PLT
	movq	-2208(%rbp), %rdi
	call	cudaFree@PLT
	movq	-2192(%rbp), %rdi
	call	cudaFree@PLT
	movq	-2200(%rbp), %rdi
	call	cudaFree@PLT
	movq	-2184(%rbp), %rdi
	call	cudaFree@PLT
.LEHE16:
	movq	-2240(%rbp), %rdi
	xorl	%ebx, %ebx
	call	free@PLT
	movq	%r12, %rdi
	call	free@PLT
.L98:
	leaq	-576(%rbp), %rdi
	call	_ZNSt14basic_ifstreamIcSt11char_traitsIcEED1Ev@PLT
	leaq	-1096(%rbp), %rdi
	call	_ZNSt14basic_ifstreamIcSt11char_traitsIcEED1Ev@PLT
	leaq	-1616(%rbp), %rdi
	call	_ZNSt14basic_ifstreamIcSt11char_traitsIcEED1Ev@PLT
	leaq	-2136(%rbp), %rdi
	call	_ZNSt14basic_ifstreamIcSt11char_traitsIcEED1Ev@PLT
	jmp	.L65
.L127:
	endbr64
	jmp	.L161
.L128:
	endbr64
	jmp	.L161
.L129:
	endbr64
	jmp	.L161
.L130:
	endbr64
.L161:
	movq	%rax, %rbx
.L114:
	movq	-2232(%rbp), %rdi
	call	_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE10_M_disposeEv@PLT
	jmp	.L160
.L134:
	endbr64
	movq	%rax, %rbx
.L116:
	movq	-2232(%rbp), %rdi
	call	_ZNSt14basic_ifstreamIcSt11char_traitsIcEED1Ev@PLT
	jmp	.L117
.L133:
	endbr64
	movq	%rax, %rbx
.L117:
	leaq	-1096(%rbp), %rdi
	call	_ZNSt14basic_ifstreamIcSt11char_traitsIcEED1Ev@PLT
	jmp	.L118
.L132:
	endbr64
	movq	%rax, %rbx
.L118:
	leaq	-1616(%rbp), %rdi
	call	_ZNSt14basic_ifstreamIcSt11char_traitsIcEED1Ev@PLT
	jmp	.L119
.L131:
	endbr64
	movq	%rax, %rbx
.L119:
	leaq	-2136(%rbp), %rdi
	call	_ZNSt14basic_ifstreamIcSt11char_traitsIcEED1Ev@PLT
.L160:
	movq	-56(%rbp), %rax
	subq	%fs:40, %rax
	jne	.L157
	movq	%rbx, %rdi
.LEHB17:
	call	_Unwind_Resume@PLT
.LEHE17:
.L65:
	movq	-56(%rbp), %rax
	subq	%fs:40, %rax
	je	.L121
.L157:
	call	__stack_chk_fail@PLT
.L121:
	leaq	-40(%rbp), %rsp
	movl	%ebx, %eax
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE4129:
	.section	.gcc_except_table,"a",@progbits
.LLSDA4129:
	.byte	0xff
	.byte	0xff
	.byte	0x1
	.uleb128 .LLSDACSE4129-.LLSDACSB4129
.LLSDACSB4129:
	.uleb128 .LEHB4-.LFB4129
	.uleb128 .LEHE4-.LEHB4
	.uleb128 0
	.uleb128 0
	.uleb128 .LEHB5-.LFB4129
	.uleb128 .LEHE5-.LEHB5
	.uleb128 .L127-.LFB4129
	.uleb128 0
	.uleb128 .LEHB6-.LFB4129
	.uleb128 .LEHE6-.LEHB6
	.uleb128 0
	.uleb128 0
	.uleb128 .LEHB7-.LFB4129
	.uleb128 .LEHE7-.LEHB7
	.uleb128 .L128-.LFB4129
	.uleb128 0
	.uleb128 .LEHB8-.LFB4129
	.uleb128 .LEHE8-.LEHB8
	.uleb128 0
	.uleb128 0
	.uleb128 .LEHB9-.LFB4129
	.uleb128 .LEHE9-.LEHB9
	.uleb128 .L129-.LFB4129
	.uleb128 0
	.uleb128 .LEHB10-.LFB4129
	.uleb128 .LEHE10-.LEHB10
	.uleb128 0
	.uleb128 0
	.uleb128 .LEHB11-.LFB4129
	.uleb128 .LEHE11-.LEHB11
	.uleb128 .L130-.LFB4129
	.uleb128 0
	.uleb128 .LEHB12-.LFB4129
	.uleb128 .LEHE12-.LEHB12
	.uleb128 0
	.uleb128 0
	.uleb128 .LEHB13-.LFB4129
	.uleb128 .LEHE13-.LEHB13
	.uleb128 .L131-.LFB4129
	.uleb128 0
	.uleb128 .LEHB14-.LFB4129
	.uleb128 .LEHE14-.LEHB14
	.uleb128 .L132-.LFB4129
	.uleb128 0
	.uleb128 .LEHB15-.LFB4129
	.uleb128 .LEHE15-.LEHB15
	.uleb128 .L133-.LFB4129
	.uleb128 0
	.uleb128 .LEHB16-.LFB4129
	.uleb128 .LEHE16-.LEHB16
	.uleb128 .L134-.LFB4129
	.uleb128 0
	.uleb128 .LEHB17-.LFB4129
	.uleb128 .LEHE17-.LEHB17
	.uleb128 0
	.uleb128 0
.LLSDACSE4129:
	.section	.text.startup
	.size	main, .-main
	.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:

/*
 * Find BLANK and replace your own code.
 * And submit report why do you replace the blank that way.
 */


#include <hip/hip_runtime.h>
#include<stdlib.h>
#include<iostream>
#include<fstream>
#include<vector>
#include<string>

#define TILE_WIDTH 2   /* set TILE_WIDTH 16 for the evaluation! */
#define MAXPOOL_INPUT_FILENAME "input.txt"
#define A_FILENAME "a.txt"
#define B_FILENAME "b.txt"
#define C_FILENAME "c.txt"

using namespace std;

__global__ void maxpool(float *input, float *output, const int input_size, const int filter_size) {
    // input : input_matrix address
    // output : output buffer address
    // input_size : width, height of input matrix
    // filter_size : filter_size of maxpolling
    // all input, output matrices are vectorized

    int col = blockDim.x * blockIdx.x + threadIdx.x;
    int row = blockDim.y * blockIdx.y + threadIdx.y;

    // out of bound

    // CHANGE
}

__global__ void gemm(float *a, float *b, float *c, const float alpha, const float beta, float *output, const int input_size){
    // a, b, c : input matrix address
    // alpha, beta : input constant
    // output : output buffer address
    // input_size : width, height of input matrix
    // all input, output matrices are vectorized

    int tx = threadIdx.x, ty = threadIdx.y;
    int bx = blockIdx.x,  by = blockIdx.y;

    int row = by*blockDim.y + ty;
    int col = bx*blockDim.x + tx;
    
    if(row>=input_size ||col>=input_size) { return; }
    
    // allocate 2D tiles in __shared__ memory
    __shared__ float s_a[TILE_WIDTH][TILE_WIDTH];
    __shared__ float s_b[TILE_WIDTH][TILE_WIDTH];

    float result = 0;

    // make sure you handle the case when the matrix sizes are not
    // multiple of TILE_WIDTH!
    // loop over the tiles of the input in phases
    for(int p = 0; p < input_size/TILE_WIDTH; ++p){
        // CHANGE

        // You need to use __syncthreads() a few times
        // to synchronize the threads in a thread block.
    }

    // write out the result to output[row*input_size + col] 
    // CHANGE
}


int main(int argc, char **argv) {
    if(argc < 4) {
        cout << "usage : " << argv[0] << " input_size filter_size alpha beta\n" << "example : " << argv[0] << " 100 2 0.5 0.8\n";
        return 1;
    }
    const int input_size = stoi(argv[1]);
    const int filter_size = stoi(argv[2]); // used for maxpooling
    const float alpha = stof(argv[3]);
    const float beta = stof(argv[4]);
    const int maxpool_output_size = input_size/filter_size;

    // check input_size is power of 2
    if(input_size == 0 && (input_size & (input_size-1))){
        cout << "input_size must be power of 2\n";
        return 1;
    }

    if(filter_size == 0){
        cout << "filter_size cannot be 0\n";
        return 1;
    }

    float maxpool_input[input_size*input_size];
    float a[input_size*input_size];
    float b[input_size*input_size];
    float c[input_size*input_size];
    
    // read input matrices 
    ifstream input_in(MAXPOOL_INPUT_FILENAME);
    ifstream a_in(A_FILENAME);
    ifstream b_in(B_FILENAME);
    ifstream c_in(C_FILENAME);

    for (int i = 0; i < input_size*input_size; ++i) {
        input_in >> maxpool_input[i];
        a_in >> a[i];
        b_in >> b[i];
        c_in >> c[i];
    }
    
    // prints inputs for debugging.
    cout<<"filter size : "<<filter_size;
    cout<<"\n========== MAXPOOL_INPUT ==========\n";
    for (int i = 0; i < input_size * input_size; ++i) {
        if(i%input_size==0) cout<<"\n";
        cout<<maxpool_input[i]<<" ";
    }
    cout<<"\nalpha : "<<alpha<<'\n';
    cout<<"========== A ==========\n";
    for (int i = 0; i < input_size * input_size; ++i) {
        if(i%input_size==0) cout<<"\n";
        cout<<a[i]<<" ";
    }
    cout<<"\n========== B ==========\n";
    for (int i = 0; i < input_size * input_size; ++i) {
        if(i%input_size==0) cout<<"\n";
        cout<<b[i]<<" ";
    }
    cout<<"\nbeta : "<<beta<<'\n';
    cout<<"========== C ==========\n";
    for (int i = 0; i < input_size * input_size; ++i) {
        if(i%input_size==0) cout<<"\n";
        cout<<c[i]<<" ";
    }
    cout<<'\n';
       
    // set thread, block dimensions
    const dim3 block_size(TILE_WIDTH, TILE_WIDTH);
    const dim3 num_of_maxpool_blocks(maxpool_output_size/block_size.x+1, maxpool_output_size/block_size.y+1);
    const dim3 num_of_blocks(input_size/block_size.x+1, input_size/block_size.y+1);

    // memory allocation for the device
    float *dev_mem_a, *dev_mem_b, *dev_mem_c, *dev_mem_input, *gemm_output, *maxpool_output;
    hipMalloc(&dev_mem_a, sizeof(float) * input_size * input_size);
    hipMalloc(&dev_mem_b, sizeof(float) * input_size * input_size);
    hipMalloc(&dev_mem_c, sizeof(float) * input_size * input_size);
    hipMalloc(&gemm_output, sizeof(float) * input_size * input_size);
    hipMalloc(&dev_mem_input, sizeof(float) * input_size * input_size);
    hipMalloc(&maxpool_output, sizeof(float) * maxpool_output_size * maxpool_output_size);
    
    // copy variable to device memory
    hipMemcpy(dev_mem_a, &a, sizeof(float) * input_size * input_size, hipMemcpyHostToDevice);
    hipMemcpy(dev_mem_b, &b, sizeof(float) * input_size * input_size, hipMemcpyHostToDevice);
    hipMemcpy(dev_mem_c, &c, sizeof(float) * input_size * input_size, hipMemcpyHostToDevice);
    hipMemcpy(dev_mem_input, &maxpool_input, sizeof(float) * input_size * input_size, hipMemcpyHostToDevice);

    // launch CUDA kernels

    // First launch gemm kernel
    gemm<<<num_of_blocks, block_size>>>(dev_mem_a, dev_mem_b, dev_mem_c, alpha, beta, gemm_output, input_size);
    hipDeviceSynchronize();
    hipError_t error = hipGetLastError();
    if(error!=hipSuccess) {
        fprintf(stderr, "ERROR %s\n", hipGetErrorString(error));
        return 1;
    }
 
    // Then run maxpooling
    maxpool<<<num_of_maxpool_blocks, block_size>>>(dev_mem_input, maxpool_output, input_size, filter_size);
    hipDeviceSynchronize();
    error = hipGetLastError();
    if(error!=hipSuccess) {
        fprintf(stderr, "ERROR %s\n", hipGetErrorString(error));
        return 1;
    }
 
    // allocate output buf in main memory
    float *gemm_output_buf = (float*) malloc (sizeof(float)*input_size*input_size);
    float *maxpool_output_buf = (float*) malloc (sizeof(float)*maxpool_output_size*maxpool_output_size);
    
    // copy results from device to host
    hipMemcpy(gemm_output_buf, gemm_output, sizeof(float)*input_size*input_size, hipMemcpyDeviceToHost);
    hipMemcpy(maxpool_output_buf, maxpool_output, sizeof(float)*maxpool_output_size*maxpool_output_size, hipMemcpyDeviceToHost);
    
    // prints the results
    cout<<"\n========== GEMM OUTPUT ==========\n";
    for (int i = 0; i < input_size * input_size; ++i) {
        if(i%input_size==0) cout<<"\n";
        cout<<gemm_output_buf[i]<<" ";
    }
    cout<<"\n========== MAXPOOL OUTPUT ==========\n";
    for (int i = 0; i < maxpool_output_size * maxpool_output_size; ++i) {
        if(i%maxpool_output_size==0) cout<<"\n";
        cout<<maxpool_output_buf[i]<<" ";
    }
    cout<<'\n';

    hipFree(dev_mem_a);
    hipFree(dev_mem_b);
    hipFree(dev_mem_c);
    hipFree(gemm_output);
    hipFree(dev_mem_input);
    hipFree(maxpool_output);
    free(gemm_output_buf);
    free(maxpool_output_buf);
    return 0;
}

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

                                        # End of file scope inline assembly
	.globl	_Z22__device_stub__maxpoolPfS_ii # -- Begin function _Z22__device_stub__maxpoolPfS_ii
	.type	_Z22__device_stub__maxpoolPfS_ii,@function
_Z22__device_stub__maxpoolPfS_ii:       # @_Z22__device_stub__maxpoolPfS_ii
	.cfi_startproc
# %bb.0:
	pushq	%r15
	.cfi_def_cfa_offset 16
	pushq	%r14
	.cfi_def_cfa_offset 24
	pushq	%r13
	.cfi_def_cfa_offset 32
	pushq	%r12
	.cfi_def_cfa_offset 40
	pushq	%rbx
	.cfi_def_cfa_offset 48
	subq	$112, %rsp
	.cfi_def_cfa_offset 160
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r13, -32
	.cfi_offset %r14, -24
	.cfi_offset %r15, -16
	leaq	40(%rsp), %rax
	movq	%rdi, (%rax)
	leaq	32(%rsp), %rdi
	movq	%rsi, (%rdi)
	leaq	12(%rsp), %rsi
	movl	%edx, (%rsi)
	leaq	8(%rsp), %rdx
	movl	%ecx, (%rdx)
	leaq	80(%rsp), %rbx
	movq	%rax, (%rbx)
	movq	%rdi, 8(%rbx)
	movq	%rsi, 16(%rbx)
	movq	%rdx, 24(%rbx)
	leaq	64(%rsp), %r14
	leaq	48(%rsp), %r15
	leaq	24(%rsp), %r12
	leaq	16(%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	$_Z7maxpoolPfS_ii, %edi
	movq	%rbx, %r9
	pushq	(%r13)
	.cfi_adjust_cfa_offset 8
	pushq	(%r12)
	.cfi_adjust_cfa_offset 8
	callq	hipLaunchKernel
	addq	$128, %rsp
	.cfi_adjust_cfa_offset -128
	popq	%rbx
	.cfi_def_cfa_offset 40
	popq	%r12
	.cfi_def_cfa_offset 32
	popq	%r13
	.cfi_def_cfa_offset 24
	popq	%r14
	.cfi_def_cfa_offset 16
	popq	%r15
	.cfi_def_cfa_offset 8
	retq
.Lfunc_end0:
	.size	_Z22__device_stub__maxpoolPfS_ii, .Lfunc_end0-_Z22__device_stub__maxpoolPfS_ii
	.cfi_endproc
                                        # -- End function
	.globl	_Z19__device_stub__gemmPfS_S_ffS_i # -- Begin function _Z19__device_stub__gemmPfS_S_ffS_i
	.type	_Z19__device_stub__gemmPfS_S_ffS_i,@function
_Z19__device_stub__gemmPfS_S_ffS_i:     # @_Z19__device_stub__gemmPfS_S_ffS_i
	.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	56(%rsp), %rax
	movq	%rdi, (%rax)
	leaq	48(%rsp), %rdi
	movq	%rsi, (%rdi)
	leaq	40(%rsp), %rsi
	movq	%rdx, (%rsi)
	leaq	12(%rsp), %rdx
	movss	%xmm0, (%rdx)
	leaq	8(%rsp), %r9
	movss	%xmm1, (%r9)
	leaq	32(%rsp), %r10
	movq	%rcx, (%r10)
	leaq	4(%rsp), %rcx
	movl	%r8d, (%rcx)
	leaq	96(%rsp), %rbx
	movq	%rax, (%rbx)
	movq	%rdi, 8(%rbx)
	movq	%rsi, 16(%rbx)
	movq	%rdx, 24(%rbx)
	movq	%r9, 32(%rbx)
	movq	%r10, 40(%rbx)
	movq	%rcx, 48(%rbx)
	leaq	80(%rsp), %r14
	leaq	64(%rsp), %r15
	leaq	24(%rsp), %r12
	leaq	16(%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	$_Z4gemmPfS_S_ffS_i, %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	_Z19__device_stub__gemmPfS_S_ffS_i, .Lfunc_end1-_Z19__device_stub__gemmPfS_S_ffS_i
	.cfi_endproc
                                        # -- End function
	.globl	main                            # -- Begin function 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	$2216, %rsp                     # imm = 0x8A8
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r15
	cmpl	$3, %edi
	jg	.LBB2_3
# %bb.1:
	movl	$_ZSt4cout, %edi
	movl	$.L.str, %esi
	movl	$8, %edx
	callq	_ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l
	movq	(%r15), %rbx
	testq	%rbx, %rbx
	je	.LBB2_61
# %bb.2:
	movq	%rbx, %rdi
	callq	strlen
	movl	$_ZSt4cout, %edi
	movq	%rbx, %rsi
	movq	%rax, %rdx
	callq	_ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l
	jmp	.LBB2_62
.LBB2_3:
	movq	8(%r15), %rsi
.Ltmp0:
	leaq	-688(%rbp), %rdi
	leaq	-1208(%rbp), %rdx
	callq	_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_
.Ltmp1:
# %bb.4:
	movq	-688(%rbp), %rbx
	callq	__errno_location
	movq	%rax, %r14
	movl	(%rax), %r13d
	movl	$0, (%rax)
	leaq	-1728(%rbp), %r12
	movq	%rbx, %rdi
	movq	%r12, %rsi
	movl	$10, %edx
	callq	__isoc23_strtol
	cmpq	%rbx, (%r12)
	je	.LBB2_154
# %bb.5:
	movslq	%eax, %rcx
	movq	%rax, -48(%rbp)                 # 8-byte Spill
	cmpq	%rax, %rcx
	jne	.LBB2_156
# %bb.6:
	movl	(%r14), %eax
	cmpl	$34, %eax
	je	.LBB2_156
# %bb.7:
	testl	%eax, %eax
	jne	.LBB2_9
# %bb.8:
	movl	%r13d, (%r14)
.LBB2_9:
	leaq	-672(%rbp), %rax
	movq	-16(%rax), %rdi
	cmpq	%rax, %rdi
	je	.LBB2_11
# %bb.10:                               # %_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE11_M_is_localEv.exit.i.i
	callq	_ZdlPv
.LBB2_11:                               # %_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev.exit
	movq	16(%r15), %rsi
.Ltmp3:
	leaq	-688(%rbp), %rdi
	leaq	-1208(%rbp), %rdx
	callq	_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_
.Ltmp4:
# %bb.12:
	movq	-688(%rbp), %rbx
	movl	(%r14), %r13d
	movl	$0, (%r14)
	movq	%rbx, %rdi
	movq	%r12, %rsi
	movl	$10, %edx
	callq	__isoc23_strtol
	cmpq	%rbx, (%r12)
	je	.LBB2_158
# %bb.13:
	movabsq	$-4294967296, %rdx              # imm = 0xFFFFFFFF00000000
	leaq	-2147483648(%rax), %rcx
	cmpq	%rdx, %rcx
	jb	.LBB2_160
# %bb.14:
	movl	(%r14), %ecx
	cmpl	$34, %ecx
	je	.LBB2_160
# %bb.15:
	movq	%rax, -80(%rbp)                 # 8-byte Spill
	testl	%ecx, %ecx
	jne	.LBB2_17
# %bb.16:
	movl	%r13d, (%r14)
.LBB2_17:
	movq	-688(%rbp), %rdi
	leaq	-672(%rbp), %rax
	cmpq	%rax, %rdi
	je	.LBB2_19
# %bb.18:                               # %_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE11_M_is_localEv.exit.i.i199
	callq	_ZdlPv
.LBB2_19:                               # %_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev.exit201
	movq	24(%r15), %rsi
.Ltmp6:
	leaq	-688(%rbp), %rdi
	leaq	-1208(%rbp), %rdx
	callq	_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_
.Ltmp7:
# %bb.20:
	movq	-688(%rbp), %rbx
	movl	(%r14), %r13d
	movl	$0, (%r14)
	movq	%rbx, %rdi
	movq	%r12, %rsi
	callq	strtof
	movss	%xmm0, -72(%rbp)                # 4-byte Spill
	cmpq	%rbx, (%r12)
	je	.LBB2_162
# %bb.21:
	movl	(%r14), %eax
	testl	%eax, %eax
	je	.LBB2_25
# %bb.22:
	cmpl	$34, %eax
	jne	.LBB2_26
# %bb.23:                               # %.critedge.i.i202
.Ltmp9:
	movl	$.L.str.23, %edi
	callq	_ZSt20__throw_out_of_rangePKc
.Ltmp10:
# %bb.24:
.LBB2_25:
	movl	%r13d, (%r14)
.LBB2_26:
	movq	-688(%rbp), %rdi
	leaq	-672(%rbp), %rax
	cmpq	%rax, %rdi
	je	.LBB2_28
# %bb.27:                               # %_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE11_M_is_localEv.exit.i.i205
	callq	_ZdlPv
.LBB2_28:                               # %_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev.exit207
	movq	32(%r15), %rsi
.Ltmp11:
	leaq	-688(%rbp), %rdi
	leaq	-1208(%rbp), %rdx
	callq	_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_
.Ltmp12:
# %bb.29:
	movq	-688(%rbp), %rbx
	movl	(%r14), %r12d
	movl	$0, (%r14)
	leaq	-1728(%rbp), %r15
	movq	%rbx, %rdi
	movq	%r15, %rsi
	callq	strtof
	movss	%xmm0, -68(%rbp)                # 4-byte Spill
	cmpq	%rbx, (%r15)
	je	.LBB2_164
# %bb.30:
	movl	(%r14), %eax
	testl	%eax, %eax
	je	.LBB2_34
# %bb.31:
	cmpl	$34, %eax
	jne	.LBB2_35
# %bb.32:                               # %.critedge.i.i208
.Ltmp14:
	movl	$.L.str.23, %edi
	callq	_ZSt20__throw_out_of_rangePKc
.Ltmp15:
# %bb.33:
.LBB2_34:
	movl	%r12d, (%r14)
.LBB2_35:
	movq	-688(%rbp), %rdi
	leaq	-672(%rbp), %rax
	cmpq	%rax, %rdi
	je	.LBB2_37
# %bb.36:                               # %_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE11_M_is_localEv.exit.i.i213
	callq	_ZdlPv
.LBB2_37:                               # %_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev.exit215
	movq	%rsp, -168(%rbp)                # 8-byte Spill
	movq	-48(%rbp), %rcx                 # 8-byte Reload
	movl	%ecx, %eax
	cltd
	idivl	-80(%rbp)                       # 4-byte Folded Reload
	movl	%eax, -56(%rbp)                 # 4-byte Spill
	movl	%ecx, %ebx
	imull	%ebx, %ebx
	movq	%rsp, %r14
	leaq	15(,%rbx,4), %rax
	andq	$-16, %rax
	subq	%rax, %r14
	movq	%r14, %rsp
	movq	%rsp, %rcx
	subq	%rax, %rcx
	movq	%rcx, -104(%rbp)                # 8-byte Spill
	movq	%rcx, %rsp
	movq	%rsp, %rcx
	subq	%rax, %rcx
	movq	%rcx, -96(%rbp)                 # 8-byte Spill
	movq	%rcx, %rsp
	movq	%rsp, %r15
	subq	%rax, %r15
	movq	%r15, %rsp
	leaq	-688(%rbp), %rdi
	movl	$.L.str.6, %esi
	movl	$8, %edx
	callq	_ZNSt14basic_ifstreamIcSt11char_traitsIcEEC1EPKcSt13_Ios_Openmode
.Ltmp16:
	leaq	-1728(%rbp), %rdi
	movl	$.L.str.7, %esi
	movl	$8, %edx
	callq	_ZNSt14basic_ifstreamIcSt11char_traitsIcEEC1EPKcSt13_Ios_Openmode
.Ltmp17:
# %bb.38:
.Ltmp19:
	leaq	-1208(%rbp), %rdi
	movl	$.L.str.8, %esi
	movl	$8, %edx
	callq	_ZNSt14basic_ifstreamIcSt11char_traitsIcEEC1EPKcSt13_Ios_Openmode
.Ltmp20:
# %bb.39:
.Ltmp22:
	movq	%r15, -88(%rbp)                 # 8-byte Spill
	movq	%r14, -152(%rbp)                # 8-byte Spill
	movq	%rbx, -160(%rbp)                # 8-byte Spill
	leaq	-2248(%rbp), %rdi
	movl	$.L.str.9, %esi
	movl	$8, %edx
	callq	_ZNSt14basic_ifstreamIcSt11char_traitsIcEEC1EPKcSt13_Ios_Openmode
.Ltmp23:
# %bb.40:                               # %.preheader
	cmpl	$0, -48(%rbp)                   # 4-byte Folded Reload
	je	.LBB2_47
# %bb.41:                               # %.lr.ph.preheader
	movq	-160(%rbp), %r14                # 8-byte Reload
	cmpl	$1, %r14d
                                        # kill: def $r14d killed $r14d killed $r14 def $r14
	adcl	$0, %r14d
	movq	-152(%rbp), %rbx                # 8-byte Reload
	movq	-104(%rbp), %r12                # 8-byte Reload
	movq	-96(%rbp), %r13                 # 8-byte Reload
	movq	-88(%rbp), %r15                 # 8-byte Reload
.LBB2_42:                               # %.lr.ph
                                        # =>This Inner Loop Header: Depth=1
.Ltmp25:
	leaq	-688(%rbp), %rdi
	movq	%rbx, %rsi
	callq	_ZNSi10_M_extractIfEERSiRT_
.Ltmp26:
# %bb.43:                               # %_ZNSirsERf.exit
                                        #   in Loop: Header=BB2_42 Depth=1
.Ltmp27:
	leaq	-1728(%rbp), %rdi
	movq	%r12, %rsi
	callq	_ZNSi10_M_extractIfEERSiRT_
.Ltmp28:
# %bb.44:                               # %_ZNSirsERf.exit229
                                        #   in Loop: Header=BB2_42 Depth=1
.Ltmp29:
	leaq	-1208(%rbp), %rdi
	movq	%r13, %rsi
	callq	_ZNSi10_M_extractIfEERSiRT_
.Ltmp30:
# %bb.45:                               # %_ZNSirsERf.exit230
                                        #   in Loop: Header=BB2_42 Depth=1
.Ltmp31:
	leaq	-2248(%rbp), %rdi
	movq	%r15, %rsi
	callq	_ZNSi10_M_extractIfEERSiRT_
.Ltmp32:
# %bb.46:                               # %_ZNSirsERf.exit231
                                        #   in Loop: Header=BB2_42 Depth=1
	addq	$4, %r15
	addq	$4, %r13
	addq	$4, %r12
	addq	$4, %rbx
	decq	%r14
	jne	.LBB2_42
.LBB2_47:                               # %._crit_edge
.Ltmp34:
	movl	$_ZSt4cout, %edi
	movl	$.L.str.10, %esi
	movl	$14, %edx
	callq	_ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l
.Ltmp35:
	movq	-160(%rbp), %r13                # 8-byte Reload
	movq	-152(%rbp), %r15                # 8-byte Reload
	movq	-88(%rbp), %r12                 # 8-byte Reload
# %bb.48:                               # %_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc.exit228
.Ltmp36:
	movl	$_ZSt4cout, %edi
	movq	-80(%rbp), %rsi                 # 8-byte Reload
                                        # kill: def $esi killed $esi killed $rsi
	callq	_ZNSolsEi
.Ltmp37:
# %bb.49:
.Ltmp38:
	movl	$_ZSt4cout, %edi
	movl	$.L.str.11, %esi
	movl	$37, %edx
	callq	_ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l
.Ltmp39:
# %bb.50:                               # %_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc.exit232.preheader
	cmpl	$0, -48(%rbp)                   # 4-byte Folded Reload
	je	.LBB2_57
# %bb.51:                               # %.lr.ph316.preheader
	cmpl	$1, %r13d
	movl	%r13d, %r14d
	adcl	$0, %r14d
	xorl	%ebx, %ebx
.LBB2_52:                               # %.lr.ph316
                                        # =>This Inner Loop Header: Depth=1
	movl	%ebx, %eax
	cltd
	idivl	-48(%rbp)                       # 4-byte Folded Reload
	testl	%edx, %edx
	jne	.LBB2_54
# %bb.53:                               #   in Loop: Header=BB2_52 Depth=1
.Ltmp40:
	movl	$_ZSt4cout, %edi
	movl	$.L.str.12, %esi
	movl	$1, %edx
	callq	_ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l
.Ltmp41:
.LBB2_54:                               # %_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc.exit234
                                        #   in Loop: Header=BB2_52 Depth=1
	xorps	%xmm0, %xmm0
	cvtss2sd	(%r15,%rbx,4), %xmm0
.Ltmp42:
	movl	$_ZSt4cout, %edi
	callq	_ZNSo9_M_insertIdEERSoT_
.Ltmp43:
# %bb.55:                               # %_ZNSolsEf.exit
                                        #   in Loop: Header=BB2_52 Depth=1
.Ltmp44:
	movl	$.L.str.13, %esi
	movl	$1, %edx
	movq	%rax, %rdi
	callq	_ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l
.Ltmp45:
# %bb.56:                               # %_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc.exit235
                                        #   in Loop: Header=BB2_52 Depth=1
	incq	%rbx
	cmpq	%rbx, %r14
	jne	.LBB2_52
.LBB2_57:                               # %_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc.exit232._crit_edge
.Ltmp47:
	movl	$_ZSt4cout, %edi
	movl	$.L.str.14, %esi
	movl	$9, %edx
	callq	_ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l
.Ltmp48:
# %bb.58:                               # %_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc.exit233
	xorps	%xmm0, %xmm0
	cvtss2sd	-72(%rbp), %xmm0                # 4-byte Folded Reload
.Ltmp49:
	movl	$_ZSt4cout, %edi
	callq	_ZNSo9_M_insertIdEERSoT_
.Ltmp50:
# %bb.59:                               # %_ZNSolsEf.exit236
	movb	$10, -64(%rbp)
	movq	(%rax), %rcx
	movq	-24(%rcx), %rcx
	cmpq	$0, 16(%rax,%rcx)
	je	.LBB2_66
# %bb.60:
.Ltmp51:
	leaq	-64(%rbp), %rsi
	movl	$1, %edx
	movq	%rax, %rdi
	callq	_ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l
.Ltmp52:
	jmp	.LBB2_67
.LBB2_61:
	movq	_ZSt4cout(%rip), %rax
	movq	-24(%rax), %rax
	leaq	_ZSt4cout(%rax), %rdi
	movl	32(%rdi), %esi
	orl	$1, %esi
	callq	_ZNSt9basic_iosIcSt11char_traitsIcEE5clearESt12_Ios_Iostate
.LBB2_62:                               # %_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc.exit
	movl	$_ZSt4cout, %edi
	movl	$.L.str.1, %esi
	movl	$35, %edx
	callq	_ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l
	movl	$_ZSt4cout, %edi
	movl	$.L.str.2, %esi
	movl	$10, %edx
	callq	_ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l
	movq	(%r15), %rbx
	testq	%rbx, %rbx
	je	.LBB2_64
# %bb.63:
	movq	%rbx, %rdi
	callq	strlen
	movl	$_ZSt4cout, %edi
	movq	%rbx, %rsi
	movq	%rax, %rdx
	callq	_ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l
	jmp	.LBB2_65
.LBB2_64:
	movq	_ZSt4cout(%rip), %rax
	movq	-24(%rax), %rax
	leaq	_ZSt4cout(%rax), %rdi
	movl	32(%rdi), %esi
	orl	$1, %esi
	callq	_ZNSt9basic_iosIcSt11char_traitsIcEE5clearESt12_Ios_Iostate
.LBB2_65:                               # %_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc.exit192
	movl	$_ZSt4cout, %edi
	movl	$.L.str.3, %esi
	movl	$15, %edx
	callq	_ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l
	movl	$1, %ebx
	jmp	.LBB2_150
.LBB2_66:
.Ltmp53:
	movq	%rax, %rdi
	movl	$10, %esi
	callq	_ZNSo3putEc
.Ltmp54:
.LBB2_67:
.Ltmp55:
	movl	$_ZSt4cout, %edi
	movl	$.L.str.15, %esi
	movl	$24, %edx
	callq	_ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l
.Ltmp56:
# %bb.68:                               # %_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc.exit240.preheader
	cmpl	$0, -48(%rbp)                   # 4-byte Folded Reload
	je	.LBB2_75
# %bb.69:                               # %.lr.ph318.preheader
	cmpl	$1, %r13d
	movl	%r13d, %r14d
	adcl	$0, %r14d
	xorl	%ebx, %ebx
.LBB2_70:                               # %.lr.ph318
                                        # =>This Inner Loop Header: Depth=1
	movl	%ebx, %eax
	cltd
	idivl	-48(%rbp)                       # 4-byte Folded Reload
	testl	%edx, %edx
	jne	.LBB2_72
# %bb.71:                               #   in Loop: Header=BB2_70 Depth=1
.Ltmp57:
	movl	$_ZSt4cout, %edi
	movl	$.L.str.12, %esi
	movl	$1, %edx
	callq	_ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l
.Ltmp58:
.LBB2_72:                               # %_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc.exit244
                                        #   in Loop: Header=BB2_70 Depth=1
	movq	-104(%rbp), %rax                # 8-byte Reload
	xorps	%xmm0, %xmm0
	cvtss2sd	(%rax,%rbx,4), %xmm0
.Ltmp59:
	movl	$_ZSt4cout, %edi
	callq	_ZNSo9_M_insertIdEERSoT_
.Ltmp60:
# %bb.73:                               # %_ZNSolsEf.exit246
                                        #   in Loop: Header=BB2_70 Depth=1
.Ltmp61:
	movl	$.L.str.13, %esi
	movl	$1, %edx
	movq	%rax, %rdi
	callq	_ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l
.Ltmp62:
# %bb.74:                               # %_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc.exit248
                                        #   in Loop: Header=BB2_70 Depth=1
	incq	%rbx
	cmpq	%rbx, %r14
	jne	.LBB2_70
.LBB2_75:                               # %_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc.exit240._crit_edge
.Ltmp64:
	movl	$_ZSt4cout, %edi
	movl	$.L.str.16, %esi
	movl	$25, %edx
	callq	_ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l
.Ltmp65:
# %bb.76:                               # %_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc.exit242.preheader
	cmpl	$0, -48(%rbp)                   # 4-byte Folded Reload
	je	.LBB2_83
# %bb.77:                               # %.lr.ph320.preheader
	cmpl	$1, %r13d
	movl	%r13d, %r14d
	adcl	$0, %r14d
	xorl	%ebx, %ebx
.LBB2_78:                               # %.lr.ph320
                                        # =>This Inner Loop Header: Depth=1
	movl	%ebx, %eax
	cltd
	idivl	-48(%rbp)                       # 4-byte Folded Reload
	testl	%edx, %edx
	jne	.LBB2_80
# %bb.79:                               #   in Loop: Header=BB2_78 Depth=1
.Ltmp66:
	movl	$_ZSt4cout, %edi
	movl	$.L.str.12, %esi
	movl	$1, %edx
	callq	_ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l
.Ltmp67:
.LBB2_80:                               # %_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc.exit252
                                        #   in Loop: Header=BB2_78 Depth=1
	movq	-96(%rbp), %rax                 # 8-byte Reload
	xorps	%xmm0, %xmm0
	cvtss2sd	(%rax,%rbx,4), %xmm0
.Ltmp68:
	movl	$_ZSt4cout, %edi
	callq	_ZNSo9_M_insertIdEERSoT_
.Ltmp69:
# %bb.81:                               # %_ZNSolsEf.exit254
                                        #   in Loop: Header=BB2_78 Depth=1
.Ltmp70:
	movl	$.L.str.13, %esi
	movl	$1, %edx
	movq	%rax, %rdi
	callq	_ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l
.Ltmp71:
# %bb.82:                               # %_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc.exit256
                                        #   in Loop: Header=BB2_78 Depth=1
	incq	%rbx
	cmpq	%rbx, %r14
	jne	.LBB2_78
.LBB2_83:                               # %_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc.exit242._crit_edge
.Ltmp73:
	movl	$_ZSt4cout, %edi
	movl	$.L.str.17, %esi
	movl	$8, %edx
	callq	_ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l
.Ltmp74:
# %bb.84:                               # %_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc.exit250
	xorps	%xmm0, %xmm0
	cvtss2sd	-68(%rbp), %xmm0                # 4-byte Folded Reload
.Ltmp75:
	movl	$_ZSt4cout, %edi
	callq	_ZNSo9_M_insertIdEERSoT_
.Ltmp76:
# %bb.85:                               # %_ZNSolsEf.exit258
	movb	$10, -64(%rbp)
	movq	(%rax), %rcx
	movq	-24(%rcx), %rcx
	cmpq	$0, 16(%rax,%rcx)
	je	.LBB2_87
# %bb.86:
.Ltmp77:
	leaq	-64(%rbp), %rsi
	movl	$1, %edx
	movq	%rax, %rdi
	callq	_ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l
.Ltmp78:
	jmp	.LBB2_88
.LBB2_87:
.Ltmp79:
	movq	%rax, %rdi
	movl	$10, %esi
	callq	_ZNSo3putEc
.Ltmp80:
.LBB2_88:
.Ltmp81:
	movl	$_ZSt4cout, %edi
	movl	$.L.str.18, %esi
	movl	$24, %edx
	callq	_ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l
.Ltmp82:
# %bb.89:                               # %_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc.exit265.preheader
	cmpl	$0, -48(%rbp)                   # 4-byte Folded Reload
	je	.LBB2_96
# %bb.90:                               # %.lr.ph322.preheader
	cmpl	$1, %r13d
	movl	%r13d, %r14d
	adcl	$0, %r14d
	xorl	%ebx, %ebx
.LBB2_91:                               # %.lr.ph322
                                        # =>This Inner Loop Header: Depth=1
	movl	%ebx, %eax
	cltd
	idivl	-48(%rbp)                       # 4-byte Folded Reload
	testl	%edx, %edx
	jne	.LBB2_93
# %bb.92:                               #   in Loop: Header=BB2_91 Depth=1
.Ltmp83:
	movl	$_ZSt4cout, %edi
	movl	$.L.str.12, %esi
	movl	$1, %edx
	callq	_ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l
.Ltmp84:
.LBB2_93:                               # %_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc.exit272
                                        #   in Loop: Header=BB2_91 Depth=1
	xorps	%xmm0, %xmm0
	cvtss2sd	(%r12,%rbx,4), %xmm0
.Ltmp85:
	movl	$_ZSt4cout, %edi
	callq	_ZNSo9_M_insertIdEERSoT_
.Ltmp86:
# %bb.94:                               # %_ZNSolsEf.exit274
                                        #   in Loop: Header=BB2_91 Depth=1
.Ltmp87:
	movl	$.L.str.13, %esi
	movl	$1, %edx
	movq	%rax, %rdi
	callq	_ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l
.Ltmp88:
# %bb.95:                               # %_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc.exit276
                                        #   in Loop: Header=BB2_91 Depth=1
	incq	%rbx
	cmpq	%rbx, %r14
	jne	.LBB2_91
.LBB2_96:                               # %_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc.exit265._crit_edge
	movb	$10, -64(%rbp)
	movq	_ZSt4cout(%rip), %rax
	movq	-24(%rax), %rax
	cmpq	$0, _ZSt4cout+16(%rax)
	je	.LBB2_98
# %bb.97:
.Ltmp90:
	leaq	-64(%rbp), %rsi
	movl	$_ZSt4cout, %edi
	movl	$1, %edx
	callq	_ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l
.Ltmp91:
	jmp	.LBB2_99
.LBB2_98:
.Ltmp92:
	movl	$_ZSt4cout, %edi
	movl	$10, %esi
	callq	_ZNSo3putEc
.Ltmp93:
.LBB2_99:
	movslq	-48(%rbp), %r12                 # 4-byte Folded Reload
	imulq	%r12, %r12
	shlq	$2, %r12
.Ltmp95:
	leaq	-64(%rbp), %rdi
	movq	%r12, %rsi
	callq	hipMalloc
.Ltmp96:
# %bb.100:                              # %_ZL9hipMallocIfE10hipError_tPPT_m.exit
.Ltmp97:
	leaq	-144(%rbp), %rdi
	movq	%r12, %rsi
	callq	hipMalloc
.Ltmp98:
# %bb.101:                              # %_ZL9hipMallocIfE10hipError_tPPT_m.exit279
.Ltmp99:
	leaq	-136(%rbp), %rdi
	movq	%r12, %rsi
	callq	hipMalloc
.Ltmp100:
# %bb.102:                              # %_ZL9hipMallocIfE10hipError_tPPT_m.exit281
.Ltmp101:
	leaq	-120(%rbp), %rdi
	movq	%r12, %rsi
	callq	hipMalloc
.Ltmp102:
# %bb.103:                              # %_ZL9hipMallocIfE10hipError_tPPT_m.exit283
.Ltmp103:
	leaq	-128(%rbp), %rdi
	movq	%r12, %rsi
	callq	hipMalloc
.Ltmp104:
# %bb.104:                              # %_ZL9hipMallocIfE10hipError_tPPT_m.exit285
	movslq	-56(%rbp), %rbx                 # 4-byte Folded Reload
	imulq	%rbx, %rbx
	shlq	$2, %rbx
.Ltmp105:
	leaq	-112(%rbp), %rdi
	movq	%rbx, %rsi
	callq	hipMalloc
.Ltmp106:
# %bb.105:                              # %_ZL9hipMallocIfE10hipError_tPPT_m.exit287
	movq	-64(%rbp), %rdi
.Ltmp107:
	movq	-104(%rbp), %rsi                # 8-byte Reload
	movq	%r12, %rdx
	movl	$1, %ecx
	callq	hipMemcpy
.Ltmp108:
# %bb.106:
	movq	-144(%rbp), %rdi
.Ltmp109:
	movq	-96(%rbp), %rsi                 # 8-byte Reload
	movq	%r12, %rdx
	movl	$1, %ecx
	callq	hipMemcpy
.Ltmp110:
# %bb.107:
	movq	-136(%rbp), %rdi
.Ltmp111:
	movq	-88(%rbp), %rsi                 # 8-byte Reload
	movq	%r12, %rdx
	movl	$1, %ecx
	callq	hipMemcpy
.Ltmp112:
# %bb.108:
	movq	-128(%rbp), %rdi
.Ltmp113:
	movq	%r15, %rsi
	movq	%r12, %rdx
	movl	$1, %ecx
	callq	hipMemcpy
.Ltmp114:
# %bb.109:
.Ltmp115:
	movq	-48(%rbp), %rax                 # 8-byte Reload
                                        # kill: def $eax killed $eax killed $rax def $rax
	shrl	%eax
	leaq	1(%rax), %rcx
	shlq	$32, %rcx
	leaq	(%rax,%rcx), %rdi
	incq	%rdi
	movabsq	$8589934594, %rdx               # imm = 0x200000002
	movl	$1, %esi
	movl	$1, %ecx
	xorl	%r8d, %r8d
	xorl	%r9d, %r9d
	callq	__hipPushCallConfiguration
.Ltmp116:
# %bb.110:
	testl	%eax, %eax
	jne	.LBB2_112
# %bb.111:
	movq	-64(%rbp), %rdi
	movq	-144(%rbp), %rsi
	movq	-136(%rbp), %rdx
	movq	-120(%rbp), %rcx
.Ltmp117:
	movss	-72(%rbp), %xmm0                # 4-byte Reload
                                        # xmm0 = mem[0],zero,zero,zero
	movss	-68(%rbp), %xmm1                # 4-byte Reload
                                        # xmm1 = mem[0],zero,zero,zero
	movq	-48(%rbp), %r8                  # 8-byte Reload
                                        # kill: def $r8d killed $r8d killed $r8
	callq	_Z19__device_stub__gemmPfS_S_ffS_i
.Ltmp118:
.LBB2_112:
.Ltmp119:
	callq	hipDeviceSynchronize
.Ltmp120:
# %bb.113:
.Ltmp122:
	callq	hipGetLastError
.Ltmp123:
# %bb.114:
	testl	%eax, %eax
	jne	.LBB2_151
# %bb.115:
.Ltmp126:
	movl	-56(%rbp), %eax                 # 4-byte Reload
                                        # kill: def $eax killed $eax def $rax
	shrl	%eax
	leaq	1(%rax), %rcx
	shlq	$32, %rcx
	leaq	(%rax,%rcx), %rdi
	incq	%rdi
	movabsq	$8589934594, %rdx               # imm = 0x200000002
	movl	$1, %esi
	movl	$1, %ecx
	xorl	%r8d, %r8d
	xorl	%r9d, %r9d
	callq	__hipPushCallConfiguration
.Ltmp127:
# %bb.116:
	testl	%eax, %eax
	jne	.LBB2_118
# %bb.117:
	movq	-128(%rbp), %rdi
	movq	-112(%rbp), %rsi
.Ltmp128:
	movq	-48(%rbp), %rdx                 # 8-byte Reload
                                        # kill: def $edx killed $edx killed $rdx
	movq	-80(%rbp), %rcx                 # 8-byte Reload
                                        # kill: def $ecx killed $ecx killed $rcx
	callq	_Z22__device_stub__maxpoolPfS_ii
.Ltmp129:
.LBB2_118:
.Ltmp130:
	callq	hipDeviceSynchronize
.Ltmp131:
# %bb.119:
.Ltmp132:
	callq	hipGetLastError
.Ltmp133:
# %bb.120:
	testl	%eax, %eax
	jne	.LBB2_152
# %bb.121:
	movq	%r12, %rdi
	callq	malloc
	movq	%rax, %r14
	movq	%rbx, %rdi
	callq	malloc
	movq	%rax, %r15
	movq	-120(%rbp), %rsi
.Ltmp137:
	movq	%r14, %rdi
	movq	%r12, %rdx
	movl	$2, %ecx
	callq	hipMemcpy
.Ltmp138:
# %bb.122:
	movq	-112(%rbp), %rsi
.Ltmp139:
	movq	%r15, %rdi
	movq	%rbx, %rdx
	movl	$2, %ecx
	callq	hipMemcpy
.Ltmp140:
# %bb.123:
.Ltmp141:
	movl	$_ZSt4cout, %edi
	movl	$.L.str.20, %esi
	movl	$35, %edx
	callq	_ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l
.Ltmp142:
# %bb.124:                              # %_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc.exit289.preheader
	cmpl	$0, -48(%rbp)                   # 4-byte Folded Reload
	je	.LBB2_131
# %bb.125:                              # %.lr.ph324.preheader
	cmpl	$1, %r13d
	adcl	$0, %r13d
	xorl	%ebx, %ebx
.LBB2_126:                              # %.lr.ph324
                                        # =>This Inner Loop Header: Depth=1
	movl	%ebx, %eax
	cltd
	idivl	-48(%rbp)                       # 4-byte Folded Reload
	testl	%edx, %edx
	jne	.LBB2_128
# %bb.127:                              #   in Loop: Header=BB2_126 Depth=1
.Ltmp143:
	movl	$_ZSt4cout, %edi
	movl	$.L.str.12, %esi
	movl	$1, %edx
	callq	_ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l
.Ltmp144:
.LBB2_128:                              # %_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc.exit293
                                        #   in Loop: Header=BB2_126 Depth=1
	xorps	%xmm0, %xmm0
	cvtss2sd	(%r14,%rbx,4), %xmm0
.Ltmp145:
	movl	$_ZSt4cout, %edi
	callq	_ZNSo9_M_insertIdEERSoT_
.Ltmp146:
# %bb.129:                              # %_ZNSolsEf.exit295
                                        #   in Loop: Header=BB2_126 Depth=1
.Ltmp147:
	movl	$.L.str.13, %esi
	movl	$1, %edx
	movq	%rax, %rdi
	callq	_ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l
.Ltmp148:
# %bb.130:                              # %_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc.exit297
                                        #   in Loop: Header=BB2_126 Depth=1
	incq	%rbx
	cmpq	%rbx, %r13
	jne	.LBB2_126
.LBB2_131:                              # %_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc.exit289._crit_edge
.Ltmp150:
	movl	$_ZSt4cout, %edi
	movl	$.L.str.21, %esi
	movl	$38, %edx
	callq	_ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l
.Ltmp151:
# %bb.132:                              # %_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc.exit291.preheader
	cmpl	$0, -56(%rbp)                   # 4-byte Folded Reload
	je	.LBB2_139
# %bb.133:                              # %.lr.ph326.preheader
	movl	-56(%rbp), %eax                 # 4-byte Reload
	movl	%eax, %r12d
	imull	%r12d, %r12d
	cmpl	$1, %r12d
	adcl	$0, %r12d
	xorl	%ebx, %ebx
.LBB2_134:                              # %.lr.ph326
                                        # =>This Inner Loop Header: Depth=1
	movl	%ebx, %eax
	cltd
	idivl	-56(%rbp)                       # 4-byte Folded Reload
	testl	%edx, %edx
	jne	.LBB2_136
# %bb.135:                              #   in Loop: Header=BB2_134 Depth=1
.Ltmp152:
	movl	$_ZSt4cout, %edi
	movl	$.L.str.12, %esi
	movl	$1, %edx
	callq	_ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l
.Ltmp153:
.LBB2_136:                              # %_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc.exit304
                                        #   in Loop: Header=BB2_134 Depth=1
	xorps	%xmm0, %xmm0
	cvtss2sd	(%r15,%rbx,4), %xmm0
.Ltmp154:
	movl	$_ZSt4cout, %edi
	callq	_ZNSo9_M_insertIdEERSoT_
.Ltmp155:
# %bb.137:                              # %_ZNSolsEf.exit306
                                        #   in Loop: Header=BB2_134 Depth=1
.Ltmp156:
	movl	$.L.str.13, %esi
	movl	$1, %edx
	movq	%rax, %rdi
	callq	_ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l
.Ltmp157:
# %bb.138:                              # %_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc.exit308
                                        #   in Loop: Header=BB2_134 Depth=1
	incq	%rbx
	cmpq	%rbx, %r12
	jne	.LBB2_134
.LBB2_139:                              # %_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc.exit291._crit_edge
	movb	$10, -49(%rbp)
	movq	_ZSt4cout(%rip), %rax
	movq	-24(%rax), %rax
	cmpq	$0, _ZSt4cout+16(%rax)
	je	.LBB2_141
# %bb.140:
.Ltmp159:
	leaq	-49(%rbp), %rsi
	movl	$_ZSt4cout, %edi
	movl	$1, %edx
	callq	_ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l
.Ltmp160:
	jmp	.LBB2_142
.LBB2_141:
.Ltmp161:
	movl	$_ZSt4cout, %edi
	movl	$10, %esi
	callq	_ZNSo3putEc
.Ltmp162:
.LBB2_142:
	movq	-64(%rbp), %rdi
.Ltmp163:
	callq	hipFree
.Ltmp164:
# %bb.143:
	movq	-144(%rbp), %rdi
.Ltmp165:
	callq	hipFree
.Ltmp166:
# %bb.144:
	movq	-136(%rbp), %rdi
.Ltmp167:
	callq	hipFree
.Ltmp168:
# %bb.145:
	movq	-120(%rbp), %rdi
.Ltmp169:
	callq	hipFree
.Ltmp170:
# %bb.146:
	movq	-128(%rbp), %rdi
.Ltmp171:
	callq	hipFree
.Ltmp172:
# %bb.147:
	movq	-112(%rbp), %rdi
.Ltmp173:
	callq	hipFree
.Ltmp174:
# %bb.148:
	movq	%r14, %rdi
	callq	free
	movq	%r15, %rdi
	callq	free
	xorl	%ebx, %ebx
.LBB2_149:
	leaq	-2248(%rbp), %rdi
	callq	_ZNSt14basic_ifstreamIcSt11char_traitsIcEED1Ev
	leaq	-1208(%rbp), %rdi
	callq	_ZNSt14basic_ifstreamIcSt11char_traitsIcEED1Ev
	leaq	-1728(%rbp), %rdi
	callq	_ZNSt14basic_ifstreamIcSt11char_traitsIcEED1Ev
	leaq	-688(%rbp), %rdi
	callq	_ZNSt14basic_ifstreamIcSt11char_traitsIcEED1Ev
	movq	-168(%rbp), %rsp                # 8-byte Reload
.LBB2_150:
	movl	%ebx, %eax
	leaq	-40(%rbp), %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	.cfi_def_cfa %rsp, 8
	retq
.LBB2_151:
	.cfi_def_cfa %rbp, 16
	movq	stderr(%rip), %rbx
.Ltmp124:
	movl	%eax, %edi
	callq	hipGetErrorString
.Ltmp125:
	jmp	.LBB2_153
.LBB2_152:
	movq	stderr(%rip), %rbx
.Ltmp134:
	movl	%eax, %edi
	callq	hipGetErrorString
.Ltmp135:
.LBB2_153:
	movl	$.L.str.19, %esi
	movq	%rbx, %rdi
	movq	%rax, %rdx
	xorl	%eax, %eax
	callq	fprintf
	movl	$1, %ebx
	jmp	.LBB2_149
.LBB2_154:
.Ltmp189:
	movl	$.L.str.22, %edi
	callq	_ZSt24__throw_invalid_argumentPKc
.Ltmp190:
# %bb.155:
.LBB2_156:                              # %.critedge.i.i
.Ltmp187:
	movl	$.L.str.22, %edi
	callq	_ZSt20__throw_out_of_rangePKc
.Ltmp188:
# %bb.157:
.LBB2_158:
.Ltmp184:
	movl	$.L.str.22, %edi
	callq	_ZSt24__throw_invalid_argumentPKc
.Ltmp185:
# %bb.159:
.LBB2_160:                              # %.critedge.i.i194
.Ltmp182:
	movl	$.L.str.22, %edi
	callq	_ZSt20__throw_out_of_rangePKc
.Ltmp183:
# %bb.161:
.LBB2_162:
.Ltmp179:
	movl	$.L.str.23, %edi
	callq	_ZSt24__throw_invalid_argumentPKc
.Ltmp180:
# %bb.163:
.LBB2_164:
.Ltmp176:
	movl	$.L.str.23, %edi
	callq	_ZSt24__throw_invalid_argumentPKc
.Ltmp177:
# %bb.165:
.LBB2_166:
.Ltmp24:
	movq	%rax, %rbx
	jmp	.LBB2_198
.LBB2_167:
.Ltmp21:
	movq	%rax, %rbx
	jmp	.LBB2_199
.LBB2_168:
.Ltmp18:
	movq	%rax, %rbx
	jmp	.LBB2_200
.LBB2_169:
.Ltmp13:
	jmp	.LBB2_173
.LBB2_170:
.Ltmp8:
	jmp	.LBB2_173
.LBB2_171:
.Ltmp5:
	jmp	.LBB2_173
.LBB2_172:
.Ltmp2:
.LBB2_173:
	movq	%rax, %rbx
	jmp	.LBB2_201
.LBB2_174:
.Ltmp178:
	movq	%rax, %rbx
	cmpl	$0, (%r14)
	jne	.LBB2_180
# %bb.175:
	movl	%r12d, (%r14)
	jmp	.LBB2_180
.LBB2_176:
.Ltmp181:
	jmp	.LBB2_178
.LBB2_177:
.Ltmp186:
.LBB2_178:
	movq	%rax, %rbx
	cmpl	$0, (%r14)
	jne	.LBB2_180
# %bb.179:
	movl	%r13d, (%r14)
.LBB2_180:                              # %_ZZN9__gnu_cxx6__stoaIlicJiEEET0_PFT_PKT1_PPS3_DpT2_EPKcS5_PmS9_EN11_Save_errnoD2Ev.exit.i.i195
	movq	-688(%rbp), %rdi
	leaq	-672(%rbp), %rax
	jmp	.LBB2_184
.LBB2_181:
.Ltmp191:
	movq	%rax, %rbx
	cmpl	$0, (%r14)
	jne	.LBB2_183
# %bb.182:
	movl	%r13d, (%r14)
.LBB2_183:                              # %_ZZN9__gnu_cxx6__stoaIlicJiEEET0_PFT_PKT1_PPS3_DpT2_EPKcS5_PmS9_EN11_Save_errnoD2Ev.exit.i.i
	leaq	-672(%rbp), %rax
	movq	-16(%rax), %rdi
.LBB2_184:                              # %_ZZN9__gnu_cxx6__stoaIlicJiEEET0_PFT_PKT1_PPS3_DpT2_EPKcS5_PmS9_EN11_Save_errnoD2Ev.exit.i.i
	cmpq	%rax, %rdi
	je	.LBB2_201
# %bb.185:                              # %_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE11_M_is_localEv.exit.i.i216
	callq	_ZdlPv
	jmp	.LBB2_201
.LBB2_186:
.Ltmp136:
	jmp	.LBB2_197
.LBB2_187:
.Ltmp175:
	jmp	.LBB2_197
.LBB2_188:
.Ltmp121:
	jmp	.LBB2_197
.LBB2_189:
.Ltmp94:
	jmp	.LBB2_197
.LBB2_190:
.Ltmp158:
	jmp	.LBB2_197
.LBB2_191:
.Ltmp149:
	jmp	.LBB2_197
.LBB2_192:
.Ltmp89:
	jmp	.LBB2_197
.LBB2_193:
.Ltmp72:
	jmp	.LBB2_197
.LBB2_194:
.Ltmp63:
	jmp	.LBB2_197
.LBB2_195:
.Ltmp46:
	jmp	.LBB2_197
.LBB2_196:
.Ltmp33:
.LBB2_197:
	movq	%rax, %rbx
	leaq	-2248(%rbp), %rdi
	callq	_ZNSt14basic_ifstreamIcSt11char_traitsIcEED1Ev
.LBB2_198:
	leaq	-1208(%rbp), %rdi
	callq	_ZNSt14basic_ifstreamIcSt11char_traitsIcEED1Ev
.LBB2_199:
	leaq	-1728(%rbp), %rdi
	callq	_ZNSt14basic_ifstreamIcSt11char_traitsIcEED1Ev
.LBB2_200:
	leaq	-688(%rbp), %rdi
	callq	_ZNSt14basic_ifstreamIcSt11char_traitsIcEED1Ev
.LBB2_201:
	movq	%rbx, %rdi
	callq	_Unwind_Resume@PLT
.Lfunc_end2:
	.size	main, .Lfunc_end2-main
	.cfi_endproc
	.section	.gcc_except_table,"a",@progbits
	.p2align	2, 0x0
GCC_except_table2:
.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 .Ltmp1-.Ltmp0                  #   Call between .Ltmp0 and .Ltmp1
	.uleb128 .Ltmp2-.Lfunc_begin0           #     jumps to .Ltmp2
	.byte	0                               #   On action: cleanup
	.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 .Ltmp6-.Lfunc_begin0           # >> Call Site 4 <<
	.uleb128 .Ltmp7-.Ltmp6                  #   Call between .Ltmp6 and .Ltmp7
	.uleb128 .Ltmp8-.Lfunc_begin0           #     jumps to .Ltmp8
	.byte	0                               #   On action: cleanup
	.uleb128 .Ltmp9-.Lfunc_begin0           # >> Call Site 5 <<
	.uleb128 .Ltmp10-.Ltmp9                 #   Call between .Ltmp9 and .Ltmp10
	.uleb128 .Ltmp181-.Lfunc_begin0         #     jumps to .Ltmp181
	.byte	0                               #   On action: cleanup
	.uleb128 .Ltmp11-.Lfunc_begin0          # >> Call Site 6 <<
	.uleb128 .Ltmp12-.Ltmp11                #   Call between .Ltmp11 and .Ltmp12
	.uleb128 .Ltmp13-.Lfunc_begin0          #     jumps to .Ltmp13
	.byte	0                               #   On action: cleanup
	.uleb128 .Ltmp14-.Lfunc_begin0          # >> Call Site 7 <<
	.uleb128 .Ltmp15-.Ltmp14                #   Call between .Ltmp14 and .Ltmp15
	.uleb128 .Ltmp178-.Lfunc_begin0         #     jumps to .Ltmp178
	.byte	0                               #   On action: cleanup
	.uleb128 .Ltmp15-.Lfunc_begin0          # >> Call Site 8 <<
	.uleb128 .Ltmp16-.Ltmp15                #   Call between .Ltmp15 and .Ltmp16
	.byte	0                               #     has no landing pad
	.byte	0                               #   On action: cleanup
	.uleb128 .Ltmp16-.Lfunc_begin0          # >> Call Site 9 <<
	.uleb128 .Ltmp17-.Ltmp16                #   Call between .Ltmp16 and .Ltmp17
	.uleb128 .Ltmp18-.Lfunc_begin0          #     jumps to .Ltmp18
	.byte	0                               #   On action: cleanup
	.uleb128 .Ltmp19-.Lfunc_begin0          # >> Call Site 10 <<
	.uleb128 .Ltmp20-.Ltmp19                #   Call between .Ltmp19 and .Ltmp20
	.uleb128 .Ltmp21-.Lfunc_begin0          #     jumps to .Ltmp21
	.byte	0                               #   On action: cleanup
	.uleb128 .Ltmp22-.Lfunc_begin0          # >> Call Site 11 <<
	.uleb128 .Ltmp23-.Ltmp22                #   Call between .Ltmp22 and .Ltmp23
	.uleb128 .Ltmp24-.Lfunc_begin0          #     jumps to .Ltmp24
	.byte	0                               #   On action: cleanup
	.uleb128 .Ltmp25-.Lfunc_begin0          # >> Call Site 12 <<
	.uleb128 .Ltmp32-.Ltmp25                #   Call between .Ltmp25 and .Ltmp32
	.uleb128 .Ltmp33-.Lfunc_begin0          #     jumps to .Ltmp33
	.byte	0                               #   On action: cleanup
	.uleb128 .Ltmp34-.Lfunc_begin0          # >> Call Site 13 <<
	.uleb128 .Ltmp39-.Ltmp34                #   Call between .Ltmp34 and .Ltmp39
	.uleb128 .Ltmp94-.Lfunc_begin0          #     jumps to .Ltmp94
	.byte	0                               #   On action: cleanup
	.uleb128 .Ltmp40-.Lfunc_begin0          # >> Call Site 14 <<
	.uleb128 .Ltmp45-.Ltmp40                #   Call between .Ltmp40 and .Ltmp45
	.uleb128 .Ltmp46-.Lfunc_begin0          #     jumps to .Ltmp46
	.byte	0                               #   On action: cleanup
	.uleb128 .Ltmp47-.Lfunc_begin0          # >> Call Site 15 <<
	.uleb128 .Ltmp52-.Ltmp47                #   Call between .Ltmp47 and .Ltmp52
	.uleb128 .Ltmp94-.Lfunc_begin0          #     jumps to .Ltmp94
	.byte	0                               #   On action: cleanup
	.uleb128 .Ltmp52-.Lfunc_begin0          # >> Call Site 16 <<
	.uleb128 .Ltmp53-.Ltmp52                #   Call between .Ltmp52 and .Ltmp53
	.byte	0                               #     has no landing pad
	.byte	0                               #   On action: cleanup
	.uleb128 .Ltmp53-.Lfunc_begin0          # >> Call Site 17 <<
	.uleb128 .Ltmp56-.Ltmp53                #   Call between .Ltmp53 and .Ltmp56
	.uleb128 .Ltmp94-.Lfunc_begin0          #     jumps to .Ltmp94
	.byte	0                               #   On action: cleanup
	.uleb128 .Ltmp57-.Lfunc_begin0          # >> Call Site 18 <<
	.uleb128 .Ltmp62-.Ltmp57                #   Call between .Ltmp57 and .Ltmp62
	.uleb128 .Ltmp63-.Lfunc_begin0          #     jumps to .Ltmp63
	.byte	0                               #   On action: cleanup
	.uleb128 .Ltmp64-.Lfunc_begin0          # >> Call Site 19 <<
	.uleb128 .Ltmp65-.Ltmp64                #   Call between .Ltmp64 and .Ltmp65
	.uleb128 .Ltmp94-.Lfunc_begin0          #     jumps to .Ltmp94
	.byte	0                               #   On action: cleanup
	.uleb128 .Ltmp66-.Lfunc_begin0          # >> Call Site 20 <<
	.uleb128 .Ltmp71-.Ltmp66                #   Call between .Ltmp66 and .Ltmp71
	.uleb128 .Ltmp72-.Lfunc_begin0          #     jumps to .Ltmp72
	.byte	0                               #   On action: cleanup
	.uleb128 .Ltmp73-.Lfunc_begin0          # >> Call Site 21 <<
	.uleb128 .Ltmp82-.Ltmp73                #   Call between .Ltmp73 and .Ltmp82
	.uleb128 .Ltmp94-.Lfunc_begin0          #     jumps to .Ltmp94
	.byte	0                               #   On action: cleanup
	.uleb128 .Ltmp83-.Lfunc_begin0          # >> Call Site 22 <<
	.uleb128 .Ltmp88-.Ltmp83                #   Call between .Ltmp83 and .Ltmp88
	.uleb128 .Ltmp89-.Lfunc_begin0          #     jumps to .Ltmp89
	.byte	0                               #   On action: cleanup
	.uleb128 .Ltmp90-.Lfunc_begin0          # >> Call Site 23 <<
	.uleb128 .Ltmp93-.Ltmp90                #   Call between .Ltmp90 and .Ltmp93
	.uleb128 .Ltmp94-.Lfunc_begin0          #     jumps to .Ltmp94
	.byte	0                               #   On action: cleanup
	.uleb128 .Ltmp95-.Lfunc_begin0          # >> Call Site 24 <<
	.uleb128 .Ltmp120-.Ltmp95               #   Call between .Ltmp95 and .Ltmp120
	.uleb128 .Ltmp121-.Lfunc_begin0         #     jumps to .Ltmp121
	.byte	0                               #   On action: cleanup
	.uleb128 .Ltmp122-.Lfunc_begin0         # >> Call Site 25 <<
	.uleb128 .Ltmp133-.Ltmp122              #   Call between .Ltmp122 and .Ltmp133
	.uleb128 .Ltmp136-.Lfunc_begin0         #     jumps to .Ltmp136
	.byte	0                               #   On action: cleanup
	.uleb128 .Ltmp137-.Lfunc_begin0         # >> Call Site 26 <<
	.uleb128 .Ltmp142-.Ltmp137              #   Call between .Ltmp137 and .Ltmp142
	.uleb128 .Ltmp175-.Lfunc_begin0         #     jumps to .Ltmp175
	.byte	0                               #   On action: cleanup
	.uleb128 .Ltmp143-.Lfunc_begin0         # >> Call Site 27 <<
	.uleb128 .Ltmp148-.Ltmp143              #   Call between .Ltmp143 and .Ltmp148
	.uleb128 .Ltmp149-.Lfunc_begin0         #     jumps to .Ltmp149
	.byte	0                               #   On action: cleanup
	.uleb128 .Ltmp150-.Lfunc_begin0         # >> Call Site 28 <<
	.uleb128 .Ltmp151-.Ltmp150              #   Call between .Ltmp150 and .Ltmp151
	.uleb128 .Ltmp175-.Lfunc_begin0         #     jumps to .Ltmp175
	.byte	0                               #   On action: cleanup
	.uleb128 .Ltmp152-.Lfunc_begin0         # >> Call Site 29 <<
	.uleb128 .Ltmp157-.Ltmp152              #   Call between .Ltmp152 and .Ltmp157
	.uleb128 .Ltmp158-.Lfunc_begin0         #     jumps to .Ltmp158
	.byte	0                               #   On action: cleanup
	.uleb128 .Ltmp159-.Lfunc_begin0         # >> Call Site 30 <<
	.uleb128 .Ltmp174-.Ltmp159              #   Call between .Ltmp159 and .Ltmp174
	.uleb128 .Ltmp175-.Lfunc_begin0         #     jumps to .Ltmp175
	.byte	0                               #   On action: cleanup
	.uleb128 .Ltmp124-.Lfunc_begin0         # >> Call Site 31 <<
	.uleb128 .Ltmp135-.Ltmp124              #   Call between .Ltmp124 and .Ltmp135
	.uleb128 .Ltmp136-.Lfunc_begin0         #     jumps to .Ltmp136
	.byte	0                               #   On action: cleanup
	.uleb128 .Ltmp189-.Lfunc_begin0         # >> Call Site 32 <<
	.uleb128 .Ltmp188-.Ltmp189              #   Call between .Ltmp189 and .Ltmp188
	.uleb128 .Ltmp191-.Lfunc_begin0         #     jumps to .Ltmp191
	.byte	0                               #   On action: cleanup
	.uleb128 .Ltmp184-.Lfunc_begin0         # >> Call Site 33 <<
	.uleb128 .Ltmp183-.Ltmp184              #   Call between .Ltmp184 and .Ltmp183
	.uleb128 .Ltmp186-.Lfunc_begin0         #     jumps to .Ltmp186
	.byte	0                               #   On action: cleanup
	.uleb128 .Ltmp179-.Lfunc_begin0         # >> Call Site 34 <<
	.uleb128 .Ltmp180-.Ltmp179              #   Call between .Ltmp179 and .Ltmp180
	.uleb128 .Ltmp181-.Lfunc_begin0         #     jumps to .Ltmp181
	.byte	0                               #   On action: cleanup
	.uleb128 .Ltmp176-.Lfunc_begin0         # >> Call Site 35 <<
	.uleb128 .Ltmp177-.Ltmp176              #   Call between .Ltmp176 and .Ltmp177
	.uleb128 .Ltmp178-.Lfunc_begin0         #     jumps to .Ltmp178
	.byte	0                               #   On action: cleanup
	.uleb128 .Ltmp177-.Lfunc_begin0         # >> Call Site 36 <<
	.uleb128 .Lfunc_end2-.Ltmp177           #   Call between .Ltmp177 and .Lfunc_end2
	.byte	0                               #     has no landing pad
	.byte	0                               #   On action: cleanup
.Lcst_end0:
	.p2align	2, 0x0
                                        # -- End function
	.section	.text._ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_,"axG",@progbits,_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_,comdat
	.weak	_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_ # -- Begin function _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_
	.p2align	1, 0x90
	.type	_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_,@function
_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_: # @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_
	.cfi_startproc
# %bb.0:
	pushq	%r14
	.cfi_def_cfa_offset 16
	pushq	%rbx
	.cfi_def_cfa_offset 24
	pushq	%rax
	.cfi_def_cfa_offset 32
	.cfi_offset %rbx, -24
	.cfi_offset %r14, -16
	leaq	16(%rdi), %rax
	movq	%rax, (%rdi)
	testq	%rsi, %rsi
	je	.LBB3_1
# %bb.2:
	movq	%rsi, %rbx
	movq	%rdi, %r14
	movq	%rsi, %rdi
	callq	strlen
	leaq	(%rax,%rbx), %rdx
	movq	%r14, %rdi
	movq	%rbx, %rsi
	addq	$8, %rsp
	.cfi_def_cfa_offset 24
	popq	%rbx
	.cfi_def_cfa_offset 16
	popq	%r14
	.cfi_def_cfa_offset 8
	jmp	_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPKcEEvT_S8_St20forward_iterator_tag # TAILCALL
.LBB3_1:
	.cfi_def_cfa_offset 32
	movl	$.L.str.24, %edi
	callq	_ZSt19__throw_logic_errorPKc
.Lfunc_end3:
	.size	_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_, .Lfunc_end3-_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_
	.cfi_endproc
                                        # -- End function
	.section	.text._ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPKcEEvT_S8_St20forward_iterator_tag,"axG",@progbits,_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPKcEEvT_S8_St20forward_iterator_tag,comdat
	.weak	_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPKcEEvT_S8_St20forward_iterator_tag # -- Begin function _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPKcEEvT_S8_St20forward_iterator_tag
	.p2align	1, 0x90
	.type	_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPKcEEvT_S8_St20forward_iterator_tag,@function
_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPKcEEvT_S8_St20forward_iterator_tag: # @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPKcEEvT_S8_St20forward_iterator_tag
	.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	%rdx, %r14
	movq	%rsi, %r15
	movq	%rdi, %rbx
	subq	%rsi, %r14
	movq	%r14, (%rsp)
	cmpq	$15, %r14
	jbe	.LBB4_1
# %bb.2:
	movq	%rsp, %r12
	movq	%rbx, %rdi
	movq	%r12, %rsi
	xorl	%edx, %edx
	callq	_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9_M_createERmm
	movq	%rax, (%rbx)
	movq	(%r12), %rcx
	movq	%rcx, 16(%rbx)
	jmp	.LBB4_3
.LBB4_1:                                # %._crit_edge
	movq	(%rbx), %rax
.LBB4_3:
	testq	%r14, %r14
	je	.LBB4_7
# %bb.4:
	cmpq	$1, %r14
	jne	.LBB4_6
# %bb.5:
	movb	(%r15), %cl
	movb	%cl, (%rax)
	jmp	.LBB4_7
.LBB4_6:
	movq	%rax, %rdi
	movq	%r15, %rsi
	movq	%r14, %rdx
	callq	memcpy@PLT
.LBB4_7:                                # %_ZZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPKcEEvT_S8_St20forward_iterator_tagEN6_GuardD2Ev.exit
	movq	(%rsp), %rax
	movq	%rax, 8(%rbx)
	movq	(%rbx), %rcx
	movb	$0, (%rcx,%rax)
	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
.Lfunc_end4:
	.size	_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPKcEEvT_S8_St20forward_iterator_tag, .Lfunc_end4-_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPKcEEvT_S8_St20forward_iterator_tag
	.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:
	pushq	%rbx
	.cfi_def_cfa_offset 16
	subq	$32, %rsp
	.cfi_def_cfa_offset 48
	.cfi_offset %rbx, -16
	movq	__hip_gpubin_handle(%rip), %rbx
	testq	%rbx, %rbx
	jne	.LBB5_2
# %bb.1:
	movl	$__hip_fatbin_wrapper, %edi
	callq	__hipRegisterFatBinary
	movq	%rax, %rbx
	movq	%rax, __hip_gpubin_handle(%rip)
.LBB5_2:
	xorps	%xmm0, %xmm0
	movups	%xmm0, 16(%rsp)
	movups	%xmm0, (%rsp)
	movl	$_Z7maxpoolPfS_ii, %esi
	movl	$.L__unnamed_1, %edx
	movl	$.L__unnamed_1, %ecx
	movq	%rbx, %rdi
	movl	$-1, %r8d
	xorl	%r9d, %r9d
	callq	__hipRegisterFunction
	xorps	%xmm0, %xmm0
	movups	%xmm0, 16(%rsp)
	movups	%xmm0, (%rsp)
	movl	$_Z4gemmPfS_S_ffS_i, %esi
	movl	$.L__unnamed_2, %edx
	movl	$.L__unnamed_2, %ecx
	movq	%rbx, %rdi
	movl	$-1, %r8d
	xorl	%r9d, %r9d
	callq	__hipRegisterFunction
	movl	$__hip_module_dtor, %edi
	addq	$32, %rsp
	.cfi_def_cfa_offset 16
	popq	%rbx
	.cfi_def_cfa_offset 8
	jmp	atexit                          # TAILCALL
.Lfunc_end5:
	.size	__hip_module_ctor, .Lfunc_end5-__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	.LBB6_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
.LBB6_2:
	retq
.Lfunc_end6:
	.size	__hip_module_dtor, .Lfunc_end6-__hip_module_dtor
	.cfi_endproc
                                        # -- End function
	.type	_Z7maxpoolPfS_ii,@object        # @_Z7maxpoolPfS_ii
	.section	.rodata,"a",@progbits
	.globl	_Z7maxpoolPfS_ii
	.p2align	3, 0x0
_Z7maxpoolPfS_ii:
	.quad	_Z22__device_stub__maxpoolPfS_ii
	.size	_Z7maxpoolPfS_ii, 8

	.type	_Z4gemmPfS_S_ffS_i,@object      # @_Z4gemmPfS_S_ffS_i
	.globl	_Z4gemmPfS_S_ffS_i
	.p2align	3, 0x0
_Z4gemmPfS_S_ffS_i:
	.quad	_Z19__device_stub__gemmPfS_S_ffS_i
	.size	_Z4gemmPfS_S_ffS_i, 8

	.type	.L.str,@object                  # @.str
	.section	.rodata.str1.1,"aMS",@progbits,1
.L.str:
	.asciz	"usage : "
	.size	.L.str, 9

	.type	.L.str.1,@object                # @.str.1
.L.str.1:
	.asciz	" input_size filter_size alpha beta\n"
	.size	.L.str.1, 36

	.type	.L.str.2,@object                # @.str.2
.L.str.2:
	.asciz	"example : "
	.size	.L.str.2, 11

	.type	.L.str.3,@object                # @.str.3
.L.str.3:
	.asciz	" 100 2 0.5 0.8\n"
	.size	.L.str.3, 16

	.type	.L.str.6,@object                # @.str.6
.L.str.6:
	.asciz	"input.txt"
	.size	.L.str.6, 10

	.type	.L.str.7,@object                # @.str.7
.L.str.7:
	.asciz	"a.txt"
	.size	.L.str.7, 6

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

	.type	.L.str.9,@object                # @.str.9
.L.str.9:
	.asciz	"c.txt"
	.size	.L.str.9, 6

	.type	.L.str.10,@object               # @.str.10
.L.str.10:
	.asciz	"filter size : "
	.size	.L.str.10, 15

	.type	.L.str.11,@object               # @.str.11
.L.str.11:
	.asciz	"\n========== MAXPOOL_INPUT ==========\n"
	.size	.L.str.11, 38

	.type	.L.str.12,@object               # @.str.12
.L.str.12:
	.asciz	"\n"
	.size	.L.str.12, 2

	.type	.L.str.13,@object               # @.str.13
.L.str.13:
	.asciz	" "
	.size	.L.str.13, 2

	.type	.L.str.14,@object               # @.str.14
.L.str.14:
	.asciz	"\nalpha : "
	.size	.L.str.14, 10

	.type	.L.str.15,@object               # @.str.15
.L.str.15:
	.asciz	"========== A ==========\n"
	.size	.L.str.15, 25

	.type	.L.str.16,@object               # @.str.16
.L.str.16:
	.asciz	"\n========== B ==========\n"
	.size	.L.str.16, 26

	.type	.L.str.17,@object               # @.str.17
.L.str.17:
	.asciz	"\nbeta : "
	.size	.L.str.17, 9

	.type	.L.str.18,@object               # @.str.18
.L.str.18:
	.asciz	"========== C ==========\n"
	.size	.L.str.18, 25

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

	.type	.L.str.20,@object               # @.str.20
.L.str.20:
	.asciz	"\n========== GEMM OUTPUT ==========\n"
	.size	.L.str.20, 36

	.type	.L.str.21,@object               # @.str.21
.L.str.21:
	.asciz	"\n========== MAXPOOL OUTPUT ==========\n"
	.size	.L.str.21, 39

	.type	.L.str.22,@object               # @.str.22
.L.str.22:
	.asciz	"stoi"
	.size	.L.str.22, 5

	.type	.L.str.23,@object               # @.str.23
.L.str.23:
	.asciz	"stof"
	.size	.L.str.23, 5

	.type	.L.str.24,@object               # @.str.24
.L.str.24:
	.asciz	"basic_string: construction from null is not valid"
	.size	.L.str.24, 50

	.type	.L__unnamed_1,@object           # @0
.L__unnamed_1:
	.asciz	"_Z7maxpoolPfS_ii"
	.size	.L__unnamed_1, 17

	.type	.L__unnamed_2,@object           # @1
.L__unnamed_2:
	.asciz	"_Z4gemmPfS_S_ffS_i"
	.size	.L__unnamed_2, 19

	.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__maxpoolPfS_ii
	.addrsig_sym _Z19__device_stub__gemmPfS_S_ffS_i
	.addrsig_sym __gxx_personality_v0
	.addrsig_sym __hip_module_ctor
	.addrsig_sym __hip_module_dtor
	.addrsig_sym _Unwind_Resume
	.addrsig_sym _Z7maxpoolPfS_ii
	.addrsig_sym _Z4gemmPfS_S_ffS_i
	.addrsig_sym _ZSt4cout
	.addrsig_sym __hip_fatbin
	.addrsig_sym __hip_fatbin_wrapper
	.addrsig_sym __hip_cuid_

	.text
	.amdgcn_target "amdgcn-amd-amdhsa--gfx1100"
	.protected	_Z7maxpoolPfS_ii        ; -- Begin function _Z7maxpoolPfS_ii
	.globl	_Z7maxpoolPfS_ii
	.p2align	8
	.type	_Z7maxpoolPfS_ii,@function
_Z7maxpoolPfS_ii:                       ; @_Z7maxpoolPfS_ii
; %bb.0:
	s_endpgm
	.section	.rodata,"a",@progbits
	.p2align	6, 0x0
	.amdhsa_kernel _Z7maxpoolPfS_ii
		.amdhsa_group_segment_fixed_size 0
		.amdhsa_private_segment_fixed_size 0
		.amdhsa_kernarg_size 24
		.amdhsa_user_sgpr_count 15
		.amdhsa_user_sgpr_dispatch_ptr 0
		.amdhsa_user_sgpr_queue_ptr 0
		.amdhsa_user_sgpr_kernarg_segment_ptr 1
		.amdhsa_user_sgpr_dispatch_id 0
		.amdhsa_user_sgpr_private_segment_size 0
		.amdhsa_wavefront_size32 1
		.amdhsa_uses_dynamic_stack 0
		.amdhsa_enable_private_segment 0
		.amdhsa_system_sgpr_workgroup_id_x 1
		.amdhsa_system_sgpr_workgroup_id_y 0
		.amdhsa_system_sgpr_workgroup_id_z 0
		.amdhsa_system_sgpr_workgroup_info 0
		.amdhsa_system_vgpr_workitem_id 0
		.amdhsa_next_free_vgpr 1
		.amdhsa_next_free_sgpr 1
		.amdhsa_reserve_vcc 0
		.amdhsa_float_round_mode_32 0
		.amdhsa_float_round_mode_16_64 0
		.amdhsa_float_denorm_mode_32 3
		.amdhsa_float_denorm_mode_16_64 3
		.amdhsa_dx10_clamp 1
		.amdhsa_ieee_mode 1
		.amdhsa_fp16_overflow 0
		.amdhsa_workgroup_processor_mode 1
		.amdhsa_memory_ordered 1
		.amdhsa_forward_progress 0
		.amdhsa_shared_vgpr_count 0
		.amdhsa_exception_fp_ieee_invalid_op 0
		.amdhsa_exception_fp_denorm_src 0
		.amdhsa_exception_fp_ieee_div_zero 0
		.amdhsa_exception_fp_ieee_overflow 0
		.amdhsa_exception_fp_ieee_underflow 0
		.amdhsa_exception_fp_ieee_inexact 0
		.amdhsa_exception_int_div_zero 0
	.end_amdhsa_kernel
	.text
.Lfunc_end0:
	.size	_Z7maxpoolPfS_ii, .Lfunc_end0-_Z7maxpoolPfS_ii
                                        ; -- End function
	.section	.AMDGPU.csdata,"",@progbits
; Kernel info:
; codeLenInByte = 4
; NumSgprs: 0
; NumVgprs: 0
; ScratchSize: 0
; MemoryBound: 0
; FloatMode: 240
; IeeeMode: 1
; LDSByteSize: 0 bytes/workgroup (compile time only)
; SGPRBlocks: 0
; VGPRBlocks: 0
; NumSGPRsForWavesPerEU: 1
; NumVGPRsForWavesPerEU: 1
; Occupancy: 16
; WaveLimiterHint : 0
; COMPUTE_PGM_RSRC2:SCRATCH_EN: 0
; COMPUTE_PGM_RSRC2:USER_SGPR: 15
; COMPUTE_PGM_RSRC2:TRAP_HANDLER: 0
; COMPUTE_PGM_RSRC2:TGID_X_EN: 1
; COMPUTE_PGM_RSRC2:TGID_Y_EN: 0
; COMPUTE_PGM_RSRC2:TGID_Z_EN: 0
; COMPUTE_PGM_RSRC2:TIDIG_COMP_CNT: 0
	.text
	.protected	_Z4gemmPfS_S_ffS_i      ; -- Begin function _Z4gemmPfS_S_ffS_i
	.globl	_Z4gemmPfS_S_ffS_i
	.p2align	8
	.type	_Z4gemmPfS_S_ffS_i,@function
_Z4gemmPfS_S_ffS_i:                     ; @_Z4gemmPfS_S_ffS_i
; %bb.0:                                ; %.loopexit
	s_endpgm
	.section	.rodata,"a",@progbits
	.p2align	6, 0x0
	.amdhsa_kernel _Z4gemmPfS_S_ffS_i
		.amdhsa_group_segment_fixed_size 0
		.amdhsa_private_segment_fixed_size 0
		.amdhsa_kernarg_size 44
		.amdhsa_user_sgpr_count 15
		.amdhsa_user_sgpr_dispatch_ptr 0
		.amdhsa_user_sgpr_queue_ptr 0
		.amdhsa_user_sgpr_kernarg_segment_ptr 1
		.amdhsa_user_sgpr_dispatch_id 0
		.amdhsa_user_sgpr_private_segment_size 0
		.amdhsa_wavefront_size32 1
		.amdhsa_uses_dynamic_stack 0
		.amdhsa_enable_private_segment 0
		.amdhsa_system_sgpr_workgroup_id_x 1
		.amdhsa_system_sgpr_workgroup_id_y 0
		.amdhsa_system_sgpr_workgroup_id_z 0
		.amdhsa_system_sgpr_workgroup_info 0
		.amdhsa_system_vgpr_workitem_id 0
		.amdhsa_next_free_vgpr 1
		.amdhsa_next_free_sgpr 1
		.amdhsa_reserve_vcc 0
		.amdhsa_float_round_mode_32 0
		.amdhsa_float_round_mode_16_64 0
		.amdhsa_float_denorm_mode_32 3
		.amdhsa_float_denorm_mode_16_64 3
		.amdhsa_dx10_clamp 1
		.amdhsa_ieee_mode 1
		.amdhsa_fp16_overflow 0
		.amdhsa_workgroup_processor_mode 1
		.amdhsa_memory_ordered 1
		.amdhsa_forward_progress 0
		.amdhsa_shared_vgpr_count 0
		.amdhsa_exception_fp_ieee_invalid_op 0
		.amdhsa_exception_fp_denorm_src 0
		.amdhsa_exception_fp_ieee_div_zero 0
		.amdhsa_exception_fp_ieee_overflow 0
		.amdhsa_exception_fp_ieee_underflow 0
		.amdhsa_exception_fp_ieee_inexact 0
		.amdhsa_exception_int_div_zero 0
	.end_amdhsa_kernel
	.text
.Lfunc_end1:
	.size	_Z4gemmPfS_S_ffS_i, .Lfunc_end1-_Z4gemmPfS_S_ffS_i
                                        ; -- End function
	.section	.AMDGPU.csdata,"",@progbits
; Kernel info:
; codeLenInByte = 4
; NumSgprs: 0
; NumVgprs: 0
; ScratchSize: 0
; MemoryBound: 0
; FloatMode: 240
; IeeeMode: 1
; LDSByteSize: 0 bytes/workgroup (compile time only)
; SGPRBlocks: 0
; VGPRBlocks: 0
; NumSGPRsForWavesPerEU: 1
; NumVGPRsForWavesPerEU: 1
; Occupancy: 16
; WaveLimiterHint : 0
; COMPUTE_PGM_RSRC2:SCRATCH_EN: 0
; COMPUTE_PGM_RSRC2:USER_SGPR: 15
; COMPUTE_PGM_RSRC2:TRAP_HANDLER: 0
; COMPUTE_PGM_RSRC2:TGID_X_EN: 1
; COMPUTE_PGM_RSRC2:TGID_Y_EN: 0
; COMPUTE_PGM_RSRC2:TGID_Z_EN: 0
; COMPUTE_PGM_RSRC2:TIDIG_COMP_CNT: 0
	.text
	.p2alignl 7, 3214868480
	.fill 96, 4, 3214868480
	.type	__hip_cuid_,@object             ; @__hip_cuid_
	.section	.bss,"aw",@nobits
	.globl	__hip_cuid_
__hip_cuid_:
	.byte	0                               ; 0x0
	.size	__hip_cuid_, 1

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

	.end_amdgpu_metadata
