#include "user.cuh"

using namespace std;

int main(int argc, char *argv[]) {
    // Preapre file I/O
    string fileName;
    if (argc == 1) fileName = "maxFloatNum.csv";
    else fileName = argv[1];
    CSV_Data cd(fileName, true);

    // Generate Vector
    printf("[INFO] Generating vector...\n");
    float minVal = INFINITY, maxVal = -INFINITY;
    float *p_host_vector = (float *)malloc(VECTOR_SIZE * sizeof(float));
    generateVector(p_host_vector, VECTOR_SIZE, &minVal, &maxVal);
    printf("[INFO] Max value:%.4f, Min Value:%.4f\n", maxVal, minVal);

    // Copy vector from host to device
    float *p_host_max_val   = (float *)malloc(sizeof(float)), *p_device_vector;
    float *p_host_device_max_val = (float *)malloc(sizeof(float)), *p_device_max_val;
    cudaMalloc((void **)&p_device_vector, VECTOR_SIZE * sizeof(float));
    cudaMalloc((void **)&p_device_max_val, sizeof(float));
    cudaMemcpy(p_device_vector, p_host_vector, VECTOR_SIZE * sizeof(float), cudaMemcpyHostToDevice);

    printf("Starting Benchmark (ITERATION: %d)\n", ITERATION);

    // Host Code
    struct timeval startTime, endTime;
    float host_exec_time = 0.0;
    for (int iter = 0; iter < ITERATION; iter++) {
        gettimeofday(&startTime, NULL);
        host_maxValueVector(p_host_vector, VECTOR_SIZE, p_host_max_val);
        gettimeofday(&endTime, NULL);
        float tmp_exec_time = (endTime.tv_sec - startTime.tv_sec) * 1000. + (endTime.tv_usec - startTime.tv_usec) / 1000.;
        host_exec_time += tmp_exec_time;
    }
    host_exec_time /= ITERATION;
    cd.AddHostData(host_exec_time, p_host_max_val, sizeof(float));

    // Device Code
    for (int numThreadsPerBlk = NUM_THREADS_BASE; numThreadsPerBlk <= NUM_THREADS_MAX; numThreadsPerBlk*=2) {
        for (int numBlks = NUM_THREAD_BLKS_FROM; numBlks <= NUM_THREAD_BLKS_TO; numBlks*=2) {
            int numElements = VECTOR_SIZE;
            int numOps = numElements > (numBlks * numThreadsPerBlk) ?
                        numElements / (numBlks * numThreadsPerBlk) + (numElements % (numBlks * numThreadsPerBlk) ? 1 : 0) : 1;
            int *p_device_block_cnt, host_block_cnt;
            cudaMalloc((void **)&p_device_block_cnt, sizeof(int));
            dim3 gridSize(numBlks);
            dim3 blockSize(numThreadsPerBlk);
            float avg_exec_time = 0.0;
            for (int iter = 0; iter < ITERATION; iter++) {
                cudaEvent_t cuda_start, cuda_end;
                float tmp_exec_time;
                cudaEventCreate(&cuda_start);
                cudaEventCreate(&cuda_end);

                // Prepare data
                cudaMemset(p_device_max_val, 0, sizeof(float));
                cudaMemset(p_device_block_cnt, 0, sizeof(int));

                // Execute Kernel
                cudaEventRecord(cuda_start, 0);
                device_maxValueVector<<<gridSize, blockSize, numThreadsPerBlk*sizeof(float)>>>
                                    (p_device_vector, p_device_max_val, VECTOR_SIZE, p_device_block_cnt, numOps);
                cudaDeviceSynchronize();
                cudaEventRecord(cuda_end, 0);
                cudaEventSynchronize(cuda_end);
                cudaEventElapsedTime(&tmp_exec_time, cuda_start, cuda_end);
                cudaEventDestroy(cuda_start);
                cudaEventDestroy(cuda_end);
                avg_exec_time += tmp_exec_time;
            }

            avg_exec_time /= ITERATION; // Get average of execution time.

            // Print Results
            cudaMemcpy(&host_block_cnt, p_device_block_cnt, sizeof(int), cudaMemcpyDeviceToHost);
            cudaMemcpy(p_host_device_max_val, p_device_max_val, sizeof(float), cudaMemcpyDeviceToHost);
            cd.AddDeviceData(numThreadsPerBlk, numBlks, avg_exec_time, p_host_device_max_val, sizeof(float));

            cudaFree(p_device_block_cnt);
        }
    }

    // Deallocation
    cudaFree(p_device_vector);
    cudaFree(p_device_max_val);
    free(p_host_vector);
    free(p_host_max_val);
    free(p_host_device_max_val);
}

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

#NO_APP
	.type	_ZL26__cudaUnregisterBinaryUtilv, @function
_ZL26__cudaUnregisterBinaryUtilv:
.LFB4854:
	.cfi_startproc
	endbr64
	movq	_ZL20__cudaFatCubinHandle(%rip), %rdi
	jmp	__cudaUnregisterFatBinary@PLT
	.cfi_endproc
.LFE4854:
	.size	_ZL26__cudaUnregisterBinaryUtilv, .-_ZL26__cudaUnregisterBinaryUtilv
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC1:
	.string	"maxFloatNum.csv"
.LC2:
	.string	"[INFO] Generating vector...\n"
.LC5:
	.string	"[INFO] Max value:%.4f, Min Value:%.4f\n"
.LC6:
	.string	"Starting Benchmark (ITERATION: %d)\n"
	.section	.text.startup,"ax",@progbits
	.globl	main
	.type	main, @function
