	.file	"224032.c"
	.intel_syntax noprefix
	.text
	.globl	n_threads
	.bss
	.align 4
	.type	n_threads, @object
	.size	n_threads, 4
n_threads:
	.zero	4
	.globl	p_thread
	.align 4
	.type	p_thread, @object
	.size	p_thread, 4
p_thread:
	.zero	4
	.globl	t_points
	.data
	.align 8
	.type	t_points, @object
	.size	t_points, 8
t_points:
	.quad	1000000
	.globl	i_points
	.bss
	.align 8
	.type	i_points, @object
	.size	i_points, 8
i_points:
	.zero	8
	.globl	seed
	.align 4
	.type	seed, @object
	.size	seed, 4
seed:
	.zero	4
	.globl	lock
	.align 32
	.type	lock, @object
	.size	lock, 40
lock:
	.zero	40
	.text
	.globl	get_Number
	.type	get_Number, @function
get_Number:
.LFB6:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	sub	rsp, 16
	lea	rdi, seed[rip]
	call	rand_r@PLT
	pxor	xmm0, xmm0
	cvtsi2sd	xmm0, eax
	movsd	xmm1, QWORD PTR .LC0[rip]
	divsd	xmm0, xmm1
	movsd	QWORD PTR -8[rbp], xmm0
	movsd	xmm0, QWORD PTR -8[rbp]
	movq	rax, xmm0
	movq	xmm0, rax
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	get_Number, .-get_Number
	.globl	pi_cal
	.type	pi_cal, @function
pi_cal:
.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, 48
	mov	QWORD PTR -40[rbp], rdi
	mov	DWORD PTR -20[rbp], 0
	jmp	.L4
.L7:
	mov	eax, 0
	call	get_Number
	movq	rax, xmm0
	mov	QWORD PTR -16[rbp], rax
	mov	eax, 0
	call	get_Number
	movq	rax, xmm0
	mov	QWORD PTR -8[rbp], rax
	movsd	xmm0, QWORD PTR -16[rbp]
	movsd	xmm1, QWORD PTR .LC1[rip]
	subsd	xmm0, xmm1
	movq	rax, xmm0
	movsd	xmm0, QWORD PTR .LC2[rip]
	movapd	xmm1, xmm0
	movq	xmm0, rax
	call	pow@PLT
	movsd	QWORD PTR -48[rbp], xmm0
	movsd	xmm0, QWORD PTR -8[rbp]
	movsd	xmm1, QWORD PTR .LC1[rip]
	movapd	xmm2, xmm0
	subsd	xmm2, xmm1
	movq	rax, xmm2
	movsd	xmm0, QWORD PTR .LC2[rip]
	movapd	xmm1, xmm0
	movq	xmm0, rax
	call	pow@PLT
	movapd	xmm3, xmm0
	addsd	xmm3, QWORD PTR -48[rbp]
	movq	rax, xmm3
	movq	xmm0, rax
	call	sqrt@PLT
	movsd	xmm1, QWORD PTR .LC1[rip]
	comisd	xmm1, xmm0
	jb	.L5
	lea	rdi, lock[rip]
	call	pthread_mutex_lock@PLT
	mov	rax, QWORD PTR i_points[rip]
	add	rax, 1
	mov	QWORD PTR i_points[rip], rax
	lea	rdi, lock[rip]
	call	pthread_mutex_unlock@PLT
.L5:
	add	DWORD PTR -20[rbp], 1
.L4:
	mov	eax, DWORD PTR p_thread[rip]
	cmp	DWORD PTR -20[rbp], eax
	jl	.L7
	mov	edi, 0
	call	pthread_exit@PLT
	.cfi_endproc
.LFE7:
	.size	pi_cal, .-pi_cal
	.section	.rodata
.LC3:
	.string	"\nmutex init failed"
.LC4:
	.string	"\npthread create failed"
.LC6:
	.string	"\nPi = %lf\n"
