#include <cuda_runtime.h>
#include <stdio.h>
#include <stdlib.h>

#ifndef PRINT_SUFFIX
#define PRINT_SUFFIX "<find_cudadevices>"
#endif

#define MY_CUDA_VER (__CUDACC_VER_MAJOR__ * 100 + __CUDACC_VER_MINOR__)

inline void check(cudaError_t result)
{
    if (result)
    {
        fprintf(stderr, PRINT_SUFFIX "%s (%s)", cudaGetErrorName(result), cudaGetErrorString(result));
        cudaDeviceReset();
        // Make sure we call CUDA Device Reset before exiting
        exit(0);
    }
}

inline void print_value(size_t value)
{
    // in case we don't have '%zu'
    printf("%llu", (unsigned long long)value);
}

inline void print_value(bool value)
{
    printf(value ? "true" : "false");
}

inline void print_value(int value)
{
    printf("%d", value);
}

template <typename T, size_t len>
inline void print_value(const T (&value)[len])
{
    printf("(");
    for (size_t i = 0; i < len - 1; i++)
    {
        print_value(value[i]);
        printf(", ");
    }
    print_value(value[len - 1]);
    printf(")");
}

inline void print_value(unsigned int value)
{
    printf("%u", value);
}

inline void print_value(const void *value)
{
    printf("\"%s\"", (const char *)value);
}

template <size_t len>
inline void print_value(const char (&value)[len])
{
    printf("\"");
    for (size_t i = 0; i < len; i++)
        printf("%02hhx", value[i]);
    printf("\"");
}

template <>
inline void print_value<16>(const char (&value)[16])
{
    // speicalized for uuid
    printf("\"%02hhx%02hhx%02hhx%02hhx-%02hhx%02hhx-%02hhx%02hhx-%02hhx%02hhx-%02hhx%02hhx%02hhx%02hhx%02hhx%02hhx\"",
           value[0], value[1], value[2], value[3],
           value[4], value[5], value[6], value[7],
           value[8], value[9], value[10], value[11],
           value[12], value[13], value[14], value[15]);
}

#if MY_CUDA_VER >= 1000
inline void print_value(const cudaUUID_t &value)
{
    print_value(value.bytes);
}
#endif

template <typename T>
inline void print_property(const char *name, const T &value)
{
    printf(PRINT_SUFFIX "    %s = ", name);
    print_value(value);
    printf("\n");
}

inline void print_device(int id)
{
    cudaDeviceProp deviceProp;
    check(cudaGetDeviceProperties(&deviceProp, id));

#define PRINT_PROPERTY(name) print_property(#name, deviceProp.name)
#define PRINT_BOOL_PROPERTY(name) print_property(#name, static_cast<bool>(deviceProp.name))
#define PRINT_STR_PROPERTY(name) print_property(#name, static_cast<const void *>(deviceProp.name))
    // cuda 8.0
    PRINT_STR_PROPERTY(name);
    PRINT_PROPERTY(totalGlobalMem);
    PRINT_PROPERTY(sharedMemPerBlock);
    PRINT_PROPERTY(regsPerBlock);
    PRINT_PROPERTY(warpSize);
    PRINT_PROPERTY(memPitch);
    PRINT_PROPERTY(maxThreadsPerBlock);
    PRINT_PROPERTY(maxThreadsDim);
    PRINT_PROPERTY(maxGridSize);
    PRINT_PROPERTY(clockRate);
    PRINT_PROPERTY(totalConstMem);
    PRINT_PROPERTY(major);
    PRINT_PROPERTY(minor);
    PRINT_PROPERTY(textureAlignment);
    PRINT_PROPERTY(texturePitchAlignment);
    PRINT_BOOL_PROPERTY(deviceOverlap);
    PRINT_PROPERTY(multiProcessorCount);
    PRINT_BOOL_PROPERTY(kernelExecTimeoutEnabled);
    PRINT_BOOL_PROPERTY(integrated);
    PRINT_BOOL_PROPERTY(canMapHostMemory);
    PRINT_PROPERTY(computeMode);
    PRINT_PROPERTY(maxTexture1D);
    PRINT_PROPERTY(maxTexture1DMipmap);
    PRINT_PROPERTY(maxTexture1DLinear);
    PRINT_PROPERTY(maxTexture2D);
    PRINT_PROPERTY(maxTexture2DMipmap);
    PRINT_PROPERTY(maxTexture2DLinear);
    PRINT_PROPERTY(maxTexture2DGather);
    PRINT_PROPERTY(maxTexture3D);
    PRINT_PROPERTY(maxTexture3DAlt);
    PRINT_PROPERTY(maxTextureCubemap);
    PRINT_PROPERTY(maxTexture1DLayered);
    PRINT_PROPERTY(maxTexture2DLayered);
    PRINT_PROPERTY(maxTextureCubemapLayered);
    PRINT_PROPERTY(maxSurface1D);
    PRINT_PROPERTY(maxSurface2D);
    PRINT_PROPERTY(maxSurface3D);
    PRINT_PROPERTY(maxSurface1DLayered);
    PRINT_PROPERTY(maxSurface2DLayered);
    PRINT_PROPERTY(maxSurfaceCubemap);
    PRINT_PROPERTY(maxSurfaceCubemapLayered);
    PRINT_PROPERTY(surfaceAlignment);
    PRINT_BOOL_PROPERTY(concurrentKernels);
    PRINT_BOOL_PROPERTY(ECCEnabled);
    PRINT_PROPERTY(pciBusID);
    PRINT_PROPERTY(pciDeviceID);
    PRINT_PROPERTY(pciDomainID);
    PRINT_BOOL_PROPERTY(tccDriver);
    PRINT_PROPERTY(asyncEngineCount);
    PRINT_BOOL_PROPERTY(unifiedAddressing);
    PRINT_PROPERTY(memoryClockRate);
    PRINT_PROPERTY(memoryBusWidth);
    PRINT_PROPERTY(l2CacheSize);
    PRINT_PROPERTY(maxThreadsPerMultiProcessor);
    PRINT_BOOL_PROPERTY(streamPrioritiesSupported);
    PRINT_BOOL_PROPERTY(globalL1CacheSupported);
    PRINT_BOOL_PROPERTY(localL1CacheSupported);
    PRINT_PROPERTY(sharedMemPerMultiprocessor);
    PRINT_PROPERTY(regsPerMultiprocessor);
    PRINT_BOOL_PROPERTY(isMultiGpuBoard);
    PRINT_PROPERTY(multiGpuBoardGroupID);
    PRINT_PROPERTY(singleToDoublePrecisionPerfRatio);
    PRINT_BOOL_PROPERTY(pageableMemoryAccess);
    PRINT_BOOL_PROPERTY(concurrentManagedAccess);
    PRINT_BOOL_PROPERTY(managedMemory);

#if MY_CUDA_VER >= 900
    // Added in cuda 9.0
    PRINT_BOOL_PROPERTY(computePreemptionSupported);
    PRINT_BOOL_PROPERTY(canUseHostPointerForRegisteredMem);
    PRINT_BOOL_PROPERTY(cooperativeLaunch);
    PRINT_BOOL_PROPERTY(cooperativeMultiDeviceLaunch);
    PRINT_PROPERTY(sharedMemPerBlockOptin);
#endif

#if MY_CUDA_VER >= 902
    // Added in cuda 9.2
    PRINT_BOOL_PROPERTY(pageableMemoryAccessUsesHostPageTables);
    PRINT_BOOL_PROPERTY(directManagedMemAccessFromHost);
#endif

#if MY_CUDA_VER >= 1000
    // Added in cuda 10.0
    PRINT_PROPERTY(uuid);
    PRINT_PROPERTY(luid);
    PRINT_PROPERTY(luidDeviceNodeMask);
#endif
}

int main(int argc, char *argv[])
{
    printf("\n");
    fprintf(stderr, "\n");

    int count = 0;
    check(cudaGetDeviceCount(&count));
    for (int i = 0; i < count; i++)
    {
        printf(PRINT_SUFFIX "DEVICE #%d\n", i);
        print_device(i);
    }
    return 0;
}

	.file	"tmpxft_003267ec_00000000-6_find_cudadevices.cudafe1.cpp"
	.text
#APP

#NO_APP
	.type	_ZL26__cudaUnregisterBinaryUtilv, @function
_ZL26__cudaUnregisterBinaryUtilv:
.LFB2042:
	.cfi_startproc
	endbr64
	movq	_ZL20__cudaFatCubinHandle(%rip), %rdi
	jmp	__cudaUnregisterFatBinary@PLT
	.cfi_endproc
.LFE2042:
	.size	_ZL26__cudaUnregisterBinaryUtilv, .-_ZL26__cudaUnregisterBinaryUtilv
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"<find_cudadevices>%s (%s)"
	.text
	.type	_Z5check9cudaError.part.0, @function
_Z5check9cudaError.part.0:
.LFB2192:
	.cfi_startproc
	pushq	%rax
	.cfi_def_cfa_offset 16
	popq	%rax
	.cfi_def_cfa_offset 8
	subq	$24, %rsp
	.cfi_def_cfa_offset 32
	movl	%edi, 12(%rsp)
	call	cudaGetErrorString@PLT
	movl	12(%rsp), %edi
	movq	%rax, (%rsp)
	call	cudaGetErrorName@PLT
	movq	stderr(%rip), %rdi
	movq	(%rsp), %r8
	leaq	.LC0(%rip), %rdx
	movq	%rax, %rcx
	movl	$2, %esi
	xorl	%eax, %eax
	call	__fprintf_chk@PLT
	call	cudaDeviceReset@PLT
	xorl	%edi, %edi
	call	exit@PLT
	.cfi_endproc
.LFE2192:
	.size	_Z5check9cudaError.part.0, .-_Z5check9cudaError.part.0
	.section	.rodata._Z11print_valuei.str1.1,"aMS",@progbits,1
.LC1:
	.string	"%d"
	.section	.text._Z11print_valuei,"axG",@progbits,_Z11print_valuei,comdat
	.weak	_Z11print_valuei
	.type	_Z11print_valuei, @function
_Z11print_valuei:
.LFB2030:
	.cfi_startproc
	endbr64
	movl	%edi, %edx
	leaq	.LC1(%rip), %rsi
	movl	$2, %edi
	xorl	%eax, %eax
	jmp	__printf_chk@PLT
	.cfi_endproc
.LFE2030:
	.size	_Z11print_valuei, .-_Z11print_valuei
	.section	.text.startup,"ax",@progbits
	.type	_ZL24__sti____cudaRegisterAllv, @function
_ZL24__sti____cudaRegisterAllv:
.LFB2065:
	.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
.LFE2065:
	.size	_ZL24__sti____cudaRegisterAllv, .-_ZL24__sti____cudaRegisterAllv
	.section	.init_array,"aw"
	.align 8
	.quad	_ZL24__sti____cudaRegisterAllv
	.section	.rodata._Z14print_propertyImEvPKcRKT_.str1.1,"aMS",@progbits,1
.LC2:
	.string	"<find_cudadevices>    %s = "
.LC3:
	.string	"%llu"
.LC4:
	.string	"\n"
	.section	.text._Z14print_propertyImEvPKcRKT_,"axG",@progbits,_Z14print_propertyImEvPKcRKT_,comdat
	.weak	_Z14print_propertyImEvPKcRKT_
	.type	_Z14print_propertyImEvPKcRKT_, @function
_Z14print_propertyImEvPKcRKT_:
.LFB2112:
	.cfi_startproc
	endbr64
	pushq	%rbx
	.cfi_def_cfa_offset 16
	.cfi_offset 3, -16
	movq	%rdi, %rdx
	movq	%rsi, %rbx
	movl	$2, %edi
	leaq	.LC2(%rip), %rsi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	movq	(%rbx), %rdx
	movl	$2, %edi
	xorl	%eax, %eax
	leaq	.LC3(%rip), %rsi
	call	__printf_chk@PLT
	leaq	.LC4(%rip), %rsi
	xorl	%eax, %eax
	popq	%rbx
	.cfi_def_cfa_offset 8
	movl	$2, %edi
	jmp	__printf_chk@PLT
	.cfi_endproc
