// Some useful utilities
// system includes
#include <stdio.h>
#include <assert.h>
#include <cuda.h>


// External function definitions

void checkCUDAError(const char *msg)
{
    cudaError_t err = cudaGetLastError();
    if( cudaSuccess != err) 
    {
        fprintf(stderr, "Cuda error: %s: %s.\n", msg, 
                                  cudaGetErrorString( err) );
        exit(EXIT_FAILURE);
    }                         
}
    // When there is more than one device,
    // select the fastest device and report characteristics

void selectAndReport(int *major, int *minor)
{
        int best_gpu = 0;
        // Use the device with the most cores
        int number_of_devices;
	cudaGetDeviceCount(&number_of_devices);
	checkCUDAError("Get Count");
        printf("\n%d Devices\n",number_of_devices);
        if (number_of_devices > 1) {
            int max_cores = 0;
            int device_number;
            for (device_number = 0; device_number < number_of_devices;
        device_number++) {
                cudaDeviceProp device_properties;
                cudaGetDeviceProperties(&device_properties, device_number);
                printf("Device # %d has %d cores\n",device_number, device_properties.multiProcessorCount);
                double gb = 1024*1024*1024;
                printf("Device # %d has %f GB global memory\n",device_number, ((double)device_properties.totalGlobalMem)/gb);
                if (max_cores < device_properties.multiProcessorCount) {
                    max_cores = device_properties.multiProcessorCount;
                    best_gpu = device_number;
                }
            }

            printf("\n *** Best GPU is: %d\n",best_gpu);
            cudaSetDevice(best_gpu);
            checkCUDAError("Can't set device\n");

        }
        printf("\n");
// get number of SMs on this GPU
        int devID;
        cudaGetDevice(&devID);
        cudaDeviceProp deviceProp;
        cudaGetDeviceProperties(&deviceProp, devID);
        printf("Device %d has %d cores\n", best_gpu, deviceProp.multiProcessorCount);
        double gb = 1024*1024*1024;
        printf("Device # %d has %f GB global memory\n",best_gpu, ((double)deviceProp.totalGlobalMem)/gb);

        if (deviceProp.major == 9999 && deviceProp.minor == 9999) {
            printf("There is no device supporting CUDA.\n");
            cudaThreadExit();
        } else {
            printf("Device is a %s, capability: %d.%d\n",  deviceProp.name, deviceProp.major, deviceProp.minor);
	    *major  = deviceProp.major;
	    *minor = deviceProp.minor;
        } 

        int driverVersion, runtimeVersion;
	assert(cudaSuccess == cudaDriverGetVersion(&driverVersion));
	assert(cudaSuccess == cudaRuntimeGetVersion(&runtimeVersion));
        printf("CUDA Driver version: %d, runtime version: %d\n\n", driverVersion, runtimeVersion);

}

	.file	"tmpxft_0031ffa0_00000000-6_utils.cudafe1.cpp"
	.text
#APP

#NO_APP
	.type	_ZL26__cudaUnregisterBinaryUtilv, @function
_ZL26__cudaUnregisterBinaryUtilv:
.LFB2031:
	.cfi_startproc
	endbr64
	movq	_ZL20__cudaFatCubinHandle(%rip), %rdi
	jmp	__cudaUnregisterFatBinary@PLT
	.cfi_endproc
.LFE2031:
	.size	_ZL26__cudaUnregisterBinaryUtilv, .-_ZL26__cudaUnregisterBinaryUtilv
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"Cuda error: %s: %s.\n"
	.text
	.globl	_Z14checkCUDAErrorPKc
	.type	_Z14checkCUDAErrorPKc, @function
_Z14checkCUDAErrorPKc:
.LFB2027:
	.cfi_startproc
	endbr64
	pushq	%rbx
	.cfi_def_cfa_offset 16
	.cfi_offset 3, -16
	movq	%rdi, %rbx
	call	cudaGetLastError@PLT
	testl	%eax, %eax
	je	.L2
	movl	%eax, %edi
	call	cudaGetErrorString@PLT
	movq	stderr(%rip), %rdi
	movq	%rbx, %rcx
	leaq	.LC0(%rip), %rdx
	movq	%rax, %r8
	movl	$2, %esi
	xorl	%eax, %eax
	call	__fprintf_chk@PLT
	movl	$1, %edi
	call	exit@PLT
