	.file	"40762981.c"
	.intel_syntax noprefix
	.text
	.globl	number_of_threads
	.bss
	.align 4
	.type	number_of_threads, @object
	.size	number_of_threads, 4
number_of_threads:
	.zero	4
	.text
	.globl	calculate
	.type	calculate, @function
calculate:
.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, 32
	mov	QWORD PTR -24[rbp], rdi
	mov	rax, QWORD PTR -24[rbp]
	mov	QWORD PTR -8[rbp], rax
	mov	rax, QWORD PTR -8[rbp]
	mov	eax, DWORD PTR [rax]
	mov	DWORD PTR -12[rbp], eax
	jmp	.L2
.L5:
	mov	rax, QWORD PTR -8[rbp]
	mov	rax, QWORD PTR 8[rax]
	movsd	xmm2, QWORD PTR [rax]
	mov	eax, DWORD PTR -12[rbp]
	and	eax, 1
	test	eax, eax
	jne	.L3
	movsd	xmm0, QWORD PTR .LC0[rip]
	jmp	.L4
.L3:
	movsd	xmm0, QWORD PTR .LC1[rip]
.L4:
	pxor	xmm1, xmm1
	cvtsi2sd	xmm1, DWORD PTR -12[rbp]
	movapd	xmm3, xmm1
	addsd	xmm3, xmm1
	movsd	xmm1, QWORD PTR .LC0[rip]
	addsd	xmm1, xmm3
	divsd	xmm0, xmm1
	mov	rax, QWORD PTR -8[rbp]
	mov	rax, QWORD PTR 8[rax]
	addsd	xmm0, xmm2
	movsd	QWORD PTR [rax], xmm0
	mov	eax, DWORD PTR number_of_threads[rip]
	add	DWORD PTR -12[rbp], eax
.L2:
	cmp	DWORD PTR -12[rbp], 199999999
	jle	.L5
	mov	rax, QWORD PTR -8[rbp]
	mov	rdi, rax
	call	pthread_exit@PLT
	.cfi_endproc
.LFE6:
	.size	calculate, .-calculate
	.section	.rodata
.LC2:
	.string	"not enough arguments\n"
.LC3:
	.string	"wrong number of threads\n"
.LC4:
	.string	"malloc"
.LC5:
	.string	"pthread_create"
.LC7:
	.string	"pthread_join"
.LC9:
	.string	"pi done - %.15g \n"
	.text
	.globl	main
	.type	main, @function
main:
.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, 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], 2
	je	.L7
	mov	rax, QWORD PTR stderr[rip]
	mov	rcx, rax
	mov	edx, 21
	mov	esi, 1
	lea	rdi, .LC2[rip]
	call	fwrite@PLT
	mov	edi, 1
	call	exit@PLT
.L7:
	mov	rax, QWORD PTR -80[rbp]
	add	rax, 8
	mov	rax, QWORD PTR [rax]
	mov	rdi, rax
	call	atoi@PLT
	mov	DWORD PTR number_of_threads[rip], eax
	mov	eax, DWORD PTR number_of_threads[rip]
	test	eax, eax
	jne	.L8
	mov	eax, DWORD PTR number_of_threads[rip]
	test	eax, eax
	jg	.L8
	mov	rax, QWORD PTR stderr[rip]
	mov	rcx, rax
	mov	edx, 24
	mov	esi, 1
	lea	rdi, .LC3[rip]
	call	fwrite@PLT
	mov	edi, 1
	call	exit@PLT
.L8:
	mov	eax, DWORD PTR number_of_threads[rip]
	cdqe
	sal	rax, 3
	mov	rdi, rax
	call	malloc@PLT
	mov	QWORD PTR -32[rbp], rax
	cmp	QWORD PTR -32[rbp], 0
	jne	.L9
	lea	rdi, .LC4[rip]
	call	perror@PLT
	mov	edi, 1
	call	exit@PLT
.L9:
	mov	DWORD PTR -56[rbp], 0
	jmp	.L10
.L14:
	mov	QWORD PTR -16[rbp], 0
	mov	edi, 16
	call	malloc@PLT
	mov	QWORD PTR -16[rbp], rax
	cmp	QWORD PTR -16[rbp], 0
	jne	.L11
	lea	rdi, .LC4[rip]
	call	perror@PLT
	mov	edi, 1
	call	exit@PLT
