	.file	"108491.c"
	.intel_syntax noprefix
	.text
	.section	.rodata
.LC0:
	.string	"pa"
.LC1:
	.string	"ab"
.LC2:
	.string	"bp"
.LC3:
	.string	"%d"
.LC4:
	.string	"Father: %d\n"
	.text
	.globl	main
	.type	main, @function
main:
.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	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	call	fork@PLT
	test	eax, eax
	jne	.L2
	mov	esi, 0
	lea	rdi, .LC0[rip]
	mov	eax, 0
	call	open@PLT
	mov	DWORD PTR -20[rbp], eax
	mov	esi, 1
	lea	rdi, .LC1[rip]
	mov	eax, 0
	call	open@PLT
	mov	DWORD PTR -12[rbp], eax
.L4:
	lea	rcx, -24[rbp]
	mov	eax, DWORD PTR -20[rbp]
	mov	edx, 4
	mov	rsi, rcx
	mov	edi, eax
	call	read@PLT
	mov	eax, DWORD PTR -24[rbp]
	and	eax, 1
	test	eax, eax
	jne	.L3
	mov	eax, DWORD PTR -24[rbp]
	mov	edx, eax
	shr	edx, 31
	add	eax, edx
	sar	eax
	mov	DWORD PTR -24[rbp], eax
.L3:
	lea	rcx, -24[rbp]
	mov	eax, DWORD PTR -12[rbp]
	mov	edx, 4
	mov	rsi, rcx
	mov	edi, eax
	call	write@PLT
	mov	eax, DWORD PTR -24[rbp]
	cmp	eax, 100
	jg	.L4
	mov	eax, DWORD PTR -20[rbp]
	mov	edi, eax
	call	close@PLT
	mov	eax, DWORD PTR -12[rbp]
	mov	edi, eax
	call	close@PLT
	mov	edi, 0
	call	exit@PLT
.L2:
	call	fork@PLT
	test	eax, eax
	jne	.L5
	mov	esi, 0
	lea	rdi, .LC1[rip]
	mov	eax, 0
	call	open@PLT
	mov	DWORD PTR -12[rbp], eax
	mov	esi, 1
	lea	rdi, .LC2[rip]
	mov	eax, 0
	call	open@PLT
	mov	DWORD PTR -16[rbp], eax
.L7:
	lea	rcx, -24[rbp]
	mov	eax, DWORD PTR -12[rbp]
	mov	edx, 4
	mov	rsi, rcx
	mov	edi, eax
	call	read@PLT
	mov	edx, DWORD PTR -24[rbp]
	movsx	rax, edx
	imul	rax, rax, 1431655766
	shr	rax, 32
	mov	ecx, edx
	sar	ecx, 31
	sub	eax, ecx
	mov	ecx, eax
	add	ecx, ecx
	add	ecx, eax
	mov	eax, edx
	sub	eax, ecx
	test	eax, eax
	jne	.L6
	mov	eax, DWORD PTR -24[rbp]
	movsx	rdx, eax
	imul	rdx, rdx, 1431655766
	shr	rdx, 32
	sar	eax, 31
	mov	ecx, eax
	mov	eax, edx
	sub	eax, ecx
	mov	DWORD PTR -24[rbp], eax
.L6:
	lea	rcx, -24[rbp]
	mov	eax, DWORD PTR -16[rbp]
	mov	edx, 4
	mov	rsi, rcx
	mov	edi, eax
	call	write@PLT
	mov	eax, DWORD PTR -24[rbp]
	cmp	eax, 100
	jg	.L7
	mov	eax, DWORD PTR -12[rbp]
	mov	edi, eax
	call	close@PLT
	mov	eax, DWORD PTR -16[rbp]
	mov	edi, eax
	call	close@PLT
	mov	edi, 0
	call	exit@PLT
.L5:
	mov	esi, 1
	lea	rdi, .LC0[rip]
	mov	eax, 0
	call	open@PLT
	mov	DWORD PTR -20[rbp], eax
	mov	esi, 0
	lea	rdi, .LC2[rip]
	mov	eax, 0
	call	open@PLT
	mov	DWORD PTR -16[rbp], eax
	lea	rax, -24[rbp]
	mov	rsi, rax
	lea	rdi, .LC3[rip]
	mov	eax, 0
	call	__isoc99_scanf@PLT
.L8:
	lea	rcx, -24[rbp]
	mov	eax, DWORD PTR -20[rbp]
	mov	edx, 4
	mov	rsi, rcx
	mov	edi, eax
	call	write@PLT
	lea	rcx, -24[rbp]
	mov	eax, DWORD PTR -16[rbp]
	mov	edx, 4
	mov	rsi, rcx
	mov	edi, eax
	call	read@PLT
	mov	eax, DWORD PTR -24[rbp]
	mov	esi, eax
	lea	rdi, .LC4[rip]
	mov	eax, 0
	call	printf@PLT
	mov	eax, DWORD PTR -24[rbp]
	sub	eax, 5
	mov	DWORD PTR -24[rbp], eax
	mov	eax, DWORD PTR -24[rbp]
	cmp	eax, 100
	jg	.L8
	mov	eax, DWORD PTR -20[rbp]
	mov	edi, eax
	call	close@PLT
	mov	eax, DWORD PTR -16[rbp]
	mov	edi, eax
	call	close@PLT
	mov	edi, 0
	call	wait@PLT
	mov	edi, 0
	call	wait@PLT
	mov	eax, 0
	mov	rsi, QWORD PTR -8[rbp]
	sub	rsi, QWORD PTR fs:40
	je	.L10
	call	__stack_chk_fail@PLT