.L2:
	popq	%rbx
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE2027:
	.size	_Z14checkCUDAErrorPKc, .-_Z14checkCUDAErrorPKc
	.section	.rodata.str1.1
.LC1:
	.string	"Get Count"
.LC2:
	.string	"\n%d Devices\n"
.LC3:
	.string	"Device # %d has %d cores\n"
.LC5:
	.string	"Device # %d has %f GB global memory\n"
.LC6:
	.string	"\n *** Best GPU is: %d\n"
.LC7:
	.string	"Can't set device\n"
.LC8:
	.string	"\n"
.LC9:
	.string	"Device %d has %d cores\n"
.LC10:
	.string	"There is no device supporting CUDA.\n"
.LC11:
	.string	"Device is a %s, capability: %d.%d\n"
.LC12:
	.string	"CUDA Driver version: %d, runtime version: %d\n\n"
	.text
	.globl	_Z15selectAndReportPiS_
	.type	_Z15selectAndReportPiS_, @function
_Z15selectAndReportPiS_:
.LFB2028:
	.cfi_startproc
	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
	movq	%rdi, %r13
	pushq	%r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	movq	%rsi, %r12
	pushq	%rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	xorl	%ebp, %ebp
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	subq	$1080, %rsp
	.cfi_def_cfa_offset 1136
	movq	%fs:40, %rax
	movq	%rax, 1064(%rsp)
	xorl	%eax, %eax
	leaq	24(%rsp), %rdi
	call	cudaGetDeviceCount@PLT
	leaq	.LC1(%rip), %rdi
	call	_Z14checkCUDAErrorPKc
	movl	24(%rsp), %edx
	xorl	%eax, %eax
	movl	$2, %edi
	leaq	.LC2(%rip), %rsi
	call	__printf_chk@PLT
	leaq	32(%rsp), %rax
	cmpl	$1, 24(%rsp)
	movq	%rax, 8(%rsp)
	jle	.L8
	xorl	%ebx, %ebx
	xorl	%r14d, %r14d
	leaq	.LC3(%rip), %r15
	xorl	%ebp, %ebp
.L7:
	cmpl	%ebx, 24(%rsp)
	jle	.L21
	movq	8(%rsp), %rdi
	movl	%ebx, %esi
	call	cudaGetDeviceProperties_v2@PLT
	movl	420(%rsp), %ecx
	movl	%ebx, %edx
	xorl	%eax, %eax
	movq	%r15, %rsi
	movl	$2, %edi
	call	__printf_chk@PLT
	movq	320(%rsp), %rax
	testq	%rax, %rax
	js	.L9
	cvtsi2sdq	%rax, %xmm0
	jmp	.L10
.L9:
	movq	%rax, %rdx
	andl	$1, %eax
	shrq	%rdx
	orq	%rax, %rdx
	cvtsi2sdq	%rdx, %xmm0
	addsd	%xmm0, %xmm0
.L10:
	movl	%ebx, %edx
	leaq	.LC5(%rip), %rsi
	movl	$2, %edi
	movb	$1, %al
	mulsd	.LC4(%rip), %xmm0
	call	__printf_chk@PLT
	movl	420(%rsp), %eax
	cmpl	%r14d, %eax
	jg	.L19
	movl	%r14d, %eax
	jmp	.L11
.L19:
	movl	%ebx, %ebp
.L11:
	incl	%ebx
	movl	%eax, %r14d
	jmp	.L7
.L21:
	movl	%ebp, %edx
	leaq	.LC6(%rip), %rsi
	movl	$2, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	movl	%ebp, %edi
	call	cudaSetDevice@PLT
	leaq	.LC7(%rip), %rdi
	call	_Z14checkCUDAErrorPKc
.L8:
	leaq	.LC8(%rip), %rsi
	movl	$2, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	leaq	28(%rsp), %rdi
	call	cudaGetDevice@PLT
	movl	28(%rsp), %esi
	movq	8(%rsp), %rdi
	call	cudaGetDeviceProperties_v2@PLT
	movl	420(%rsp), %ecx
	movl	%ebp, %edx
	xorl	%eax, %eax
	leaq	.LC9(%rip), %rsi
	movl	$2, %edi
	call	__printf_chk@PLT
	movq	320(%rsp), %rax
	testq	%rax, %rax
	js	.L13
	cvtsi2sdq	%rax, %xmm0
	jmp	.L14
.L13:
	movq	%rax, %rdx
	andl	$1, %eax
	shrq	%rdx
	orq	%rax, %rdx
	cvtsi2sdq	%rdx, %xmm0
	addsd	%xmm0, %xmm0
