	.file	"766275.c"
	.intel_syntax noprefix
	.text
	.globl	x
	.bss
	.align 4
	.type	x, @object
	.size	x, 4
x:
	.zero	4
	.globl	start_pos
	.align 8
	.type	start_pos, @object
	.size	start_pos, 8
start_pos:
	.zero	8
	.globl	f
	.align 8
	.type	f, @object
	.size	f, 8
f:
	.zero	8
	.section	.rodata
.LC0:
	.string	"[parent] I'm the parent!"
.LC1:
	.string	"[parent] Global x = %d\n"
.LC2:
	.string	"[parent] File is at %ld\n"
	.text
	.globl	parent
	.type	parent, @function
parent:
.LFB0:
	.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
	lea	rdi, .LC0[rip]
	call	puts@PLT
	mov	eax, DWORD PTR x[rip]
	sub	eax, 1
	mov	DWORD PTR x[rip], eax
	mov	eax, DWORD PTR x[rip]
	mov	esi, eax
	lea	rdi, .LC1[rip]
	mov	eax, 0
	call	printf@PLT
	mov	rax, QWORD PTR f[rip]
	mov	edx, 1
	mov	esi, 100
	mov	rdi, rax
	call	fseek@PLT
	mov	rax, QWORD PTR f[rip]
	mov	rdi, rax
	call	ftell@PLT
	mov	QWORD PTR -8[rbp], rax
	mov	rax, QWORD PTR -8[rbp]
	mov	rsi, rax
	lea	rdi, .LC2[rip]
	mov	eax, 0
	call	printf@PLT
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.size	parent, .-parent
	.section	.rodata
.LC3:
	.string	"[child] I'm the child!"
.LC4:
	.string	"[child] Global x = %d\n"
.LC5:
	.string	"[child] File is at %ld\n"
	.align 8
.LC6:
	.string	"[child] File moved from %ld to %ld by it %d\n"
	.text
	.globl	child
	.type	child, @function
child:
.LFB1:
	.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
	lea	rdi, .LC3[rip]
	call	puts@PLT
	mov	eax, DWORD PTR x[rip]
	add	eax, 1
	mov	DWORD PTR x[rip], eax
	mov	eax, DWORD PTR x[rip]
	mov	esi, eax
	lea	rdi, .LC4[rip]
	mov	eax, 0
	call	printf@PLT
	mov	rax, QWORD PTR f[rip]
	mov	rdi, rax
	call	ftell@PLT
	mov	QWORD PTR -8[rbp], rax
	mov	rax, QWORD PTR -8[rbp]
	mov	rsi, rax
	lea	rdi, .LC5[rip]
	mov	eax, 0
	call	printf@PLT
	mov	DWORD PTR -12[rbp], 0
	jmp	.L3
.L6:
	mov	rax, QWORD PTR f[rip]
	mov	rdi, rax
	call	ftell@PLT
	mov	QWORD PTR -8[rbp], rax
	mov	rax, QWORD PTR start_pos[rip]
	cmp	QWORD PTR -8[rbp], rax
	je	.L4
	mov	rax, QWORD PTR start_pos[rip]
	mov	ecx, DWORD PTR -12[rbp]
	mov	rdx, QWORD PTR -8[rbp]
	mov	rsi, rax
	lea	rdi, .LC6[rip]
	mov	eax, 0
	call	printf@PLT
	jmp	.L5
.L4:
	add	DWORD PTR -12[rbp], 1
.L3:
	cmp	DWORD PTR -12[rbp], 99
	jle	.L6
	nop
.L5:
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE1:
	.size	child, .-child
	.section	.rodata
.LC7:
	.string	"Starting fork..."
.LC8:
	.string	"Global x = %d\n"
.LC9:
	.string	"r"
.LC10:
	.string	"/tmp/x"
.LC11:
	.string	"File is at %ld\n"
	.text
	.globl	main
	.type	main, @function
main:
.LFB2:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	lea	rdi, .LC7[rip]
	call	puts@PLT
	mov	eax, DWORD PTR x[rip]
	mov	esi, eax
	lea	rdi, .LC8[rip]
	mov	eax, 0
	call	printf@PLT
	lea	rsi, .LC9[rip]
	lea	rdi, .LC10[rip]
	call	fopen@PLT
	mov	QWORD PTR f[rip], rax
	mov	rax, QWORD PTR f[rip]
	mov	rdi, rax
	call	ftell@PLT
	mov	QWORD PTR start_pos[rip], rax
	mov	rax, QWORD PTR start_pos[rip]
	mov	rsi, rax
	lea	rdi, .LC11[rip]
	mov	eax, 0
	call	printf@PLT
	call	fork@PLT
	test	eax, eax
	je	.L8
	call	parent
	jmp	.L9
.L8:
	call	child
.L9:
	mov	eax, 0
	pop	rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE2:
	.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	"766275.c"
	.text
	.global	x
	.bss
	.align	2
	.type	x, %object
	.size	x, 4
x:
	.space	4
	.global	start_pos
	.align	2
	.type	start_pos, %object
	.size	start_pos, 4
start_pos:
	.space	4
	.global	f
	.align	2
	.type	f, %object
	.size	f, 4
f:
	.space	4
	.section	.rodata
	.align	2
.LC0:
	.ascii	"[parent] I'm the parent!\000"
	.align	2
