	.file	"20451083.c"
	.intel_syntax noprefix
	.text
	.globl	prev1
	.data
	.align 4
	.type	prev1, @object
	.size	prev1, 4
prev1:
	.long	1
	.globl	prev2
	.align 4
	.type	prev2, @object
	.size	prev2, 4
prev2:
	.long	1
	.globl	times
	.align 4
	.type	times, @object
	.size	times, 4
times:
	.long	1
	.text
	.globl	fib
	.type	fib, @function
fib:
.LFB6:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	mov	eax, DWORD PTR times[rip]
	cmp	eax, 1
	je	.L2
	mov	eax, DWORD PTR times[rip]
	cmp	eax, 2
	jne	.L3
.L2:
	mov	eax, DWORD PTR times[rip]
	add	eax, 1
	mov	DWORD PTR times[rip], eax
	mov	eax, 1
	jmp	.L4
.L3:
	mov	edx, DWORD PTR prev1[rip]
	mov	eax, DWORD PTR prev2[rip]
	add	eax, edx
	mov	DWORD PTR -4[rbp], eax
	mov	eax, DWORD PTR prev2[rip]
	mov	DWORD PTR prev1[rip], eax
	mov	eax, DWORD PTR -4[rbp]
	mov	DWORD PTR prev2[rip], eax
	mov	eax, DWORD PTR -4[rbp]
.L4:
	pop	rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	fib, .-fib
	.section	.rodata
.LC0:
	.string	"pipe failed"
.LC1:
	.string	"%d: %d\n"
.LC2:
	.string	"fork failed"
	.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, 64
	mov	DWORD PTR -52[rbp], edi
	mov	QWORD PTR -64[rbp], rsi
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	mov	rax, QWORD PTR -64[rbp]
	add	rax, 8
	mov	rax, QWORD PTR [rax]
	mov	rdi, rax
	call	atoi@PLT
	mov	DWORD PTR -24[rbp], eax
	lea	rax, -16[rbp]
	mov	rdi, rax
	call	pipe@PLT
	cmp	eax, -1
	jne	.L6
	mov	rax, QWORD PTR stderr[rip]
	mov	rcx, rax
	mov	edx, 11
	mov	esi, 1
	lea	rdi, .LC0[rip]
	call	fwrite@PLT
	mov	eax, 1
	jmp	.L15
.L6:
	call	fork@PLT
	mov	DWORD PTR -20[rbp], eax
	cmp	DWORD PTR -20[rbp], 0
	jne	.L8
	mov	eax, DWORD PTR -16[rbp]
	mov	edi, eax
	call	close@PLT
	mov	edi, 0
	call	time@PLT
	mov	edi, eax
	call	srand@PLT
	mov	DWORD PTR -32[rbp], 0
	jmp	.L9
.L10:
	call	rand@PLT
	cdq
	shr	edx, 31
	add	eax, edx
	and	eax, 1
	sub	eax, edx
	mov	edi, eax
	call	sleep@PLT
	call	fib
	mov	DWORD PTR -36[rbp], eax
	mov	eax, DWORD PTR -12[rbp]
	lea	rcx, -36[rbp]
	mov	edx, 4
	mov	rsi, rcx
	mov	edi, eax
	call	write@PLT
	add	DWORD PTR -32[rbp], 1
.L9:
	mov	eax, DWORD PTR -32[rbp]
	cmp	eax, DWORD PTR -24[rbp]
	jl	.L10
	mov	eax, DWORD PTR -12[rbp]
	mov	edi, eax
	call	close@PLT
	jmp	.L11
.L8:
	cmp	DWORD PTR -20[rbp], 0
	jle	.L12
	mov	eax, DWORD PTR -12[rbp]
	mov	edi, eax
	call	close@PLT
	mov	DWORD PTR -36[rbp], 0
	mov	DWORD PTR -28[rbp], 0
	jmp	.L13
.L14:
	mov	eax, DWORD PTR -16[rbp]
	lea	rcx, -36[rbp]
	mov	edx, 4
	mov	rsi, rcx
	mov	edi, eax
	call	read@PLT
	mov	eax, DWORD PTR -36[rbp]
	mov	edx, DWORD PTR -28[rbp]
	lea	ecx, 1[rdx]
	mov	edx, eax
	mov	esi, ecx
	lea	rdi, .LC1[rip]
	mov	eax, 0
	call	printf@PLT
	add	DWORD PTR -28[rbp], 1
.L13:
	mov	eax, DWORD PTR -28[rbp]
	cmp	eax, DWORD PTR -24[rbp]
	jl	.L14
	mov	eax, DWORD PTR -16[rbp]
	mov	edi, eax
	call	close@PLT
	mov	edi, 0
	call	wait@PLT
	jmp	.L11
.L12:
	mov	rax, QWORD PTR stderr[rip]
	mov	rcx, rax
	mov	edx, 11
	mov	esi, 1
	lea	rdi, .LC2[rip]
	call	fwrite@PLT
	mov	eax, 1
	jmp	.L15
.L11:
	mov	eax, 0
.L15:
	mov	rsi, QWORD PTR -8[rbp]
	sub	rsi, QWORD PTR fs:40
	je	.L16
	call	__stack_chk_fail@PLT
.L16:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.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	"20451083.c"
	.text
	.global	prev1
	.data
	.align	2
	.type	prev1, %object
	.size	prev1, 4
prev1:
	.word	1
	.global	prev2
	.align	2
	.type	prev2, %object
	.size	prev2, 4
prev2:
	.word	1
	.global	times
	.align	2
	.type	times, %object
	.size	times, 4
