#include <stdio.h>
#include <stdlib.h>
#include <cufft.h>
#include <iostream>

const int NX = 2048;
const int NY = 2048;

const int DEFAULT_FFT_TRIALS = 10000;
const int DEFAULT_META_TRIALS = 10;

const int BATCH_SIZE = 1;

int main(int argc, char **argv) {
    int fft_trials = DEFAULT_FFT_TRIALS;
    int meta_trials = DEFAULT_META_TRIALS;

    printf("[INFO] META trials: %d\n", meta_trials);
    printf("[INFO] FFT trials: %d\n", fft_trials);

    long nx = NX;
    long ny = NX;
    printf("[INFO] NX Length: %ld\n", nx);
    printf("[INFO] NY Length: %ld\n", ny);

    cufftComplex *h_original_signal, *h_applied_fft_signal;
    cudaMallocHost((void **) &h_original_signal, sizeof(cufftComplex) * NX * NY);
    cudaMallocHost((void **) &h_applied_fft_signal, sizeof(cufftComplex) * NX * NY);

    cufftComplex *d_original_signal, *d_applied_fft_signal;
    cudaMalloc((void **) &d_original_signal, sizeof(cufftComplex) * NX * NY);
    cudaMalloc((void **) &d_applied_fft_signal, sizeof(cufftComplex) * NX * NY);

    /*
     * generate random signal as original signal
     */
    srand(0); // initialize random seed
    for (int i = 0; i < NX*NY; i++) {
        h_original_signal[i].x = (float)((int)rand() % 10);
        h_original_signal[i].y = 0.0;
    }

//    for (int i = 0; i < NX; ++i){
//      for (int j = 0; j < NY; ++j){
//        std::cout << h_original_signal[i*NX + j].x << " ";
//     }
//      std::cout << std::endl;
//    }

    cudaMemcpy(d_original_signal, h_original_signal, sizeof(cufftComplex) * NX * NY, cudaMemcpyHostToDevice);

    cufftHandle fft_plan;
    //cufftPlan1d(&fft_plan, NX, CUFFT_C2C, BATCH_SIZE);
    cufftPlan2d(&fft_plan, NX, NY, CUFFT_C2C);
    
//    int *n = new int[2];
//    n[0] = nx;
//    n[1] = ny;
//
//    int *inembed = new int[2];
//    inembed[0] = nx;
//    inembed[1] = ny;
//
//    int istride = 1;
//    int idist = nx*ny;
//
//    cufftPlanMany(&fft_plan, 2, n, inembed, istride, idist, inembed, istride, idist, CUFFT_C2C, 1);

    cudaEvent_t start, stop;
    cudaEventCreate(&start);
    cudaEventCreate(&stop);

    float sum_of_elapsed_times = 0.0;

    printf("[INFO] Run benchmark...\n");
    for (int i = 0; i < meta_trials; i++) {
        cudaEventRecord(start, 0);

        for (int j = 0; j < fft_trials; j++) {
            cufftExecC2C(fft_plan, d_original_signal, d_applied_fft_signal, CUFFT_FORWARD);
        }

        cudaEventRecord(stop, 0);
        cudaEventSynchronize(stop);

        float elapsed_time_ms;
        cudaEventElapsedTime(&elapsed_time_ms, start, stop);

        float elapsed_time_sec = elapsed_time_ms / 1000.0;
        sum_of_elapsed_times += elapsed_time_sec;
        printf("%f sec\n", elapsed_time_sec);
    }


    cudaMemcpy(h_applied_fft_signal, d_applied_fft_signal, sizeof(cufftComplex) * NX * NY, cudaMemcpyDeviceToHost);

//    printf("[INFO] computing sum...\n");
//    
//    for (int i = 0; i < NX; ++i){
//      for (int j = 0; j < NY; ++j){
//        std::cout << h_applied_fft_signal[i*NX + j].x << " ";
//     }
//      std::cout << std::endl;
//    }
//    
//    float red = 0;
//    for (int i = 0; i < NX*NY; i++) {
//        red += h_applied_fft_signal[i].x;
//        red -= h_applied_fft_signal[i].y;
//    }
//
//    printf("SUM : %f\n", red);


    printf("[INFO] Finished!\n");
    printf("[INFO] Average: %lf sec\n", sum_of_elapsed_times / meta_trials);

    cudaEventDestroy(start);
    cudaEventDestroy(stop);
}


	.file	"tmpxft_0031d5e2_00000000-6_sfft2D.cudafe1.cpp"
	.text