.LFE2112:
	.size	_Z14print_propertyImEvPKcRKT_, .-_Z14print_propertyImEvPKcRKT_
	.section	.text._Z14print_propertyIiEvPKcRKT_,"axG",@progbits,_Z14print_propertyIiEvPKcRKT_,comdat
	.weak	_Z14print_propertyIiEvPKcRKT_
	.type	_Z14print_propertyIiEvPKcRKT_, @function
_Z14print_propertyIiEvPKcRKT_:
.LFB2113:
	.cfi_startproc
	endbr64
	pushq	%rbx
	.cfi_def_cfa_offset 16
	.cfi_offset 3, -16
	movq	%rdi, %rdx
	movq	%rsi, %rbx
	movl	$2, %edi
	leaq	.LC2(%rip), %rsi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	movl	(%rbx), %edi
	call	_Z11print_valuei
	leaq	.LC4(%rip), %rsi
	xorl	%eax, %eax
	popq	%rbx
	.cfi_def_cfa_offset 8
	movl	$2, %edi
	jmp	__printf_chk@PLT
	.cfi_endproc
.LFE2113:
	.size	_Z14print_propertyIiEvPKcRKT_, .-_Z14print_propertyIiEvPKcRKT_
	.section	.rodata._Z14print_propertyIA3_iEvPKcRKT_.str1.1,"aMS",@progbits,1
.LC5:
	.string	"("
.LC6:
	.string	", "
.LC7:
	.string	")"
	.section	.text._Z14print_propertyIA3_iEvPKcRKT_,"axG",@progbits,_Z14print_propertyIA3_iEvPKcRKT_,comdat
	.weak	_Z14print_propertyIA3_iEvPKcRKT_
	.type	_Z14print_propertyIA3_iEvPKcRKT_, @function
_Z14print_propertyIA3_iEvPKcRKT_:
.LFB2114:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rdi, %rdx
	movl	$2, %edi
	leaq	.LC6(%rip), %rbp
	pushq	%rbx
	.cfi_def_cfa_offset 24
	.cfi_offset 3, -24
	movq	%rsi, %rbx
	leaq	.LC2(%rip), %rsi
	pushq	%rax
	.cfi_def_cfa_offset 32
	xorl	%eax, %eax
	call	__printf_chk@PLT
	leaq	.LC5(%rip), %rsi
	movl	$2, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	movl	(%rbx), %edi
	call	_Z11print_valuei
	movq	%rbp, %rsi
	movl	$2, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	movl	4(%rbx), %edi
	call	_Z11print_valuei
	movq	%rbp, %rsi
	movl	$2, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	movl	8(%rbx), %edi
	call	_Z11print_valuei
	leaq	.LC7(%rip), %rsi
	movl	$2, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	popq	%rdx
	.cfi_def_cfa_offset 24
	leaq	.LC4(%rip), %rsi
	popq	%rbx
	.cfi_def_cfa_offset 16
	movl	$2, %edi
	xorl	%eax, %eax
	popq	%rbp
	.cfi_def_cfa_offset 8
	jmp	__printf_chk@PLT
	.cfi_endproc
.LFE2114:
	.size	_Z14print_propertyIA3_iEvPKcRKT_, .-_Z14print_propertyIA3_iEvPKcRKT_
	.section	.rodata._Z14print_propertyIbEvPKcRKT_.str1.1,"aMS",@progbits,1
.LC8:
	.string	"true"
.LC9:
	.string	"false"
	.section	.text._Z14print_propertyIbEvPKcRKT_,"axG",@progbits,_Z14print_propertyIbEvPKcRKT_,comdat
	.weak	_Z14print_propertyIbEvPKcRKT_
	.type	_Z14print_propertyIbEvPKcRKT_, @function
_Z14print_propertyIbEvPKcRKT_:
.LFB2115:
	.cfi_startproc
	endbr64
	pushq	%rbx
	.cfi_def_cfa_offset 16
	.cfi_offset 3, -16
	movq	%rdi, %rdx
	movq	%rsi, %rbx
	movl	$2, %edi
	leaq	.LC2(%rip), %rsi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	cmpb	$0, (%rbx)
	movl	$2, %edi
	leaq	.LC8(%rip), %rax
	leaq	.LC9(%rip), %rsi
	cmovne	%rax, %rsi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	leaq	.LC4(%rip), %rsi
	xorl	%eax, %eax
	popq	%rbx
	.cfi_def_cfa_offset 8
	movl	$2, %edi
	jmp	__printf_chk@PLT
	.cfi_endproc
.LFE2115:
	.size	_Z14print_propertyIbEvPKcRKT_, .-_Z14print_propertyIbEvPKcRKT_
	.section	.text._Z14print_propertyIA2_iEvPKcRKT_,"axG",@progbits,_Z14print_propertyIA2_iEvPKcRKT_,comdat
	.weak	_Z14print_propertyIA2_iEvPKcRKT_
	.type	_Z14print_propertyIA2_iEvPKcRKT_, @function
_Z14print_propertyIA2_iEvPKcRKT_:
.LFB2116:
	.cfi_startproc
	endbr64
	pushq	%rbx
	.cfi_def_cfa_offset 16
	.cfi_offset 3, -16
	movq	%rdi, %rdx
	movq	%rsi, %rbx
	movl	$2, %edi
	leaq	.LC2(%rip), %rsi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	leaq	.LC5(%rip), %rsi
	movl	$2, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	movl	(%rbx), %edi
	call	_Z11print_valuei
	leaq	.LC6(%rip), %rsi
	movl	$2, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	movl	4(%rbx), %edi
	call	_Z11print_valuei
	leaq	.LC7(%rip), %rsi
	movl	$2, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	leaq	.LC4(%rip), %rsi
	xorl	%eax, %eax
	popq	%rbx
	.cfi_def_cfa_offset 8
	movl	$2, %edi
	jmp	__printf_chk@PLT
	.cfi_endproc
.LFE2116:
	.size	_Z14print_propertyIA2_iEvPKcRKT_, .-_Z14print_propertyIA2_iEvPKcRKT_
	.section	.rodata._Z14print_propertyI9CUuuid_stEvPKcRKT_.str1.1,"aMS",@progbits,1
.LC10:
	.string	"\"%02hhx%02hhx%02hhx%02hhx-%02hhx%02hhx-%02hhx%02hhx-%02hhx%02hhx-%02hhx%02hhx%02hhx%02hhx%02hhx%02hhx\""
	.section	.text._Z14print_propertyI9CUuuid_stEvPKcRKT_,"axG",@progbits,_Z14print_propertyI9CUuuid_stEvPKcRKT_,comdat
	.weak	_Z14print_propertyI9CUuuid_stEvPKcRKT_
	.type	_Z14print_propertyI9CUuuid_stEvPKcRKT_, @function
_Z14print_propertyI9CUuuid_stEvPKcRKT_:
.LFB2117:
	.cfi_startproc
	endbr64
	pushq	%rbx
	.cfi_def_cfa_offset 16
	.cfi_offset 3, -16
	movq	%rdi, %rdx
	movq	%rsi, %rbx
	movl	$2, %edi
	leaq	.LC2(%rip), %rsi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	movsbl	15(%rbx), %eax
	movsbl	1(%rbx), %ecx
	leaq	.LC10(%rip), %rsi
	movsbl	(%rbx), %edx
	movl	$2, %edi
	pushq	%rax
	.cfi_def_cfa_offset 24
	movsbl	14(%rbx), %eax
	pushq	%rax
	.cfi_def_cfa_offset 32
	movsbl	13(%rbx), %eax
	pushq	%rax
	.cfi_def_cfa_offset 40
	movsbl	12(%rbx), %eax
	pushq	%rax
	.cfi_def_cfa_offset 48
	movsbl	11(%rbx), %eax
	pushq	%rax
	.cfi_def_cfa_offset 56
	movsbl	10(%rbx), %eax
	pushq	%rax
	.cfi_def_cfa_offset 64
	movsbl	9(%rbx), %eax
	pushq	%rax
	.cfi_def_cfa_offset 72
	movsbl	8(%rbx), %eax
	pushq	%rax
	.cfi_def_cfa_offset 80
	movsbl	7(%rbx), %eax
	pushq	%rax
	.cfi_def_cfa_offset 88
	movsbl	6(%rbx), %eax
	pushq	%rax
	.cfi_def_cfa_offset 96
	movsbl	5(%rbx), %eax
	pushq	%rax
	.cfi_def_cfa_offset 104
	movsbl	4(%rbx), %eax
	pushq	%rax
	.cfi_def_cfa_offset 112
	movsbl	3(%rbx), %r9d
	xorl	%eax, %eax
	movsbl	2(%rbx), %r8d
	call	__printf_chk@PLT
	addq	$96, %rsp
	.cfi_def_cfa_offset 16
	movl	$2, %edi
	xorl	%eax, %eax
	leaq	.LC4(%rip), %rsi
	popq	%rbx
	.cfi_def_cfa_offset 8
	jmp	__printf_chk@PLT
	.cfi_endproc
.LFE2117:
	.size	_Z14print_propertyI9CUuuid_stEvPKcRKT_, .-_Z14print_propertyI9CUuuid_stEvPKcRKT_
	.section	.rodata._Z12print_devicei.str1.1,"aMS",@progbits,1
.LC11:
	.string	"name"
.LC12:
	.string	"\"%s\""
.LC13:
	.string	"totalGlobalMem"
.LC14:
	.string	"sharedMemPerBlock"
.LC15:
	.string	"regsPerBlock"
.LC16:
	.string	"warpSize"
.LC17:
	.string	"memPitch"
.LC18:
	.string	"maxThreadsPerBlock"
.LC19:
	.string	"maxThreadsDim"
.LC20:
	.string	"maxGridSize"
.LC21:
	.string	"clockRate"
.LC22:
	.string	"totalConstMem"
.LC23:
	.string	"major"
.LC24:
	.string	"minor"
.LC25:
	.string	"textureAlignment"
.LC26:
	.string	"texturePitchAlignment"
.LC27:
	.string	"deviceOverlap"
.LC28:
	.string	"multiProcessorCount"
.LC29:
	.string	"kernelExecTimeoutEnabled"
.LC30:
	.string	"integrated"
.LC31:
	.string	"canMapHostMemory"
.LC32:
	.string	"computeMode"
.LC33:
	.string	"maxTexture1D"
.LC34:
	.string	"maxTexture1DMipmap"
.LC35:
	.string	"maxTexture1DLinear"
.LC36:
	.string	"maxTexture2D"
.LC37:
	.string	"maxTexture2DMipmap"
.LC38:
	.string	"maxTexture2DLinear"
.LC39:
	.string	"maxTexture2DGather"
.LC40:
	.string	"maxTexture3D"
.LC41:
	.string	"maxTexture3DAlt"
.LC42:
	.string	"maxTextureCubemap"
.LC43:
	.string	"maxTexture1DLayered"
.LC44:
	.string	"maxTexture2DLayered"
.LC45:
	.string	"maxTextureCubemapLayered"
.LC46:
	.string	"maxSurface1D"
.LC47:
	.string	"maxSurface2D"
.LC48:
	.string	"maxSurface3D"
.LC49:
	.string	"maxSurface1DLayered"
.LC50:
	.string	"maxSurface2DLayered"
.LC51:
	.string	"maxSurfaceCubemap"
.LC52:
	.string	"maxSurfaceCubemapLayered"
.LC53:
	.string	"surfaceAlignment"
.LC54:
	.string	"concurrentKernels"
.LC55:
	.string	"ECCEnabled"
.LC56:
	.string	"pciBusID"
.LC57:
	.string	"pciDeviceID"
.LC58:
	.string	"pciDomainID"