.L14:
	movl	%ebp, %edx
	leaq	.LC5(%rip), %rsi
	movl	$2, %edi
	movb	$1, %al
	mulsd	.LC4(%rip), %xmm0
	call	__printf_chk@PLT
	movabsq	$42945378002703, %rax
	cmpq	%rax, 392(%rsp)
	jne	.L15
	leaq	.LC10(%rip), %rsi
	movl	$2, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	call	cudaThreadExit@PLT
	jmp	.L16
.L15:
	movl	396(%rsp), %r8d
	movl	392(%rsp), %ecx
	xorl	%eax, %eax
	leaq	.LC11(%rip), %rsi
	movq	8(%rsp), %rdx
	movl	$2, %edi
	call	__printf_chk@PLT
	movl	392(%rsp), %eax
	movl	%eax, 0(%r13)
	movl	396(%rsp), %eax
	movl	%eax, (%r12)
.L16:
	xorl	%ecx, %ecx
	xorl	%edx, %edx
	xorl	%eax, %eax
	movl	$2, %edi
	leaq	.LC12(%rip), %rsi
	call	__printf_chk@PLT
	movq	1064(%rsp), %rax
	subq	%fs:40, %rax
	je	.L17
	call	__stack_chk_fail@PLT
.L17:
	addq	$1080, %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
.LFE2028:
	.size	_Z15selectAndReportPiS_, .-_Z15selectAndReportPiS_
	.section	.text.startup,"ax",@progbits
	.type	_ZL24__sti____cudaRegisterAllv, @function
_ZL24__sti____cudaRegisterAllv:
.LFB2054:
	.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
.LFE2054:
	.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
.LC4:
	.long	0
	.long	1041235968
	.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:

// Some useful utilities
// system includes
#include <stdio.h>
#include <assert.h>
#include <hip/hip_runtime.h>


// External function definitions

void checkCUDAError(const char *msg)
{
    hipError_t err = hipGetLastError();
    if( hipSuccess != err) 
    {
        fprintf(stderr, "Cuda error: %s: %s.\n", msg, 
                                  hipGetErrorString( err) );
        exit(EXIT_FAILURE);
    }                         
}
    // When there is more than one device,
    // select the fastest device and report characteristics

void selectAndReport(int *major, int *minor)
{
        int best_gpu = 0;
        // Use the device with the most cores
        int number_of_devices;
	hipGetDeviceCount(&number_of_devices);
	checkCUDAError("Get Count");
        printf("\n%d Devices\n",number_of_devices);
        if (number_of_devices > 1) {
            int max_cores = 0;
            int device_number;
            for (device_number = 0; device_number < number_of_devices;
        device_number++) {
                hipDeviceProp_t device_properties;
                hipGetDeviceProperties(&device_properties, device_number);
                printf("Device # %d has %d cores\n",device_number, device_properties.multiProcessorCount);
                double gb = 1024*1024*1024;
                printf("Device # %d has %f GB global memory\n",device_number, ((double)device_properties.totalGlobalMem)/gb);
                if (max_cores < device_properties.multiProcessorCount) {
                    max_cores = device_properties.multiProcessorCount;
                    best_gpu = device_number;
                }
            }

            printf("\n *** Best GPU is: %d\n",best_gpu);
            hipSetDevice(best_gpu);
            checkCUDAError("Can't set device\n");

        }
        printf("\n");
// get number of SMs on this GPU
        int devID;
        hipGetDevice(&devID);
        hipDeviceProp_t deviceProp;
        hipGetDeviceProperties(&deviceProp, devID);
        printf("Device %d has %d cores\n", best_gpu, deviceProp.multiProcessorCount);
        double gb = 1024*1024*1024;
        printf("Device # %d has %f GB global memory\n",best_gpu, ((double)deviceProp.totalGlobalMem)/gb);

        if (deviceProp.major == 9999 && deviceProp.minor == 9999) {
            printf("There is no device supporting CUDA.\n");
            hipDeviceReset();
        } else {
            printf("Device is a %s, capability: %d.%d\n",  deviceProp.name, deviceProp.major, deviceProp.minor);
	    *major  = deviceProp.major;
	    *minor = deviceProp.minor;
        } 

        int driverVersion, runtimeVersion;
	assert(hipSuccess == hipDriverGetVersion(&driverVersion));
	assert(hipSuccess == hipRuntimeGetVersion(&runtimeVersion));
        printf("CUDA Driver version: %d, runtime version: %d\n\n", driverVersion, runtimeVersion);

}

	.text
	.file	"utils.hip"
	.globl	_Z14checkCUDAErrorPKc           # -- Begin function _Z14checkCUDAErrorPKc
	.type	_Z14checkCUDAErrorPKc,@function
