#include <stdio.h>
#include <stdlib.h>
#include <curand_kernel.h> 
#define TRIALS_PER_THREAD 1000
#define BLOCKS 256
#define THREADS 256
#define PI 3.14159265358979 // known value of pi 

long pi_mc(unsigned long long trials) {
  double x, y;
  long points_in_circle=0;
  for(long i = 0; i < trials; i++) {
    x = rand() / (double) RAND_MAX;
    y = rand() / (double) RAND_MAX;
    points_in_circle += (x*x + y*y <= 1.0f);
  }
  
  return points_in_circle;
}

int main (int argc, char *argv[]) {
	cudaEvent_t start, stop;
	cudaEventCreate(&start);
	cudaEventCreate(&stop);
	  
	unsigned long long points_in_circle = 0;
	unsigned long long total_points = 0;
		
	cudaEventRecord(start);
	printf("   time (ms)  |  total points   |  points in 1/4 circle |       estimated pi        |          error        \n");
	printf("------------------------------------------------------------------------------------------------------------\n");

	for (int j=1; j < 10000; j++) 
	{ 
		points_in_circle += pi_mc((unsigned long long)BLOCKS * (unsigned long long)THREADS * (unsigned long long)TRIALS_PER_THREAD);

		total_points += (unsigned long long)BLOCKS * (unsigned long long)THREADS * (unsigned long long)TRIALS_PER_THREAD;
		
		long double pi = 4 * (long double) points_in_circle / (long double)total_points;
		
		long double error = pi - (long double) PI;
		
		cudaEventRecord(stop);
		
		cudaEventSynchronize(stop);
		
		float milliseconds = 0;
		cudaEventElapsedTime(&milliseconds, start, stop);
		
		printf("%14.0f\t%16lld\t%16lld\t%20.14lf\t%20.14lf\n", milliseconds, total_points, points_in_circle, pi, error);
	}

  return 0;
}

	.file	"tmpxft_002e3dd6_00000000-6_cpu_pi.cudafe1.cpp"
	.text
#APP

#NO_APP
	.type	_ZL26__cudaUnregisterBinaryUtilv, @function
_ZL26__cudaUnregisterBinaryUtilv:
.LFB2245:
	.cfi_startproc
	endbr64
	movq	_ZL20__cudaFatCubinHandle(%rip), %rdi
	jmp	__cudaUnregisterFatBinary@PLT
	.cfi_endproc
.LFE2245:
	.size	_ZL26__cudaUnregisterBinaryUtilv, .-_ZL26__cudaUnregisterBinaryUtilv
	.globl	_Z5pi_mcy
	.type	_Z5pi_mcy, @function
_Z5pi_mcy:
.LFB2241:
	.cfi_startproc
	endbr64
	pushq	%r12
	.cfi_def_cfa_offset 16
	.cfi_offset 12, -16
	xorl	%r12d, %r12d
	pushq	%rbp
	.cfi_def_cfa_offset 24
	.cfi_offset 6, -24
	movq	%rdi, %rbp
	pushq	%rbx
	.cfi_def_cfa_offset 32
	.cfi_offset 3, -32
	xorl	%ebx, %ebx
	subq	$16, %rsp
	.cfi_def_cfa_offset 48
.L3:
	cmpq	%rbp, %r12
	je	.L7
	call	rand@PLT
	cvtsi2sdl	%eax, %xmm0
	divsd	.LC0(%rip), %xmm0
	movsd	%xmm0, 8(%rsp)
	call	rand@PLT
	movsd	8(%rsp), %xmm0
	cvtsi2sdl	%eax, %xmm1
	divsd	.LC0(%rip), %xmm1
	mulsd	%xmm1, %xmm1
	mulsd	%xmm0, %xmm0
	addsd	%xmm1, %xmm0
	movsd	.LC1(%rip), %xmm1
	comisd	%xmm0, %xmm1
	sbbq	$-1, %rbx
	incq	%r12
	jmp	.L3
.L7:
	addq	$16, %rsp
	.cfi_def_cfa_offset 32
	movq	%rbx, %rax
	popq	%rbx
	.cfi_def_cfa_offset 24
	popq	%rbp
	.cfi_def_cfa_offset 16
	popq	%r12
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE2241:
	.size	_Z5pi_mcy, .-_Z5pi_mcy
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC2:
	.string	"   time (ms)  |  total points   |  points in 1/4 circle |       estimated pi        |          error        \n"