.LC59:
	.string	"tccDriver"
.LC60:
	.string	"asyncEngineCount"
.LC61:
	.string	"unifiedAddressing"
.LC62:
	.string	"memoryClockRate"
.LC63:
	.string	"memoryBusWidth"
.LC64:
	.string	"l2CacheSize"
.LC65:
	.string	"maxThreadsPerMultiProcessor"
.LC66:
	.string	"streamPrioritiesSupported"
.LC67:
	.string	"globalL1CacheSupported"
.LC68:
	.string	"localL1CacheSupported"
.LC69:
	.string	"sharedMemPerMultiprocessor"
.LC70:
	.string	"regsPerMultiprocessor"
.LC71:
	.string	"isMultiGpuBoard"
.LC72:
	.string	"multiGpuBoardGroupID"
.LC73:
	.string	"singleToDoublePrecisionPerfRatio"
.LC74:
	.string	"pageableMemoryAccess"
.LC75:
	.string	"concurrentManagedAccess"
.LC76:
	.string	"managedMemory"
.LC77:
	.string	"computePreemptionSupported"
.LC78:
	.string	"canUseHostPointerForRegisteredMem"
.LC79:
	.string	"cooperativeLaunch"
.LC80:
	.string	"cooperativeMultiDeviceLaunch"
.LC81:
	.string	"sharedMemPerBlockOptin"
.LC82:
	.string	"pageableMemoryAccessUsesHostPageTables"
.LC83:
	.string	"directManagedMemAccessFromHost"
.LC84:
	.string	"uuid"
.LC85:
	.string	"luid"
.LC86:
	.string	"\""
.LC87:
	.string	"%02hhx"
.LC88:
	.string	"luidDeviceNodeMask"
.LC89:
	.string	"%u"
	.section	.text._Z12print_devicei,"axG",@progbits,_Z12print_devicei,comdat
	.weak	_Z12print_devicei
	.type	_Z12print_devicei, @function
