#include<iostream>
#include<algorithm>
#include<stdio.h>
#include<fstream>
#include <stdlib.h>
using namespace std;
#define REPEAT 1
#define Real double
#define STRIDE 1
#define CACHELINE 8
__global__ void VecAdd(Real* A, int* N, Real* d_time);


int main(int argc, char* argv[])
{
   if(argc != 2)
   {
     std::cout << "Wrong number of argument!! Exiting program !!!";
     return 0;
   }
      
  // struct timeval tv1, tv2;
   int N = atoi(argv[1]);
   //register long elapsed=0;
   Real *A, *d_A;
   int *d_N;// *B, *C, *d_A, *d_B, *d_C ;           
   std::ofstream fp;
   fp.open("/home/hpc/ihpc/ihpc002h/gpu-exp/Master-thesis/data/result.txt", std::ofstream::app);
    double *d_time, h_time;
    A  = (Real*)malloc(N*sizeof(Real)); 
   // B  = (Real*)malloc(N*sizeof(Real)); 
   // C  = (Real*)malloc(N*sizeof(Real));
    
    
    cudaMalloc(&d_A, N*sizeof(Real));
    cudaMalloc(&d_time, sizeof(double));
    cudaMalloc(&d_N, sizeof(double));
   // cudaMalloc(&d_B, N*sizeof(Real));
   // cudaMalloc(&d_C, N*sizeof(Real));
    
    
    for(int i=0; i < N ; i++)
    {
      A[i] = (i+STRIDE)%N;
     // B[i] = rand()%5;
      //C[i] = 0.0;
    }
    
    cudaMemcpy(d_A, A, N*sizeof(Real), cudaMemcpyHostToDevice );
    cudaMemcpy(d_N, &N, sizeof(int), cudaMemcpyHostToDevice );
    //cudaMemcpy(d_C, C, N*sizeof(Real), cudaMemcpyHostToDevice );
    
    //for(int i=0 ; i < REPEAT ; i++)
    //{
    //gettimeofday(&tv1, NULL);                  
    VecAdd<<<1, 1>>>(d_A, d_N, d_time);
    //gettimeofday(&tv2, NULL);
    //elapsed += ((tv2.tv_sec-tv1.tv_sec)*1000000.0 + (tv2.tv_usec-tv1.tv_usec));
    //}
    
    cudaMemcpy(&h_time, d_time, sizeof(double), cudaMemcpyDeviceToHost);
    cudaDeviceSynchronize();
   //cout << N << std::endl;
    
    //double td = (N * 8.0)/1024;
    //cout << h_time << " " << CLOCKS_PER_SEC << std::endl;
    
    fp << N*8.0/1024.0 << " " << h_time << std::endl;
    
    for(int i =0; i < N ; i++)
    {
     // cout << A[i] << std::endl;
    }
     //fs << std::endl;
   
    cudaFree(d_A);
    //cudaFree(d_B);
    //cudaFree(d_C);
    fp.close();
}

	.file	"tmpxft_002e4893_00000000-6_main.cudafe1.cpp"
	.text
#APP
	.globl _ZSt21ios_base_library_initv

#NO_APP
	.type	_ZL26__cudaUnregisterBinaryUtilv, @function
_ZL26__cudaUnregisterBinaryUtilv:
.LFB4023:
	.cfi_startproc
	endbr64
	movq	_ZL20__cudaFatCubinHandle(%rip), %rdi
	jmp	__cudaUnregisterFatBinary@PLT
	.cfi_endproc
.LFE4023:
	.size	_ZL26__cudaUnregisterBinaryUtilv, .-_ZL26__cudaUnregisterBinaryUtilv
	.section	.text.startup,"ax",@progbits
	.type	_ZL24__sti____cudaRegisterAllv, @function
_ZL24__sti____cudaRegisterAllv:
.LFB4046:
	.cfi_startproc
	endbr64
	pushq	%rax
	.cfi_def_cfa_offset 16
	leaq	_ZL15__fatDeviceText(%rip), %rdi
	call	__cudaRegisterFatBinary@PLT
	movq	%rax, %rdi
	movq	%rax, _ZL20__cudaFatCubinHandle(%rip)
	call	__cudaRegisterFatBinaryEnd@PLT
	leaq	_ZL26__cudaUnregisterBinaryUtilv(%rip), %rdi
	popq	%rdx
	.cfi_def_cfa_offset 8
	jmp	atexit@PLT
	.cfi_endproc
