	.file	"204603.c"
	.intel_syntax noprefix
	.text
	.globl	threads_done
	.bss
	.align 2
	.type	threads_done, @object
	.size	threads_done, 2
threads_done:
	.zero	2
	.text
	.globl	solve
	.type	solve, @function
solve:
.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 -8[rbp], rdi
	jmp	.L2
.L4:
	mov	rax, QWORD PTR -8[rbp]
	and	eax, 1
	test	rax, rax
	jne	.L3
	mov	rax, QWORD PTR -8[rbp]
	mov	rdx, rax
	shr	rdx, 63
	add	rax, rdx
	sar	rax
	mov	QWORD PTR -8[rbp], rax
	jmp	.L2
.L3:
	mov	rdx, QWORD PTR -8[rbp]
	mov	rax, rdx
	add	rax, rax
	add	rax, rdx
	add	rax, 1
	mov	QWORD PTR -8[rbp], rax
.L2:
	cmp	QWORD PTR -8[rbp], 1
	jne	.L4
	nop
	nop
	pop	rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	solve, .-solve
	.globl	driver
	.type	driver, @function
driver:
.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, 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	rax, QWORD PTR 8[rax]
	mov	QWORD PTR -16[rbp], rax
	jmp	.L6
.L7:
	mov	rax, QWORD PTR -16[rbp]
	mov	rdi, rax
	call	solve
	mov	rax, QWORD PTR -8[rbp]
	mov	rax, QWORD PTR 8[rax]
	add	QWORD PTR -16[rbp], rax
.L6:
	mov	rax, QWORD PTR -8[rbp]
	mov	rax, QWORD PTR [rax]
	cmp	QWORD PTR -16[rbp], rax
	jl	.L7
	movzx	eax, WORD PTR threads_done[rip]
	add	eax, 1
	mov	WORD PTR threads_done[rip], ax
	mov	rax, QWORD PTR -24[rbp]
	mov	rdi, rax
	call	free@PLT
	mov	eax, 0
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.size	driver, .-driver
	.section	.rodata
.LC0:
	.string	"Spawn proc..."
	.align 8
.LC1:
	.string	"Warning: failed to spawn child process!"
.LC2:
	.string	" done!"
	.text
	.globl	fork_spawn
	.type	fork_spawn, @function
fork_spawn:
.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, 48
	mov	QWORD PTR -40[rbp], rdi
	mov	DWORD PTR -44[rbp], esi
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	mov	DWORD PTR -20[rbp], 0
	jmp	.L10
.L13:
	lea	rdi, .LC0[rip]
	mov	eax, 0
	call	printf@PLT
	mov	rax, QWORD PTR stdout[rip]
	mov	rdi, rax
	call	fflush@PLT
	call	fork@PLT
	mov	DWORD PTR -24[rbp], eax
	mov	eax, DWORD PTR -24[rbp]
	test	eax, eax
	jne	.L11
	mov	edi, 24
	call	malloc@PLT
	mov	QWORD PTR -16[rbp], rax
	mov	rax, QWORD PTR -16[rbp]
	mov	rdx, QWORD PTR -40[rbp]
	mov	QWORD PTR [rax], rdx
	mov	eax, DWORD PTR -20[rbp]
	add	eax, 1
	movsx	rdx, eax
	mov	rax, QWORD PTR -16[rbp]
	mov	QWORD PTR 8[rax], rdx
	mov	eax, DWORD PTR -44[rbp]
	movsx	rdx, eax
	mov	rax, QWORD PTR -16[rbp]
	mov	QWORD PTR 16[rax], rdx
	mov	rax, QWORD PTR -16[rbp]
	mov	rdi, rax
	call	driver
	mov	edi, 0
	call	exit@PLT
.L11:
	mov	eax, DWORD PTR -24[rbp]
	cmp	eax, -1
	jne	.L12
	lea	rdi, .LC1[rip]
	call	puts@PLT
.L12:
	lea	rdi, .LC2[rip]
	call	puts@PLT
	add	DWORD PTR -20[rbp], 1
.L10:
	mov	eax, DWORD PTR -20[rbp]
	cmp	eax, DWORD PTR -44[rbp]
	jl	.L13
	jmp	.L14