.L11:
	mov	edi, 8
	call	malloc@PLT
	mov	rdx, rax
	mov	rax, QWORD PTR -16[rbp]
	mov	QWORD PTR 8[rax], rdx
	mov	rax, QWORD PTR -16[rbp]
	mov	rax, QWORD PTR 8[rax]
	test	rax, rax
	jne	.L12
	lea	rdi, .LC4[rip]
	call	perror@PLT
	mov	edi, 1
	call	exit@PLT
.L12:
	mov	rax, QWORD PTR -16[rbp]
	mov	edx, DWORD PTR -56[rbp]
	mov	DWORD PTR [rax], edx
	mov	eax, DWORD PTR -56[rbp]
	cdqe
	lea	rdx, 0[0+rax*8]
	mov	rax, QWORD PTR -32[rbp]
	lea	rdi, [rdx+rax]
	mov	rax, QWORD PTR -16[rbp]
	mov	rcx, rax
	lea	rdx, calculate[rip]
	mov	esi, 0
	call	pthread_create@PLT
	test	eax, eax
	je	.L13
	lea	rdi, .LC5[rip]
	call	perror@PLT
	mov	edi, 1
	call	exit@PLT
.L13:
	add	DWORD PTR -56[rbp], 1
.L10:
	mov	eax, DWORD PTR number_of_threads[rip]
	cmp	DWORD PTR -56[rbp], eax
	jl	.L14
	pxor	xmm0, xmm0
	movsd	QWORD PTR -40[rbp], xmm0
	mov	DWORD PTR -52[rbp], 0
	jmp	.L15
.L17:
	mov	eax, DWORD PTR -52[rbp]
	cdqe
	lea	rdx, 0[0+rax*8]
	mov	rax, QWORD PTR -32[rbp]
	add	rax, rdx
	mov	rax, QWORD PTR [rax]
	lea	rdx, -48[rbp]
	mov	rsi, rdx
	mov	rdi, rax
	call	pthread_join@PLT
	test	eax, eax
	je	.L16
	lea	rdi, .LC7[rip]
	call	perror@PLT
	mov	edi, 1
	call	exit@PLT
.L16:
	mov	rax, QWORD PTR -48[rbp]
	mov	rax, QWORD PTR 8[rax]
	movsd	xmm0, QWORD PTR [rax]
	movsd	xmm1, QWORD PTR -40[rbp]
	addsd	xmm0, xmm1
	movsd	QWORD PTR -40[rbp], xmm0
	mov	rax, QWORD PTR -48[rbp]
	mov	rax, QWORD PTR 8[rax]
	mov	rdi, rax
	call	free@PLT
	mov	rax, QWORD PTR -48[rbp]
	mov	rdi, rax
	call	free@PLT
	add	DWORD PTR -52[rbp], 1
.L15:
	mov	eax, DWORD PTR number_of_threads[rip]
	cmp	DWORD PTR -52[rbp], eax
	jl	.L17
	movsd	xmm1, QWORD PTR -40[rbp]
	movsd	xmm0, QWORD PTR .LC8[rip]
	mulsd	xmm0, xmm1
	movsd	QWORD PTR -24[rbp], xmm0
	mov	rax, QWORD PTR -24[rbp]
	movq	xmm0, rax
	lea	rdi, .LC9[rip]
	mov	eax, 1
	call	printf@PLT
	mov	rax, QWORD PTR -32[rbp]
	mov	rdi, rax
	call	free@PLT
	mov	edi, 0
	call	pthread_exit@PLT
	.cfi_endproc
.LFE7:
	.size	main, .-main
	.section	.rodata
	.align 8
.LC0:
	.long	0
	.long	1072693248
	.align 8
.LC1:
	.long	0
	.long	-1074790400
	.align 8
.LC8:
	.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	"40762981.c"
	.text
	.comm	number_of_threads,4,4
	.global	__aeabi_i2d
	.global	__aeabi_dadd
	.global	__aeabi_ddiv
	.align	2
	.global	calculate
	.syntax unified
	.arm
	.fpu softvfp
	.type	calculate, %function
