	.file	"598058.c"
	.intel_syntax noprefix
	.text
	.section	.rodata
.LC0:
	.string	"%s: %d\n"
	.text
	.globl	unix_error
	.type	unix_error, @function
unix_error:
.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, 16
	mov	QWORD PTR -8[rbp], rdi
	call	__errno_location@PLT
	mov	ecx, DWORD PTR [rax]
	mov	rax, QWORD PTR stderr[rip]
	mov	rdx, QWORD PTR -8[rbp]
	lea	rsi, .LC0[rip]
	mov	rdi, rax
	mov	eax, 0
	call	fprintf@PLT
	mov	edi, 0
	call	exit@PLT
	.cfi_endproc
.LFE6:
	.size	unix_error, .-unix_error
	.section	.rodata
.LC1:
	.string	"Fork error"
	.text
	.globl	Fork
	.type	Fork, @function
Fork:
.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
	call	fork@PLT
	shr	eax, 31
	movzx	eax, al
	mov	DWORD PTR -4[rbp], eax
	cmp	DWORD PTR -4[rbp], 0
	je	.L3
	lea	rdi, .LC1[rip]
	call	unix_error
	mov	edi, 0
	call	exit@PLT
.L3:
	mov	eax, DWORD PTR -4[rbp]
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.size	Fork, .-Fork
	.section	.rodata
.LC2:
	.string	"In chlid process, PID=%d\n"
.LC3:
	.string	"Terminating Child, PID=%d\n"
.LC4:
	.string	"My Parent PID is, PPID=%d\n"
	.align 8
.LC5:
	.string	"Child %d terminated with exit status %d\n"
	.align 8
.LC6:
	.string	"Child %d terminate abnormally\n"
	.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, 48
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	mov	DWORD PTR -32[rbp], 0
	jmp	.L6
.L8:
	call	Fork
	test	eax, eax
	sete	al
	movzx	edx, al
	mov	eax, DWORD PTR -32[rbp]
	cdqe
	mov	DWORD PTR -20[rbp+rax*4], edx
	mov	eax, DWORD PTR -32[rbp]
	cdqe
	mov	eax, DWORD PTR -20[rbp+rax*4]
	test	eax, eax
	je	.L7
	call	getpid@PLT
	mov	esi, eax
	lea	rdi, .LC2[rip]
	mov	eax, 0
	call	printf@PLT
	call	getpid@PLT
	mov	esi, eax
	lea	rdi, .LC3[rip]
	mov	eax, 0
	call	printf@PLT
	call	getppid@PLT
	mov	esi, eax
	lea	rdi, .LC4[rip]
	mov	eax, 0
	call	printf@PLT
	mov	eax, DWORD PTR -32[rbp]
	add	eax, 100
	mov	edi, eax
	call	exit@PLT
.L7:
	add	DWORD PTR -32[rbp], 1
.L6:
	cmp	DWORD PTR -32[rbp], 2
	jle	.L8
	mov	DWORD PTR -28[rbp], 0
	jmp	.L9
.L12:
	lea	rax, -36[rbp]
	mov	rdi, rax
	call	wait@PLT
	mov	DWORD PTR -24[rbp], eax
	mov	eax, DWORD PTR -36[rbp]
	and	eax, 127
	test	eax, eax
	jne	.L10
	mov	eax, DWORD PTR -36[rbp]
	sar	eax, 8
	movzx	edx, al
	mov	eax, DWORD PTR -24[rbp]
	mov	esi, eax
	lea	rdi, .LC5[rip]
	mov	eax, 0
	call	printf@PLT
	jmp	.L11
.L10:
	mov	eax, DWORD PTR -24[rbp]
	mov	esi, eax
	lea	rdi, .LC6[rip]
	mov	eax, 0
	call	printf@PLT
.L11:
	add	DWORD PTR -28[rbp], 1
.L9:
	cmp	DWORD PTR -28[rbp], 2
	jle	.L12
	mov	eax, 0
	mov	rcx, QWORD PTR -8[rbp]
	sub	rcx, QWORD PTR fs:40
	je	.L14
	call	__stack_chk_fail@PLT
.L14:
	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	"598058.c"
	.text
	.section	.rodata
	.align	2
.LC0:
	.ascii	"%s: %d\012\000"
	.text
	.align	2
	.global	unix_error
	.syntax unified
	.arm
	.fpu softvfp
	.type	unix_error, %function
