	.file	"349078.c"
	.intel_syntax noprefix
	.text
	.section	.rodata
	.align 8
.LC0:
	.string	"Monte Carlo Approximation of Pi."
.LC1:
	.string	"Usage:"
	.align 8
.LC2:
	.string	"  ./montecarlo NUM_TRIALS [SEED]"
	.text
	.globl	show_help
	.type	show_help, @function
show_help:
.LFB6:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	lea	rdi, .LC0[rip]
	call	puts@PLT
	lea	rdi, .LC1[rip]
	call	puts@PLT
	lea	rdi, .LC2[rip]
	call	puts@PLT
	nop
	pop	rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	show_help, .-show_help
	.globl	samples_inside_circle
	.type	samples_inside_circle, @function
samples_inside_circle:
.LFB7:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	sub	rsp, 64
	mov	QWORD PTR -56[rbp], rdi
	mov	DWORD PTR -60[rbp], esi
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	mov	DWORD PTR -36[rbp], 0
	mov	DWORD PTR -40[rbp], 0
	jmp	.L3
.L6:
	lea	rdx, -32[rbp]
	mov	rax, QWORD PTR -56[rbp]
	mov	rsi, rdx
	mov	rdi, rax
	call	drand48_r@PLT
	lea	rdx, -24[rbp]
	mov	rax, QWORD PTR -56[rbp]
	mov	rsi, rdx
	mov	rdi, rax
	call	drand48_r@PLT
	movsd	xmm1, QWORD PTR -32[rbp]
	movsd	xmm0, QWORD PTR -32[rbp]
	mulsd	xmm1, xmm0
	movsd	xmm2, QWORD PTR -24[rbp]
	movsd	xmm0, QWORD PTR -24[rbp]
	mulsd	xmm0, xmm2
	addsd	xmm1, xmm0
	movq	rax, xmm1
	movq	xmm0, rax
	call	sqrt@PLT
	movq	rax, xmm0
	mov	QWORD PTR -16[rbp], rax
	movsd	xmm0, QWORD PTR .LC3[rip]
	comisd	xmm0, QWORD PTR -16[rbp]
	jb	.L4
	add	DWORD PTR -36[rbp], 1
.L4:
	add	DWORD PTR -40[rbp], 1
.L3:
	mov	eax, DWORD PTR -40[rbp]
	cmp	eax, DWORD PTR -60[rbp]
	jl	.L6
	mov	eax, DWORD PTR -36[rbp]
	mov	rcx, QWORD PTR -8[rbp]
	sub	rcx, QWORD PTR fs:40
	je	.L8
	call	__stack_chk_fail@PLT
.L8:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.size	samples_inside_circle, .-samples_inside_circle
	.section	.rodata
	.align 8
.LC5:
	.string	"Approximated value of Pi = %g (%d trials)\n"
	.text
	.globl	main
	.type	main, @function
main:
.LFB8:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	sub	rsp, 80
	mov	DWORD PTR -68[rbp], edi
	mov	QWORD PTR -80[rbp], rsi
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	cmp	DWORD PTR -68[rbp], 1
	jg	.L11
	mov	eax, 0
	call	show_help
	mov	edi, 1
	call	exit@PLT
.L11:
	mov	rax, QWORD PTR -80[rbp]
	add	rax, 8
	mov	rax, QWORD PTR [rax]
	mov	rdi, rax
	call	atoi@PLT
	mov	DWORD PTR -52[rbp], eax
	cmp	DWORD PTR -68[rbp], 2
	jg	.L12
	mov	edi, 0
	call	time@PLT
	mov	DWORD PTR -56[rbp], eax
	jmp	.L13
.L12:
	mov	rax, QWORD PTR -80[rbp]
	add	rax, 16
	mov	rax, QWORD PTR [rax]
	mov	rdi, rax
	call	atoi@PLT
	mov	DWORD PTR -56[rbp], eax
.L13:
	mov	DWORD PTR -60[rbp], 0
	mov	DWORD PTR -48[rbp], 8
	mov	eax, DWORD PTR -56[rbp]
	cdqe
	lea	rdx, -32[rbp]
	mov	rsi, rdx
	mov	rdi, rax
	call	srand48_r@PLT
	mov	DWORD PTR -64[rbp], 0
	jmp	.L14
.L15:
	mov	eax, DWORD PTR -52[rbp]
	cdq
	idiv	DWORD PTR -48[rbp]
	mov	edx, eax
	lea	rax, -32[rbp]
	mov	esi, edx
	mov	rdi, rax
	call	samples_inside_circle
	mov	DWORD PTR -44[rbp], eax
	mov	eax, DWORD PTR -44[rbp]
	add	DWORD PTR -60[rbp], eax
	add	DWORD PTR -64[rbp], 1