_Z14checkCUDAErrorPKc:                  # @_Z14checkCUDAErrorPKc
	.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
	movq	%rdi, %rbx
	callq	hipGetLastError
	testl	%eax, %eax
	jne	.LBB0_2
# %bb.1:
	addq	$8, %rsp
	.cfi_def_cfa_offset 24
	popq	%rbx
	.cfi_def_cfa_offset 16
	popq	%r14
	.cfi_def_cfa_offset 8
	retq
.LBB0_2:
	.cfi_def_cfa_offset 32
	movq	stderr(%rip), %r14
	movl	%eax, %edi
	callq	hipGetErrorString
	movl	$.L.str, %esi
	movq	%r14, %rdi
	movq	%rbx, %rdx
	movq	%rax, %rcx
	xorl	%eax, %eax
	callq	fprintf
	movl	$1, %edi
	callq	exit
.Lfunc_end0:
	.size	_Z14checkCUDAErrorPKc, .Lfunc_end0-_Z14checkCUDAErrorPKc
	.cfi_endproc
                                        # -- End function
	.section	.rodata.cst16,"aM",@progbits,16
	.p2align	4, 0x0                          # -- Begin function _Z15selectAndReportPiS_
.LCPI1_0:
	.long	1127219200                      # 0x43300000
	.long	1160773632                      # 0x45300000
	.long	0                               # 0x0
	.long	0                               # 0x0
.LCPI1_1:
	.quad	0x4330000000000000              # double 4503599627370496
	.quad	0x4530000000000000              # double 1.9342813113834067E+25
	.section	.rodata.cst8,"aM",@progbits,8
	.p2align	3, 0x0
.LCPI1_2:
	.quad	0x3e10000000000000              # double 9.3132257461547852E-10
	.text
	.globl	_Z15selectAndReportPiS_
	.type	_Z15selectAndReportPiS_,@function
_Z15selectAndReportPiS_:                # @_Z15selectAndReportPiS_
	.cfi_startproc
# %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	$1480, %rsp                     # imm = 0x5C8
	.cfi_def_cfa_offset 1536
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	.cfi_offset %rbp, -16
	movq	%rsi, %rbx
	movq	%rdi, %r14
	movq	%rsp, %r15
	movq	%r15, %rdi
	callq	hipGetDeviceCount
	movl	$.L.str.1, %edi
	callq	_Z14checkCUDAErrorPKc
	movl	(%r15), %esi
	xorl	%ebp, %ebp
	movl	$.L.str.2, %edi
	xorl	%eax, %eax
	callq	printf
	cmpl	$2, (%r15)
	jl	.LBB1_4
# %bb.1:                                # %.lr.ph
	leaq	8(%rsp), %r15
	xorl	%ebp, %ebp
	xorl	%r13d, %r13d
	xorl	%r12d, %r12d
.LBB1_2:                                # =>This Inner Loop Header: Depth=1
	movq	%r15, %rdi
	movl	%r12d, %esi
	callq	hipGetDevicePropertiesR0600
	movl	396(%rsp), %edx
	movl	$.L.str.3, %edi
	movl	%r12d, %esi
	xorl	%eax, %eax
	callq	printf
	movsd	296(%rsp), %xmm1                # xmm1 = mem[0],zero
	unpcklps	.LCPI1_0(%rip), %xmm1           # xmm1 = xmm1[0],mem[0],xmm1[1],mem[1]
	subpd	.LCPI1_1(%rip), %xmm1
	movapd	%xmm1, %xmm0
	unpckhpd	%xmm1, %xmm0                    # xmm0 = xmm0[1],xmm1[1]
	addsd	%xmm1, %xmm0
	mulsd	.LCPI1_2(%rip), %xmm0
	movl	$.L.str.4, %edi
	movl	%r12d, %esi
	movb	$1, %al
	callq	printf
	movl	396(%rsp), %eax
	cmpl	%eax, %r13d
	cmovlel	%eax, %r13d
	cmovll	%r12d, %ebp
	incl	%r12d
	cmpl	(%rsp), %r12d
	jl	.LBB1_2
