// #CSCS CUDA Training 
//
// #Example 1 - retrieve device info
//
// #Author Ugo Varetto
//
// #Goal: compute the maximum size for a 1D grid layout. i.e. the max size for 1D arrays that allows
//        to match a GPU thread with a single array element. 
//
// #Rationale: CUDA on arch < 2.x requires client code to configure the domain layout as a 1D or 2D grid of
//            1,2 or 3D blocks; it is not possible to simply set the GPU layout to match the
//            domain layout as is the case with OpenCL.
//
// #Solution: the max size for a 1D memory layout is computed as  (max num blocks per grid) x (max num threads per block)
//            i.e. min( deviceProp.maxThreadsDim[0], deviceProp.maxThreadsPerBlock  ) * deviceProp.maxGridSize[0]           
//
// #Code: finds number of devices and prints all the available information for each device,
//        relevant information is:
//          . deviceProp.maxGridSize[0] // max number of blocks in dimension zero
//          . deviceProp.maxThreadsDim[0] // max number of threads per block along dimesion 0
//          . deviceProp.maxThreadsPerBlock // max threads per block
//          . (optional) deviceProp.totalGlobalMem  //total amount of memory)     
//        proper code should perform some minimal error checking and iterate over
//        all the available devices
//        
// #Compilation: nvcc -arch=sm_13 1_device-query.cu -o device-query 
//
// #Execution: ./1_device-query
//
// #Note: by default the code prints all the information available for each graphics card;
//        #define MINIMAL to have the code print out only the relevant information        
//
// #Note: the code is C++ also because the default compilation mode for CUDA is C++, all functions
//        are named with C++ convention and the syntax is checked by default against C++ grammar rules 
//
// #Note: -arch=sm_13 allows the code to run on every card with hw architecture GT200 (gtx 2xx) or better


#include <iostream>
//#include <cuda_runtime.h> // automatically added by nvcc


int main( int argc, const char** argv) 
{
            
    int deviceCount = 0;
    if( cudaGetDeviceCount( &deviceCount ) != cudaSuccess ) {
        std::cout << "cudaGetDeviceCount FAILED CUDA Driver and Runtime version may be mismatched.\n";
        std::cout << "\nFAILED\n";
        return 1;
    }

    // This function call returns 0 if there are no CUDA capable devices.
    if ( deviceCount == 0 ) {
        std::cout << "There is no device supporting CUDA\n";
        return 1;
    }

    int dev = 0;
    int driverVersion = 0, runtimeVersion = 0;     
    for( dev = 0; dev != deviceCount; ++dev ) {
        cudaDeviceProp deviceProp;
        cudaGetDeviceProperties( &deviceProp, dev );
        if ( dev == 0) {
            // This function call returns 9999 for both major & minor fields, if no CUDA capable devices are present
            if( deviceProp.major == 9999 && deviceProp.minor == 9999 ) std::cout << "There is no device supporting CUDA.\n";
            else if (deviceCount == 1) std::cout << "There is 1 device supporting CUDA\n";
            else std::cout << "There are " << deviceCount << " devices supporting CUDA\n";
        }
        std::cout << "\nDevice" << dev << ": " << deviceProp.name << '\n';

    #ifndef MINIMAL        
        cudaDriverGetVersion(&driverVersion);
        std::cout << "  CUDA Driver Version:                           " << driverVersion/1000 << '.' << driverVersion%100 << '\n';
        cudaRuntimeGetVersion(&runtimeVersion);
        std::cout << "  CUDA Runtime Version:                          " << runtimeVersion/1000 << '.' << runtimeVersion%100 << '\n';
    
        std::cout << "  CUDA Capability Major/Minor version number:    " << deviceProp.major << '.' << deviceProp.minor << '\n';

        std::cout << "  Total amount of global memory:                 " << deviceProp.totalGlobalMem << " bytes\n";
        
        std::cout << "  Number of multiprocessors:                     " << deviceProp.multiProcessorCount << '\n';
            
        std::cout << "  Total amount of constant memory:               " << deviceProp.totalConstMem << " bytes\n";
        std::cout << "  Total amount of shared memory per block:       " << deviceProp.sharedMemPerBlock << " bytes\n";
        std::cout << "  Total number of registers available per block: " << deviceProp.regsPerBlock << '\n';
        std::cout << "  Warp size:                                     " << deviceProp.warpSize << '\n';
    #endif        
        std::cout << "  Maximum number of threads per block:           " << deviceProp.maxThreadsPerBlock << '\n';
        std::cout << "  Maximum sizes of each dimension of a block:    " 
                  << deviceProp.maxThreadsDim[0] << " x " 
                  << deviceProp.maxThreadsDim[1] << " x " 
                  << deviceProp.maxThreadsDim[2] << '\n';
        std::cout << "  Maximum sizes of each dimension of a grid:     " 
                  << deviceProp.maxGridSize[0] << " x " 
                  << deviceProp.maxGridSize[1] << " x "
                  << deviceProp.maxGridSize[2] << '\n';
    #ifndef MINIMAL
        std::cout << "  Maximum memory pitch:                          " << deviceProp.memPitch << " bytes\n";
  //   #if CUDART_VERSION >= 4000
        // std::cout << "  Memory Bus Width:                              " << deviceProp.memBusWidth << "-bit\n";
        // std::cout << "  Memory Clock rate:                             " << deviceProp.memoryClock * 1e-3f << " Mhz\n";
  //   #endif
        std::cout << "  Texture alignment:                             " << deviceProp.textureAlignment << " bytes\n";
        std::cout << "  Clock rate:                                    " << deviceProp.clockRate * 1e-6f << " GHz\n";
    #if CUDART_VERSION >= 2000
        std::cout << "  Concurrent copy and execution:                 " << (deviceProp.deviceOverlap ? "Yes" : "No") << '\n';
    #endif
    #if CUDART_VERSION >= 4000
        std::cout << "  # of Asynchronous Copy Engines:                " << deviceProp.asyncEngineCount << '\n';
    #endif
    #if CUDART_VERSION >= 2020
        std::cout << "  Run time limit on kernels:                     " << (deviceProp.kernelExecTimeoutEnabled ? "Yes\n" : "No\n");
        std::cout << "  Integrated:                                    " << (deviceProp.integrated ? "Yes\n" : "No\n");
        std::cout << "  Support host page-locked memory mapping:       " << (deviceProp.canMapHostMemory ? "Yes\n" : "No\n");
        std::cout << "  Compute mode:                                  " << (deviceProp.computeMode == cudaComputeModeDefault ?
                                                                             "Default (multiple host threads can use this device simultaneously)\n" :
                                                                                  deviceProp.computeMode == cudaComputeModeExclusive ?
                                                                                  "Exclusive (only one host thread at a time can use this device)\n" :
                                                                                  deviceProp.computeMode == cudaComputeModeProhibited ?
                                                                                      "Prohibited (no host thread can use this device)\n" :
                                                                                      "Unknown\n");
    #endif
    #if CUDART_VERSION >= 3000
        std::cout << "  Concurrent kernel execution:                   " << (deviceProp.concurrentKernels ? "Yes\n" : "No\n");
    #endif
    #if CUDART_VERSION >= 3010
        std::cout << "  Device has ECC support enabled:                " << (deviceProp.ECCEnabled ? "Yes\n" : "No\n");
    #endif
    #if CUDART_VERSION >= 3020
        std::cout << "  Device is using TCC driver mode:               " << (deviceProp.tccDriver ? "Yes\n" : "No\n");
    #endif
    #if CUDART_VERSION >= 4000
        std::cout << "  Unified addressing:                            " << (deviceProp.unifiedAddressing ? "Yes\n" : "No\n");
        std::cout << "  PCI bus id:                                    " << deviceProp.pciBusID << '\n';
        std::cout << "  PCI device id:                                 " << deviceProp.pciDeviceID << '\n';
    #endif
#endif    
    }

    return 0;
}

	.file	"tmpxft_003235d9_00000000-6_001_0_device-query.cudafe1.cpp"
	.text