calculate:
	@ args = 0, pretend = 0, frame = 16
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, fp, lr}
	add	fp, sp, #20
	sub	sp, sp, #16
	str	r0, [fp, #-32]
	ldr	r3, [fp, #-32]
	str	r3, [fp, #-24]
	ldr	r3, [fp, #-24]
	ldr	r3, [r3]
	str	r3, [fp, #-28]
	b	.L2
.L5:
	ldr	r3, [fp, #-24]
	ldr	r3, [r3, #4]
	ldmia	r3, {r4-r5}
	ldr	r3, [fp, #-28]
	and	r3, r3, #1
	cmp	r3, #0
	bne	.L3
	mov	r6, #0
	ldr	r7, .L6
	b	.L4
.L3:
	mov	r6, #0
	ldr	r7, .L6+4
.L4:
	ldr	r0, [fp, #-28]
	bl	__aeabi_i2d
	mov	r2, r0
	mov	r3, r1
	bl	__aeabi_dadd
	mov	r2, r0
	mov	r3, r1
	mov	r0, r2
	mov	r1, r3
	mov	r2, #0
	ldr	r3, .L6
	bl	__aeabi_dadd
	mov	r2, r0
	mov	r3, r1
	mov	r0, r6
	mov	r1, r7
	bl	__aeabi_ddiv
	mov	r2, r0
	mov	r3, r1
	mov	r0, r2
	mov	r1, r3
	ldr	r3, [fp, #-24]
	ldr	r6, [r3, #4]
	mov	r2, r0
	mov	r3, r1
	mov	r0, r4
	mov	r1, r5
	bl	__aeabi_dadd
	mov	r2, r0
	mov	r3, r1
	stm	r6, {r2-r3}
	ldr	r3, .L6+8
	ldr	r3, [r3]
	ldr	r2, [fp, #-28]
	add	r3, r2, r3
	str	r3, [fp, #-28]
.L2:
	ldr	r3, [fp, #-28]
	ldr	r2, .L6+12
	cmp	r3, r2
	ble	.L5
	ldr	r0, [fp, #-24]
	bl	pthread_exit
.L7:
	.align	2
.L6:
	.word	1072693248
	.word	-1074790400
	.word	number_of_threads
	.word	199999999
	.size	calculate, .-calculate
	.section	.rodata
	.align	2
.LC0:
	.ascii	"not enough arguments\012\000"
	.align	2
.LC1:
	.ascii	"wrong number of threads\012\000"
	.align	2
.LC2:
	.ascii	"malloc\000"
	.align	2
.LC3:
	.ascii	"pthread_create\000"
	.align	2
.LC4:
	.ascii	"pthread_join\000"
	.global	__aeabi_dmul
	.align	2
.LC5:
	.ascii	"pi done - %.15g \012\000"
	.align	2
.LC6:
	.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	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #56
	str	r0, [fp, #-56]
	str	r1, [fp, #-60]
	ldr	r3, .L21
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	ldr	r3, [fp, #-56]
	cmp	r3, #2
	beq	.L9
	ldr	r3, .L21+4
	ldr	r3, [r3]
	mov	r2, #21
	mov	r1, #1
	ldr	r0, .L21+8
	bl	fwrite
	mov	r0, #1
	bl	exit
.L9:
	ldr	r3, [fp, #-60]
	add	r3, r3, #4
	ldr	r3, [r3]
	mov	r0, r3
	bl	atoi
	mov	r3, r0
	ldr	r2, .L21+12
	str	r3, [r2]
	ldr	r3, .L21+12
	ldr	r3, [r3]
	cmp	r3, #0
	bne	.L10
	ldr	r3, .L21+12
	ldr	r3, [r3]
	cmp	r3, #0
	bgt	.L10
	ldr	r3, .L21+4
	ldr	r3, [r3]
	mov	r2, #24
	mov	r1, #1
	ldr	r0, .L21+16
	bl	fwrite
	mov	r0, #1
	bl	exit
.L10:
	ldr	r3, .L21+12
	ldr	r3, [r3]
	lsl	r3, r3, #2
	mov	r0, r3
	bl	malloc
	mov	r3, r0
	str	r3, [fp, #-36]
	ldr	r3, [fp, #-36]
	cmp	r3, #0
	bne	.L11
	ldr	r0, .L21+20
	bl	perror
	mov	r0, #1
	bl	exit
.L11:
	mov	r3, #0
	str	r3, [fp, #-44]
	b	.L12
.L16:
	mov	r3, #0
	str	r3, [fp, #-32]
	mov	r0, #8
	bl	malloc
	mov	r3, r0
	str	r3, [fp, #-32]
	ldr	r3, [fp, #-32]
	cmp	r3, #0
	bne	.L13
	ldr	r0, .L21+20
	bl	perror
	mov	r0, #1
	bl	exit
.L13:
	mov	r0, #8
	bl	malloc
	mov	r3, r0
	mov	r2, r3
	ldr	r3, [fp, #-32]
	str	r2, [r3, #4]
	ldr	r3, [fp, #-32]
	ldr	r3, [r3, #4]
	cmp	r3, #0
	bne	.L14
	ldr	r0, .L21+20
	bl	perror
	mov	r0, #1
	bl	exit
.L14:
	ldr	r3, [fp, #-32]
	ldr	r2, [fp, #-44]
	str	r2, [r3]
	ldr	r3, [fp, #-44]
	lsl	r3, r3, #2
	ldr	r2, [fp, #-36]
	add	r0, r2, r3
	ldr	r3, [fp, #-32]
	ldr	r2, .L21+24
	mov	r1, #0
	bl	pthread_create
	mov	r3, r0
	cmp	r3, #0
	beq	.L15
	ldr	r0, .L21+28
	bl	perror
	mov	r0, #1
	bl	exit
.L15:
	ldr	r3, [fp, #-44]
	add	r3, r3, #1
	str	r3, [fp, #-44]
.L12:
	ldr	r3, .L21+12
	ldr	r3, [r3]
	ldr	r2, [fp, #-44]
	cmp	r2, r3
	blt	.L16
	mov	r2, #0
	mov	r3, #0
	str	r2, [fp, #-28]
	str	r3, [fp, #-24]
	mov	r3, #0
	str	r3, [fp, #-40]
	b	.L17
.L19:
	ldr	r3, [fp, #-40]
	lsl	r3, r3, #2
	ldr	r2, [fp, #-36]
	add	r3, r2, r3
	ldr	r3, [r3]
	sub	r2, fp, #48
	mov	r1, r2
	mov	r0, r3
	bl	pthread_join
	mov	r3, r0
	cmp	r3, #0
	beq	.L18
	ldr	r0, .L21+32
	bl	perror
	mov	r0, #1
	bl	exit
.L18:
	ldr	r3, [fp, #-48]
	ldr	r3, [r3, #4]
	ldmia	r3, {r2-r3}
	sub	r1, fp, #28
	ldmia	r1, {r0-r1}
	bl	__aeabi_dadd
	mov	r2, r0
	mov	r3, r1
	str	r2, [fp, #-28]
	str	r3, [fp, #-24]
	ldr	r3, [fp, #-48]
	ldr	r3, [r3, #4]
	mov	r0, r3
	bl	free
	ldr	r3, [fp, #-48]
	mov	r0, r3
	bl	free
	ldr	r3, [fp, #-40]
	add	r3, r3, #1
	str	r3, [fp, #-40]
.L17:
	ldr	r3, .L21+12
	ldr	r3, [r3]
	ldr	r2, [fp, #-40]
	cmp	r2, r3
	blt	.L19
	mov	r2, #0
	ldr	r3, .L21+36
	sub	r1, fp, #28
	ldmia	r1, {r0-r1}
	bl	__aeabi_dmul
	mov	r2, r0
	mov	r3, r1
	str	r2, [fp, #-20]
	str	r3, [fp, #-16]
	sub	r3, fp, #20
	ldmia	r3, {r2-r3}
	ldr	r0, .L21+40
	bl	printf
	ldr	r0, [fp, #-36]
	bl	free
	mov	r0, #0
	bl	pthread_exit
.L22:
	.align	2
.L21:
	.word	.LC6
	.word	stderr
	.word	.LC0
	.word	number_of_threads
	.word	.LC1
	.word	.LC2
	.word	calculate
	.word	.LC3
	.word	.LC4
	.word	1074790400
	.word	.LC5
	.size	main, .-main
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