# %bb.3:                                # %._crit_edge
	movl	$.L.str.5, %edi
	movl	%ebp, %esi
	xorl	%eax, %eax
	callq	printf
	movl	%ebp, %edi
	callq	hipSetDevice
	movl	$.L.str.6, %edi
	callq	_Z14checkCUDAErrorPKc
.LBB1_4:
	movl	$10, %edi
	callq	putchar@PLT
	leaq	4(%rsp), %r15
	movq	%r15, %rdi
	callq	hipGetDevice
	movl	(%r15), %esi
	leaq	8(%rsp), %r15
	movq	%r15, %rdi
	callq	hipGetDevicePropertiesR0600
	movl	388(%r15), %edx
	movl	$.L.str.8, %edi
	movl	%ebp, %esi
	xorl	%eax, %eax
	callq	printf
	movsd	288(%r15), %xmm1                # xmm1 = mem[0],zero
	unpcklps	.LCPI1_0(%rip), %xmm1           # xmm1 = xmm1[0],mem[0],xmm1[1],mem[1]
	subpd	.LCPI1_1(%rip), %xmm1
	movapd	%xmm1, %xmm0
	unpckhpd	%xmm1, %xmm0                    # xmm0 = xmm0[1],xmm1[1]
	addsd	%xmm1, %xmm0
	mulsd	.LCPI1_2(%rip), %xmm0
	movl	$.L.str.4, %edi
	movl	%ebp, %esi
	movb	$1, %al
	callq	printf
	movl	360(%r15), %edx
	movl	364(%r15), %ecx
	cmpl	$9999, %edx                     # imm = 0x270F
	jne	.LBB1_7
# %bb.5:
	cmpl	$9999, %ecx                     # imm = 0x270F
	jne	.LBB1_7
# %bb.6:
	movl	$.Lstr, %edi
	callq	puts@PLT
	callq	hipDeviceReset
	jmp	.LBB1_8
.LBB1_7:
	leaq	8(%rsp), %r15
	movl	$.L.str.10, %edi
	movq	%r15, %rsi
	xorl	%eax, %eax
	callq	printf
	movl	360(%r15), %eax
	movl	%eax, (%r14)
	movl	364(%r15), %eax
	movl	%eax, (%rbx)
.LBB1_8:
	movl	$.L.str.11, %edi
	xorl	%eax, %eax
	callq	printf
	addq	$1480, %rsp                     # imm = 0x5C8
	.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
.Lfunc_end1:
	.size	_Z15selectAndReportPiS_, .Lfunc_end1-_Z15selectAndReportPiS_
	.cfi_endproc
                                        # -- End function
	.type	.L.str,@object                  # @.str
	.section	.rodata.str1.1,"aMS",@progbits,1
.L.str:
	.asciz	"Cuda error: %s: %s.\n"
	.size	.L.str, 21

	.type	.L.str.1,@object                # @.str.1
.L.str.1:
	.asciz	"Get Count"
	.size	.L.str.1, 10

	.type	.L.str.2,@object                # @.str.2
.L.str.2:
	.asciz	"\n%d Devices\n"
	.size	.L.str.2, 13

	.type	.L.str.3,@object                # @.str.3
.L.str.3:
	.asciz	"Device # %d has %d cores\n"
	.size	.L.str.3, 26

	.type	.L.str.4,@object                # @.str.4
.L.str.4:
	.asciz	"Device # %d has %f GB global memory\n"
	.size	.L.str.4, 37

	.type	.L.str.5,@object                # @.str.5
.L.str.5:
	.asciz	"\n *** Best GPU is: %d\n"
	.size	.L.str.5, 23

	.type	.L.str.6,@object                # @.str.6
.L.str.6:
	.asciz	"Can't set device\n"
	.size	.L.str.6, 18

	.type	.L.str.8,@object                # @.str.8
.L.str.8:
	.asciz	"Device %d has %d cores\n"
	.size	.L.str.8, 24

	.type	.L.str.10,@object               # @.str.10
.L.str.10:
	.asciz	"Device is a %s, capability: %d.%d\n"
	.size	.L.str.10, 35

	.type	.L.str.11,@object               # @.str.11
.L.str.11:
	.asciz	"CUDA Driver version: %d, runtime version: %d\n\n"
	.size	.L.str.11, 47

	.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	"There is no device supporting CUDA."
	.size	.Lstr, 36

	.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