#APP
	.globl _ZSt21ios_base_library_initv

#NO_APP
	.type	_ZL26__cudaUnregisterBinaryUtilv, @function
_ZL26__cudaUnregisterBinaryUtilv:
.LFB3638:
	.cfi_startproc
	endbr64
	movq	_ZL20__cudaFatCubinHandle(%rip), %rdi
	jmp	__cudaUnregisterFatBinary@PLT
	.cfi_endproc
.LFE3638:
	.size	_ZL26__cudaUnregisterBinaryUtilv, .-_ZL26__cudaUnregisterBinaryUtilv
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"Yes"
.LC1:
	.string	"No"
.LC2:
	.string	"Yes\n"
.LC3:
	.string	"No\n"
.LC4:
	.string	"Exclusive (only one host thread at a time can use this device)\n"
.LC5:
	.string	"Default (multiple host threads can use this device simultaneously)\n"
.LC6:
	.string	"Unknown\n"
.LC7:
	.string	"Prohibited (no host thread can use this device)\n"
.LC8:
	.string	"cudaGetDeviceCount FAILED CUDA Driver and Runtime version may be mismatched.\n"
.LC9:
	.string	"\nFAILED\n"
.LC10:
	.string	"There is no device supporting CUDA\n"
.LC11:
	.string	"There is no device supporting CUDA.\n"
.LC12:
	.string	"There is 1 device supporting CUDA\n"
.LC13:
	.string	"There are "
.LC14:
	.string	" devices supporting CUDA\n"
.LC15:
	.string	"\nDevice"
.LC16:
	.string	": "
.LC17:
	.string	"  CUDA Driver Version:                           "
.LC18:
	.string	"  CUDA Runtime Version:                          "
.LC19:
	.string	"  CUDA Capability Major/Minor version number:    "
.LC20:
	.string	"  Total amount of global memory:                 "
.LC21:
	.string	" bytes\n"
.LC22:
	.string	"  Number of multiprocessors:                     "
.LC23:
	.string	"  Total amount of constant memory:               "
.LC24:
	.string	"  Total amount of shared memory per block:       "
.LC25:
	.string	"  Total number of registers available per block: "
.LC26:
	.string	"  Warp size:                                     "
.LC27:
	.string	"  Maximum number of threads per block:           "
.LC28:
	.string	"  Maximum sizes of each dimension of a block:    "
.LC29:
	.string	" x "
.LC30:
	.string	"  Maximum sizes of each dimension of a grid:     "
.LC31:
	.string	"  Maximum memory pitch:                          "
.LC32:
	.string	"  Texture alignment:                             "
.LC33:
	.string	"  Clock rate:                                    "
.LC35:
	.string	" GHz\n"
.LC36:
	.string	"  Concurrent copy and execution:                 "
.LC37:
	.string	"  # of Asynchronous Copy Engines:                "
.LC38:
	.string	"  Run time limit on kernels:                     "
.LC39:
	.string	"  Integrated:                                    "
.LC40:
	.string	"  Support host page-locked memory mapping:       "
.LC41:
	.string	"  Compute mode:                                  "
.LC42:
	.string	"  Concurrent kernel execution:                   "
.LC43:
	.string	"  Device has ECC support enabled:                "
.LC44:
	.string	"  Device is using TCC driver mode:               "
.LC45:
	.string	"  Unified addressing:                            "
.LC46:
	.string	"  PCI bus id:                                    "
.LC47:
	.string	"  PCI device id:                                 "
	.section	.text.startup,"ax",@progbits
	.globl	main
	.type	main, @function
main:
.LFB3635:
	.cfi_startproc
	endbr64
	pushq	%r13
	.cfi_def_cfa_offset 16
	.cfi_offset 13, -16
	xorl	%edx, %edx
	pushq	%r12
	.cfi_def_cfa_offset 24
	.cfi_offset 12, -24
	pushq	%rbp
	.cfi_def_cfa_offset 32
	.cfi_offset 6, -32
	pushq	%rbx
	.cfi_def_cfa_offset 40
	.cfi_offset 3, -40
	subq	$1064, %rsp
	.cfi_def_cfa_offset 1104
	movq	%fs:40, %rax
	movq	%rax, 1048(%rsp)
	xorl	%eax, %eax
	leaq	4(%rsp), %rdi
	movl	%edx, 4(%rsp)
	call	cudaGetDeviceCount@PLT
	testl	%eax, %eax
	je	.L3
	leaq	_ZSt4cout(%rip), %rbx
	leaq	.LC8(%rip), %rsi
	movq	%rbx, %rdi
	call	_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc@PLT
	leaq	.LC9(%rip), %rsi
	movq	%rbx, %rdi
	jmp	.L36
.L3:
	cmpl	$0, 4(%rsp)
	jne	.L5
	leaq	.LC10(%rip), %rsi
	leaq	_ZSt4cout(%rip), %rdi
.L36:
	call	_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc@PLT
	movl	$1, %eax
	jmp	.L2
.L5:
	xorl	%eax, %eax
	xorl	%ebp, %ebp
	leaq	_ZSt4cout(%rip), %rbx
	movl	%eax, 8(%rsp)
	movl	%eax, 12(%rsp)
.L7:
	cmpl	%ebp, 4(%rsp)
	je	.L40
	leaq	16(%rsp), %r12
	movl	%ebp, %esi
	movq	%r12, %rdi
	call	cudaGetDeviceProperties_v2@PLT
	testl	%ebp, %ebp
	jne	.L8
	movabsq	$42945378002703, %rax
	leaq	.LC11(%rip), %rsi
	cmpq	%rax, 376(%rsp)
	je	.L38
	cmpl	$1, 4(%rsp)
	jne	.L10
	leaq	.LC12(%rip), %rsi
.L38:
	movq	%rbx, %rdi
	jmp	.L37
.L10:
	leaq	.LC13(%rip), %rsi
	movq	%rbx, %rdi
	call	_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc@PLT
	movl	4(%rsp), %esi
	movq	%rax, %rdi
	call	_ZNSolsEi@PLT
	leaq	.LC14(%rip), %rsi
	movq	%rax, %rdi
.L37:
	call	_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc@PLT