unix_error:
	@ args = 0, pretend = 0, frame = 8
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{r4, fp, lr}
	add	fp, sp, #8
	sub	sp, sp, #12
	str	r0, [fp, #-16]
	ldr	r3, .L2
	ldr	r4, [r3]
	bl	__errno_location
	mov	r3, r0
	ldr	r3, [r3]
	ldr	r2, [fp, #-16]
	ldr	r1, .L2+4
	mov	r0, r4
	bl	fprintf
	mov	r0, #0
	bl	exit
.L3:
	.align	2
.L2:
	.word	stderr
	.word	.LC0
	.size	unix_error, .-unix_error
	.section	.rodata
	.align	2
.LC1:
	.ascii	"Fork error\000"
	.text
	.align	2
	.global	Fork
	.syntax unified
	.arm
	.fpu softvfp
	.type	Fork, %function
Fork:
	@ 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	fork
	mov	r3, r0
	lsr	r3, r3, #31
	and	r3, r3, #255
	str	r3, [fp, #-8]
	ldr	r3, [fp, #-8]
	cmp	r3, #0
	beq	.L5
	ldr	r0, .L7
	bl	unix_error
	mov	r0, #0
	bl	exit
.L5:
	ldr	r3, [fp, #-8]
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L8:
	.align	2
.L7:
	.word	.LC1
	.size	Fork, .-Fork
	.section	.rodata
	.align	2
.LC2:
	.ascii	"In chlid process, PID=%d\012\000"
	.align	2
.LC3:
	.ascii	"Terminating Child, PID=%d\012\000"
	.align	2
.LC4:
	.ascii	"My Parent PID is, PPID=%d\012\000"
	.align	2
.LC5:
	.ascii	"Child %d terminated with exit status %d\012\000"
	.align	2
.LC6:
	.ascii	"Child %d terminate abnormally\012\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, .L19
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	mov	r3, #0
	str	r3, [fp, #-32]
	b	.L10
.L12:
	bl	Fork
	mov	r3, r0
	cmp	r3, #0
	moveq	r3, #1
	movne	r3, #0
	and	r3, r3, #255
	mov	r2, r3
	ldr	r3, [fp, #-32]
	lsl	r3, r3, #2
	sub	r1, fp, #4
	add	r3, r1, r3
	str	r2, [r3, #-16]
	ldr	r3, [fp, #-32]
	lsl	r3, r3, #2
	sub	r2, fp, #4
	add	r3, r2, r3
	ldr	r3, [r3, #-16]
	cmp	r3, #0
	beq	.L11
	bl	getpid
	mov	r3, r0
	mov	r1, r3
	ldr	r0, .L19+4
	bl	printf
	bl	getpid
	mov	r3, r0
	mov	r1, r3
	ldr	r0, .L19+8
	bl	printf
	bl	getppid
	mov	r3, r0
	mov	r1, r3
	ldr	r0, .L19+12
	bl	printf
	ldr	r3, [fp, #-32]
	add	r3, r3, #100
	mov	r0, r3
	bl	exit
.L11:
	ldr	r3, [fp, #-32]
	add	r3, r3, #1
	str	r3, [fp, #-32]
.L10:
	ldr	r3, [fp, #-32]
	cmp	r3, #2
	ble	.L12
	mov	r3, #0
	str	r3, [fp, #-28]
	b	.L13
.L16:
	sub	r3, fp, #36
	mov	r0, r3
	bl	wait
	str	r0, [fp, #-24]
	ldr	r3, [fp, #-36]
	and	r3, r3, #127
	cmp	r3, #0
	bne	.L14
	ldr	r3, [fp, #-36]
	asr	r3, r3, #8
	and	r3, r3, #255
	mov	r2, r3
	ldr	r1, [fp, #-24]
	ldr	r0, .L19+16
	bl	printf
	b	.L15
.L14:
	ldr	r1, [fp, #-24]
	ldr	r0, .L19+20
	bl	printf
.L15:
	ldr	r3, [fp, #-28]
	add	r3, r3, #1
	str	r3, [fp, #-28]
.L13:
	ldr	r3, [fp, #-28]
	cmp	r3, #2
	ble	.L16
	mov	r3, #0
	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	.LC7
	.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