#APP
	.globl _ZSt21ios_base_library_initv

#NO_APP
	.type	_ZL26__cudaUnregisterBinaryUtilv, @function
_ZL26__cudaUnregisterBinaryUtilv:
.LFB3661:
	.cfi_startproc
	endbr64
	movq	_ZL20__cudaFatCubinHandle(%rip), %rdi
	jmp	__cudaUnregisterFatBinary@PLT
	.cfi_endproc
.LFE3661:
	.size	_ZL26__cudaUnregisterBinaryUtilv, .-_ZL26__cudaUnregisterBinaryUtilv
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC1:
	.string	"[INFO] META trials: %d\n"
.LC2:
	.string	"[INFO] FFT trials: %d\n"
.LC3:
	.string	"[INFO] NX Length: %ld\n"
.LC4:
	.string	"[INFO] NY Length: %ld\n"
.LC5:
	.string	"[INFO] Run benchmark...\n"
.LC7:
	.string	"%f sec\n"
.LC8:
	.string	"[INFO] Finished!\n"
.LC10:
	.string	"[INFO] Average: %lf sec\n"
	.section	.text.startup,"ax",@progbits
	.globl	main
	.type	main, @function
main:
.LFB3658:
	.cfi_startproc
	endbr64
	pushq	%r14
	.cfi_def_cfa_offset 16
	.cfi_offset 14, -16
	movl	$10, %edx
	movl	$2, %edi
	leaq	.LC1(%rip), %rsi
	pushq	%rbp
	.cfi_def_cfa_offset 24
	.cfi_offset 6, -24
	movl	$10, %ebp
	pushq	%rbx
	.cfi_def_cfa_offset 32
	.cfi_offset 3, -32
	xorl	%ebx, %ebx
	subq	$64, %rsp
	.cfi_def_cfa_offset 96
	movq	%fs:40, %rax
	movq	%rax, 56(%rsp)
	xorl	%eax, %eax
	call	__printf_chk@PLT
	movl	$10000, %edx
	leaq	.LC2(%rip), %rsi
	xorl	%eax, %eax
	movl	$2, %edi
	call	__printf_chk@PLT
	movl	$2048, %edx
	leaq	.LC3(%rip), %rsi
	xorl	%eax, %eax
	movl	$2, %edi
	call	__printf_chk@PLT
	movl	$2048, %edx
	leaq	.LC4(%rip), %rsi
	xorl	%eax, %eax
	movl	$2, %edi
	call	__printf_chk@PLT
	leaq	8(%rsp), %rdi
	movl	$33554432, %esi
	call	cudaMallocHost@PLT
	leaq	16(%rsp), %rdi
	movl	$33554432, %esi
	call	cudaMallocHost@PLT
	leaq	24(%rsp), %rdi
	movl	$33554432, %esi
	call	cudaMalloc@PLT
	leaq	32(%rsp), %rdi
	movl	$33554432, %esi
	call	cudaMalloc@PLT
	xorl	%edi, %edi
	call	srand@PLT
.L3:
	call	rand@PLT
	movq	8(%rsp), %rsi
	cltd
	idivl	%ebp
	leaq	(%rsi,%rbx), %rcx
	addq	$8, %rbx
	movl	$0x00000000, 4(%rcx)
	cvtsi2ssl	%edx, %xmm0
	movss	%xmm0, (%rcx)
	cmpq	$33554432, %rbx
	jne	.L3
	movq	24(%rsp), %rdi
	movl	$1, %ecx
	movl	$33554432, %edx
	xorl	%r14d, %r14d
	movl	$10, %ebx
	call	cudaMemcpy@PLT
	movl	$41, %ecx
	movl	$2048, %edx
	movq	%rsp, %rdi
	movl	$2048, %esi
	call	cufftPlan2d@PLT
	leaq	40(%rsp), %rdi
	call	cudaEventCreate@PLT
	leaq	48(%rsp), %rdi
	call	cudaEventCreate@PLT
	leaq	.LC5(%rip), %rsi
	movl	$2, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