.L8:
	leaq	.LC15(%rip), %rsi
	movq	%rbx, %rdi
	movl	$1000, %r13d
	call	_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc@PLT
	movl	%ebp, %esi
	movq	%rax, %rdi
	call	_ZNSolsEi@PLT
	leaq	.LC16(%rip), %rsi
	movq	%rax, %rdi
	call	_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc@PLT
	movq	%r12, %rsi
	movl	$100, %r12d
	movq	%rax, %rdi
	call	_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc@PLT
	movl	$10, %esi
	movq	%rax, %rdi
	call	_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_c@PLT
	leaq	8(%rsp), %rdi
	call	cudaDriverGetVersion@PLT
	leaq	.LC17(%rip), %rsi
	movq	%rbx, %rdi
	call	_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc@PLT
	movq	%rax, %rdi
	movl	8(%rsp), %eax
	cltd
	idivl	%r13d
	movl	%eax, %esi
	call	_ZNSolsEi@PLT
	movl	$46, %esi
	movq	%rax, %rdi
	call	_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_c@PLT
	movq	%rax, %rdi
	movl	8(%rsp), %eax
	cltd
	idivl	%r12d
	movl	%edx, %esi
	call	_ZNSolsEi@PLT
	movl	$10, %esi
	movq	%rax, %rdi
	call	_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_c@PLT
	leaq	12(%rsp), %rdi
	call	cudaRuntimeGetVersion@PLT
	leaq	.LC18(%rip), %rsi
	movq	%rbx, %rdi
	call	_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc@PLT
	movq	%rax, %rdi
	movl	12(%rsp), %eax
	cltd
	idivl	%r13d
	leaq	.LC29(%rip), %r13
	movl	%eax, %esi
	call	_ZNSolsEi@PLT
	movl	$46, %esi
	movq	%rax, %rdi
	call	_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_c@PLT
	movq	%rax, %rdi
	movl	12(%rsp), %eax
	cltd
	idivl	%r12d
	leaq	.LC21(%rip), %r12
	movl	%edx, %esi
	call	_ZNSolsEi@PLT
	movl	$10, %esi
	movq	%rax, %rdi
	call	_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_c@PLT
	leaq	.LC19(%rip), %rsi
	movq	%rbx, %rdi
	call	_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc@PLT
	movl	376(%rsp), %esi
	movq	%rax, %rdi
	call	_ZNSolsEi@PLT
	movl	$46, %esi
	movq	%rax, %rdi
	call	_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_c@PLT
	movl	380(%rsp), %esi
	movq	%rax, %rdi
	call	_ZNSolsEi@PLT
	movl	$10, %esi
	movq	%rax, %rdi
	call	_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_c@PLT
	leaq	.LC20(%rip), %rsi
	movq	%rbx, %rdi
	call	_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc@PLT
	movq	304(%rsp), %rsi
	movq	%rax, %rdi
	call	_ZNSo9_M_insertImEERSoT_@PLT
	movq	%r12, %rsi
	movq	%rax, %rdi
	call	_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc@PLT
	leaq	.LC22(%rip), %rsi
	movq	%rbx, %rdi
	call	_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc@PLT
	movl	404(%rsp), %esi
	movq	%rax, %rdi
	call	_ZNSolsEi@PLT
	movl	$10, %esi
	movq	%rax, %rdi
	call	_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_c@PLT
	leaq	.LC23(%rip), %rsi
	movq	%rbx, %rdi
	call	_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc@PLT
	movq	368(%rsp), %rsi
	movq	%rax, %rdi
	call	_ZNSo9_M_insertImEERSoT_@PLT
	movq	%r12, %rsi
	movq	%rax, %rdi
	call	_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc@PLT
	leaq	.LC24(%rip), %rsi
	movq	%rbx, %rdi
	call	_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc@PLT
	movq	312(%rsp), %rsi
	movq	%rax, %rdi
	call	_ZNSo9_M_insertImEERSoT_@PLT
	movq	%r12, %rsi
	movq	%rax, %rdi
	call	_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc@PLT
	leaq	.LC25(%rip), %rsi
	movq	%rbx, %rdi
	call	_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc@PLT
	movl	320(%rsp), %esi
	movq	%rax, %rdi
	call	_ZNSolsEi@PLT
	movl	$10, %esi
	movq	%rax, %rdi
	call	_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_c@PLT
	leaq	.LC26(%rip), %rsi
	movq	%rbx, %rdi
	call	_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc@PLT
	movl	324(%rsp), %esi
	movq	%rax, %rdi
	call	_ZNSolsEi@PLT
	movl	$10, %esi
	movq	%rax, %rdi
	call	_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_c@PLT
	leaq	.LC27(%rip), %rsi
	movq	%rbx, %rdi
	call	_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc@PLT
	movl	336(%rsp), %esi
	movq	%rax, %rdi
	call	_ZNSolsEi@PLT
	movl	$10, %esi
	movq	%rax, %rdi
	call	_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_c@PLT
	leaq	.LC28(%rip), %rsi
	movq	%rbx, %rdi
	call	_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc@PLT
	movl	340(%rsp), %esi
	movq	%rax, %rdi
	call	_ZNSolsEi@PLT
	movq	%r13, %rsi
	movq	%rax, %rdi
	call	_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc@PLT
	movl	344(%rsp), %esi
	movq	%rax, %rdi
	call	_ZNSolsEi@PLT
	movq	%r13, %rsi
	movq	%rax, %rdi
	call	_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc@PLT
	movl	348(%rsp), %esi
	movq	%rax, %rdi
	call	_ZNSolsEi@PLT
	movl	$10, %esi
	movq	%rax, %rdi
	call	_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_c@PLT
	leaq	.LC30(%rip), %rsi
	movq	%rbx, %rdi
	call	_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc@PLT
	movl	352(%rsp), %esi
	movq	%rax, %rdi
	call	_ZNSolsEi@PLT
	movq	%r13, %rsi
	movq	%rax, %rdi
	call	_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc@PLT
	movl	356(%rsp), %esi
	movq	%rax, %rdi
	call	_ZNSolsEi@PLT
	movq	%r13, %rsi
	leaq	.LC2(%rip), %r13
	movq	%rax, %rdi
	call	_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc@PLT
	movl	360(%rsp), %esi
	movq	%rax, %rdi
	call	_ZNSolsEi@PLT
	movl	$10, %esi
	movq	%rax, %rdi
	call	_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_c@PLT
	leaq	.LC31(%rip), %rsi
	movq	%rbx, %rdi
	call	_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc@PLT
	movq	328(%rsp), %rsi
	movq	%rax, %rdi
	call	_ZNSo9_M_insertImEERSoT_@PLT
	movq	%r12, %rsi
	movq	%rax, %rdi
	call	_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc@PLT
	leaq	.LC32(%rip), %rsi
	movq	%rbx, %rdi
	call	_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc@PLT
	movq	384(%rsp), %rsi
	movq	%rax, %rdi
	call	_ZNSo9_M_insertImEERSoT_@PLT
	movq	%r12, %rsi
	leaq	.LC3(%rip), %r12
	movq	%rax, %rdi
	call	_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc@PLT
	leaq	.LC33(%rip), %rsi
	movq	%rbx, %rdi
	call	_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc@PLT
	cvtsi2ssl	364(%rsp), %xmm0
	mulss	.LC34(%rip), %xmm0
	movq	%rax, %rdi
	cvtss2sd	%xmm0, %xmm0
	call	_ZNSo9_M_insertIdEERSoT_@PLT
	leaq	.LC35(%rip), %rsi
	movq	%rax, %rdi
	call	_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc@PLT
	leaq	.LC36(%rip), %rsi
	movq	%rbx, %rdi
	call	_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc@PLT
	cmpl	$0, 400(%rsp)
	leaq	.LC1(%rip), %rsi
	movq	%rax, %rdi
	leaq	.LC0(%rip), %rax
	cmovne	%rax, %rsi
	call	_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc@PLT
	movl	$10, %esi
	movq	%rax, %rdi
	call	_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_c@PLT
	leaq	.LC37(%rip), %rsi
	movq	%rbx, %rdi
	call	_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc@PLT
	movl	616(%rsp), %esi
	movq	%rax, %rdi
	call	_ZNSolsEi@PLT
	movl	$10, %esi
	movq	%rax, %rdi
	call	_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_c@PLT
	leaq	.LC38(%rip), %rsi
	movq	%rbx, %rdi
	call	_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc@PLT
	cmpl	$0, 408(%rsp)
	movq	%r13, %rsi
	cmove	%r12, %rsi
	movq	%rax, %rdi
	call	_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc@PLT
	leaq	.LC39(%rip), %rsi
	movq	%rbx, %rdi
	call	_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc@PLT
	cmpl	$0, 412(%rsp)
	movq	%r13, %rsi
	cmove	%r12, %rsi
	movq	%rax, %rdi
	call	_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc@PLT
	leaq	.LC40(%rip), %rsi
	movq	%rbx, %rdi
	call	_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc@PLT
	cmpl	$0, 416(%rsp)
	movq	%r13, %rsi
	cmove	%r12, %rsi
	movq	%rax, %rdi
	call	_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc@PLT
	leaq	.LC41(%rip), %rsi
	movq	%rbx, %rdi
	call	_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc@PLT
	leaq	.LC5(%rip), %rsi
	movq	%rax, %rdi
	movl	420(%rsp), %eax
	testl	%eax, %eax
	je	.L15
	leaq	.LC4(%rip), %rsi
	cmpl	$1, %eax
	je	.L15
	cmpl	$2, %eax
	leaq	.LC6(%rip), %rsi
	leaq	.LC7(%rip), %rax
	cmove	%rax, %rsi