.L14:
	mov	eax, DWORD PTR -64[rbp]
	cmp	eax, DWORD PTR -48[rbp]
	jl	.L15
	pxor	xmm0, xmm0
	cvtsi2sd	xmm0, DWORD PTR -60[rbp]
	pxor	xmm2, xmm2
	cvtsi2sd	xmm2, DWORD PTR -52[rbp]
	movapd	xmm1, xmm0
	divsd	xmm1, xmm2
	movsd	xmm0, QWORD PTR .LC4[rip]
	mulsd	xmm0, xmm1
	movsd	QWORD PTR -40[rbp], xmm0
	mov	edx, DWORD PTR -52[rbp]
	mov	rax, QWORD PTR -40[rbp]
	mov	esi, edx
	movq	xmm0, rax
	lea	rdi, .LC5[rip]
	mov	eax, 1
	call	printf@PLT
	mov	eax, 0
	mov	rcx, QWORD PTR -8[rbp]
	sub	rcx, QWORD PTR fs:40
	je	.L17
	call	__stack_chk_fail@PLT
.L17:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE8:
	.size	main, .-main
	.section	.rodata
	.align 8
.LC3:
	.long	0
	.long	1072693248
	.align 8
.LC4:
	.long	0
	.long	1074790400
	.ident	"GCC: (Ubuntu 10.5.0-1ubuntu1~20.04) 10.5.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:

	.arch armv5t
	.eabi_attribute 20, 1
	.eabi_attribute 21, 1
	.eabi_attribute 23, 3
	.eabi_attribute 24, 1
	.eabi_attribute 25, 1
	.eabi_attribute 26, 2
	.eabi_attribute 30, 6
	.eabi_attribute 34, 0
	.eabi_attribute 18, 4
	.file	"349078.c"
	.text
	.section	.rodata
	.align	2
.LC0:
	.ascii	"Monte Carlo Approximation of Pi.\000"
	.align	2
.LC1:
	.ascii	"Usage:\000"
	.align	2
.LC2:
	.ascii	"  ./montecarlo NUM_TRIALS [SEED]\000"
	.text
	.align	2
	.global	show_help
	.syntax unified
	.arm
	.fpu softvfp
	.type	show_help, %function
show_help:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	ldr	r0, .L2
	bl	puts
	ldr	r0, .L2+4
	bl	puts
	ldr	r0, .L2+8
	bl	puts
	nop
	pop	{fp, pc}
.L3:
	.align	2
.L2:
	.word	.LC0
	.word	.LC1
	.word	.LC2
	.size	show_help, .-show_help
	.global	__aeabi_dmul
	.global	__aeabi_dadd
	.global	__aeabi_dcmple
	.section	.rodata
	.align	2
.LC3:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	samples_inside_circle
	.syntax unified
	.arm
	.fpu softvfp
	.type	samples_inside_circle, %function