.L5:
	movq	40(%rsp), %rdi
	xorl	%esi, %esi
	movl	$10000, %ebp
	call	cudaEventRecord@PLT
.L4:
	movq	32(%rsp), %rdx
	movq	24(%rsp), %rsi
	orl	$-1, %ecx
	movl	(%rsp), %edi
	call	cufftExecC2C@PLT
	decl	%ebp
	jne	.L4
	movq	48(%rsp), %rdi
	xorl	%esi, %esi
	call	cudaEventRecord@PLT
	movq	48(%rsp), %rdi
	call	cudaEventSynchronize@PLT
	movq	40(%rsp), %rsi
	movq	48(%rsp), %rdx
	leaq	4(%rsp), %rdi
	call	cudaEventElapsedTime@PLT
	movd	%r14d, %xmm1
	movss	4(%rsp), %xmm0
	movb	$1, %al
	divss	.LC6(%rip), %xmm0
	addss	%xmm0, %xmm1
	movl	$2, %edi
	leaq	.LC7(%rip), %rsi
	cvtss2sd	%xmm0, %xmm0
	movd	%xmm1, %r14d
	call	__printf_chk@PLT
	decl	%ebx
	jne	.L5
	movq	32(%rsp), %rsi
	movq	16(%rsp), %rdi
	movl	$2, %ecx
	movl	$33554432, %edx
	call	cudaMemcpy@PLT
	leaq	.LC8(%rip), %rsi
	movl	$2, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	leaq	.LC10(%rip), %rsi
	movl	$2, %edi
	movb	$1, %al
	movd	%r14d, %xmm0
	divss	.LC9(%rip), %xmm0
	cvtss2sd	%xmm0, %xmm0
	call	__printf_chk@PLT
	movq	40(%rsp), %rdi
	call	cudaEventDestroy@PLT
	movq	48(%rsp), %rdi
	call	cudaEventDestroy@PLT
	movq	56(%rsp), %rax
	subq	%fs:40, %rax
	je	.L6
	call	__stack_chk_fail@PLT
.L6:
	addq	$64, %rsp
	.cfi_def_cfa_offset 32
	xorl	%eax, %eax
	popq	%rbx
	.cfi_def_cfa_offset 24
	popq	%rbp
	.cfi_def_cfa_offset 16
	popq	%r14
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE3658:
	.size	main, .-main
	.type	_ZL24__sti____cudaRegisterAllv, @function
_ZL24__sti____cudaRegisterAllv:
.LFB3684:
	.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
.LFE3684:
	.size	_ZL24__sti____cudaRegisterAllv, .-_ZL24__sti____cudaRegisterAllv
	.section	.init_array,"aw"
	.align 8
	.quad	_ZL24__sti____cudaRegisterAllv
	.section	.nvFatBinSegment,"aw"
	.align 8
	.type	_ZL15__fatDeviceText, @object
	.size	_ZL15__fatDeviceText, 24
_ZL15__fatDeviceText:
	.long	1180844977
	.long	1
	.quad	fatbinData
	.quad	0
	.local	_ZL20__cudaFatCubinHandle
	.comm	_ZL20__cudaFatCubinHandle,8,8
	.section	.rodata.cst4,"aM",@progbits,4
	.align 4
.LC6:
	.long	1148846080
	.align 4
.LC9:
	.long	1092616192
	.ident	"GCC: (Ubuntu 13.3.0-6ubuntu2~24.04) 13.3.0"
	.section	.note.GNU-stack,"",@progbits
	.section	.note.gnu.property,"a"
	.align 8
	.long	1f - 0f
	.long	4f - 1f
	.long	5
