	.file	"267183.c"
	.intel_syntax noprefix
	.text
	.globl	save_parent
	.bss
	.align 4
	.type	save_parent, @object
	.size	save_parent, 4
save_parent:
	.zero	4
	.globl	exit_if_relative_exits
	.align 4
	.type	exit_if_relative_exits, @object
	.size	exit_if_relative_exits, 4
exit_if_relative_exits:
	.zero	4
	.text
	.type	fork_child, @function
fork_child:
.LFB6:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	mov	edi, 180
	call	alarm@PLT
.L6:
	mov	eax, DWORD PTR exit_if_relative_exits[rip]
	test	eax, eax
	je	.L2
	mov	edi, 1
	call	sleep@PLT
	call	getppid@PLT
	mov	edx, DWORD PTR save_parent[rip]
	cmp	eax, edx
	jne	.L8
	call	getppid@PLT
	mov	esi, 0
	mov	edi, eax
	call	kill@PLT
	test	eax, eax
	je	.L6
	jmp	.L4
.L2:
	call	pause@PLT
	jmp	.L6
.L8:
	nop
.L4:
	mov	eax, 0
	pop	rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	fork_child, .-fork_child
	.section	.rodata
.LC0:
	.string	"wait"
	.text
	.type	fork_parent, @function
fork_parent:
.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	edi, 180
	call	alarm@PLT
.L15:
	mov	eax, DWORD PTR exit_if_relative_exits[rip]
	test	eax, eax
	je	.L10
	mov	edi, 0
	call	wait@PLT
	mov	DWORD PTR -4[rbp], eax
	cmp	DWORD PTR -4[rbp], -1
	jne	.L11
	call	__errno_location@PLT
	mov	eax, DWORD PTR [rax]
	cmp	eax, 4
	je	.L16
.L11:
	cmp	DWORD PTR -4[rbp], -1
	jne	.L13
	lea	rdi, .LC0[rip]
	call	perror@PLT
	mov	eax, 1
	jmp	.L14
.L13:
	mov	eax, 0
	jmp	.L14
.L10:
	call	pause@PLT
	jmp	.L15
.L16:
	nop
	jmp	.L15
.L14:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.size	fork_parent, .-fork_parent
	.section	.rodata
.LC1:
	.string	"fork"
	.text
	.globl	main
	.type	main, @function
main:
.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, 16
	call	getpid@PLT
	mov	DWORD PTR save_parent[rip], eax
	call	fork@PLT
	mov	DWORD PTR -4[rbp], eax
	cmp	DWORD PTR -4[rbp], 0
	jle	.L18
	call	fork_parent
	jmp	.L19
.L18:
	cmp	DWORD PTR -4[rbp], 0
	jne	.L20
	call	fork_child
	jmp	.L19
.L20:
	lea	rdi, .LC1[rip]
	call	perror@PLT
	mov	eax, 1
.L19:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE8:
	.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	"267183.c"
	.text
	.comm	save_parent,4,4
	.global	exit_if_relative_exits
	.bss
	.align	2
	.type	exit_if_relative_exits, %object
	.size	exit_if_relative_exits, 4
exit_if_relative_exits:
	.space	4
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	fork_child, %function
fork_child:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	mov	r0, #180
	bl	alarm
.L6:
	ldr	r3, .L9
	ldr	r3, [r3]
	cmp	r3, #0
	beq	.L2
	mov	r0, #1
	bl	sleep
	bl	getppid
	mov	r2, r0
	ldr	r3, .L9+4
	ldr	r3, [r3]
	cmp	r2, r3
	bne	.L8
	bl	getppid
	mov	r3, r0
	mov	r1, #0
	mov	r0, r3
	bl	kill
	mov	r3, r0
	cmp	r3, #0
	beq	.L6
	b	.L4
.L2:
	bl	pause
	b	.L6
.L8:
	nop
.L4:
	mov	r3, #0
	mov	r0, r3
	pop	{fp, pc}
.L10:
	.align	2
.L9:
	.word	exit_if_relative_exits
	.word	save_parent
	.size	fork_child, .-fork_child
	.section	.rodata
	.align	2
.LC0:
	.ascii	"wait\000"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	fork_parent, %function
fork_parent:
	@ args = 0, pretend = 0, frame = 8
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #8
	mov	r0, #180
	bl	alarm
.L17:
	ldr	r3, .L19
	ldr	r3, [r3]
	cmp	r3, #0
	beq	.L12
	mov	r0, #0
	bl	wait
	str	r0, [fp, #-8]
	ldr	r3, [fp, #-8]
	cmn	r3, #1
	bne	.L13
	bl	__errno_location
	mov	r3, r0
	ldr	r3, [r3]
	cmp	r3, #4
	beq	.L18
.L13:
	ldr	r3, [fp, #-8]
	cmn	r3, #1
	bne	.L15
	ldr	r0, .L19+4
	bl	perror
	mov	r3, #1
	b	.L16
.L15:
	mov	r3, #0
	b	.L16
.L12:
	bl	pause
	b	.L17
.L18:
	nop
	b	.L17
.L16:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L20:
	.align	2
.L19:
	.word	exit_if_relative_exits
	.word	.LC0
	.size	fork_parent, .-fork_parent
	.section	.rodata
	.align	2
.LC1:
	.ascii	"fork\000"
	.text
	.align	2
	.global	main
	.syntax unified
	.arm
	.fpu softvfp
	.type	main, %function
main:
	@ args = 0, pretend = 0, frame = 8
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #8
	bl	getpid
	mov	r3, r0
	ldr	r2, .L25
	str	r3, [r2]
	bl	fork
	mov	r3, r0
	str	r3, [fp, #-8]
	ldr	r3, [fp, #-8]
	cmp	r3, #0
	ble	.L22
	bl	fork_parent
	mov	r3, r0
	b	.L23
.L22:
	ldr	r3, [fp, #-8]
	cmp	r3, #0
	bne	.L24
	bl	fork_child
	mov	r3, r0
	b	.L23
.L24:
	ldr	r0, .L25+4
	bl	perror
	mov	r3, #1
.L23:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L26:
	.align	2
.L25:
	.word	save_parent
	.word	.LC1
	.size	main, .-main
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
