	.file	"760117.c"
	.intel_syntax noprefix
	.text
	.local	globalData
	.comm	globalData,4,4
	.section	.rodata
.LC0:
	.string	"(%d) myPid is %d\n"
.LC1:
	.string	"(%d) parentPid is %d\n"
.LC2:
	.string	"(%d) globalData is %d\n"
	.align 8
.LC3:
	.string	"(%d) After sleep. MyPid is %d\n"
	.align 8
.LC4:
	.string	"(%d) After sleep. ParentPid is %d\n"
	.align 8
.LC5:
	.string	"(%d) After sleep. globalData is %d\n"
	.text
	.globl	child_process
	.type	child_process, @function
child_process:
.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	DWORD PTR -20[rbp], edi
	call	getpid@PLT
	mov	DWORD PTR -8[rbp], eax
	call	getppid@PLT
	mov	DWORD PTR -4[rbp], eax
	mov	eax, DWORD PTR globalData[rip]
	add	eax, 1
	mov	DWORD PTR globalData[rip], eax
	mov	edx, DWORD PTR -8[rbp]
	mov	eax, DWORD PTR -20[rbp]
	mov	esi, eax
	lea	rdi, .LC0[rip]
	mov	eax, 0
	call	printf@PLT
	mov	edx, DWORD PTR -4[rbp]
	mov	eax, DWORD PTR -20[rbp]
	mov	esi, eax
	lea	rdi, .LC1[rip]
	mov	eax, 0
	call	printf@PLT
	mov	edx, DWORD PTR globalData[rip]
	mov	eax, DWORD PTR -20[rbp]
	mov	esi, eax
	lea	rdi, .LC2[rip]
	mov	eax, 0
	call	printf@PLT
	mov	edi, 8
	call	sleep@PLT
	call	getppid@PLT
	mov	DWORD PTR -4[rbp], eax
	mov	edx, DWORD PTR -8[rbp]
	mov	eax, DWORD PTR -20[rbp]
	mov	esi, eax
	lea	rdi, .LC3[rip]
	mov	eax, 0
	call	printf@PLT
	mov	edx, DWORD PTR -4[rbp]
	mov	eax, DWORD PTR -20[rbp]
	mov	esi, eax
	lea	rdi, .LC4[rip]
	mov	eax, 0
	call	printf@PLT
	mov	edx, DWORD PTR globalData[rip]
	mov	eax, DWORD PTR -20[rbp]
	mov	esi, eax
	lea	rdi, .LC5[rip]
	mov	eax, 0
	call	printf@PLT
	mov	eax, 0
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	child_process, .-child_process
	.section	.rodata
	.align 8
.LC6:
	.string	"Failed to create child, exiting"
	.align 8
.LC7:
	.string	"Started child process %d, sleeping one second\n"
	.align 8
.LC8:
	.string	"Done creating children, exiting!!"
	.text
	.globl	main
	.type	main, @function
main:
.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, 32
	mov	DWORD PTR -20[rbp], edi
	mov	QWORD PTR -32[rbp], rsi
	mov	DWORD PTR -8[rbp], 0
	jmp	.L4
.L7:
	call	fork@PLT
	mov	DWORD PTR -4[rbp], eax
	cmp	DWORD PTR -4[rbp], 0
	jns	.L5
	lea	rdi, .LC6[rip]
	mov	eax, 0
	call	printf@PLT
	mov	edi, 1
	call	exit@PLT
.L5:
	cmp	DWORD PTR -4[rbp], 0
	jne	.L6
	mov	eax, DWORD PTR -8[rbp]
	mov	edi, eax
	call	child_process
.L6:
	mov	eax, DWORD PTR -4[rbp]
	mov	esi, eax
	lea	rdi, .LC7[rip]
	mov	eax, 0
	call	printf@PLT
	mov	edi, 1
	call	sleep@PLT
	add	DWORD PTR -8[rbp], 1
.L4:
	cmp	DWORD PTR -8[rbp], 9
	jle	.L7
	lea	rdi, .LC8[rip]
	call	puts@PLT
	mov	eax, 0
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.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	"760117.c"
	.text
	.local	globalData
	.comm	globalData,4,4
	.section	.rodata
	.align	2
