﻿#include <cuda.h>
#include "cuda_runtime.h"
#include "device_launch_parameters.h"
#include "curand_kernel.h"

#include <memory>
#include <ctime>
#include <stdio.h>
#include <stdlib.h>
#include <chrono>
#include <algorithm>
#include <numeric>   


using defer = std::shared_ptr<void>;

#define HEIGHT 32
#define WIDTH 32
#define hBLOCKS 6
#define wBLOCKS 6

//return resurl of this expression (x*x + y*y <= 1)
__device__ bool inCircle(curandState_t* state)
{
    float x = curand_uniform(state);
    float y = curand_uniform(state);
    return x * x + y * y <= 1.0f;
}


__global__ void CalculatePointsIntheCircle(int* result, int randseed)
{
    curandState_t state;
    unsigned long long seed = (threadIdx.x + blockDim.x * blockIdx.x) + (threadIdx.y + blockDim.y * blockIdx.y) * (randseed % 1000);

    //init curand
    curand_init(seed, 0, 0, &state);

    if (inCircle(&state))
    {
        atomicAdd(&result[threadIdx.x * HEIGHT + threadIdx.y], 1);
    }
    return;
}

int main()
{
    const size_t size = WIDTH * HEIGHT;
    int count [size];
    memset(&count, 0, size * sizeof(int));
    int* dev_count;

    cudaMalloc((void**)&dev_count, size * sizeof(int));
    
    // starting the timer here so that we include the cost of
    // all of the operations on the GPU.
    cudaEvent_t start, stop;
    cudaEventCreate(&start);
    cudaEventCreate(&stop);
    cudaEventRecord(start, 0);

    //use un_ptr, that don`t forget free memory
    defer _(nullptr, [&](...)
        { cudaFree(dev_count);  cudaEventDestroy(start); cudaEventDestroy(stop);  printf("free"); });

    dim3 blocks(hBLOCKS, wBLOCKS, 1);
    dim3 threads(HEIGHT, WIDTH, 1);

    int randseed = std::chrono::duration_cast<std::chrono::milliseconds>
        (std::chrono::system_clock::now().time_since_epoch()).count();

    CalculatePointsIntheCircle <<<blocks, threads >>> (dev_count, randseed);

    cudaMemcpy(&count, dev_count, size * sizeof(int), cudaMemcpyDeviceToHost);
    // result pi

    int ans = 0;
    ans = std::accumulate(&count[0], &count[size - 1], ans);

    float fullsize = static_cast<float>(HEIGHT * WIDTH * hBLOCKS * wBLOCKS);
    float pi = (4.0f * static_cast<float>(ans));
    pi /=  fullsize;
    printf("Result pi %f \n", pi);

    //print elapsed time
    cudaEventRecord(stop, 0);
    cudaEventSynchronize(stop);
    float   elapsedTime;
    cudaEventElapsedTime(&elapsedTime, start, stop);
    printf( "Elapsed time %3.1f ms\n", elapsedTime );

    return 0;
}
	.file	"tmpxft_00263c1f_00000000-6_kernel.cudafe1.cpp"
	.text
#APP

#NO_APP
	.align 2
	.type	_ZNSt19_Sp_counted_deleterIDnZ4mainEUlzE_SaIvELN9__gnu_cxx12_Lock_policyE2EED2Ev, @function
_ZNSt19_Sp_counted_deleterIDnZ4mainEUlzE_SaIvELN9__gnu_cxx12_Lock_policyE2EED2Ev:
.LFB4094:
	.cfi_startproc
	endbr64
	ret
	.cfi_endproc
.LFE4094:
	.size	_ZNSt19_Sp_counted_deleterIDnZ4mainEUlzE_SaIvELN9__gnu_cxx12_Lock_policyE2EED2Ev, .-_ZNSt19_Sp_counted_deleterIDnZ4mainEUlzE_SaIvELN9__gnu_cxx12_Lock_policyE2EED2Ev
	.set	_ZNSt19_Sp_counted_deleterIDnZ4mainEUlzE_SaIvELN9__gnu_cxx12_Lock_policyE2EED1Ev,_ZNSt19_Sp_counted_deleterIDnZ4mainEUlzE_SaIvELN9__gnu_cxx12_Lock_policyE2EED2Ev
	.align 2
	.type	_ZNSt19_Sp_counted_deleterIDnZ4mainEUlzE_SaIvELN9__gnu_cxx12_Lock_policyE2EED0Ev, @function
_ZNSt19_Sp_counted_deleterIDnZ4mainEUlzE_SaIvELN9__gnu_cxx12_Lock_policyE2EED0Ev:
.LFB4096:
	.cfi_startproc
	endbr64
	movl	$48, %esi
	jmp	_ZdlPvm@PLT
	.cfi_endproc
.LFE4096:
	.size	_ZNSt19_Sp_counted_deleterIDnZ4mainEUlzE_SaIvELN9__gnu_cxx12_Lock_policyE2EED0Ev, .-_ZNSt19_Sp_counted_deleterIDnZ4mainEUlzE_SaIvELN9__gnu_cxx12_Lock_policyE2EED0Ev
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"free"
	.text
	.align 2
	.type	_ZZ4mainENKUlzE_clEz, @function
_ZZ4mainENKUlzE_clEz:
.LFB3809:
	.cfi_startproc
	pushq	%rbx
	.cfi_def_cfa_offset 16
	.cfi_offset 3, -16
	movq	(%rdi), %rax
	movq	%rdi, %rbx
	movq	(%rax), %rdi
	call	cudaFree@PLT
	movq	8(%rbx), %rax
	movq	(%rax), %rdi
	call	cudaEventDestroy@PLT
	movq	16(%rbx), %rax
	movq	(%rax), %rdi
	call	cudaEventDestroy@PLT
	leaq	.LC0(%rip), %rsi
	movl	$2, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	popq	%rbx
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE3809:
	.size	_ZZ4mainENKUlzE_clEz, .-_ZZ4mainENKUlzE_clEz
	.align 2
	.type	_ZNSt19_Sp_counted_deleterIDnZ4mainEUlzE_SaIvELN9__gnu_cxx12_Lock_policyE2EE10_M_disposeEv, @function
_ZNSt19_Sp_counted_deleterIDnZ4mainEUlzE_SaIvELN9__gnu_cxx12_Lock_policyE2EE10_M_disposeEv:
.LFB4097:
	.cfi_startproc
	.cfi_personality 0x9b,DW.ref.__gxx_personality_v0
	.cfi_lsda 0x1b,.LLSDA4097
	endbr64
	pushq	%rax
	.cfi_def_cfa_offset 16
	addq	$16, %rdi
	xorl	%esi, %esi
	xorl	%eax, %eax
	call	_ZZ4mainENKUlzE_clEz
	popq	%rdx
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE4097:
	.globl	__gxx_personality_v0
	.section	.gcc_except_table,"a",@progbits
.LLSDA4097:
	.byte	0xff
	.byte	0xff
	.byte	0x1
	.uleb128 .LLSDACSE4097-.LLSDACSB4097
.LLSDACSB4097:
.LLSDACSE4097:
	.text
	.size	_ZNSt19_Sp_counted_deleterIDnZ4mainEUlzE_SaIvELN9__gnu_cxx12_Lock_policyE2EE10_M_disposeEv, .-_ZNSt19_Sp_counted_deleterIDnZ4mainEUlzE_SaIvELN9__gnu_cxx12_Lock_policyE2EE10_M_disposeEv
	.type	_ZL26__cudaUnregisterBinaryUtilv, @function
_ZL26__cudaUnregisterBinaryUtilv:
.LFB3818:
	.cfi_startproc
	endbr64
	movq	_ZL20__cudaFatCubinHandle(%rip), %rdi
	jmp	__cudaUnregisterFatBinary@PLT
	.cfi_endproc
.LFE3818:
	.size	_ZL26__cudaUnregisterBinaryUtilv, .-_ZL26__cudaUnregisterBinaryUtilv
	.align 2
	.type	_ZNSt19_Sp_counted_deleterIDnZ4mainEUlzE_SaIvELN9__gnu_cxx12_Lock_policyE2EE10_M_destroyEv, @function
_ZNSt19_Sp_counted_deleterIDnZ4mainEUlzE_SaIvELN9__gnu_cxx12_Lock_policyE2EE10_M_destroyEv:
.LFB4098:
	.cfi_startproc
	endbr64
	movl	$48, %esi
	jmp	_ZdlPvm@PLT
	.cfi_endproc
.LFE4098:
	.size	_ZNSt19_Sp_counted_deleterIDnZ4mainEUlzE_SaIvELN9__gnu_cxx12_Lock_policyE2EE10_M_destroyEv, .-_ZNSt19_Sp_counted_deleterIDnZ4mainEUlzE_SaIvELN9__gnu_cxx12_Lock_policyE2EE10_M_destroyEv
	.align 2
	.type	_ZNSt19_Sp_counted_deleterIDnZ4mainEUlzE_SaIvELN9__gnu_cxx12_Lock_policyE2EE14_M_get_deleterERKSt9type_info, @function
_ZNSt19_Sp_counted_deleterIDnZ4mainEUlzE_SaIvELN9__gnu_cxx12_Lock_policyE2EE14_M_get_deleterERKSt9type_info:
.LFB4099:
	.cfi_startproc
	endbr64
	pushq	%rbx
	.cfi_def_cfa_offset 16
	.cfi_offset 3, -16
	movq	%rdi, %rbx
	movq	8(%rsi), %rdi
	leaq	_ZTSZ4mainEUlzE_(%rip), %rax
	cmpq	%rax, %rdi
	jne	.L10
.L12:
	leaq	16(%rbx), %rax
	jmp	.L9
.L10:
	xorl	%eax, %eax
	cmpb	$42, (%rdi)
	je	.L9
	leaq	1+_ZTSZ4mainEUlzE_(%rip), %rsi
	call	strcmp@PLT
	testl	%eax, %eax
	je	.L12
	xorl	%eax, %eax
.L9:
	popq	%rbx
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE4099:
	.size	_ZNSt19_Sp_counted_deleterIDnZ4mainEUlzE_SaIvELN9__gnu_cxx12_Lock_policyE2EE14_M_get_deleterERKSt9type_info, .-_ZNSt19_Sp_counted_deleterIDnZ4mainEUlzE_SaIvELN9__gnu_cxx12_Lock_policyE2EE14_M_get_deleterERKSt9type_info
	.globl	_Z8inCircleP17curandStateXORWOW
	.type	_Z8inCircleP17curandStateXORWOW, @function