0:
	.string	"GNU"
1:
	.align 8
	.long	0xc0000002
	.long	3f - 2f
2:
	.long	0x3
3:
	.align 8
4:


#include <hip/hip_runtime.h>
#include <stdio.h>
#include <stdlib.h>
#include <hipfft/hipfft.h>
#include <iostream>

const int NX = 2048;
const int NY = 2048;

const int DEFAULT_FFT_TRIALS = 10000;
const int DEFAULT_META_TRIALS = 10;

const int BATCH_SIZE = 1;

int main(int argc, char **argv) {
    int fft_trials = DEFAULT_FFT_TRIALS;
    int meta_trials = DEFAULT_META_TRIALS;

    printf("[INFO] META trials: %d\n", meta_trials);
    printf("[INFO] FFT trials: %d\n", fft_trials);

    long nx = NX;
    long ny = NX;
    printf("[INFO] NX Length: %ld\n", nx);
    printf("[INFO] NY Length: %ld\n", ny);

    hipfftComplex *h_original_signal, *h_applied_fft_signal;
    hipHostMalloc((void **) &h_original_signal, sizeof(hipfftComplex) * NX * NY, hipHostMallocDefault);
    hipHostMalloc((void **) &h_applied_fft_signal, sizeof(hipfftComplex) * NX * NY, hipHostMallocDefault);

    hipfftComplex *d_original_signal, *d_applied_fft_signal;
    hipMalloc((void **) &d_original_signal, sizeof(hipfftComplex) * NX * NY);
    hipMalloc((void **) &d_applied_fft_signal, sizeof(hipfftComplex) * NX * NY);

    /*
     * generate random signal as original signal
     */
    srand(0); // initialize random seed
    for (int i = 0; i < NX*NY; i++) {
        h_original_signal[i].x = (float)((int)rand() % 10);
        h_original_signal[i].y = 0.0;
    }

//    for (int i = 0; i < NX; ++i){
//      for (int j = 0; j < NY; ++j){
//        std::cout << h_original_signal[i*NX + j].x << " ";
//     }
//      std::cout << std::endl;
//    }

    hipMemcpy(d_original_signal, h_original_signal, sizeof(hipfftComplex) * NX * NY, hipMemcpyHostToDevice);

    hipfftHandle fft_plan;
    //cufftPlan1d(&fft_plan, NX, CUFFT_C2C, BATCH_SIZE);
    hipfftPlan2d(&fft_plan, NX, NY, HIPFFT_C2C);
    
//    int *n = new int[2];
//    n[0] = nx;
//    n[1] = ny;
//
//    int *inembed = new int[2];
//    inembed[0] = nx;
//    inembed[1] = ny;
//
//    int istride = 1;
//    int idist = nx*ny;
//
//    cufftPlanMany(&fft_plan, 2, n, inembed, istride, idist, inembed, istride, idist, CUFFT_C2C, 1);

    hipEvent_t start, stop;
    hipEventCreate(&start);
    hipEventCreate(&stop);

    float sum_of_elapsed_times = 0.0;

    printf("[INFO] Run benchmark...\n");
    for (int i = 0; i < meta_trials; i++) {
        hipEventRecord(start, 0);

        for (int j = 0; j < fft_trials; j++) {
            hipfftExecC2C(fft_plan, d_original_signal, d_applied_fft_signal, HIPFFT_FORWARD);
        }

        hipEventRecord(stop, 0);
        hipEventSynchronize(stop);

        float elapsed_time_ms;
        hipEventElapsedTime(&elapsed_time_ms, start, stop);

        float elapsed_time_sec = elapsed_time_ms / 1000.0;
        sum_of_elapsed_times += elapsed_time_sec;
        printf("%f sec\n", elapsed_time_sec);
    }


    hipMemcpy(h_applied_fft_signal, d_applied_fft_signal, sizeof(hipfftComplex) * NX * NY, hipMemcpyDeviceToHost);

//    printf("[INFO] computing sum...\n");
//    
//    for (int i = 0; i < NX; ++i){
//      for (int j = 0; j < NY; ++j){
//        std::cout << h_applied_fft_signal[i*NX + j].x << " ";
//     }
//      std::cout << std::endl;
//    }
//    
//    float red = 0;
//    for (int i = 0; i < NX*NY; i++) {
//        red += h_applied_fft_signal[i].x;
//        red -= h_applied_fft_signal[i].y;
//    }
//
//    printf("SUM : %f\n", red);


    printf("[INFO] Finished!\n");
    printf("[INFO] Average: %lf sec\n", sum_of_elapsed_times / meta_trials);

    hipEventDestroy(start);
    hipEventDestroy(stop);
}


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

                                        # End of file scope inline assembly
	.section	.rodata.cst4,"aM",@progbits,4
	.p2align	2, 0x0                          # -- Begin function main