.L15:
	lea	rax, -24[rbp]
	mov	rdi, rax
	call	wait@PLT
	movzx	eax, WORD PTR threads_done[rip]
	add	eax, 1
	mov	WORD PTR threads_done[rip], ax
.L14:
	movzx	eax, WORD PTR threads_done[rip]
	cwde
	cmp	DWORD PTR -44[rbp], eax
	jne	.L15
	nop
	mov	rax, QWORD PTR -8[rbp]
	sub	rax, QWORD PTR fs:40
	je	.L16
	call	__stack_chk_fail@PLT
.L16:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE8:
	.size	fork_spawn, .-fork_spawn
	.section	.rodata
.LC3:
	.string	"Spawn thread..."
	.align 8
.LC4:
	.string	"Warning: failed to spawn thread!"
	.text
	.globl	thread_spawn
	.type	thread_spawn, @function
thread_spawn:
.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, 48
	mov	QWORD PTR -40[rbp], rdi
	mov	DWORD PTR -44[rbp], esi
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	mov	DWORD PTR -32[rbp], 0
	jmp	.L18
.L20:
	mov	edi, 24
	call	malloc@PLT
	mov	QWORD PTR -16[rbp], rax
	mov	rax, QWORD PTR -16[rbp]
	mov	rdx, QWORD PTR -40[rbp]
	mov	QWORD PTR [rax], rdx
	mov	eax, DWORD PTR -32[rbp]
	add	eax, 1
	movsx	rdx, eax
	mov	rax, QWORD PTR -16[rbp]
	mov	QWORD PTR 8[rax], rdx
	mov	eax, DWORD PTR -44[rbp]
	movsx	rdx, eax
	mov	rax, QWORD PTR -16[rbp]
	mov	QWORD PTR 16[rax], rdx
	lea	rdi, .LC3[rip]
	mov	eax, 0
	call	printf@PLT
	mov	rdx, QWORD PTR -16[rbp]
	lea	rax, -24[rbp]
	mov	rcx, rdx
	lea	rdx, driver[rip]
	mov	esi, 0
	mov	rdi, rax
	call	pthread_create@PLT
	mov	DWORD PTR -28[rbp], eax
	cmp	DWORD PTR -28[rbp], 0
	je	.L19
	lea	rdi, .LC4[rip]
	call	puts@PLT
.L19:
	lea	rdi, .LC2[rip]
	call	puts@PLT
	add	DWORD PTR -32[rbp], 1
.L18:
	mov	eax, DWORD PTR -32[rbp]
	cmp	eax, DWORD PTR -44[rbp]
	jl	.L20
	nop
	mov	rax, QWORD PTR -8[rbp]
	sub	rax, QWORD PTR fs:40
	je	.L21
	call	__stack_chk_fail@PLT
.L21:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE9:
	.size	thread_spawn, .-thread_spawn
	.section	.rodata
	.align 8
.LC5:
	.string	"Usage: %s [--threads | --procs] <count> N\n"
.LC6:
	.string	"--threads"
.LC7:
	.string	"--procs"
.LC8:
	.string	"Unknown spawning mode: %s\n"
.LC9:
	.string	"Incorrect thread count: %d\n"
.LC10:
	.string	"Incorrect value for N: %ld\n"
	.text
	.globl	main
	.type	main, @function
main:
.LFB10:
	.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	DWORD PTR -20[rbp], edi
	mov	QWORD PTR -32[rbp], rsi
	mov	DWORD PTR -16[rbp], 0
	mov	DWORD PTR -12[rbp], 0
	mov	QWORD PTR -8[rbp], 0
	cmp	DWORD PTR -20[rbp], 4
	je	.L23
	mov	rax, QWORD PTR -32[rbp]
	mov	rax, QWORD PTR [rax]
	mov	rsi, rax
	lea	rdi, .LC5[rip]
	mov	eax, 0
	call	printf@PLT
	mov	eax, 1
	jmp	.L24
.L23:
	mov	rax, QWORD PTR -32[rbp]
	add	rax, 8
	mov	rax, QWORD PTR [rax]
	mov	rsi, rax
	lea	rdi, .LC6[rip]
	call	strcmp@PLT
	test	eax, eax
	jne	.L25
	mov	DWORD PTR -16[rbp], 1
	jmp	.L26