.LFE4046:
	.size	_ZL24__sti____cudaRegisterAllv, .-_ZL24__sti____cudaRegisterAllv
	.section	.init_array,"aw"
	.align 8
	.quad	_ZL24__sti____cudaRegisterAllv
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"Wrong number of argument!! Exiting program !!!"
.LC1:
	.string	"/home/hpc/ihpc/ihpc002h/gpu-exp/Master-thesis/data/result.txt"
.LC4:
	.string	" "
	.section	.text.startup
	.globl	main
	.type	main, @function
main:
.LFB4020:
	.cfi_startproc
	.cfi_personality 0x9b,DW.ref.__gxx_personality_v0
	.cfi_lsda 0x1b,.LLSDA4020
	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	$592, %rsp
	.cfi_def_cfa_offset 624
	movq	%fs:40, %rax
	movq	%rax, 584(%rsp)
	xorl	%eax, %eax
	cmpl	$2, %edi
	je	.L5
	leaq	.LC0(%rip), %rsi
	leaq	_ZSt4cout(%rip), %rdi
.LEHB0:
	call	_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc@PLT
	jmp	.L6
.L5:
	movq	8(%rsi), %rdi
	leaq	72(%rsp), %rbx
	call	atoi@PLT
	movq	%rbx, %rdi
	movl	%eax, 12(%rsp)
	call	_ZNSt14basic_ofstreamIcSt11char_traitsIcEEC1Ev@PLT
.LEHE0:
	movl	$1, %edx
	leaq	.LC1(%rip), %rsi
	movq	%rbx, %rdi
.LEHB1:
	call	_ZNSt14basic_ofstreamIcSt11char_traitsIcEE4openEPKcSt13_Ios_Openmode@PLT
	movslq	12(%rsp), %r12
	salq	$3, %r12
	movq	%r12, %rdi
	call	malloc@PLT
	leaq	16(%rsp), %rdi
	movq	%r12, %rsi
	movq	%rax, %rbp
	call	cudaMalloc@PLT
	leaq	32(%rsp), %rdi
	movl	$8, %esi
	call	cudaMalloc@PLT
	leaq	24(%rsp), %rdi
	movl	$8, %esi
	call	cudaMalloc@PLT
	movl	12(%rsp), %ecx
	xorl	%esi, %esi
.L7:
	cmpl	%esi, %ecx
	jle	.L17
	leal	1(%rsi), %eax
	cltd
	idivl	%ecx
	cvtsi2sdl	%edx, %xmm0
	movsd	%xmm0, 0(%rbp,%rsi,8)
	incq	%rsi
	jmp	.L7
.L17:
	movslq	%ecx, %rdx
	movq	16(%rsp), %rdi
	movl	$1, %ecx
	movq	%rbp, %rsi
	salq	$3, %rdx
	call	cudaMemcpy@PLT
	movq	24(%rsp), %rdi
	leaq	12(%rsp), %rsi
	movl	$1, %ecx
	movl	$4, %edx
	call	cudaMemcpy@PLT
	xorl	%r9d, %r9d
	xorl	%r8d, %r8d
	movl	$1, %ecx
	movl	$1, %esi
	movabsq	$4294967297, %rdi
	movl	$1, 64(%rsp)
	movq	%rdi, %rdx
	movq	%rdi, 56(%rsp)
	call	__cudaPushCallConfiguration@PLT
	movq	32(%rsp), %rdx
	testl	%eax, %eax
	jne	.L9
	movq	24(%rsp), %rsi
	movq	16(%rsp), %rdi
	call	_Z6VecAddPdPiS_@PLT
.L9:
	movq	32(%rsp), %rsi
	leaq	56(%rsp), %rdi
	movl	$2, %ecx
	movl	$8, %edx
	call	cudaMemcpy@PLT
	call	cudaDeviceSynchronize@PLT
	cvtsi2sdl	12(%rsp), %xmm0
	mulsd	.LC2(%rip), %xmm0
	movq	%rbx, %rdi
	mulsd	.LC3(%rip), %xmm0
	call	_ZNSo9_M_insertIdEERSoT_@PLT
	movq	%rax, %rdi
	leaq	.LC4(%rip), %rsi
	call	_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc@PLT
	movsd	56(%rsp), %xmm0
	movq	%rax, %rdi
	call	_ZNSo9_M_insertIdEERSoT_@PLT
	movq	%rax, %rdi
	call	_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_@PLT
	movq	16(%rsp), %rdi
	call	cudaFree@PLT
	movq	%rbx, %rdi
	call	_ZNSt14basic_ofstreamIcSt11char_traitsIcEE5closeEv@PLT