_Z8inCircleP17curandStateXORWOW:
.LFB3807:
	.cfi_startproc
	endbr64
	pushq	%rax
	.cfi_def_cfa_offset 16
	popq	%rax
	.cfi_def_cfa_offset 8
	subq	$24, %rsp
	.cfi_def_cfa_offset 32
	movl	$1, 12(%rsp)
	movl	12(%rsp), %edi
	call	exit@PLT
	.cfi_endproc
.LFE3807:
	.size	_Z8inCircleP17curandStateXORWOW, .-_Z8inCircleP17curandStateXORWOW
	.globl	_Z47__device_stub__Z26CalculatePointsIntheCirclePiiPii
	.type	_Z47__device_stub__Z26CalculatePointsIntheCirclePiiPii, @function
_Z47__device_stub__Z26CalculatePointsIntheCirclePiiPii:
.LFB3840:
	.cfi_startproc
	endbr64
	subq	$120, %rsp
	.cfi_def_cfa_offset 128
	movq	%rdi, 8(%rsp)
	leaq	32(%rsp), %rcx
	leaq	24(%rsp), %rdx
	movl	%esi, 4(%rsp)
	leaq	40(%rsp), %rdi
	leaq	52(%rsp), %rsi
	movq	%fs:40, %rax
	movq	%rax, 104(%rsp)
	xorl	%eax, %eax
	leaq	8(%rsp), %rax
	movl	$1, 48(%rsp)
	movq	%rax, 88(%rsp)
	leaq	4(%rsp), %rax
	movq	%rax, 96(%rsp)
	movabsq	$4294967297, %rax
	movq	%rax, 40(%rsp)
	movq	%rax, 52(%rsp)
	movl	$1, 60(%rsp)
	call	__cudaPopCallConfiguration@PLT
	testl	%eax, %eax
	jne	.L21
	pushq	32(%rsp)
	.cfi_def_cfa_offset 136
	leaq	_Z26CalculatePointsIntheCirclePii(%rip), %rdi
	pushq	32(%rsp)
	.cfi_def_cfa_offset 144
	movq	68(%rsp), %rcx
	movl	76(%rsp), %r8d
	movq	56(%rsp), %rsi
	movl	64(%rsp), %edx
	leaq	104(%rsp), %r9
	call	cudaLaunchKernel@PLT
	popq	%rax
	.cfi_def_cfa_offset 136
	popq	%rdx
	.cfi_def_cfa_offset 128
.L21:
	movq	104(%rsp), %rax
	subq	%fs:40, %rax
	je	.L23
	call	__stack_chk_fail@PLT
.L23:
	addq	$120, %rsp
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE3840:
	.size	_Z47__device_stub__Z26CalculatePointsIntheCirclePiiPii, .-_Z47__device_stub__Z26CalculatePointsIntheCirclePiiPii
	.globl	_Z26CalculatePointsIntheCirclePii
	.type	_Z26CalculatePointsIntheCirclePii, @function
_Z26CalculatePointsIntheCirclePii:
.LFB3841:
	.cfi_startproc
	endbr64
	jmp	_Z47__device_stub__Z26CalculatePointsIntheCirclePiiPii
	.cfi_endproc
.LFE3841:
	.size	_Z26CalculatePointsIntheCirclePii, .-_Z26CalculatePointsIntheCirclePii
	.section	.rodata.str1.1
.LC1:
	.string	"_Z26CalculatePointsIntheCirclePii"
.LC2:
	.string	"precalc_xorwow_matrix"
.LC3:
	.string	"precalc_xorwow_offset_matrix"
.LC4:
	.string	"mrg32k3aM1"
.LC5:
	.string	"mrg32k3aM2"
.LC6:
	.string	"mrg32k3aM1SubSeq"
.LC7:
	.string	"mrg32k3aM2SubSeq"
.LC8:
	.string	"mrg32k3aM1Seq"
.LC9:
	.string	"mrg32k3aM2Seq"
.LC10:
	.string	"__cr_lgamma_table"
	.section	.text.startup,"ax",@progbits
	.type	_ZL24__sti____cudaRegisterAllv, @function