.L25:
	mov	rax, QWORD PTR -32[rbp]
	add	rax, 8
	mov	rax, QWORD PTR [rax]
	mov	rsi, rax
	lea	rdi, .LC7[rip]
	call	strcmp@PLT
	test	eax, eax
	jne	.L27
	mov	DWORD PTR -16[rbp], 2
	jmp	.L26
.L27:
	mov	rax, QWORD PTR -32[rbp]
	add	rax, 8
	mov	rax, QWORD PTR [rax]
	mov	rsi, rax
	lea	rdi, .LC8[rip]
	mov	eax, 0
	call	printf@PLT
.L26:
	mov	rax, QWORD PTR -32[rbp]
	add	rax, 16
	mov	rax, QWORD PTR [rax]
	mov	rdi, rax
	call	atoi@PLT
	mov	DWORD PTR -12[rbp], eax
	cmp	DWORD PTR -12[rbp], 0
	jne	.L28
	mov	eax, DWORD PTR -12[rbp]
	mov	esi, eax
	lea	rdi, .LC9[rip]
	mov	eax, 0
	call	printf@PLT
.L28:
	mov	rax, QWORD PTR -32[rbp]
	add	rax, 24
	mov	rax, QWORD PTR [rax]
	mov	rdi, rax
	call	atoi@PLT
	cdqe
	mov	QWORD PTR -8[rbp], rax
	cmp	QWORD PTR -8[rbp], 0
	jne	.L29
	mov	rax, QWORD PTR -8[rbp]
	mov	rsi, rax
	lea	rdi, .LC10[rip]
	mov	eax, 0
	call	printf@PLT
.L29:
	cmp	DWORD PTR -16[rbp], 2
	jne	.L30
	mov	edx, DWORD PTR -12[rbp]
	mov	rax, QWORD PTR -8[rbp]
	mov	esi, edx
	mov	rdi, rax
	call	fork_spawn
	jmp	.L32
.L30:
	cmp	DWORD PTR -16[rbp], 1
	jne	.L32
	mov	edx, DWORD PTR -12[rbp]
	mov	rax, QWORD PTR -8[rbp]
	mov	esi, edx
	mov	rdi, rax
	call	thread_spawn
	jmp	.L32
.L33:
	mov	edi, 100
	call	usleep@PLT
.L32:
	movzx	eax, WORD PTR threads_done[rip]
	cwde
	cmp	DWORD PTR -12[rbp], eax
	jne	.L33
	mov	eax, 0
.L24:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE10:
	.size	main, .-main
	.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	"204603.c"
	.text
	.global	threads_done
	.bss
	.align	1
	.type	threads_done, %object
	.size	threads_done, 2
threads_done:
	.space	2
	.text
	.align	2
	.global	solve
	.syntax unified
	.arm
	.fpu softvfp
	.type	solve, %function
