	.file	"176240.c"
	.intel_syntax noprefix
	.text
	.globl	limit
	.bss
	.align 8
	.type	limit, @object
	.size	limit, 8
limit:
	.zero	8
	.globl	primes
	.align 8
	.type	primes, @object
	.size	primes, 8
primes:
	.zero	8
	.globl	primes_size
	.align 8
	.type	primes_size, @object
	.size	primes_size, 8
primes_size:
	.zero	8
	.globl	primes_upto
	.data
	.align 8
	.type	primes_upto, @object
	.size	primes_upto, 8
primes_upto:
	.quad	3
	.globl	primes_lock
	.bss
	.align 32
	.type	primes_lock, @object
	.size	primes_lock, 40
primes_lock:
	.zero	40
	.globl	workers_upto
	.align 8
	.type	workers_upto, @object
	.size	workers_upto, 8
workers_upto:
	.zero	8
	.globl	cpus
	.align 4
	.type	cpus, @object
	.size	cpus, 4
cpus:
	.zero	4
	.text
	.globl	num_compare
	.type	num_compare, @function
num_compare:
.LFB6:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	mov	QWORD PTR -24[rbp], rdi
	mov	QWORD PTR -32[rbp], rsi
	mov	rax, QWORD PTR -24[rbp]
	mov	rax, QWORD PTR [rax]
	mov	QWORD PTR -16[rbp], rax
	mov	rax, QWORD PTR -32[rbp]
	mov	rax, QWORD PTR [rax]
	mov	QWORD PTR -8[rbp], rax
	mov	rax, QWORD PTR -16[rbp]
	cmp	rax, QWORD PTR -8[rbp]
	jne	.L2
	mov	eax, 0
	jmp	.L3
.L2:
	mov	rax, QWORD PTR -16[rbp]
	cmp	rax, QWORD PTR -8[rbp]
	jnb	.L4
	mov	eax, -1
	jmp	.L3
.L4:
	mov	eax, 1
.L3:
	pop	rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	num_compare, .-num_compare
	.section	.rodata
.LC1:
	.string	"Found %lu primes, %f%% done\n"
	.text
	.globl	statsworker
	.type	statsworker, @function
statsworker:
.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, 16
	mov	QWORD PTR -8[rbp], rdi
.L12:
	mov	edi, 10000000
	call	usleep@PLT
	lea	rdi, primes_lock[rip]
	call	pthread_mutex_lock@PLT
	mov	rdx, QWORD PTR primes_upto[rip]
	mov	rax, QWORD PTR limit[rip]
	cmp	rdx, rax
	jb	.L6
	lea	rdi, primes_lock[rip]
	call	pthread_mutex_unlock@PLT
	mov	eax, 0
	jmp	.L13
.L6:
	mov	rax, QWORD PTR primes_upto[rip]
	test	rax, rax
	js	.L8
	pxor	xmm0, xmm0
	cvtsi2sd	xmm0, rax
	jmp	.L9
.L8:
	mov	rdx, rax
	shr	rdx
	and	eax, 1
	or	rdx, rax
	pxor	xmm0, xmm0
	cvtsi2sd	xmm0, rdx
	addsd	xmm0, xmm0
.L9:
	mov	rax, QWORD PTR limit[rip]
	test	rax, rax
	js	.L10
	pxor	xmm1, xmm1
	cvtsi2sd	xmm1, rax
	jmp	.L11
.L10:
	mov	rdx, rax
	shr	rdx
	and	eax, 1
	or	rdx, rax
	pxor	xmm1, xmm1
	cvtsi2sd	xmm1, rdx
	addsd	xmm1, xmm1
.L11:
	movapd	xmm2, xmm0
	divsd	xmm2, xmm1
	movsd	xmm0, QWORD PTR .LC0[rip]
	mulsd	xmm2, xmm0
	movq	rdx, xmm2
	mov	rax, QWORD PTR primes_size[rip]
	lea	rcx, 1[rax]
	mov	rax, QWORD PTR stderr[rip]
	movq	xmm0, rdx
	mov	rdx, rcx
	lea	rsi, .LC1[rip]
	mov	rdi, rax
	mov	eax, 1
	call	fprintf@PLT
	lea	rdi, primes_lock[rip]
	call	pthread_mutex_unlock@PLT
	jmp	.L12
.L13:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.size	statsworker, .-statsworker
	.globl	worker
	.type	worker, @function
worker:
.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, 64
	mov	QWORD PTR -56[rbp], rdi
	mov	rax, QWORD PTR -56[rbp]
	mov	eax, DWORD PTR [rax]
	mov	DWORD PTR -44[rbp], eax
	mov	rdx, QWORD PTR workers_upto[rip]
	mov	eax, DWORD PTR -44[rbp]
	cdqe
	sal	rax, 3
	add	rax, rdx
	mov	QWORD PTR -16[rbp], rax
	lea	rdi, primes_lock[rip]
	call	pthread_mutex_lock@PLT