.LC8:
	.string	"\nTime taken: %lf\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
	push	r15
	push	r14
	push	r13
	push	r12
	push	rbx
	sub	rsp, 88
	.cfi_offset 15, -24
	.cfi_offset 14, -32
	.cfi_offset 13, -40
	.cfi_offset 12, -48
	.cfi_offset 3, -56
	mov	DWORD PTR -116[rbp], edi
	mov	QWORD PTR -128[rbp], rsi
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -56[rbp], rax
	xor	eax, eax
	mov	rax, rsp
	mov	rbx, rax
	call	clock@PLT
	mov	QWORD PTR -96[rbp], rax
	mov	edi, 0
	call	time@PLT
	mov	DWORD PTR seed[rip], eax
	mov	rax, QWORD PTR -128[rbp]
	add	rax, 8
	mov	rax, QWORD PTR [rax]
	mov	rdi, rax
	call	atoi@PLT
	mov	DWORD PTR n_threads[rip], eax
	mov	rax, QWORD PTR t_points[rip]
	mov	edx, DWORD PTR n_threads[rip]
	movsx	rsi, edx
	cqo
	idiv	rsi
	mov	DWORD PTR p_thread[rip], eax
	mov	eax, DWORD PTR n_threads[rip]
	movsx	rdx, eax
	sub	rdx, 1
	mov	QWORD PTR -88[rbp], rdx
	movsx	rdx, eax
	mov	r14, rdx
	mov	r15d, 0
	movsx	rdx, eax
	mov	r12, rdx
	mov	r13d, 0
	cdqe
	lea	rdx, 0[0+rax*8]
	mov	eax, 16
	sub	rax, 1
	add	rax, rdx
	mov	esi, 16
	mov	edx, 0
	div	rsi
	imul	rax, rax, 16
	mov	rcx, rax
	and	rcx, -4096
	mov	rdx, rsp
	sub	rdx, rcx
.L10:
	cmp	rsp, rdx
	je	.L11
	sub	rsp, 4096
	or	QWORD PTR 4088[rsp], 0
	jmp	.L10
.L11:
	mov	rdx, rax
	and	edx, 4095
	sub	rsp, rdx
	mov	rdx, rax
	and	edx, 4095
	test	rdx, rdx
	je	.L12
	and	eax, 4095
	sub	rax, 8
	add	rax, rsp
	or	QWORD PTR [rax], 0
.L12:
	mov	rax, rsp
	add	rax, 7
	shr	rax, 3
	sal	rax, 3
	mov	QWORD PTR -80[rbp], rax
	mov	esi, 0
	lea	rdi, lock[rip]
	call	pthread_mutex_init@PLT
	test	eax, eax
	je	.L13
	lea	rdi, .LC3[rip]
	call	puts@PLT
	mov	eax, 1
	jmp	.L14
.L13:
	mov	QWORD PTR -104[rbp], 0
	jmp	.L15
.L17:
	mov	rax, QWORD PTR -104[rbp]
	mov	rdx, QWORD PTR -104[rbp]
	lea	rcx, 0[0+rdx*8]
	mov	rdx, QWORD PTR -80[rbp]
	lea	rdi, [rcx+rdx]
	mov	rcx, rax
	lea	rdx, pi_cal[rip]
	mov	esi, 0
	call	pthread_create@PLT
	test	eax, eax
	je	.L16
	lea	rdi, .LC4[rip]
	call	puts@PLT
	mov	eax, 1
	jmp	.L14
.L16:
	add	QWORD PTR -104[rbp], 1
.L15:
	mov	eax, DWORD PTR n_threads[rip]
	cdqe
	cmp	QWORD PTR -104[rbp], rax
	jl	.L17
	mov	DWORD PTR -108[rbp], 0
	jmp	.L18
.L19:
	mov	rax, QWORD PTR -80[rbp]
	mov	edx, DWORD PTR -108[rbp]
	movsx	rdx, edx
	mov	rax, QWORD PTR [rax+rdx*8]
	mov	esi, 0
	mov	rdi, rax
	call	pthread_join@PLT
	add	DWORD PTR -108[rbp], 1