main:
.LFB4850:
	.cfi_startproc
	.cfi_personality 0x9b,DW.ref.__gxx_personality_v0
	.cfi_lsda 0x1b,.LLSDA4850
	endbr64
	pushq	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	pushq	%r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	pushq	%r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	pushq	%r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	pushq	%rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	subq	$776, %rsp
	.cfi_def_cfa_offset 832
	movq	%fs:40, %rax
	movq	%rax, 760(%rsp)
	xorl	%eax, %eax
	leaq	176(%rsp), %rax
	movb	$0, 176(%rsp)
	leaq	160(%rsp), %rbx
	movq	%rax, 160(%rsp)
	xorl	%eax, %eax
	decl	%edi
	movq	%rax, 168(%rsp)
	jne	.L3
	movl	$15, %r8d
	leaq	.LC1(%rip), %rcx
.L34:
	xorl	%edx, %edx
	xorl	%esi, %esi
	movq	%rbx, %rdi
.LEHB0:
	call	_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE10_M_replaceEmmPKcm@PLT
	leaq	192(%rsp), %r12
	movq	%rbx, %rsi
	movq	%r12, %rdi
	call	_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC1ERKS4_@PLT
.LEHE0:
	jmp	.L36
.L3:
	movq	8(%rsi), %rbp
	movq	%rbp, %rdi
	call	strlen@PLT
	movq	%rbp, %rcx
	movq	%rax, %r8
	jmp	.L34
.L36:
	leaq	224(%rsp), %rbp
	movl	$1, %edx
	movq	%r12, %rsi
	movq	%rbp, %rdi
.LEHB1:
	call	_ZN8CSV_DataC1ENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEb@PLT
.LEHE1:
	movq	%r12, %rdi
	call	_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE10_M_disposeEv@PLT
	leaq	.LC2(%rip), %rsi
	movl	$2, %edi
	xorl	%eax, %eax
.LEHB2:
	call	__printf_chk@PLT
	movl	$400000000, %edi
	movl	$0x7f800000, 52(%rsp)
	movl	$0xff800000, 56(%rsp)
	call	malloc@PLT
	leaq	56(%rsp), %rcx
	leaq	52(%rsp), %rdx
	movl	$100000000, %esi
	movq	%rax, %rdi
	movq	%rax, (%rsp)
	call	_Z14generateVectorPfiS_S_@PLT
	leaq	.LC5(%rip), %rsi
	movl	$2, %edi
	movb	$2, %al
	cvtss2sd	56(%rsp), %xmm0
	cvtss2sd	52(%rsp), %xmm1
	call	__printf_chk@PLT
	movl	$4, %edi
	call	malloc@PLT
	movl	$4, %edi
	movq	%rax, 8(%rsp)
	call	malloc@PLT
	leaq	64(%rsp), %rdi
	movl	$400000000, %esi
	movq	%rax, 16(%rsp)
	call	cudaMalloc@PLT
	leaq	72(%rsp), %rdi
	movl	$4, %esi
	call	cudaMalloc@PLT
	movq	(%rsp), %rsi
	movq	64(%rsp), %rdi
	movl	$1, %ecx
	movl	$400000000, %edx
	call	cudaMemcpy@PLT
	movl	$10, %edx
	leaq	.LC6(%rip), %rsi
	movl	$2, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	movl	$0x00000000, 24(%rsp)
	movl	$10, %ebx
.L6:
	leaq	128(%rsp), %rdi
	xorl	%esi, %esi
	call	gettimeofday@PLT
	movq	8(%rsp), %rdx
	movq	(%rsp), %rdi
	movl	$100000000, %esi
	call	_Z19host_maxValueVectorPfiS_@PLT
	leaq	144(%rsp), %rdi
	xorl	%esi, %esi
	call	gettimeofday@PLT
	movq	144(%rsp), %rax
	subq	128(%rsp), %rax
	cvtsi2sdq	%rax, %xmm0
	mulsd	.LC7(%rip), %xmm0
	movq	152(%rsp), %rax
	subq	136(%rsp), %rax
	cvtsi2sdq	%rax, %xmm1
	divsd	.LC7(%rip), %xmm1
	addsd	%xmm1, %xmm0
	cvtsd2ss	%xmm0, %xmm0
	addss	24(%rsp), %xmm0
	movss	%xmm0, 24(%rsp)
	decl	%ebx
	jne	.L6
	movq	8(%rsp), %rsi
	movl	$4, %edx
	movq	%rbp, %rdi
	divss	.LC8(%rip), %xmm0
	call	_ZN8CSV_Data11AddHostDataEfPvm@PLT
	movl	$6, %r12d
	movl	$32, %ebx
	movabsq	$4294967297, %r13
.L7:
	movslq	%ebx, %rax
	movl	$10, %r15d
	movl	$1, %ebp
	salq	$2, %rax
	movq	%rax, 32(%rsp)
.L13:
	movl	%ebx, %ecx
	movl	$1, 28(%rsp)
	imull	%ebp, %ecx
	cmpl	$99999999, %ecx
	jg	.L8
	movl	$100000000, %eax
	cltd
	idivl	%ecx
	cmpl	$1, %edx
	sbbl	$-1, %eax
	movl	%eax, 28(%rsp)
.L8:
	leaq	80(%rsp), %rdi
	movl	$4, %esi
	call	cudaMalloc@PLT
	leaq	88(%rsp), %rax
	movl	%ebp, 104(%rsp)
	movl	$10, %r14d
	movq	%r13, 108(%rsp)
	movl	%ebx, 116(%rsp)
	movq	%r13, 120(%rsp)
	movl	$0x00000000, 24(%rsp)
	movq	%rax, 40(%rsp)
.L12:
	movq	40(%rsp), %rdi
	call	cudaEventCreate@PLT
	leaq	96(%rsp), %rdi
	call	cudaEventCreate@PLT
	movq	72(%rsp), %rdi
	movl	$4, %edx
	xorl	%esi, %esi
	call	cudaMemset@PLT
	movq	80(%rsp), %rdi
	movl	$4, %edx
	xorl	%esi, %esi
	call	cudaMemset@PLT
	movq	88(%rsp), %rdi
	xorl	%esi, %esi
	call	cudaEventRecord@PLT
	movl	124(%rsp), %ecx
	movq	32(%rsp), %r8
	xorl	%r9d, %r9d
	movq	116(%rsp), %rdx
	movq	104(%rsp), %rdi
	movl	112(%rsp), %esi
	call	__cudaPushCallConfiguration@PLT
	testl	%eax, %eax
	je	.L9