times:
	.word	1
	.text
	.align	2
	.global	fib
	.syntax unified
	.arm
	.fpu softvfp
	.type	fib, %function
fib:
	@ args = 0, pretend = 0, frame = 8
	@ frame_needed = 1, uses_anonymous_args = 0
	@ link register save eliminated.
	str	fp, [sp, #-4]!
	add	fp, sp, #0
	sub	sp, sp, #12
	ldr	r3, .L5
	ldr	r3, [r3]
	cmp	r3, #1
	beq	.L2
	ldr	r3, .L5
	ldr	r3, [r3]
	cmp	r3, #2
	bne	.L3
.L2:
	ldr	r3, .L5
	ldr	r3, [r3]
	add	r3, r3, #1
	ldr	r2, .L5
	str	r3, [r2]
	mov	r3, #1
	b	.L4
.L3:
	ldr	r3, .L5+4
	ldr	r2, [r3]
	ldr	r3, .L5+8
	ldr	r3, [r3]
	add	r3, r2, r3
	str	r3, [fp, #-8]
	ldr	r3, .L5+8
	ldr	r3, [r3]
	ldr	r2, .L5+4
	str	r3, [r2]
	ldr	r2, .L5+8
	ldr	r3, [fp, #-8]
	str	r3, [r2]
	ldr	r3, [fp, #-8]
.L4:
	mov	r0, r3
	add	sp, fp, #0
	@ sp needed
	ldr	fp, [sp], #4
	bx	lr
.L6:
	.align	2
.L5:
	.word	times
	.word	prev1
	.word	prev2
	.size	fib, .-fib
	.section	.rodata
	.align	2
.LC0:
	.ascii	"pipe failed\000"
	.align	2
.LC1:
	.ascii	"%d: %d\012\000"
	.align	2
.LC2:
	.ascii	"fork failed\000"
	.align	2
.LC3:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	main
	.syntax unified
	.arm
	.fpu softvfp
	.type	main, %function
main:
	@ 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]
	str	r1, [fp, #-44]
	ldr	r3, .L19
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	ldr	r3, [fp, #-44]
	add	r3, r3, #4
	ldr	r3, [r3]
	mov	r0, r3
	bl	atoi
	str	r0, [fp, #-24]
	sub	r3, fp, #16
	mov	r0, r3
	bl	pipe
	mov	r3, r0
	cmn	r3, #1
	bne	.L8
	ldr	r3, .L19+4
	ldr	r3, [r3]
	mov	r2, #11
	mov	r1, #1
	ldr	r0, .L19+8
	bl	fwrite
	mov	r3, #1
	b	.L17
.L8:
	bl	fork
	mov	r3, r0
	str	r3, [fp, #-20]
	ldr	r3, [fp, #-20]
	cmp	r3, #0
	bne	.L10
	ldr	r3, [fp, #-16]
	mov	r0, r3
	bl	close
	mov	r0, #0
	bl	time
	mov	r3, r0
	mov	r0, r3
	bl	srand
	mov	r3, #0
	str	r3, [fp, #-32]
	b	.L11
.L12:
	bl	rand
	mov	r3, r0
	cmp	r3, #0
	and	r3, r3, #1
	rsblt	r3, r3, #0
	mov	r0, r3
	bl	sleep
	bl	fib
	mov	r3, r0
	str	r3, [fp, #-36]
	ldr	r3, [fp, #-12]
	sub	r1, fp, #36
	mov	r2, #4
	mov	r0, r3
	bl	write
	ldr	r3, [fp, #-32]
	add	r3, r3, #1
	str	r3, [fp, #-32]
.L11:
	ldr	r2, [fp, #-32]
	ldr	r3, [fp, #-24]
	cmp	r2, r3
	blt	.L12
	ldr	r3, [fp, #-12]
	mov	r0, r3
	bl	close
	b	.L13
.L10:
	ldr	r3, [fp, #-20]
	cmp	r3, #0
	ble	.L14
	ldr	r3, [fp, #-12]
	mov	r0, r3
	bl	close
	mov	r3, #0
	str	r3, [fp, #-36]
	mov	r3, #0
	str	r3, [fp, #-28]
	b	.L15
.L16:
	ldr	r3, [fp, #-16]
	sub	r1, fp, #36
	mov	r2, #4
	mov	r0, r3
	bl	read
	ldr	r3, [fp, #-28]
	add	r3, r3, #1
	ldr	r2, [fp, #-36]
	mov	r1, r3
	ldr	r0, .L19+12
	bl	printf
	ldr	r3, [fp, #-28]
	add	r3, r3, #1
	str	r3, [fp, #-28]
.L15:
	ldr	r2, [fp, #-28]
	ldr	r3, [fp, #-24]
	cmp	r2, r3
	blt	.L16
	ldr	r3, [fp, #-16]
	mov	r0, r3
	bl	close
	mov	r0, #0
	bl	wait
	b	.L13
.L14:
	ldr	r3, .L19+4
	ldr	r3, [r3]
	mov	r2, #11
	mov	r1, #1
	ldr	r0, .L19+16
	bl	fwrite
	mov	r3, #1
	b	.L17
.L13:
	mov	r3, #0
.L17:
	ldr	r2, .L19
	ldr	r1, [r2]
	ldr	r2, [fp, #-8]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L18
	bl	__stack_chk_fail
.L18:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L20:
	.align	2
.L19:
	.word	.LC3
	.word	stderr
	.word	.LC0
	.word	.LC1
	.word	.LC2
	.size	main, .-main
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