_ZL24__sti____cudaRegisterAllv:
.LFB3843:
	.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
	xorl	%r9d, %r9d
	orl	$-1, %r8d
	pushq	$0
	.cfi_def_cfa_offset 32
	leaq	.LC1(%rip), %rdx
	movq	%rax, %rdi
	movq	%rax, %rbx
	pushq	$0
	.cfi_def_cfa_offset 40
	movq	%rdx, %rcx
	leaq	_Z26CalculatePointsIntheCirclePii(%rip), %rsi
	pushq	$0
	.cfi_def_cfa_offset 48
	movq	%rax, _ZL20__cudaFatCubinHandle(%rip)
	call	__cudaRegisterFunction@PLT
	addq	$32, %rsp
	.cfi_def_cfa_offset 16
	movq	%rbx, %rdi
	xorl	%r8d, %r8d
	pushq	$0
	.cfi_def_cfa_offset 24
	leaq	.LC2(%rip), %rdx
	movl	$102400, %r9d
	leaq	_ZL21precalc_xorwow_matrix(%rip), %rsi
	pushq	$0
	.cfi_def_cfa_offset 32
	movq	%rdx, %rcx
	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	.LC3(%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	.LC4(%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	.LC5(%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	.LC6(%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	.LC7(%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	.LC8(%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	.LC9(%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	.LC10(%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
.LFE3843:
	.size	_ZL24__sti____cudaRegisterAllv, .-_ZL24__sti____cudaRegisterAllv
	.section	.init_array,"aw"
	.align 8
	.quad	_ZL24__sti____cudaRegisterAllv
	.section	.text._ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE24_M_release_last_use_coldEv,"axG",@progbits,_ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE24_M_release_last_use_coldEv,comdat
	.align 2
	.weak	_ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE24_M_release_last_use_coldEv
	.type	_ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE24_M_release_last_use_coldEv, @function
_ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE24_M_release_last_use_coldEv:
.LFB3895:
	.cfi_startproc
	endbr64
	subq	$24, %rsp
	.cfi_def_cfa_offset 32
	movq	(%rdi), %rax
	movq	%rdi, 8(%rsp)
	call	*16(%rax)
	cmpb	$0, __libc_single_threaded(%rip)
	movq	8(%rsp), %rdi
	je	.L29
	movl	12(%rdi), %eax
	leal	-1(%rax), %edx
	movl	%edx, 12(%rdi)
	jmp	.L30
.L29:
	orl	$-1, %eax
	lock xaddl	%eax, 12(%rdi)
.L30:
	decl	%eax
	jne	.L28
	movq	(%rdi), %rax
	movq	24(%rax), %rax
	addq	$24, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 8
	jmp	*%rax
.L28:
	.cfi_restore_state
	addq	$24, %rsp
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE3895:
	.size	_ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE24_M_release_last_use_coldEv, .-_ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE24_M_release_last_use_coldEv
	.section	.text._ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EED2Ev,"axG",@progbits,_ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EED5Ev,comdat
	.align 2
	.weak	_ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EED2Ev
	.type	_ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EED2Ev, @function
_ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EED2Ev:
.LFB3928:
	.cfi_startproc
	endbr64
	movq	(%rdi), %rdi
	testq	%rdi, %rdi
	je	.L33
	movq	8(%rdi), %rcx
	leaq	8(%rdi), %rdx
	movabsq	$4294967297, %rax
	cmpq	%rax, %rcx
	jne	.L36
	xorl	%eax, %eax
	subq	$24, %rsp
	.cfi_def_cfa_offset 32
	movq	%rax, 8(%rdi)
	movq	(%rdi), %rax
	movq	%rdi, 8(%rsp)
	call	*16(%rax)
	movq	8(%rsp), %rdi
	movq	(%rdi), %rax
	movq	24(%rax), %rax
	addq	$24, %rsp
	.cfi_def_cfa_offset 8
	jmp	*%rax
.L36:
	cmpb	$0, __libc_single_threaded(%rip)
	je	.L37
	movl	8(%rdi), %eax
	leal	-1(%rax), %edx
	movl	%edx, 8(%rdi)
	jmp	.L38
.L37:
	orl	$-1, %eax
	lock xaddl	%eax, (%rdx)
.L38:
	decl	%eax
	jne	.L33
	jmp	_ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE24_M_release_last_use_coldEv
.L33:
	ret
	.cfi_endproc
.LFE3928:
	.size	_ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EED2Ev, .-_ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EED2Ev
	.weak	_ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EED1Ev
	.set	_ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EED1Ev,_ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EED2Ev
	.section	.rodata.str1.1
.LC13:
	.string	"Result pi %f \n"
.LC14:
	.string	"Elapsed time %3.1f ms\n"
	.section	.text.startup
	.globl	main
	.type	main, @function
main:
.LFB3808:
	.cfi_startproc
	.cfi_personality 0x9b,DW.ref.__gxx_personality_v0
	.cfi_lsda 0x1b,.LLSDA3808
	endbr64
	pushq	%r13
	.cfi_def_cfa_offset 16
	.cfi_offset 13, -16
	pushq	%r12
	.cfi_def_cfa_offset 24
	.cfi_offset 12, -24
	pushq	%rbp
	.cfi_def_cfa_offset 32
	.cfi_offset 6, -32
	pushq	%rbx
	.cfi_def_cfa_offset 40
	.cfi_offset 3, -40
	subq	$4096, %rsp
	.cfi_def_cfa_offset 4136
	orq	$0, (%rsp)
	subq	$104, %rsp
	.cfi_def_cfa_offset 4240
	movl	$1024, %ecx
	movl	$4096, %esi
	movq	%fs:40, %rax
	movq	%rax, 4184(%rsp)
	xorl	%eax, %eax
	leaq	88(%rsp), %rbx
	leaq	8(%rsp), %r13
	movq	%rbx, %rdi
	leaq	16(%rsp), %r12
	leaq	24(%rsp), %rbp
	rep stosl
	movq	%r13, %rdi
.LEHB0:
	call	cudaMalloc@PLT
	movq	%r12, %rdi
	call	cudaEventCreate@PLT
	movq	%rbp, %rdi
	call	cudaEventCreate@PLT
	movq	16(%rsp), %rdi
	xorl	%esi, %esi
	call	cudaEventRecord@PLT
.LEHE0:
	xorl	%ecx, %ecx
	xorl	%esi, %esi
	movl	$48, %edi
	movq	%rcx, 48(%rsp)
	movq	%r13, 64(%rsp)
	movq	%r12, 72(%rsp)
	movq	%rbp, 80(%rsp)
	movq	%rsi, 56(%rsp)
.LEHB1:
	call	_Znwm@PLT
.LEHE1:
	movabsq	$4294967297, %rdx
	movq	%rbp, 32(%rax)
	movq	%rdx, 8(%rax)
	leaq	16+_ZTVSt19_Sp_counted_deleterIDnZ4mainEUlzE_SaIvELN9__gnu_cxx12_Lock_policyE2EE(%rip), %rdx
	movq	%rdx, (%rax)
	xorl	%edx, %edx
	movq	%rdx, 40(%rax)
	movq	%r13, 16(%rax)
	movq	%r12, 24(%rax)
	movq	%rax, 56(%rsp)
	movabsq	$25769803782, %rax
	movq	%rax, 36(%rsp)
	movabsq	$137438953504, %rax
	movl	$1, 44(%rsp)
	movq	%rax, 64(%rsp)
	movl	$1, 72(%rsp)
	call	_ZNSt6chrono3_V212system_clock3nowEv@PLT
	movl	72(%rsp), %ecx
	movl	44(%rsp), %esi
	xorl	%r9d, %r9d
	movq	64(%rsp), %rdx
	movq	36(%rsp), %rdi
	xorl	%r8d, %r8d
	movq	%rax, %rbp
.LEHB2:
	call	__cudaPushCallConfiguration@PLT
.LEHE2:
	movq	8(%rsp), %rdi
	testl	%eax, %eax
	jne	.L49
	jmp	.L63
.L55:
	endbr64
	movq	%rax, %rdi
.L45:
	call	__cxa_begin_catch@PLT
	leaq	64(%rsp), %rdi
	xorl	%esi, %esi
	xorl	%eax, %eax
.LEHB3:
	call	_ZZ4mainENKUlzE_clEz
	movq	4184(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L59
	call	__cxa_rethrow@PLT
.LEHE3:
.L56:
	endbr64
	movq	%rax, %rbx
.L47:
	call	__cxa_end_catch@PLT
	jmp	.L62
.L63:
	movq	%rbp, %rax
	movl	$1000000, %ecx
	cqto
	idivq	%rcx
	movq	%rax, %rsi
.LEHB4:
	call	_Z47__device_stub__Z26CalculatePointsIntheCirclePiiPii
.L49:
	movq	8(%rsp), %rsi
	movl	$2, %ecx
	movl	$4096, %edx
	movq	%rbx, %rdi
	call	cudaMemcpy@PLT
	xorl	%eax, %eax
	leaq	4180(%rsp), %rdx
.L50:
	addl	(%rbx), %eax
	addq	$4, %rbx
	cmpq	%rdx, %rbx
	jne	.L50
	cvtsi2ssl	%eax, %xmm0
	leaq	.LC13(%rip), %rsi
	movb	$1, %al
	movl	$2, %edi
	mulss	.LC11(%rip), %xmm0
	divss	.LC12(%rip), %xmm0
	cvtss2sd	%xmm0, %xmm0
	call	__printf_chk@PLT
	movq	24(%rsp), %rdi
	xorl	%esi, %esi
	call	cudaEventRecord@PLT
	movq	24(%rsp), %rdi
	call	cudaEventSynchronize@PLT
	movq	24(%rsp), %rdx
	movq	16(%rsp), %rsi
	leaq	4(%rsp), %rdi
	call	cudaEventElapsedTime@PLT
	leaq	.LC14(%rip), %rsi
	movl	$2, %edi
	movb	$1, %al
	cvtss2sd	4(%rsp), %xmm0
	call	__printf_chk@PLT
.LEHE4:
	leaq	56(%rsp), %rdi
	call	_ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EED1Ev
	movq	4184(%rsp), %rax
	subq	%fs:40, %rax
	je	.L53
	jmp	.L59
.L54:
	endbr64
	movq	%rax, %rbx
.L51:
	leaq	56(%rsp), %rdi
	call	_ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EED1Ev
.L62:
	movq	4184(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L59
	movq	%rbx, %rdi
.LEHB5:
	call	_Unwind_Resume@PLT
.LEHE5:
.L59:
	call	__stack_chk_fail@PLT
.L53:
	addq	$4200, %rsp
	.cfi_def_cfa_offset 40
	xorl	%eax, %eax
	popq	%rbx
	.cfi_def_cfa_offset 32
	popq	%rbp
	.cfi_def_cfa_offset 24
	popq	%r12
	.cfi_def_cfa_offset 16
	popq	%r13
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE3808:
	.section	.gcc_except_table
	.align 4
.LLSDA3808:
	.byte	0xff
	.byte	0x9b
	.uleb128 .LLSDATT3808-.LLSDATTD3808
.LLSDATTD3808:
	.byte	0x1
	.uleb128 .LLSDACSE3808-.LLSDACSB3808
.LLSDACSB3808:
	.uleb128 .LEHB0-.LFB3808
	.uleb128 .LEHE0-.LEHB0
	.uleb128 0
	.uleb128 0
	.uleb128 .LEHB1-.LFB3808
	.uleb128 .LEHE1-.LEHB1
	.uleb128 .L55-.LFB3808
	.uleb128 0x1
	.uleb128 .LEHB2-.LFB3808
	.uleb128 .LEHE2-.LEHB2
	.uleb128 .L54-.LFB3808
	.uleb128 0
	.uleb128 .LEHB3-.LFB3808
	.uleb128 .LEHE3-.LEHB3
	.uleb128 .L56-.LFB3808
	.uleb128 0
	.uleb128 .LEHB4-.LFB3808
	.uleb128 .LEHE4-.LEHB4
	.uleb128 .L54-.LFB3808
	.uleb128 0
	.uleb128 .LEHB5-.LFB3808
	.uleb128 .LEHE5-.LEHB5
	.uleb128 0
	.uleb128 0
.LLSDACSE3808:
	.byte	0x1
	.byte	0
	.align 4
	.long	0

.LLSDATT3808:
	.section	.text.startup
	.size	main, .-main
	.weak	_ZTSSt11_Mutex_baseILN9__gnu_cxx12_Lock_policyE2EE
	.section	.rodata._ZTSSt11_Mutex_baseILN9__gnu_cxx12_Lock_policyE2EE,"aG",@progbits,_ZTSSt11_Mutex_baseILN9__gnu_cxx12_Lock_policyE2EE,comdat
	.align 32
	.type	_ZTSSt11_Mutex_baseILN9__gnu_cxx12_Lock_policyE2EE, @object
	.size	_ZTSSt11_Mutex_baseILN9__gnu_cxx12_Lock_policyE2EE, 47
_ZTSSt11_Mutex_baseILN9__gnu_cxx12_Lock_policyE2EE:
	.string	"St11_Mutex_baseILN9__gnu_cxx12_Lock_policyE2EE"
	.weak	_ZTISt11_Mutex_baseILN9__gnu_cxx12_Lock_policyE2EE
	.section	.data.rel.ro._ZTISt11_Mutex_baseILN9__gnu_cxx12_Lock_policyE2EE,"awG",@progbits,_ZTISt11_Mutex_baseILN9__gnu_cxx12_Lock_policyE2EE,comdat
	.align 8
	.type	_ZTISt11_Mutex_baseILN9__gnu_cxx12_Lock_policyE2EE, @object
	.size	_ZTISt11_Mutex_baseILN9__gnu_cxx12_Lock_policyE2EE, 16
_ZTISt11_Mutex_baseILN9__gnu_cxx12_Lock_policyE2EE:
	.quad	_ZTVN10__cxxabiv117__class_type_infoE+16
	.quad	_ZTSSt11_Mutex_baseILN9__gnu_cxx12_Lock_policyE2EE
	.section	.rodata
	.align 8
	.type	_ZTSZ4mainEUlzE_, @object
	.size	_ZTSZ4mainEUlzE_, 14
_ZTSZ4mainEUlzE_:
	.string	"*Z4mainEUlzE_"
	.weak	_ZTSSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE
	.section	.rodata._ZTSSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE,"aG",@progbits,_ZTSSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE,comdat
	.align 32
	.type	_ZTSSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE, @object
	.size	_ZTSSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE, 52
_ZTSSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE:
	.string	"St16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE"
	.weak	_ZTISt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE
	.section	.data.rel.ro._ZTISt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE,"awG",@progbits,_ZTISt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE,comdat
	.align 8
	.type	_ZTISt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE, @object
	.size	_ZTISt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE, 24
_ZTISt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE:
	.quad	_ZTVN10__cxxabiv120__si_class_type_infoE+16
	.quad	_ZTSSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE
	.quad	_ZTISt11_Mutex_baseILN9__gnu_cxx12_Lock_policyE2EE
	.section	.data.rel.ro,"aw"
	.align 8
	.type	_ZTISt19_Sp_counted_deleterIDnZ4mainEUlzE_SaIvELN9__gnu_cxx12_Lock_policyE2EE, @object
	.size	_ZTISt19_Sp_counted_deleterIDnZ4mainEUlzE_SaIvELN9__gnu_cxx12_Lock_policyE2EE, 24
_ZTISt19_Sp_counted_deleterIDnZ4mainEUlzE_SaIvELN9__gnu_cxx12_Lock_policyE2EE:
	.quad	_ZTVN10__cxxabiv120__si_class_type_infoE+16
	.quad	_ZTSSt19_Sp_counted_deleterIDnZ4mainEUlzE_SaIvELN9__gnu_cxx12_Lock_policyE2EE
	.quad	_ZTISt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE
	.section	.rodata
	.align 32
	.type	_ZTSSt19_Sp_counted_deleterIDnZ4mainEUlzE_SaIvELN9__gnu_cxx12_Lock_policyE2EE, @object
	.size	_ZTSSt19_Sp_counted_deleterIDnZ4mainEUlzE_SaIvELN9__gnu_cxx12_Lock_policyE2EE, 75
_ZTSSt19_Sp_counted_deleterIDnZ4mainEUlzE_SaIvELN9__gnu_cxx12_Lock_policyE2EE:
	.string	"*St19_Sp_counted_deleterIDnZ4mainEUlzE_SaIvELN9__gnu_cxx12_Lock_policyE2EE"
	.section	.data.rel.ro.local,"aw"
	.align 8
	.type	_ZTVSt19_Sp_counted_deleterIDnZ4mainEUlzE_SaIvELN9__gnu_cxx12_Lock_policyE2EE, @object
	.size	_ZTVSt19_Sp_counted_deleterIDnZ4mainEUlzE_SaIvELN9__gnu_cxx12_Lock_policyE2EE, 56
_ZTVSt19_Sp_counted_deleterIDnZ4mainEUlzE_SaIvELN9__gnu_cxx12_Lock_policyE2EE:
	.quad	0
	.quad	_ZTISt19_Sp_counted_deleterIDnZ4mainEUlzE_SaIvELN9__gnu_cxx12_Lock_policyE2EE
	.quad	_ZNSt19_Sp_counted_deleterIDnZ4mainEUlzE_SaIvELN9__gnu_cxx12_Lock_policyE2EED1Ev
	.quad	_ZNSt19_Sp_counted_deleterIDnZ4mainEUlzE_SaIvELN9__gnu_cxx12_Lock_policyE2EED0Ev
	.quad	_ZNSt19_Sp_counted_deleterIDnZ4mainEUlzE_SaIvELN9__gnu_cxx12_Lock_policyE2EE10_M_disposeEv
	.quad	_ZNSt19_Sp_counted_deleterIDnZ4mainEUlzE_SaIvELN9__gnu_cxx12_Lock_policyE2EE10_M_destroyEv
	.quad	_ZNSt19_Sp_counted_deleterIDnZ4mainEUlzE_SaIvELN9__gnu_cxx12_Lock_policyE2EE14_M_get_deleterERKSt9type_info
	.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.cst4,"aM",@progbits,4
	.align 4
.LC11:
	.long	1082130432
	.align 4
.LC12:
	.long	1192230912
	.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 <hip/hip_runtime.h>


#include "hiprand/hiprand_kernel.h"

#include <memory>
#include <ctime>
#include <stdio.h>
#include <stdlib.h>
#include <chrono>
#include <algorithm>
#include <numeric>   


using defer = std::shared_ptr<void>;

#define HEIGHT 32
#define WIDTH 32
#define hBLOCKS 6
#define wBLOCKS 6

//return resurl of this expression (x*x + y*y <= 1)
__device__ bool inCircle(hiprandState_t* state)
{
    float x = hiprand_uniform(state);
    float y = hiprand_uniform(state);
    return x * x + y * y <= 1.0f;
}


__global__ void CalculatePointsIntheCircle(int* result, int randseed)
{
    hiprandState_t state;
    unsigned long long seed = (threadIdx.x + blockDim.x * blockIdx.x) + (threadIdx.y + blockDim.y * blockIdx.y) * (randseed % 1000);

    //init curand
    hiprand_init(seed, 0, 0, &state);

    if (inCircle(&state))
    {
        atomicAdd(&result[threadIdx.x * HEIGHT + threadIdx.y], 1);
    }
    return;
}

int main()
{
    const size_t size = WIDTH * HEIGHT;
    int count [size];
    memset(&count, 0, size * sizeof(int));
    int* dev_count;

    hipMalloc((void**)&dev_count, size * sizeof(int));
    
    // starting the timer here so that we include the cost of
    // all of the operations on the GPU.
    hipEvent_t start, stop;
    hipEventCreate(&start);
    hipEventCreate(&stop);
    hipEventRecord(start, 0);

    //use un_ptr, that don`t forget free memory
    defer _(nullptr, [&](...)
        { hipFree(dev_count);  hipEventDestroy(start); hipEventDestroy(stop);  printf("free"); });

    dim3 blocks(hBLOCKS, wBLOCKS, 1);
    dim3 threads(HEIGHT, WIDTH, 1);

    int randseed = std::chrono::duration_cast<std::chrono::milliseconds>
        (std::chrono::system_clock::now().time_since_epoch()).count();

    CalculatePointsIntheCircle <<<blocks, threads >>> (dev_count, randseed);

    hipMemcpy(&count, dev_count, size * sizeof(int), hipMemcpyDeviceToHost);
    // result pi

    int ans = 0;
    ans = std::accumulate(&count[0], &count[size - 1], ans);

    float fullsize = static_cast<float>(HEIGHT * WIDTH * hBLOCKS * wBLOCKS);
    float pi = (4.0f * static_cast<float>(ans));
    pi /=  fullsize;
    printf("Result pi %f \n", pi);

    //print elapsed time
    hipEventRecord(stop, 0);
    hipEventSynchronize(stop);
    float   elapsedTime;
    hipEventElapsedTime(&elapsedTime, start, stop);
    printf( "Elapsed time %3.1f ms\n", elapsedTime );

    return 0;
}
	.text
	.file	"kernel.hip"
	.globl	_Z41__device_stub__CalculatePointsIntheCirclePii # -- Begin function _Z41__device_stub__CalculatePointsIntheCirclePii
	.type	_Z41__device_stub__CalculatePointsIntheCirclePii,@function
_Z41__device_stub__CalculatePointsIntheCirclePii: # @_Z41__device_stub__CalculatePointsIntheCirclePii
	.cfi_startproc
# %bb.0:
	pushq	%r15
	.cfi_def_cfa_offset 16
	pushq	%r14
	.cfi_def_cfa_offset 24
	pushq	%r13
	.cfi_def_cfa_offset 32
	pushq	%r12
	.cfi_def_cfa_offset 40
	pushq	%rbx
	.cfi_def_cfa_offset 48
	subq	$80, %rsp
	.cfi_def_cfa_offset 128
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r13, -32
	.cfi_offset %r14, -24
	.cfi_offset %r15, -16
	leaq	24(%rsp), %rax
	movq	%rdi, (%rax)
	leaq	4(%rsp), %rcx
	movl	%esi, (%rcx)
	leaq	64(%rsp), %rbx
	movq	%rax, (%rbx)
	movq	%rcx, 8(%rbx)
	leaq	48(%rsp), %r14
	leaq	32(%rsp), %r15
	leaq	16(%rsp), %r12
	leaq	8(%rsp), %r13
	movq	%r14, %rdi
	movq	%r15, %rsi
	movq	%r12, %rdx
	movq	%r13, %rcx
	callq	__hipPopCallConfiguration
	movq	(%r14), %rsi
	movl	8(%r14), %edx
	movq	(%r15), %rcx
	movl	8(%r15), %r8d
	movl	$_Z26CalculatePointsIntheCirclePii, %edi
	movq	%rbx, %r9
	pushq	(%r13)
	.cfi_adjust_cfa_offset 8
	pushq	(%r12)
	.cfi_adjust_cfa_offset 8
	callq	hipLaunchKernel
	addq	$96, %rsp
	.cfi_adjust_cfa_offset -96
	popq	%rbx
	.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
	retq
.Lfunc_end0:
	.size	_Z41__device_stub__CalculatePointsIntheCirclePii, .Lfunc_end0-_Z41__device_stub__CalculatePointsIntheCirclePii
	.cfi_endproc
                                        # -- End function
	.section	.rodata.cst4,"aM",@progbits,4
	.p2align	2, 0x0                          # -- Begin function main
.LCPI1_0:
	.long	0x40800000                      # float 4
.LCPI1_1:
	.long	0x47100000                      # float 36864
	.text
	.globl	main
	.type	main,@function
main:                                   # @main
.Lfunc_begin0:
	.cfi_startproc
	.cfi_personality 3, __gxx_personality_v0
	.cfi_lsda 3, .Lexception0
# %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	$4168, %rsp                     # imm = 0x1048
	.cfi_def_cfa_offset 4208
	.cfi_offset %rbx, -40
	.cfi_offset %r12, -32
	.cfi_offset %r14, -24
	.cfi_offset %r15, -16
	leaq	64(%rsp), %rdi
	movl	$4096, %edx                     # imm = 0x1000
	xorl	%esi, %esi
	callq	memset@PLT
	leaq	8(%rsp), %r14
	movl	$4096, %esi                     # imm = 0x1000
	movq	%r14, %rdi
	callq	hipMalloc
	leaq	16(%rsp), %r15
	movq	%r15, %rdi
	callq	hipEventCreate
	movq	%rsp, %r12
	movq	%r12, %rdi
	callq	hipEventCreate
	movq	(%r15), %rdi
	xorl	%esi, %esi
	callq	hipEventRecord
	xorps	%xmm0, %xmm0
	movups	%xmm0, 48(%rsp)
	movq	%r14, 24(%rsp)
	movq	%r15, 32(%rsp)
	movq	%r12, 40(%rsp)
.Ltmp0:
	movl	$48, %edi
	callq	_Znwm
.Ltmp1:
# %bb.1:
	leaq	56(%rsp), %rbx
	movq	%r14, 16(%rax)
	movq	%r15, 24(%rax)
	movq	%r12, 32(%rax)
	movabsq	$4294967297, %rcx               # imm = 0x100000001
	movq	%rcx, 8(%rax)
	movq	$_ZTVSt19_Sp_counted_deleterIDnZ4mainEUlzE_SaIvELN9__gnu_cxx12_Lock_policyE2EE+16, (%rax)
	movq	$0, 40(%rax)
	movq	%rax, (%rbx)
	callq	_ZNSt6chrono3_V212system_clock3nowEv
	movabsq	$4835703278458516699, %rcx      # imm = 0x431BDE82D7B634DB
	imulq	%rcx
	movq	%rdx, %r14
.Ltmp11:
	movabsq	$25769803782, %rdi              # imm = 0x600000006
	movabsq	$137438953504, %rdx             # imm = 0x2000000020
	movl	$1, %esi
	movl	$1, %ecx
	xorl	%r8d, %r8d
	xorl	%r9d, %r9d
	callq	__hipPushCallConfiguration
.Ltmp12:
# %bb.2:
	testl	%eax, %eax
	jne	.LBB1_4
# %bb.3:
	movq	%r14, %rax
	shrq	$63, %rax
	shrq	$18, %r14
	addl	%eax, %r14d
	movq	8(%rsp), %rdi
.Ltmp13:
	movl	%r14d, %esi
	callq	_Z41__device_stub__CalculatePointsIntheCirclePii
.Ltmp14:
.LBB1_4:
	movq	8(%rsp), %rsi
.Ltmp15:
	leaq	64(%rsp), %rdi
	movl	$4096, %edx                     # imm = 0x1000
	movl	$2, %ecx
	callq	hipMemcpy
.Ltmp16:
# %bb.5:                                # %.lr.ph.i.preheader
	xorl	%eax, %eax
	xorl	%ecx, %ecx
.LBB1_6:                                # %.lr.ph.i
                                        # =>This Inner Loop Header: Depth=1
	addl	64(%rsp,%rcx), %eax
	addq	$4, %rcx
	cmpq	$4092, %rcx                     # imm = 0xFFC
	jne	.LBB1_6
# %bb.7:                                # %_ZSt10accumulateIPiiET0_T_S2_S1_.exit
	xorps	%xmm0, %xmm0
	cvtsi2ss	%eax, %xmm0
	mulss	.LCPI1_0(%rip), %xmm0
	divss	.LCPI1_1(%rip), %xmm0
	cvtss2sd	%xmm0, %xmm0
	movl	$.L.str, %edi
	movb	$1, %al
	callq	printf
	movq	(%rsp), %rdi
.Ltmp18:
	xorl	%esi, %esi
	callq	hipEventRecord
.Ltmp19:
# %bb.8:
	movq	(%rsp), %rdi
.Ltmp20:
	callq	hipEventSynchronize
.Ltmp21:
# %bb.9:
	movq	16(%rsp), %rsi
	movq	(%rsp), %rdx
.Ltmp23:
	leaq	24(%rsp), %rdi
	callq	hipEventElapsedTime
.Ltmp24:
# %bb.10:
	xorps	%xmm0, %xmm0
	cvtss2sd	24(%rsp), %xmm0
	movl	$.L.str.1, %edi
	movb	$1, %al
	callq	printf
	movq	%rbx, %rdi
	callq	_ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EED2Ev
	xorl	%eax, %eax
	addq	$4168, %rsp                     # imm = 0x1048
	.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_19:
	.cfi_def_cfa_offset 4208
.Ltmp25:
	jmp	.LBB1_20
.LBB1_11:
.Ltmp2:
	movq	%rax, %rdi
	callq	__cxa_begin_catch
.Ltmp3:
	leaq	24(%rsp), %rdi
	callq	_ZZ4mainENKUlzE_clEz
.Ltmp4:
# %bb.12:
.Ltmp5:
	callq	__cxa_rethrow
.Ltmp6:
# %bb.16:
.LBB1_13:
.Ltmp7:
	movq	%rax, %r14
.Ltmp8:
	callq	__cxa_end_catch
.Ltmp9:
	jmp	.LBB1_14
.LBB1_15:
.Ltmp10:
	movq	%rax, %rdi
	callq	__clang_call_terminate
.LBB1_18:
.Ltmp22:
	jmp	.LBB1_20
.LBB1_17:
.Ltmp17:
.LBB1_20:
	movq	%rax, %r14
	movq	%rbx, %rdi
	callq	_ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EED2Ev
.LBB1_14:                               # %common.resume
	movq	%r14, %rdi
	callq	_Unwind_Resume@PLT
.Lfunc_end1:
	.size	main, .Lfunc_end1-main
	.cfi_endproc
	.section	.gcc_except_table,"a",@progbits
	.p2align	2, 0x0
GCC_except_table1:
.Lexception0:
	.byte	255                             # @LPStart Encoding = omit
	.byte	3                               # @TType Encoding = udata4
	.uleb128 .Lttbase0-.Lttbaseref0
.Lttbaseref0:
	.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	1                               #   On action: 1
	.uleb128 .Ltmp11-.Lfunc_begin0          # >> Call Site 3 <<
	.uleb128 .Ltmp16-.Ltmp11                #   Call between .Ltmp11 and .Ltmp16
	.uleb128 .Ltmp17-.Lfunc_begin0          #     jumps to .Ltmp17
	.byte	0                               #   On action: cleanup
	.uleb128 .Ltmp18-.Lfunc_begin0          # >> Call Site 4 <<
	.uleb128 .Ltmp21-.Ltmp18                #   Call between .Ltmp18 and .Ltmp21
	.uleb128 .Ltmp22-.Lfunc_begin0          #     jumps to .Ltmp22
	.byte	0                               #   On action: cleanup
	.uleb128 .Ltmp23-.Lfunc_begin0          # >> Call Site 5 <<
	.uleb128 .Ltmp24-.Ltmp23                #   Call between .Ltmp23 and .Ltmp24
	.uleb128 .Ltmp25-.Lfunc_begin0          #     jumps to .Ltmp25
	.byte	0                               #   On action: cleanup
	.uleb128 .Ltmp24-.Lfunc_begin0          # >> Call Site 6 <<
	.uleb128 .Ltmp3-.Ltmp24                 #   Call between .Ltmp24 and .Ltmp3
	.byte	0                               #     has no landing pad
	.byte	0                               #   On action: cleanup
	.uleb128 .Ltmp3-.Lfunc_begin0           # >> Call Site 7 <<
	.uleb128 .Ltmp6-.Ltmp3                  #   Call between .Ltmp3 and .Ltmp6
	.uleb128 .Ltmp7-.Lfunc_begin0           #     jumps to .Ltmp7
	.byte	0                               #   On action: cleanup
	.uleb128 .Ltmp8-.Lfunc_begin0           # >> Call Site 8 <<
	.uleb128 .Ltmp9-.Ltmp8                  #   Call between .Ltmp8 and .Ltmp9
	.uleb128 .Ltmp10-.Lfunc_begin0          #     jumps to .Ltmp10
	.byte	1                               #   On action: 1
	.uleb128 .Ltmp9-.Lfunc_begin0           # >> Call Site 9 <<
	.uleb128 .Lfunc_end1-.Ltmp9             #   Call between .Ltmp9 and .Lfunc_end1
	.byte	0                               #     has no landing pad
	.byte	0                               #   On action: cleanup
.Lcst_end0:
	.byte	1                               # >> Action Record 1 <<
                                        #   Catch TypeInfo 1
	.byte	0                               #   No further actions
	.p2align	2, 0x0
                                        # >> Catch TypeInfos <<
	.long	0                               # TypeInfo 1
.Lttbase0:
	.p2align	2, 0x0
                                        # -- End function
	.section	.text._ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EED2Ev,"axG",@progbits,_ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EED2Ev,comdat
	.weak	_ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EED2Ev # -- Begin function _ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EED2Ev
	.p2align	1, 0x90
	.type	_ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EED2Ev,@function
_ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EED2Ev: # @_ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EED2Ev
	.cfi_startproc
# %bb.0:
	pushq	%rbx
	.cfi_def_cfa_offset 16
	.cfi_offset %rbx, -16
	movq	(%rdi), %rbx
	testq	%rbx, %rbx
	je	.LBB2_6
# %bb.1:
	movq	8(%rbx), %rax
	movabsq	$4294967297, %rcx               # imm = 0x100000001
	cmpq	%rcx, %rax
	jne	.LBB2_2
# %bb.7:
	movq	$0, 8(%rbx)
	movq	(%rbx), %rax
	movq	%rbx, %rdi
	callq	*16(%rax)
	movq	(%rbx), %rax
	movq	%rbx, %rdi
	popq	%rbx
	.cfi_def_cfa_offset 8
	jmpq	*24(%rax)                       # TAILCALL
.LBB2_2:
	.cfi_def_cfa_offset 16
	cmpb	$0, __libc_single_threaded(%rip)
	je	.LBB2_4
# %bb.3:
	leal	-1(%rax), %ecx
	movl	%ecx, 8(%rbx)
	jmp	.LBB2_5
.LBB2_4:
	movl	$-1, %eax
	lock		xaddl	%eax, 8(%rbx)
.LBB2_5:                                # %_ZN9__gnu_cxx27__exchange_and_add_dispatchEPii.exit.i
	cmpl	$1, %eax
	je	.LBB2_8
.LBB2_6:                                # %_ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv.exit
	popq	%rbx
	.cfi_def_cfa_offset 8
	retq
.LBB2_8:
	.cfi_def_cfa_offset 16
	movq	%rbx, %rdi
	popq	%rbx
	.cfi_def_cfa_offset 8
	jmp	_ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE24_M_release_last_use_coldEv # TAILCALL
.Lfunc_end2:
	.size	_ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EED2Ev, .Lfunc_end2-_ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EED2Ev
	.cfi_endproc
                                        # -- End function
	.section	.text.__clang_call_terminate,"axG",@progbits,__clang_call_terminate,comdat
	.hidden	__clang_call_terminate          # -- Begin function __clang_call_terminate
	.weak	__clang_call_terminate
	.type	__clang_call_terminate,@function
__clang_call_terminate:                 # @__clang_call_terminate
	.cfi_startproc
# %bb.0:
	pushq	%rax
	.cfi_def_cfa_offset 16
	callq	__cxa_begin_catch
	callq	_ZSt9terminatev
.Lfunc_end3:
	.size	__clang_call_terminate, .Lfunc_end3-__clang_call_terminate
	.cfi_endproc
                                        # -- End function
	.section	.text._ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE24_M_release_last_use_coldEv,"axG",@progbits,_ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE24_M_release_last_use_coldEv,comdat
	.weak	_ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE24_M_release_last_use_coldEv # -- Begin function _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE24_M_release_last_use_coldEv
	.p2align	1, 0x90
	.type	_ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE24_M_release_last_use_coldEv,@function
_ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE24_M_release_last_use_coldEv: # @_ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE24_M_release_last_use_coldEv
	.cfi_startproc
# %bb.0:
	jmp	_ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE19_M_release_last_useEv # TAILCALL
.Lfunc_end4:
	.size	_ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE24_M_release_last_use_coldEv, .Lfunc_end4-_ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE24_M_release_last_use_coldEv
	.cfi_endproc
                                        # -- End function
	.section	.text._ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE19_M_release_last_useEv,"axG",@progbits,_ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE19_M_release_last_useEv,comdat
	.weak	_ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE19_M_release_last_useEv # -- Begin function _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE19_M_release_last_useEv
	.p2align	1, 0x90
	.type	_ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE19_M_release_last_useEv,@function
_ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE19_M_release_last_useEv: # @_ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE19_M_release_last_useEv
	.cfi_startproc
# %bb.0:
	pushq	%rbx
	.cfi_def_cfa_offset 16
	.cfi_offset %rbx, -16
	movq	%rdi, %rbx
	movq	(%rdi), %rax
	callq	*16(%rax)
	cmpb	$0, __libc_single_threaded(%rip)
	je	.LBB5_2
# %bb.1:
	movl	12(%rbx), %eax
	leal	-1(%rax), %ecx
	movl	%ecx, 12(%rbx)
	jmp	.LBB5_3
.LBB5_2:
	movl	$-1, %eax
	lock		xaddl	%eax, 12(%rbx)
.LBB5_3:                                # %_ZN9__gnu_cxx27__exchange_and_add_dispatchEPii.exit
	cmpl	$1, %eax
	jne	.LBB5_4
# %bb.5:
	movq	(%rbx), %rax
	movq	%rbx, %rdi
	popq	%rbx
	.cfi_def_cfa_offset 8
	jmpq	*24(%rax)                       # TAILCALL
.LBB5_4:
	.cfi_def_cfa_offset 16
	popq	%rbx
	.cfi_def_cfa_offset 8
	retq
.Lfunc_end5:
	.size	_ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE19_M_release_last_useEv, .Lfunc_end5-_ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE19_M_release_last_useEv
	.cfi_endproc
                                        # -- End function
	.text
	.p2align	1, 0x90                         # -- Begin function _ZZ4mainENKUlzE_clEz
	.type	_ZZ4mainENKUlzE_clEz,@function
_ZZ4mainENKUlzE_clEz:                   # @_ZZ4mainENKUlzE_clEz
	.cfi_startproc
# %bb.0:
	pushq	%rbx
	.cfi_def_cfa_offset 16
	.cfi_offset %rbx, -16
	movq	%rdi, %rbx
	movq	(%rdi), %rax
	movq	(%rax), %rdi
	callq	hipFree
	movq	8(%rbx), %rax
	movq	(%rax), %rdi
	callq	hipEventDestroy
	movq	16(%rbx), %rax
	movq	(%rax), %rdi
	callq	hipEventDestroy
	movl	$.L.str.2, %edi
	xorl	%eax, %eax
	popq	%rbx
	.cfi_def_cfa_offset 8
	jmp	printf                          # TAILCALL
.Lfunc_end6:
	.size	_ZZ4mainENKUlzE_clEz, .Lfunc_end6-_ZZ4mainENKUlzE_clEz
	.cfi_endproc
                                        # -- End function
	.section	.text._ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EED2Ev,"axG",@progbits,_ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EED2Ev,comdat
	.weak	_ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EED2Ev # -- Begin function _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EED2Ev
	.p2align	1, 0x90
	.type	_ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EED2Ev,@function
_ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EED2Ev: # @_ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EED2Ev
	.cfi_startproc
# %bb.0:
	retq
.Lfunc_end7:
	.size	_ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EED2Ev, .Lfunc_end7-_ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EED2Ev
	.cfi_endproc
                                        # -- End function
	.text
	.p2align	1, 0x90                         # -- Begin function _ZNSt19_Sp_counted_deleterIDnZ4mainEUlzE_SaIvELN9__gnu_cxx12_Lock_policyE2EED0Ev
	.type	_ZNSt19_Sp_counted_deleterIDnZ4mainEUlzE_SaIvELN9__gnu_cxx12_Lock_policyE2EED0Ev,@function
_ZNSt19_Sp_counted_deleterIDnZ4mainEUlzE_SaIvELN9__gnu_cxx12_Lock_policyE2EED0Ev: # @_ZNSt19_Sp_counted_deleterIDnZ4mainEUlzE_SaIvELN9__gnu_cxx12_Lock_policyE2EED0Ev
	.cfi_startproc
# %bb.0:
	jmp	_ZdlPv                          # TAILCALL
.Lfunc_end8:
	.size	_ZNSt19_Sp_counted_deleterIDnZ4mainEUlzE_SaIvELN9__gnu_cxx12_Lock_policyE2EED0Ev, .Lfunc_end8-_ZNSt19_Sp_counted_deleterIDnZ4mainEUlzE_SaIvELN9__gnu_cxx12_Lock_policyE2EED0Ev
	.cfi_endproc
                                        # -- End function
	.p2align	1, 0x90                         # -- Begin function _ZNSt19_Sp_counted_deleterIDnZ4mainEUlzE_SaIvELN9__gnu_cxx12_Lock_policyE2EE10_M_disposeEv
	.type	_ZNSt19_Sp_counted_deleterIDnZ4mainEUlzE_SaIvELN9__gnu_cxx12_Lock_policyE2EE10_M_disposeEv,@function
_ZNSt19_Sp_counted_deleterIDnZ4mainEUlzE_SaIvELN9__gnu_cxx12_Lock_policyE2EE10_M_disposeEv: # @_ZNSt19_Sp_counted_deleterIDnZ4mainEUlzE_SaIvELN9__gnu_cxx12_Lock_policyE2EE10_M_disposeEv
.Lfunc_begin1:
	.cfi_startproc
	.cfi_personality 3, __gxx_personality_v0
	.cfi_lsda 3, .Lexception1
# %bb.0:
	pushq	%rbx
	.cfi_def_cfa_offset 16
	.cfi_offset %rbx, -16
	movq	%rdi, %rbx
	movq	16(%rdi), %rax
	movq	(%rax), %rdi
.Ltmp26:
	callq	hipFree
.Ltmp27:
# %bb.1:                                # %.noexc
	movq	24(%rbx), %rax
	movq	(%rax), %rdi
.Ltmp28:
	callq	hipEventDestroy
.Ltmp29:
# %bb.2:                                # %.noexc1
	movq	32(%rbx), %rax
	movq	(%rax), %rdi
.Ltmp30:
	callq	hipEventDestroy
.Ltmp31:
# %bb.3:
	movl	$.L.str.2, %edi
	xorl	%eax, %eax
	popq	%rbx
	.cfi_def_cfa_offset 8
	jmp	printf                          # TAILCALL
.LBB9_4:
	.cfi_def_cfa_offset 16
.Ltmp32:
	movq	%rax, %rdi
	callq	__clang_call_terminate
.Lfunc_end9:
	.size	_ZNSt19_Sp_counted_deleterIDnZ4mainEUlzE_SaIvELN9__gnu_cxx12_Lock_policyE2EE10_M_disposeEv, .Lfunc_end9-_ZNSt19_Sp_counted_deleterIDnZ4mainEUlzE_SaIvELN9__gnu_cxx12_Lock_policyE2EE10_M_disposeEv
	.cfi_endproc
	.section	.gcc_except_table,"a",@progbits
	.p2align	2, 0x0
GCC_except_table9:
.Lexception1:
	.byte	255                             # @LPStart Encoding = omit
	.byte	3                               # @TType Encoding = udata4
	.uleb128 .Lttbase1-.Lttbaseref1
.Lttbaseref1:
	.byte	1                               # Call site Encoding = uleb128
	.uleb128 .Lcst_end1-.Lcst_begin1
.Lcst_begin1:
	.uleb128 .Ltmp26-.Lfunc_begin1          # >> Call Site 1 <<
	.uleb128 .Ltmp31-.Ltmp26                #   Call between .Ltmp26 and .Ltmp31
	.uleb128 .Ltmp32-.Lfunc_begin1          #     jumps to .Ltmp32
	.byte	1                               #   On action: 1
.Lcst_end1:
	.byte	1                               # >> Action Record 1 <<
                                        #   Catch TypeInfo 1
	.byte	0                               #   No further actions
	.p2align	2, 0x0
                                        # >> Catch TypeInfos <<
	.long	0                               # TypeInfo 1
.Lttbase1:
	.p2align	2, 0x0
                                        # -- End function
	.text
	.p2align	1, 0x90                         # -- Begin function _ZNSt19_Sp_counted_deleterIDnZ4mainEUlzE_SaIvELN9__gnu_cxx12_Lock_policyE2EE10_M_destroyEv
	.type	_ZNSt19_Sp_counted_deleterIDnZ4mainEUlzE_SaIvELN9__gnu_cxx12_Lock_policyE2EE10_M_destroyEv,@function
_ZNSt19_Sp_counted_deleterIDnZ4mainEUlzE_SaIvELN9__gnu_cxx12_Lock_policyE2EE10_M_destroyEv: # @_ZNSt19_Sp_counted_deleterIDnZ4mainEUlzE_SaIvELN9__gnu_cxx12_Lock_policyE2EE10_M_destroyEv
	.cfi_startproc
# %bb.0:                                # %_ZNSt15__allocated_ptrISaISt19_Sp_counted_deleterIDnZ4mainEUlzE_SaIvELN9__gnu_cxx12_Lock_policyE2EEEED2Ev.exit
	jmp	_ZdlPv                          # TAILCALL
.Lfunc_end10:
	.size	_ZNSt19_Sp_counted_deleterIDnZ4mainEUlzE_SaIvELN9__gnu_cxx12_Lock_policyE2EE10_M_destroyEv, .Lfunc_end10-_ZNSt19_Sp_counted_deleterIDnZ4mainEUlzE_SaIvELN9__gnu_cxx12_Lock_policyE2EE10_M_destroyEv
	.cfi_endproc
                                        # -- End function
	.p2align	1, 0x90                         # -- Begin function _ZNSt19_Sp_counted_deleterIDnZ4mainEUlzE_SaIvELN9__gnu_cxx12_Lock_policyE2EE14_M_get_deleterERKSt9type_info
	.type	_ZNSt19_Sp_counted_deleterIDnZ4mainEUlzE_SaIvELN9__gnu_cxx12_Lock_policyE2EE14_M_get_deleterERKSt9type_info,@function
_ZNSt19_Sp_counted_deleterIDnZ4mainEUlzE_SaIvELN9__gnu_cxx12_Lock_policyE2EE14_M_get_deleterERKSt9type_info: # @_ZNSt19_Sp_counted_deleterIDnZ4mainEUlzE_SaIvELN9__gnu_cxx12_Lock_policyE2EE14_M_get_deleterERKSt9type_info
	.cfi_startproc
# %bb.0:
	pushq	%rbx
	.cfi_def_cfa_offset 16
	.cfi_offset %rbx, -16
	movq	%rdi, %rbx
	movq	8(%rsi), %rdi
	cmpq	$_ZTSZ4mainEUlzE_, %rdi
	je	.LBB11_4
# %bb.1:
	cmpb	$42, (%rdi)
	je	.LBB11_2
# %bb.3:                                # %_ZNKSt9type_infoeqERKS_.exit
	movl	$_ZTSZ4mainEUlzE_, %esi
	callq	strcmp
	testl	%eax, %eax
	je	.LBB11_4
.LBB11_2:
	xorl	%ebx, %ebx
	jmp	.LBB11_5
.LBB11_4:                               # %_ZNKSt9type_infoeqERKS_.exit.thread
	addq	$16, %rbx
.LBB11_5:                               # %_ZNKSt9type_infoeqERKS_.exit.thread3
	movq	%rbx, %rax
	popq	%rbx
	.cfi_def_cfa_offset 8
	retq
.Lfunc_end11:
	.size	_ZNSt19_Sp_counted_deleterIDnZ4mainEUlzE_SaIvELN9__gnu_cxx12_Lock_policyE2EE14_M_get_deleterERKSt9type_info, .Lfunc_end11-_ZNSt19_Sp_counted_deleterIDnZ4mainEUlzE_SaIvELN9__gnu_cxx12_Lock_policyE2EE14_M_get_deleterERKSt9type_info
	.cfi_endproc
                                        # -- End function
	.p2align	4, 0x90                         # -- Begin function __hip_module_ctor
	.type	__hip_module_ctor,@function
__hip_module_ctor:                      # @__hip_module_ctor
	.cfi_startproc
# %bb.0:
	subq	$40, %rsp
	.cfi_def_cfa_offset 48
	movq	__hip_gpubin_handle(%rip), %rdi
	testq	%rdi, %rdi
	jne	.LBB12_2
# %bb.1:
	movl	$__hip_fatbin_wrapper, %edi
	callq	__hipRegisterFatBinary
	movq	%rax, %rdi
	movq	%rax, __hip_gpubin_handle(%rip)
.LBB12_2:
	xorps	%xmm0, %xmm0
	movups	%xmm0, 16(%rsp)
	movups	%xmm0, (%rsp)
	movl	$_Z26CalculatePointsIntheCirclePii, %esi
	movl	$.L__unnamed_1, %edx
	movl	$.L__unnamed_1, %ecx
	movl	$-1, %r8d
	xorl	%r9d, %r9d
	callq	__hipRegisterFunction
	movl	$__hip_module_dtor, %edi
	addq	$40, %rsp
	.cfi_def_cfa_offset 8
	jmp	atexit                          # TAILCALL
.Lfunc_end12:
	.size	__hip_module_ctor, .Lfunc_end12-__hip_module_ctor
	.cfi_endproc
                                        # -- End function
	.p2align	4, 0x90                         # -- Begin function __hip_module_dtor
	.type	__hip_module_dtor,@function
__hip_module_dtor:                      # @__hip_module_dtor
	.cfi_startproc
# %bb.0:
	movq	__hip_gpubin_handle(%rip), %rdi
	testq	%rdi, %rdi
	je	.LBB13_2
# %bb.1:
	pushq	%rax
	.cfi_def_cfa_offset 16
	callq	__hipUnregisterFatBinary
	movq	$0, __hip_gpubin_handle(%rip)
	addq	$8, %rsp
	.cfi_def_cfa_offset 8
.LBB13_2:
	retq
.Lfunc_end13:
	.size	__hip_module_dtor, .Lfunc_end13-__hip_module_dtor
	.cfi_endproc
                                        # -- End function
	.type	_Z26CalculatePointsIntheCirclePii,@object # @_Z26CalculatePointsIntheCirclePii
	.section	.rodata,"a",@progbits
	.globl	_Z26CalculatePointsIntheCirclePii
	.p2align	3, 0x0
_Z26CalculatePointsIntheCirclePii:
	.quad	_Z41__device_stub__CalculatePointsIntheCirclePii
	.size	_Z26CalculatePointsIntheCirclePii, 8

	.type	.L.str,@object                  # @.str
	.section	.rodata.str1.1,"aMS",@progbits,1
.L.str:
	.asciz	"Result pi %f \n"
	.size	.L.str, 15

	.type	.L.str.1,@object                # @.str.1
.L.str.1:
	.asciz	"Elapsed time %3.1f ms\n"
	.size	.L.str.1, 23

	.type	_ZTVSt19_Sp_counted_deleterIDnZ4mainEUlzE_SaIvELN9__gnu_cxx12_Lock_policyE2EE,@object # @_ZTVSt19_Sp_counted_deleterIDnZ4mainEUlzE_SaIvELN9__gnu_cxx12_Lock_policyE2EE
	.section	.rodata,"a",@progbits
	.p2align	3, 0x0
_ZTVSt19_Sp_counted_deleterIDnZ4mainEUlzE_SaIvELN9__gnu_cxx12_Lock_policyE2EE:
	.quad	0
	.quad	_ZTISt19_Sp_counted_deleterIDnZ4mainEUlzE_SaIvELN9__gnu_cxx12_Lock_policyE2EE
	.quad	_ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EED2Ev
	.quad	_ZNSt19_Sp_counted_deleterIDnZ4mainEUlzE_SaIvELN9__gnu_cxx12_Lock_policyE2EED0Ev
	.quad	_ZNSt19_Sp_counted_deleterIDnZ4mainEUlzE_SaIvELN9__gnu_cxx12_Lock_policyE2EE10_M_disposeEv
	.quad	_ZNSt19_Sp_counted_deleterIDnZ4mainEUlzE_SaIvELN9__gnu_cxx12_Lock_policyE2EE10_M_destroyEv
	.quad	_ZNSt19_Sp_counted_deleterIDnZ4mainEUlzE_SaIvELN9__gnu_cxx12_Lock_policyE2EE14_M_get_deleterERKSt9type_info
	.size	_ZTVSt19_Sp_counted_deleterIDnZ4mainEUlzE_SaIvELN9__gnu_cxx12_Lock_policyE2EE, 56

	.type	_ZTSSt19_Sp_counted_deleterIDnZ4mainEUlzE_SaIvELN9__gnu_cxx12_Lock_policyE2EE,@object # @_ZTSSt19_Sp_counted_deleterIDnZ4mainEUlzE_SaIvELN9__gnu_cxx12_Lock_policyE2EE
_ZTSSt19_Sp_counted_deleterIDnZ4mainEUlzE_SaIvELN9__gnu_cxx12_Lock_policyE2EE:
	.asciz	"St19_Sp_counted_deleterIDnZ4mainEUlzE_SaIvELN9__gnu_cxx12_Lock_policyE2EE"
	.size	_ZTSSt19_Sp_counted_deleterIDnZ4mainEUlzE_SaIvELN9__gnu_cxx12_Lock_policyE2EE, 74

	.type	_ZTSSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE,@object # @_ZTSSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE
	.section	.rodata._ZTSSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE,"aG",@progbits,_ZTSSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE,comdat
	.weak	_ZTSSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE
_ZTSSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE:
	.asciz	"St16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE"
	.size	_ZTSSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE, 52

	.type	_ZTSSt11_Mutex_baseILN9__gnu_cxx12_Lock_policyE2EE,@object # @_ZTSSt11_Mutex_baseILN9__gnu_cxx12_Lock_policyE2EE
	.section	.rodata._ZTSSt11_Mutex_baseILN9__gnu_cxx12_Lock_policyE2EE,"aG",@progbits,_ZTSSt11_Mutex_baseILN9__gnu_cxx12_Lock_policyE2EE,comdat
	.weak	_ZTSSt11_Mutex_baseILN9__gnu_cxx12_Lock_policyE2EE
_ZTSSt11_Mutex_baseILN9__gnu_cxx12_Lock_policyE2EE:
	.asciz	"St11_Mutex_baseILN9__gnu_cxx12_Lock_policyE2EE"
	.size	_ZTSSt11_Mutex_baseILN9__gnu_cxx12_Lock_policyE2EE, 47

	.type	_ZTISt11_Mutex_baseILN9__gnu_cxx12_Lock_policyE2EE,@object # @_ZTISt11_Mutex_baseILN9__gnu_cxx12_Lock_policyE2EE
	.section	.rodata._ZTISt11_Mutex_baseILN9__gnu_cxx12_Lock_policyE2EE,"aG",@progbits,_ZTISt11_Mutex_baseILN9__gnu_cxx12_Lock_policyE2EE,comdat
	.weak	_ZTISt11_Mutex_baseILN9__gnu_cxx12_Lock_policyE2EE
	.p2align	3, 0x0
_ZTISt11_Mutex_baseILN9__gnu_cxx12_Lock_policyE2EE:
	.quad	_ZTVN10__cxxabiv117__class_type_infoE+16
	.quad	_ZTSSt11_Mutex_baseILN9__gnu_cxx12_Lock_policyE2EE
	.size	_ZTISt11_Mutex_baseILN9__gnu_cxx12_Lock_policyE2EE, 16

	.type	_ZTISt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE,@object # @_ZTISt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE
	.section	.rodata._ZTISt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE,"aG",@progbits,_ZTISt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE,comdat
	.weak	_ZTISt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE
	.p2align	3, 0x0
_ZTISt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE:
	.quad	_ZTVN10__cxxabiv120__si_class_type_infoE+16
	.quad	_ZTSSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE
	.quad	_ZTISt11_Mutex_baseILN9__gnu_cxx12_Lock_policyE2EE
	.size	_ZTISt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE, 24

	.type	_ZTISt19_Sp_counted_deleterIDnZ4mainEUlzE_SaIvELN9__gnu_cxx12_Lock_policyE2EE,@object # @_ZTISt19_Sp_counted_deleterIDnZ4mainEUlzE_SaIvELN9__gnu_cxx12_Lock_policyE2EE
	.section	.rodata,"a",@progbits
	.p2align	3, 0x0
_ZTISt19_Sp_counted_deleterIDnZ4mainEUlzE_SaIvELN9__gnu_cxx12_Lock_policyE2EE:
	.quad	_ZTVN10__cxxabiv120__si_class_type_infoE+16
	.quad	_ZTSSt19_Sp_counted_deleterIDnZ4mainEUlzE_SaIvELN9__gnu_cxx12_Lock_policyE2EE
	.quad	_ZTISt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE
	.size	_ZTISt19_Sp_counted_deleterIDnZ4mainEUlzE_SaIvELN9__gnu_cxx12_Lock_policyE2EE, 24

	.type	_ZTSZ4mainEUlzE_,@object        # @_ZTSZ4mainEUlzE_
_ZTSZ4mainEUlzE_:
	.asciz	"Z4mainEUlzE_"
	.size	_ZTSZ4mainEUlzE_, 13

	.type	.L.str.2,@object                # @.str.2
	.section	.rodata.str1.1,"aMS",@progbits,1
.L.str.2:
	.asciz	"free"
	.size	.L.str.2, 5

	.type	.L__unnamed_1,@object           # @0
.L__unnamed_1:
	.asciz	"_Z26CalculatePointsIntheCirclePii"
	.size	.L__unnamed_1, 34

	.type	__hip_fatbin_wrapper,@object    # @__hip_fatbin_wrapper
	.section	.hipFatBinSegment,"a",@progbits
	.p2align	3, 0x0
__hip_fatbin_wrapper:
	.long	1212764230                      # 0x48495046
	.long	1                               # 0x1
	.quad	__hip_fatbin
	.quad	0
	.size	__hip_fatbin_wrapper, 24

	.type	__hip_gpubin_handle,@object     # @__hip_gpubin_handle
	.local	__hip_gpubin_handle
	.comm	__hip_gpubin_handle,8,8
	.section	.init_array,"aw",@init_array
	.p2align	3, 0x0
	.quad	__hip_module_ctor
	.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 _Z41__device_stub__CalculatePointsIntheCirclePii
	.addrsig_sym __gxx_personality_v0
	.addrsig_sym __hip_module_ctor
	.addrsig_sym __hip_module_dtor
	.addrsig_sym _Unwind_Resume
	.addrsig_sym _Z26CalculatePointsIntheCirclePii
	.addrsig_sym _ZTVN10__cxxabiv120__si_class_type_infoE
	.addrsig_sym _ZTSSt19_Sp_counted_deleterIDnZ4mainEUlzE_SaIvELN9__gnu_cxx12_Lock_policyE2EE
	.addrsig_sym _ZTSSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE
	.addrsig_sym _ZTVN10__cxxabiv117__class_type_infoE
	.addrsig_sym _ZTSSt11_Mutex_baseILN9__gnu_cxx12_Lock_policyE2EE
	.addrsig_sym _ZTISt11_Mutex_baseILN9__gnu_cxx12_Lock_policyE2EE
	.addrsig_sym _ZTISt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE
	.addrsig_sym _ZTISt19_Sp_counted_deleterIDnZ4mainEUlzE_SaIvELN9__gnu_cxx12_Lock_policyE2EE
	.addrsig_sym _ZTSZ4mainEUlzE_
	.addrsig_sym __hip_fatbin
	.addrsig_sym __hip_fatbin_wrapper
	.addrsig_sym __hip_cuid_

	.text
	.amdgcn_target "amdgcn-amd-amdhsa--gfx1100"
	.protected	_Z26CalculatePointsIntheCirclePii ; -- Begin function _Z26CalculatePointsIntheCirclePii
	.globl	_Z26CalculatePointsIntheCirclePii
	.p2align	8
	.type	_Z26CalculatePointsIntheCirclePii,@function
_Z26CalculatePointsIntheCirclePii:      ; @_Z26CalculatePointsIntheCirclePii
; %bb.0:
	s_clause 0x1
	s_load_b32 s2, s[0:1], 0x1c
	s_load_b32 s3, s[0:1], 0x8
	v_bfe_u32 v1, v0, 10, 10
	v_and_b32_e32 v0, 0x3ff, v0
	s_waitcnt lgkmcnt(0)
	s_lshr_b32 s4, s2, 16
	s_mul_hi_i32 s5, s3, 0x10624dd3
	v_mad_u64_u32 v[2:3], null, s15, s4, v[1:2]
	s_lshr_b32 s4, s5, 31
	s_ashr_i32 s5, s5, 6
	s_and_b32 s2, s2, 0xffff
	s_add_i32 s4, s5, s4
	s_mul_i32 s14, s14, s2
	s_mulk_i32 s4, 0x3e8
	s_mov_b32 s2, exec_lo
	s_sub_i32 s3, s3, s4
	s_delay_alu instid0(SALU_CYCLE_1) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_mul_lo_u32 v2, v2, s3
	v_add3_u32 v2, s14, v0, v2
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_xor_b32_e32 v2, 0x2c7f967f, v2
	v_mul_lo_u32 v2, 0x493c4aa1, v2
	s_delay_alu instid0(VALU_DEP_1) | instskip(SKIP_2) | instid1(VALU_DEP_3)
	v_add_nc_u32_e32 v3, 0x75bcd15, v2
	v_add_nc_u32_e32 v5, 0x583f19, v2
	v_xor_b32_e32 v7, 0x159a55e5, v2
	v_lshrrev_b32_e32 v4, 2, v3
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_4)
	v_xor_b32_e32 v3, v4, v3
	v_lshlrev_b32_e32 v4, 4, v5
	s_delay_alu instid0(VALU_DEP_2) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_lshlrev_b32_e32 v6, 1, v3
	v_xor_b32_e32 v4, v4, v6
	v_lshrrev_b32_e32 v6, 2, v7
	s_delay_alu instid0(VALU_DEP_2) | instskip(NEXT) | instid1(VALU_DEP_2)
	v_xor3_b32 v3, v4, v5, v3
	v_xor_b32_e32 v4, v6, v7
	s_delay_alu instid0(VALU_DEP_2) | instskip(NEXT) | instid1(VALU_DEP_2)
	v_lshlrev_b32_e32 v5, 4, v3
	v_lshlrev_b32_e32 v6, 1, v4
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_xor_b32_e32 v5, v6, v5
	v_xor3_b32 v4, v5, v4, v3
	s_delay_alu instid0(VALU_DEP_1) | instskip(SKIP_1) | instid1(VALU_DEP_2)
	v_add3_u32 v4, v2, v4, 0x8acd61a2
	v_add3_u32 v2, v2, v3, 0x8ac7d9dd
	v_cvt_f32_u32_e32 v3, v4
	s_delay_alu instid0(VALU_DEP_2) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_cvt_f32_u32_e32 v2, v2
	v_dual_fmaak_f32 v3, 0x2f800000, v3, 0x2f800000 :: v_dual_fmaak_f32 v2, 0x2f800000, v2, 0x2f800000
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_mul_f32_e32 v3, v3, v3
	v_fmac_f32_e32 v3, v2, v2
	s_delay_alu instid0(VALU_DEP_1)
	v_cmpx_ge_f32_e32 1.0, v3
	s_cbranch_execz .LBB0_2
; %bb.1:
	s_load_b64 s[0:1], s[0:1], 0x0
	v_lshlrev_b32_e32 v0, 5, v0
	s_delay_alu instid0(VALU_DEP_1)
	v_add_lshl_u32 v0, v0, v1, 2
	v_mov_b32_e32 v1, 1
	s_waitcnt lgkmcnt(0)
	global_atomic_add_u32 v0, v1, s[0:1]
.LBB0_2:
	s_nop 0
	s_sendmsg sendmsg(MSG_DEALLOC_VGPRS)
	s_endpgm
	.section	.rodata,"a",@progbits
	.p2align	6, 0x0
	.amdhsa_kernel _Z26CalculatePointsIntheCirclePii
		.amdhsa_group_segment_fixed_size 0
		.amdhsa_private_segment_fixed_size 0
		.amdhsa_kernarg_size 272
		.amdhsa_user_sgpr_count 14
		.amdhsa_user_sgpr_dispatch_ptr 0
		.amdhsa_user_sgpr_queue_ptr 0
		.amdhsa_user_sgpr_kernarg_segment_ptr 1
		.amdhsa_user_sgpr_dispatch_id 0
		.amdhsa_user_sgpr_private_segment_size 0
		.amdhsa_wavefront_size32 1
		.amdhsa_uses_dynamic_stack 0
		.amdhsa_enable_private_segment 0
		.amdhsa_system_sgpr_workgroup_id_x 1
		.amdhsa_system_sgpr_workgroup_id_y 1
		.amdhsa_system_sgpr_workgroup_id_z 0
		.amdhsa_system_sgpr_workgroup_info 0
		.amdhsa_system_vgpr_workitem_id 1
		.amdhsa_next_free_vgpr 8
		.amdhsa_next_free_sgpr 16
		.amdhsa_reserve_vcc 0
		.amdhsa_float_round_mode_32 0
		.amdhsa_float_round_mode_16_64 0
		.amdhsa_float_denorm_mode_32 3
		.amdhsa_float_denorm_mode_16_64 3
		.amdhsa_dx10_clamp 1
		.amdhsa_ieee_mode 1
		.amdhsa_fp16_overflow 0
		.amdhsa_workgroup_processor_mode 1
		.amdhsa_memory_ordered 1
		.amdhsa_forward_progress 0
		.amdhsa_shared_vgpr_count 0
		.amdhsa_exception_fp_ieee_invalid_op 0
		.amdhsa_exception_fp_denorm_src 0
		.amdhsa_exception_fp_ieee_div_zero 0
		.amdhsa_exception_fp_ieee_overflow 0
		.amdhsa_exception_fp_ieee_underflow 0
		.amdhsa_exception_fp_ieee_inexact 0
		.amdhsa_exception_int_div_zero 0
	.end_amdhsa_kernel
	.text
.Lfunc_end0:
	.size	_Z26CalculatePointsIntheCirclePii, .Lfunc_end0-_Z26CalculatePointsIntheCirclePii
                                        ; -- End function
	.section	.AMDGPU.csdata,"",@progbits
; Kernel info:
; codeLenInByte = 372
; NumSgprs: 16
; NumVgprs: 8
; ScratchSize: 0
; MemoryBound: 0
; FloatMode: 240
; IeeeMode: 1
; LDSByteSize: 0 bytes/workgroup (compile time only)
; SGPRBlocks: 1
; VGPRBlocks: 0
; NumSGPRsForWavesPerEU: 16
; NumVGPRsForWavesPerEU: 8
; Occupancy: 16
; WaveLimiterHint : 0
; COMPUTE_PGM_RSRC2:SCRATCH_EN: 0
; COMPUTE_PGM_RSRC2:USER_SGPR: 14
; COMPUTE_PGM_RSRC2:TRAP_HANDLER: 0
; COMPUTE_PGM_RSRC2:TGID_X_EN: 1
; COMPUTE_PGM_RSRC2:TGID_Y_EN: 1
; COMPUTE_PGM_RSRC2:TGID_Z_EN: 0
; COMPUTE_PGM_RSRC2:TIDIG_COMP_CNT: 1
	.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_
	.amdgpu_metadata
---
amdhsa.kernels:
  - .args:
      - .address_space:  global
        .offset:         0
        .size:           8
        .value_kind:     global_buffer
      - .offset:         8
        .size:           4
        .value_kind:     by_value
      - .offset:         16
        .size:           4
        .value_kind:     hidden_block_count_x
      - .offset:         20
        .size:           4
        .value_kind:     hidden_block_count_y
      - .offset:         24
        .size:           4
        .value_kind:     hidden_block_count_z
      - .offset:         28
        .size:           2
        .value_kind:     hidden_group_size_x
      - .offset:         30
        .size:           2
        .value_kind:     hidden_group_size_y
      - .offset:         32
        .size:           2
        .value_kind:     hidden_group_size_z
      - .offset:         34
        .size:           2
        .value_kind:     hidden_remainder_x
      - .offset:         36
        .size:           2
        .value_kind:     hidden_remainder_y
      - .offset:         38
        .size:           2
        .value_kind:     hidden_remainder_z
      - .offset:         56
        .size:           8
        .value_kind:     hidden_global_offset_x
      - .offset:         64
        .size:           8
        .value_kind:     hidden_global_offset_y
      - .offset:         72
        .size:           8
        .value_kind:     hidden_global_offset_z
      - .offset:         80
        .size:           2
        .value_kind:     hidden_grid_dims
    .group_segment_fixed_size: 0
    .kernarg_segment_align: 8
    .kernarg_segment_size: 272
    .language:       OpenCL C
    .language_version:
      - 2
      - 0
    .max_flat_workgroup_size: 1024
    .name:           _Z26CalculatePointsIntheCirclePii
    .private_segment_fixed_size: 0
    .sgpr_count:     16
    .sgpr_spill_count: 0
    .symbol:         _Z26CalculatePointsIntheCirclePii.kd
    .uniform_work_group_size: 1
    .uses_dynamic_stack: false
    .vgpr_count:     8
    .vgpr_spill_count: 0
    .wavefront_size: 32
    .workgroup_processor_mode: 1
amdhsa.target:   amdgcn-amd-amdhsa--gfx1100
amdhsa.version:
  - 1
  - 2
...

	.end_amdgpu_metadata