.LC3:
	.string	"------------------------------------------------------------------------------------------------------------\n"
.LC8:
	.string	"%14.0f\t%16lld\t%16lld\t%20.14lf\t%20.14lf\n"
	.section	.text.startup,"ax",@progbits
	.globl	main
	.type	main, @function
main:
.LFB2242:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	xorl	%ebp, %ebp
	pushq	%rbx
	.cfi_def_cfa_offset 24
	.cfi_offset 3, -24
	xorl	%ebx, %ebx
	subq	$72, %rsp
	.cfi_def_cfa_offset 96
	movq	%fs:40, %rax
	movq	%rax, 56(%rsp)
	xorl	%eax, %eax
	leaq	40(%rsp), %rdi
	call	cudaEventCreate@PLT
	leaq	48(%rsp), %rdi
	call	cudaEventCreate@PLT
	movq	40(%rsp), %rdi
	xorl	%esi, %esi
	call	cudaEventRecord@PLT
	leaq	.LC2(%rip), %rsi
	movl	$2, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	leaq	.LC3(%rip), %rsi
	movl	$2, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
.L10:
	movl	$65536000, %edi
	addq	$65536000, %rbx
	call	_Z5pi_mcy
	addq	%rax, %rbp
	movq	%rbp, (%rsp)
	fildq	(%rsp)
	testq	%rbp, %rbp
	jns	.L9
	fadds	.LC4(%rip)
.L9:
	movq	%rbx, (%rsp)
	fmuls	.LC5(%rip)
	xorl	%esi, %esi
	fildq	(%rsp)
	movq	48(%rsp), %rdi
	fdivrp	%st, %st(1)
	fld	%st(0)
	fstpt	16(%rsp)
	fsubl	.LC6(%rip)
	fstpt	(%rsp)
	call	cudaEventRecord@PLT
	movq	48(%rsp), %rdi
	call	cudaEventSynchronize@PLT
	movq	48(%rsp), %rdx
	movq	40(%rsp), %rsi
	leaq	36(%rsp), %rdi
	movl	$0x00000000, 36(%rsp)
	call	cudaEventElapsedTime@PLT
	fldt	(%rsp)
	cvtss2sd	36(%rsp), %xmm0
	movq	%rbp, %rcx
	subq	$32, %rsp
	.cfi_def_cfa_offset 128
	movq	%rbx, %rdx
	movl	$2, %edi
	leaq	.LC8(%rip), %rsi
	movb	$1, %al
	fstpt	16(%rsp)
	fldt	48(%rsp)
	fstpt	(%rsp)
	call	__printf_chk@PLT
	movl	$1249875, %eax
	addq	$32, %rsp
	.cfi_def_cfa_offset 96
	salq	$19, %rax
	cmpq	%rax, %rbx
	jne	.L10
	movq	56(%rsp), %rax
	subq	%fs:40, %rax
	je	.L11
	call	__stack_chk_fail@PLT
.L11:
	addq	$72, %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
.LFE2242:
	.size	main, .-main
	.section	.rodata.str1.1
.LC10:
	.string	"precalc_xorwow_matrix"
.LC11:
	.string	"precalc_xorwow_offset_matrix"
.LC12:
	.string	"mrg32k3aM1"
.LC13:
	.string	"mrg32k3aM2"
.LC14:
	.string	"mrg32k3aM1SubSeq"
.LC15:
	.string	"mrg32k3aM2SubSeq"
.LC16:
	.string	"mrg32k3aM1Seq"
.LC17:
	.string	"mrg32k3aM2Seq"
.LC18:
	.string	"__cr_lgamma_table"
	.section	.text.startup
	.type	_ZL24__sti____cudaRegisterAllv, @function