.LEHE1:
	movq	%rbx, %rdi
	call	_ZNSt14basic_ofstreamIcSt11char_traitsIcEED1Ev@PLT
.L6:
	movq	584(%rsp), %rax
	subq	%fs:40, %rax
	je	.L12
	jmp	.L14
.L13:
	endbr64
	movq	%rax, %rbp
.L10:
	movq	%rbx, %rdi
	call	_ZNSt14basic_ofstreamIcSt11char_traitsIcEED1Ev@PLT
	movq	584(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L14
	movq	%rbp, %rdi
.LEHB2:
	call	_Unwind_Resume@PLT
.LEHE2:
.L14:
	call	__stack_chk_fail@PLT
.L12:
	addq	$592, %rsp
	.cfi_def_cfa_offset 32
	xorl	%eax, %eax
	popq	%rbx
	.cfi_def_cfa_offset 24
	popq	%rbp
	.cfi_def_cfa_offset 16
	popq	%r12
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE4020:
	.globl	__gxx_personality_v0
	.section	.gcc_except_table,"a",@progbits
.LLSDA4020:
	.byte	0xff
	.byte	0xff
	.byte	0x1
	.uleb128 .LLSDACSE4020-.LLSDACSB4020
.LLSDACSB4020:
	.uleb128 .LEHB0-.LFB4020
	.uleb128 .LEHE0-.LEHB0
	.uleb128 0
	.uleb128 0
	.uleb128 .LEHB1-.LFB4020
	.uleb128 .LEHE1-.LEHB1
	.uleb128 .L13-.LFB4020
	.uleb128 0
	.uleb128 .LEHB2-.LFB4020
	.uleb128 .LEHE2-.LEHB2
	.uleb128 0
	.uleb128 0
.LLSDACSE4020:
	.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
	.section	.rodata.cst8,"aM",@progbits,8
	.align 8
.LC2:
	.long	0
	.long	1075838976
	.align 8
.LC3:
	.long	0
	.long	1062207488
	.hidden	DW.ref.__gxx_personality_v0
	.weak	DW.ref.__gxx_personality_v0
	.section	.data.rel.local.DW.ref.__gxx_personality_v0,"awG",@progbits,DW.ref.__gxx_personality_v0,comdat
	.align 8
	.type	DW.ref.__gxx_personality_v0, @object
	.size	DW.ref.__gxx_personality_v0, 8
DW.ref.__gxx_personality_v0:
	.quad	__gxx_personality_v0
	.ident	"GCC: (Ubuntu 13.3.0-6ubuntu2~24.04) 13.3.0"
	.section	.note.GNU-stack,"",@progbits
	.section	.note.gnu.property,"a"
	.align 8
	.long	1f - 0f
	.long	4f - 1f
	.long	5
0:
	.string	"GNU"
1:
	.align 8
	.long	0xc0000002
	.long	3f - 2f
2:
	.long	0x3
3:
	.align 8
4:


#include <hip/hip_runtime.h>
#include<iostream>
#include<algorithm>
#include<stdio.h>
#include<fstream>
#include <stdlib.h>
using namespace std;
#define REPEAT 1
#define Real double
#define STRIDE 1
#define CACHELINE 8
__global__ void VecAdd(Real* A, int* N, Real* d_time);


int main(int argc, char* argv[])
{
   if(argc != 2)
   {
     std::cout << "Wrong number of argument!! Exiting program !!!";
     return 0;
   }
      
  // struct timeval tv1, tv2;
   int N = atoi(argv[1]);
   //register long elapsed=0;
   Real *A, *d_A;
   int *d_N;// *B, *C, *d_A, *d_B, *d_C ;           
   std::ofstream fp;
   fp.open("/home/hpc/ihpc/ihpc002h/gpu-exp/Master-thesis/data/result.txt", std::ofstream::app);
    double *d_time, h_time;
    A  = (Real*)malloc(N*sizeof(Real)); 
   // B  = (Real*)malloc(N*sizeof(Real)); 
   // C  = (Real*)malloc(N*sizeof(Real));
    
    
    hipMalloc(&d_A, N*sizeof(Real));
    hipMalloc(&d_time, sizeof(double));
    hipMalloc(&d_N, sizeof(double));
   // cudaMalloc(&d_B, N*sizeof(Real));
   // cudaMalloc(&d_C, N*sizeof(Real));
    
    
    for(int i=0; i < N ; i++)
    {
      A[i] = (i+STRIDE)%N;
     // B[i] = rand()%5;
      //C[i] = 0.0;
    }
    
    hipMemcpy(d_A, A, N*sizeof(Real), hipMemcpyHostToDevice );
    hipMemcpy(d_N, &N, sizeof(int), hipMemcpyHostToDevice );
    //cudaMemcpy(d_C, C, N*sizeof(Real), cudaMemcpyHostToDevice );
    
    //for(int i=0 ; i < REPEAT ; i++)
    //{
    //gettimeofday(&tv1, NULL);                  
    VecAdd<<<1, 1>>>(d_A, d_N, d_time);
    //gettimeofday(&tv2, NULL);
    //elapsed += ((tv2.tv_sec-tv1.tv_sec)*1000000.0 + (tv2.tv_usec-tv1.tv_usec));
    //}
    
    hipMemcpy(&h_time, d_time, sizeof(double), hipMemcpyDeviceToHost);
    hipDeviceSynchronize();
   //cout << N << std::endl;
    
    //double td = (N * 8.0)/1024;
    //cout << h_time << " " << CLOCKS_PER_SEC << std::endl;
    
    fp << N*8.0/1024.0 << " " << h_time << std::endl;
    
    for(int i =0; i < N ; i++)
    {
     // cout << A[i] << std::endl;
    }
     //fs << std::endl;
   
    hipFree(d_A);
    //cudaFree(d_B);
    //cudaFree(d_C);
    fp.close();
}

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

                                        # End of file scope inline assembly
	.section	.rodata.cst8,"aM",@progbits,8
	.p2align	3, 0x0                          # -- Begin function main
.LCPI0_0:
	.quad	0x4020000000000000              # double 8
.LCPI0_1:
	.quad	0x3f50000000000000              # double 9.765625E-4
	.text
	.globl	main
	.type	main,@function
main:                                   # @main
.Lfunc_begin0:
	.cfi_startproc
	.cfi_personality 3, __gxx_personality_v0
	.cfi_lsda 3, .Lexception0
# %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	pushq	%r14
	.cfi_def_cfa_offset 24
	pushq	%rbx
	.cfi_def_cfa_offset 32
	subq	$560, %rsp                      # imm = 0x230
	.cfi_def_cfa_offset 592
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	.cfi_offset %rbp, -16
	cmpl	$2, %edi
	jne	.LBB0_1
# %bb.2:
	movq	8(%rsi), %rdi
	callq	atoi
	movl	%eax, %ebp
	movl	%eax, 12(%rsp)
	leaq	48(%rsp), %rbx
	movq	%rbx, %rdi
	callq	_ZNSt14basic_ofstreamIcSt11char_traitsIcEEC1Ev
.Ltmp0:
	movl	$.L.str.1, %esi
	movq	%rbx, %rdi
	movl	$1, %edx
	callq	_ZNSt14basic_ofstreamIcSt11char_traitsIcEE4openEPKcSt13_Ios_Openmode
.Ltmp1:
# %bb.3:
	movslq	%ebp, %rbx
	shlq	$3, %rbx
	movq	%rbx, %rdi
	callq	malloc
	movq	%rax, %r14
.Ltmp3:
	leaq	16(%rsp), %rdi
	movq	%rbx, %rsi
	callq	hipMalloc
.Ltmp4:
# %bb.4:                                # %_ZL9hipMallocIdE10hipError_tPPT_m.exit
.Ltmp5:
	leaq	24(%rsp), %rdi
	movl	$8, %esi
	callq	hipMalloc
.Ltmp6:
# %bb.5:                                # %_ZL9hipMallocIdE10hipError_tPPT_m.exit21
.Ltmp7:
	leaq	32(%rsp), %rdi
	movl	$8, %esi
	callq	hipMalloc
.Ltmp8:
# %bb.6:                                # %_ZL9hipMallocIiE10hipError_tPPT_m.exit.preheader
	testl	%ebp, %ebp
	jle	.LBB0_11
# %bb.7:                                # %_ZL9hipMallocIiE10hipError_tPPT_m.exit.preheader29
	movl	%ebp, %eax
	negq	%rax
	movl	$1, %ecx
.LBB0_8:                                # %_ZL9hipMallocIiE10hipError_tPPT_m.exit
                                        # =>This Inner Loop Header: Depth=1
	movq	%rax, %rdx
	xorpd	%xmm0, %xmm0
	addq	%rcx, %rdx
	je	.LBB0_10
# %bb.9:                                # %_ZL9hipMallocIiE10hipError_tPPT_m.exit
                                        #   in Loop: Header=BB0_8 Depth=1
	xorps	%xmm0, %xmm0
	cvtsi2sd	%ecx, %xmm0
.LBB0_10:                               # %_ZL9hipMallocIiE10hipError_tPPT_m.exit
                                        #   in Loop: Header=BB0_8 Depth=1
	movsd	%xmm0, -8(%r14,%rcx,8)
	leaq	(%rax,%rcx), %rdx
	incq	%rdx
	incq	%rcx
	cmpq	$1, %rdx
	jne	.LBB0_8
.LBB0_11:                               # %_ZL9hipMallocIiE10hipError_tPPT_m.exit._crit_edge
	movq	16(%rsp), %rdi
.Ltmp9:
	movq	%r14, %rsi
	movq	%rbx, %rdx
	movl	$1, %ecx
	callq	hipMemcpy
.Ltmp10:
# %bb.12:
	movq	32(%rsp), %rdi
.Ltmp11:
	leaq	12(%rsp), %rsi
	movl	$4, %edx
	movl	$1, %ecx
	callq	hipMemcpy
.Ltmp12:
# %bb.13:
.Ltmp13:
	movabsq	$4294967297, %rdi               # imm = 0x100000001
	movl	$1, %esi
	movq	%rdi, %rdx
	movl	$1, %ecx
	xorl	%r8d, %r8d
	xorl	%r9d, %r9d
	callq	__hipPushCallConfiguration
.Ltmp14:
# %bb.14:
	testl	%eax, %eax
	jne	.LBB0_16
# %bb.15:
	movq	16(%rsp), %rdi
	movq	32(%rsp), %rsi
	movq	24(%rsp), %rdx
.Ltmp15:
	callq	_Z21__device_stub__VecAddPdPiS_
.Ltmp16:
.LBB0_16:
	movq	24(%rsp), %rsi
.Ltmp17:
	leaq	40(%rsp), %rdi
	movl	$8, %edx
	movl	$2, %ecx
	callq	hipMemcpy
.Ltmp18:
# %bb.17:
.Ltmp19:
	callq	hipDeviceSynchronize
.Ltmp20:
# %bb.18:
	xorps	%xmm0, %xmm0
	cvtsi2sdl	12(%rsp), %xmm0
	mulsd	.LCPI0_0(%rip), %xmm0
	mulsd	.LCPI0_1(%rip), %xmm0
.Ltmp21:
	leaq	48(%rsp), %rdi
	callq	_ZNSo9_M_insertIdEERSoT_
.Ltmp22:
# %bb.19:                               # %_ZNSolsEd.exit
.Ltmp23:
	movq	%rax, %rbx
	movl	$.L.str.2, %esi
	movl	$1, %edx
	movq	%rax, %rdi
	callq	_ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l
.Ltmp24:
# %bb.20:                               # %_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc.exit
	movsd	40(%rsp), %xmm0                 # xmm0 = mem[0],zero
.Ltmp25:
	movq	%rbx, %rdi
	callq	_ZNSo9_M_insertIdEERSoT_
.Ltmp26:
# %bb.21:                               # %_ZNSolsEd.exit22
	movq	%rax, %rbx
	movq	(%rax), %rax
	movq	-24(%rax), %rdi
	addq	%rbx, %rdi
.Ltmp27:
	movl	$10, %esi
	callq	_ZNKSt9basic_iosIcSt11char_traitsIcEE5widenEc
.Ltmp28:
# %bb.22:                               # %.noexc
.Ltmp29:
	movsbl	%al, %esi
	movq	%rbx, %rdi
	callq	_ZNSo3putEc
.Ltmp30:
# %bb.23:                               # %.noexc23
.Ltmp31:
	movq	%rax, %rdi
	callq	_ZNSo5flushEv
.Ltmp32:
# %bb.24:                               # %_ZNSolsEPFRSoS_E.exit.preheader
	movq	16(%rsp), %rdi
.Ltmp33:
	callq	hipFree
.Ltmp34:
# %bb.25:
.Ltmp35:
	leaq	48(%rsp), %rdi
	callq	_ZNSt14basic_ofstreamIcSt11char_traitsIcEE5closeEv
.Ltmp36:
# %bb.26:
	movq	_ZTTSt14basic_ofstreamIcSt11char_traitsIcEE(%rip), %rax
	leaq	56(%rsp), %rdi
	movq	%rax, -8(%rdi)
	movq	_ZTTSt14basic_ofstreamIcSt11char_traitsIcEE+24(%rip), %rcx
	movq	-24(%rax), %rax
	movq	%rcx, 48(%rsp,%rax)
	callq	_ZNSt13basic_filebufIcSt11char_traitsIcEED2Ev
	leaq	296(%rsp), %rdi
	callq	_ZNSt8ios_baseD2Ev
	jmp	.LBB0_27
.LBB0_1:
	movl	$_ZSt4cout, %edi
	movl	$.L.str, %esi
	movl	$46, %edx
	callq	_ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l
.LBB0_27:
	xorl	%eax, %eax
	addq	$560, %rsp                      # imm = 0x230
	.cfi_def_cfa_offset 32
	popq	%rbx
	.cfi_def_cfa_offset 24
	popq	%r14
	.cfi_def_cfa_offset 16
	popq	%rbp
	.cfi_def_cfa_offset 8
	retq
.LBB0_28:
	.cfi_def_cfa_offset 592
.Ltmp2:
	jmp	.LBB0_29
.LBB0_30:
.Ltmp37:
.LBB0_29:
	movq	%rax, %rbx
	leaq	48(%rsp), %rdi
	callq	_ZNSt14basic_ofstreamIcSt11char_traitsIcEED1Ev
	movq	%rbx, %rdi
	callq	_Unwind_Resume@PLT
.Lfunc_end0:
	.size	main, .Lfunc_end0-main
	.cfi_endproc
	.section	.gcc_except_table,"a",@progbits
	.p2align	2, 0x0
GCC_except_table0:
.Lexception0:
	.byte	255                             # @LPStart Encoding = omit
	.byte	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 .Ltmp36-.Ltmp3                 #   Call between .Ltmp3 and .Ltmp36
	.uleb128 .Ltmp37-.Lfunc_begin0          #     jumps to .Ltmp37
	.byte	0                               #   On action: cleanup
	.uleb128 .Ltmp36-.Lfunc_begin0          # >> Call Site 4 <<
	.uleb128 .Lfunc_end0-.Ltmp36            #   Call between .Ltmp36 and .Lfunc_end0
	.byte	0                               #     has no landing pad
	.byte	0                               #   On action: cleanup
.Lcst_end0:
	.p2align	2, 0x0
                                        # -- End function
	.type	.L.str,@object                  # @.str
	.section	.rodata.str1.1,"aMS",@progbits,1
.L.str:
	.asciz	"Wrong number of argument!! Exiting program !!!"
	.size	.L.str, 47

	.type	.L.str.1,@object                # @.str.1
.L.str.1:
	.asciz	"/home/hpc/ihpc/ihpc002h/gpu-exp/Master-thesis/data/result.txt"
	.size	.L.str.1, 62

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

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

	.text
	.p2alignl 7, 3214868480
	.fill 96, 4, 3214868480
	.type	__hip_cuid_,@object             ; @__hip_cuid_
	.section	.bss,"aw",@nobits
	.globl	__hip_cuid_
__hip_cuid_:
	.byte	0                               ; 0x0
	.size	__hip_cuid_, 1

	.ident	"AMD clang version 18.0.0git (https://github.com/RadeonOpenCompute/llvm-project roc-6.3.2 25012 e5bf7e55c91490b07c49d8960fa7983d864936c4)"
	.section	".note.GNU-stack","",@progbits
	.addrsig
	.addrsig_sym __hip_cuid_
	.amdgcn_target "amdgcn-amd-amdhsa--gfx1100"
	.amdgpu_metadata
---
amdhsa.kernels:  []
amdhsa.target:   amdgcn-amd-amdhsa--gfx1100
amdhsa.version:
  - 1
  - 2
...

	.end_amdgpu_metadata
