#include <iostream>
#include <iomanip>
#include <string>
#include <stdexcept>
#include <unistd.h>
#include <cmath>
#include <cuda_runtime.h>
#include <math_constants.h>

using namespace std;

void handleCudaErrors (cudaError_t cudaResult, string msg)
{
    if (cudaResult != cudaSuccess) {
	msg += cudaGetErrorString(cudaResult);
	throw runtime_error(msg);
    }
}

void printHelpmsg ()
{
    string helpMsg = "Usage: buffoncuda [-n <NUMINT>] [-b <BLOCKNUM>] [-t <TNUM>] [-k <KERNID>] [-d <DEVID>]\n\n";
    helpMsg += "  -n <NUMINT>      Iterations per thread\n";
    helpMsg += "  -d <DEVID>       Index of the device to be used\n";
    helpMsg += "  -b <BLOCKNUM>    Number of blocks in the grid\n";
    helpMsg += "  -t <TNUM>        Threads per block\n";
    helpMsg += "  -k <KERNID>      Kernel to execute. 0 for naivest, 1 for naive, 2 for batchRNG\n";
    cout << helpMsg;
    exit(0);
}

void parseArgs (int argc, char ** argv, unsigned int *  iterationsPerThread,
		cudaDeviceProp * const deviceProp, unsigned int * numBlocks,
		unsigned int *  threadsPerBlock, unsigned int * kernel, int * device)
{
    char cmdFlag;
    int candidate = 0;
    bool dFlag = 0;
    cudaError_t result = cudaSuccess;
    
    while((cmdFlag = getopt(argc, argv, "n:b:t:k:d:h")) != -1) {
	switch (cmdFlag)
	    {
	    case 'n':
		*iterationsPerThread = atoi(optarg);
		break;
	    case 'b':
		candidate = atoi(optarg);
		if (candidate <= 0) {
		    throw runtime_error("Number of blocks must be greater than zero");
		}
		else {
		    *numBlocks = candidate;
		}
		break;
	    case 't':
		candidate = atoi(optarg);
		if (candidate <= 0) {
		    throw runtime_error("Number of threads per block must be greater than zero.");
		}
		else if ((candidate & (candidate - 1)) != 0) {
		    throw runtime_error("Number of threads per block must be a power of two(for efficient reduction).");
		}
		else {
		    *threadsPerBlock = candidate;
		}
		break;
	    case 'k':
		candidate = atoi(optarg);
		if (candidate < 0 || candidate > 2) {
		    throw runtime_error("Kernel number must be 0, 1 or 2");
		}
		else {
		    *kernel = candidate;
		}
		break;
	    case 'd':
		candidate = atoi(optarg);
		result = cudaSetDevice(candidate);
		if (result != cudaSuccess) {
		    string msg("Couldn't set requested device: ");
		    msg += cudaGetErrorString(result);
		    throw runtime_error(msg);
		}
		*device = candidate;
		dFlag = 1;
		break;
	    case 'h':
		printHelpmsg();
		break;
	    }
    }

    if(!dFlag){
	cudaSetDevice(*device);
    }
    
    cudaGetDeviceProperties(deviceProp, *device);
    
    if(*threadsPerBlock > deviceProp->maxThreadsDim[0]){
	throw runtime_error("Threads per block exceeds device maximum.");
    }
    if(*numBlocks > deviceProp->maxGridSize[0]){
	throw runtime_error("Grid size exceeds device maximum.");
    }
}

void reportResults (double estimate, unsigned int itpT,  unsigned int gridS,
		    unsigned int blockS, cudaDeviceProp *const deviceProp, float elapsedTime)
{
    double abserr = abs(estimate - CUDART_PI);
    double relerr = abserr / CUDART_PI;

    cout << "      RESULTS:          " << endl;
    cout << "========================" << endl;
    cout << "Device Name:            " << deviceProp->name << endl;
    cout << "Grid Size:              " << gridS << endl;
    cout << "Block Size:             " << blockS << endl;
    cout << "Number of threads:      " << blockS * gridS << endl;
    cout << "Iterations per thread:  " << itpT << endl;
    cout << "Total iterations:       " << static_cast<double>(itpT) * blockS * gridS << endl;
    cout << "Kernel execution time:  " << elapsedTime << "s" << endl;
    cout << "PI estimate:            " << estimate << endl;
    cout << "Abolute error:          " << abserr << endl;
    cout << "Relative error:         " << relerr << endl;
    
}

	.file	"tmpxft_0026d847_00000000-6_misc.cudafe1.cpp"
	.text
#APP
	.globl _ZSt21ios_base_library_initv

#NO_APP
	.type	_ZL26__cudaUnregisterBinaryUtilv, @function
_ZL26__cudaUnregisterBinaryUtilv:
.LFB3934:
	.cfi_startproc
	endbr64
	movq	_ZL20__cudaFatCubinHandle(%rip), %rdi
	jmp	__cudaUnregisterFatBinary@PLT
	.cfi_endproc
.LFE3934:
	.size	_ZL26__cudaUnregisterBinaryUtilv, .-_ZL26__cudaUnregisterBinaryUtilv
	.align 2
	.type	_ZNSolsEPFRSoS_E.isra.0, @function
_ZNSolsEPFRSoS_E.isra.0:
.LFB4616:
	.cfi_startproc
	jmp	*%rsi
	.cfi_endproc
.LFE4616:
	.size	_ZNSolsEPFRSoS_E.isra.0, .-_ZNSolsEPFRSoS_E.isra.0
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"basic_string::append"
	.text
	.align 2
	.type	_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEpLEPKc.isra.0, @function
_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEpLEPKc.isra.0:
.LFB4617:
	.cfi_startproc
	pushq	%rbx
	.cfi_def_cfa_offset 16
	.cfi_offset 3, -16
	movq	%rdi, %rbx
	movq	%rsi, %rdi
	subq	$16, %rsp
	.cfi_def_cfa_offset 32
	movq	%rsi, 8(%rsp)
	call	strlen@PLT
	movq	8(%rsp), %rsi
	movq	%rax, %rdx
	movabsq	$4611686018427387903, %rax
	subq	8(%rbx), %rax
	cmpq	%rdx, %rax
	jnb	.L4
	leaq	.LC0(%rip), %rdi
	call	_ZSt20__throw_length_errorPKc@PLT
.L4:
	addq	$16, %rsp
	.cfi_def_cfa_offset 16
	movq	%rbx, %rdi
	popq	%rbx
	.cfi_def_cfa_offset 8
	jmp	_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9_M_appendEPKcm@PLT
	.cfi_endproc
.LFE4617:
	.size	_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEpLEPKc.isra.0, .-_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEpLEPKc.isra.0
	.globl	_Z16handleCudaErrors9cudaErrorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE
	.type	_Z16handleCudaErrors9cudaErrorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE, @function
_Z16handleCudaErrors9cudaErrorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE:
.LFB3928:
	.cfi_startproc
	.cfi_personality 0x9b,DW.ref.__gxx_personality_v0
	.cfi_lsda 0x1b,.LLSDA3928
	endbr64
	testl	%edi, %edi
	je	.L7
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsi, %rbp
	pushq	%rbx
	.cfi_def_cfa_offset 24
	.cfi_offset 3, -24
	pushq	%rax
	.cfi_def_cfa_offset 32
.LEHB0:
	call	cudaGetErrorString@PLT
	movq	%rbp, %rdi
	movq	%rax, %rsi
	call	_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEpLEPKc.isra.0
.LEHE0:
	movl	$16, %edi
	call	__cxa_allocate_exception@PLT
	movq	%rbp, %rsi
	movq	%rax, %rdi
	movq	%rax, %rbx
.LEHB1:
	call	_ZNSt13runtime_errorC1ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE@PLT
.LEHE1:
	movq	_ZNSt13runtime_errorD1Ev@GOTPCREL(%rip), %rdx
	leaq	_ZTISt13runtime_error(%rip), %rsi
	movq	%rbx, %rdi
.LEHB2:
	call	__cxa_throw@PLT
.L10:
	endbr64
	movq	%rax, %rbp
.L9:
	movq	%rbx, %rdi
	call	__cxa_free_exception@PLT
	movq	%rbp, %rdi
	call	_Unwind_Resume@PLT
.LEHE2:
.L7:
	.cfi_def_cfa_offset 8
	.cfi_restore 3
	.cfi_restore 6
	ret
	.cfi_endproc
.LFE3928:
	.globl	__gxx_personality_v0
	.section	.gcc_except_table,"a",@progbits
.LLSDA3928:
	.byte	0xff
	.byte	0xff
	.byte	0x1
	.uleb128 .LLSDACSE3928-.LLSDACSB3928
.LLSDACSB3928:
	.uleb128 .LEHB0-.LFB3928
	.uleb128 .LEHE0-.LEHB0
	.uleb128 0
	.uleb128 0
	.uleb128 .LEHB1-.LFB3928
	.uleb128 .LEHE1-.LEHB1
	.uleb128 .L10-.LFB3928
	.uleb128 0
	.uleb128 .LEHB2-.LFB3928
	.uleb128 .LEHE2-.LEHB2
	.uleb128 0
	.uleb128 0
.LLSDACSE3928:
	.text
	.size	_Z16handleCudaErrors9cudaErrorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE, .-_Z16handleCudaErrors9cudaErrorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE
	.section	.rodata.str1.1
.LC3:
	.string	"      RESULTS:          "
.LC4:
	.string	"========================"
.LC5:
	.string	"Device Name:            "
.LC6:
	.string	"Grid Size:              "
.LC7:
	.string	"Block Size:             "
.LC8:
	.string	"Number of threads:      "
.LC9:
	.string	"Iterations per thread:  "
.LC10:
	.string	"Total iterations:       "
.LC11:
	.string	"Kernel execution time:  "
.LC12:
	.string	"s"
.LC13:
	.string	"PI estimate:            "
.LC14:
	.string	"Abolute error:          "
.LC15:
	.string	"Relative error:         "
	.text
	.globl	_Z13reportResultsdjjjP14cudaDevicePropf
	.type	_Z13reportResultsdjjjP14cudaDevicePropf, @function