_ZL24__sti____cudaRegisterAllv:
.LFB2268:
	.cfi_startproc
	endbr64
	pushq	%rbx
	.cfi_def_cfa_offset 16
	.cfi_offset 3, -16
	leaq	_ZL15__fatDeviceText(%rip), %rdi
	call	__cudaRegisterFatBinary@PLT
	pushq	$0
	.cfi_def_cfa_offset 24
	movl	$102400, %r9d
	xorl	%r8d, %r8d
	pushq	$0
	.cfi_def_cfa_offset 32
	leaq	.LC10(%rip), %rdx
	movq	%rax, %rdi
	movq	%rax, %rbx
	movq	%rdx, %rcx
	leaq	_ZL21precalc_xorwow_matrix(%rip), %rsi
	movq	%rax, _ZL20__cudaFatCubinHandle(%rip)
	call	__cudaRegisterVar@PLT
	popq	%rax
	.cfi_def_cfa_offset 24
	popq	%rdx
	.cfi_def_cfa_offset 16
	pushq	$0
	.cfi_def_cfa_offset 24
	pushq	$0
	.cfi_def_cfa_offset 32
	leaq	.LC11(%rip), %rdx
	movq	%rbx, %rdi
	xorl	%r8d, %r8d
	movq	%rdx, %rcx
	movl	$102400, %r9d
	leaq	_ZL28precalc_xorwow_offset_matrix(%rip), %rsi
	call	__cudaRegisterVar@PLT
	popq	%rcx
	.cfi_def_cfa_offset 24
	popq	%rsi
	.cfi_def_cfa_offset 16
	pushq	$0
	.cfi_def_cfa_offset 24
	pushq	$0
	.cfi_def_cfa_offset 32
	leaq	.LC12(%rip), %rdx
	movq	%rbx, %rdi
	xorl	%r8d, %r8d
	movq	%rdx, %rcx
	movl	$2304, %r9d
	leaq	_ZL10mrg32k3aM1(%rip), %rsi
	call	__cudaRegisterVar@PLT
	popq	%rdi
	.cfi_def_cfa_offset 24
	popq	%r8
	.cfi_def_cfa_offset 16
	pushq	$0
	.cfi_def_cfa_offset 24
	pushq	$0
	.cfi_def_cfa_offset 32
	leaq	.LC13(%rip), %rdx
	movq	%rbx, %rdi
	xorl	%r8d, %r8d
	movq	%rdx, %rcx
	movl	$2304, %r9d
	leaq	_ZL10mrg32k3aM2(%rip), %rsi
	call	__cudaRegisterVar@PLT
	popq	%r9
	.cfi_def_cfa_offset 24
	popq	%r10
	.cfi_def_cfa_offset 16
	pushq	$0
	.cfi_def_cfa_offset 24
	pushq	$0
	.cfi_def_cfa_offset 32
	leaq	.LC14(%rip), %rdx
	movq	%rbx, %rdi
	xorl	%r8d, %r8d
	movq	%rdx, %rcx
	movl	$2016, %r9d
	leaq	_ZL16mrg32k3aM1SubSeq(%rip), %rsi
	call	__cudaRegisterVar@PLT
	popq	%r11
	.cfi_def_cfa_offset 24
	popq	%rax
	.cfi_def_cfa_offset 16
	pushq	$0
	.cfi_def_cfa_offset 24
	pushq	$0
	.cfi_def_cfa_offset 32
	leaq	.LC15(%rip), %rdx
	movq	%rbx, %rdi
	xorl	%r8d, %r8d
	movq	%rdx, %rcx
	movl	$2016, %r9d
	leaq	_ZL16mrg32k3aM2SubSeq(%rip), %rsi
	call	__cudaRegisterVar@PLT
	popq	%rax
	.cfi_def_cfa_offset 24
	popq	%rdx
	.cfi_def_cfa_offset 16
	pushq	$0
	.cfi_def_cfa_offset 24
	pushq	$0
	.cfi_def_cfa_offset 32
	leaq	.LC16(%rip), %rdx
	movq	%rbx, %rdi
	xorl	%r8d, %r8d
	movq	%rdx, %rcx
	movl	$2304, %r9d
	leaq	_ZL13mrg32k3aM1Seq(%rip), %rsi
	call	__cudaRegisterVar@PLT
	popq	%rcx
	.cfi_def_cfa_offset 24
	popq	%rsi
	.cfi_def_cfa_offset 16
	pushq	$0
	.cfi_def_cfa_offset 24
	pushq	$0
	.cfi_def_cfa_offset 32
	leaq	.LC17(%rip), %rdx
	movq	%rbx, %rdi
	xorl	%r8d, %r8d
	movq	%rdx, %rcx
	movl	$2304, %r9d
	leaq	_ZL13mrg32k3aM2Seq(%rip), %rsi
	call	__cudaRegisterVar@PLT
	popq	%rdi
	.cfi_def_cfa_offset 24
	popq	%r8
	.cfi_def_cfa_offset 16
	pushq	$0
	.cfi_def_cfa_offset 24
	pushq	$1
	.cfi_def_cfa_offset 32
	leaq	.LC18(%rip), %rdx
	movq	%rbx, %rdi
	xorl	%r8d, %r8d
	movl	$72, %r9d
	movq	%rdx, %rcx
	leaq	_ZL17__cr_lgamma_table(%rip), %rsi
	call	__cudaRegisterVar@PLT
	movq	_ZL20__cudaFatCubinHandle(%rip), %rdi
	popq	%r9
	.cfi_def_cfa_offset 24
	popq	%r10
	.cfi_def_cfa_offset 16
	call	__cudaRegisterFatBinaryEnd@PLT
	leaq	_ZL26__cudaUnregisterBinaryUtilv(%rip), %rdi
	popq	%rbx
	.cfi_def_cfa_offset 8
	jmp	atexit@PLT
	.cfi_endproc