.L15:
	mov	rax, QWORD PTR primes_upto[rip]
	mov	QWORD PTR -8[rbp], rax
	mov	rax, QWORD PTR primes_upto[rip]
	add	rax, 2
	mov	QWORD PTR primes_upto[rip], rax
	mov	rdx, QWORD PTR primes_size[rip]
	mov	rax, QWORD PTR -16[rbp]
	mov	QWORD PTR [rax], rdx
	mov	rax, QWORD PTR workers_upto[rip]
	mov	rax, QWORD PTR [rax]
	mov	QWORD PTR -24[rbp], rax
	mov	DWORD PTR -48[rbp], 1
	jmp	.L16
.L18:
	mov	rdx, QWORD PTR workers_upto[rip]
	mov	eax, DWORD PTR -48[rbp]
	cdqe
	sal	rax, 3
	add	rax, rdx
	mov	rax, QWORD PTR [rax]
	cmp	QWORD PTR -24[rbp], rax
	jbe	.L17
	mov	rdx, QWORD PTR workers_upto[rip]
	mov	eax, DWORD PTR -48[rbp]
	cdqe
	sal	rax, 3
	add	rax, rdx
	mov	rax, QWORD PTR [rax]
	mov	QWORD PTR -24[rbp], rax
.L17:
	add	DWORD PTR -48[rbp], 1
.L16:
	mov	eax, DWORD PTR cpus[rip]
	cmp	DWORD PTR -48[rbp], eax
	jl	.L18
	lea	rdi, primes_lock[rip]
	call	pthread_mutex_unlock@PLT
	mov	rdx, QWORD PTR primes_upto[rip]
	mov	rax, QWORD PTR limit[rip]
	cmp	rdx, rax
	jnb	.L28
	mov	QWORD PTR -40[rbp], 0
	jmp	.L21
.L23:
	mov	rdx, QWORD PTR primes[rip]
	mov	rax, QWORD PTR -40[rbp]
	sal	rax, 3
	add	rax, rdx
	mov	rcx, QWORD PTR [rax]
	mov	rax, QWORD PTR -8[rbp]
	mov	edx, 0
	div	rcx
	mov	rax, rdx
	test	rax, rax
	jne	.L22
	lea	rdi, primes_lock[rip]
	call	pthread_mutex_lock@PLT
	jmp	.L15
.L22:
	add	QWORD PTR -40[rbp], 1
.L21:
	mov	rax, QWORD PTR -40[rbp]
	cmp	rax, QWORD PTR -24[rbp]
	jb	.L23
	mov	rdx, QWORD PTR primes[rip]
	mov	rax, QWORD PTR -40[rbp]
	sal	rax, 3
	add	rax, rdx
	mov	rax, QWORD PTR [rax]
	mov	QWORD PTR -32[rbp], rax
	jmp	.L24
.L26:
	mov	rax, QWORD PTR -8[rbp]
	mov	edx, 0
	div	QWORD PTR -32[rbp]
	mov	rax, rdx
	test	rax, rax
	jne	.L25
	lea	rdi, primes_lock[rip]
	call	pthread_mutex_lock@PLT
	jmp	.L15
.L25:
	add	QWORD PTR -32[rbp], 1
.L24:
	mov	rax, QWORD PTR -8[rbp]
	shr	rax
	cmp	QWORD PTR -32[rbp], rax
	jbe	.L26
	lea	rdi, primes_lock[rip]
	call	pthread_mutex_lock@PLT
	mov	rcx, QWORD PTR primes[rip]
	mov	rax, QWORD PTR primes_size[rip]
	lea	rdx, 1[rax]
	mov	QWORD PTR primes_size[rip], rdx
	sal	rax, 3
	lea	rdx, [rcx+rax]
	mov	rax, QWORD PTR -8[rbp]
	mov	QWORD PTR [rdx], rax
	jmp	.L15
.L28:
	nop
	lea	rdi, primes_lock[rip]
	call	pthread_mutex_unlock@PLT
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE8:
	.size	worker, .-worker
	.section	.rodata
.LC2:
	.string	"Usage: "
.LC3:
	.string	" <limit>\nOr:    "
.LC4:
	.string	" <cpus> <limit>\n"
	.align 8
.LC5:
	.string	"Finding primes up to %lu with %d workers\n"
	.align 8
.LC7:
	.string	"Found %lu primes in %f seconds\n"
.LC8:
	.string	"2"