solve:
	@ args = 0, pretend = 0, frame = 24
	@ frame_needed = 1, uses_anonymous_args = 0
	@ link register save eliminated.
	push	{r4, r5, r6, r7, r8, r9, fp}
	add	fp, sp, #24
	sub	sp, sp, #28
	str	r0, [fp, #-36]
	str	r1, [fp, #-32]
	b	.L2
.L4:
	sub	r3, fp, #36
	ldmia	r3, {r2-r3}
	mov	r0, #1
	mov	r1, #0
	and	r8, r2, r0
	and	r9, r3, r1
	orrs	r3, r8, r9
	bne	.L3
	sub	r3, fp, #36
	ldmia	r3, {r2-r3}
	lsr	r1, r3, #31
	mov	r0, r1
	mov	r1, #0
	adds	r4, r0, r2
	adc	r5, r1, r3
	mov	r2, #0
	mov	r3, #0
	lsr	r2, r4, #1
	orr	r2, r2, r5, lsl #31
	asr	r3, r5, #1
	str	r2, [fp, #-36]
	str	r3, [fp, #-32]
	b	.L2
.L3:
	sub	r1, fp, #36
	ldmia	r1, {r0-r1}
	mov	r2, r0
	mov	r3, r1
	adds	ip, r2, r2
	str	ip, [fp, #-44]
	adc	r3, r3, r3
	str	r3, [fp, #-40]
	sub	r3, fp, #44
	ldmia	r3, {r2-r3}
	adds	r6, r2, r0
	adc	r7, r3, r1
	adds	r3, r6, #1
	str	r3, [fp, #-52]
	adc	r3, r7, #0
	str	r3, [fp, #-48]
	sub	r3, fp, #52
	ldmia	r3, {r2-r3}
	str	r2, [fp, #-36]
	str	r3, [fp, #-32]
.L2:
	sub	r3, fp, #36
	ldmia	r3, {r2-r3}
	cmp	r3, #0
	cmpeq	r2, #1
	bne	.L4
	nop
	nop
	sub	sp, fp, #24
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, fp}
	bx	lr
	.size	solve, .-solve
	.align	2
	.global	driver
	.syntax unified
	.arm
	.fpu softvfp
	.type	driver, %function
driver:
	@ args = 0, pretend = 0, frame = 24
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{r4, r5, fp, lr}
	add	fp, sp, #12
	sub	sp, sp, #24
	str	r0, [fp, #-32]
	ldr	r3, [fp, #-32]
	str	r3, [fp, #-24]
	ldr	r3, [fp, #-24]
	add	r3, r3, #8
	ldmia	r3, {r2-r3}
	str	r2, [fp, #-20]
	str	r3, [fp, #-16]
	b	.L6
.L7:
	sub	r1, fp, #20
	ldmia	r1, {r0-r1}
	bl	solve
	ldr	r3, [fp, #-24]
	add	r3, r3, #8
	ldmia	r3, {r2-r3}
	sub	r1, fp, #20
	ldmia	r1, {r0-r1}
	adds	r4, r0, r2
	adc	r5, r1, r3
	str	r4, [fp, #-20]
	str	r5, [fp, #-16]
.L6:
	ldr	r3, [fp, #-24]
	ldmia	r3, {r2-r3}
	sub	r1, fp, #20
	ldmia	r1, {r0-r1}
	cmp	r0, r2
	sbcs	r3, r1, r3
	blt	.L7
	ldr	r3, .L9
	ldrsh	r3, [r3]
	lsl	r3, r3, #16
	lsr	r3, r3, #16
	add	r3, r3, #1
	lsl	r3, r3, #16
	lsr	r3, r3, #16
	lsl	r3, r3, #16
	asr	r3, r3, #16
	ldr	r2, .L9
	strh	r3, [r2]	@ movhi
	ldr	r0, [fp, #-32]
	bl	free
	mov	r3, #0
	mov	r0, r3
	sub	sp, fp, #12
	@ sp needed
	pop	{r4, r5, fp, pc}
.L10:
	.align	2
.L9:
	.word	threads_done
	.size	driver, .-driver
	.section	.rodata
	.align	2
.LC0:
	.ascii	"Spawn proc...\000"
	.align	2
.LC1:
	.ascii	"Warning: failed to spawn child process!\000"
	.align	2
.LC2:
	.ascii	" done!\000"
	.align	2
.LC3:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	fork_spawn
	.syntax unified
	.arm
	.fpu softvfp
	.type	fork_spawn, %function
fork_spawn:
	@ args = 0, pretend = 0, frame = 32
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #32
	str	r0, [fp, #-28]
	str	r1, [fp, #-24]
	str	r2, [fp, #-32]
	ldr	r3, .L19
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	mov	r3, #0
	str	r3, [fp, #-16]
	b	.L12
.L15:
	ldr	r0, .L19+4
	bl	printf
	ldr	r3, .L19+8
	ldr	r3, [r3]
	mov	r0, r3
	bl	fflush
	bl	fork
	mov	r3, r0
	str	r3, [fp, #-20]
	ldr	r3, [fp, #-20]
	cmp	r3, #0
	bne	.L13
	mov	r0, #24
	bl	malloc
	mov	r3, r0
	str	r3, [fp, #-12]
	ldr	r1, [fp, #-12]
	sub	r3, fp, #28
	ldmia	r3, {r2-r3}
	stm	r1, {r2-r3}
	ldr	r3, [fp, #-16]
	add	r3, r3, #1
	mov	r2, r3
	asr	r3, r2, #31
	ldr	r1, [fp, #-12]
	str	r2, [r1, #8]
	str	r3, [r1, #12]
	ldr	r3, [fp, #-32]
	mov	r2, r3
	asr	r3, r2, #31
	ldr	r1, [fp, #-12]
	str	r2, [r1, #16]
	str	r3, [r1, #20]
	ldr	r0, [fp, #-12]
	bl	driver
	mov	r0, #0
	bl	exit
.L13:
	ldr	r3, [fp, #-20]
	cmn	r3, #1
	bne	.L14
	ldr	r0, .L19+12
	bl	puts
.L14:
	ldr	r0, .L19+16
	bl	puts
	ldr	r3, [fp, #-16]
	add	r3, r3, #1
	str	r3, [fp, #-16]
.L12:
	ldr	r2, [fp, #-16]
	ldr	r3, [fp, #-32]
	cmp	r2, r3
	blt	.L15
	b	.L16
.L17:
	sub	r3, fp, #20
	mov	r0, r3
	bl	wait
	ldr	r3, .L19+20
	ldrsh	r3, [r3]
	lsl	r3, r3, #16
	lsr	r3, r3, #16
	add	r3, r3, #1
	lsl	r3, r3, #16
	lsr	r3, r3, #16
	lsl	r3, r3, #16
	asr	r3, r3, #16
	ldr	r2, .L19+20
	strh	r3, [r2]	@ movhi
.L16:
	ldr	r3, .L19+20
	ldrsh	r3, [r3]
	mov	r2, r3
	ldr	r3, [fp, #-32]
	cmp	r3, r2
	bne	.L17
	nop
	ldr	r3, .L19
	ldr	r2, [r3]
	ldr	r3, [fp, #-8]
	eors	r2, r3, r2
	mov	r3, #0
	beq	.L18
	bl	__stack_chk_fail
.L18:
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L20:
	.align	2
.L19:
	.word	.LC3
	.word	.LC0
	.word	stdout
	.word	.LC1
	.word	.LC2
	.word	threads_done
	.size	fork_spawn, .-fork_spawn
	.section	.rodata
	.align	2
.LC4:
	.ascii	"Spawn thread...\000"
	.align	2
.LC5:
	.ascii	"Warning: failed to spawn thread!\000"
	.align	2
.LC6:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	thread_spawn
	.syntax unified
	.arm
	.fpu softvfp
	.type	thread_spawn, %function
thread_spawn:
	@ 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, #-36]
	str	r1, [fp, #-32]
	str	r2, [fp, #-40]
	ldr	r3, .L26
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	mov	r3, #0
	str	r3, [fp, #-20]
	b	.L22
.L24:
	mov	r0, #24
	bl	malloc
	mov	r3, r0
	str	r3, [fp, #-16]
	ldr	r1, [fp, #-16]
	sub	r3, fp, #36
	ldmia	r3, {r2-r3}
	stm	r1, {r2-r3}
	ldr	r3, [fp, #-20]
	add	r3, r3, #1
	mov	r2, r3
	asr	r3, r2, #31
	ldr	r1, [fp, #-16]
	str	r2, [r1, #8]
	str	r3, [r1, #12]
	ldr	r3, [fp, #-40]
	mov	r2, r3
	asr	r3, r2, #31
	ldr	r1, [fp, #-16]
	str	r2, [r1, #16]
	str	r3, [r1, #20]
	ldr	r0, .L26+4
	bl	printf
	sub	r0, fp, #24
	ldr	r3, [fp, #-16]
	ldr	r2, .L26+8
	mov	r1, #0
	bl	pthread_create
	str	r0, [fp, #-12]
	ldr	r3, [fp, #-12]
	cmp	r3, #0
	beq	.L23
	ldr	r0, .L26+12
	bl	puts
.L23:
	ldr	r0, .L26+16
	bl	puts
	ldr	r3, [fp, #-20]
	add	r3, r3, #1
	str	r3, [fp, #-20]
.L22:
	ldr	r2, [fp, #-20]
	ldr	r3, [fp, #-40]
	cmp	r2, r3
	blt	.L24
	nop
	ldr	r3, .L26
	ldr	r2, [r3]
	ldr	r3, [fp, #-8]
	eors	r2, r3, r2
	mov	r3, #0
	beq	.L25
	bl	__stack_chk_fail
.L25:
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L27:
	.align	2
.L26:
	.word	.LC6
	.word	.LC4
	.word	driver
	.word	.LC5
	.word	.LC2
	.size	thread_spawn, .-thread_spawn
	.section	.rodata
	.align	2
.LC7:
	.ascii	"Usage: %s [--threads | --procs] <count> N\012\000"
	.align	2
.LC8:
	.ascii	"--threads\000"
	.align	2
.LC9:
	.ascii	"--procs\000"
	.align	2
.LC10:
	.ascii	"Unknown spawning mode: %s\012\000"
	.align	2
.LC11:
	.ascii	"Incorrect thread count: %d\012\000"
	.align	2
.LC12:
	.ascii	"Incorrect value for N: %ld\012\000"
	.text
	.align	2
	.global	main
	.syntax unified
	.arm
	.fpu softvfp
	.type	main, %function
main:
	@ args = 0, pretend = 0, frame = 24
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #24
	str	r0, [fp, #-24]
	str	r1, [fp, #-28]
	mov	r3, #0
	str	r3, [fp, #-20]
	mov	r3, #0
	str	r3, [fp, #-16]
	mov	r2, #0
	mov	r3, #0
	str	r2, [fp, #-12]
	str	r3, [fp, #-8]
	ldr	r3, [fp, #-24]
	cmp	r3, #4
	beq	.L29
	ldr	r3, [fp, #-28]
	ldr	r3, [r3]
	mov	r1, r3
	ldr	r0, .L40
	bl	printf
	mov	r3, #1
	b	.L30
.L29:
	ldr	r3, [fp, #-28]
	add	r3, r3, #4
	ldr	r3, [r3]
	mov	r1, r3
	ldr	r0, .L40+4
	bl	strcmp
	mov	r3, r0
	cmp	r3, #0
	bne	.L31
	mov	r3, #1
	str	r3, [fp, #-20]
	b	.L32
.L31:
	ldr	r3, [fp, #-28]
	add	r3, r3, #4
	ldr	r3, [r3]
	mov	r1, r3
	ldr	r0, .L40+8
	bl	strcmp
	mov	r3, r0
	cmp	r3, #0
	bne	.L33
	mov	r3, #2
	str	r3, [fp, #-20]
	b	.L32
.L33:
	ldr	r3, [fp, #-28]
	add	r3, r3, #4
	ldr	r3, [r3]
	mov	r1, r3
	ldr	r0, .L40+12
	bl	printf
.L32:
	ldr	r3, [fp, #-28]
	add	r3, r3, #8
	ldr	r3, [r3]
	mov	r0, r3
	bl	atoi
	str	r0, [fp, #-16]
	ldr	r3, [fp, #-16]
	cmp	r3, #0
	bne	.L34
	ldr	r1, [fp, #-16]
	ldr	r0, .L40+16
	bl	printf
.L34:
	ldr	r3, [fp, #-28]
	add	r3, r3, #12
	ldr	r3, [r3]
	mov	r0, r3
	bl	atoi
	mov	r3, r0
	mov	r2, r3
	asr	r3, r2, #31
	str	r2, [fp, #-12]
	str	r3, [fp, #-8]
	sub	r3, fp, #12
	ldmia	r3, {r2-r3}
	orrs	r3, r2, r3
	bne	.L35
	sub	r3, fp, #12
	ldmia	r3, {r2-r3}
	ldr	r0, .L40+20
	bl	printf
.L35:
	ldr	r3, [fp, #-20]
	cmp	r3, #2
	bne	.L36
	ldr	r2, [fp, #-16]
	sub	r1, fp, #12
	ldmia	r1, {r0-r1}
	bl	fork_spawn
	b	.L38
.L36:
	ldr	r3, [fp, #-20]
	cmp	r3, #1
	bne	.L38
	ldr	r2, [fp, #-16]
	sub	r1, fp, #12
	ldmia	r1, {r0-r1}
	bl	thread_spawn
	b	.L38
.L39:
	mov	r0, #100
	bl	usleep
.L38:
	ldr	r3, .L40+24
	ldrsh	r3, [r3]
	mov	r2, r3
	ldr	r3, [fp, #-16]
	cmp	r3, r2
	bne	.L39
	mov	r3, #0
.L30:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L41:
	.align	2
.L40:
	.word	.LC7
	.word	.LC8
	.word	.LC9
	.word	.LC10
	.word	.LC11
	.word	.LC12
	.word	threads_done
	.size	main, .-main
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
