	.file	"509639.c"
	.intel_syntax noprefix
	.text
	.section	.rodata
	.align 8
.LC0:
	.string	"I am your grandchild with ID = %d\n"
	.align 8
.LC1:
	.string	"Since my parent gone, I am done my life"
	.align 8
.LC2:
	.string	"I am your child which ID = %d\n"
	.align 8
.LC3:
	.string	"I am your parent with ID = %d\n"
.LC4:
	.string	"Now my job is over"
	.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
	mov	DWORD PTR -24[rbp], eax
	cmp	DWORD PTR -24[rbp], 0
	jne	.L2
	call	fork@PLT
	mov	DWORD PTR -16[rbp], eax
	cmp	DWORD PTR -16[rbp], 0
	jne	.L3
	call	getppid@PLT
	mov	DWORD PTR -12[rbp], eax
.L6:
	call	getppid@PLT
	cmp	DWORD PTR -12[rbp], eax
	jne	.L4
	call	getpid@PLT
	mov	esi, eax
	lea	rdi, .LC0[rip]
	mov	eax, 0
	call	printf@PLT
	mov	edi, 1
	call	sleep@PLT
	jmp	.L6
.L4:
	lea	rdi, .LC1[rip]
	mov	eax, 0
	call	printf@PLT
	mov	edi, 0
	call	_exit@PLT
.L3:
	mov	DWORD PTR -28[rbp], 0
	jmp	.L7
.L8:
	call	getpid@PLT
	mov	esi, eax
	lea	rdi, .LC2[rip]
	mov	eax, 0
	call	printf@PLT
	mov	edi, 1
	call	sleep@PLT
	add	DWORD PTR -28[rbp], 1
.L7:
	cmp	DWORD PTR -28[rbp], 29
	jle	.L8
	mov	edi, 0
	call	_exit@PLT
.L2:
	lea	rcx, -32[rbp]
	mov	eax, DWORD PTR -24[rbp]
	mov	edx, 3
	mov	rsi, rcx
	mov	edi, eax
	call	waitpid@PLT
	mov	DWORD PTR -20[rbp], eax
	cmp	DWORD PTR -20[rbp], 0
	jne	.L9
	call	getpid@PLT
	mov	esi, eax
	lea	rdi, .LC3[rip]
	mov	eax, 0
	call	printf@PLT
	mov	edi, 1
	call	sleep@PLT
	jmp	.L2
.L9:
	lea	rdi, .LC4[rip]
	call	puts@PLT
	mov	edi, 0
	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	"509639.c"
	.text
	.section	.rodata
	.align	2
.LC0:
	.ascii	"I am your grandchild with ID = %d\012\000"
	.align	2
.LC1:
	.ascii	"Since my parent gone, I am done my life\000"
	.align	2
.LC2:
	.ascii	"I am your child which ID = %d\012\000"
	.align	2
.LC3:
	.ascii	"I am your parent with ID = %d\012\000"
	.align	2
.LC4:
	.ascii	"Now my job is over\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 = 32
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #32
	ldr	r3, .L14
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	bl	fork
	mov	r3, r0
	str	r3, [fp, #-24]
	ldr	r3, [fp, #-24]
	cmp	r3, #0
	bne	.L2
	bl	fork
	mov	r3, r0
	str	r3, [fp, #-16]
	ldr	r3, [fp, #-16]
	cmp	r3, #0
	bne	.L3
	bl	getppid
	str	r0, [fp, #-12]
.L6:
	bl	getppid
	mov	r2, r0
	ldr	r3, [fp, #-12]
	cmp	r3, r2
	bne	.L4
	bl	getpid
	mov	r3, r0
	mov	r1, r3
	ldr	r0, .L14+4
	bl	printf
	mov	r0, #1
	bl	sleep
	b	.L6
.L4:
	ldr	r0, .L14+8
	bl	printf
	mov	r0, #0
	bl	_exit
.L3:
	mov	r3, #0
	str	r3, [fp, #-28]
	b	.L7
.L8:
	bl	getpid
	mov	r3, r0
	mov	r1, r3
	ldr	r0, .L14+12
	bl	printf
	mov	r0, #1
	bl	sleep
	ldr	r3, [fp, #-28]
	add	r3, r3, #1
	str	r3, [fp, #-28]
.L7:
	ldr	r3, [fp, #-28]
	cmp	r3, #29
	ble	.L8
	mov	r0, #0
	bl	_exit
.L2:
	sub	r3, fp, #32
	mov	r2, #3
	mov	r1, r3
	ldr	r0, [fp, #-24]
	bl	waitpid
	str	r0, [fp, #-20]
	ldr	r3, [fp, #-20]
	cmp	r3, #0
	bne	.L9
	bl	getpid
	mov	r3, r0
	mov	r1, r3
	ldr	r0, .L14+16
	bl	printf
	mov	r0, #1
	bl	sleep
	b	.L2
.L9:
	ldr	r0, .L14+20
	bl	puts
	mov	r0, #0
	bl	exit
.L15:
	.align	2
.L14:
	.word	.LC5
	.word	.LC0
	.word	.LC1
	.word	.LC2
	.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