.L15:
	call	_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc@PLT
	leaq	.LC2(%rip), %r13
	leaq	.LC42(%rip), %rsi
	movq	%rbx, %rdi
	call	_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc@PLT
	leaq	.LC3(%rip), %r12
	cmpl	$0, 592(%rsp)
	movq	%r13, %rsi
	cmove	%r12, %rsi
	movq	%rax, %rdi
	call	_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc@PLT
	leaq	.LC43(%rip), %rsi
	movq	%rbx, %rdi
	call	_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc@PLT
	cmpl	$0, 596(%rsp)
	movq	%r13, %rsi
	cmove	%r12, %rsi
	movq	%rax, %rdi
	call	_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc@PLT
	leaq	.LC44(%rip), %rsi
	movq	%rbx, %rdi
	call	_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc@PLT
	cmpl	$0, 612(%rsp)
	movq	%r13, %rsi
	cmove	%r12, %rsi
	movq	%rax, %rdi
	call	_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc@PLT
	leaq	.LC45(%rip), %rsi
	movq	%rbx, %rdi
	call	_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc@PLT
	cmpl	$0, 620(%rsp)
	movq	%r13, %rsi
	cmove	%r12, %rsi
	movq	%rax, %rdi
	incl	%ebp
	call	_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc@PLT
	leaq	.LC46(%rip), %rsi
	movq	%rbx, %rdi
	call	_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc@PLT
	movl	600(%rsp), %esi
	movq	%rax, %rdi
	call	_ZNSolsEi@PLT
	movl	$10, %esi
	movq	%rax, %rdi
	call	_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_c@PLT
	leaq	.LC47(%rip), %rsi
	movq	%rbx, %rdi
	call	_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc@PLT
	movl	604(%rsp), %esi
	movq	%rax, %rdi
	call	_ZNSolsEi@PLT
	movl	$10, %esi
	movq	%rax, %rdi
	call	_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_c@PLT
	jmp	.L7
.L40:
	xorl	%eax, %eax
.L2:
	movq	1048(%rsp), %rdx
	subq	%fs:40, %rdx
	je	.L21
	call	__stack_chk_fail@PLT
.L21:
	addq	$1064, %rsp
	.cfi_def_cfa_offset 40
	popq	%rbx
	.cfi_def_cfa_offset 32
	popq	%rbp
	.cfi_def_cfa_offset 24
	popq	%r12
	.cfi_def_cfa_offset 16
	popq	%r13
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE3635:
	.size	main, .-main
	.type	_ZL24__sti____cudaRegisterAllv, @function
_ZL24__sti____cudaRegisterAllv:
.LFB3661:
	.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
.LFE3661:
	.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
.LC34:
	.long	897988541
	.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:

// #CSCS CUDA Training 
//
// #Example 1 - retrieve device info
//
// #Author Ugo Varetto
//
// #Goal: compute the maximum size for a 1D grid layout. i.e. the max size for 1D arrays that allows
//        to match a GPU thread with a single array element. 
//
// #Rationale: CUDA on arch < 2.x requires client code to configure the domain layout as a 1D or 2D grid of
//            1,2 or 3D blocks; it is not possible to simply set the GPU layout to match the
//            domain layout as is the case with OpenCL.
//
// #Solution: the max size for a 1D memory layout is computed as  (max num blocks per grid) x (max num threads per block)
//            i.e. min( deviceProp.maxThreadsDim[0], deviceProp.maxThreadsPerBlock  ) * deviceProp.maxGridSize[0]           
//
// #Code: finds number of devices and prints all the available information for each device,
//        relevant information is:
//          . deviceProp.maxGridSize[0] // max number of blocks in dimension zero
//          . deviceProp.maxThreadsDim[0] // max number of threads per block along dimesion 0
//          . deviceProp.maxThreadsPerBlock // max threads per block
//          . (optional) deviceProp.totalGlobalMem  //total amount of memory)     
//        proper code should perform some minimal error checking and iterate over
//        all the available devices
//        
// #Compilation: nvcc -arch=sm_13 1_device-query.cu -o device-query 
//
// #Execution: ./1_device-query
//
// #Note: by default the code prints all the information available for each graphics card;
//        #define MINIMAL to have the code print out only the relevant information        
//
// #Note: the code is C++ also because the default compilation mode for CUDA is C++, all functions
//        are named with C++ convention and the syntax is checked by default against C++ grammar rules 
//
// #Note: -arch=sm_13 allows the code to run on every card with hw architecture GT200 (gtx 2xx) or better



#include <hip/hip_runtime.h>
#include <iostream>
//#include <cuda_runtime.h> // automatically added by nvcc