.LCPI0_0:
	.long	0x447a0000                      # float 1000
.LCPI0_1:
	.long	0x41200000                      # float 10
	.text
	.globl	main
	.type	main,@function
main:                                   # @main
	.cfi_startproc
# %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	pushq	%r14
	.cfi_def_cfa_offset 24
	pushq	%rbx
	.cfi_def_cfa_offset 32
	subq	$80, %rsp
	.cfi_def_cfa_offset 112
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	.cfi_offset %rbp, -16
	xorl	%ebx, %ebx
	movl	$.L.str, %edi
	movl	$10, %esi
	xorl	%eax, %eax
	callq	printf
	movl	$.L.str.1, %edi
	movl	$10000, %esi                    # imm = 0x2710
	xorl	%eax, %eax
	callq	printf
	movl	$.L.str.2, %edi
	movl	$2048, %esi                     # imm = 0x800
	xorl	%eax, %eax
	callq	printf
	movl	$.L.str.3, %edi
	movl	$2048, %esi                     # imm = 0x800
	xorl	%eax, %eax
	callq	printf
	leaq	32(%rsp), %rdi
	movl	$33554432, %esi                 # imm = 0x2000000
	xorl	%edx, %edx
	callq	hipHostMalloc
	leaq	72(%rsp), %rdi
	movl	$33554432, %esi                 # imm = 0x2000000
	xorl	%edx, %edx
	callq	hipHostMalloc
	leaq	56(%rsp), %rdi
	movl	$33554432, %esi                 # imm = 0x2000000
	callq	hipMalloc
	leaq	48(%rsp), %rdi
	movl	$33554432, %esi                 # imm = 0x2000000
	callq	hipMalloc
	xorl	%edi, %edi
	callq	srand
.LBB0_1:                                # =>This Inner Loop Header: Depth=1
	callq	rand
	cltq
	imulq	$1717986919, %rax, %rcx         # imm = 0x66666667
	movq	%rcx, %rdx
	shrq	$63, %rdx
	sarq	$34, %rcx
	addl	%edx, %ecx
	addl	%ecx, %ecx
	leal	(%rcx,%rcx,4), %ecx
	subl	%ecx, %eax
	xorps	%xmm0, %xmm0
	cvtsi2ss	%eax, %xmm0
	movq	32(%rsp), %rax
	movss	%xmm0, (%rax,%rbx,8)
	movq	32(%rsp), %rax
	movl	$0, 4(%rax,%rbx,8)
	incq	%rbx
	cmpq	$4194304, %rbx                  # imm = 0x400000
	jne	.LBB0_1
# %bb.2:
	movq	56(%rsp), %rdi
	movq	32(%rsp), %rsi
	movl	$33554432, %edx                 # imm = 0x2000000
	movl	$1, %ecx
	callq	hipMemcpy
	leaq	64(%rsp), %rdi
	movl	$2048, %esi                     # imm = 0x800
	movl	$2048, %edx                     # imm = 0x800
	movl	$41, %ecx
	callq	hipfftPlan2d
	leaq	24(%rsp), %rdi
	callq	hipEventCreate
	leaq	16(%rsp), %rdi
	callq	hipEventCreate
	movl	$.Lstr, %edi
	callq	puts@PLT
	xorps	%xmm0, %xmm0
	movss	%xmm0, 12(%rsp)                 # 4-byte Spill
	xorl	%r14d, %r14d
	leaq	44(%rsp), %rbx