.L18:
	mov	eax, DWORD PTR n_threads[rip]
	cmp	DWORD PTR -108[rbp], eax
	jl	.L19
	mov	rax, QWORD PTR i_points[rip]
	pxor	xmm1, xmm1
	cvtsi2sd	xmm1, rax
	movsd	xmm0, QWORD PTR .LC5[rip]
	mulsd	xmm0, xmm1
	mov	rax, QWORD PTR t_points[rip]
	pxor	xmm1, xmm1
	cvtsi2sd	xmm1, rax
	divsd	xmm0, xmm1
	movsd	QWORD PTR -72[rbp], xmm0
	lea	rdi, lock[rip]
	call	pthread_mutex_destroy@PLT
	mov	rax, QWORD PTR -72[rbp]
	movq	xmm0, rax
	lea	rdi, .LC6[rip]
	mov	eax, 1
	call	printf@PLT
	call	clock@PLT
	sub	rax, QWORD PTR -96[rbp]
	mov	QWORD PTR -96[rbp], rax
	pxor	xmm0, xmm0
	cvtsi2sd	xmm0, QWORD PTR -96[rbp]
	movsd	xmm1, QWORD PTR .LC7[rip]
	divsd	xmm0, xmm1
	movsd	QWORD PTR -64[rbp], xmm0
	mov	rax, QWORD PTR -64[rbp]
	movq	xmm0, rax
	lea	rdi, .LC8[rip]
	mov	eax, 1
	call	printf@PLT
	mov	edi, 0
	call	pthread_exit@PLT
.L14:
	mov	rsp, rbx
	mov	rbx, QWORD PTR -56[rbp]
	sub	rbx, QWORD PTR fs:40
	je	.L21
	call	__stack_chk_fail@PLT
.L21:
	lea	rsp, -40[rbp]
	pop	rbx
	pop	r12
	pop	r13
	pop	r14
	pop	r15
	pop	rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE8:
	.size	main, .-main
	.section	.rodata
	.align 8
.LC0:
	.long	0
	.long	1105199104
	.align 8
.LC1:
	.long	0
	.long	1071644672
	.align 8
.LC2:
	.long	0
	.long	1073741824
	.align 8
.LC5:
	.long	0
	.long	1074790400
	.align 8
.LC7:
	.long	0
	.long	1093567616
	.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	"224032.c"
	.text
	.comm	n_threads,4,4
	.comm	p_thread,4,4
	.global	t_points
	.data
	.align	2
	.type	t_points, %object
	.size	t_points, 4
t_points:
	.word	1000000
	.global	i_points
	.bss
	.align	2
	.type	i_points, %object
	.size	i_points, 4
i_points:
	.space	4
	.comm	seed,4,4
	.comm	lock,24,4
	.global	__aeabi_i2d
	.global	__aeabi_ddiv
	.text
	.align	2
	.global	get_Number
	.syntax unified
	.arm
	.fpu softvfp
	.type	get_Number, %function