_Z13reportResultsdjjjP14cudaDevicePropf:
.LFB3931:
	.cfi_startproc
	endbr64
	pushq	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	movaps	%xmm0, %xmm3
	movl	%edx, %r15d
	pushq	%r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	movaps	%xmm3, %xmm2
	movq	%rcx, %r14
	pushq	%r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	pushq	%r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	movl	%esi, %r12d
	leaq	.LC3(%rip), %rsi
	pushq	%rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	movl	%edi, %ebp
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	leaq	_ZSt4cout(%rip), %rbx
	movq	%rbx, %rdi
	subq	$40, %rsp
	.cfi_def_cfa_offset 96
	movsd	.LC1(%rip), %xmm0
	movsd	%xmm3, 16(%rsp)
	subsd	%xmm0, %xmm2
	andps	.LC2(%rip), %xmm2
	movss	%xmm1, 28(%rsp)
	movaps	%xmm2, %xmm5
	movsd	%xmm2, 8(%rsp)
	divsd	%xmm0, %xmm5
	movsd	%xmm5, (%rsp)
	call	_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc@PLT
	movq	_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_@GOTPCREL(%rip), %rsi
	movq	%rax, %rdi
	call	_ZNSolsEPFRSoS_E.isra.0
	movq	%rbx, %rdi
	leaq	.LC4(%rip), %rsi
	call	_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc@PLT
	movq	_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_@GOTPCREL(%rip), %rsi
	movq	%rax, %rdi
	call	_ZNSolsEPFRSoS_E.isra.0
	movq	%rbx, %rdi
	leaq	.LC5(%rip), %rsi
	call	_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc@PLT
	movq	%r14, %rsi
	movl	%r12d, %r14d
	movq	%rax, %rdi
	call	_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc@PLT
	movq	_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_@GOTPCREL(%rip), %rsi
	movq	%rax, %rdi
	call	_ZNSolsEPFRSoS_E.isra.0
	movq	%rbx, %rdi
	leaq	.LC6(%rip), %rsi
	call	_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc@PLT
	movq	%r14, %rsi
	movq	%rax, %rdi
	call	_ZNSo9_M_insertImEERSoT_@PLT
	movq	_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_@GOTPCREL(%rip), %rsi
	movq	%rax, %rdi
	call	_ZNSolsEPFRSoS_E.isra.0
	movq	%rbx, %rdi
	leaq	.LC7(%rip), %rsi
	call	_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc@PLT
	movq	%r15, %rsi
	movq	%rax, %rdi
	call	_ZNSo9_M_insertImEERSoT_@PLT
	movq	_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_@GOTPCREL(%rip), %rsi
	movq	%rax, %rdi
	call	_ZNSolsEPFRSoS_E.isra.0
	movq	%rbx, %rdi
	leaq	.LC8(%rip), %rsi
	call	_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc@PLT
	movl	%r12d, %esi
	imull	%r15d, %esi
	movq	%rax, %rdi
	call	_ZNSo9_M_insertImEERSoT_@PLT
	movq	_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_@GOTPCREL(%rip), %rsi
	movq	%rax, %rdi
	call	_ZNSolsEPFRSoS_E.isra.0
	movq	%rbx, %rdi
	leaq	.LC9(%rip), %rsi
	call	_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc@PLT
	movq	%rbp, %rsi
	movq	%rax, %rdi
	call	_ZNSo9_M_insertImEERSoT_@PLT
	movq	_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_@GOTPCREL(%rip), %rsi
	movq	%rax, %rdi
	call	_ZNSolsEPFRSoS_E.isra.0
	leaq	.LC10(%rip), %rsi
	movq	%rbx, %rdi
	call	_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc@PLT
	cvtsi2sdq	%r15, %xmm4
	cvtsi2sdq	%rbp, %xmm0
	movq	%rax, %rdi
	mulsd	%xmm4, %xmm0
	cvtsi2sdq	%r14, %xmm4
	mulsd	%xmm4, %xmm0
	call	_ZNSo9_M_insertIdEERSoT_@PLT
	movq	_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_@GOTPCREL(%rip), %rsi
	movq	%rax, %rdi
	call	_ZNSolsEPFRSoS_E.isra.0
	leaq	.LC11(%rip), %rsi
	movq	%rbx, %rdi
	call	_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc@PLT
	movss	28(%rsp), %xmm1
	movq	%rax, %rdi
	cvtss2sd	%xmm1, %xmm0
	call	_ZNSo9_M_insertIdEERSoT_@PLT
	leaq	.LC12(%rip), %rsi
	movq	%rax, %rdi
	call	_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc@PLT
	movq	_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_@GOTPCREL(%rip), %rsi
	movq	%rax, %rdi
	call	_ZNSolsEPFRSoS_E.isra.0
	leaq	.LC13(%rip), %rsi
	movq	%rbx, %rdi
	call	_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc@PLT
	movsd	16(%rsp), %xmm3
	movq	%rax, %rdi
	movaps	%xmm3, %xmm0
	call	_ZNSo9_M_insertIdEERSoT_@PLT
	movq	_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_@GOTPCREL(%rip), %rsi
	movq	%rax, %rdi
	call	_ZNSolsEPFRSoS_E.isra.0
	leaq	.LC14(%rip), %rsi
	movq	%rbx, %rdi
	call	_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc@PLT
	movsd	8(%rsp), %xmm2
	movq	%rax, %rdi
	movaps	%xmm2, %xmm0
	call	_ZNSo9_M_insertIdEERSoT_@PLT
	movq	_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_@GOTPCREL(%rip), %rsi
	movq	%rax, %rdi
	call	_ZNSolsEPFRSoS_E.isra.0
	leaq	.LC15(%rip), %rsi
	movq	%rbx, %rdi
	call	_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc@PLT
	movsd	(%rsp), %xmm0
	movq	%rax, %rdi
	call	_ZNSo9_M_insertIdEERSoT_@PLT
	movq	_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_@GOTPCREL(%rip), %rsi
	addq	$40, %rsp
	.cfi_def_cfa_offset 56
	popq	%rbx
	.cfi_def_cfa_offset 48
	movq	%rax, %rdi
	popq	%rbp
	.cfi_def_cfa_offset 40
	popq	%r12
	.cfi_def_cfa_offset 32
	popq	%r13
	.cfi_def_cfa_offset 24
	popq	%r14
	.cfi_def_cfa_offset 16
	popq	%r15
	.cfi_def_cfa_offset 8
	jmp	_ZNSolsEPFRSoS_E.isra.0
	.cfi_endproc
.LFE3931:
	.size	_Z13reportResultsdjjjP14cudaDevicePropf, .-_Z13reportResultsdjjjP14cudaDevicePropf
	.section	.text.startup,"ax",@progbits
	.type	_ZL24__sti____cudaRegisterAllv, @function
_ZL24__sti____cudaRegisterAllv:
.LFB3957:
	.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
.LFE3957:
	.size	_ZL24__sti____cudaRegisterAllv, .-_ZL24__sti____cudaRegisterAllv
	.section	.init_array,"aw"
	.align 8
	.quad	_ZL24__sti____cudaRegisterAllv
	.section	.rodata._ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_.str1.1,"aMS",@progbits,1
.LC16:
	.string	"basic_string: construction from null is not valid"
	.section	.text._ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_,"axG",@progbits,_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC5IS3_EEPKcRKS3_,comdat
	.align 2
	.weak	_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_
	.type	_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_, @function