_Z12print_devicei:
.LFB2038:
	.cfi_startproc
	endbr64
	pushq	%r14
	.cfi_def_cfa_offset 16
	.cfi_offset 14, -16
	movl	%edi, %esi
	pushq	%r13
	.cfi_def_cfa_offset 24
	.cfi_offset 13, -24
	pushq	%r12
	.cfi_def_cfa_offset 32
	.cfi_offset 12, -32
	pushq	%rbp
	.cfi_def_cfa_offset 40
	.cfi_offset 6, -40
	pushq	%rbx
	.cfi_def_cfa_offset 48
	.cfi_offset 3, -48
	subq	$1056, %rsp
	.cfi_def_cfa_offset 1104
	movq	%fs:40, %rax
	movq	%rax, 1048(%rsp)
	xorl	%eax, %eax
	leaq	16(%rsp), %rbx
	movq	%rbx, %rdi
	call	cudaGetDeviceProperties_v2@PLT
	testl	%eax, %eax
	je	.L22
	movl	%eax, %edi
	movq	1048(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L28
	call	_Z5check9cudaError.part.0
.L22:
	leaq	.LC2(%rip), %r12
	leaq	.LC11(%rip), %rdx
	movl	$2, %edi
	xorl	%eax, %eax
	movq	%r12, %rsi
	leaq	.LC4(%rip), %rbp
	leaq	.LC86(%rip), %r13
	call	__printf_chk@PLT
	movq	%rbx, %rdx
	movl	$2, %edi
	xorl	%eax, %eax
	leaq	.LC12(%rip), %rsi
	leaq	15(%rsp), %rbx
	call	__printf_chk@PLT
	movq	%rbp, %rsi
	movl	$2, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	leaq	304(%rsp), %rsi
	leaq	.LC13(%rip), %rdi
	call	_Z14print_propertyImEvPKcRKT_
	leaq	312(%rsp), %rsi
	leaq	.LC14(%rip), %rdi
	call	_Z14print_propertyImEvPKcRKT_
	leaq	320(%rsp), %rsi
	leaq	.LC15(%rip), %rdi
	call	_Z14print_propertyIiEvPKcRKT_
	leaq	324(%rsp), %rsi
	leaq	.LC16(%rip), %rdi
	call	_Z14print_propertyIiEvPKcRKT_
	leaq	328(%rsp), %rsi
	leaq	.LC17(%rip), %rdi
	call	_Z14print_propertyImEvPKcRKT_
	leaq	336(%rsp), %rsi
	leaq	.LC18(%rip), %rdi
	call	_Z14print_propertyIiEvPKcRKT_
	leaq	340(%rsp), %rsi
	leaq	.LC19(%rip), %rdi
	call	_Z14print_propertyIA3_iEvPKcRKT_
	leaq	352(%rsp), %rsi
	leaq	.LC20(%rip), %rdi
	call	_Z14print_propertyIA3_iEvPKcRKT_
	leaq	364(%rsp), %rsi
	leaq	.LC21(%rip), %rdi
	call	_Z14print_propertyIiEvPKcRKT_
	leaq	368(%rsp), %rsi
	leaq	.LC22(%rip), %rdi
	call	_Z14print_propertyImEvPKcRKT_
	leaq	376(%rsp), %rsi
	leaq	.LC23(%rip), %rdi
	call	_Z14print_propertyIiEvPKcRKT_
	leaq	380(%rsp), %rsi
	leaq	.LC24(%rip), %rdi
	call	_Z14print_propertyIiEvPKcRKT_
	leaq	384(%rsp), %rsi
	leaq	.LC25(%rip), %rdi
	call	_Z14print_propertyImEvPKcRKT_
	leaq	392(%rsp), %rsi
	leaq	.LC26(%rip), %rdi
	call	_Z14print_propertyImEvPKcRKT_
	cmpl	$0, 400(%rsp)
	movq	%rbx, %rsi
	leaq	.LC27(%rip), %rdi
	setne	15(%rsp)
	leaq	.LC87(%rip), %r14
	call	_Z14print_propertyIbEvPKcRKT_
	leaq	404(%rsp), %rsi
	leaq	.LC28(%rip), %rdi
	call	_Z14print_propertyIiEvPKcRKT_
	cmpl	$0, 408(%rsp)
	movq	%rbx, %rsi
	leaq	.LC29(%rip), %rdi
	setne	15(%rsp)
	call	_Z14print_propertyIbEvPKcRKT_
	cmpl	$0, 412(%rsp)
	movq	%rbx, %rsi
	leaq	.LC30(%rip), %rdi
	setne	15(%rsp)
	call	_Z14print_propertyIbEvPKcRKT_
	cmpl	$0, 416(%rsp)
	movq	%rbx, %rsi
	leaq	.LC31(%rip), %rdi
	setne	15(%rsp)
	call	_Z14print_propertyIbEvPKcRKT_
	leaq	420(%rsp), %rsi
	leaq	.LC32(%rip), %rdi
	call	_Z14print_propertyIiEvPKcRKT_
	leaq	424(%rsp), %rsi
	leaq	.LC33(%rip), %rdi
	call	_Z14print_propertyIiEvPKcRKT_
	leaq	428(%rsp), %rsi
	leaq	.LC34(%rip), %rdi
	call	_Z14print_propertyIiEvPKcRKT_
	leaq	432(%rsp), %rsi
	leaq	.LC35(%rip), %rdi
	call	_Z14print_propertyIiEvPKcRKT_
	leaq	436(%rsp), %rsi
	leaq	.LC36(%rip), %rdi
	call	_Z14print_propertyIA2_iEvPKcRKT_
	leaq	444(%rsp), %rsi
	leaq	.LC37(%rip), %rdi
	call	_Z14print_propertyIA2_iEvPKcRKT_
	leaq	452(%rsp), %rsi
	leaq	.LC38(%rip), %rdi
	call	_Z14print_propertyIA3_iEvPKcRKT_
	leaq	464(%rsp), %rsi
	leaq	.LC39(%rip), %rdi
	call	_Z14print_propertyIA2_iEvPKcRKT_
	leaq	472(%rsp), %rsi
	leaq	.LC40(%rip), %rdi
	call	_Z14print_propertyIA3_iEvPKcRKT_
	leaq	484(%rsp), %rsi
	leaq	.LC41(%rip), %rdi
	call	_Z14print_propertyIA3_iEvPKcRKT_
	leaq	496(%rsp), %rsi
	leaq	.LC42(%rip), %rdi
	call	_Z14print_propertyIiEvPKcRKT_
	leaq	500(%rsp), %rsi
	leaq	.LC43(%rip), %rdi
	call	_Z14print_propertyIA2_iEvPKcRKT_
	leaq	508(%rsp), %rsi
	leaq	.LC44(%rip), %rdi
	call	_Z14print_propertyIA3_iEvPKcRKT_
	leaq	520(%rsp), %rsi
	leaq	.LC45(%rip), %rdi
	call	_Z14print_propertyIA2_iEvPKcRKT_
	leaq	528(%rsp), %rsi
	leaq	.LC46(%rip), %rdi
	call	_Z14print_propertyIiEvPKcRKT_
	leaq	532(%rsp), %rsi
	leaq	.LC47(%rip), %rdi
	call	_Z14print_propertyIA2_iEvPKcRKT_
	leaq	540(%rsp), %rsi
	leaq	.LC48(%rip), %rdi
	call	_Z14print_propertyIA3_iEvPKcRKT_
	leaq	552(%rsp), %rsi
	leaq	.LC49(%rip), %rdi
	call	_Z14print_propertyIA2_iEvPKcRKT_
	leaq	560(%rsp), %rsi
	leaq	.LC50(%rip), %rdi
	call	_Z14print_propertyIA3_iEvPKcRKT_
	leaq	572(%rsp), %rsi
	leaq	.LC51(%rip), %rdi
	call	_Z14print_propertyIiEvPKcRKT_
	leaq	576(%rsp), %rsi
	leaq	.LC52(%rip), %rdi
	call	_Z14print_propertyIA2_iEvPKcRKT_
	leaq	584(%rsp), %rsi
	leaq	.LC53(%rip), %rdi
	call	_Z14print_propertyImEvPKcRKT_
	cmpl	$0, 592(%rsp)
	movq	%rbx, %rsi
	leaq	.LC54(%rip), %rdi
	setne	15(%rsp)
	call	_Z14print_propertyIbEvPKcRKT_
	cmpl	$0, 596(%rsp)
	movq	%rbx, %rsi
	leaq	.LC55(%rip), %rdi
	setne	15(%rsp)
	call	_Z14print_propertyIbEvPKcRKT_
	leaq	600(%rsp), %rsi
	leaq	.LC56(%rip), %rdi
	call	_Z14print_propertyIiEvPKcRKT_
	leaq	604(%rsp), %rsi
	leaq	.LC57(%rip), %rdi
	call	_Z14print_propertyIiEvPKcRKT_
	leaq	608(%rsp), %rsi
	leaq	.LC58(%rip), %rdi
	call	_Z14print_propertyIiEvPKcRKT_
	cmpl	$0, 612(%rsp)
	movq	%rbx, %rsi
	leaq	.LC59(%rip), %rdi
	setne	15(%rsp)
	call	_Z14print_propertyIbEvPKcRKT_
	leaq	616(%rsp), %rsi
	leaq	.LC60(%rip), %rdi
	call	_Z14print_propertyIiEvPKcRKT_
	cmpl	$0, 620(%rsp)
	movq	%rbx, %rsi
	leaq	.LC61(%rip), %rdi
	setne	15(%rsp)
	call	_Z14print_propertyIbEvPKcRKT_
	leaq	624(%rsp), %rsi
	leaq	.LC62(%rip), %rdi
	call	_Z14print_propertyIiEvPKcRKT_
	leaq	628(%rsp), %rsi
	leaq	.LC63(%rip), %rdi
	call	_Z14print_propertyIiEvPKcRKT_
	leaq	632(%rsp), %rsi
	leaq	.LC64(%rip), %rdi
	call	_Z14print_propertyIiEvPKcRKT_
	leaq	640(%rsp), %rsi
	leaq	.LC65(%rip), %rdi
	call	_Z14print_propertyIiEvPKcRKT_
	cmpl	$0, 644(%rsp)
	movq	%rbx, %rsi
	leaq	.LC66(%rip), %rdi
	setne	15(%rsp)
	call	_Z14print_propertyIbEvPKcRKT_
	cmpl	$0, 648(%rsp)
	movq	%rbx, %rsi
	leaq	.LC67(%rip), %rdi
	setne	15(%rsp)
	call	_Z14print_propertyIbEvPKcRKT_
	cmpl	$0, 652(%rsp)
	movq	%rbx, %rsi
	leaq	.LC68(%rip), %rdi
	setne	15(%rsp)
	call	_Z14print_propertyIbEvPKcRKT_
	leaq	656(%rsp), %rsi
	leaq	.LC69(%rip), %rdi
	call	_Z14print_propertyImEvPKcRKT_
	leaq	664(%rsp), %rsi
	leaq	.LC70(%rip), %rdi
	call	_Z14print_propertyIiEvPKcRKT_
	cmpl	$0, 672(%rsp)
	movq	%rbx, %rsi
	leaq	.LC71(%rip), %rdi
	setne	15(%rsp)
	call	_Z14print_propertyIbEvPKcRKT_
	leaq	676(%rsp), %rsi
	leaq	.LC72(%rip), %rdi
	call	_Z14print_propertyIiEvPKcRKT_
	leaq	684(%rsp), %rsi
	leaq	.LC73(%rip), %rdi
	call	_Z14print_propertyIiEvPKcRKT_
	cmpl	$0, 688(%rsp)
	movq	%rbx, %rsi
	leaq	.LC74(%rip), %rdi
	setne	15(%rsp)
	call	_Z14print_propertyIbEvPKcRKT_
	cmpl	$0, 692(%rsp)
	movq	%rbx, %rsi
	leaq	.LC75(%rip), %rdi
	setne	15(%rsp)
	call	_Z14print_propertyIbEvPKcRKT_
	cmpl	$0, 668(%rsp)
	movq	%rbx, %rsi
	leaq	.LC76(%rip), %rdi
	setne	15(%rsp)
	call	_Z14print_propertyIbEvPKcRKT_
	cmpl	$0, 696(%rsp)
	movq	%rbx, %rsi
	leaq	.LC77(%rip), %rdi
	setne	15(%rsp)
	call	_Z14print_propertyIbEvPKcRKT_
	cmpl	$0, 700(%rsp)
	movq	%rbx, %rsi
	leaq	.LC78(%rip), %rdi
	setne	15(%rsp)
	call	_Z14print_propertyIbEvPKcRKT_
	cmpl	$0, 704(%rsp)
	movq	%rbx, %rsi
	leaq	.LC79(%rip), %rdi
	setne	15(%rsp)
	call	_Z14print_propertyIbEvPKcRKT_
	cmpl	$0, 708(%rsp)
	movq	%rbx, %rsi
	leaq	.LC80(%rip), %rdi
	setne	15(%rsp)
	call	_Z14print_propertyIbEvPKcRKT_
	leaq	712(%rsp), %rsi
	leaq	.LC81(%rip), %rdi
	call	_Z14print_propertyImEvPKcRKT_
	cmpl	$0, 720(%rsp)
	movq	%rbx, %rsi
	leaq	.LC82(%rip), %rdi
	setne	15(%rsp)
	call	_Z14print_propertyIbEvPKcRKT_
	cmpl	$0, 724(%rsp)
	movq	%rbx, %rsi
	leaq	.LC83(%rip), %rdi
	setne	15(%rsp)
	xorl	%ebx, %ebx
	call	_Z14print_propertyIbEvPKcRKT_
	leaq	272(%rsp), %rsi
	leaq	.LC84(%rip), %rdi
	call	_Z14print_propertyI9CUuuid_stEvPKcRKT_
	movq	%r12, %rsi
	movl	$2, %edi
	xorl	%eax, %eax
	leaq	.LC85(%rip), %rdx
	call	__printf_chk@PLT
	movq	%r13, %rsi
	movl	$2, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
.L24:
	movsbl	288(%rsp,%rbx), %edx
	movq	%r14, %rsi
	movl	$2, %edi
	xorl	%eax, %eax
	incq	%rbx
	call	__printf_chk@PLT
	cmpq	$8, %rbx
	jne	.L24
	movq	%r13, %rsi
	movl	$2, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	movq	%rbp, %rsi
	movl	$2, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	movq	%r12, %rsi
	movl	$2, %edi
	xorl	%eax, %eax
	leaq	.LC88(%rip), %rdx
	call	__printf_chk@PLT
	movl	296(%rsp), %edx
	leaq	.LC89(%rip), %rsi
	xorl	%eax, %eax
	movl	$2, %edi
	call	__printf_chk@PLT
	xorl	%eax, %eax
	movq	%rbp, %rsi
	movl	$2, %edi
	call	__printf_chk@PLT
	movq	1048(%rsp), %rax
	subq	%fs:40, %rax
	je	.L25
.L28:
	call	__stack_chk_fail@PLT
.L25:
	addq	$1056, %rsp
	.cfi_def_cfa_offset 48
	popq	%rbx
	.cfi_def_cfa_offset 40
	popq	%rbp
	.cfi_def_cfa_offset 32
	popq	%r12
	.cfi_def_cfa_offset 24
	popq	%r13
	.cfi_def_cfa_offset 16
	popq	%r14
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE2038:
	.size	_Z12print_devicei, .-_Z12print_devicei
	.section	.rodata.str1.1
.LC90:
	.string	"<find_cudadevices>DEVICE #%d\n"
	.section	.text.startup
	.globl	main
	.type	main, @function
main:
.LFB2039:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movl	$2, %edi
	leaq	.LC90(%rip), %rbp
	pushq	%rbx
	.cfi_def_cfa_offset 24
	.cfi_offset 3, -24
	leaq	.LC4(%rip), %rbx
	movq	%rbx, %rsi
	subq	$24, %rsp
	.cfi_def_cfa_offset 48
	movq	%fs:40, %rax
	movq	%rax, 8(%rsp)
	xorl	%eax, %eax
	call	__printf_chk@PLT
	movq	%rbx, %rdx
	movl	$2, %esi
	xorl	%eax, %eax
	movq	stderr(%rip), %rdi
	xorl	%ebx, %ebx
	call	__fprintf_chk@PLT
	xorl	%eax, %eax
	leaq	4(%rsp), %rdi
	movl	%eax, 4(%rsp)
	call	cudaGetDeviceCount@PLT
	testl	%eax, %eax
	je	.L31
	movl	%eax, %edi
	movq	8(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L39
	call	_Z5check9cudaError.part.0
.L31:
	cmpl	%ebx, 4(%rsp)
	jle	.L40
	movl	%ebx, %edx
	movq	%rbp, %rsi
	movl	$2, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	movl	%ebx, %edi
	incl	%ebx
	call	_Z12print_devicei
	jmp	.L31
.L40:
	movq	8(%rsp), %rax
	subq	%fs:40, %rax
	je	.L34
.L39:
	call	__stack_chk_fail@PLT
.L34:
	addq	$24, %rsp
	.cfi_def_cfa_offset 24
	xorl	%eax, %eax
	popq	%rbx
	.cfi_def_cfa_offset 16
	popq	%rbp
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE2039:
	.size	main, .-main
	.section	.nvFatBinSegment,"aw"
	.align 8
	.type	_ZL15__fatDeviceText, @object
	.size	_ZL15__fatDeviceText, 24
_ZL15__fatDeviceText:
	.long	1180844977
	.long	1
	.quad	fatbinData
	.quad	0
	.local	_ZL20__cudaFatCubinHandle
	.comm	_ZL20__cudaFatCubinHandle,8,8
	.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>

#ifndef PRINT_SUFFIX
#define PRINT_SUFFIX "<find_cudadevices>"
#endif

#define MY_CUDA_VER (__CUDACC_VER_MAJOR__ * 100 + __CUDACC_VER_MINOR__)

inline void check(hipError_t result)
{
    if (result)
    {
        fprintf(stderr, PRINT_SUFFIX "%s (%s)", hipGetErrorName(result), hipGetErrorString(result));
        hipDeviceReset();
        // Make sure we call CUDA Device Reset before exiting
        exit(0);
    }
}

inline void print_value(size_t value)
{
    // in case we don't have '%zu'
    printf("%llu", (unsigned long long)value);
}

inline void print_value(bool value)
{
    printf(value ? "true" : "false");
}

inline void print_value(int value)
{
    printf("%d", value);
}

template <typename T, size_t len>
inline void print_value(const T (&value)[len])
{
    printf("(");
    for (size_t i = 0; i < len - 1; i++)
    {
        print_value(value[i]);
        printf(", ");
    }
    print_value(value[len - 1]);
    printf(")");
}

inline void print_value(unsigned int value)
{
    printf("%u", value);
}

inline void print_value(const void *value)
{
    printf("\"%s\"", (const char *)value);
}

template <size_t len>
inline void print_value(const char (&value)[len])
{
    printf("\"");
    for (size_t i = 0; i < len; i++)
        printf("%02hhx", value[i]);
    printf("\"");
}

template <>
inline void print_value<16>(const char (&value)[16])
{
    // speicalized for uuid
    printf("\"%02hhx%02hhx%02hhx%02hhx-%02hhx%02hhx-%02hhx%02hhx-%02hhx%02hhx-%02hhx%02hhx%02hhx%02hhx%02hhx%02hhx\"",
           value[0], value[1], value[2], value[3],
           value[4], value[5], value[6], value[7],
           value[8], value[9], value[10], value[11],
           value[12], value[13], value[14], value[15]);
}

#if MY_CUDA_VER >= 1000
inline void print_value(const hipUUID &value)
{
    print_value(value.bytes);
}
#endif

template <typename T>
inline void print_property(const char *name, const T &value)
{
    printf(PRINT_SUFFIX "    %s = ", name);
    print_value(value);
    printf("\n");
}

inline void print_device(int id)
{
    hipDeviceProp_t deviceProp;
    check(hipGetDeviceProperties(&deviceProp, id));

#define PRINT_PROPERTY(name) print_property(#name, deviceProp.name)
#define PRINT_BOOL_PROPERTY(name) print_property(#name, static_cast<bool>(deviceProp.name))
#define PRINT_STR_PROPERTY(name) print_property(#name, static_cast<const void *>(deviceProp.name))
    // cuda 8.0
    PRINT_STR_PROPERTY(name);
    PRINT_PROPERTY(totalGlobalMem);
    PRINT_PROPERTY(sharedMemPerBlock);
    PRINT_PROPERTY(regsPerBlock);
    PRINT_PROPERTY(warpSize);
    PRINT_PROPERTY(memPitch);
    PRINT_PROPERTY(maxThreadsPerBlock);
    PRINT_PROPERTY(maxThreadsDim);
    PRINT_PROPERTY(maxGridSize);
    PRINT_PROPERTY(clockRate);
    PRINT_PROPERTY(totalConstMem);
    PRINT_PROPERTY(major);
    PRINT_PROPERTY(minor);
    PRINT_PROPERTY(textureAlignment);
    PRINT_PROPERTY(texturePitchAlignment);
    PRINT_BOOL_PROPERTY(deviceOverlap);
    PRINT_PROPERTY(multiProcessorCount);
    PRINT_BOOL_PROPERTY(kernelExecTimeoutEnabled);
    PRINT_BOOL_PROPERTY(integrated);
    PRINT_BOOL_PROPERTY(canMapHostMemory);
    PRINT_PROPERTY(computeMode);
    PRINT_PROPERTY(maxTexture1D);
    PRINT_PROPERTY(maxTexture1DMipmap);
    PRINT_PROPERTY(maxTexture1DLinear);
    PRINT_PROPERTY(maxTexture2D);
    PRINT_PROPERTY(maxTexture2DMipmap);
    PRINT_PROPERTY(maxTexture2DLinear);
    PRINT_PROPERTY(maxTexture2DGather);
    PRINT_PROPERTY(maxTexture3D);
    PRINT_PROPERTY(maxTexture3DAlt);
    PRINT_PROPERTY(maxTextureCubemap);
    PRINT_PROPERTY(maxTexture1DLayered);
    PRINT_PROPERTY(maxTexture2DLayered);
    PRINT_PROPERTY(maxTextureCubemapLayered);
    PRINT_PROPERTY(maxSurface1D);
    PRINT_PROPERTY(maxSurface2D);
    PRINT_PROPERTY(maxSurface3D);
    PRINT_PROPERTY(maxSurface1DLayered);
    PRINT_PROPERTY(maxSurface2DLayered);
    PRINT_PROPERTY(maxSurfaceCubemap);
    PRINT_PROPERTY(maxSurfaceCubemapLayered);
    PRINT_PROPERTY(surfaceAlignment);
    PRINT_BOOL_PROPERTY(concurrentKernels);
    PRINT_BOOL_PROPERTY(ECCEnabled);
    PRINT_PROPERTY(pciBusID);
    PRINT_PROPERTY(pciDeviceID);
    PRINT_PROPERTY(pciDomainID);
    PRINT_BOOL_PROPERTY(tccDriver);
    PRINT_PROPERTY(asyncEngineCount);
    PRINT_BOOL_PROPERTY(unifiedAddressing);
    PRINT_PROPERTY(memoryClockRate);
    PRINT_PROPERTY(memoryBusWidth);
    PRINT_PROPERTY(l2CacheSize);
    PRINT_PROPERTY(maxThreadsPerMultiProcessor);
    PRINT_BOOL_PROPERTY(streamPrioritiesSupported);
    PRINT_BOOL_PROPERTY(globalL1CacheSupported);
    PRINT_BOOL_PROPERTY(localL1CacheSupported);
    PRINT_PROPERTY(sharedMemPerMultiprocessor);
    PRINT_PROPERTY(regsPerMultiprocessor);
    PRINT_BOOL_PROPERTY(isMultiGpuBoard);
    PRINT_PROPERTY(multiGpuBoardGroupID);
    PRINT_PROPERTY(singleToDoublePrecisionPerfRatio);
    PRINT_BOOL_PROPERTY(pageableMemoryAccess);
    PRINT_BOOL_PROPERTY(concurrentManagedAccess);
    PRINT_BOOL_PROPERTY(managedMemory);

#if MY_CUDA_VER >= 900
    // Added in cuda 9.0
    PRINT_BOOL_PROPERTY(computePreemptionSupported);
    PRINT_BOOL_PROPERTY(canUseHostPointerForRegisteredMem);
    PRINT_BOOL_PROPERTY(cooperativeLaunch);
    PRINT_BOOL_PROPERTY(cooperativeMultiDeviceLaunch);
    PRINT_PROPERTY(sharedMemPerBlockOptin);
#endif

#if MY_CUDA_VER >= 902
    // Added in cuda 9.2
    PRINT_BOOL_PROPERTY(pageableMemoryAccessUsesHostPageTables);
    PRINT_BOOL_PROPERTY(directManagedMemAccessFromHost);
#endif

#if MY_CUDA_VER >= 1000
    // Added in cuda 10.0
    PRINT_PROPERTY(uuid);
    PRINT_PROPERTY(luid);
    PRINT_PROPERTY(luidDeviceNodeMask);
#endif
}

int main(int argc, char *argv[])
{
    printf("\n");
    fprintf(stderr, "\n");

    int count = 0;
    check(hipGetDeviceCount(&count));
    for (int i = 0; i < count; i++)
    {
        printf(PRINT_SUFFIX "DEVICE #%d\n", i);
        print_device(i);
    }
    return 0;
}

	.text
	.file	"find_cudadevices.hip"
	.globl	main                            # -- Begin function main
	.type	main,@function
main:                                   # @main
	.cfi_startproc
# %bb.0:
	pushq	%r15
	.cfi_def_cfa_offset 16
	pushq	%r14
	.cfi_def_cfa_offset 24
	pushq	%rbx
	.cfi_def_cfa_offset 32
	subq	$16, %rsp
	.cfi_def_cfa_offset 48
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	.cfi_offset %r15, -16
	movl	$10, %edi
	callq	putchar@PLT
	movq	stderr(%rip), %rsi
	movl	$10, %edi
	callq	fputc@PLT
	leaq	12(%rsp), %rdi
	movl	$0, (%rdi)
	callq	hipGetDeviceCount
	testl	%eax, %eax
	jne	.LBB0_5
# %bb.1:                                # %_Z5check10hipError_t.exit.preheader
	cmpl	$0, 12(%rsp)
	jle	.LBB0_4
# %bb.2:                                # %_Z5check10hipError_t.exit.preheader8
	xorl	%ebx, %ebx
.LBB0_3:                                # %_Z5check10hipError_t.exit
                                        # =>This Inner Loop Header: Depth=1
	movl	$.L.str.1, %edi
	movl	%ebx, %esi
	xorl	%eax, %eax
	callq	printf
	movl	%ebx, %edi
	callq	_Z12print_devicei
	incl	%ebx
	cmpl	12(%rsp), %ebx
	jl	.LBB0_3
.LBB0_4:                                # %_Z5check10hipError_t.exit._crit_edge
	xorl	%eax, %eax
	addq	$16, %rsp
	.cfi_def_cfa_offset 32
	popq	%rbx
	.cfi_def_cfa_offset 24
	popq	%r14
	.cfi_def_cfa_offset 16
	popq	%r15
	.cfi_def_cfa_offset 8
	retq
.LBB0_5:
	.cfi_def_cfa_offset 48
	movl	%eax, %ebx
	movq	stderr(%rip), %r14
	movl	%eax, %edi
	callq	hipGetErrorName
	movq	%rax, %r15
	movl	%ebx, %edi
	callq	hipGetErrorString
	movl	$.L.str.2, %esi
	movq	%r14, %rdi
	movq	%r15, %rdx
	movq	%rax, %rcx
	xorl	%eax, %eax
	callq	fprintf
	callq	hipDeviceReset
	xorl	%edi, %edi
	callq	exit
.Lfunc_end0:
	.size	main, .Lfunc_end0-main
	.cfi_endproc
                                        # -- End function
	.section	.text._Z12print_devicei,"axG",@progbits,_Z12print_devicei,comdat
	.weak	_Z12print_devicei               # -- Begin function _Z12print_devicei
	.type	_Z12print_devicei,@function
_Z12print_devicei:                      # @_Z12print_devicei
	.cfi_startproc
# %bb.0:
	pushq	%r15
	.cfi_def_cfa_offset 16
	pushq	%r14
	.cfi_def_cfa_offset 24
	pushq	%r12
	.cfi_def_cfa_offset 32
	pushq	%rbx
	.cfi_def_cfa_offset 40
	subq	$1480, %rsp                     # imm = 0x5C8
	.cfi_def_cfa_offset 1520
	.cfi_offset %rbx, -40
	.cfi_offset %r12, -32
	.cfi_offset %r14, -24
	.cfi_offset %r15, -16
	movl	%edi, %esi
	leaq	8(%rsp), %rdi
	callq	hipGetDevicePropertiesR0600
	testl	%eax, %eax
	jne	.LBB1_2
# %bb.1:                                # %_Z5check10hipError_t.exit
	movl	$.L.str.68, %edi
	movl	$.L.str.3, %esi
	xorl	%eax, %eax
	callq	printf
	leaq	8(%rsp), %rbx
	movl	$.L.str.69, %edi
	movq	%rbx, %rsi
	xorl	%eax, %eax
	callq	printf
	movl	$10, %edi
	callq	putchar@PLT
	movl	$.L.str.68, %edi
	movl	$.L.str.4, %esi
	xorl	%eax, %eax
	callq	printf
	movq	288(%rbx), %rsi
	movl	$.L.str.70, %edi
	xorl	%eax, %eax
	callq	printf
	movl	$10, %edi
	callq	putchar@PLT
	movl	$.L.str.68, %edi
	movl	$.L.str.5, %esi
	xorl	%eax, %eax
	callq	printf
	movq	296(%rbx), %rsi
	movl	$.L.str.70, %edi
	xorl	%eax, %eax
	callq	printf
	movl	$10, %edi
	callq	putchar@PLT
	movl	$.L.str.68, %edi
	movl	$.L.str.6, %esi
	xorl	%eax, %eax
	callq	printf
	movl	304(%rbx), %esi
	movl	$.L.str.71, %edi
	xorl	%eax, %eax
	callq	printf
	movl	$10, %edi
	callq	putchar@PLT
	movl	$.L.str.68, %edi
	movl	$.L.str.7, %esi
	xorl	%eax, %eax
	callq	printf
	movl	308(%rbx), %esi
	movl	$.L.str.71, %edi
	xorl	%eax, %eax
	callq	printf
	movl	$10, %edi
	callq	putchar@PLT
	movl	$.L.str.68, %edi
	movl	$.L.str.8, %esi
	xorl	%eax, %eax
	callq	printf
	movq	312(%rbx), %rsi
	movl	$.L.str.70, %edi
	xorl	%eax, %eax
	callq	printf
	movl	$10, %edi
	callq	putchar@PLT
	movl	$.L.str.68, %edi
	movl	$.L.str.9, %esi
	xorl	%eax, %eax
	callq	printf
	movl	320(%rbx), %esi
	movl	$.L.str.71, %edi
	xorl	%eax, %eax
	callq	printf
	movl	$10, %edi
	callq	putchar@PLT
	movl	$.L.str.68, %edi
	movl	$.L.str.10, %esi
	xorl	%eax, %eax
	callq	printf
	movl	$40, %edi
	callq	putchar@PLT
	movl	324(%rbx), %esi
	movl	$.L.str.71, %edi
	xorl	%eax, %eax
	callq	printf
	movl	$.L.str.73, %edi
	xorl	%eax, %eax
	callq	printf
	movl	328(%rbx), %esi
	movl	$.L.str.71, %edi
	xorl	%eax, %eax
	callq	printf
	movl	$.L.str.73, %edi
	xorl	%eax, %eax
	callq	printf
	movl	332(%rbx), %esi
	movl	$.L.str.71, %edi
	xorl	%eax, %eax
	callq	printf
	movl	$41, %edi
	callq	putchar@PLT
	movl	$10, %edi
	callq	putchar@PLT
	movl	$.L.str.68, %edi
	movl	$.L.str.11, %esi
	xorl	%eax, %eax
	callq	printf
	movl	$40, %edi
	callq	putchar@PLT
	movl	336(%rbx), %esi
	movl	$.L.str.71, %edi
	xorl	%eax, %eax
	callq	printf
	movl	$.L.str.73, %edi
	xorl	%eax, %eax
	callq	printf
	movl	340(%rbx), %esi
	movl	$.L.str.71, %edi
	xorl	%eax, %eax
	callq	printf
	movl	$.L.str.73, %edi
	xorl	%eax, %eax
	callq	printf
	movl	344(%rbx), %esi
	movl	$.L.str.71, %edi
	xorl	%eax, %eax
	callq	printf
	movl	$41, %edi
	callq	putchar@PLT
	movl	$10, %edi
	callq	putchar@PLT
	movl	$.L.str.68, %edi
	movl	$.L.str.12, %esi
	xorl	%eax, %eax
	callq	printf
	movl	348(%rbx), %esi
	movl	$.L.str.71, %edi
	xorl	%eax, %eax
	callq	printf
	movl	$10, %edi
	callq	putchar@PLT
	movl	$.L.str.68, %edi
	movl	$.L.str.13, %esi
	xorl	%eax, %eax
	callq	printf
	movq	352(%rbx), %rsi
	movl	$.L.str.70, %edi
	xorl	%eax, %eax
	callq	printf
	movl	$10, %edi
	callq	putchar@PLT
	movl	$.L.str.68, %edi
	movl	$.L.str.14, %esi
	xorl	%eax, %eax
	callq	printf
	movl	360(%rbx), %esi
	movl	$.L.str.71, %edi
	xorl	%eax, %eax
	callq	printf
	movl	$10, %edi
	callq	putchar@PLT
	movl	$.L.str.68, %edi
	movl	$.L.str.15, %esi
	xorl	%eax, %eax
	callq	printf
	movl	364(%rbx), %esi
	movl	$.L.str.71, %edi
	xorl	%eax, %eax
	callq	printf
	movl	$10, %edi
	callq	putchar@PLT
	movl	$.L.str.68, %edi
	movl	$.L.str.16, %esi
	xorl	%eax, %eax
	callq	printf
	movq	368(%rbx), %rsi
	movl	$.L.str.70, %edi
	xorl	%eax, %eax
	callq	printf
	movl	$10, %edi
	callq	putchar@PLT
	movl	$.L.str.68, %edi
	movl	$.L.str.17, %esi
	xorl	%eax, %eax
	callq	printf
	movq	376(%rbx), %rsi
	movl	$.L.str.70, %edi
	xorl	%eax, %eax
	callq	printf
	movl	$10, %edi
	callq	putchar@PLT
	cmpl	$0, 384(%rbx)
	movl	$.L.str.76, %r12d
	movl	$.L.str.75, %r14d
	movl	$.L.str.75, %r15d
	cmoveq	%r12, %r15
	movl	$.L.str.68, %edi
	movl	$.L.str.18, %esi
	xorl	%eax, %eax
	callq	printf
	movq	%r15, %rdi
	xorl	%eax, %eax
	callq	printf
	movl	$10, %edi
	callq	putchar@PLT
	movl	$.L.str.68, %edi
	movl	$.L.str.19, %esi
	xorl	%eax, %eax
	callq	printf
	movl	388(%rbx), %esi
	movl	$.L.str.71, %edi
	xorl	%eax, %eax
	callq	printf
	movl	$10, %edi
	callq	putchar@PLT
	cmpl	$0, 392(%rbx)
	movl	$.L.str.75, %r15d
	cmoveq	%r12, %r15
	movl	$.L.str.68, %edi
	movl	$.L.str.20, %esi
	xorl	%eax, %eax
	callq	printf
	movq	%r15, %rdi
	xorl	%eax, %eax
	callq	printf
	movl	$10, %edi
	callq	putchar@PLT
	cmpl	$0, 396(%rbx)
	movl	$.L.str.75, %r15d
	cmoveq	%r12, %r15
	movl	$.L.str.68, %edi
	movl	$.L.str.21, %esi
	xorl	%eax, %eax
	callq	printf
	movq	%r15, %rdi
	xorl	%eax, %eax
	callq	printf
	movl	$10, %edi
	callq	putchar@PLT
	cmpl	$0, 400(%rbx)
	movl	$.L.str.75, %r15d
	cmoveq	%r12, %r15
	movl	$.L.str.68, %edi
	movl	$.L.str.22, %esi
	xorl	%eax, %eax
	callq	printf
	movq	%r15, %rdi
	xorl	%eax, %eax
	callq	printf
	movl	$10, %edi
	callq	putchar@PLT
	movl	$.L.str.68, %edi
	movl	$.L.str.23, %esi
	xorl	%eax, %eax
	callq	printf
	movl	404(%rbx), %esi
	movl	$.L.str.71, %edi
	xorl	%eax, %eax
	callq	printf
	movl	$10, %edi
	callq	putchar@PLT
	movl	$.L.str.68, %edi
	movl	$.L.str.24, %esi
	xorl	%eax, %eax
	callq	printf
	movl	408(%rbx), %esi
	movl	$.L.str.71, %edi
	xorl	%eax, %eax
	callq	printf
	movl	$10, %edi
	callq	putchar@PLT
	movl	$.L.str.68, %edi
	movl	$.L.str.25, %esi
	xorl	%eax, %eax
	callq	printf
	movl	412(%rbx), %esi
	movl	$.L.str.71, %edi
	xorl	%eax, %eax
	callq	printf
	movl	$10, %edi
	callq	putchar@PLT
	movl	$.L.str.68, %edi
	movl	$.L.str.26, %esi
	xorl	%eax, %eax
	callq	printf
	movl	416(%rbx), %esi
	movl	$.L.str.71, %edi
	xorl	%eax, %eax
	callq	printf
	movl	$10, %edi
	callq	putchar@PLT
	movl	$.L.str.68, %edi
	movl	$.L.str.27, %esi
	xorl	%eax, %eax
	callq	printf
	movl	$40, %edi
	callq	putchar@PLT
	movl	420(%rbx), %esi
	movl	$.L.str.71, %edi
	xorl	%eax, %eax
	callq	printf
	movl	$.L.str.73, %edi
	xorl	%eax, %eax
	callq	printf
	movl	424(%rbx), %esi
	movl	$.L.str.71, %edi
	xorl	%eax, %eax
	callq	printf
	movl	$41, %edi
	callq	putchar@PLT
	movl	$10, %edi
	callq	putchar@PLT
	movl	$.L.str.68, %edi
	movl	$.L.str.28, %esi
	xorl	%eax, %eax
	callq	printf
	movl	$40, %edi
	callq	putchar@PLT
	movl	428(%rbx), %esi
	movl	$.L.str.71, %edi
	xorl	%eax, %eax
	callq	printf
	movl	$.L.str.73, %edi
	xorl	%eax, %eax
	callq	printf
	movl	432(%rbx), %esi
	movl	$.L.str.71, %edi
	xorl	%eax, %eax
	callq	printf
	movl	$41, %edi
	callq	putchar@PLT
	movl	$10, %edi
	callq	putchar@PLT
	movl	$.L.str.68, %edi
	movl	$.L.str.29, %esi
	xorl	%eax, %eax
	callq	printf
	movl	$40, %edi
	callq	putchar@PLT
	movl	436(%rbx), %esi
	movl	$.L.str.71, %edi
	xorl	%eax, %eax
	callq	printf
	movl	$.L.str.73, %edi
	xorl	%eax, %eax
	callq	printf
	movl	440(%rbx), %esi
	movl	$.L.str.71, %edi
	xorl	%eax, %eax
	callq	printf
	movl	$.L.str.73, %edi
	xorl	%eax, %eax
	callq	printf
	movl	444(%rbx), %esi
	movl	$.L.str.71, %edi
	xorl	%eax, %eax
	callq	printf
	movl	$41, %edi
	callq	putchar@PLT
	movl	$10, %edi
	callq	putchar@PLT
	movl	$.L.str.68, %edi
	movl	$.L.str.30, %esi
	xorl	%eax, %eax
	callq	printf
	movl	$40, %edi
	callq	putchar@PLT
	movl	448(%rbx), %esi
	movl	$.L.str.71, %edi
	xorl	%eax, %eax
	callq	printf
	movl	$.L.str.73, %edi
	xorl	%eax, %eax
	callq	printf
	movl	452(%rbx), %esi
	movl	$.L.str.71, %edi
	xorl	%eax, %eax
	callq	printf
	movl	$41, %edi
	callq	putchar@PLT
	movl	$10, %edi
	callq	putchar@PLT
	movl	$.L.str.68, %edi
	movl	$.L.str.31, %esi
	xorl	%eax, %eax
	callq	printf
	movl	$40, %edi
	callq	putchar@PLT
	movl	456(%rbx), %esi
	movl	$.L.str.71, %edi
	xorl	%eax, %eax
	callq	printf
	movl	$.L.str.73, %edi
	xorl	%eax, %eax
	callq	printf
	movl	460(%rbx), %esi
	movl	$.L.str.71, %edi
	xorl	%eax, %eax
	callq	printf
	movl	$.L.str.73, %edi
	xorl	%eax, %eax
	callq	printf
	movl	464(%rbx), %esi
	movl	$.L.str.71, %edi
	xorl	%eax, %eax
	callq	printf
	movl	$41, %edi
	callq	putchar@PLT
	movl	$10, %edi
	callq	putchar@PLT
	movl	$.L.str.68, %edi
	movl	$.L.str.32, %esi
	xorl	%eax, %eax
	callq	printf
	movl	$40, %edi
	callq	putchar@PLT
	movl	468(%rbx), %esi
	movl	$.L.str.71, %edi
	xorl	%eax, %eax
	callq	printf
	movl	$.L.str.73, %edi
	xorl	%eax, %eax
	callq	printf
	movl	472(%rbx), %esi
	movl	$.L.str.71, %edi
	xorl	%eax, %eax
	callq	printf
	movl	$.L.str.73, %edi
	xorl	%eax, %eax
	callq	printf
	movl	476(%rbx), %esi
	movl	$.L.str.71, %edi
	xorl	%eax, %eax
	callq	printf
	movl	$41, %edi
	callq	putchar@PLT
	movl	$10, %edi
	callq	putchar@PLT
	movl	$.L.str.68, %edi
	movl	$.L.str.33, %esi
	xorl	%eax, %eax
	callq	printf
	movl	480(%rbx), %esi
	movl	$.L.str.71, %edi
	xorl	%eax, %eax
	callq	printf
	movl	$10, %edi
	callq	putchar@PLT
	movl	$.L.str.68, %edi
	movl	$.L.str.34, %esi
	xorl	%eax, %eax
	callq	printf
	movl	$40, %edi
	callq	putchar@PLT
	movl	484(%rbx), %esi
	movl	$.L.str.71, %edi
	xorl	%eax, %eax
	callq	printf
	movl	$.L.str.73, %edi
	xorl	%eax, %eax
	callq	printf
	movl	488(%rbx), %esi
	movl	$.L.str.71, %edi
	xorl	%eax, %eax
	callq	printf
	movl	$41, %edi
	callq	putchar@PLT
	movl	$10, %edi
	callq	putchar@PLT
	movl	$.L.str.68, %edi
	movl	$.L.str.35, %esi
	xorl	%eax, %eax
	callq	printf
	movl	$40, %edi
	callq	putchar@PLT
	movl	492(%rbx), %esi
	movl	$.L.str.71, %edi
	xorl	%eax, %eax
	callq	printf
	movl	$.L.str.73, %edi
	xorl	%eax, %eax
	callq	printf
	movl	496(%rbx), %esi
	movl	$.L.str.71, %edi
	xorl	%eax, %eax
	callq	printf
	movl	$.L.str.73, %edi
	xorl	%eax, %eax
	callq	printf
	movl	500(%rbx), %esi
	movl	$.L.str.71, %edi
	xorl	%eax, %eax
	callq	printf
	movl	$41, %edi
	callq	putchar@PLT
	movl	$10, %edi
	callq	putchar@PLT
	movl	$.L.str.68, %edi
	movl	$.L.str.36, %esi
	xorl	%eax, %eax
	callq	printf
	movl	$40, %edi
	callq	putchar@PLT
	movl	504(%rbx), %esi
	movl	$.L.str.71, %edi
	xorl	%eax, %eax
	callq	printf
	movl	$.L.str.73, %edi
	xorl	%eax, %eax
	callq	printf
	movl	508(%rbx), %esi
	movl	$.L.str.71, %edi
	xorl	%eax, %eax
	callq	printf
	movl	$41, %edi
	callq	putchar@PLT
	movl	$10, %edi
	callq	putchar@PLT
	movl	$.L.str.68, %edi
	movl	$.L.str.37, %esi
	xorl	%eax, %eax
	callq	printf
	movl	512(%rbx), %esi
	movl	$.L.str.71, %edi
	xorl	%eax, %eax
	callq	printf
	movl	$10, %edi
	callq	putchar@PLT
	movl	$.L.str.68, %edi
	movl	$.L.str.38, %esi
	xorl	%eax, %eax
	callq	printf
	movl	$40, %edi
	callq	putchar@PLT
	movl	516(%rbx), %esi
	movl	$.L.str.71, %edi
	xorl	%eax, %eax
	callq	printf
	movl	$.L.str.73, %edi
	xorl	%eax, %eax
	callq	printf
	movl	520(%rbx), %esi
	movl	$.L.str.71, %edi
	xorl	%eax, %eax
	callq	printf
	movl	$41, %edi
	callq	putchar@PLT
	movl	$10, %edi
	callq	putchar@PLT
	movl	$.L.str.68, %edi
	movl	$.L.str.39, %esi
	xorl	%eax, %eax
	callq	printf
	movl	$40, %edi
	callq	putchar@PLT
	movl	524(%rbx), %esi
	movl	$.L.str.71, %edi
	xorl	%eax, %eax
	callq	printf
	movl	$.L.str.73, %edi
	xorl	%eax, %eax
	callq	printf
	movl	528(%rbx), %esi
	movl	$.L.str.71, %edi
	xorl	%eax, %eax
	callq	printf
	movl	$.L.str.73, %edi
	xorl	%eax, %eax
	callq	printf
	movl	532(%rbx), %esi
	movl	$.L.str.71, %edi
	xorl	%eax, %eax
	callq	printf
	movl	$41, %edi
	callq	putchar@PLT
	movl	$10, %edi
	callq	putchar@PLT
	movl	$.L.str.68, %edi
	movl	$.L.str.40, %esi
	xorl	%eax, %eax
	callq	printf
	movl	$40, %edi
	callq	putchar@PLT
	movl	536(%rbx), %esi
	movl	$.L.str.71, %edi
	xorl	%eax, %eax
	callq	printf
	movl	$.L.str.73, %edi
	xorl	%eax, %eax
	callq	printf
	movl	540(%rbx), %esi
	movl	$.L.str.71, %edi
	xorl	%eax, %eax
	callq	printf
	movl	$41, %edi
	callq	putchar@PLT
	movl	$10, %edi
	callq	putchar@PLT
	movl	$.L.str.68, %edi
	movl	$.L.str.41, %esi
	xorl	%eax, %eax
	callq	printf
	movl	$40, %edi
	callq	putchar@PLT
	movl	544(%rbx), %esi
	movl	$.L.str.71, %edi
	xorl	%eax, %eax
	callq	printf
	movl	$.L.str.73, %edi
	xorl	%eax, %eax
	callq	printf
	movl	548(%rbx), %esi
	movl	$.L.str.71, %edi
	xorl	%eax, %eax
	callq	printf
	movl	$.L.str.73, %edi
	xorl	%eax, %eax
	callq	printf
	movl	552(%rbx), %esi
	movl	$.L.str.71, %edi
	xorl	%eax, %eax
	callq	printf
	movl	$41, %edi
	callq	putchar@PLT
	movl	$10, %edi
	callq	putchar@PLT
	movl	$.L.str.68, %edi
	movl	$.L.str.42, %esi
	xorl	%eax, %eax
	callq	printf
	movl	556(%rbx), %esi
	movl	$.L.str.71, %edi
	xorl	%eax, %eax
	callq	printf
	movl	$10, %edi
	callq	putchar@PLT
	movl	$.L.str.68, %edi
	movl	$.L.str.43, %esi
	xorl	%eax, %eax
	callq	printf
	movl	$40, %edi
	callq	putchar@PLT
	movl	560(%rbx), %esi
	movl	$.L.str.71, %edi
	xorl	%eax, %eax
	callq	printf
	movl	$.L.str.73, %edi
	xorl	%eax, %eax
	callq	printf
	movl	564(%rbx), %esi
	movl	$.L.str.71, %edi
	xorl	%eax, %eax
	callq	printf
	movl	$41, %edi
	callq	putchar@PLT
	movl	$10, %edi
	callq	putchar@PLT
	movl	$.L.str.68, %edi
	movl	$.L.str.44, %esi
	xorl	%eax, %eax
	callq	printf
	movq	568(%rbx), %rsi
	movl	$.L.str.70, %edi
	xorl	%eax, %eax
	callq	printf
	movl	$10, %edi
	callq	putchar@PLT
	cmpl	$0, 576(%rbx)
	movl	$.L.str.75, %r15d
	cmoveq	%r12, %r15
	movl	$.L.str.68, %edi
	movl	$.L.str.45, %esi
	xorl	%eax, %eax
	callq	printf
	movq	%r15, %rdi
	xorl	%eax, %eax
	callq	printf
	movl	$10, %edi
	callq	putchar@PLT
	cmpl	$0, 580(%rbx)
	movl	$.L.str.75, %r15d
	cmoveq	%r12, %r15
	movl	$.L.str.68, %edi
	movl	$.L.str.46, %esi
	xorl	%eax, %eax
	callq	printf
	movq	%r15, %rdi
	xorl	%eax, %eax
	callq	printf
	movl	$10, %edi
	callq	putchar@PLT
	movl	$.L.str.68, %edi
	movl	$.L.str.47, %esi
	xorl	%eax, %eax
	callq	printf
	movl	584(%rbx), %esi
	movl	$.L.str.71, %edi
	xorl	%eax, %eax
	callq	printf
	movl	$10, %edi
	callq	putchar@PLT
	movl	$.L.str.68, %edi
	movl	$.L.str.48, %esi
	xorl	%eax, %eax
	callq	printf
	movl	588(%rbx), %esi
	movl	$.L.str.71, %edi
	xorl	%eax, %eax
	callq	printf
	movl	$10, %edi
	callq	putchar@PLT
	movl	$.L.str.68, %edi
	movl	$.L.str.49, %esi
	xorl	%eax, %eax
	callq	printf
	movl	592(%rbx), %esi
	movl	$.L.str.71, %edi
	xorl	%eax, %eax
	callq	printf
	movl	$10, %edi
	callq	putchar@PLT
	cmpl	$0, 596(%rbx)
	movl	$.L.str.75, %r15d
	cmoveq	%r12, %r15
	movl	$.L.str.68, %edi
	movl	$.L.str.50, %esi
	xorl	%eax, %eax
	callq	printf
	movq	%r15, %rdi
	xorl	%eax, %eax
	callq	printf
	movl	$10, %edi
	callq	putchar@PLT
	movl	$.L.str.68, %edi
	movl	$.L.str.51, %esi
	xorl	%eax, %eax
	callq	printf
	movl	600(%rbx), %esi
	movl	$.L.str.71, %edi
	xorl	%eax, %eax
	callq	printf
	movl	$10, %edi
	callq	putchar@PLT
	cmpl	$0, 604(%rbx)
	movl	$.L.str.75, %r15d
	cmoveq	%r12, %r15
	movl	$.L.str.68, %edi
	movl	$.L.str.52, %esi
	xorl	%eax, %eax
	callq	printf
	movq	%r15, %rdi
	xorl	%eax, %eax
	callq	printf
	movl	$10, %edi
	callq	putchar@PLT
	movl	$.L.str.68, %edi
	movl	$.L.str.53, %esi
	xorl	%eax, %eax
	callq	printf
	movl	608(%rbx), %esi
	movl	$.L.str.71, %edi
	xorl	%eax, %eax
	callq	printf
	movl	$10, %edi
	callq	putchar@PLT
	movl	$.L.str.68, %edi
	movl	$.L.str.54, %esi
	xorl	%eax, %eax
	callq	printf
	movl	612(%rbx), %esi
	movl	$.L.str.71, %edi
	xorl	%eax, %eax
	callq	printf
	movl	$10, %edi
	callq	putchar@PLT
	movl	$.L.str.68, %edi
	movl	$.L.str.55, %esi
	xorl	%eax, %eax
	callq	printf
	movl	616(%rbx), %esi
	movl	$.L.str.71, %edi
	xorl	%eax, %eax
	callq	printf
	movl	$10, %edi
	callq	putchar@PLT
	movl	$.L.str.68, %edi
	movl	$.L.str.56, %esi
	xorl	%eax, %eax
	callq	printf
	movl	624(%rbx), %esi
	movl	$.L.str.71, %edi
	xorl	%eax, %eax
	callq	printf
	movl	$10, %edi
	callq	putchar@PLT
	cmpl	$0, 628(%rbx)
	movl	$.L.str.75, %r15d
	cmoveq	%r12, %r15
	movl	$.L.str.68, %edi
	movl	$.L.str.57, %esi
	xorl	%eax, %eax
	callq	printf
	movq	%r15, %rdi
	xorl	%eax, %eax
	callq	printf
	movl	$10, %edi
	callq	putchar@PLT
	cmpl	$0, 632(%rbx)
	movl	$.L.str.75, %r15d
	cmoveq	%r12, %r15
	movl	$.L.str.68, %edi
	movl	$.L.str.58, %esi
	xorl	%eax, %eax
	callq	printf
	movq	%r15, %rdi
	xorl	%eax, %eax
	callq	printf
	movl	$10, %edi
	callq	putchar@PLT
	cmpl	$0, 636(%rbx)
	movl	$.L.str.75, %r15d
	cmoveq	%r12, %r15
	movl	$.L.str.68, %edi
	movl	$.L.str.59, %esi
	xorl	%eax, %eax
	callq	printf
	movq	%r15, %rdi
	xorl	%eax, %eax
	callq	printf
	movl	$10, %edi
	callq	putchar@PLT
	movl	$.L.str.68, %edi
	movl	$.L.str.60, %esi
	xorl	%eax, %eax
	callq	printf
	movq	640(%rbx), %rsi
	movl	$.L.str.70, %edi
	xorl	%eax, %eax
	callq	printf
	movl	$10, %edi
	callq	putchar@PLT
	movl	$.L.str.68, %edi
	movl	$.L.str.61, %esi
	xorl	%eax, %eax
	callq	printf
	movl	648(%rbx), %esi
	movl	$.L.str.71, %edi
	xorl	%eax, %eax
	callq	printf
	movl	$10, %edi
	callq	putchar@PLT
	cmpl	$0, 656(%rbx)
	movl	$.L.str.75, %r15d
	cmoveq	%r12, %r15
	movl	$.L.str.68, %edi
	movl	$.L.str.62, %esi
	xorl	%eax, %eax
	callq	printf
	movq	%r15, %rdi
	xorl	%eax, %eax
	callq	printf
	movl	$10, %edi
	callq	putchar@PLT
	movl	$.L.str.68, %edi
	movl	$.L.str.63, %esi
	xorl	%eax, %eax
	callq	printf
	movl	660(%rbx), %esi
	movl	$.L.str.71, %edi
	xorl	%eax, %eax
	callq	printf
	movl	$10, %edi
	callq	putchar@PLT
	movl	$.L.str.68, %edi
	movl	$.L.str.64, %esi
	xorl	%eax, %eax
	callq	printf
	movl	668(%rbx), %esi
	movl	$.L.str.71, %edi
	xorl	%eax, %eax
	callq	printf
	movl	$10, %edi
	callq	putchar@PLT
	cmpl	$0, 672(%rbx)
	movl	$.L.str.75, %r15d
	cmoveq	%r12, %r15
	movl	$.L.str.68, %edi
	movl	$.L.str.65, %esi
	xorl	%eax, %eax
	callq	printf
	movq	%r15, %rdi
	xorl	%eax, %eax
	callq	printf
	movl	$10, %edi
	callq	putchar@PLT
	cmpl	$0, 676(%rbx)
	movl	$.L.str.75, %r15d
	cmoveq	%r12, %r15
	movl	$.L.str.68, %edi
	movl	$.L.str.66, %esi
	xorl	%eax, %eax
	callq	printf
	movq	%r15, %rdi
	xorl	%eax, %eax
	callq	printf
	movl	$10, %edi
	callq	putchar@PLT
	cmpl	$0, 652(%rbx)
	cmoveq	%r12, %r14
	movl	$.L.str.68, %edi
	movl	$.L.str.67, %esi
	xorl	%eax, %eax
	callq	printf
	movq	%r14, %rdi
	xorl	%eax, %eax
	callq	printf
	movl	$10, %edi
	callq	putchar@PLT
	addq	$1480, %rsp                     # imm = 0x5C8
	.cfi_def_cfa_offset 40
	popq	%rbx
	.cfi_def_cfa_offset 32
	popq	%r12
	.cfi_def_cfa_offset 24
	popq	%r14
	.cfi_def_cfa_offset 16
	popq	%r15
	.cfi_def_cfa_offset 8
	retq
.LBB1_2:
	.cfi_def_cfa_offset 1520
	movl	%eax, %ebx
	movq	stderr(%rip), %r14
	movl	%eax, %edi
	callq	hipGetErrorName
	movq	%rax, %r15
	movl	%ebx, %edi
	callq	hipGetErrorString
	movl	$.L.str.2, %esi
	movq	%r14, %rdi
	movq	%r15, %rdx
	movq	%rax, %rcx
	xorl	%eax, %eax
	callq	fprintf
	callq	hipDeviceReset
	xorl	%edi, %edi
	callq	exit
.Lfunc_end1:
	.size	_Z12print_devicei, .Lfunc_end1-_Z12print_devicei
	.cfi_endproc
                                        # -- End function
	.type	.L.str.1,@object                # @.str.1
	.section	.rodata.str1.1,"aMS",@progbits,1
.L.str.1:
	.asciz	"<find_cudadevices>DEVICE #%d\n"
	.size	.L.str.1, 30

	.type	.L.str.2,@object                # @.str.2
.L.str.2:
	.asciz	"<find_cudadevices>%s (%s)"
	.size	.L.str.2, 26

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

	.type	.L.str.4,@object                # @.str.4
.L.str.4:
	.asciz	"totalGlobalMem"
	.size	.L.str.4, 15

	.type	.L.str.5,@object                # @.str.5
.L.str.5:
	.asciz	"sharedMemPerBlock"
	.size	.L.str.5, 18

	.type	.L.str.6,@object                # @.str.6
.L.str.6:
	.asciz	"regsPerBlock"
	.size	.L.str.6, 13

	.type	.L.str.7,@object                # @.str.7
.L.str.7:
	.asciz	"warpSize"
	.size	.L.str.7, 9

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

	.type	.L.str.9,@object                # @.str.9
.L.str.9:
	.asciz	"maxThreadsPerBlock"
	.size	.L.str.9, 19

	.type	.L.str.10,@object               # @.str.10
.L.str.10:
	.asciz	"maxThreadsDim"
	.size	.L.str.10, 14

	.type	.L.str.11,@object               # @.str.11
.L.str.11:
	.asciz	"maxGridSize"
	.size	.L.str.11, 12

	.type	.L.str.12,@object               # @.str.12
.L.str.12:
	.asciz	"clockRate"
	.size	.L.str.12, 10

	.type	.L.str.13,@object               # @.str.13
.L.str.13:
	.asciz	"totalConstMem"
	.size	.L.str.13, 14

	.type	.L.str.14,@object               # @.str.14
.L.str.14:
	.asciz	"major"
	.size	.L.str.14, 6

	.type	.L.str.15,@object               # @.str.15
.L.str.15:
	.asciz	"minor"
	.size	.L.str.15, 6

	.type	.L.str.16,@object               # @.str.16
.L.str.16:
	.asciz	"textureAlignment"
	.size	.L.str.16, 17

	.type	.L.str.17,@object               # @.str.17
.L.str.17:
	.asciz	"texturePitchAlignment"
	.size	.L.str.17, 22

	.type	.L.str.18,@object               # @.str.18
.L.str.18:
	.asciz	"deviceOverlap"
	.size	.L.str.18, 14

	.type	.L.str.19,@object               # @.str.19
.L.str.19:
	.asciz	"multiProcessorCount"
	.size	.L.str.19, 20

	.type	.L.str.20,@object               # @.str.20
.L.str.20:
	.asciz	"kernelExecTimeoutEnabled"
	.size	.L.str.20, 25

	.type	.L.str.21,@object               # @.str.21
.L.str.21:
	.asciz	"integrated"
	.size	.L.str.21, 11

	.type	.L.str.22,@object               # @.str.22
.L.str.22:
	.asciz	"canMapHostMemory"
	.size	.L.str.22, 17

	.type	.L.str.23,@object               # @.str.23
.L.str.23:
	.asciz	"computeMode"
	.size	.L.str.23, 12

	.type	.L.str.24,@object               # @.str.24
.L.str.24:
	.asciz	"maxTexture1D"
	.size	.L.str.24, 13

	.type	.L.str.25,@object               # @.str.25
.L.str.25:
	.asciz	"maxTexture1DMipmap"
	.size	.L.str.25, 19

	.type	.L.str.26,@object               # @.str.26
.L.str.26:
	.asciz	"maxTexture1DLinear"
	.size	.L.str.26, 19

	.type	.L.str.27,@object               # @.str.27
.L.str.27:
	.asciz	"maxTexture2D"
	.size	.L.str.27, 13

	.type	.L.str.28,@object               # @.str.28
.L.str.28:
	.asciz	"maxTexture2DMipmap"
	.size	.L.str.28, 19

	.type	.L.str.29,@object               # @.str.29
.L.str.29:
	.asciz	"maxTexture2DLinear"
	.size	.L.str.29, 19

	.type	.L.str.30,@object               # @.str.30
.L.str.30:
	.asciz	"maxTexture2DGather"
	.size	.L.str.30, 19

	.type	.L.str.31,@object               # @.str.31
.L.str.31:
	.asciz	"maxTexture3D"
	.size	.L.str.31, 13

	.type	.L.str.32,@object               # @.str.32
.L.str.32:
	.asciz	"maxTexture3DAlt"
	.size	.L.str.32, 16

	.type	.L.str.33,@object               # @.str.33
.L.str.33:
	.asciz	"maxTextureCubemap"
	.size	.L.str.33, 18

	.type	.L.str.34,@object               # @.str.34
.L.str.34:
	.asciz	"maxTexture1DLayered"
	.size	.L.str.34, 20

	.type	.L.str.35,@object               # @.str.35
.L.str.35:
	.asciz	"maxTexture2DLayered"
	.size	.L.str.35, 20

	.type	.L.str.36,@object               # @.str.36
.L.str.36:
	.asciz	"maxTextureCubemapLayered"
	.size	.L.str.36, 25

	.type	.L.str.37,@object               # @.str.37
.L.str.37:
	.asciz	"maxSurface1D"
	.size	.L.str.37, 13

	.type	.L.str.38,@object               # @.str.38
.L.str.38:
	.asciz	"maxSurface2D"
	.size	.L.str.38, 13

	.type	.L.str.39,@object               # @.str.39
.L.str.39:
	.asciz	"maxSurface3D"
	.size	.L.str.39, 13

	.type	.L.str.40,@object               # @.str.40
.L.str.40:
	.asciz	"maxSurface1DLayered"
	.size	.L.str.40, 20

	.type	.L.str.41,@object               # @.str.41
.L.str.41:
	.asciz	"maxSurface2DLayered"
	.size	.L.str.41, 20

	.type	.L.str.42,@object               # @.str.42
.L.str.42:
	.asciz	"maxSurfaceCubemap"
	.size	.L.str.42, 18

	.type	.L.str.43,@object               # @.str.43
.L.str.43:
	.asciz	"maxSurfaceCubemapLayered"
	.size	.L.str.43, 25

	.type	.L.str.44,@object               # @.str.44
.L.str.44:
	.asciz	"surfaceAlignment"
	.size	.L.str.44, 17

	.type	.L.str.45,@object               # @.str.45
.L.str.45:
	.asciz	"concurrentKernels"
	.size	.L.str.45, 18

	.type	.L.str.46,@object               # @.str.46
.L.str.46:
	.asciz	"ECCEnabled"
	.size	.L.str.46, 11

	.type	.L.str.47,@object               # @.str.47
.L.str.47:
	.asciz	"pciBusID"
	.size	.L.str.47, 9

	.type	.L.str.48,@object               # @.str.48
.L.str.48:
	.asciz	"pciDeviceID"
	.size	.L.str.48, 12

	.type	.L.str.49,@object               # @.str.49
.L.str.49:
	.asciz	"pciDomainID"
	.size	.L.str.49, 12

	.type	.L.str.50,@object               # @.str.50
.L.str.50:
	.asciz	"tccDriver"
	.size	.L.str.50, 10

	.type	.L.str.51,@object               # @.str.51
.L.str.51:
	.asciz	"asyncEngineCount"
	.size	.L.str.51, 17

	.type	.L.str.52,@object               # @.str.52
.L.str.52:
	.asciz	"unifiedAddressing"
	.size	.L.str.52, 18

	.type	.L.str.53,@object               # @.str.53
.L.str.53:
	.asciz	"memoryClockRate"
	.size	.L.str.53, 16

	.type	.L.str.54,@object               # @.str.54
.L.str.54:
	.asciz	"memoryBusWidth"
	.size	.L.str.54, 15

	.type	.L.str.55,@object               # @.str.55
.L.str.55:
	.asciz	"l2CacheSize"
	.size	.L.str.55, 12

	.type	.L.str.56,@object               # @.str.56
.L.str.56:
	.asciz	"maxThreadsPerMultiProcessor"
	.size	.L.str.56, 28

	.type	.L.str.57,@object               # @.str.57
.L.str.57:
	.asciz	"streamPrioritiesSupported"
	.size	.L.str.57, 26

	.type	.L.str.58,@object               # @.str.58
.L.str.58:
	.asciz	"globalL1CacheSupported"
	.size	.L.str.58, 23

	.type	.L.str.59,@object               # @.str.59
.L.str.59:
	.asciz	"localL1CacheSupported"
	.size	.L.str.59, 22

	.type	.L.str.60,@object               # @.str.60
.L.str.60:
	.asciz	"sharedMemPerMultiprocessor"
	.size	.L.str.60, 27

	.type	.L.str.61,@object               # @.str.61
.L.str.61:
	.asciz	"regsPerMultiprocessor"
	.size	.L.str.61, 22

	.type	.L.str.62,@object               # @.str.62
.L.str.62:
	.asciz	"isMultiGpuBoard"
	.size	.L.str.62, 16

	.type	.L.str.63,@object               # @.str.63
.L.str.63:
	.asciz	"multiGpuBoardGroupID"
	.size	.L.str.63, 21

	.type	.L.str.64,@object               # @.str.64
.L.str.64:
	.asciz	"singleToDoublePrecisionPerfRatio"
	.size	.L.str.64, 33

	.type	.L.str.65,@object               # @.str.65
.L.str.65:
	.asciz	"pageableMemoryAccess"
	.size	.L.str.65, 21

	.type	.L.str.66,@object               # @.str.66
.L.str.66:
	.asciz	"concurrentManagedAccess"
	.size	.L.str.66, 24

	.type	.L.str.67,@object               # @.str.67
.L.str.67:
	.asciz	"managedMemory"
	.size	.L.str.67, 14

	.type	.L.str.68,@object               # @.str.68
.L.str.68:
	.asciz	"<find_cudadevices>    %s = "
	.size	.L.str.68, 28

	.type	.L.str.69,@object               # @.str.69
.L.str.69:
	.asciz	"\"%s\""
	.size	.L.str.69, 5

	.type	.L.str.70,@object               # @.str.70
.L.str.70:
	.asciz	"%llu"
	.size	.L.str.70, 5

	.type	.L.str.71,@object               # @.str.71
.L.str.71:
	.asciz	"%d"
	.size	.L.str.71, 3

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

	.type	.L.str.75,@object               # @.str.75
.L.str.75:
	.asciz	"true"
	.size	.L.str.75, 5

	.type	.L.str.76,@object               # @.str.76
.L.str.76:
	.asciz	"false"
	.size	.L.str.76, 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 __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