.LC0:
	.ascii	"(%d) myPid is %d\012\000"
	.align	2
.LC1:
	.ascii	"(%d) parentPid is %d\012\000"
	.align	2
.LC2:
	.ascii	"(%d) globalData is %d\012\000"
	.align	2
.LC3:
	.ascii	"(%d) After sleep. MyPid is %d\012\000"
	.align	2
.LC4:
	.ascii	"(%d) After sleep. ParentPid is %d\012\000"
	.align	2
.LC5:
	.ascii	"(%d) After sleep. globalData is %d\012\000"
	.text
	.align	2
	.global	child_process
	.syntax unified
	.arm
	.fpu softvfp
	.type	child_process, %function
child_process:
	@ args = 0, pretend = 0, frame = 16
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #16
	str	r0, [fp, #-16]
	bl	getpid
	str	r0, [fp, #-12]
	bl	getppid
	str	r0, [fp, #-8]
	ldr	r3, .L3
	ldr	r3, [r3]
	add	r3, r3, #1
	ldr	r2, .L3
	str	r3, [r2]
	ldr	r2, [fp, #-12]
	ldr	r1, [fp, #-16]
	ldr	r0, .L3+4
	bl	printf
	ldr	r2, [fp, #-8]
	ldr	r1, [fp, #-16]
	ldr	r0, .L3+8
	bl	printf
	ldr	r3, .L3
	ldr	r3, [r3]
	mov	r2, r3
	ldr	r1, [fp, #-16]
	ldr	r0, .L3+12
	bl	printf
	mov	r0, #8
	bl	sleep
	bl	getppid
	str	r0, [fp, #-8]
	ldr	r2, [fp, #-12]
	ldr	r1, [fp, #-16]
	ldr	r0, .L3+16
	bl	printf
	ldr	r2, [fp, #-8]
	ldr	r1, [fp, #-16]
	ldr	r0, .L3+20
	bl	printf
	ldr	r3, .L3
	ldr	r3, [r3]
	mov	r2, r3
	ldr	r1, [fp, #-16]
	ldr	r0, .L3+24
	bl	printf
	mov	r3, #0
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L4:
	.align	2
.L3:
	.word	globalData
	.word	.LC0
	.word	.LC1
	.word	.LC2
	.word	.LC3
	.word	.LC4
	.word	.LC5
	.size	child_process, .-child_process
	.section	.rodata
	.align	2
.LC6:
	.ascii	"Failed to create child, exiting\000"
	.align	2
.LC7:
	.ascii	"Started child process %d, sleeping one second\012\000"
	.align	2
.LC8:
	.ascii	"Done creating children, exiting!!\000"
	.text
	.align	2
	.global	main
	.syntax unified
	.arm
	.fpu softvfp
	.type	main, %function
main:
	@ args = 0, pretend = 0, frame = 16
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #16
	str	r0, [fp, #-16]
	str	r1, [fp, #-20]
	mov	r3, #0
	str	r3, [fp, #-12]
	b	.L6
.L9:
	bl	fork
	mov	r3, r0
	str	r3, [fp, #-8]
	ldr	r3, [fp, #-8]
	cmp	r3, #0
	bge	.L7
	ldr	r0, .L11
	bl	printf
	mov	r0, #1
	bl	exit
.L7:
	ldr	r3, [fp, #-8]
	cmp	r3, #0
	bne	.L8
	ldr	r0, [fp, #-12]
	bl	child_process
.L8:
	ldr	r1, [fp, #-8]
	ldr	r0, .L11+4
	bl	printf
	mov	r0, #1
	bl	sleep
	ldr	r3, [fp, #-12]
	add	r3, r3, #1
	str	r3, [fp, #-12]
.L6:
	ldr	r3, [fp, #-12]
	cmp	r3, #9
	ble	.L9
	ldr	r0, .L11+8
	bl	puts
	mov	r3, #0
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L12:
	.align	2
.L11:
	.word	.LC6
	.word	.LC7
	.word	.LC8
	.size	main, .-main
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