.LFE2268:
	.size	_ZL24__sti____cudaRegisterAllv, .-_ZL24__sti____cudaRegisterAllv
	.section	.init_array,"aw"
	.align 8
	.quad	_ZL24__sti____cudaRegisterAllv
	.section	.nvFatBinSegment,"aw"
	.align 8
	.type	_ZL15__fatDeviceText, @object
	.size	_ZL15__fatDeviceText, 24
_ZL15__fatDeviceText:
	.long	1180844977
	.long	1
	.quad	fatbinData
	.quad	0
	.local	_ZL20__cudaFatCubinHandle
	.comm	_ZL20__cudaFatCubinHandle,8,8
	.local	_ZL17__cr_lgamma_table
	.comm	_ZL17__cr_lgamma_table,72,32
	.local	_ZL13mrg32k3aM2Seq
	.comm	_ZL13mrg32k3aM2Seq,2304,32
	.local	_ZL13mrg32k3aM1Seq
	.comm	_ZL13mrg32k3aM1Seq,2304,32
	.local	_ZL16mrg32k3aM2SubSeq
	.comm	_ZL16mrg32k3aM2SubSeq,2016,32
	.local	_ZL16mrg32k3aM1SubSeq
	.comm	_ZL16mrg32k3aM1SubSeq,2016,32
	.local	_ZL10mrg32k3aM2
	.comm	_ZL10mrg32k3aM2,2304,32
	.local	_ZL10mrg32k3aM1
	.comm	_ZL10mrg32k3aM1,2304,32
	.local	_ZL28precalc_xorwow_offset_matrix
	.comm	_ZL28precalc_xorwow_offset_matrix,102400,32
	.local	_ZL21precalc_xorwow_matrix
	.comm	_ZL21precalc_xorwow_matrix,102400,32
	.section	.rodata.cst8,"aM",@progbits,8
	.align 8
.LC0:
	.long	-4194304
	.long	1105199103
	.align 8
.LC1:
	.long	0
	.long	1072693248
	.section	.rodata.cst4,"aM",@progbits,4
	.align 4
.LC4:
	.long	1602224128
	.align 4
.LC5:
	.long	1082130432
	.section	.rodata.cst8
	.align 8
.LC6:
	.long	1413754129
	.long	1074340347
	.ident	"GCC: (Ubuntu 13.3.0-6ubuntu2~24.04) 13.3.0"
	.section	.note.GNU-stack,"",@progbits
	.section	.note.gnu.property,"a"
	.align 8
	.long	1f - 0f
	.long	4f - 1f
	.long	5
0:
	.string	"GNU"
1:
	.align 8
	.long	0xc0000002
	.long	3f - 2f
2:
	.long	0x3
3:
	.align 8
4:


#include <hip/hip_runtime.h>
#include <stdio.h>
#include <stdlib.h>
#include <hiprand/hiprand_kernel.h> 
#define TRIALS_PER_THREAD 1000
#define BLOCKS 256
#define THREADS 256
#define PI 3.14159265358979 // known value of pi 

long pi_mc(unsigned long long trials) {
  double x, y;
  long points_in_circle=0;
  for(long i = 0; i < trials; i++) {
    x = rand() / (double) RAND_MAX;
    y = rand() / (double) RAND_MAX;
    points_in_circle += (x*x + y*y <= 1.0f);
  }
  
  return points_in_circle;
}