int main( int argc, const char** argv) 
{
            
    int deviceCount = 0;
    if( hipGetDeviceCount( &deviceCount ) != hipSuccess ) {
        std::cout << "hipGetDeviceCount FAILED CUDA Driver and Runtime version may be mismatched.\n";
        std::cout << "\nFAILED\n";
        return 1;
    }

    // This function call returns 0 if there are no CUDA capable devices.
    if ( deviceCount == 0 ) {
        std::cout << "There is no device supporting CUDA\n";
        return 1;
    }

    int dev = 0;
    int driverVersion = 0, runtimeVersion = 0;     
    for( dev = 0; dev != deviceCount; ++dev ) {
        hipDeviceProp_t deviceProp;
        hipGetDeviceProperties( &deviceProp, dev );
        if ( dev == 0) {
            // This function call returns 9999 for both major & minor fields, if no CUDA capable devices are present
            if( deviceProp.major == 9999 && deviceProp.minor == 9999 ) std::cout << "There is no device supporting CUDA.\n";
            else if (deviceCount == 1) std::cout << "There is 1 device supporting CUDA\n";
            else std::cout << "There are " << deviceCount << " devices supporting CUDA\n";
        }
        std::cout << "\nDevice" << dev << ": " << deviceProp.name << '\n';

    #ifndef MINIMAL        
        hipDriverGetVersion(&driverVersion);
        std::cout << "  CUDA Driver Version:                           " << driverVersion/1000 << '.' << driverVersion%100 << '\n';
        hipRuntimeGetVersion(&runtimeVersion);
        std::cout << "  CUDA Runtime Version:                          " << runtimeVersion/1000 << '.' << runtimeVersion%100 << '\n';
    
        std::cout << "  CUDA Capability Major/Minor version number:    " << deviceProp.major << '.' << deviceProp.minor << '\n';

        std::cout << "  Total amount of global memory:                 " << deviceProp.totalGlobalMem << " bytes\n";
        
        std::cout << "  Number of multiprocessors:                     " << deviceProp.multiProcessorCount << '\n';
            
        std::cout << "  Total amount of constant memory:               " << deviceProp.totalConstMem << " bytes\n";
        std::cout << "  Total amount of shared memory per block:       " << deviceProp.sharedMemPerBlock << " bytes\n";
        std::cout << "  Total number of registers available per block: " << deviceProp.regsPerBlock << '\n';
        std::cout << "  Warp size:                                     " << deviceProp.warpSize << '\n';
    #endif        
        std::cout << "  Maximum number of threads per block:           " << deviceProp.maxThreadsPerBlock << '\n';
        std::cout << "  Maximum sizes of each dimension of a block:    " 
                  << deviceProp.maxThreadsDim[0] << " x " 
                  << deviceProp.maxThreadsDim[1] << " x " 
                  << deviceProp.maxThreadsDim[2] << '\n';
        std::cout << "  Maximum sizes of each dimension of a grid:     " 
                  << deviceProp.maxGridSize[0] << " x " 
                  << deviceProp.maxGridSize[1] << " x "
                  << deviceProp.maxGridSize[2] << '\n';
    #ifndef MINIMAL
        std::cout << "  Maximum memory pitch:                          " << deviceProp.memPitch << " bytes\n";
  //   #if CUDART_VERSION >= 4000
        // std::cout << "  Memory Bus Width:                              " << deviceProp.memBusWidth << "-bit\n";
        // std::cout << "  Memory Clock rate:                             " << deviceProp.memoryClock * 1e-3f << " Mhz\n";
  //   #endif
        std::cout << "  Texture alignment:                             " << deviceProp.textureAlignment << " bytes\n";
        std::cout << "  Clock rate:                                    " << deviceProp.clockRate * 1e-6f << " GHz\n";
    #if CUDART_VERSION >= 2000
        std::cout << "  Concurrent copy and execution:                 " << (deviceProp.deviceOverlap ? "Yes" : "No") << '\n';
    #endif
    #if CUDART_VERSION >= 4000
        std::cout << "  # of Asynchronous Copy Engines:                " << deviceProp.asyncEngineCount << '\n';
    #endif
    #if CUDART_VERSION >= 2020
        std::cout << "  Run time limit on kernels:                     " << (deviceProp.kernelExecTimeoutEnabled ? "Yes\n" : "No\n");
        std::cout << "  Integrated:                                    " << (deviceProp.integrated ? "Yes\n" : "No\n");
        std::cout << "  Support host page-locked memory mapping:       " << (deviceProp.canMapHostMemory ? "Yes\n" : "No\n");
        std::cout << "  Compute mode:                                  " << (deviceProp.computeMode == hipComputeModeDefault ?
                                                                             "Default (multiple host threads can use this device simultaneously)\n" :
                                                                                  deviceProp.computeMode == hipComputeModeExclusive ?
                                                                                  "Exclusive (only one host thread at a time can use this device)\n" :
                                                                                  deviceProp.computeMode == hipComputeModeProhibited ?
                                                                                      "Prohibited (no host thread can use this device)\n" :
                                                                                      "Unknown\n");
    #endif
    #if CUDART_VERSION >= 3000
        std::cout << "  Concurrent kernel execution:                   " << (deviceProp.concurrentKernels ? "Yes\n" : "No\n");
    #endif
    #if CUDART_VERSION >= 3010
        std::cout << "  Device has ECC support enabled:                " << (deviceProp.ECCEnabled ? "Yes\n" : "No\n");
    #endif
    #if CUDART_VERSION >= 3020
        std::cout << "  Device is using TCC driver mode:               " << (deviceProp.tccDriver ? "Yes\n" : "No\n");
    #endif
    #if CUDART_VERSION >= 4000
        std::cout << "  Unified addressing:                            " << (deviceProp.unifiedAddressing ? "Yes\n" : "No\n");
        std::cout << "  PCI bus id:                                    " << deviceProp.pciBusID << '\n';
        std::cout << "  PCI device id:                                 " << deviceProp.pciDeviceID << '\n';
    #endif
#endif    
    }

    return 0;
}

	.text
	.file	"001_0_device-query.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	0x358637bd                      # float 9.99999997E-7
	.text
	.globl	main
	.type	main,@function
main:                                   # @main
	.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	$1496, %rsp                     # imm = 0x5D8
	.cfi_def_cfa_offset 1552
	.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	12(%rsp), %rdi
	movl	$0, (%rdi)
	callq	hipGetDeviceCount
	testl	%eax, %eax
	je	.LBB0_2
# %bb.1:
	movl	$_ZSt4cout, %edi
	movl	$.L.str, %esi
	movl	$76, %edx
	callq	_ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l
	movl	$_ZSt4cout, %edi
	movl	$.L.str.1, %esi
	movl	$8, %edx
.LBB0_4:
	callq	_ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l
	movl	$1, %eax
	jmp	.LBB0_55
.LBB0_2:
	cmpl	$0, 12(%rsp)
	je	.LBB0_3
# %bb.5:                                # %.lr.ph
	xorl	%ebx, %ebx
	leaq	20(%rsp), %r14
	movl	%ebx, (%r14)
	leaq	16(%rsp), %r15
	movl	%ebx, (%r15)
	leaq	24(%rsp), %r12
	leaq	11(%rsp), %r13
.LBB0_6:                                # =>This Inner Loop Header: Depth=1
	movq	%r12, %rdi
	movl	%ebx, %esi
	callq	hipGetDevicePropertiesR0600
	testl	%ebx, %ebx
	jne	.LBB0_14
# %bb.7:                                #   in Loop: Header=BB0_6 Depth=1
	cmpl	$9999, 384(%rsp)                # imm = 0x270F
	jne	.LBB0_10
# %bb.8:                                #   in Loop: Header=BB0_6 Depth=1
	cmpl	$9999, 388(%rsp)                # imm = 0x270F
	jne	.LBB0_10
# %bb.9:                                #   in Loop: Header=BB0_6 Depth=1
	movl	$_ZSt4cout, %edi
	movl	$.L.str.3, %esi
	movl	$36, %edx
	jmp	.LBB0_13
.LBB0_10:                               #   in Loop: Header=BB0_6 Depth=1
	cmpl	$1, 12(%rsp)
	jne	.LBB0_12
# %bb.11:                               #   in Loop: Header=BB0_6 Depth=1
	movl	$_ZSt4cout, %edi
	movl	$.L.str.4, %esi
	movl	$34, %edx
	jmp	.LBB0_13
.LBB0_12:                               #   in Loop: Header=BB0_6 Depth=1
	movl	$_ZSt4cout, %edi
	movl	$.L.str.5, %esi
	movl	$10, %edx
	callq	_ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l
	movl	12(%rsp), %esi
	movl	$_ZSt4cout, %edi
	callq	_ZNSolsEi
	movl	$.L.str.6, %esi
	movl	$25, %edx
	movq	%rax, %rdi