.LBB0_3:                                # =>This Loop Header: Depth=1
                                        #     Child Loop BB0_4 Depth 2
	movq	24(%rsp), %rdi
	xorl	%esi, %esi
	callq	hipEventRecord
	movl	$10000, %ebp                    # imm = 0x2710
.LBB0_4:                                #   Parent Loop BB0_3 Depth=1
                                        # =>  This Inner Loop Header: Depth=2
	movq	64(%rsp), %rdi
	movq	56(%rsp), %rsi
	movq	48(%rsp), %rdx
	movl	$-1, %ecx
	callq	hipfftExecC2C
	decl	%ebp
	jne	.LBB0_4
# %bb.5:                                #   in Loop: Header=BB0_3 Depth=1
	movq	16(%rsp), %rdi
	xorl	%esi, %esi
	callq	hipEventRecord
	movq	16(%rsp), %rdi
	callq	hipEventSynchronize
	movq	24(%rsp), %rsi
	movq	16(%rsp), %rdx
	movq	%rbx, %rdi
	callq	hipEventElapsedTime
	movss	44(%rsp), %xmm0                 # xmm0 = mem[0],zero,zero,zero
	divss	.LCPI0_0(%rip), %xmm0
	movss	12(%rsp), %xmm1                 # 4-byte Reload
                                        # xmm1 = mem[0],zero,zero,zero
	addss	%xmm0, %xmm1
	movss	%xmm1, 12(%rsp)                 # 4-byte Spill
	cvtss2sd	%xmm0, %xmm0
	movl	$.L.str.5, %edi
	movb	$1, %al
	callq	printf
	incl	%r14d
	cmpl	$10, %r14d
	jne	.LBB0_3
# %bb.6:
	movq	72(%rsp), %rdi
	movq	48(%rsp), %rsi
	movl	$33554432, %edx                 # imm = 0x2000000
	movl	$2, %ecx
	callq	hipMemcpy
	movl	$.Lstr.1, %edi
	callq	puts@PLT
	movss	12(%rsp), %xmm0                 # 4-byte Reload
                                        # xmm0 = mem[0],zero,zero,zero
	divss	.LCPI0_1(%rip), %xmm0
	cvtss2sd	%xmm0, %xmm0
	movl	$.L.str.7, %edi
	movb	$1, %al
	callq	printf
	movq	24(%rsp), %rdi
	callq	hipEventDestroy
	movq	16(%rsp), %rdi
	callq	hipEventDestroy
	xorl	%eax, %eax
	addq	$80, %rsp
	.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
.Lfunc_end0:
	.size	main, .Lfunc_end0-main
	.cfi_endproc
                                        # -- End function
	.type	.L.str,@object                  # @.str
	.section	.rodata.str1.1,"aMS",@progbits,1
.L.str:
	.asciz	"[INFO] META trials: %d\n"
	.size	.L.str, 24

	.type	.L.str.1,@object                # @.str.1
.L.str.1:
	.asciz	"[INFO] FFT trials: %d\n"
	.size	.L.str.1, 23

	.type	.L.str.2,@object                # @.str.2
.L.str.2:
	.asciz	"[INFO] NX Length: %ld\n"
	.size	.L.str.2, 23

	.type	.L.str.3,@object                # @.str.3
.L.str.3:
	.asciz	"[INFO] NY Length: %ld\n"
	.size	.L.str.3, 23

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

	.type	.L.str.7,@object                # @.str.7
.L.str.7:
	.asciz	"[INFO] Average: %lf sec\n"
	.size	.L.str.7, 25

	.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] Run benchmark..."
	.size	.Lstr, 24

	.type	.Lstr.1,@object                 # @str.1
.Lstr.1:
	.asciz	"[INFO] Finished!"
	.size	.Lstr.1, 17

	.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_

	.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
