	.file	"480154.c"
	.intel_syntax noprefix
	.text
	.globl	value
	.data
	.align 4
	.type	value, @object
	.size	value, 4
value:
	.long	88
	.section	.rodata
.LC0:
	.string	"prog4 running"
.LC1:
	.string	"PARENT: pid=%d\n"
.LC2:
	.string	"PARENT: FORKING"
	.align 8
.LC3:
	.string	"CHILD : pid=%d (WITH PARENT: %d)\n"
	.align 8
.LC4:
	.string	"PARENT: pid=%d (WITH CHILD : %d)\n"
.LC5:
	.string	"SOME MESSAGE"
.LC6:
	.string	"[PID %d] value at %p is %d\n"
	.text
	.globl	main
	.type	main, @function
main:
.LFB0:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	push	rbx
	sub	rsp, 24
	.cfi_offset 3, -24
	lea	rdi, .LC0[rip]
	call	puts@PLT
	call	getpid@PLT
	mov	esi, eax
	lea	rdi, .LC1[rip]
	mov	eax, 0
	call	printf@PLT
	lea	rdi, .LC2[rip]
	call	puts@PLT
	call	fork@PLT
	mov	DWORD PTR -20[rbp], eax
	cmp	DWORD PTR -20[rbp], 0
	jne	.L2
	call	getppid@PLT
	mov	ebx, eax
	call	getpid@PLT
	mov	edx, ebx
	mov	esi, eax
	lea	rdi, .LC3[rip]
	mov	eax, 0
	call	printf@PLT
	mov	eax, DWORD PTR value[rip]
	add	eax, 1000
	mov	DWORD PTR value[rip], eax
	jmp	.L3
.L2:
	call	getpid@PLT
	mov	ecx, eax
	mov	eax, DWORD PTR -20[rbp]
	mov	edx, eax
	mov	esi, ecx
	lea	rdi, .LC4[rip]
	mov	eax, 0
	call	printf@PLT
.L3:
	lea	rdi, .LC5[rip]
	call	puts@PLT
	mov	DWORD PTR -24[rbp], 0
	jmp	.L4
.L5:
	mov	ebx, DWORD PTR value[rip]
	call	getpid@PLT
	mov	ecx, ebx
	lea	rdx, value[rip]
	mov	esi, eax
	lea	rdi, .LC6[rip]
	mov	eax, 0
	call	printf@PLT
	mov	eax, DWORD PTR value[rip]
	add	eax, 1
	mov	DWORD PTR value[rip], eax
	mov	edi, 1
	call	sleep@PLT
	add	DWORD PTR -24[rbp], 1
.L4:
	cmp	DWORD PTR -24[rbp], 9
	jle	.L5
	mov	eax, 0
	mov	rbx, QWORD PTR -8[rbp]
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.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	"480154.c"
	.text
	.global	value
	.data
	.align	2
	.type	value, %object
	.size	value, 4
value:
	.word	88
	.section	.rodata
	.align	2
.LC0:
	.ascii	"prog4 running\000"
	.align	2
.LC1:
	.ascii	"PARENT: pid=%d\012\000"
	.align	2
.LC2:
	.ascii	"PARENT: FORKING\000"
	.align	2
.LC3:
	.ascii	"CHILD : pid=%d (WITH PARENT: %d)\012\000"
	.align	2
.LC4:
	.ascii	"PARENT: pid=%d (WITH CHILD : %d)\012\000"
	.align	2
.LC5:
	.ascii	"SOME MESSAGE\000"
	.align	2
.LC6:
	.ascii	"[PID %d] value at %p is %d\012\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	{r4, fp, lr}
	add	fp, sp, #8
	sub	sp, sp, #12
	ldr	r0, .L7
	bl	puts
	bl	getpid
	mov	r3, r0
	mov	r1, r3
	ldr	r0, .L7+4
	bl	printf
	ldr	r0, .L7+8
	bl	puts
	bl	fork
	mov	r3, r0
	str	r3, [fp, #-16]
	ldr	r3, [fp, #-16]
	cmp	r3, #0
	bne	.L2
	bl	getpid
	mov	r4, r0
	bl	getppid
	mov	r3, r0
	mov	r2, r3
	mov	r1, r4
	ldr	r0, .L7+12
	bl	printf
	ldr	r3, .L7+16
	ldr	r3, [r3]
	add	r3, r3, #1000
	ldr	r2, .L7+16
	str	r3, [r2]
	b	.L3
.L2:
	bl	getpid
	mov	r3, r0
	ldr	r2, [fp, #-16]
	mov	r1, r3
	ldr	r0, .L7+20
	bl	printf
.L3:
	ldr	r0, .L7+24
	bl	puts
	mov	r3, #0
	str	r3, [fp, #-20]
	b	.L4
.L5:
	bl	getpid
	mov	r1, r0
	ldr	r3, .L7+16
	ldr	r3, [r3]
	ldr	r2, .L7+16
	ldr	r0, .L7+28
	bl	printf
	ldr	r3, .L7+16
	ldr	r3, [r3]
	add	r3, r3, #1
	ldr	r2, .L7+16
	str	r3, [r2]
	mov	r0, #1
	bl	sleep
	ldr	r3, [fp, #-20]
	add	r3, r3, #1
	str	r3, [fp, #-20]
.L4:
	ldr	r3, [fp, #-20]
	cmp	r3, #9
	ble	.L5
	mov	r3, #0
	mov	r0, r3
	sub	sp, fp, #8
	@ sp needed
	pop	{r4, fp, pc}
.L8:
	.align	2
.L7:
	.word	.LC0
	.word	.LC1
	.word	.LC2
	.word	.LC3
	.word	value
	.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