.LBB0_13:                               #   in Loop: Header=BB0_6 Depth=1
	callq	_ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l
.LBB0_14:                               #   in Loop: Header=BB0_6 Depth=1
	movl	$_ZSt4cout, %edi
	movl	$.L.str.7, %esi
	movl	$7, %edx
	callq	_ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l
	movl	$_ZSt4cout, %edi
	movl	%ebx, %esi
	callq	_ZNSolsEi
	movq	%rax, %rbp
	movl	$.L.str.8, %esi
	movl	$2, %edx
	movq	%rax, %rdi
	callq	_ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l
	movq	%r12, %rdi
	callq	strlen
	movq	%rbp, %rdi
	movq	%r12, %rsi
	movq	%rax, %rdx
	callq	_ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l
	movb	$10, 11(%rsp)
	movq	(%rbp), %rax
	movq	-24(%rax), %rax
	cmpq	$0, 16(%rbp,%rax)
	je	.LBB0_16
# %bb.15:                               #   in Loop: Header=BB0_6 Depth=1
	movl	$1, %edx
	movq	%rbp, %rdi
	movq	%r13, %rsi
	callq	_ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l
	jmp	.LBB0_17
.LBB0_16:                               #   in Loop: Header=BB0_6 Depth=1
	movq	%rbp, %rdi
	movl	$10, %esi
	callq	_ZNSo3putEc
.LBB0_17:                               # %_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_c.exit
                                        #   in Loop: Header=BB0_6 Depth=1
	movq	%r14, %rdi
	callq	hipDriverGetVersion
	movl	$_ZSt4cout, %edi
	movl	$.L.str.9, %esi
	movl	$49, %edx
	callq	_ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l
	movslq	20(%rsp), %rax
	imulq	$274877907, %rax, %rsi          # imm = 0x10624DD3
	movq	%rsi, %rax
	shrq	$63, %rax
	sarq	$38, %rsi
	addl	%eax, %esi
	movl	$_ZSt4cout, %edi
                                        # kill: def $esi killed $esi killed $rsi
	callq	_ZNSolsEi
	movq	%rax, %rbp
	movb	$46, 11(%rsp)
	movq	(%rax), %rax
	movq	-24(%rax), %rax
	cmpq	$0, 16(%rbp,%rax)
	je	.LBB0_19
# %bb.18:                               #   in Loop: Header=BB0_6 Depth=1
	movl	$1, %edx
	movq	%rbp, %rdi
	movq	%r13, %rsi
	callq	_ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l
	movq	%rax, %rbp
	jmp	.LBB0_20
.LBB0_19:                               #   in Loop: Header=BB0_6 Depth=1
	movq	%rbp, %rdi
	movl	$46, %esi
	callq	_ZNSo3putEc
.LBB0_20:                               # %_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_c.exit12
                                        #   in Loop: Header=BB0_6 Depth=1
	movslq	20(%rsp), %rsi
	imulq	$1374389535, %rsi, %rax         # imm = 0x51EB851F
	movq	%rax, %rcx
	shrq	$63, %rcx
	sarq	$37, %rax
	addl	%ecx, %eax
	imull	$100, %eax, %eax
	subl	%eax, %esi
	movq	%rbp, %rdi
                                        # kill: def $esi killed $esi killed $rsi
	callq	_ZNSolsEi
	movb	$10, 11(%rsp)
	movq	(%rax), %rcx
	movq	-24(%rcx), %rcx
	cmpq	$0, 16(%rax,%rcx)
	je	.LBB0_22
# %bb.21:                               #   in Loop: Header=BB0_6 Depth=1
	movl	$1, %edx
	movq	%rax, %rdi
	movq	%r13, %rsi
	callq	_ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l
	jmp	.LBB0_23
.LBB0_22:                               #   in Loop: Header=BB0_6 Depth=1
	movq	%rax, %rdi
	movl	$10, %esi
	callq	_ZNSo3putEc
.LBB0_23:                               # %_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_c.exit15
                                        #   in Loop: Header=BB0_6 Depth=1
	movq	%r15, %rdi
	callq	hipRuntimeGetVersion
	movl	$_ZSt4cout, %edi
	movl	$.L.str.10, %esi
	movl	$49, %edx
	callq	_ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l
	movslq	16(%rsp), %rax
	imulq	$274877907, %rax, %rsi          # imm = 0x10624DD3
	movq	%rsi, %rax
	shrq	$63, %rax
	sarq	$38, %rsi
	addl	%eax, %esi
	movl	$_ZSt4cout, %edi
                                        # kill: def $esi killed $esi killed $rsi
	callq	_ZNSolsEi
	movq	%rax, %rbp
	movb	$46, 11(%rsp)
	movq	(%rax), %rax
	movq	-24(%rax), %rax
	cmpq	$0, 16(%rbp,%rax)
	je	.LBB0_25
# %bb.24:                               #   in Loop: Header=BB0_6 Depth=1
	movl	$1, %edx
	movq	%rbp, %rdi
	movq	%r13, %rsi
	callq	_ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l
	movq	%rax, %rbp
	jmp	.LBB0_26
.LBB0_25:                               #   in Loop: Header=BB0_6 Depth=1
	movq	%rbp, %rdi
	movl	$46, %esi
	callq	_ZNSo3putEc
.LBB0_26:                               # %_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_c.exit18
                                        #   in Loop: Header=BB0_6 Depth=1
	movslq	16(%rsp), %rsi
	imulq	$1374389535, %rsi, %rax         # imm = 0x51EB851F
	movq	%rax, %rcx
	shrq	$63, %rcx
	sarq	$37, %rax
	addl	%ecx, %eax
	imull	$100, %eax, %eax
	subl	%eax, %esi
	movq	%rbp, %rdi
                                        # kill: def $esi killed $esi killed $rsi
	callq	_ZNSolsEi
	movb	$10, 11(%rsp)
	movq	(%rax), %rcx
	movq	-24(%rcx), %rcx
	cmpq	$0, 16(%rax,%rcx)
	je	.LBB0_28
# %bb.27:                               #   in Loop: Header=BB0_6 Depth=1
	movl	$1, %edx
	movq	%rax, %rdi
	movq	%r13, %rsi
	callq	_ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l
	jmp	.LBB0_29
.LBB0_28:                               #   in Loop: Header=BB0_6 Depth=1
	movq	%rax, %rdi
	movl	$10, %esi
	callq	_ZNSo3putEc
.LBB0_29:                               # %_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_c.exit21
                                        #   in Loop: Header=BB0_6 Depth=1
	movl	$_ZSt4cout, %edi
	movl	$.L.str.11, %esi
	movl	$49, %edx
	callq	_ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l
	movl	384(%rsp), %esi
	movl	$_ZSt4cout, %edi
	callq	_ZNSolsEi
	movq	%rax, %rbp
	movb	$46, 11(%rsp)
	movq	(%rax), %rax
	movq	-24(%rax), %rax
	cmpq	$0, 16(%rbp,%rax)
	je	.LBB0_31
# %bb.30:                               #   in Loop: Header=BB0_6 Depth=1
	movl	$1, %edx
	movq	%rbp, %rdi
	movq	%r13, %rsi
	callq	_ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l
	movq	%rax, %rbp
	jmp	.LBB0_32