samples_inside_circle:
	@ args = 0, pretend = 0, frame = 48
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{r4, r5, fp, lr}
	add	fp, sp, #12
	sub	sp, sp, #48
	str	r0, [fp, #-56]
	str	r1, [fp, #-60]
	ldr	r3, .L12
	ldr	r3, [r3]
	str	r3, [fp, #-16]
	mov	r3,#0
	mov	r3, #0
	str	r3, [fp, #-48]
	mov	r3, #0
	str	r3, [fp, #-52]
	b	.L5
.L8:
	sub	r3, fp, #44
	mov	r1, r3
	ldr	r0, [fp, #-56]
	bl	drand48_r
	sub	r3, fp, #36
	mov	r1, r3
	ldr	r0, [fp, #-56]
	bl	drand48_r
	sub	r1, fp, #44
	ldmia	r1, {r0-r1}
	sub	r3, fp, #44
	ldmia	r3, {r2-r3}
	bl	__aeabi_dmul
	mov	r2, r0
	mov	r3, r1
	mov	r4, r2
	mov	r5, r3
	sub	r1, fp, #36
	ldmia	r1, {r0-r1}
	sub	r3, fp, #36
	ldmia	r3, {r2-r3}
	bl	__aeabi_dmul
	mov	r2, r0
	mov	r3, r1
	mov	r0, r4
	mov	r1, r5
	bl	__aeabi_dadd
	mov	r2, r0
	mov	r3, r1
	mov	r0, r2
	mov	r1, r3
	bl	sqrt
	str	r0, [fp, #-28]
	str	r1, [fp, #-24]
	mov	r2, #0
	ldr	r3, .L12+4
	sub	r1, fp, #28
	ldmia	r1, {r0-r1}
	bl	__aeabi_dcmple
	mov	r3, r0
	cmp	r3, #0
	beq	.L6
	ldr	r3, [fp, #-48]
	add	r3, r3, #1
	str	r3, [fp, #-48]
.L6:
	ldr	r3, [fp, #-52]
	add	r3, r3, #1
	str	r3, [fp, #-52]
.L5:
	ldr	r2, [fp, #-52]
	ldr	r3, [fp, #-60]
	cmp	r2, r3
	blt	.L8
	ldr	r3, [fp, #-48]
	ldr	r2, .L12
	ldr	r1, [r2]
	ldr	r2, [fp, #-16]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L10
	bl	__stack_chk_fail
.L10:
	mov	r0, r3
	sub	sp, fp, #12
	@ sp needed
	pop	{r4, r5, fp, pc}
.L13:
	.align	2
.L12:
	.word	.LC3
	.word	1072693248
	.size	samples_inside_circle, .-samples_inside_circle
	.global	__aeabi_idiv
	.global	__aeabi_i2d
	.global	__aeabi_ddiv
	.section	.rodata
	.align	2
.LC4:
	.ascii	"Approximated value of Pi = %g (%d trials)\012\000"
	.align	2
.LC5:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	main
	.syntax unified
	.arm
	.fpu softvfp
	.type	main, %function
main:
	@ args = 0, pretend = 0, frame = 72
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{r4, r5, fp, lr}
	add	fp, sp, #12
	sub	sp, sp, #80
	str	r0, [fp, #-80]
	str	r1, [fp, #-84]
	ldr	r3, .L22
	ldr	r3, [r3]
	str	r3, [fp, #-16]
	mov	r3,#0
	ldr	r3, [fp, #-80]
	cmp	r3, #1
	bgt	.L15
	bl	show_help
	mov	r0, #1
	bl	exit
.L15:
	ldr	r3, [fp, #-84]
	add	r3, r3, #4
	ldr	r3, [r3]
	mov	r0, r3
	bl	atoi
	str	r0, [fp, #-64]
	ldr	r3, [fp, #-80]
	cmp	r3, #2
	bgt	.L16
	mov	r0, #0
	bl	time
	str	r0, [fp, #-68]
	b	.L17
.L16:
	ldr	r3, [fp, #-84]
	add	r3, r3, #8
	ldr	r3, [r3]
	mov	r0, r3
	bl	atoi
	str	r0, [fp, #-68]
.L17:
	mov	r3, #0
	str	r3, [fp, #-72]
	mov	r3, #8
	str	r3, [fp, #-60]
	sub	r3, fp, #44
	mov	r1, r3
	ldr	r0, [fp, #-68]
	bl	srand48_r
	mov	r3, #0
	str	r3, [fp, #-76]
	b	.L18
.L19:
	ldr	r1, [fp, #-60]
	ldr	r0, [fp, #-64]
	bl	__aeabi_idiv
	mov	r3, r0
	mov	r2, r3
	sub	r3, fp, #44
	mov	r1, r2
	mov	r0, r3
	bl	samples_inside_circle
	str	r0, [fp, #-56]
	ldr	r2, [fp, #-72]
	ldr	r3, [fp, #-56]
	add	r3, r2, r3
	str	r3, [fp, #-72]
	ldr	r3, [fp, #-76]
	add	r3, r3, #1
	str	r3, [fp, #-76]
.L18:
	ldr	r2, [fp, #-76]
	ldr	r3, [fp, #-60]
	cmp	r2, r3
	blt	.L19
	ldr	r0, [fp, #-72]
	bl	__aeabi_i2d
	mov	r4, r0
	mov	r5, r1
	ldr	r0, [fp, #-64]
	bl	__aeabi_i2d
	mov	r2, r0
	mov	r3, r1
	mov	r0, r4
	mov	r1, r5
	bl	__aeabi_ddiv
	mov	r2, r0
	mov	r3, r1
	mov	r0, r2
	mov	r1, r3
	mov	r2, #0
	ldr	r3, .L22+4
	bl	__aeabi_dmul
	mov	r2, r0
	mov	r3, r1
	str	r2, [fp, #-52]
	str	r3, [fp, #-48]
	ldr	r3, [fp, #-64]
	str	r3, [sp]
	sub	r3, fp, #52
	ldmia	r3, {r2-r3}
	ldr	r0, .L22+8
	bl	printf
	mov	r3, #0
	ldr	r2, .L22
	ldr	r1, [r2]
	ldr	r2, [fp, #-16]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L21
	bl	__stack_chk_fail
.L21:
	mov	r0, r3
	sub	sp, fp, #12
	@ sp needed
	pop	{r4, r5, fp, pc}
.L23:
	.align	2
.L22:
	.word	.LC5
	.word	1074790400
	.word	.LC4
	.size	main, .-main
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