int main (int argc, char *argv[]) {
	hipEvent_t start, stop;
	hipEventCreate(&start);
	hipEventCreate(&stop);
	  
	unsigned long long points_in_circle = 0;
	unsigned long long total_points = 0;
		
	hipEventRecord(start);
	printf("   time (ms)  |  total points   |  points in 1/4 circle |       estimated pi        |          error        \n");
	printf("------------------------------------------------------------------------------------------------------------\n");

	for (int j=1; j < 10000; j++) 
	{ 
		points_in_circle += pi_mc((unsigned long long)BLOCKS * (unsigned long long)THREADS * (unsigned long long)TRIALS_PER_THREAD);

		total_points += (unsigned long long)BLOCKS * (unsigned long long)THREADS * (unsigned long long)TRIALS_PER_THREAD;
		
		long double pi = 4 * (long double) points_in_circle / (long double)total_points;
		
		long double error = pi - (long double) PI;
		
		hipEventRecord(stop);
		
		hipEventSynchronize(stop);
		
		float milliseconds = 0;
		hipEventElapsedTime(&milliseconds, start, stop);
		
		printf("%14.0f\t%16lld\t%16lld\t%20.14lf\t%20.14lf\n", milliseconds, total_points, points_in_circle, pi, error);
	}

  return 0;
}

	.text
	.file	"cpu_pi.hip"
	.section	.rodata.cst8,"aM",@progbits,8
	.p2align	3, 0x0                          # -- Begin function _Z5pi_mcy
.LCPI0_0:
	.quad	0x41dfffffffc00000              # double 2147483647
.LCPI0_1:
	.quad	0x3ff0000000000000              # double 1
	.text
	.globl	_Z5pi_mcy
	.type	_Z5pi_mcy,@function
_Z5pi_mcy:                              # @_Z5pi_mcy
	.cfi_startproc
# %bb.0:
	pushq	%r14
	.cfi_def_cfa_offset 16
	pushq	%rbx
	.cfi_def_cfa_offset 24
	pushq	%rax
	.cfi_def_cfa_offset 32
	.cfi_offset %rbx, -24
	.cfi_offset %r14, -16
	testq	%rdi, %rdi
	je	.LBB0_1
# %bb.3:                                # %.lr.ph.preheader
	movq	%rdi, %r14
	xorl	%ebx, %ebx
.LBB0_4:                                # %.lr.ph
                                        # =>This Inner Loop Header: Depth=1
	callq	rand
	xorps	%xmm1, %xmm1
	cvtsi2sd	%eax, %xmm1
	movsd	.LCPI0_0(%rip), %xmm0           # xmm0 = mem[0],zero
	divsd	%xmm0, %xmm1
	movsd	%xmm1, (%rsp)                   # 8-byte Spill
	callq	rand
	xorps	%xmm0, %xmm0
	cvtsi2sd	%eax, %xmm0
	divsd	.LCPI0_0(%rip), %xmm0
	movsd	(%rsp), %xmm1                   # 8-byte Reload
                                        # xmm1 = mem[0],zero
	mulsd	%xmm1, %xmm1
	mulsd	%xmm0, %xmm0
	addsd	%xmm1, %xmm0
	movsd	.LCPI0_1(%rip), %xmm1           # xmm1 = mem[0],zero
	ucomisd	%xmm0, %xmm1
	sbbq	$-1, %rbx
	decq	%r14
	jne	.LBB0_4
	jmp	.LBB0_2
.LBB0_1:
	xorl	%ebx, %ebx
.LBB0_2:                                # %._crit_edge
	movq	%rbx, %rax
	addq	$8, %rsp
	.cfi_def_cfa_offset 24
	popq	%rbx
	.cfi_def_cfa_offset 16
	popq	%r14
	.cfi_def_cfa_offset 8
	retq
.Lfunc_end0:
	.size	_Z5pi_mcy, .Lfunc_end0-_Z5pi_mcy
	.cfi_endproc
                                        # -- End function
	.section	.rodata.cst8,"aM",@progbits,8
	.p2align	3, 0x0                          # -- Begin function main
.LCPI1_0:
	.quad	6881500230622117888             # 0x5f80000000000000
.LCPI1_2:
	.quad	0xc00921fb54442d11              # double -3.14159265358979
	.section	.rodata.cst4,"aM",@progbits,4
	.p2align	2, 0x0
.LCPI1_1:
	.long	0x40800000                      # float 4
	.text
	.globl	main
	.type	main,@function