.LBB0_31:                               #   in Loop: Header=BB0_6 Depth=1
	movq	%rbp, %rdi
	movl	$46, %esi
	callq	_ZNSo3putEc
.LBB0_32:                               # %_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_c.exit24
                                        #   in Loop: Header=BB0_6 Depth=1
	movl	388(%rsp), %esi
	movq	%rbp, %rdi
	callq	_ZNSolsEi
	movb	$10, 11(%rsp)
	movq	(%rax), %rcx
	movq	-24(%rcx), %rcx
	cmpq	$0, 16(%rax,%rcx)
	je	.LBB0_34
# %bb.33:                               #   in Loop: Header=BB0_6 Depth=1
	movl	$1, %edx
	movq	%rax, %rdi
	movq	%r13, %rsi
	callq	_ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l
	jmp	.LBB0_35
.LBB0_34:                               #   in Loop: Header=BB0_6 Depth=1
	movq	%rax, %rdi
	movl	$10, %esi
	callq	_ZNSo3putEc
.LBB0_35:                               # %_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_c.exit27
                                        #   in Loop: Header=BB0_6 Depth=1
	movl	$_ZSt4cout, %edi
	movl	$.L.str.12, %esi
	movl	$49, %edx
	callq	_ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l
	movq	312(%rsp), %rsi
	movl	$_ZSt4cout, %edi
	callq	_ZNSo9_M_insertImEERSoT_
	movl	$.L.str.13, %esi
	movl	$7, %edx
	movq	%rax, %rdi
	callq	_ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l
	movl	$_ZSt4cout, %edi
	movl	$.L.str.14, %esi
	movl	$49, %edx
	callq	_ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l
	movl	412(%rsp), %esi
	movl	$_ZSt4cout, %edi
	callq	_ZNSolsEi
	movb	$10, 11(%rsp)
	movq	(%rax), %rcx
	movq	-24(%rcx), %rcx
	cmpq	$0, 16(%rax,%rcx)
	je	.LBB0_37
# %bb.36:                               #   in Loop: Header=BB0_6 Depth=1
	movl	$1, %edx
	movq	%rax, %rdi
	movq	%r13, %rsi
	callq	_ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l
	jmp	.LBB0_38
.LBB0_37:                               #   in Loop: Header=BB0_6 Depth=1
	movq	%rax, %rdi
	movl	$10, %esi
	callq	_ZNSo3putEc
.LBB0_38:                               # %_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_c.exit30
                                        #   in Loop: Header=BB0_6 Depth=1
	movl	$_ZSt4cout, %edi
	movl	$.L.str.15, %esi
	movl	$49, %edx
	callq	_ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l
	movq	376(%rsp), %rsi
	movl	$_ZSt4cout, %edi
	callq	_ZNSo9_M_insertImEERSoT_
	movl	$.L.str.13, %esi
	movl	$7, %edx
	movq	%rax, %rdi
	callq	_ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l
	movl	$_ZSt4cout, %edi
	movl	$.L.str.16, %esi
	movl	$49, %edx
	callq	_ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l
	movq	320(%rsp), %rsi
	movl	$_ZSt4cout, %edi
	callq	_ZNSo9_M_insertImEERSoT_
	movl	$.L.str.13, %esi
	movl	$7, %edx
	movq	%rax, %rdi
	callq	_ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l
	movl	$_ZSt4cout, %edi
	movl	$.L.str.17, %esi
	movl	$49, %edx
	callq	_ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l
	movl	328(%rsp), %esi
	movl	$_ZSt4cout, %edi
	callq	_ZNSolsEi
	movb	$10, 11(%rsp)
	movq	(%rax), %rcx
	movq	-24(%rcx), %rcx
	cmpq	$0, 16(%rax,%rcx)
	je	.LBB0_40
# %bb.39:                               #   in Loop: Header=BB0_6 Depth=1
	movl	$1, %edx
	movq	%rax, %rdi
	movq	%r13, %rsi
	callq	_ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l
	jmp	.LBB0_41
.LBB0_40:                               #   in Loop: Header=BB0_6 Depth=1
	movq	%rax, %rdi
	movl	$10, %esi
	callq	_ZNSo3putEc
.LBB0_41:                               # %_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_c.exit33
                                        #   in Loop: Header=BB0_6 Depth=1
	movl	$_ZSt4cout, %edi
	movl	$.L.str.18, %esi
	movl	$49, %edx
	callq	_ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l
	movl	332(%rsp), %esi
	movl	$_ZSt4cout, %edi
	callq	_ZNSolsEi
	movb	$10, 11(%rsp)
	movq	(%rax), %rcx
	movq	-24(%rcx), %rcx
	cmpq	$0, 16(%rax,%rcx)
	je	.LBB0_43
# %bb.42:                               #   in Loop: Header=BB0_6 Depth=1
	movl	$1, %edx
	movq	%rax, %rdi
	movq	%r13, %rsi
	callq	_ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l
	jmp	.LBB0_44
.LBB0_43:                               #   in Loop: Header=BB0_6 Depth=1
	movq	%rax, %rdi
	movl	$10, %esi
	callq	_ZNSo3putEc
.LBB0_44:                               # %_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_c.exit36
                                        #   in Loop: Header=BB0_6 Depth=1
	movl	$_ZSt4cout, %edi
	movl	$.L.str.19, %esi
	movl	$49, %edx
	callq	_ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l
	movl	344(%rsp), %esi
	movl	$_ZSt4cout, %edi
	callq	_ZNSolsEi
	movb	$10, 11(%rsp)
	movq	(%rax), %rcx
	movq	-24(%rcx), %rcx
	cmpq	$0, 16(%rax,%rcx)
	je	.LBB0_46
# %bb.45:                               #   in Loop: Header=BB0_6 Depth=1
	movl	$1, %edx
	movq	%rax, %rdi
	movq	%r13, %rsi
	callq	_ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l
	jmp	.LBB0_47
.LBB0_46:                               #   in Loop: Header=BB0_6 Depth=1
	movq	%rax, %rdi
	movl	$10, %esi
	callq	_ZNSo3putEc
.LBB0_47:                               # %_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_c.exit39
                                        #   in Loop: Header=BB0_6 Depth=1
	movl	$_ZSt4cout, %edi
	movl	$.L.str.20, %esi
	movl	$49, %edx
	callq	_ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l
	movl	348(%rsp), %esi
	movl	$_ZSt4cout, %edi
	callq	_ZNSolsEi
	movq	%rax, %rbp
	movl	$.L.str.21, %esi
	movl	$3, %edx
	movq	%rax, %rdi
	callq	_ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l
	movl	352(%rsp), %esi
	movq	%rbp, %rdi
	callq	_ZNSolsEi
	movq	%rax, %rbp
	movl	$.L.str.21, %esi
	movl	$3, %edx
	movq	%rax, %rdi
	callq	_ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l
	movl	356(%rsp), %esi
	movq	%rbp, %rdi
	callq	_ZNSolsEi
	movb	$10, 11(%rsp)
	movq	(%rax), %rcx
	movq	-24(%rcx), %rcx
	cmpq	$0, 16(%rax,%rcx)
	je	.LBB0_49
# %bb.48:                               #   in Loop: Header=BB0_6 Depth=1
	movl	$1, %edx
	movq	%rax, %rdi
	movq	%r13, %rsi
	callq	_ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l
	jmp	.LBB0_50
.LBB0_49:                               #   in Loop: Header=BB0_6 Depth=1
	movq	%rax, %rdi
	movl	$10, %esi
	callq	_ZNSo3putEc