.LC9:
	.string	"%lu\n"
	.text
	.globl	main
	.type	main, @function
main:
.LFB9:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	sub	rsp, 112
	mov	DWORD PTR -100[rbp], edi
	mov	QWORD PTR -112[rbp], rsi
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	cmp	DWORD PTR -100[rbp], 2
	jne	.L30
	mov	rax, QWORD PTR -112[rbp]
	add	rax, 8
	mov	rax, QWORD PTR [rax]
	mov	rdi, rax
	call	atol@PLT
	mov	QWORD PTR limit[rip], rax
	call	get_nprocs@PLT
	mov	DWORD PTR cpus[rip], eax
	jmp	.L31
.L30:
	cmp	DWORD PTR -100[rbp], 3
	jne	.L32
	mov	rax, QWORD PTR -112[rbp]
	add	rax, 16
	mov	rax, QWORD PTR [rax]
	mov	rdi, rax
	call	atol@PLT
	mov	QWORD PTR limit[rip], rax
	mov	rax, QWORD PTR -112[rbp]
	add	rax, 8
	mov	rax, QWORD PTR [rax]
	mov	rdi, rax
	call	atoi@PLT
	mov	DWORD PTR cpus[rip], eax
	jmp	.L31
.L32:
	mov	rax, QWORD PTR stderr[rip]
	mov	rcx, rax
	mov	edx, 7
	mov	esi, 1
	lea	rdi, .LC2[rip]
	call	fwrite@PLT
	mov	rax, QWORD PTR -112[rbp]
	mov	rdx, QWORD PTR [rax]
	mov	rax, QWORD PTR stderr[rip]
	mov	rsi, rdx
	mov	rdi, rax
	mov	eax, 0
	call	fprintf@PLT
	mov	rax, QWORD PTR stderr[rip]
	mov	rcx, rax
	mov	edx, 16
	mov	esi, 1
	lea	rdi, .LC3[rip]
	call	fwrite@PLT
	mov	rax, QWORD PTR -112[rbp]
	mov	rdx, QWORD PTR [rax]
	mov	rax, QWORD PTR stderr[rip]
	mov	rsi, rdx
	mov	rdi, rax
	mov	eax, 0
	call	fprintf@PLT
	mov	rax, QWORD PTR stderr[rip]
	mov	rcx, rax
	mov	edx, 16
	mov	esi, 1
	lea	rdi, .LC4[rip]
	call	fwrite@PLT
	mov	eax, 1
	jmp	.L42
.L31:
	mov	rax, QWORD PTR limit[rip]
	sal	rax, 3
	shr	rax
	mov	rdi, rax
	call	malloc@PLT
	mov	QWORD PTR primes[rip], rax
	mov	eax, DWORD PTR cpus[rip]
	cdqe
	sal	rax, 3
	mov	rdi, rax
	call	malloc@PLT
	mov	QWORD PTR workers_upto[rip], rax
	mov	eax, DWORD PTR cpus[rip]
	cdqe
	sal	rax, 3
	mov	rdi, rax
	call	malloc@PLT
	mov	QWORD PTR -64[rbp], rax
	mov	DWORD PTR -92[rbp], 0
	jmp	.L34
.L35:
	mov	rdx, QWORD PTR workers_upto[rip]
	mov	eax, DWORD PTR -92[rbp]
	cdqe
	sal	rax, 3
	add	rax, rdx
	mov	QWORD PTR [rax], 0
	add	DWORD PTR -92[rbp], 1
.L34:
	mov	eax, DWORD PTR cpus[rip]
	cmp	DWORD PTR -92[rbp], eax
	jl	.L35
	mov	rax, QWORD PTR primes[rip]
	mov	QWORD PTR [rax], 3
	mov	ecx, DWORD PTR cpus[rip]
	mov	rdx, QWORD PTR limit[rip]
	mov	rax, QWORD PTR stderr[rip]
	lea	rsi, .LC5[rip]
	mov	rdi, rax
	mov	eax, 0
	call	fprintf@PLT
	mov	eax, DWORD PTR cpus[rip]
	cdqe
	sal	rax, 2
	mov	rdi, rax
	call	malloc@PLT
	mov	QWORD PTR -56[rbp], rax
	lea	rax, -80[rbp]
	mov	ecx, 0
	lea	rdx, statsworker[rip]
	mov	esi, 0
	mov	rdi, rax
	call	pthread_create@PLT
	lea	rax, -48[rbp]
	mov	esi, 0
	mov	rdi, rax
	call	gettimeofday@PLT
	mov	DWORD PTR -88[rbp], 0
	jmp	.L36