.L11:
	call	cudaDeviceSynchronize@PLT
	jmp	.L37
.L9:
	movl	28(%rsp), %r8d
	movq	80(%rsp), %rcx
	movl	$100000000, %edx
	movq	72(%rsp), %rsi
	movq	64(%rsp), %rdi
	call	_Z21device_maxValueVectorPfS_iPii@PLT
	jmp	.L11
.L37:
	movq	96(%rsp), %rdi
	xorl	%esi, %esi
	call	cudaEventRecord@PLT
	movq	96(%rsp), %rdi
	call	cudaEventSynchronize@PLT
	movq	96(%rsp), %rdx
	movq	88(%rsp), %rsi
	leaq	60(%rsp), %rdi
	call	cudaEventElapsedTime@PLT
	movq	88(%rsp), %rdi
	call	cudaEventDestroy@PLT
	movq	96(%rsp), %rdi
	call	cudaEventDestroy@PLT
	movss	24(%rsp), %xmm2
	addss	60(%rsp), %xmm2
	movss	%xmm2, 24(%rsp)
	decl	%r14d
	jne	.L12
	movq	80(%rsp), %rsi
	leaq	96(%rsp), %rdi
	movl	$2, %ecx
	movaps	%xmm2, %xmm3
	movl	$4, %edx
	divss	.LC8(%rip), %xmm3
	movss	%xmm3, 24(%rsp)
	call	cudaMemcpy@PLT
	movq	72(%rsp), %rsi
	movq	16(%rsp), %rdi
	movl	$2, %ecx
	movl	$4, %edx
	call	cudaMemcpy@PLT
	movq	16(%rsp), %rcx
	movss	24(%rsp), %xmm0
	movl	%ebp, %edx
	movl	%ebx, %esi
	leaq	224(%rsp), %r14
	movl	$4, %r8d
	movq	%r14, %rdi
	call	_ZN8CSV_Data13AddDeviceDataEiifPvm@PLT
	movq	80(%rsp), %rdi
	call	cudaFree@PLT
	addl	%ebp, %ebp
	decl	%r15d
	jne	.L13
	addl	%ebx, %ebx
	decl	%r12d
	jne	.L7
	movq	64(%rsp), %rdi
	call	cudaFree@PLT
	movq	72(%rsp), %rdi
	call	cudaFree@PLT
.LEHE2:
	movq	(%rsp), %rdi
	call	free@PLT
	movq	8(%rsp), %rdi
	call	free@PLT
	movq	16(%rsp), %rdi
	call	free@PLT
	movq	%r14, %rdi
	call	_ZN8CSV_DataD1Ev@PLT
	leaq	160(%rsp), %rdi
	call	_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE10_M_disposeEv@PLT
	movq	760(%rsp), %rax
	subq	%fs:40, %rax
	je	.L19
	jmp	.L31
.L23:
	endbr64
	movq	%rax, %rbx
.L15:
	movq	%r12, %rdi
	call	_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE10_M_disposeEv@PLT
	jmp	.L16
.L24:
	endbr64
	movq	%rax, %rbx
.L17:
	leaq	224(%rsp), %rdi
	call	_ZN8CSV_DataD1Ev@PLT
	jmp	.L16
.L22:
	endbr64
	movq	%rax, %rbx