.LBB0_50:                               # %_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_c.exit42
                                        #   in Loop: Header=BB0_6 Depth=1
	movl	$_ZSt4cout, %edi
	movl	$.L.str.22, %esi
	movl	$49, %edx
	callq	_ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l
	movl	360(%rsp), %esi
	movl	$_ZSt4cout, %edi
	callq	_ZNSolsEi
	movq	%rax, %rbp
	movl	$.L.str.21, %esi
	movl	$3, %edx
	movq	%rax, %rdi
	callq	_ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l
	movl	364(%rsp), %esi
	movq	%rbp, %rdi
	callq	_ZNSolsEi
	movq	%rax, %rbp
	movl	$.L.str.21, %esi
	movl	$3, %edx
	movq	%rax, %rdi
	callq	_ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l
	movl	368(%rsp), %esi
	movq	%rbp, %rdi
	callq	_ZNSolsEi
	movb	$10, 11(%rsp)
	movq	(%rax), %rcx
	movq	-24(%rcx), %rcx
	cmpq	$0, 16(%rax,%rcx)
	je	.LBB0_52
# %bb.51:                               #   in Loop: Header=BB0_6 Depth=1
	movl	$1, %edx
	movq	%rax, %rdi
	movq	%r13, %rsi
	callq	_ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l
	jmp	.LBB0_53
.LBB0_52:                               #   in Loop: Header=BB0_6 Depth=1
	movq	%rax, %rdi
	movl	$10, %esi
	callq	_ZNSo3putEc
.LBB0_53:                               # %_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_c.exit45
                                        #   in Loop: Header=BB0_6 Depth=1
	movl	$_ZSt4cout, %edi
	movl	$.L.str.23, %esi
	movl	$49, %edx
	callq	_ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l
	movq	336(%rsp), %rsi
	movl	$_ZSt4cout, %edi
	callq	_ZNSo9_M_insertImEERSoT_
	movl	$.L.str.13, %esi
	movl	$7, %edx
	movq	%rax, %rdi
	callq	_ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l
	movl	$_ZSt4cout, %edi
	movl	$.L.str.24, %esi
	movl	$49, %edx
	callq	_ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l
	movq	392(%rsp), %rsi
	movl	$_ZSt4cout, %edi
	callq	_ZNSo9_M_insertImEERSoT_
	movl	$.L.str.13, %esi
	movl	$7, %edx
	movq	%rax, %rdi
	callq	_ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l
	movl	$_ZSt4cout, %edi
	movl	$.L.str.25, %esi
	movl	$49, %edx
	callq	_ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l
	cvtsi2ssl	372(%rsp), %xmm0
	mulss	.LCPI0_0(%rip), %xmm0
	cvtss2sd	%xmm0, %xmm0
	movl	$_ZSt4cout, %edi
	callq	_ZNSo9_M_insertIdEERSoT_
	movl	$.L.str.26, %esi
	movl	$5, %edx
	movq	%rax, %rdi
	callq	_ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l
	incl	%ebx
	cmpl	12(%rsp), %ebx
	jne	.LBB0_6
# %bb.54:                               # %._crit_edge
	xorl	%eax, %eax
.LBB0_55:
	addq	$1496, %rsp                     # imm = 0x5D8
	.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_3:
	.cfi_def_cfa_offset 1552
	movl	$_ZSt4cout, %edi
	movl	$.L.str.2, %esi
	movl	$35, %edx
	jmp	.LBB0_4
.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	"hipGetDeviceCount FAILED CUDA Driver and Runtime version may be mismatched.\n"
	.size	.L.str, 77

	.type	.L.str.1,@object                # @.str.1
.L.str.1:
	.asciz	"\nFAILED\n"
	.size	.L.str.1, 9

	.type	.L.str.2,@object                # @.str.2
.L.str.2:
	.asciz	"There is no device supporting CUDA\n"
	.size	.L.str.2, 36

	.type	.L.str.3,@object                # @.str.3
.L.str.3:
	.asciz	"There is no device supporting CUDA.\n"
	.size	.L.str.3, 37

	.type	.L.str.4,@object                # @.str.4
.L.str.4:
	.asciz	"There is 1 device supporting CUDA\n"
	.size	.L.str.4, 35

	.type	.L.str.5,@object                # @.str.5
.L.str.5:
	.asciz	"There are "
	.size	.L.str.5, 11

	.type	.L.str.6,@object                # @.str.6
.L.str.6:
	.asciz	" devices supporting CUDA\n"
	.size	.L.str.6, 26

	.type	.L.str.7,@object                # @.str.7
.L.str.7:
	.asciz	"\nDevice"
	.size	.L.str.7, 8

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

	.type	.L.str.9,@object                # @.str.9
.L.str.9:
	.asciz	"  CUDA Driver Version:                           "
	.size	.L.str.9, 50

	.type	.L.str.10,@object               # @.str.10
.L.str.10:
	.asciz	"  CUDA Runtime Version:                          "
	.size	.L.str.10, 50

	.type	.L.str.11,@object               # @.str.11
.L.str.11:
	.asciz	"  CUDA Capability Major/Minor version number:    "
	.size	.L.str.11, 50

	.type	.L.str.12,@object               # @.str.12
.L.str.12:
	.asciz	"  Total amount of global memory:                 "
	.size	.L.str.12, 50

	.type	.L.str.13,@object               # @.str.13
.L.str.13:
	.asciz	" bytes\n"
	.size	.L.str.13, 8

	.type	.L.str.14,@object               # @.str.14
.L.str.14:
	.asciz	"  Number of multiprocessors:                     "
	.size	.L.str.14, 50

	.type	.L.str.15,@object               # @.str.15
.L.str.15:
	.asciz	"  Total amount of constant memory:               "
	.size	.L.str.15, 50

	.type	.L.str.16,@object               # @.str.16
.L.str.16:
	.asciz	"  Total amount of shared memory per block:       "
	.size	.L.str.16, 50

	.type	.L.str.17,@object               # @.str.17
.L.str.17:
	.asciz	"  Total number of registers available per block: "
	.size	.L.str.17, 50

	.type	.L.str.18,@object               # @.str.18
.L.str.18:
	.asciz	"  Warp size:                                     "
	.size	.L.str.18, 50

	.type	.L.str.19,@object               # @.str.19
.L.str.19:
	.asciz	"  Maximum number of threads per block:           "
	.size	.L.str.19, 50

	.type	.L.str.20,@object               # @.str.20
.L.str.20:
	.asciz	"  Maximum sizes of each dimension of a block:    "
	.size	.L.str.20, 50

	.type	.L.str.21,@object               # @.str.21
.L.str.21:
	.asciz	" x "
	.size	.L.str.21, 4

	.type	.L.str.22,@object               # @.str.22
.L.str.22:
	.asciz	"  Maximum sizes of each dimension of a grid:     "
	.size	.L.str.22, 50

	.type	.L.str.23,@object               # @.str.23
.L.str.23:
	.asciz	"  Maximum memory pitch:                          "
	.size	.L.str.23, 50

	.type	.L.str.24,@object               # @.str.24
.L.str.24:
	.asciz	"  Texture alignment:                             "
	.size	.L.str.24, 50

	.type	.L.str.25,@object               # @.str.25
.L.str.25:
	.asciz	"  Clock rate:                                    "
	.size	.L.str.25, 50

	.type	.L.str.26,@object               # @.str.26
.L.str.26:
	.asciz	" GHz\n"
	.size	.L.str.26, 6

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