_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_:
.LFB4273:
	.cfi_startproc
	endbr64
	pushq	%r12
	.cfi_def_cfa_offset 16
	.cfi_offset 12, -16
	pushq	%rbp
	.cfi_def_cfa_offset 24
	.cfi_offset 6, -24
	pushq	%rbx
	.cfi_def_cfa_offset 32
	.cfi_offset 3, -32
	subq	$16, %rsp
	.cfi_def_cfa_offset 48
	movq	%fs:40, %rax
	movq	%rax, 8(%rsp)
	xorl	%eax, %eax
	leaq	16(%rdi), %rax
	movq	%rax, (%rdi)
	testq	%rsi, %rsi
	jne	.L25
	movq	8(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L30
	leaq	.LC16(%rip), %rdi
	call	_ZSt19__throw_logic_errorPKc@PLT
.L25:
	movq	%rdi, %rbx
	movq	%rsi, %rdi
	movq	%rsi, %rbp
	call	strlen@PLT
	movq	%rax, (%rsp)
	leaq	0(%rbp,%rax), %r12
	cmpq	$15, %rax
	jbe	.L27
	movq	%rsp, %rsi
	xorl	%edx, %edx
	movq	%rbx, %rdi
	call	_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9_M_createERmm@PLT
	movq	%rax, (%rbx)
	movq	(%rsp), %rax
	movq	%rax, 16(%rbx)
.L27:
	movq	(%rbx), %rdi
	movq	%r12, %rdx
	movq	%rbp, %rsi
	call	_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE13_S_copy_charsEPcPKcS7_@PLT
	movq	(%rsp), %rax
	movq	(%rbx), %rdx
	movq	%rax, 8(%rbx)
	movb	$0, (%rdx,%rax)
	movq	8(%rsp), %rax
	subq	%fs:40, %rax
	je	.L28
.L30:
	call	__stack_chk_fail@PLT
.L28:
	addq	$16, %rsp
	.cfi_def_cfa_offset 32
	popq	%rbx
	.cfi_def_cfa_offset 24
	popq	%rbp
	.cfi_def_cfa_offset 16
	popq	%r12
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE4273:
	.size	_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_, .-_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_
	.weak	_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC1IS3_EEPKcRKS3_
	.set	_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC1IS3_EEPKcRKS3_,_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_
	.section	.rodata.str1.1
.LC17:
	.string	"Usage: buffoncuda [-n <NUMINT>] [-b <BLOCKNUM>] [-t <TNUM>] [-k <KERNID>] [-d <DEVID>]\n\n"
.LC18:
	.string	"  -n <NUMINT>      Iterations per thread\n"
.LC19:
	.string	"  -d <DEVID>       Index of the device to be used\n"
.LC20:
	.string	"  -b <BLOCKNUM>    Number of blocks in the grid\n"
.LC21:
	.string	"  -t <TNUM>        Threads per block\n"
.LC22:
	.string	"  -k <KERNID>      Kernel to execute. 0 for naivest, 1 for naive, 2 for batchRNG\n"
	.text
	.globl	_Z12printHelpmsgv
	.type	_Z12printHelpmsgv, @function
_Z12printHelpmsgv:
.LFB3929:
	.cfi_startproc
	.cfi_personality 0x9b,DW.ref.__gxx_personality_v0
	.cfi_lsda 0x1b,.LLSDA3929
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	leaq	.LC17(%rip), %rsi
	pushq	%rbx
	.cfi_def_cfa_offset 24
	.cfi_offset 3, -24
	subq	$56, %rsp
	.cfi_def_cfa_offset 80
	movq	%fs:40, %rax
	movq	%rax, 40(%rsp)
	xorl	%eax, %eax
	leaq	8(%rsp), %rbx
	leaq	7(%rsp), %rdx
	movq	%rbx, %rdi
.LEHB3:
	call	_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC1IS3_EEPKcRKS3_
.LEHE3:
	leaq	.LC18(%rip), %rsi
	movq	%rbx, %rdi
.LEHB4:
	call	_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEpLEPKc.isra.0
	leaq	.LC19(%rip), %rsi
	movq	%rbx, %rdi
	call	_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEpLEPKc.isra.0
	leaq	.LC20(%rip), %rsi
	movq	%rbx, %rdi
	call	_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEpLEPKc.isra.0
	leaq	.LC21(%rip), %rsi
	movq	%rbx, %rdi
	call	_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEpLEPKc.isra.0
	leaq	.LC22(%rip), %rsi
	movq	%rbx, %rdi
	call	_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEpLEPKc.isra.0
	movq	16(%rsp), %rdx
	movq	8(%rsp), %rsi
	leaq	_ZSt4cout(%rip), %rdi
	call	_ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l@PLT
.LEHE4:
	xorl	%edi, %edi
	call	exit@PLT
.L35:
	endbr64
	movq	%rax, %rbp
.L32:
	movq	%rbx, %rdi
	call	_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE10_M_disposeEv@PLT
	movq	40(%rsp), %rax
	subq	%fs:40, %rax
	je	.L33
	call	__stack_chk_fail@PLT
.L33:
	movq	%rbp, %rdi
.LEHB5:
	call	_Unwind_Resume@PLT
.LEHE5:
	.cfi_endproc
.LFE3929:
	.section	.gcc_except_table
.LLSDA3929:
	.byte	0xff
	.byte	0xff
	.byte	0x1
	.uleb128 .LLSDACSE3929-.LLSDACSB3929
.LLSDACSB3929:
	.uleb128 .LEHB3-.LFB3929
	.uleb128 .LEHE3-.LEHB3
	.uleb128 0
	.uleb128 0
	.uleb128 .LEHB4-.LFB3929
	.uleb128 .LEHE4-.LEHB4
	.uleb128 .L35-.LFB3929
	.uleb128 0
	.uleb128 .LEHB5-.LFB3929
	.uleb128 .LEHE5-.LEHB5
	.uleb128 0
	.uleb128 0
.LLSDACSE3929:
	.text
	.size	_Z12printHelpmsgv, .-_Z12printHelpmsgv
	.section	.rodata.str1.1
.LC23:
	.string	"Number of blocks must be greater than zero"
.LC24:
	.string	"Number of threads per block must be greater than zero."
.LC25:
	.string	"Number of threads per block must be a power of two(for efficient reduction)."
.LC26:
	.string	"Kernel number must be 0, 1 or 2"
.LC27:
	.string	"Couldn't set requested device: "
.LC28:
	.string	"n:b:t:k:d:h"
.LC29:
	.string	"Threads per block exceeds device maximum."
.LC30:
	.string	"Grid size exceeds device maximum."
	.text
	.globl	_Z9parseArgsiPPcPjP14cudaDevicePropS1_S1_S1_Pi
	.type	_Z9parseArgsiPPcPjP14cudaDevicePropS1_S1_S1_Pi, @function
_Z9parseArgsiPPcPjP14cudaDevicePropS1_S1_S1_Pi:
.LFB3930:
	.cfi_startproc
	.cfi_personality 0x9b,DW.ref.__gxx_personality_v0
	.cfi_lsda 0x1b,.LLSDA3930
	endbr64
	pushq	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	pushq	%r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	xorl	%r14d, %r14d
	pushq	%r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	pushq	%r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	movq	%r9, %r12
	pushq	%rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	movq	%r8, %rbp
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	movq	%rcx, %rbx
	subq	$88, %rsp
	.cfi_def_cfa_offset 144
	movl	%edi, 12(%rsp)
	movq	144(%rsp), %r15
	movq	%rsi, 16(%rsp)
	movq	152(%rsp), %r13
	movq	%rdx, 24(%rsp)
	movq	%fs:40, %rax
	movq	%rax, 72(%rsp)
	xorl	%eax, %eax
.L91:
	movq	16(%rsp), %rsi
	movl	12(%rsp), %edi
	leaq	.LC28(%rip), %rdx
	call	getopt@PLT
	cmpb	$-1, %al
	je	.L98
	cmpb	$110, %al
	jg	.L39
	cmpb	$97, %al
	jle	.L91
	subl	$98, %eax
	cmpb	$12, %al
	ja	.L91
	leaq	.L42(%rip), %rdx
	movzbl	%al, %eax
	movslq	(%rdx,%rax,4), %rax
	addq	%rdx, %rax
	notrack jmp	*%rax
	.section	.rodata
	.align 4
	.align 4
.L42:
	.long	.L46-.L42
	.long	.L91-.L42
	.long	.L45-.L42
	.long	.L91-.L42
	.long	.L91-.L42
	.long	.L91-.L42
	.long	.L44-.L42
	.long	.L91-.L42
	.long	.L91-.L42
	.long	.L43-.L42
	.long	.L91-.L42
	.long	.L91-.L42
	.long	.L41-.L42
	.text
.L39:
	cmpb	$116, %al
	je	.L47
	jmp	.L91
.L41:
	movq	optarg(%rip), %rdi
	call	atoi@PLT
	movq	24(%rsp), %rcx
	movl	%eax, (%rcx)
	jmp	.L91
.L46:
	movq	optarg(%rip), %rdi
	call	atoi@PLT
	testl	%eax, %eax
	jg	.L49
	movl	$16, %edi
	call	__cxa_allocate_exception@PLT
	leaq	.LC23(%rip), %rsi
	movq	%rax, %rdi
	movq	%rax, %rbx
.LEHB6:
	call	_ZNSt13runtime_errorC1EPKc@PLT
.LEHE6:
	jmp	.L96
.L49:
	movl	%eax, 0(%rbp)
	jmp	.L91
.L47:
	movq	optarg(%rip), %rdi
	call	atoi@PLT
	testl	%eax, %eax
	jg	.L51
	movl	$16, %edi
	call	__cxa_allocate_exception@PLT
	leaq	.LC24(%rip), %rsi
	movq	%rax, %rdi
	movq	%rax, %rbx
.LEHB7:
	call	_ZNSt13runtime_errorC1EPKc@PLT
.LEHE7:
	jmp	.L96
.L51:
	leal	-1(%rax), %edx
	testl	%eax, %edx
	je	.L53
	movl	$16, %edi
	call	__cxa_allocate_exception@PLT
	leaq	.LC25(%rip), %rsi
	movq	%rax, %rdi
	movq	%rax, %rbx
.LEHB8:
	call	_ZNSt13runtime_errorC1EPKc@PLT
.LEHE8:
	jmp	.L96
.L53:
	movl	%eax, (%r12)
	jmp	.L91
.L43:
	movq	optarg(%rip), %rdi
	call	atoi@PLT
	cmpl	$2, %eax
	jbe	.L55
	movl	$16, %edi
	call	__cxa_allocate_exception@PLT
	leaq	.LC26(%rip), %rsi
	movq	%rax, %rdi
	movq	%rax, %rbx
.LEHB9:
	call	_ZNSt13runtime_errorC1EPKc@PLT
.LEHE9:
	jmp	.L96
.L55:
	movl	%eax, (%r15)
	jmp	.L91
.L45:
	movq	optarg(%rip), %rdi
	call	atoi@PLT
	movl	%eax, %edi
	movl	%eax, %r14d
.LEHB10:
	call	cudaSetDevice@PLT
	testl	%eax, %eax
	je	.L57
	leaq	40(%rsp), %r12
	leaq	39(%rsp), %rdx
	movl	%eax, 12(%rsp)
	movq	%r12, %rdi
	leaq	.LC27(%rip), %rsi
	call	_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC1IS3_EEPKcRKS3_
.LEHE10:
	movl	12(%rsp), %edi
.LEHB11:
	call	cudaGetErrorString@PLT
	movq	%rax, %rsi
	movq	%r12, %rdi
	call	_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEpLEPKc.isra.0
.LEHE11:
	movl	$16, %edi
	call	__cxa_allocate_exception@PLT
	movq	%r12, %rsi
	movq	%rax, %rdi
	movq	%rax, %rbp
.LEHB12:
	call	_ZNSt13runtime_errorC1ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE@PLT
.LEHE12:
	movq	72(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L94
	movq	_ZNSt13runtime_errorD1Ev@GOTPCREL(%rip), %rdx
	leaq	_ZTISt13runtime_error(%rip), %rsi
	movq	%rbp, %rdi
.LEHB13:
	call	__cxa_throw@PLT
.LEHE13:
.L57:
	movl	%r14d, 0(%r13)
	movb	$1, %r14b
	jmp	.L91
.L44:
	movq	72(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L94
.LEHB14:
	call	_Z12printHelpmsgv
.L98:
	testb	%r14b, %r14b
	jne	.L62
	movl	0(%r13), %edi
	call	cudaSetDevice@PLT
.L62:
	movl	0(%r13), %esi
	movq	%rbx, %rdi
	call	cudaGetDeviceProperties_v2@PLT
.LEHE14:
	movl	(%r12), %eax
	cmpl	%eax, 324(%rbx)
	jnb	.L63
	movl	$16, %edi
	call	__cxa_allocate_exception@PLT
	leaq	.LC29(%rip), %rsi
	movq	%rax, %rdi
	movq	%rax, %rbx
.LEHB15:
	call	_ZNSt13runtime_errorC1EPKc@PLT
.LEHE15:
	jmp	.L96
.L63:
	movl	0(%rbp), %eax
	cmpl	%eax, 336(%rbx)
	jnb	.L37
	movl	$16, %edi
	call	__cxa_allocate_exception@PLT
	leaq	.LC30(%rip), %rsi
	movq	%rax, %rdi
	movq	%rax, %rbx
.LEHB16:
	call	_ZNSt13runtime_errorC1EPKc@PLT
.LEHE16:
.L96:
	movq	72(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L94
	movq	_ZNSt13runtime_errorD1Ev@GOTPCREL(%rip), %rdx
	leaq	_ZTISt13runtime_error(%rip), %rsi
	movq	%rbx, %rdi
.LEHB17:
	call	__cxa_throw@PLT
.L83:
	endbr64
	jmp	.L97
.L84:
	endbr64
	jmp	.L97
.L85:
	endbr64
	jmp	.L97
.L86:
	endbr64
	jmp	.L97
.L88:
	endbr64
	movq	%rax, %rbx
.L75:
	movq	%rbp, %rdi
	call	__cxa_free_exception@PLT
	jmp	.L76
.L87:
	endbr64
	movq	%rax, %rbx
.L76:
	movq	%r12, %rdi
	call	_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE10_M_disposeEv@PLT
	movq	%rbx, %rdi
	movq	72(%rsp), %rax
	subq	%fs:40, %rax
	je	.L95
	jmp	.L94
.L89:
	endbr64
	jmp	.L97
.L90:
	endbr64
.L97:
	movq	%rax, %rbp
.L80:
	movq	%rbx, %rdi
	call	__cxa_free_exception@PLT
	movq	%rbp, %rdi
	movq	72(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L94
.L95:
	call	_Unwind_Resume@PLT
.LEHE17:
.L37:
	movq	72(%rsp), %rax
	subq	%fs:40, %rax
	je	.L82
.L94:
	call	__stack_chk_fail@PLT
.L82:
	addq	$88, %rsp
	.cfi_def_cfa_offset 56
	popq	%rbx
	.cfi_def_cfa_offset 48
	popq	%rbp
	.cfi_def_cfa_offset 40
	popq	%r12
	.cfi_def_cfa_offset 32
	popq	%r13
	.cfi_def_cfa_offset 24
	popq	%r14
	.cfi_def_cfa_offset 16
	popq	%r15
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE3930:
	.section	.gcc_except_table
.LLSDA3930:
	.byte	0xff
	.byte	0xff
	.byte	0x1
	.uleb128 .LLSDACSE3930-.LLSDACSB3930
.LLSDACSB3930:
	.uleb128 .LEHB6-.LFB3930
	.uleb128 .LEHE6-.LEHB6
	.uleb128 .L83-.LFB3930
	.uleb128 0
	.uleb128 .LEHB7-.LFB3930
	.uleb128 .LEHE7-.LEHB7
	.uleb128 .L84-.LFB3930
	.uleb128 0
	.uleb128 .LEHB8-.LFB3930
	.uleb128 .LEHE8-.LEHB8
	.uleb128 .L85-.LFB3930
	.uleb128 0
	.uleb128 .LEHB9-.LFB3930
	.uleb128 .LEHE9-.LEHB9
	.uleb128 .L86-.LFB3930
	.uleb128 0
	.uleb128 .LEHB10-.LFB3930
	.uleb128 .LEHE10-.LEHB10
	.uleb128 0
	.uleb128 0
	.uleb128 .LEHB11-.LFB3930
	.uleb128 .LEHE11-.LEHB11
	.uleb128 .L87-.LFB3930
	.uleb128 0
	.uleb128 .LEHB12-.LFB3930
	.uleb128 .LEHE12-.LEHB12
	.uleb128 .L88-.LFB3930
	.uleb128 0
	.uleb128 .LEHB13-.LFB3930
	.uleb128 .LEHE13-.LEHB13
	.uleb128 .L87-.LFB3930
	.uleb128 0
	.uleb128 .LEHB14-.LFB3930
	.uleb128 .LEHE14-.LEHB14
	.uleb128 0
	.uleb128 0
	.uleb128 .LEHB15-.LFB3930
	.uleb128 .LEHE15-.LEHB15
	.uleb128 .L89-.LFB3930
	.uleb128 0
	.uleb128 .LEHB16-.LFB3930
	.uleb128 .LEHE16-.LEHB16
	.uleb128 .L90-.LFB3930
	.uleb128 0
	.uleb128 .LEHB17-.LFB3930
	.uleb128 .LEHE17-.LEHB17
	.uleb128 0
	.uleb128 0
.LLSDACSE3930:
	.text
	.size	_Z9parseArgsiPPcPjP14cudaDevicePropS1_S1_S1_Pi, .-_Z9parseArgsiPPcPjP14cudaDevicePropS1_S1_S1_Pi
	.section	.nvFatBinSegment,"aw"
	.align 8
	.type	_ZL15__fatDeviceText, @object
	.size	_ZL15__fatDeviceText, 24
_ZL15__fatDeviceText:
	.long	1180844977
	.long	1
	.quad	fatbinData
	.quad	0
	.local	_ZL20__cudaFatCubinHandle
	.comm	_ZL20__cudaFatCubinHandle,8,8
	.section	.rodata.cst8,"aM",@progbits,8
	.align 8
.LC1:
	.long	1413754136
	.long	1074340347
	.section	.rodata.cst16,"aM",@progbits,16
	.align 16
.LC2:
	.long	-1
	.long	2147483647
	.long	0
	.long	0
	.hidden	DW.ref.__gxx_personality_v0
	.weak	DW.ref.__gxx_personality_v0
	.section	.data.rel.local.DW.ref.__gxx_personality_v0,"awG",@progbits,DW.ref.__gxx_personality_v0,comdat
	.align 8
	.type	DW.ref.__gxx_personality_v0, @object
	.size	DW.ref.__gxx_personality_v0, 8
DW.ref.__gxx_personality_v0:
	.quad	__gxx_personality_v0
	.ident	"GCC: (Ubuntu 13.3.0-6ubuntu2~24.04) 13.3.0"
	.section	.note.GNU-stack,"",@progbits
	.section	.note.gnu.property,"a"
	.align 8
	.long	1f - 0f
	.long	4f - 1f
	.long	5
0:
	.string	"GNU"
1:
	.align 8
	.long	0xc0000002
	.long	3f - 2f
2:
	.long	0x3
3:
	.align 8
4:

#include <iostream>
#include <iomanip>
#include <string>
#include <stdexcept>
#include <unistd.h>
#include <cmath>
#include <hip/hip_runtime.h>
#include <hip/hip_math_constants.h>

using namespace std;

void handleCudaErrors (hipError_t cudaResult, string msg)
{
    if (cudaResult != hipSuccess) {
	msg += hipGetErrorString(cudaResult);
	throw runtime_error(msg);
    }
}

void printHelpmsg ()
{
    string helpMsg = "Usage: buffoncuda [-n <NUMINT>] [-b <BLOCKNUM>] [-t <TNUM>] [-k <KERNID>] [-d <DEVID>]\n\n";
    helpMsg += "  -n <NUMINT>      Iterations per thread\n";
    helpMsg += "  -d <DEVID>       Index of the device to be used\n";
    helpMsg += "  -b <BLOCKNUM>    Number of blocks in the grid\n";
    helpMsg += "  -t <TNUM>        Threads per block\n";
    helpMsg += "  -k <KERNID>      Kernel to execute. 0 for naivest, 1 for naive, 2 for batchRNG\n";
    cout << helpMsg;
    exit(0);
}

void parseArgs (int argc, char ** argv, unsigned int *  iterationsPerThread,
		hipDeviceProp_t * const deviceProp, unsigned int * numBlocks,
		unsigned int *  threadsPerBlock, unsigned int * kernel, int * device)
{
    char cmdFlag;
    int candidate = 0;
    bool dFlag = 0;
    hipError_t result = hipSuccess;
    
    while((cmdFlag = getopt(argc, argv, "n:b:t:k:d:h")) != -1) {
	switch (cmdFlag)
	    {
	    case 'n':
		*iterationsPerThread = atoi(optarg);
		break;
	    case 'b':
		candidate = atoi(optarg);
		if (candidate <= 0) {
		    throw runtime_error("Number of blocks must be greater than zero");
		}
		else {
		    *numBlocks = candidate;
		}
		break;
	    case 't':
		candidate = atoi(optarg);
		if (candidate <= 0) {
		    throw runtime_error("Number of threads per block must be greater than zero.");
		}
		else if ((candidate & (candidate - 1)) != 0) {
		    throw runtime_error("Number of threads per block must be a power of two(for efficient reduction).");
		}
		else {
		    *threadsPerBlock = candidate;
		}
		break;
	    case 'k':
		candidate = atoi(optarg);
		if (candidate < 0 || candidate > 2) {
		    throw runtime_error("Kernel number must be 0, 1 or 2");
		}
		else {
		    *kernel = candidate;
		}
		break;
	    case 'd':
		candidate = atoi(optarg);
		result = hipSetDevice(candidate);
		if (result != hipSuccess) {
		    string msg("Couldn't set requested device: ");
		    msg += hipGetErrorString(result);
		    throw runtime_error(msg);
		}
		*device = candidate;
		dFlag = 1;
		break;
	    case 'h':
		printHelpmsg();
		break;
	    }
    }

    if(!dFlag){
	hipSetDevice(*device);
    }
    
    hipGetDeviceProperties(deviceProp, *device);
    
    if(*threadsPerBlock > deviceProp->maxThreadsDim[0]){
	throw runtime_error("Threads per block exceeds device maximum.");
    }
    if(*numBlocks > deviceProp->maxGridSize[0]){
	throw runtime_error("Grid size exceeds device maximum.");
    }
}

void reportResults (double estimate, unsigned int itpT,  unsigned int gridS,
		    unsigned int blockS, hipDeviceProp_t *const deviceProp, float elapsedTime)
{
    double abserr = abs(estimate - HIP_PI);
    double relerr = abserr / HIP_PI;

    cout << "      RESULTS:          " << endl;
    cout << "========================" << endl;
    cout << "Device Name:            " << deviceProp->name << endl;
    cout << "Grid Size:              " << gridS << endl;
    cout << "Block Size:             " << blockS << endl;
    cout << "Number of threads:      " << blockS * gridS << endl;
    cout << "Iterations per thread:  " << itpT << endl;
    cout << "Total iterations:       " << static_cast<double>(itpT) * blockS * gridS << endl;
    cout << "Kernel execution time:  " << elapsedTime << "s" << endl;
    cout << "PI estimate:            " << estimate << endl;
    cout << "Abolute error:          " << abserr << endl;
    cout << "Relative error:         " << relerr << endl;
    
}

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

                                        # End of file scope inline assembly
	.globl	_Z16handleCudaErrors10hipError_tNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE # -- Begin function _Z16handleCudaErrors10hipError_tNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE
	.type	_Z16handleCudaErrors10hipError_tNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE,@function
_Z16handleCudaErrors10hipError_tNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE: # @_Z16handleCudaErrors10hipError_tNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE
.Lfunc_begin0:
	.cfi_startproc
	.cfi_personality 3, __gxx_personality_v0
	.cfi_lsda 3, .Lexception0
# %bb.0:
	pushq	%r14
	.cfi_def_cfa_offset 16
	pushq	%rbx
	.cfi_def_cfa_offset 24
	pushq	%rax
	.cfi_def_cfa_offset 32
	.cfi_offset %rbx, -24
	.cfi_offset %r14, -16
	testl	%edi, %edi
	jne	.LBB0_1
# %bb.4:
	addq	$8, %rsp
	.cfi_def_cfa_offset 24
	popq	%rbx
	.cfi_def_cfa_offset 16
	popq	%r14
	.cfi_def_cfa_offset 8
	retq
.LBB0_1:
	.cfi_def_cfa_offset 32
	movq	%rsi, %rbx
	callq	hipGetErrorString
	movq	%rbx, %rdi
	movq	%rax, %rsi
	callq	_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6appendEPKc
	movl	$16, %edi
	callq	__cxa_allocate_exception
	movq	%rax, %r14
.Ltmp0:
	movq	%rax, %rdi
	movq	%rbx, %rsi
	callq	_ZNSt13runtime_errorC1ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE
.Ltmp1:
# %bb.2:
	movl	$_ZTISt13runtime_error, %esi
	movl	$_ZNSt13runtime_errorD1Ev, %edx
	movq	%r14, %rdi
	callq	__cxa_throw
.LBB0_3:
.Ltmp2:
	movq	%rax, %rbx
	movq	%r14, %rdi
	callq	__cxa_free_exception
	movq	%rbx, %rdi
	callq	_Unwind_Resume@PLT
.Lfunc_end0:
	.size	_Z16handleCudaErrors10hipError_tNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE, .Lfunc_end0-_Z16handleCudaErrors10hipError_tNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE
	.cfi_endproc
	.section	.gcc_except_table,"a",@progbits
	.p2align	2, 0x0
GCC_except_table0:
.Lexception0:
	.byte	255                             # @LPStart Encoding = omit
	.byte	255                             # @TType Encoding = omit
	.byte	1                               # Call site Encoding = uleb128
	.uleb128 .Lcst_end0-.Lcst_begin0
.Lcst_begin0:
	.uleb128 .Lfunc_begin0-.Lfunc_begin0    # >> Call Site 1 <<
	.uleb128 .Ltmp0-.Lfunc_begin0           #   Call between .Lfunc_begin0 and .Ltmp0
	.byte	0                               #     has no landing pad
	.byte	0                               #   On action: cleanup
	.uleb128 .Ltmp0-.Lfunc_begin0           # >> Call Site 2 <<
	.uleb128 .Ltmp1-.Ltmp0                  #   Call between .Ltmp0 and .Ltmp1
	.uleb128 .Ltmp2-.Lfunc_begin0           #     jumps to .Ltmp2
	.byte	0                               #   On action: cleanup
	.uleb128 .Ltmp1-.Lfunc_begin0           # >> Call Site 3 <<
	.uleb128 .Lfunc_end0-.Ltmp1             #   Call between .Ltmp1 and .Lfunc_end0
	.byte	0                               #     has no landing pad
	.byte	0                               #   On action: cleanup
.Lcst_end0:
	.p2align	2, 0x0
                                        # -- End function
	.text
	.globl	_Z12printHelpmsgv               # -- Begin function _Z12printHelpmsgv
	.type	_Z12printHelpmsgv,@function
_Z12printHelpmsgv:                      # @_Z12printHelpmsgv
.Lfunc_begin1:
	.cfi_startproc
	.cfi_personality 3, __gxx_personality_v0
	.cfi_lsda 3, .Lexception1
# %bb.0:                                # %_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_.exit
	pushq	%r14
	.cfi_def_cfa_offset 16
	pushq	%rbx
	.cfi_def_cfa_offset 24
	subq	$40, %rsp
	.cfi_def_cfa_offset 64
	.cfi_offset %rbx, -24
	.cfi_offset %r14, -16
	leaq	24(%rsp), %r14
	movq	%r14, -16(%r14)
	leaq	8(%rsp), %rbx
	movl	$.L.str, %esi
	movl	$.L.str+88, %edx
	movq	%rbx, %rdi
	callq	_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPKcEEvT_S8_St20forward_iterator_tag
.Ltmp3:
	movl	$.L.str.1, %esi
	movq	%rbx, %rdi
	callq	_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6appendEPKc
.Ltmp4:
# %bb.1:                                # %_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEpLEPKc.exit
.Ltmp5:
	leaq	8(%rsp), %rdi
	movl	$.L.str.2, %esi
	callq	_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6appendEPKc
.Ltmp6:
# %bb.2:                                # %_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEpLEPKc.exit3
.Ltmp7:
	leaq	8(%rsp), %rdi
	movl	$.L.str.3, %esi
	callq	_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6appendEPKc
.Ltmp8:
# %bb.3:                                # %_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEpLEPKc.exit4
.Ltmp9:
	leaq	8(%rsp), %rdi
	movl	$.L.str.4, %esi
	callq	_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6appendEPKc
.Ltmp10:
# %bb.4:                                # %_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEpLEPKc.exit5
.Ltmp11:
	leaq	8(%rsp), %rdi
	movl	$.L.str.5, %esi
	callq	_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6appendEPKc
.Ltmp12:
# %bb.5:                                # %_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEpLEPKc.exit6
.Ltmp13:
	leaq	8(%rsp), %rsi
	movl	$_ZSt4cout, %edi
	callq	_ZStlsIcSt11char_traitsIcESaIcEERSt13basic_ostreamIT_T0_ES7_RKNSt7__cxx1112basic_stringIS4_S5_T1_EE
.Ltmp14:
# %bb.6:
	xorl	%edi, %edi
	callq	exit
.LBB1_7:
.Ltmp15:
	movq	%rax, %rbx
	movq	8(%rsp), %rdi
	cmpq	%r14, %rdi
	je	.LBB1_9
# %bb.8:                                # %_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE11_M_is_localEv.exit.i.i
	callq	_ZdlPv
.LBB1_9:                                # %_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev.exit
	movq	%rbx, %rdi
	callq	_Unwind_Resume@PLT
.Lfunc_end1:
	.size	_Z12printHelpmsgv, .Lfunc_end1-_Z12printHelpmsgv
	.cfi_endproc
	.section	.gcc_except_table,"a",@progbits
	.p2align	2, 0x0
GCC_except_table1:
.Lexception1:
	.byte	255                             # @LPStart Encoding = omit
	.byte	255                             # @TType Encoding = omit
	.byte	1                               # Call site Encoding = uleb128
	.uleb128 .Lcst_end1-.Lcst_begin1
.Lcst_begin1:
	.uleb128 .Lfunc_begin1-.Lfunc_begin1    # >> Call Site 1 <<
	.uleb128 .Ltmp3-.Lfunc_begin1           #   Call between .Lfunc_begin1 and .Ltmp3
	.byte	0                               #     has no landing pad
	.byte	0                               #   On action: cleanup
	.uleb128 .Ltmp3-.Lfunc_begin1           # >> Call Site 2 <<
	.uleb128 .Ltmp14-.Ltmp3                 #   Call between .Ltmp3 and .Ltmp14
	.uleb128 .Ltmp15-.Lfunc_begin1          #     jumps to .Ltmp15
	.byte	0                               #   On action: cleanup
	.uleb128 .Ltmp14-.Lfunc_begin1          # >> Call Site 3 <<
	.uleb128 .Lfunc_end1-.Ltmp14            #   Call between .Ltmp14 and .Lfunc_end1
	.byte	0                               #     has no landing pad
	.byte	0                               #   On action: cleanup
.Lcst_end1:
	.p2align	2, 0x0
                                        # -- End function
	.text
	.globl	_Z9parseArgsiPPcPjP20hipDeviceProp_tR0600S1_S1_S1_Pi # -- Begin function _Z9parseArgsiPPcPjP20hipDeviceProp_tR0600S1_S1_S1_Pi
	.type	_Z9parseArgsiPPcPjP20hipDeviceProp_tR0600S1_S1_S1_Pi,@function
_Z9parseArgsiPPcPjP20hipDeviceProp_tR0600S1_S1_S1_Pi: # @_Z9parseArgsiPPcPjP20hipDeviceProp_tR0600S1_S1_S1_Pi
.Lfunc_begin2:
	.cfi_startproc
	.cfi_personality 3, __gxx_personality_v0
	.cfi_lsda 3, .Lexception2
# %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	$56, %rsp
	.cfi_def_cfa_offset 112
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	.cfi_offset %rbp, -16
	movq	%r9, (%rsp)                     # 8-byte Spill
	movq	%r8, %r14
	movq	%rcx, %rbx
	movq	%rdx, 16(%rsp)                  # 8-byte Spill
	movq	%rsi, %r13
	movl	%edi, %ebp
	movq	120(%rsp), %r12
	movl	$.L.str.6, %edx
	callq	getopt
                                        # kill: def $eax killed $eax def $rax
	shll	$24, %eax
	cmpl	$-16777216, %eax                # imm = 0xFF000000
	je	.LBB2_19
# %bb.1:                                # %.lr.ph.preheader
	movq	%rbx, 8(%rsp)                   # 8-byte Spill
	xorl	%ebx, %ebx
.LBB2_2:                                # %.lr.ph
                                        # =>This Inner Loop Header: Depth=1
	sarl	$24, %eax
	leal	-98(%rax), %ecx
	cmpl	$9, %ecx
	ja	.LBB2_6
# %bb.3:                                # %.lr.ph
                                        #   in Loop: Header=BB2_2 Depth=1
	jmpq	*.LJTI2_0(,%rcx,8)
.LBB2_4:                                #   in Loop: Header=BB2_2 Depth=1
	movq	optarg(%rip), %rdi
	callq	atoi
	testl	%eax, %eax
	jle	.LBB2_30
# %bb.5:                                #   in Loop: Header=BB2_2 Depth=1
	movl	%eax, (%r14)
	jmp	.LBB2_17
.LBB2_6:                                # %.lr.ph
                                        #   in Loop: Header=BB2_2 Depth=1
	cmpl	$116, %eax
	je	.LBB2_14
# %bb.7:                                # %.lr.ph
                                        #   in Loop: Header=BB2_2 Depth=1
	cmpl	$110, %eax
	jne	.LBB2_17
# %bb.8:                                #   in Loop: Header=BB2_2 Depth=1
	movq	optarg(%rip), %rdi
	callq	atoi
	movq	16(%rsp), %rcx                  # 8-byte Reload
	jmp	.LBB2_13
.LBB2_9:                                #   in Loop: Header=BB2_2 Depth=1
	movq	optarg(%rip), %rdi
	callq	atoi
	movl	%eax, %ebx
	movl	%eax, %edi
	callq	hipSetDevice
	testl	%eax, %eax
	jne	.LBB2_24
# %bb.10:                               #   in Loop: Header=BB2_2 Depth=1
	movl	%ebx, (%r12)
	movb	$1, %bl
	jmp	.LBB2_17
.LBB2_11:                               #   in Loop: Header=BB2_2 Depth=1
	movq	optarg(%rip), %rdi
	callq	atoi
	cmpl	$3, %eax
	jae	.LBB2_23
# %bb.12:                               #   in Loop: Header=BB2_2 Depth=1
	movq	112(%rsp), %rcx
.LBB2_13:                               #   in Loop: Header=BB2_2 Depth=1
	movl	%eax, (%rcx)
	jmp	.LBB2_17
.LBB2_14:                               #   in Loop: Header=BB2_2 Depth=1
	movq	optarg(%rip), %rdi
	callq	atoi
                                        # kill: def $eax killed $eax def $rax
	testl	%eax, %eax
	jle	.LBB2_33
# %bb.15:                               #   in Loop: Header=BB2_2 Depth=1
	leal	-1(%rax), %ecx
	testl	%ecx, %eax
	jne	.LBB2_32
# %bb.16:                               #   in Loop: Header=BB2_2 Depth=1
	movq	(%rsp), %rcx                    # 8-byte Reload
	movl	%eax, (%rcx)
.LBB2_17:                               #   in Loop: Header=BB2_2 Depth=1
	movl	$.L.str.6, %edx
	movl	%ebp, %edi
	movq	%r13, %rsi
	callq	getopt
                                        # kill: def $eax killed $eax def $rax
	shll	$24, %eax
	cmpl	$-16777216, %eax                # imm = 0xFF000000
	jne	.LBB2_2
# %bb.18:                               # %._crit_edge
	testb	$1, %bl
	movq	8(%rsp), %rbx                   # 8-byte Reload
	jne	.LBB2_20
.LBB2_19:                               # %._crit_edge.thread
	movl	(%r12), %edi
	callq	hipSetDevice
.LBB2_20:
	movl	(%r12), %esi
	movq	%rbx, %rdi
	callq	hipGetDevicePropertiesR0600
	movq	(%rsp), %rax                    # 8-byte Reload
	movl	(%rax), %eax
	cmpl	324(%rbx), %eax
	ja	.LBB2_34
# %bb.21:
	movl	(%r14), %eax
	cmpl	336(%rbx), %eax
	ja	.LBB2_35
# %bb.22:
	addq	$56, %rsp
	.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
.LBB2_23:
	.cfi_def_cfa_offset 112
	movl	$16, %edi
	callq	__cxa_allocate_exception
	movq	%rax, %r14
.Ltmp29:
	movl	$.L.str.10, %esi
	movq	%rax, %rdi
	callq	_ZNSt13runtime_errorC1EPKc
.Ltmp30:
	jmp	.LBB2_36
.LBB2_24:
	movl	%eax, %r15d
	leaq	40(%rsp), %r12
	movq	%r12, -16(%r12)
.Ltmp16:
	leaq	24(%rsp), %rdi
	movl	$.L.str.11, %esi
	movl	$.L.str.11+31, %edx
	callq	_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPKcEEvT_S8_St20forward_iterator_tag
.Ltmp17:
# %bb.25:                               # %_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_.exit
.Ltmp19:
	movl	%r15d, %edi
	callq	hipGetErrorString
.Ltmp20:
# %bb.26:
.Ltmp21:
	leaq	24(%rsp), %rdi
	movq	%rax, %rsi
	callq	_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6appendEPKc
.Ltmp22:
# %bb.27:                               # %_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEpLEPKc.exit
	movl	$16, %edi
	callq	__cxa_allocate_exception
	movq	%rax, %r14
.Ltmp23:
	leaq	24(%rsp), %rsi
	movq	%rax, %rdi
	callq	_ZNSt13runtime_errorC1ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE
.Ltmp24:
# %bb.28:
.Ltmp26:
	movl	$_ZTISt13runtime_error, %esi
	movl	$_ZNSt13runtime_errorD1Ev, %edx
	movq	%r14, %rdi
	callq	__cxa_throw
.Ltmp27:
# %bb.29:
.LBB2_30:
	movl	$16, %edi
	callq	__cxa_allocate_exception
	movq	%rax, %r14
.Ltmp38:
	movl	$.L.str.7, %esi
	movq	%rax, %rdi
	callq	_ZNSt13runtime_errorC1EPKc
.Ltmp39:
	jmp	.LBB2_36
.LBB2_31:
	callq	_Z12printHelpmsgv
.LBB2_32:
	movl	$16, %edi
	callq	__cxa_allocate_exception
	movq	%rax, %r14
.Ltmp32:
	movl	$.L.str.9, %esi
	movq	%rax, %rdi
	callq	_ZNSt13runtime_errorC1EPKc
.Ltmp33:
	jmp	.LBB2_36
.LBB2_33:
	movl	$16, %edi
	callq	__cxa_allocate_exception
	movq	%rax, %r14
.Ltmp35:
	movl	$.L.str.8, %esi
	movq	%rax, %rdi
	callq	_ZNSt13runtime_errorC1EPKc
.Ltmp36:
	jmp	.LBB2_36
.LBB2_34:
	movl	$16, %edi
	callq	__cxa_allocate_exception
	movq	%rax, %r14
.Ltmp44:
	movl	$.L.str.12, %esi
	movq	%rax, %rdi
	callq	_ZNSt13runtime_errorC1EPKc
.Ltmp45:
	jmp	.LBB2_36
.LBB2_35:
	movl	$16, %edi
	callq	__cxa_allocate_exception
	movq	%rax, %r14
.Ltmp41:
	movl	$.L.str.13, %esi
	movq	%rax, %rdi
	callq	_ZNSt13runtime_errorC1EPKc
.Ltmp42:
.LBB2_36:
	movl	$_ZTISt13runtime_error, %esi
	movl	$_ZNSt13runtime_errorD1Ev, %edx
	movq	%r14, %rdi
	callq	__cxa_throw
.LBB2_37:
.Ltmp25:
	movq	%rax, %rbx
	movq	%r14, %rdi
	callq	__cxa_free_exception
	jmp	.LBB2_43
.LBB2_38:
.Ltmp43:
	jmp	.LBB2_48
.LBB2_39:
.Ltmp46:
	jmp	.LBB2_48
.LBB2_40:
.Ltmp37:
	jmp	.LBB2_48
.LBB2_41:
.Ltmp34:
	jmp	.LBB2_48
.LBB2_42:
.Ltmp28:
	movq	%rax, %rbx
.LBB2_43:
	movq	24(%rsp), %rdi
	cmpq	%r12, %rdi
	je	.LBB2_49
# %bb.44:                               # %_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE11_M_is_localEv.exit.i.i
	callq	_ZdlPv
	jmp	.LBB2_49
.LBB2_45:
.Ltmp40:
	jmp	.LBB2_48
.LBB2_46:
.Ltmp18:
	movq	%rax, %rbx
	jmp	.LBB2_49
.LBB2_47:
.Ltmp31:
.LBB2_48:
	movq	%rax, %rbx
	movq	%r14, %rdi
	callq	__cxa_free_exception
.LBB2_49:
	movq	%rbx, %rdi
	callq	_Unwind_Resume@PLT
.Lfunc_end2:
	.size	_Z9parseArgsiPPcPjP20hipDeviceProp_tR0600S1_S1_S1_Pi, .Lfunc_end2-_Z9parseArgsiPPcPjP20hipDeviceProp_tR0600S1_S1_S1_Pi
	.cfi_endproc
	.section	.rodata,"a",@progbits
	.p2align	3, 0x0
.LJTI2_0:
	.quad	.LBB2_4
	.quad	.LBB2_17
	.quad	.LBB2_9
	.quad	.LBB2_17
	.quad	.LBB2_17
	.quad	.LBB2_17
	.quad	.LBB2_31
	.quad	.LBB2_17
	.quad	.LBB2_17
	.quad	.LBB2_11
	.section	.gcc_except_table,"a",@progbits
	.p2align	2, 0x0
GCC_except_table2:
.Lexception2:
	.byte	255                             # @LPStart Encoding = omit
	.byte	255                             # @TType Encoding = omit
	.byte	1                               # Call site Encoding = uleb128
	.uleb128 .Lcst_end2-.Lcst_begin2
.Lcst_begin2:
	.uleb128 .Lfunc_begin2-.Lfunc_begin2    # >> Call Site 1 <<
	.uleb128 .Ltmp29-.Lfunc_begin2          #   Call between .Lfunc_begin2 and .Ltmp29
	.byte	0                               #     has no landing pad
	.byte	0                               #   On action: cleanup
	.uleb128 .Ltmp29-.Lfunc_begin2          # >> Call Site 2 <<
	.uleb128 .Ltmp30-.Ltmp29                #   Call between .Ltmp29 and .Ltmp30
	.uleb128 .Ltmp31-.Lfunc_begin2          #     jumps to .Ltmp31
	.byte	0                               #   On action: cleanup
	.uleb128 .Ltmp16-.Lfunc_begin2          # >> Call Site 3 <<
	.uleb128 .Ltmp17-.Ltmp16                #   Call between .Ltmp16 and .Ltmp17
	.uleb128 .Ltmp18-.Lfunc_begin2          #     jumps to .Ltmp18
	.byte	0                               #   On action: cleanup
	.uleb128 .Ltmp19-.Lfunc_begin2          # >> Call Site 4 <<
	.uleb128 .Ltmp22-.Ltmp19                #   Call between .Ltmp19 and .Ltmp22
	.uleb128 .Ltmp28-.Lfunc_begin2          #     jumps to .Ltmp28
	.byte	0                               #   On action: cleanup
	.uleb128 .Ltmp22-.Lfunc_begin2          # >> Call Site 5 <<
	.uleb128 .Ltmp23-.Ltmp22                #   Call between .Ltmp22 and .Ltmp23
	.byte	0                               #     has no landing pad
	.byte	0                               #   On action: cleanup
	.uleb128 .Ltmp23-.Lfunc_begin2          # >> Call Site 6 <<
	.uleb128 .Ltmp24-.Ltmp23                #   Call between .Ltmp23 and .Ltmp24
	.uleb128 .Ltmp25-.Lfunc_begin2          #     jumps to .Ltmp25
	.byte	0                               #   On action: cleanup
	.uleb128 .Ltmp26-.Lfunc_begin2          # >> Call Site 7 <<
	.uleb128 .Ltmp27-.Ltmp26                #   Call between .Ltmp26 and .Ltmp27
	.uleb128 .Ltmp28-.Lfunc_begin2          #     jumps to .Ltmp28
	.byte	0                               #   On action: cleanup
	.uleb128 .Ltmp27-.Lfunc_begin2          # >> Call Site 8 <<
	.uleb128 .Ltmp38-.Ltmp27                #   Call between .Ltmp27 and .Ltmp38
	.byte	0                               #     has no landing pad
	.byte	0                               #   On action: cleanup
	.uleb128 .Ltmp38-.Lfunc_begin2          # >> Call Site 9 <<
	.uleb128 .Ltmp39-.Ltmp38                #   Call between .Ltmp38 and .Ltmp39
	.uleb128 .Ltmp40-.Lfunc_begin2          #     jumps to .Ltmp40
	.byte	0                               #   On action: cleanup
	.uleb128 .Ltmp39-.Lfunc_begin2          # >> Call Site 10 <<
	.uleb128 .Ltmp32-.Ltmp39                #   Call between .Ltmp39 and .Ltmp32
	.byte	0                               #     has no landing pad
	.byte	0                               #   On action: cleanup
	.uleb128 .Ltmp32-.Lfunc_begin2          # >> Call Site 11 <<
	.uleb128 .Ltmp33-.Ltmp32                #   Call between .Ltmp32 and .Ltmp33
	.uleb128 .Ltmp34-.Lfunc_begin2          #     jumps to .Ltmp34
	.byte	0                               #   On action: cleanup
	.uleb128 .Ltmp33-.Lfunc_begin2          # >> Call Site 12 <<
	.uleb128 .Ltmp35-.Ltmp33                #   Call between .Ltmp33 and .Ltmp35
	.byte	0                               #     has no landing pad
	.byte	0                               #   On action: cleanup
	.uleb128 .Ltmp35-.Lfunc_begin2          # >> Call Site 13 <<
	.uleb128 .Ltmp36-.Ltmp35                #   Call between .Ltmp35 and .Ltmp36
	.uleb128 .Ltmp37-.Lfunc_begin2          #     jumps to .Ltmp37
	.byte	0                               #   On action: cleanup
	.uleb128 .Ltmp36-.Lfunc_begin2          # >> Call Site 14 <<
	.uleb128 .Ltmp44-.Ltmp36                #   Call between .Ltmp36 and .Ltmp44
	.byte	0                               #     has no landing pad
	.byte	0                               #   On action: cleanup
	.uleb128 .Ltmp44-.Lfunc_begin2          # >> Call Site 15 <<
	.uleb128 .Ltmp45-.Ltmp44                #   Call between .Ltmp44 and .Ltmp45
	.uleb128 .Ltmp46-.Lfunc_begin2          #     jumps to .Ltmp46
	.byte	0                               #   On action: cleanup
	.uleb128 .Ltmp45-.Lfunc_begin2          # >> Call Site 16 <<
	.uleb128 .Ltmp41-.Ltmp45                #   Call between .Ltmp45 and .Ltmp41
	.byte	0                               #     has no landing pad
	.byte	0                               #   On action: cleanup
	.uleb128 .Ltmp41-.Lfunc_begin2          # >> Call Site 17 <<
	.uleb128 .Ltmp42-.Ltmp41                #   Call between .Ltmp41 and .Ltmp42
	.uleb128 .Ltmp43-.Lfunc_begin2          #     jumps to .Ltmp43
	.byte	0                               #   On action: cleanup
	.uleb128 .Ltmp42-.Lfunc_begin2          # >> Call Site 18 <<
	.uleb128 .Lfunc_end2-.Ltmp42            #   Call between .Ltmp42 and .Lfunc_end2
	.byte	0                               #     has no landing pad
	.byte	0                               #   On action: cleanup
.Lcst_end2:
	.p2align	2, 0x0
                                        # -- End function
	.section	.rodata.cst8,"aM",@progbits,8
	.p2align	3, 0x0                          # -- Begin function _Z13reportResultsdjjjP20hipDeviceProp_tR0600f
.LCPI3_0:
	.quad	0xc00921fb54442d18              # double -3.1415926535897931
.LCPI3_2:
	.quad	0x400921fb54442d18              # double 3.1415926535897931
	.section	.rodata.cst16,"aM",@progbits,16
	.p2align	4, 0x0
.LCPI3_1:
	.quad	0x7fffffffffffffff              # double NaN
	.quad	0x7fffffffffffffff              # double NaN
	.text
	.globl	_Z13reportResultsdjjjP20hipDeviceProp_tR0600f
	.type	_Z13reportResultsdjjjP20hipDeviceProp_tR0600f,@function
_Z13reportResultsdjjjP20hipDeviceProp_tR0600f: # @_Z13reportResultsdjjjP20hipDeviceProp_tR0600f
	.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	$56, %rsp
	.cfi_def_cfa_offset 112
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	.cfi_offset %rbp, -16
	movss	%xmm1, 4(%rsp)                  # 4-byte Spill
	movq	%rcx, %r15
	movl	%edx, %r14d
	movl	%esi, %ebp
	movl	%edi, %ebx
	movsd	%xmm0, 8(%rsp)                  # 8-byte Spill
	movl	$_ZSt4cout, %r12d
	movl	$_ZSt4cout, %edi
	movl	$.L.str.14, %esi
	movl	$24, %edx
	callq	_ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l
	movq	_ZSt4cout(%rip), %rax
	movq	-24(%rax), %rdi
	addq	%r12, %rdi
	movl	$10, %esi
	callq	_ZNKSt9basic_iosIcSt11char_traitsIcEE5widenEc
	movsbl	%al, %esi
	movl	$_ZSt4cout, %edi
	callq	_ZNSo3putEc
	movq	%rax, %rdi
	callq	_ZNSo5flushEv
	movl	$_ZSt4cout, %edi
	movl	$.L.str.15, %esi
	movl	$24, %edx
	callq	_ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l
	movq	_ZSt4cout(%rip), %rax
	movq	-24(%rax), %rdi
	addq	%r12, %rdi
	movl	$10, %esi
	callq	_ZNKSt9basic_iosIcSt11char_traitsIcEE5widenEc
	movsbl	%al, %esi
	movl	$_ZSt4cout, %edi
	callq	_ZNSo3putEc
	movq	%rax, %rdi
	callq	_ZNSo5flushEv
	movl	$_ZSt4cout, %edi
	movl	$.L.str.16, %esi
	movl	$24, %edx
	callq	_ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l
	testq	%r15, %r15
	je	.LBB3_1
# %bb.2:
	movq	%r15, %rdi
	callq	strlen
	movl	$_ZSt4cout, %edi
	movq	%r15, %rsi
	movq	%rax, %rdx
	callq	_ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l
	jmp	.LBB3_3
.LBB3_1:
	movq	_ZSt4cout(%rip), %rax
	movq	-24(%rax), %rax
	leaq	_ZSt4cout(%rax), %rdi
	movl	32(%rdi), %esi
	orl	$1, %esi
	callq	_ZNSt9basic_iosIcSt11char_traitsIcEE5clearESt12_Ios_Iostate
.LBB3_3:                                # %_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc.exit
	movsd	.LCPI3_0(%rip), %xmm0           # xmm0 = mem[0],zero
	addsd	8(%rsp), %xmm0                  # 8-byte Folded Reload
	andpd	.LCPI3_1(%rip), %xmm0
	movapd	%xmm0, 16(%rsp)                 # 16-byte Spill
	divsd	.LCPI3_2(%rip), %xmm0
	movapd	%xmm0, 32(%rsp)                 # 16-byte Spill
	movq	_ZSt4cout(%rip), %rax
	movl	$_ZSt4cout, %ecx
	movq	-24(%rax), %rdi
	addq	%rcx, %rdi
	movl	$10, %esi
	callq	_ZNKSt9basic_iosIcSt11char_traitsIcEE5widenEc
	movsbl	%al, %esi
	movl	$_ZSt4cout, %edi
	callq	_ZNSo3putEc
	movq	%rax, %rdi
	callq	_ZNSo5flushEv
	movl	$_ZSt4cout, %edi
	movl	$.L.str.17, %esi
	movl	$24, %edx
	callq	_ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l
	movl	%ebp, %r15d
	movl	$_ZSt4cout, %edi
	movq	%r15, %rsi
	callq	_ZNSo9_M_insertImEERSoT_
	movq	%rax, %r12
	movq	(%rax), %rax
	movq	-24(%rax), %rdi
	addq	%r12, %rdi
	movl	$10, %esi
	callq	_ZNKSt9basic_iosIcSt11char_traitsIcEE5widenEc
	movsbl	%al, %esi
	movq	%r12, %rdi
	callq	_ZNSo3putEc
	movq	%rax, %rdi
	callq	_ZNSo5flushEv
	movl	$_ZSt4cout, %edi
	movl	$.L.str.18, %esi
	movl	$24, %edx
	callq	_ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l
	movl	%r14d, %r12d
	movl	$_ZSt4cout, %edi
	movq	%r12, %rsi
	callq	_ZNSo9_M_insertImEERSoT_
	movq	%rax, %r13
	movq	(%rax), %rax
	movq	-24(%rax), %rdi
	addq	%r13, %rdi
	movl	$10, %esi
	callq	_ZNKSt9basic_iosIcSt11char_traitsIcEE5widenEc
	movsbl	%al, %esi
	movq	%r13, %rdi
	callq	_ZNSo3putEc
	movq	%rax, %rdi
	callq	_ZNSo5flushEv
	movl	$_ZSt4cout, %edi
	movl	$.L.str.19, %esi
	movl	$24, %edx
	callq	_ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l
	imull	%ebp, %r14d
	movl	$_ZSt4cout, %edi
	movq	%r14, %rsi
	callq	_ZNSo9_M_insertImEERSoT_
	movq	%rax, %r14
	movq	(%rax), %rax
	movq	-24(%rax), %rdi
	addq	%r14, %rdi
	movl	$10, %esi
	callq	_ZNKSt9basic_iosIcSt11char_traitsIcEE5widenEc
	movsbl	%al, %esi
	movq	%r14, %rdi
	callq	_ZNSo3putEc
	movq	%rax, %rdi
	callq	_ZNSo5flushEv
	movl	$_ZSt4cout, %edi
	movl	$.L.str.20, %esi
	movl	$24, %edx
	callq	_ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l
	movl	%ebx, %ebx
	movl	$_ZSt4cout, %edi
	movq	%rbx, %rsi
	callq	_ZNSo9_M_insertImEERSoT_
	movq	%rax, %r14
	movq	(%rax), %rax
	movq	-24(%rax), %rdi
	addq	%r14, %rdi
	movl	$10, %esi
	callq	_ZNKSt9basic_iosIcSt11char_traitsIcEE5widenEc
	movsbl	%al, %esi
	movq	%r14, %rdi
	callq	_ZNSo3putEc
	movq	%rax, %rdi
	callq	_ZNSo5flushEv
	movl	$_ZSt4cout, %edi
	movl	$.L.str.21, %esi
	movl	$24, %edx
	callq	_ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l
	cvtsi2sd	%rbx, %xmm0
	cvtsi2sd	%r12, %xmm1
	mulsd	%xmm0, %xmm1
	xorps	%xmm0, %xmm0
	cvtsi2sd	%r15, %xmm0
	mulsd	%xmm1, %xmm0
	movl	$_ZSt4cout, %edi
	callq	_ZNSo9_M_insertIdEERSoT_
	movq	%rax, %rbx
	movq	(%rax), %rax
	movq	-24(%rax), %rdi
	addq	%rbx, %rdi
	movl	$10, %esi
	callq	_ZNKSt9basic_iosIcSt11char_traitsIcEE5widenEc
	movsbl	%al, %esi
	movq	%rbx, %rdi
	callq	_ZNSo3putEc
	movq	%rax, %rdi
	callq	_ZNSo5flushEv
	movl	$_ZSt4cout, %edi
	movl	$.L.str.22, %esi
	movl	$24, %edx
	callq	_ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l
	xorps	%xmm0, %xmm0
	cvtss2sd	4(%rsp), %xmm0                  # 4-byte Folded Reload
	movl	$_ZSt4cout, %edi
	callq	_ZNSo9_M_insertIdEERSoT_
	movq	%rax, %rbx
	movl	$.L.str.23, %esi
	movl	$1, %edx
	movq	%rax, %rdi
	callq	_ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l
	movq	(%rbx), %rax
	movq	-24(%rax), %rdi
	addq	%rbx, %rdi
	movl	$10, %esi
	callq	_ZNKSt9basic_iosIcSt11char_traitsIcEE5widenEc
	movsbl	%al, %esi
	movq	%rbx, %rdi
	callq	_ZNSo3putEc
	movq	%rax, %rdi
	callq	_ZNSo5flushEv
	movl	$_ZSt4cout, %edi
	movl	$.L.str.24, %esi
	movl	$24, %edx
	callq	_ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l
	movl	$_ZSt4cout, %edi
	movsd	8(%rsp), %xmm0                  # 8-byte Reload
                                        # xmm0 = mem[0],zero
	callq	_ZNSo9_M_insertIdEERSoT_
	movq	%rax, %rbx
	movq	(%rax), %rax
	movq	-24(%rax), %rdi
	addq	%rbx, %rdi
	movl	$10, %esi
	callq	_ZNKSt9basic_iosIcSt11char_traitsIcEE5widenEc
	movsbl	%al, %esi
	movq	%rbx, %rdi
	callq	_ZNSo3putEc
	movq	%rax, %rdi
	callq	_ZNSo5flushEv
	movl	$_ZSt4cout, %edi
	movl	$.L.str.25, %esi
	movl	$24, %edx
	callq	_ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l
	movl	$_ZSt4cout, %edi
	movaps	16(%rsp), %xmm0                 # 16-byte Reload
	callq	_ZNSo9_M_insertIdEERSoT_
	movq	%rax, %rbx
	movq	(%rax), %rax
	movq	-24(%rax), %rdi
	addq	%rbx, %rdi
	movl	$10, %esi
	callq	_ZNKSt9basic_iosIcSt11char_traitsIcEE5widenEc
	movsbl	%al, %esi
	movq	%rbx, %rdi
	callq	_ZNSo3putEc
	movq	%rax, %rdi
	callq	_ZNSo5flushEv
	movl	$_ZSt4cout, %edi
	movl	$.L.str.26, %esi
	movl	$24, %edx
	callq	_ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l
	movl	$_ZSt4cout, %edi
	movaps	32(%rsp), %xmm0                 # 16-byte Reload
	callq	_ZNSo9_M_insertIdEERSoT_
	movq	%rax, %rbx
	movq	(%rax), %rax
	movq	-24(%rax), %rdi
	addq	%rbx, %rdi
	movl	$10, %esi
	callq	_ZNKSt9basic_iosIcSt11char_traitsIcEE5widenEc
	movsbl	%al, %esi
	movq	%rbx, %rdi
	callq	_ZNSo3putEc
	movq	%rax, %rdi
	addq	$56, %rsp
	.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
	jmp	_ZNSo5flushEv                   # TAILCALL
.Lfunc_end3:
	.size	_Z13reportResultsdjjjP20hipDeviceProp_tR0600f, .Lfunc_end3-_Z13reportResultsdjjjP20hipDeviceProp_tR0600f
	.cfi_endproc
                                        # -- End function
	.section	.text._ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPKcEEvT_S8_St20forward_iterator_tag,"axG",@progbits,_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPKcEEvT_S8_St20forward_iterator_tag,comdat
	.weak	_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPKcEEvT_S8_St20forward_iterator_tag # -- Begin function _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPKcEEvT_S8_St20forward_iterator_tag
	.p2align	1, 0x90
	.type	_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPKcEEvT_S8_St20forward_iterator_tag,@function
_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPKcEEvT_S8_St20forward_iterator_tag: # @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPKcEEvT_S8_St20forward_iterator_tag
	.cfi_startproc
# %bb.0:
	pushq	%r15
	.cfi_def_cfa_offset 16
	pushq	%r14
	.cfi_def_cfa_offset 24
	pushq	%r12
	.cfi_def_cfa_offset 32
	pushq	%rbx
	.cfi_def_cfa_offset 40
	pushq	%rax
	.cfi_def_cfa_offset 48
	.cfi_offset %rbx, -40
	.cfi_offset %r12, -32
	.cfi_offset %r14, -24
	.cfi_offset %r15, -16
	movq	%rdx, %r14
	movq	%rsi, %r15
	movq	%rdi, %rbx
	subq	%rsi, %r14
	movq	%r14, (%rsp)
	cmpq	$15, %r14
	jbe	.LBB4_1
# %bb.2:
	movq	%rsp, %r12
	movq	%rbx, %rdi
	movq	%r12, %rsi
	xorl	%edx, %edx
	callq	_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9_M_createERmm
	movq	%rax, (%rbx)
	movq	(%r12), %rcx
	movq	%rcx, 16(%rbx)
	jmp	.LBB4_3
.LBB4_1:                                # %._crit_edge
	movq	(%rbx), %rax
.LBB4_3:
	testq	%r14, %r14
	je	.LBB4_7
# %bb.4:
	cmpq	$1, %r14
	jne	.LBB4_6
# %bb.5:
	movb	(%r15), %cl
	movb	%cl, (%rax)
	jmp	.LBB4_7
.LBB4_6:
	movq	%rax, %rdi
	movq	%r15, %rsi
	movq	%r14, %rdx
	callq	memcpy@PLT
.LBB4_7:                                # %_ZZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPKcEEvT_S8_St20forward_iterator_tagEN6_GuardD2Ev.exit
	movq	(%rsp), %rax
	movq	%rax, 8(%rbx)
	movq	(%rbx), %rcx
	movb	$0, (%rcx,%rax)
	addq	$8, %rsp
	.cfi_def_cfa_offset 40
	popq	%rbx
	.cfi_def_cfa_offset 32
	popq	%r12
	.cfi_def_cfa_offset 24
	popq	%r14
	.cfi_def_cfa_offset 16
	popq	%r15
	.cfi_def_cfa_offset 8
	retq
.Lfunc_end4:
	.size	_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPKcEEvT_S8_St20forward_iterator_tag, .Lfunc_end4-_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPKcEEvT_S8_St20forward_iterator_tag
	.cfi_endproc
                                        # -- End function
	.type	.L.str,@object                  # @.str
	.section	.rodata.str1.1,"aMS",@progbits,1
.L.str:
	.asciz	"Usage: buffoncuda [-n <NUMINT>] [-b <BLOCKNUM>] [-t <TNUM>] [-k <KERNID>] [-d <DEVID>]\n\n"
	.size	.L.str, 89

	.type	.L.str.1,@object                # @.str.1
.L.str.1:
	.asciz	"  -n <NUMINT>      Iterations per thread\n"
	.size	.L.str.1, 42

	.type	.L.str.2,@object                # @.str.2
.L.str.2:
	.asciz	"  -d <DEVID>       Index of the device to be used\n"
	.size	.L.str.2, 51

	.type	.L.str.3,@object                # @.str.3
.L.str.3:
	.asciz	"  -b <BLOCKNUM>    Number of blocks in the grid\n"
	.size	.L.str.3, 49

	.type	.L.str.4,@object                # @.str.4
.L.str.4:
	.asciz	"  -t <TNUM>        Threads per block\n"
	.size	.L.str.4, 38

	.type	.L.str.5,@object                # @.str.5
.L.str.5:
	.asciz	"  -k <KERNID>      Kernel to execute. 0 for naivest, 1 for naive, 2 for batchRNG\n"
	.size	.L.str.5, 82

	.type	.L.str.6,@object                # @.str.6
.L.str.6:
	.asciz	"n:b:t:k:d:h"
	.size	.L.str.6, 12

	.type	.L.str.7,@object                # @.str.7
.L.str.7:
	.asciz	"Number of blocks must be greater than zero"
	.size	.L.str.7, 43

	.type	.L.str.8,@object                # @.str.8
.L.str.8:
	.asciz	"Number of threads per block must be greater than zero."
	.size	.L.str.8, 55

	.type	.L.str.9,@object                # @.str.9
.L.str.9:
	.asciz	"Number of threads per block must be a power of two(for efficient reduction)."
	.size	.L.str.9, 77

	.type	.L.str.10,@object               # @.str.10
.L.str.10:
	.asciz	"Kernel number must be 0, 1 or 2"
	.size	.L.str.10, 32

	.type	.L.str.11,@object               # @.str.11
.L.str.11:
	.asciz	"Couldn't set requested device: "
	.size	.L.str.11, 32

	.type	.L.str.12,@object               # @.str.12
.L.str.12:
	.asciz	"Threads per block exceeds device maximum."
	.size	.L.str.12, 42

	.type	.L.str.13,@object               # @.str.13
.L.str.13:
	.asciz	"Grid size exceeds device maximum."
	.size	.L.str.13, 34

	.type	.L.str.14,@object               # @.str.14
.L.str.14:
	.asciz	"      RESULTS:          "
	.size	.L.str.14, 25

	.type	.L.str.15,@object               # @.str.15
.L.str.15:
	.asciz	"========================"
	.size	.L.str.15, 25

	.type	.L.str.16,@object               # @.str.16
.L.str.16:
	.asciz	"Device Name:            "
	.size	.L.str.16, 25

	.type	.L.str.17,@object               # @.str.17
.L.str.17:
	.asciz	"Grid Size:              "
	.size	.L.str.17, 25

	.type	.L.str.18,@object               # @.str.18
.L.str.18:
	.asciz	"Block Size:             "
	.size	.L.str.18, 25

	.type	.L.str.19,@object               # @.str.19
.L.str.19:
	.asciz	"Number of threads:      "
	.size	.L.str.19, 25

	.type	.L.str.20,@object               # @.str.20
.L.str.20:
	.asciz	"Iterations per thread:  "
	.size	.L.str.20, 25

	.type	.L.str.21,@object               # @.str.21
.L.str.21:
	.asciz	"Total iterations:       "
	.size	.L.str.21, 25

	.type	.L.str.22,@object               # @.str.22
.L.str.22:
	.asciz	"Kernel execution time:  "
	.size	.L.str.22, 25

	.type	.L.str.23,@object               # @.str.23
.L.str.23:
	.asciz	"s"
	.size	.L.str.23, 2

	.type	.L.str.24,@object               # @.str.24
.L.str.24:
	.asciz	"PI estimate:            "
	.size	.L.str.24, 25

	.type	.L.str.25,@object               # @.str.25
.L.str.25:
	.asciz	"Abolute error:          "
	.size	.L.str.25, 25

	.type	.L.str.26,@object               # @.str.26
.L.str.26:
	.asciz	"Relative error:         "
	.size	.L.str.26, 25

	.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 __gxx_personality_v0
	.addrsig_sym _Unwind_Resume
	.addrsig_sym _ZTISt13runtime_error
	.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