.L10:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.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	"108491.c"
	.text
	.section	.rodata
	.align	2
.LC0:
	.ascii	"pa\000"
	.align	2
.LC1:
	.ascii	"ab\000"
	.align	2
.LC2:
	.ascii	"bp\000"
	.align	2
.LC3:
	.ascii	"%d\000"
	.align	2
.LC4:
	.ascii	"Father: %d\012\000"
	.align	2
.LC5:
	.word	__stack_chk_guard
	.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
	ldr	r3, .L11
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	bl	fork
	mov	r3, r0
	cmp	r3, #0
	bne	.L2
	mov	r1, #0
	ldr	r0, .L11+4
	bl	open
	str	r0, [fp, #-20]
	mov	r1, #1
	ldr	r0, .L11+8
	bl	open
	str	r0, [fp, #-12]
.L4:
	sub	r3, fp, #24
	mov	r2, #4
	mov	r1, r3
	ldr	r0, [fp, #-20]
	bl	read
	ldr	r3, [fp, #-24]
	and	r3, r3, #1
	cmp	r3, #0
	bne	.L3
	ldr	r3, [fp, #-24]
	lsr	r2, r3, #31
	add	r3, r2, r3
	asr	r3, r3, #1
	str	r3, [fp, #-24]
.L3:
	sub	r3, fp, #24
	mov	r2, #4
	mov	r1, r3
	ldr	r0, [fp, #-12]
	bl	write
	ldr	r3, [fp, #-24]
	cmp	r3, #100
	bgt	.L4
	ldr	r0, [fp, #-20]
	bl	close
	ldr	r0, [fp, #-12]
	bl	close
	mov	r0, #0
	bl	exit
.L2:
	bl	fork
	mov	r3, r0
	cmp	r3, #0
	bne	.L5
	mov	r1, #0
	ldr	r0, .L11+8
	bl	open
	str	r0, [fp, #-12]
	mov	r1, #1
	ldr	r0, .L11+12
	bl	open
	str	r0, [fp, #-16]
.L7:
	sub	r3, fp, #24
	mov	r2, #4
	mov	r1, r3
	ldr	r0, [fp, #-12]
	bl	read
	ldr	r1, [fp, #-24]
	ldr	r3, .L11+16
	smull	r0, r2, r3, r1
	asr	r3, r1, #31
	sub	r2, r2, r3
	mov	r3, r2
	lsl	r3, r3, #1
	add	r3, r3, r2
	sub	r2, r1, r3
	cmp	r2, #0
	bne	.L6
	ldr	r3, [fp, #-24]
	ldr	r2, .L11+16
	smull	r1, r2, r3, r2
	asr	r3, r3, #31
	sub	r3, r2, r3
	str	r3, [fp, #-24]
.L6:
	sub	r3, fp, #24
	mov	r2, #4
	mov	r1, r3
	ldr	r0, [fp, #-16]
	bl	write
	ldr	r3, [fp, #-24]
	cmp	r3, #100
	bgt	.L7
	ldr	r0, [fp, #-12]
	bl	close
	ldr	r0, [fp, #-16]
	bl	close
	mov	r0, #0
	bl	exit
.L5:
	mov	r1, #1
	ldr	r0, .L11+4
	bl	open
	str	r0, [fp, #-20]
	mov	r1, #0
	ldr	r0, .L11+12
	bl	open
	str	r0, [fp, #-16]
	sub	r3, fp, #24
	mov	r1, r3
	ldr	r0, .L11+20
	bl	__isoc99_scanf
.L8:
	sub	r3, fp, #24
	mov	r2, #4
	mov	r1, r3
	ldr	r0, [fp, #-20]
	bl	write
	sub	r3, fp, #24
	mov	r2, #4
	mov	r1, r3
	ldr	r0, [fp, #-16]
	bl	read
	ldr	r3, [fp, #-24]
	mov	r1, r3
	ldr	r0, .L11+24
	bl	printf
	ldr	r3, [fp, #-24]
	sub	r3, r3, #5
	str	r3, [fp, #-24]
	ldr	r3, [fp, #-24]
	cmp	r3, #100
	bgt	.L8
	ldr	r0, [fp, #-20]
	bl	close
	ldr	r0, [fp, #-16]
	bl	close
	mov	r0, #0
	bl	wait
	mov	r0, #0
	bl	wait
	mov	r3, #0
	ldr	r2, .L11
	ldr	r1, [r2]
	ldr	r2, [fp, #-8]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L10
	bl	__stack_chk_fail
.L10:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L12:
	.align	2
.L11:
	.word	.LC5
	.word	.LC0
	.word	.LC1
	.word	.LC2
	.word	1431655766
	.word	.LC3
	.word	.LC4
	.size	main, .-main
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