get_Number:
	@ args = 0, pretend = 0, frame = 8
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #8
	ldr	r0, .L3
	bl	rand_r
	mov	r3, r0
	mov	r0, r3
	bl	__aeabi_i2d
	mov	r2, #0
	ldr	r3, .L3+4
	bl	__aeabi_ddiv
	mov	r2, r0
	mov	r3, r1
	str	r2, [fp, #-12]
	str	r3, [fp, #-8]
	sub	r3, fp, #12
	ldmia	r3, {r2-r3}
	mov	r0, r2
	mov	r1, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L4:
	.align	2
.L3:
	.word	seed
	.word	1105199104
	.size	get_Number, .-get_Number
	.global	__aeabi_dsub
	.global	__aeabi_dadd
	.global	__aeabi_dcmple
	.align	2
	.global	pi_cal
	.syntax unified
	.arm
	.fpu softvfp
	.type	pi_cal, %function
pi_cal:
	@ args = 0, pretend = 0, frame = 32
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{r4, r5, fp, lr}
	add	fp, sp, #12
	sub	sp, sp, #32
	str	r0, [fp, #-40]
	mov	r3, #0
	str	r3, [fp, #-32]
	b	.L6
.L9:
	bl	get_Number
	str	r0, [fp, #-28]
	str	r1, [fp, #-24]
	bl	get_Number
	str	r0, [fp, #-20]
	str	r1, [fp, #-16]
	mov	r2, #0
	ldr	r3, .L11
	sub	r1, fp, #28
	ldmia	r1, {r0-r1}
	bl	__aeabi_dsub
	mov	r2, r0
	mov	r3, r1
	mov	r0, r2
	mov	r1, r3
	mov	r2, #0
	mov	r3, #1073741824
	bl	pow
	mov	r4, r0
	mov	r5, r1
	mov	r2, #0
	ldr	r3, .L11
	sub	r1, fp, #20
	ldmia	r1, {r0-r1}
	bl	__aeabi_dsub
	mov	r2, r0
	mov	r3, r1
	mov	r0, r2
	mov	r1, r3
	mov	r2, #0
	mov	r3, #1073741824
	bl	pow
	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
	mov	r2, #0
	ldr	r3, .L11
	bl	__aeabi_dcmple
	mov	r3, r0
	cmp	r3, #0
	beq	.L7
	ldr	r0, .L11+4
	bl	pthread_mutex_lock
	ldr	r3, .L11+8
	ldr	r3, [r3]
	add	r3, r3, #1
	ldr	r2, .L11+8
	str	r3, [r2]
	ldr	r0, .L11+4
	bl	pthread_mutex_unlock
.L7:
	ldr	r3, [fp, #-32]
	add	r3, r3, #1
	str	r3, [fp, #-32]
.L6:
	ldr	r3, .L11+12
	ldr	r3, [r3]
	ldr	r2, [fp, #-32]
	cmp	r2, r3
	blt	.L9
	mov	r0, #0
	bl	pthread_exit
.L12:
	.align	2
.L11:
	.word	1071644672
	.word	lock
	.word	i_points
	.word	p_thread
	.size	pi_cal, .-pi_cal
	.global	__aeabi_idiv
	.section	.rodata
	.align	2
.LC0:
	.ascii	"\012mutex init failed\000"
	.align	2
.LC1:
	.ascii	"\012pthread create failed\000"
	.global	__aeabi_dmul
	.align	2
.LC2:
	.ascii	"\012Pi = %lf\012\000"
	.align	2
.LC3:
	.ascii	"\012Time taken: %lf\012\000"
	.align	2
.LC4:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	main
	.syntax unified
	.arm
	.fpu softvfp
	.type	main, %function
main:
	@ args = 0, pretend = 0, frame = 56
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{r4, r5, fp, lr}
	add	fp, sp, #12
	sub	sp, sp, #56
	str	r0, [fp, #-64]
	str	r1, [fp, #-68]
	ldr	r3, .L23
	ldr	r3, [r3]
	str	r3, [fp, #-16]
	mov	r3,#0
	mov	r3, sp
	mov	r4, r3
	bl	clock
	str	r0, [fp, #-48]
	mov	r0, #0
	bl	time
	mov	r3, r0
	mov	r2, r3
	ldr	r3, .L23+4
	str	r2, [r3]
	ldr	r3, [fp, #-68]
	add	r3, r3, #4
	ldr	r3, [r3]
	mov	r0, r3
	bl	atoi
	mov	r3, r0
	ldr	r2, .L23+8
	str	r3, [r2]
	ldr	r3, .L23+12
	ldr	r3, [r3]
	ldr	r2, .L23+8
	ldr	r2, [r2]
	mov	r1, r2
	mov	r0, r3
	bl	__aeabi_idiv
	mov	r3, r0
	mov	r2, r3
	ldr	r3, .L23+16
	str	r2, [r3]
	ldr	r3, .L23+8
	ldr	ip, [r3]
	sub	r3, ip, #1
	str	r3, [fp, #-44]
	mov	r3, ip
	mov	r0, r3
	mov	r1, #0
	mov	r2, #0
	mov	r3, #0
	lsl	r3, r1, #5
	orr	r3, r3, r0, lsr #27
	lsl	r2, r0, #5
	mov	r3, ip
	mov	r0, r3
	mov	r1, #0
	mov	r2, #0
	mov	r3, #0
	lsl	r3, r1, #5
	orr	r3, r3, r0, lsr #27
	lsl	r2, r0, #5
	mov	r3, ip
	lsl	r3, r3, #2
	add	r3, r3, #7
	lsr	r3, r3, #3
	lsl	r3, r3, #3
	sub	sp, sp, r3
	mov	r3, sp
	add	r3, r3, #3
	lsr	r3, r3, #2
	lsl	r3, r3, #2
	str	r3, [fp, #-40]
	mov	r1, #0
	ldr	r0, .L23+20
	bl	pthread_mutex_init
	mov	r3, r0
	cmp	r3, #0
	beq	.L14
	ldr	r0, .L23+24
	bl	puts
	mov	r3, #1
	b	.L15
.L14:
	mov	r3, #0
	str	r3, [fp, #-52]
	b	.L16
.L18:
	ldr	r3, [fp, #-52]
	lsl	r3, r3, #2
	ldr	r2, [fp, #-40]
	add	r0, r2, r3
	ldr	r3, [fp, #-52]
	ldr	r2, .L23+28
	mov	r1, #0
	bl	pthread_create
	mov	r3, r0
	cmp	r3, #0
	beq	.L17
	ldr	r0, .L23+32
	bl	puts
	mov	r3, #1
	b	.L15
.L17:
	ldr	r3, [fp, #-52]
	add	r3, r3, #1
	str	r3, [fp, #-52]
.L16:
	ldr	r3, .L23+8
	ldr	r3, [r3]
	ldr	r2, [fp, #-52]
	cmp	r2, r3
	blt	.L18
	mov	r3, #0
	str	r3, [fp, #-56]
	b	.L19
.L20:
	ldr	r3, [fp, #-40]
	ldr	r2, [fp, #-56]
	ldr	r3, [r3, r2, lsl #2]
	mov	r1, #0
	mov	r0, r3
	bl	pthread_join
	ldr	r3, [fp, #-56]
	add	r3, r3, #1
	str	r3, [fp, #-56]
.L19:
	ldr	r3, .L23+8
	ldr	r3, [r3]
	ldr	r2, [fp, #-56]
	cmp	r2, r3
	blt	.L20
	ldr	r3, .L23+36
	ldr	r3, [r3]
	mov	r0, r3
	bl	__aeabi_i2d
	mov	r2, #0
	ldr	r3, .L23+40
	bl	__aeabi_dmul
	mov	r2, r0
	mov	r3, r1
	mov	r4, r2
	mov	r5, r3
	ldr	r3, .L23+12
	ldr	r3, [r3]
	mov	r0, r3
	bl	__aeabi_i2d
	mov	r2, r0
	mov	r3, r1
	mov	r0, r4
	mov	r1, r5
	bl	__aeabi_ddiv
	mov	r2, r0
	mov	r3, r1
	str	r2, [fp, #-36]
	str	r3, [fp, #-32]
	ldr	r0, .L23+20
	bl	pthread_mutex_destroy
	sub	r3, fp, #36
	ldmia	r3, {r2-r3}
	ldr	r0, .L23+44
	bl	printf
	bl	clock
	mov	r2, r0
	ldr	r3, [fp, #-48]
	sub	r3, r2, r3
	str	r3, [fp, #-48]
	ldr	r0, [fp, #-48]
	bl	__aeabi_i2d
	mov	r2, #0
	ldr	r3, .L23+48
	bl	__aeabi_ddiv
	mov	r2, r0
	mov	r3, r1
	str	r2, [fp, #-28]
	str	r3, [fp, #-24]
	sub	r3, fp, #28
	ldmia	r3, {r2-r3}
	ldr	r0, .L23+52
	bl	printf
	mov	r0, #0
	bl	pthread_exit
.L15:
	mov	sp, r4
	ldr	r2, .L23
	ldr	r1, [r2]
	ldr	r2, [fp, #-16]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L22
	bl	__stack_chk_fail
.L22:
	mov	r0, r3
	sub	sp, fp, #12
	@ sp needed
	pop	{r4, r5, fp, pc}
.L24:
	.align	2
.L23:
	.word	.LC4
	.word	seed
	.word	n_threads
	.word	t_points
	.word	p_thread
	.word	lock
	.word	.LC0
	.word	pi_cal
	.word	.LC1
	.word	i_points
	.word	1074790400
	.word	.LC2
	.word	1093567616
	.word	.LC3
	.size	main, .-main
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