.L37:
	mov	eax, DWORD PTR -88[rbp]
	cdqe
	lea	rdx, 0[0+rax*4]
	mov	rax, QWORD PTR -56[rbp]
	add	rdx, rax
	mov	eax, DWORD PTR -88[rbp]
	mov	DWORD PTR [rdx], eax
	mov	eax, DWORD PTR -88[rbp]
	cdqe
	lea	rdx, 0[0+rax*4]
	mov	rax, QWORD PTR -56[rbp]
	add	rdx, rax
	mov	eax, DWORD PTR -88[rbp]
	cdqe
	lea	rcx, 0[0+rax*8]
	mov	rax, QWORD PTR -64[rbp]
	add	rax, rcx
	mov	rcx, rdx
	lea	rdx, worker[rip]
	mov	esi, 0
	mov	rdi, rax
	call	pthread_create@PLT
	add	DWORD PTR -88[rbp], 1
.L36:
	mov	eax, DWORD PTR cpus[rip]
	cmp	DWORD PTR -88[rbp], eax
	jl	.L37
	mov	DWORD PTR -84[rbp], 0
	jmp	.L38
.L39:
	mov	eax, DWORD PTR -84[rbp]
	cdqe
	lea	rdx, 0[0+rax*8]
	mov	rax, QWORD PTR -64[rbp]
	add	rax, rdx
	mov	rax, QWORD PTR [rax]
	mov	esi, 0
	mov	rdi, rax
	call	pthread_join@PLT
	add	DWORD PTR -84[rbp], 1
.L38:
	mov	eax, DWORD PTR cpus[rip]
	cmp	DWORD PTR -84[rbp], eax
	jl	.L39
	lea	rax, -32[rbp]
	mov	esi, 0
	mov	rdi, rax
	call	gettimeofday@PLT
	mov	rax, QWORD PTR -80[rbp]
	mov	esi, 0
	mov	rdi, rax
	call	pthread_join@PLT
	mov	rax, QWORD PTR -32[rbp]
	mov	rdx, QWORD PTR -48[rbp]
	sub	rax, rdx
	pxor	xmm1, xmm1
	cvtsi2sd	xmm1, rax
	mov	rax, QWORD PTR -24[rbp]
	mov	rdx, QWORD PTR -40[rbp]
	sub	rax, rdx
	pxor	xmm0, xmm0
	cvtsi2sd	xmm0, rax
	movsd	xmm2, QWORD PTR .LC6[rip]
	divsd	xmm0, xmm2
	addsd	xmm1, xmm0
	movq	rdx, xmm1
	mov	rax, QWORD PTR primes_size[rip]
	lea	rcx, 1[rax]
	mov	rax, QWORD PTR stderr[rip]
	movq	xmm0, rdx
	mov	rdx, rcx
	lea	rsi, .LC7[rip]
	mov	rdi, rax
	mov	eax, 1
	call	fprintf@PLT
	mov	rsi, QWORD PTR primes_size[rip]
	mov	rax, QWORD PTR primes[rip]
	lea	rcx, num_compare[rip]
	mov	edx, 8
	mov	rdi, rax
	call	qsort@PLT
	lea	rdi, .LC8[rip]
	call	puts@PLT
	mov	QWORD PTR -72[rbp], 0
	jmp	.L40
.L41:
	mov	rdx, QWORD PTR primes[rip]
	mov	rax, QWORD PTR -72[rbp]
	sal	rax, 3
	add	rax, rdx
	mov	rax, QWORD PTR [rax]
	mov	rsi, rax
	lea	rdi, .LC9[rip]
	mov	eax, 0
	call	printf@PLT
	add	QWORD PTR -72[rbp], 1
.L40:
	mov	rax, QWORD PTR primes_size[rip]
	cmp	QWORD PTR -72[rbp], rax
	jb	.L41
	mov	rax, QWORD PTR primes[rip]
	mov	rdi, rax
	call	free@PLT
	mov	rax, QWORD PTR workers_upto[rip]
	mov	rdi, rax
	call	free@PLT
	mov	rax, QWORD PTR -64[rbp]
	mov	rdi, rax
	call	free@PLT
	mov	rax, QWORD PTR -56[rbp]
	mov	rdi, rax
	call	free@PLT
	mov	eax, 0
.L42:
	mov	rcx, QWORD PTR -8[rbp]
	sub	rcx, QWORD PTR fs:40
	je	.L43
	call	__stack_chk_fail@PLT
.L43:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE9:
	.size	main, .-main
	.section	.rodata
	.align 8
.LC0:
	.long	0
	.long	1079574528
	.align 8
.LC6:
	.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	"176240.c"
	.text
	.comm	limit,4,4
	.comm	primes,4,4
	.global	primes_size
	.bss
	.align	2
	.type	primes_size, %object
	.size	primes_size, 4