main:                                   # @main
	.cfi_startproc
# %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	pushq	%r15
	.cfi_def_cfa_offset 24
	pushq	%r14
	.cfi_def_cfa_offset 32
	pushq	%rbx
	.cfi_def_cfa_offset 40
	subq	$104, %rsp
	.cfi_def_cfa_offset 144
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	.cfi_offset %rbp, -16
	leaq	72(%rsp), %rbx
	movq	%rbx, %rdi
	callq	hipEventCreate
	leaq	48(%rsp), %rdi
	callq	hipEventCreate
	movq	(%rbx), %rdi
	xorl	%ebx, %ebx
	xorl	%esi, %esi
	callq	hipEventRecord
	movl	$.Lstr, %edi
	callq	puts@PLT
	movl	$.Lstr.1, %edi
	callq	puts@PLT
	movl	$65536000, %r14d                # imm = 0x3E80000
	movl	$9999, %ebp                     # imm = 0x270F
	leaq	44(%rsp), %r15
.LBB1_1:                                # =>This Inner Loop Header: Depth=1
	movl	$65536000, %edi                 # imm = 0x3E80000
	callq	_Z5pi_mcy
	xorl	%ecx, %ecx
	addq	%rax, %rbx
	movq	%rbx, 64(%rsp)
	sets	%cl
	fildll	64(%rsp)
	fadds	.LCPI1_0(,%rcx,4)
	fmuls	.LCPI1_1(%rip)
	movq	%r14, 56(%rsp)
	xorl	%eax, %eax
	testq	%r14, %r14
	sets	%al
	fildll	56(%rsp)
	fadds	.LCPI1_0(,%rax,4)
	fdivrp	%st, %st(1)
	fld	%st(0)
	fstpt	92(%rsp)                        # 10-byte Folded Spill
	faddl	.LCPI1_2(%rip)
	fstpt	80(%rsp)                        # 10-byte Folded Spill
	movq	48(%rsp), %rdi
	xorl	%esi, %esi
	callq	hipEventRecord
	movq	48(%rsp), %rdi
	callq	hipEventSynchronize
	movl	$0, 44(%rsp)
	movq	72(%rsp), %rsi
	movq	48(%rsp), %rdx
	movq	%r15, %rdi
	callq	hipEventElapsedTime
	xorps	%xmm0, %xmm0
	cvtss2sd	44(%rsp), %xmm0
	fldt	80(%rsp)                        # 10-byte Folded Reload
	fstpt	16(%rsp)
	fldt	92(%rsp)                        # 10-byte Folded Reload
	fstpt	(%rsp)
	movl	$.L.str.2, %edi
	movq	%r14, %rsi
	movq	%rbx, %rdx
	movb	$1, %al
	callq	printf
	addq	$65536000, %r14                 # imm = 0x3E80000
	decl	%ebp
	jne	.LBB1_1
# %bb.2:
	xorl	%eax, %eax
	addq	$104, %rsp
	.cfi_def_cfa_offset 40
	popq	%rbx
	.cfi_def_cfa_offset 32
	popq	%r14
	.cfi_def_cfa_offset 24
	popq	%r15
	.cfi_def_cfa_offset 16
	popq	%rbp
	.cfi_def_cfa_offset 8
	retq
.Lfunc_end1:
	.size	main, .Lfunc_end1-main
	.cfi_endproc
                                        # -- End function
	.type	.L.str.2,@object                # @.str.2
	.section	.rodata.str1.1,"aMS",@progbits,1
.L.str.2:
	.asciz	"%14.0f\t%16lld\t%16lld\t%20.14lf\t%20.14lf\n"
	.size	.L.str.2, 40

	.type	__hip_cuid_,@object             # @__hip_cuid_
	.bss
	.globl	__hip_cuid_
__hip_cuid_:
	.byte	0                               # 0x0
	.size	__hip_cuid_, 1

	.type	.Lstr,@object                   # @str
	.section	.rodata.str1.1,"aMS",@progbits,1
.Lstr:
	.asciz	"   time (ms)  |  total points   |  points in 1/4 circle |       estimated pi        |          error        "
	.size	.Lstr, 109

	.type	.Lstr.1,@object                 # @str.1
.Lstr.1:
	.asciz	"------------------------------------------------------------------------------------------------------------"
	.size	.Lstr.1, 109

	.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