.LC1:
	.ascii	"[parent] Global x = %d\012\000"
	.align	2
.LC2:
	.ascii	"[parent] File is at %ld\012\000"
	.text
	.align	2
	.global	parent
	.syntax unified
	.arm
	.fpu softvfp
	.type	parent, %function
parent:
	@ args = 0, pretend = 0, frame = 8
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #8
	ldr	r0, .L2
	bl	puts
	ldr	r3, .L2+4
	ldr	r3, [r3]
	sub	r3, r3, #1
	ldr	r2, .L2+4
	str	r3, [r2]
	ldr	r3, .L2+4
	ldr	r3, [r3]
	mov	r1, r3
	ldr	r0, .L2+8
	bl	printf
	ldr	r3, .L2+12
	ldr	r3, [r3]
	mov	r2, #1
	mov	r1, #100
	mov	r0, r3
	bl	fseek
	ldr	r3, .L2+12
	ldr	r3, [r3]
	mov	r0, r3
	bl	ftell
	str	r0, [fp, #-8]
	ldr	r1, [fp, #-8]
	ldr	r0, .L2+16
	bl	printf
	nop
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L3:
	.align	2
.L2:
	.word	.LC0
	.word	x
	.word	.LC1
	.word	f
	.word	.LC2
	.size	parent, .-parent
	.section	.rodata
	.align	2
.LC3:
	.ascii	"[child] I'm the child!\000"
	.align	2
.LC4:
	.ascii	"[child] Global x = %d\012\000"
	.align	2
.LC5:
	.ascii	"[child] File is at %ld\012\000"
	.align	2
.LC6:
	.ascii	"[child] File moved from %ld to %ld by it %d\012\000"
	.text
	.align	2
	.global	child
	.syntax unified
	.arm
	.fpu softvfp
	.type	child, %function
child:
	@ args = 0, pretend = 0, frame = 8
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #8
	ldr	r0, .L9
	bl	puts
	ldr	r3, .L9+4
	ldr	r3, [r3]
	add	r3, r3, #1
	ldr	r2, .L9+4
	str	r3, [r2]
	ldr	r3, .L9+4
	ldr	r3, [r3]
	mov	r1, r3
	ldr	r0, .L9+8
	bl	printf
	ldr	r3, .L9+12
	ldr	r3, [r3]
	mov	r0, r3
	bl	ftell
	str	r0, [fp, #-8]
	ldr	r1, [fp, #-8]
	ldr	r0, .L9+16
	bl	printf
	mov	r3, #0
	str	r3, [fp, #-12]
	b	.L5
.L8:
	ldr	r3, .L9+12
	ldr	r3, [r3]
	mov	r0, r3
	bl	ftell
	str	r0, [fp, #-8]
	ldr	r3, .L9+20
	ldr	r3, [r3]
	ldr	r2, [fp, #-8]
	cmp	r2, r3
	beq	.L6
	ldr	r3, .L9+20
	ldr	r1, [r3]
	ldr	r3, [fp, #-12]
	ldr	r2, [fp, #-8]
	ldr	r0, .L9+24
	bl	printf
	b	.L7
.L6:
	ldr	r3, [fp, #-12]
	add	r3, r3, #1
	str	r3, [fp, #-12]
.L5:
	ldr	r3, [fp, #-12]
	cmp	r3, #99
	ble	.L8
	nop
.L7:
	nop
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L10:
	.align	2
.L9:
	.word	.LC3
	.word	x
	.word	.LC4
	.word	f
	.word	.LC5
	.word	start_pos
	.word	.LC6
	.size	child, .-child
	.section	.rodata
	.align	2
.LC7:
	.ascii	"Starting fork...\000"
	.align	2
.LC8:
	.ascii	"Global x = %d\012\000"
	.align	2
.LC9:
	.ascii	"r\000"
	.align	2
.LC10:
	.ascii	"/tmp/x\000"
	.align	2
.LC11:
	.ascii	"File is at %ld\012\000"
	.text
	.align	2
	.global	main
	.syntax unified
	.arm
	.fpu softvfp
	.type	main, %function
main:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	ldr	r0, .L15
	bl	puts
	ldr	r3, .L15+4
	ldr	r3, [r3]
	mov	r1, r3
	ldr	r0, .L15+8
	bl	printf
	ldr	r1, .L15+12
	ldr	r0, .L15+16
	bl	fopen
	mov	r3, r0
	ldr	r2, .L15+20
	str	r3, [r2]
	ldr	r3, .L15+20
	ldr	r3, [r3]
	mov	r0, r3
	bl	ftell
	mov	r3, r0
	ldr	r2, .L15+24
	str	r3, [r2]
	ldr	r3, .L15+24
	ldr	r3, [r3]
	mov	r1, r3
	ldr	r0, .L15+28
	bl	printf
	bl	fork
	mov	r3, r0
	cmp	r3, #0
	beq	.L12
	bl	parent
	b	.L13
.L12:
	bl	child
.L13:
	mov	r3, #0
	mov	r0, r3
	pop	{fp, pc}
.L16:
	.align	2
.L15:
	.word	.LC7
	.word	x
	.word	.LC8
	.word	.LC9
	.word	.LC10
	.word	f
	.word	start_pos
	.word	.LC11
	.size	main, .-main
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