.L16:
	leaq	160(%rsp), %rdi
	call	_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE10_M_disposeEv@PLT
	movq	760(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L31
	movq	%rbx, %rdi
.LEHB3:
	call	_Unwind_Resume@PLT
.LEHE3:
.L31:
	call	__stack_chk_fail@PLT
.L19:
	addq	$776, %rsp
	.cfi_def_cfa_offset 56
	xorl	%eax, %eax
	popq	%rbx
	.cfi_def_cfa_offset 48
	popq	%rbp
	.cfi_def_cfa_offset 40
	popq	%r12
	.cfi_def_cfa_offset 32
	popq	%r13
	.cfi_def_cfa_offset 24
	popq	%r14
	.cfi_def_cfa_offset 16
	popq	%r15
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE4850:
	.globl	__gxx_personality_v0
	.section	.gcc_except_table,"a",@progbits
.LLSDA4850:
	.byte	0xff
	.byte	0xff
	.byte	0x1
	.uleb128 .LLSDACSE4850-.LLSDACSB4850
.LLSDACSB4850:
	.uleb128 .LEHB0-.LFB4850
	.uleb128 .LEHE0-.LEHB0
	.uleb128 .L22-.LFB4850
	.uleb128 0
	.uleb128 .LEHB1-.LFB4850
	.uleb128 .LEHE1-.LEHB1
	.uleb128 .L23-.LFB4850
	.uleb128 0
	.uleb128 .LEHB2-.LFB4850
	.uleb128 .LEHE2-.LEHB2
	.uleb128 .L24-.LFB4850
	.uleb128 0
	.uleb128 .LEHB3-.LFB4850
	.uleb128 .LEHE3-.LEHB3
	.uleb128 0
	.uleb128 0
.LLSDACSE4850:
	.section	.text.startup
	.size	main, .-main
	.type	_ZL24__sti____cudaRegisterAllv, @function
_ZL24__sti____cudaRegisterAllv:
.LFB4877:
	.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
.LFE4877:
	.size	_ZL24__sti____cudaRegisterAllv, .-_ZL24__sti____cudaRegisterAllv
	.section	.init_array,"aw"
	.align 8
	.quad	_ZL24__sti____cudaRegisterAllv
	.section	.nvFatBinSegment,"aw"
	.align 8
	.type	_ZL15__fatDeviceText, @object
	.size	_ZL15__fatDeviceText, 24
_ZL15__fatDeviceText:
	.long	1180844977
	.long	1
	.quad	fatbinData
	.quad	0
	.local	_ZL20__cudaFatCubinHandle
	.comm	_ZL20__cudaFatCubinHandle,8,8
	.section	.rodata.cst8,"aM",@progbits,8
	.align 8
.LC7:
	.long	0
	.long	1083129856
	.section	.rodata.cst4,"aM",@progbits,4
	.align 4
.LC8:
	.long	1092616192
	.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 "user.cuh"

using namespace std;

int main(int argc, char *argv[]) {
    // Preapre file I/O
    string fileName;
    if (argc == 1) fileName = "maxFloatNum.csv";
    else fileName = argv[1];
    CSV_Data cd(fileName, true);

    // Generate Vector
    printf("[INFO] Generating vector...\n");
    float minVal = INFINITY, maxVal = -INFINITY;
    float *p_host_vector = (float *)malloc(VECTOR_SIZE * sizeof(float));
    generateVector(p_host_vector, VECTOR_SIZE, &minVal, &maxVal);
    printf("[INFO] Max value:%.4f, Min Value:%.4f\n", maxVal, minVal);

    // Copy vector from host to device
    float *p_host_max_val   = (float *)malloc(sizeof(float)), *p_device_vector;
    float *p_host_device_max_val = (float *)malloc(sizeof(float)), *p_device_max_val;
    hipMalloc((void **)&p_device_vector, VECTOR_SIZE * sizeof(float));
    hipMalloc((void **)&p_device_max_val, sizeof(float));
    hipMemcpy(p_device_vector, p_host_vector, VECTOR_SIZE * sizeof(float), hipMemcpyHostToDevice);

    printf("Starting Benchmark (ITERATION: %d)\n", ITERATION);

    // Host Code
    struct timeval startTime, endTime;
    float host_exec_time = 0.0;
    for (int iter = 0; iter < ITERATION; iter++) {
        gettimeofday(&startTime, NULL);
        host_maxValueVector(p_host_vector, VECTOR_SIZE, p_host_max_val);
        gettimeofday(&endTime, NULL);
        float tmp_exec_time = (endTime.tv_sec - startTime.tv_sec) * 1000. + (endTime.tv_usec - startTime.tv_usec) / 1000.;
        host_exec_time += tmp_exec_time;
    }
    host_exec_time /= ITERATION;
    cd.AddHostData(host_exec_time, p_host_max_val, sizeof(float));

    // Device Code
    for (int numThreadsPerBlk = NUM_THREADS_BASE; numThreadsPerBlk <= NUM_THREADS_MAX; numThreadsPerBlk*=2) {
        for (int numBlks = NUM_THREAD_BLKS_FROM; numBlks <= NUM_THREAD_BLKS_TO; numBlks*=2) {
            int numElements = VECTOR_SIZE;
            int numOps = numElements > (numBlks * numThreadsPerBlk) ?
                        numElements / (numBlks * numThreadsPerBlk) + (numElements % (numBlks * numThreadsPerBlk) ? 1 : 0) : 1;
            int *p_device_block_cnt, host_block_cnt;
            hipMalloc((void **)&p_device_block_cnt, sizeof(int));
            dim3 gridSize(numBlks);
            dim3 blockSize(numThreadsPerBlk);
            float avg_exec_time = 0.0;
            for (int iter = 0; iter < ITERATION; iter++) {
                hipEvent_t cuda_start, cuda_end;
                float tmp_exec_time;
                hipEventCreate(&cuda_start);
                hipEventCreate(&cuda_end);

                // Prepare data
                hipMemset(p_device_max_val, 0, sizeof(float));
                hipMemset(p_device_block_cnt, 0, sizeof(int));

                // Execute Kernel
                hipEventRecord(cuda_start, 0);
                device_maxValueVector<<<gridSize, blockSize, numThreadsPerBlk*sizeof(float)>>>
                                    (p_device_vector, p_device_max_val, VECTOR_SIZE, p_device_block_cnt, numOps);
                hipDeviceSynchronize();
                hipEventRecord(cuda_end, 0);
                hipEventSynchronize(cuda_end);
                hipEventElapsedTime(&tmp_exec_time, cuda_start, cuda_end);
                hipEventDestroy(cuda_start);
                hipEventDestroy(cuda_end);
                avg_exec_time += tmp_exec_time;
            }

            avg_exec_time /= ITERATION; // Get average of execution time.

            // Print Results
            hipMemcpy(&host_block_cnt, p_device_block_cnt, sizeof(int), hipMemcpyDeviceToHost);
            hipMemcpy(p_host_device_max_val, p_device_max_val, sizeof(float), hipMemcpyDeviceToHost);
            cd.AddDeviceData(numThreadsPerBlk, numBlks, avg_exec_time, p_host_device_max_val, sizeof(float));

            hipFree(p_device_block_cnt);
        }
    }

    // Deallocation
    hipFree(p_device_vector);
    hipFree(p_device_max_val);
    free(p_host_vector);
    free(p_host_max_val);
    free(p_host_device_max_val);
}

	.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	0x408f400000000000              # double 1000
	.section	.rodata.cst4,"aM",@progbits,4
	.p2align	2, 0x0
.LCPI0_1:
	.long	0x41200000                      # float 10
	.text
	.globl	main
	.type	main,@function
main:                                   # @main
.Lfunc_begin0:
	.cfi_startproc
	.cfi_personality 3, __gxx_personality_v0
	.cfi_lsda 3, .Lexception0
# %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	pushq	%r15
	.cfi_def_cfa_offset 24
	pushq	%r14
	.cfi_def_cfa_offset 32
	pushq	%r13
	.cfi_def_cfa_offset 40
	pushq	%r12
	.cfi_def_cfa_offset 48
	pushq	%rbx
	.cfi_def_cfa_offset 56
	subq	$744, %rsp                      # imm = 0x2E8
	.cfi_def_cfa_offset 800
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	.cfi_offset %rbp, -16
	leaq	96(%rsp), %rax
	movq	%rax, -16(%rax)
	movq	$0, -8(%rax)
	movb	$0, (%rax)
	cmpl	$1, %edi
	jne	.LBB0_2
# %bb.1:
.Ltmp2:
	leaq	80(%rsp), %rdi
	movl	$.L.str, %ecx
	movl	$15, %r8d
	xorl	%esi, %esi
	xorl	%edx, %edx
	callq	_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE10_M_replaceEmmPKcm
.Ltmp3:
	jmp	.LBB0_3
.LBB0_2:
	movq	8(%rsi), %rbx
	movq	%rbx, %rdi
	callq	strlen
.Ltmp0:
	leaq	80(%rsp), %rdi
	xorl	%esi, %esi
	xorl	%edx, %edx
	movq	%rbx, %rcx
	movq	%rax, %r8
	callq	_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE10_M_replaceEmmPKcm
.Ltmp1:
.LBB0_3:                                # %_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEaSEPKc.exit
	leaq	192(%rsp), %r14
	movq	%r14, -16(%r14)
	movq	80(%rsp), %rsi
	movq	88(%rsp), %rdx
	addq	%rsi, %rdx
.Ltmp5:
	leaq	176(%rsp), %rdi
	callq	_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPcEEvT_S7_St20forward_iterator_tag
.Ltmp6:
# %bb.4:                                # %_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2ERKS4_.exit
.Ltmp8:
	leaq	208(%rsp), %rdi
	leaq	176(%rsp), %rsi
	movl	$1, %edx
	callq	_ZN8CSV_DataC1ENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEb
.Ltmp9:
# %bb.5:
	movq	176(%rsp), %rdi
	cmpq	%r14, %rdi
	je	.LBB0_7
# %bb.6:                                # %_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE11_M_is_localEv.exit.i.i
	callq	_ZdlPv
.LBB0_7:                                # %_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev.exit
	movl	$.Lstr, %edi
	callq	puts@PLT
	leaq	76(%rsp), %rbx
	movl	$2139095040, (%rbx)             # imm = 0x7F800000
	leaq	72(%rsp), %r14
	movl	$-8388608, (%r14)               # imm = 0xFF800000
	movl	$400000000, %edi                # imm = 0x17D78400
	callq	malloc
	movq	%rax, %r15
.Ltmp11:
	movq	%rax, %rdi
	movl	$100000000, %esi                # imm = 0x5F5E100
	movq	%rbx, %rdx
	movq	%r14, %rcx
	callq	_Z14generateVectorPfiS_S_
.Ltmp12:
# %bb.8:
	cvtss2sd	72(%rsp), %xmm0
	cvtss2sd	76(%rsp), %xmm1
	movl	$.L.str.2, %edi
	movb	$2, %al
	callq	printf
	movl	$4, %edi
	callq	malloc
	movq	%rax, %r12
	movl	$4, %edi
	callq	malloc
	movq	%rax, 32(%rsp)                  # 8-byte Spill
.Ltmp14:
	leaq	56(%rsp), %rdi
	movl	$400000000, %esi                # imm = 0x17D78400
	callq	hipMalloc
.Ltmp15:
# %bb.9:
.Ltmp16:
	leaq	24(%rsp), %rdi
	movl	$4, %esi
	callq	hipMalloc
.Ltmp17:
# %bb.10:
	movq	56(%rsp), %rdi
.Ltmp18:
	movl	$400000000, %edx                # imm = 0x17D78400
	movq	%r15, %rsi
	movl	$1, %ecx
	callq	hipMemcpy
.Ltmp19:
# %bb.11:
	movl	$10, %ebp
	movl	$.L.str.3, %edi
	movl	$10, %esi
	xorl	%eax, %eax
	callq	printf
	xorps	%xmm0, %xmm0
	leaq	160(%rsp), %rbx
	leaq	144(%rsp), %r14
.LBB0_12:                               # =>This Inner Loop Header: Depth=1
	movss	%xmm0, 4(%rsp)                  # 4-byte Spill
	movq	%rbx, %rdi
	xorl	%esi, %esi
	callq	gettimeofday
.Ltmp21:
	movq	%r15, %rdi
	movl	$100000000, %esi                # imm = 0x5F5E100
	movq	%r12, %rdx
	callq	_Z19host_maxValueVectorPfiS_
.Ltmp22:
# %bb.13:                               #   in Loop: Header=BB0_12 Depth=1
	movq	%r14, %rdi
	xorl	%esi, %esi
	callq	gettimeofday
	movq	144(%rsp), %rax
	subq	160(%rsp), %rax
	xorps	%xmm0, %xmm0
	cvtsi2sd	%rax, %xmm0
	movq	152(%rsp), %rax
	movsd	.LCPI0_0(%rip), %xmm2           # xmm2 = mem[0],zero
	mulsd	%xmm2, %xmm0
	subq	168(%rsp), %rax
	xorps	%xmm1, %xmm1
	cvtsi2sd	%rax, %xmm1
	divsd	%xmm2, %xmm1
	addsd	%xmm0, %xmm1
	xorps	%xmm0, %xmm0
	cvtsd2ss	%xmm1, %xmm0
	movss	4(%rsp), %xmm1                  # 4-byte Reload
                                        # xmm1 = mem[0],zero,zero,zero
	addss	%xmm0, %xmm1
	movaps	%xmm1, %xmm0
	decl	%ebp
	jne	.LBB0_12
# %bb.14:
	movq	%r15, 120(%rsp)                 # 8-byte Spill
	divss	.LCPI0_1(%rip), %xmm0
.Ltmp24:
	leaq	208(%rsp), %rdi
	movl	$4, %edx
	movq	%r12, 112(%rsp)                 # 8-byte Spill
	movq	%r12, %rsi
	callq	_ZN8CSV_Data11AddHostDataEfPvm
.Ltmp25:
# %bb.15:                               # %.preheader.preheader
	movl	$32, %ecx
	leaq	68(%rsp), %r14
.LBB0_16:                               # %.preheader
                                        # =>This Loop Header: Depth=1
                                        #     Child Loop BB0_17 Depth 2
                                        #       Child Loop BB0_21 Depth 3
	movl	%ecx, %r13d
	movabsq	$4294967296, %rax               # imm = 0x100000000
	orq	%rax, %r13
	movq	%rcx, 40(%rsp)                  # 8-byte Spill
	leal	(,%rcx,4), %r15d
	movl	$1, %ebx
.LBB0_17:                               #   Parent Loop BB0_16 Depth=1
                                        # =>  This Loop Header: Depth=2
                                        #       Child Loop BB0_21 Depth 3
	movl	%ebx, %ecx
	imull	40(%rsp), %ecx                  # 4-byte Folded Reload
	movl	$1, %r12d
	cmpl	$99999999, %ecx                 # imm = 0x5F5E0FF
	jg	.LBB0_19
# %bb.18:                               #   in Loop: Header=BB0_17 Depth=2
	movl	$100000000, %eax                # imm = 0x5F5E100
	xorl	%edx, %edx
	divl	%ecx
	movl	%eax, %r12d
	decl	%ecx
	movl	$100000000, %eax                # imm = 0x5F5E100
	andl	%eax, %ecx
	cmpl	$1, %ecx
	sbbl	$-1, %r12d
.LBB0_19:                               #   in Loop: Header=BB0_17 Depth=2
.Ltmp26:
	movl	$4, %esi
	leaq	16(%rsp), %rdi
	callq	hipMalloc
.Ltmp27:
# %bb.20:                               #   in Loop: Header=BB0_17 Depth=2
	movq	%rbx, 128(%rsp)                 # 8-byte Spill
	movl	%ebx, %ebp
	movabsq	$4294967296, %rax               # imm = 0x100000000
	orq	%rax, %rbp
	xorps	%xmm0, %xmm0
	movss	%xmm0, 4(%rsp)                  # 4-byte Spill
	movl	$10, %ebx
.LBB0_21:                               #   Parent Loop BB0_16 Depth=1
                                        #     Parent Loop BB0_17 Depth=2
                                        # =>    This Inner Loop Header: Depth=3
.Ltmp29:
	leaq	48(%rsp), %rdi
	callq	hipEventCreate
.Ltmp30:
# %bb.22:                               #   in Loop: Header=BB0_21 Depth=3
.Ltmp31:
	leaq	8(%rsp), %rdi
	callq	hipEventCreate
.Ltmp32:
# %bb.23:                               #   in Loop: Header=BB0_21 Depth=3
	movq	24(%rsp), %rdi
.Ltmp33:
	movl	$4, %edx
	xorl	%esi, %esi
	callq	hipMemset
.Ltmp34:
# %bb.24:                               #   in Loop: Header=BB0_21 Depth=3
	movq	16(%rsp), %rdi
.Ltmp35:
	movl	$4, %edx
	xorl	%esi, %esi
	callq	hipMemset
.Ltmp36:
# %bb.25:                               #   in Loop: Header=BB0_21 Depth=3
	movq	48(%rsp), %rdi
.Ltmp37:
	xorl	%esi, %esi
	callq	hipEventRecord
.Ltmp38:
# %bb.26:                               #   in Loop: Header=BB0_21 Depth=3
.Ltmp39:
	movq	%rbp, %rdi
	movl	$1, %esi
	movq	%r13, %rdx
	movl	$1, %ecx
	movq	%r15, %r8
	xorl	%r9d, %r9d
	callq	__hipPushCallConfiguration
.Ltmp40:
# %bb.27:                               #   in Loop: Header=BB0_21 Depth=3
	testl	%eax, %eax
	jne	.LBB0_29
# %bb.28:                               #   in Loop: Header=BB0_21 Depth=3
	movq	56(%rsp), %rdi
	movq	24(%rsp), %rsi
	movq	16(%rsp), %rcx
.Ltmp41:
	movl	$100000000, %edx                # imm = 0x5F5E100
	movl	%r12d, %r8d
	callq	_Z36__device_stub__device_maxValueVectorPfS_iPii
.Ltmp42:
.LBB0_29:                               #   in Loop: Header=BB0_21 Depth=3
.Ltmp43:
	callq	hipDeviceSynchronize
.Ltmp44:
# %bb.30:                               #   in Loop: Header=BB0_21 Depth=3
	movq	8(%rsp), %rdi
.Ltmp45:
	xorl	%esi, %esi
	callq	hipEventRecord
.Ltmp46:
# %bb.31:                               #   in Loop: Header=BB0_21 Depth=3
	movq	8(%rsp), %rdi
.Ltmp47:
	callq	hipEventSynchronize
.Ltmp48:
# %bb.32:                               #   in Loop: Header=BB0_21 Depth=3
	movq	48(%rsp), %rsi
	movq	8(%rsp), %rdx
.Ltmp49:
	movq	%r14, %rdi
	callq	hipEventElapsedTime
.Ltmp50:
# %bb.33:                               #   in Loop: Header=BB0_21 Depth=3
	movq	48(%rsp), %rdi
.Ltmp51:
	callq	hipEventDestroy
.Ltmp52:
# %bb.34:                               #   in Loop: Header=BB0_21 Depth=3
	movq	8(%rsp), %rdi
.Ltmp53:
	callq	hipEventDestroy
.Ltmp54:
# %bb.35:                               #   in Loop: Header=BB0_21 Depth=3
	movss	4(%rsp), %xmm0                  # 4-byte Reload
                                        # xmm0 = mem[0],zero,zero,zero
	addss	68(%rsp), %xmm0
	movss	%xmm0, 4(%rsp)                  # 4-byte Spill
	decl	%ebx
	jne	.LBB0_21
# %bb.36:                               #   in Loop: Header=BB0_17 Depth=2
	movss	4(%rsp), %xmm0                  # 4-byte Reload
                                        # xmm0 = mem[0],zero,zero,zero
	divss	.LCPI0_1(%rip), %xmm0
	movss	%xmm0, 4(%rsp)                  # 4-byte Spill
	movq	16(%rsp), %rsi
.Ltmp56:
	movl	$4, %edx
	leaq	140(%rsp), %rdi
	movl	$2, %ecx
	callq	hipMemcpy
.Ltmp57:
	movq	128(%rsp), %rbx                 # 8-byte Reload
# %bb.37:                               #   in Loop: Header=BB0_17 Depth=2
	movq	24(%rsp), %rsi
.Ltmp58:
	movl	$4, %edx
	movq	32(%rsp), %rdi                  # 8-byte Reload
	movl	$2, %ecx
	callq	hipMemcpy
.Ltmp59:
# %bb.38:                               #   in Loop: Header=BB0_17 Depth=2
.Ltmp60:
	movl	$4, %r8d
	leaq	208(%rsp), %rdi
	movq	40(%rsp), %rsi                  # 8-byte Reload
                                        # kill: def $esi killed $esi killed $rsi
	movl	%ebx, %edx
	movss	4(%rsp), %xmm0                  # 4-byte Reload
                                        # xmm0 = mem[0],zero,zero,zero
	movq	32(%rsp), %rcx                  # 8-byte Reload
	callq	_ZN8CSV_Data13AddDeviceDataEiifPvm
.Ltmp61:
# %bb.39:                               #   in Loop: Header=BB0_17 Depth=2
	movq	16(%rsp), %rdi
.Ltmp62:
	callq	hipFree
.Ltmp63:
# %bb.40:                               #   in Loop: Header=BB0_17 Depth=2
	leal	(%rbx,%rbx), %eax
	cmpl	$257, %ebx                      # imm = 0x101
	movl	%eax, %ebx
	jb	.LBB0_17
# %bb.41:                               #   in Loop: Header=BB0_16 Depth=1
	movq	40(%rsp), %rcx                  # 8-byte Reload
	leal	(%rcx,%rcx), %eax
	cmpl	$513, %ecx                      # imm = 0x201
	movl	%eax, %ecx
	jb	.LBB0_16
# %bb.42:
	movq	56(%rsp), %rdi
.Ltmp65:
	callq	hipFree
.Ltmp66:
# %bb.43:
	movq	24(%rsp), %rdi
.Ltmp67:
	callq	hipFree
.Ltmp68:
# %bb.44:
	movq	120(%rsp), %rdi                 # 8-byte Reload
	callq	free
	movq	112(%rsp), %rdi                 # 8-byte Reload
	callq	free
	movq	32(%rsp), %rdi                  # 8-byte Reload
	callq	free
	leaq	208(%rsp), %rdi
	callq	_ZN8CSV_DataD1Ev
	movq	80(%rsp), %rdi
	leaq	96(%rsp), %rax
	cmpq	%rax, %rdi
	je	.LBB0_46
# %bb.45:                               # %_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE11_M_is_localEv.exit.i.i77
	callq	_ZdlPv
.LBB0_46:                               # %_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev.exit79
	xorl	%eax, %eax
	addq	$744, %rsp                      # imm = 0x2E8
	.cfi_def_cfa_offset 56
	popq	%rbx
	.cfi_def_cfa_offset 48
	popq	%r12
	.cfi_def_cfa_offset 40
	popq	%r13
	.cfi_def_cfa_offset 32
	popq	%r14
	.cfi_def_cfa_offset 24
	popq	%r15
	.cfi_def_cfa_offset 16
	popq	%rbp
	.cfi_def_cfa_offset 8
	retq
.LBB0_47:
	.cfi_def_cfa_offset 800
.Ltmp13:
	jmp	.LBB0_59
.LBB0_48:
.Ltmp10:
	movq	%rax, %rbx
	movq	176(%rsp), %rdi
	cmpq	%r14, %rdi
	je	.LBB0_60
# %bb.49:                               # %_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE11_M_is_localEv.exit.i.i74
	callq	_ZdlPv
	jmp	.LBB0_60
.LBB0_50:
.Ltmp7:
	jmp	.LBB0_52
.LBB0_51:
.Ltmp4:
.LBB0_52:                               # %_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev.exit76
	movq	%rax, %rbx
	jmp	.LBB0_60
.LBB0_53:
.Ltmp69:
	jmp	.LBB0_59
.LBB0_54:
.Ltmp20:
	jmp	.LBB0_59
.LBB0_55:
.Ltmp23:
	jmp	.LBB0_59
.LBB0_56:
.Ltmp28:
	jmp	.LBB0_59
.LBB0_57:
.Ltmp64:
	jmp	.LBB0_59
.LBB0_58:
.Ltmp55:
.LBB0_59:
	movq	%rax, %rbx
	leaq	208(%rsp), %rdi
	callq	_ZN8CSV_DataD1Ev
.LBB0_60:                               # %_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev.exit76
	leaq	96(%rsp), %rax
	movq	80(%rsp), %rdi
	cmpq	%rax, %rdi
	je	.LBB0_62
# %bb.61:                               # %_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE11_M_is_localEv.exit.i.i80
	callq	_ZdlPv
.LBB0_62:                               # %_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev.exit82
	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 .Ltmp2-.Lfunc_begin0           # >> Call Site 1 <<
	.uleb128 .Ltmp1-.Ltmp2                  #   Call between .Ltmp2 and .Ltmp1
	.uleb128 .Ltmp4-.Lfunc_begin0           #     jumps to .Ltmp4
	.byte	0                               #   On action: cleanup
	.uleb128 .Ltmp5-.Lfunc_begin0           # >> Call Site 2 <<
	.uleb128 .Ltmp6-.Ltmp5                  #   Call between .Ltmp5 and .Ltmp6
	.uleb128 .Ltmp7-.Lfunc_begin0           #     jumps to .Ltmp7
	.byte	0                               #   On action: cleanup
	.uleb128 .Ltmp8-.Lfunc_begin0           # >> Call Site 3 <<
	.uleb128 .Ltmp9-.Ltmp8                  #   Call between .Ltmp8 and .Ltmp9
	.uleb128 .Ltmp10-.Lfunc_begin0          #     jumps to .Ltmp10
	.byte	0                               #   On action: cleanup
	.uleb128 .Ltmp11-.Lfunc_begin0          # >> Call Site 4 <<
	.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 5 <<
	.uleb128 .Ltmp19-.Ltmp14                #   Call between .Ltmp14 and .Ltmp19
	.uleb128 .Ltmp20-.Lfunc_begin0          #     jumps to .Ltmp20
	.byte	0                               #   On action: cleanup
	.uleb128 .Ltmp21-.Lfunc_begin0          # >> Call Site 6 <<
	.uleb128 .Ltmp22-.Ltmp21                #   Call between .Ltmp21 and .Ltmp22
	.uleb128 .Ltmp23-.Lfunc_begin0          #     jumps to .Ltmp23
	.byte	0                               #   On action: cleanup
	.uleb128 .Ltmp24-.Lfunc_begin0          # >> Call Site 7 <<
	.uleb128 .Ltmp25-.Ltmp24                #   Call between .Ltmp24 and .Ltmp25
	.uleb128 .Ltmp69-.Lfunc_begin0          #     jumps to .Ltmp69
	.byte	0                               #   On action: cleanup
	.uleb128 .Ltmp26-.Lfunc_begin0          # >> Call Site 8 <<
	.uleb128 .Ltmp27-.Ltmp26                #   Call between .Ltmp26 and .Ltmp27
	.uleb128 .Ltmp28-.Lfunc_begin0          #     jumps to .Ltmp28
	.byte	0                               #   On action: cleanup
	.uleb128 .Ltmp29-.Lfunc_begin0          # >> Call Site 9 <<
	.uleb128 .Ltmp54-.Ltmp29                #   Call between .Ltmp29 and .Ltmp54
	.uleb128 .Ltmp55-.Lfunc_begin0          #     jumps to .Ltmp55
	.byte	0                               #   On action: cleanup
	.uleb128 .Ltmp56-.Lfunc_begin0          # >> Call Site 10 <<
	.uleb128 .Ltmp63-.Ltmp56                #   Call between .Ltmp56 and .Ltmp63
	.uleb128 .Ltmp64-.Lfunc_begin0          #     jumps to .Ltmp64
	.byte	0                               #   On action: cleanup
	.uleb128 .Ltmp65-.Lfunc_begin0          # >> Call Site 11 <<
	.uleb128 .Ltmp68-.Ltmp65                #   Call between .Ltmp65 and .Ltmp68
	.uleb128 .Ltmp69-.Lfunc_begin0          #     jumps to .Ltmp69
	.byte	0                               #   On action: cleanup
	.uleb128 .Ltmp68-.Lfunc_begin0          # >> Call Site 12 <<
	.uleb128 .Lfunc_end0-.Ltmp68            #   Call between .Ltmp68 and .Lfunc_end0
	.byte	0                               #     has no landing pad
	.byte	0                               #   On action: cleanup
.Lcst_end0:
	.p2align	2, 0x0
                                        # -- End function
	.section	.text._ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPcEEvT_S7_St20forward_iterator_tag,"axG",@progbits,_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPcEEvT_S7_St20forward_iterator_tag,comdat
	.weak	_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPcEEvT_S7_St20forward_iterator_tag # -- Begin function _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPcEEvT_S7_St20forward_iterator_tag
	.p2align	1, 0x90
	.type	_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPcEEvT_S7_St20forward_iterator_tag,@function
_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPcEEvT_S7_St20forward_iterator_tag: # @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPcEEvT_S7_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	.LBB1_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	.LBB1_3
.LBB1_1:                                # %._crit_edge
	movq	(%rbx), %rax
.LBB1_3:
	testq	%r14, %r14
	je	.LBB1_7
# %bb.4:
	cmpq	$1, %r14
	jne	.LBB1_6
# %bb.5:
	movb	(%r15), %cl
	movb	%cl, (%rax)
	jmp	.LBB1_7
.LBB1_6:
	movq	%rax, %rdi
	movq	%r15, %rsi
	movq	%r14, %rdx
	callq	memcpy@PLT
.LBB1_7:                                # %_ZZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPcEEvT_S7_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_end1:
	.size	_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPcEEvT_S7_St20forward_iterator_tag, .Lfunc_end1-_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPcEEvT_S7_St20forward_iterator_tag
	.cfi_endproc
                                        # -- End function
	.type	.L.str,@object                  # @.str
	.section	.rodata.str1.1,"aMS",@progbits,1
.L.str:
	.asciz	"maxFloatNum.csv"
	.size	.L.str, 16

	.type	.L.str.2,@object                # @.str.2
.L.str.2:
	.asciz	"[INFO] Max value:%.4f, Min Value:%.4f\n"
	.size	.L.str.2, 39

	.type	.L.str.3,@object                # @.str.3
.L.str.3:
	.asciz	"Starting Benchmark (ITERATION: %d)\n"
	.size	.L.str.3, 36

	.type	__hip_cuid_,@object             # @__hip_cuid_
	.bss
	.globl	__hip_cuid_
__hip_cuid_:
	.byte	0                               # 0x0
	.size	__hip_cuid_, 1

	.type	.Lstr,@object                   # @str
	.section	.rodata.str1.1,"aMS",@progbits,1
.Lstr:
	.asciz	"[INFO] Generating vector..."
	.size	.Lstr, 28

	.ident	"AMD clang version 18.0.0git (https://github.com/RadeonOpenCompute/llvm-project roc-6.3.2 25012 e5bf7e55c91490b07c49d8960fa7983d864936c4)"
	.section	".note.GNU-stack","",@progbits
	.addrsig
	.addrsig_sym __gxx_personality_v0
	.addrsig_sym _Unwind_Resume
	.addrsig_sym __hip_cuid_

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

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

	.end_amdgpu_metadata