primes_size:
	.space	4
	.global	primes_upto
	.data
	.align	2
	.type	primes_upto, %object
	.size	primes_upto, 4
primes_upto:
	.word	3
	.comm	primes_lock,24,4
	.comm	workers_upto,4,4
	.comm	cpus,4,4
	.text
	.align	2
	.global	num_compare
	.syntax unified
	.arm
	.fpu softvfp
	.type	num_compare, %function
num_compare:
	@ args = 0, pretend = 0, frame = 16
	@ frame_needed = 1, uses_anonymous_args = 0
	@ link register save eliminated.
	str	fp, [sp, #-4]!
	add	fp, sp, #0
	sub	sp, sp, #20
	str	r0, [fp, #-16]
	str	r1, [fp, #-20]
	ldr	r3, [fp, #-16]
	ldr	r3, [r3]
	str	r3, [fp, #-12]
	ldr	r3, [fp, #-20]
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	ldr	r2, [fp, #-12]
	ldr	r3, [fp, #-8]
	cmp	r2, r3
	bne	.L2
	mov	r3, #0
	b	.L3
.L2:
	ldr	r2, [fp, #-12]
	ldr	r3, [fp, #-8]
	cmp	r2, r3
	bcs	.L4
	mvn	r3, #0
	b	.L3
.L4:
	mov	r3, #1
.L3:
	mov	r0, r3
	add	sp, fp, #0
	@ sp needed
	ldr	fp, [sp], #4
	bx	lr
	.size	num_compare, .-num_compare
	.global	__aeabi_ui2d
	.global	__aeabi_ddiv
	.global	__aeabi_dmul
	.section	.rodata
	.align	2
.LC0:
	.ascii	"Found %lu primes, %f%% done\012\000"
	.text
	.align	2
	.global	statsworker
	.syntax unified
	.arm
	.fpu softvfp
	.type	statsworker, %function
statsworker:
	@ args = 0, pretend = 0, frame = 8
	@ 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, #-24]
.L8:
	ldr	r0, .L10
	bl	usleep
	ldr	r0, .L10+4
	bl	pthread_mutex_lock
	ldr	r3, .L10+8
	ldr	r2, [r3]
	ldr	r3, .L10+12
	ldr	r3, [r3]
	cmp	r2, r3
	bcc	.L6
	ldr	r0, .L10+4
	bl	pthread_mutex_unlock
	mov	r3, #0
	b	.L9
.L6:
	ldr	r3, .L10+16
	ldr	r6, [r3]
	ldr	r3, .L10+20
	ldr	r3, [r3]
	add	r7, r3, #1
	ldr	r3, .L10+8
	ldr	r3, [r3]
	mov	r0, r3
	bl	__aeabi_ui2d
	mov	r4, r0
	mov	r5, r1
	ldr	r3, .L10+12
	ldr	r3, [r3]
	mov	r0, r3
	bl	__aeabi_ui2d
	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, .L10+24
	bl	__aeabi_dmul
	mov	r2, r0
	mov	r3, r1
	stm	sp, {r2-r3}
	mov	r2, r7
	ldr	r1, .L10+28
	mov	r0, r6
	bl	fprintf
	ldr	r0, .L10+4
	bl	pthread_mutex_unlock
	b	.L8
.L9:
	mov	r0, r3
	sub	sp, fp, #20
	@ sp needed
	pop	{r4, r5, r6, r7, fp, pc}
.L11:
	.align	2
.L10:
	.word	10000000
	.word	primes_lock
	.word	primes_upto
	.word	limit
	.word	stderr
	.word	primes_size
	.word	1079574528
	.word	.LC0
	.size	statsworker, .-statsworker
	.global	__aeabi_uidivmod
	.align	2
	.global	worker
	.syntax unified
	.arm
	.fpu softvfp
	.type	worker, %function
worker:
	@ args = 0, pretend = 0, frame = 40
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #40
	str	r0, [fp, #-40]
	ldr	r3, [fp, #-40]
	ldr	r3, [r3]
	str	r3, [fp, #-16]
	ldr	r3, .L27
	ldr	r2, [r3]
	ldr	r3, [fp, #-16]
	lsl	r3, r3, #2
	add	r3, r2, r3
	str	r3, [fp, #-12]
	ldr	r0, .L27+4
	bl	pthread_mutex_lock
.L13:
	ldr	r3, .L27+8
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	ldr	r3, .L27+8
	ldr	r3, [r3]
	add	r3, r3, #2
	ldr	r2, .L27+8
	str	r3, [r2]
	ldr	r3, .L27+12
	ldr	r2, [r3]
	ldr	r3, [fp, #-12]
	str	r2, [r3]
	ldr	r3, .L27
	ldr	r3, [r3]
	ldr	r3, [r3]
	str	r3, [fp, #-24]
	mov	r3, #1
	str	r3, [fp, #-20]
	b	.L14
.L16:
	ldr	r3, .L27
	ldr	r2, [r3]
	ldr	r3, [fp, #-20]
	lsl	r3, r3, #2
	add	r3, r2, r3
	ldr	r3, [r3]
	ldr	r2, [fp, #-24]
	cmp	r2, r3
	bls	.L15
	ldr	r3, .L27
	ldr	r2, [r3]
	ldr	r3, [fp, #-20]
	lsl	r3, r3, #2
	add	r3, r2, r3
	ldr	r3, [r3]
	str	r3, [fp, #-24]
.L15:
	ldr	r3, [fp, #-20]
	add	r3, r3, #1
	str	r3, [fp, #-20]
.L14:
	ldr	r3, .L27+16
	ldr	r3, [r3]
	ldr	r2, [fp, #-20]
	cmp	r2, r3
	blt	.L16
	ldr	r0, .L27+4
	bl	pthread_mutex_unlock
	ldr	r3, .L27+8
	ldr	r2, [r3]
	ldr	r3, .L27+20
	ldr	r3, [r3]
	cmp	r2, r3
	bcs	.L26
	mov	r3, #0
	str	r3, [fp, #-32]
	b	.L19
.L21:
	ldr	r3, .L27+24
	ldr	r2, [r3]
	ldr	r3, [fp, #-32]
	lsl	r3, r3, #2
	add	r3, r2, r3
	ldr	r2, [r3]
	ldr	r3, [fp, #-8]
	mov	r1, r2
	mov	r0, r3
	bl	__aeabi_uidivmod
	mov	r3, r1
	cmp	r3, #0
	bne	.L20
	ldr	r0, .L27+4
	bl	pthread_mutex_lock
	b	.L13
.L20:
	ldr	r3, [fp, #-32]
	add	r3, r3, #1
	str	r3, [fp, #-32]
.L19:
	ldr	r2, [fp, #-32]
	ldr	r3, [fp, #-24]
	cmp	r2, r3
	bcc	.L21
	ldr	r3, .L27+24
	ldr	r2, [r3]
	ldr	r3, [fp, #-32]
	lsl	r3, r3, #2
	add	r3, r2, r3
	ldr	r3, [r3]
	str	r3, [fp, #-28]
	b	.L22
.L24:
	ldr	r3, [fp, #-8]
	ldr	r1, [fp, #-28]
	mov	r0, r3
	bl	__aeabi_uidivmod
	mov	r3, r1
	cmp	r3, #0
	bne	.L23
	ldr	r0, .L27+4
	bl	pthread_mutex_lock
	b	.L13
.L23:
	ldr	r3, [fp, #-28]
	add	r3, r3, #1
	str	r3, [fp, #-28]
.L22:
	ldr	r3, [fp, #-8]
	lsr	r3, r3, #1
	ldr	r2, [fp, #-28]
	cmp	r2, r3
	bls	.L24
	ldr	r0, .L27+4
	bl	pthread_mutex_lock
	ldr	r3, .L27+24
	ldr	r2, [r3]
	ldr	r3, .L27+12
	ldr	r3, [r3]
	add	r1, r3, #1
	ldr	r0, .L27+12
	str	r1, [r0]
	lsl	r3, r3, #2
	add	r3, r2, r3
	ldr	r2, [fp, #-8]
	str	r2, [r3]
	b	.L13
.L26:
	nop
	ldr	r0, .L27+4
	bl	pthread_mutex_unlock
	nop
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L28:
	.align	2
.L27:
	.word	workers_upto
	.word	primes_lock
	.word	primes_upto
	.word	primes_size
	.word	cpus
	.word	limit
	.word	primes
	.size	worker, .-worker
	.section	.rodata
	.align	2
.LC1:
	.ascii	"Usage: \000"
	.align	2
.LC2:
	.ascii	" <limit>\012Or:    \000"
	.align	2
.LC3:
	.ascii	" <cpus> <limit>\012\000"
	.align	2
.LC4:
	.ascii	"Finding primes up to %lu with %d workers\012\000"
	.global	__aeabi_i2d
	.global	__aeabi_dadd
	.align	2
.LC5:
	.ascii	"Found %lu primes in %f seconds\012\000"
	.align	2
.LC6:
	.ascii	"2\000"
	.align	2
.LC7:
	.ascii	"%lu\012\000"
	.align	2
.LC8:
	.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, r6, r7, fp, lr}
	add	fp, sp, #20
	sub	sp, sp, #64
	str	r0, [fp, #-72]
	str	r1, [fp, #-76]
	ldr	r3, .L44
	ldr	r3, [r3]
	str	r3, [fp, #-24]
	mov	r3,#0
	ldr	r3, [fp, #-72]
	cmp	r3, #2
	bne	.L30
	ldr	r3, [fp, #-76]
	add	r3, r3, #4
	ldr	r3, [r3]
	mov	r0, r3
	bl	atol
	mov	r3, r0
	mov	r2, r3
	ldr	r3, .L44+4
	str	r2, [r3]
	bl	get_nprocs
	mov	r3, r0
	ldr	r2, .L44+8
	str	r3, [r2]
	b	.L31
.L30:
	ldr	r3, [fp, #-72]
	cmp	r3, #3
	bne	.L32
	ldr	r3, [fp, #-76]
	add	r3, r3, #8
	ldr	r3, [r3]
	mov	r0, r3
	bl	atol
	mov	r3, r0
	mov	r2, r3
	ldr	r3, .L44+4
	str	r2, [r3]
	ldr	r3, [fp, #-76]
	add	r3, r3, #4
	ldr	r3, [r3]
	mov	r0, r3
	bl	atoi
	mov	r3, r0
	ldr	r2, .L44+8
	str	r3, [r2]
	b	.L31
.L32:
	ldr	r3, .L44+12
	ldr	r3, [r3]
	mov	r2, #7
	mov	r1, #1
	ldr	r0, .L44+16
	bl	fwrite
	ldr	r3, .L44+12
	ldr	r2, [r3]
	ldr	r3, [fp, #-76]
	ldr	r3, [r3]
	mov	r1, r3
	mov	r0, r2
	bl	fprintf
	ldr	r3, .L44+12
	ldr	r3, [r3]
	mov	r2, #16
	mov	r1, #1
	ldr	r0, .L44+20
	bl	fwrite
	ldr	r3, .L44+12
	ldr	r2, [r3]
	ldr	r3, [fp, #-76]
	ldr	r3, [r3]
	mov	r1, r3
	mov	r0, r2
	bl	fprintf
	ldr	r3, .L44+12
	ldr	r3, [r3]
	mov	r2, #16
	mov	r1, #1
	ldr	r0, .L44+24
	bl	fwrite
	mov	r3, #1
	b	.L42
.L31:
	ldr	r3, .L44+4
	ldr	r3, [r3]
	lsl	r3, r3, #2
	lsr	r3, r3, #1
	mov	r0, r3
	bl	malloc
	mov	r3, r0
	mov	r2, r3
	ldr	r3, .L44+28
	str	r2, [r3]
	ldr	r3, .L44+8
	ldr	r3, [r3]
	lsl	r3, r3, #2
	mov	r0, r3
	bl	malloc
	mov	r3, r0
	mov	r2, r3
	ldr	r3, .L44+32
	str	r2, [r3]
	ldr	r3, .L44+8
	ldr	r3, [r3]
	lsl	r3, r3, #2
	mov	r0, r3
	bl	malloc
	mov	r3, r0
	str	r3, [fp, #-48]
	mov	r3, #0
	str	r3, [fp, #-64]
	b	.L34
.L35:
	ldr	r3, .L44+32
	ldr	r2, [r3]
	ldr	r3, [fp, #-64]
	lsl	r3, r3, #2
	add	r3, r2, r3
	mov	r2, #0
	str	r2, [r3]
	ldr	r3, [fp, #-64]
	add	r3, r3, #1
	str	r3, [fp, #-64]
.L34:
	ldr	r3, .L44+8
	ldr	r3, [r3]
	ldr	r2, [fp, #-64]
	cmp	r2, r3
	blt	.L35
	ldr	r3, .L44+28
	ldr	r3, [r3]
	mov	r2, #3
	str	r2, [r3]
	ldr	r3, .L44+12
	ldr	r0, [r3]
	ldr	r3, .L44+4
	ldr	r2, [r3]
	ldr	r3, .L44+8
	ldr	r3, [r3]
	ldr	r1, .L44+36
	bl	fprintf
	ldr	r3, .L44+8
	ldr	r3, [r3]
	lsl	r3, r3, #2
	mov	r0, r3
	bl	malloc
	mov	r3, r0
	str	r3, [fp, #-44]
	sub	r0, fp, #68
	mov	r3, #0
	ldr	r2, .L44+40
	mov	r1, #0
	bl	pthread_create
	sub	r3, fp, #40
	mov	r1, #0
	mov	r0, r3
	bl	gettimeofday
	mov	r3, #0
	str	r3, [fp, #-60]
	b	.L36
.L37:
	ldr	r3, [fp, #-60]
	lsl	r3, r3, #2
	ldr	r2, [fp, #-44]
	add	r3, r2, r3
	ldr	r2, [fp, #-60]
	str	r2, [r3]
	ldr	r3, [fp, #-60]
	lsl	r3, r3, #2
	ldr	r2, [fp, #-48]
	add	r0, r2, r3
	ldr	r3, [fp, #-60]
	lsl	r3, r3, #2
	ldr	r2, [fp, #-44]
	add	r3, r2, r3
	ldr	r2, .L44+44
	mov	r1, #0
	bl	pthread_create
	ldr	r3, [fp, #-60]
	add	r3, r3, #1
	str	r3, [fp, #-60]
.L36:
	ldr	r3, .L44+8
	ldr	r3, [r3]
	ldr	r2, [fp, #-60]
	cmp	r2, r3
	blt	.L37
	mov	r3, #0
	str	r3, [fp, #-56]
	b	.L38
.L39:
	ldr	r3, [fp, #-56]
	lsl	r3, r3, #2
	ldr	r2, [fp, #-48]
	add	r3, r2, r3
	ldr	r3, [r3]
	mov	r1, #0
	mov	r0, r3
	bl	pthread_join
	ldr	r3, [fp, #-56]
	add	r3, r3, #1
	str	r3, [fp, #-56]
.L38:
	ldr	r3, .L44+8
	ldr	r3, [r3]
	ldr	r2, [fp, #-56]
	cmp	r2, r3
	blt	.L39
	sub	r3, fp, #32
	mov	r1, #0
	mov	r0, r3
	bl	gettimeofday
	ldr	r3, [fp, #-68]
	mov	r1, #0
	mov	r0, r3
	bl	pthread_join
	ldr	r3, .L44+12
	ldr	r6, [r3]
	ldr	r3, .L44+48
	ldr	r3, [r3]
	add	r7, r3, #1
	ldr	r2, [fp, #-32]
	ldr	r3, [fp, #-40]
	sub	r3, r2, r3
	mov	r0, r3
	bl	__aeabi_i2d
	mov	r4, r0
	mov	r5, r1
	ldr	r2, [fp, #-28]
	ldr	r3, [fp, #-36]
	sub	r3, r2, r3
	mov	r0, r3
	bl	__aeabi_i2d
	mov	r2, #0
	ldr	r3, .L44+52
	bl	__aeabi_ddiv
	mov	r2, r0
	mov	r3, r1
	mov	r0, r4
	mov	r1, r5
	bl	__aeabi_dadd
	mov	r2, r0
	mov	r3, r1
	stm	sp, {r2-r3}
	mov	r2, r7
	ldr	r1, .L44+56
	mov	r0, r6
	bl	fprintf
	ldr	r3, .L44+28
	ldr	r0, [r3]
	ldr	r3, .L44+48
	ldr	r1, [r3]
	ldr	r3, .L44+60
	mov	r2, #4
	bl	qsort
	ldr	r0, .L44+64
	bl	puts
	mov	r3, #0
	str	r3, [fp, #-52]
	b	.L40
.L41:
	ldr	r3, .L44+28
	ldr	r2, [r3]
	ldr	r3, [fp, #-52]
	lsl	r3, r3, #2
	add	r3, r2, r3
	ldr	r3, [r3]
	mov	r1, r3
	ldr	r0, .L44+68
	bl	printf
	ldr	r3, [fp, #-52]
	add	r3, r3, #1
	str	r3, [fp, #-52]
.L40:
	ldr	r3, .L44+48
	ldr	r3, [r3]
	ldr	r2, [fp, #-52]
	cmp	r2, r3
	bcc	.L41
	ldr	r3, .L44+28
	ldr	r3, [r3]
	mov	r0, r3
	bl	free
	ldr	r3, .L44+32
	ldr	r3, [r3]
	mov	r0, r3
	bl	free
	ldr	r0, [fp, #-48]
	bl	free
	ldr	r0, [fp, #-44]
	bl	free
	mov	r3, #0
.L42:
	ldr	r2, .L44
	ldr	r1, [r2]
	ldr	r2, [fp, #-24]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L43
	bl	__stack_chk_fail
.L43:
	mov	r0, r3
	sub	sp, fp, #20
	@ sp needed
	pop	{r4, r5, r6, r7, fp, pc}
.L45:
	.align	2
.L44:
	.word	.LC8
	.word	limit
	.word	cpus
	.word	stderr
	.word	.LC1
	.word	.LC2
	.word	.LC3
	.word	primes
	.word	workers_upto
	.word	.LC4
	.word	statsworker
	.word	worker
	.word	primes_size
	.word	1093567616
	.word	.LC5
	.word	num_compare
	.word	.LC6
	.word	.LC7
	.size	main, .-main
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
