	.file	"319245.c"
	.intel_syntax noprefix
	.text
	.section	.rodata
.LC0:
	.string	"fork program starting"
.LC1:
	.string	"fork failed"
.LC2:
	.string	"This is the child"
.LC3:
	.string	"This is the prrent"
	.align 8
.LC4:
	.string	"Child process has finished: PID=%d\n"
.LC5:
	.string	"Child exited with code %d\n"
.LC6:
	.string	"Child terminated abnormally"
	.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, 48
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	lea	rdi, .LC0[rip]
	call	puts@PLT
	call	fork@PLT
	mov	DWORD PTR -24[rbp], eax
	cmp	DWORD PTR -24[rbp], -1
	je	.L2
	cmp	DWORD PTR -24[rbp], 0
	je	.L3
	jmp	.L12
.L2:
	lea	rdi, .LC1[rip]
	call	perror@PLT
	mov	edi, 1
	call	exit@PLT
.L3:
	lea	rax, .LC2[rip]
	mov	QWORD PTR -16[rbp], rax
	mov	DWORD PTR -32[rbp], 5
	mov	DWORD PTR -28[rbp], 37
	jmp	.L5
.L12:
	lea	rax, .LC3[rip]
	mov	QWORD PTR -16[rbp], rax
	mov	DWORD PTR -32[rbp], 3
	mov	DWORD PTR -28[rbp], 0
	nop
.L5:
	cmp	DWORD PTR -24[rbp], 0
	je	.L9
	lea	rax, -36[rbp]
	mov	rdi, rax
	call	wait@PLT
	mov	DWORD PTR -20[rbp], eax
	mov	eax, DWORD PTR -20[rbp]
	mov	esi, eax
	lea	rdi, .LC4[rip]
	mov	eax, 0
	call	printf@PLT
	mov	eax, DWORD PTR -36[rbp]
	and	eax, 127
	test	eax, eax
	jne	.L7
	mov	eax, DWORD PTR -36[rbp]
	sar	eax, 8
	movzx	eax, al
	mov	esi, eax
	lea	rdi, .LC5[rip]
	mov	eax, 0
	call	printf@PLT
	jmp	.L9
.L7:
	lea	rdi, .LC6[rip]
	call	puts@PLT
	jmp	.L9
.L10:
	mov	rax, QWORD PTR -16[rbp]
	mov	rdi, rax
	call	puts@PLT
	mov	edi, 1
	call	sleep@PLT
	sub	DWORD PTR -32[rbp], 1
.L9:
	cmp	DWORD PTR -32[rbp], 0
	jg	.L10
	mov	eax, DWORD PTR -28[rbp]
	mov	edi, eax
	call	exit@PLT
	.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	"319245.c"
	.text
	.section	.rodata
	.align	2
.LC0:
	.ascii	"fork program starting\000"
	.align	2
.LC1:
	.ascii	"fork failed\000"
	.align	2
.LC2:
	.ascii	"This is the child\000"
	.align	2
.LC3:
	.ascii	"This is the prrent\000"
	.align	2
.LC4:
	.ascii	"Child process has finished: PID=%d\012\000"
	.align	2
.LC5:
	.ascii	"Child exited with code %d\012\000"
	.align	2
.LC6:
	.ascii	"Child terminated abnormally\000"
	.align	2
.LC7:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	main
	.syntax unified
	.arm
	.fpu softvfp
	.type	main, %function
main:
	@ args = 0, pretend = 0, frame = 32
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #32
	ldr	r3, .L13
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	ldr	r0, .L13+4
	bl	puts
	bl	fork
	mov	r3, r0
	str	r3, [fp, #-16]
	ldr	r3, [fp, #-16]
	cmn	r3, #1
	beq	.L2
	ldr	r3, [fp, #-16]
	cmp	r3, #0
	beq	.L3
	b	.L12
.L2:
	ldr	r0, .L13+8
	bl	perror
	mov	r0, #1
	bl	exit
.L3:
	ldr	r3, .L13+12
	str	r3, [fp, #-28]
	mov	r3, #5
	str	r3, [fp, #-24]
	mov	r3, #37
	str	r3, [fp, #-20]
	b	.L5
.L12:
	ldr	r3, .L13+16
	str	r3, [fp, #-28]
	mov	r3, #3
	str	r3, [fp, #-24]
	mov	r3, #0
	str	r3, [fp, #-20]
	nop
.L5:
	ldr	r3, [fp, #-16]
	cmp	r3, #0
	beq	.L9
	sub	r3, fp, #32
	mov	r0, r3
	bl	wait
	str	r0, [fp, #-12]
	ldr	r1, [fp, #-12]
	ldr	r0, .L13+20
	bl	printf
	ldr	r3, [fp, #-32]
	and	r3, r3, #127
	cmp	r3, #0
	bne	.L7
	ldr	r3, [fp, #-32]
	asr	r3, r3, #8
	and	r3, r3, #255
	mov	r1, r3
	ldr	r0, .L13+24
	bl	printf
	b	.L9
.L7:
	ldr	r0, .L13+28
	bl	puts
	b	.L9
.L10:
	ldr	r0, [fp, #-28]
	bl	puts
	mov	r0, #1
	bl	sleep
	ldr	r3, [fp, #-24]
	sub	r3, r3, #1
	str	r3, [fp, #-24]
.L9:
	ldr	r3, [fp, #-24]
	cmp	r3, #0
	bgt	.L10
	ldr	r0, [fp, #-20]
	bl	exit
.L14:
	.align	2
.L13:
	.word	.LC7
	.word	.LC0
	.word	.LC1
	.word	.LC2
	.word	.LC3
	.word	.LC4
	.word	.LC5
	.word	.LC6
	.size	main, .-main
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
