	.file	"510867.c"
	.intel_syntax noprefix
	.text
	.globl	map_alloc
	.type	map_alloc, @function
map_alloc:
.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, 32
	mov	QWORD PTR -24[rbp], rdi
	mov	rax, QWORD PTR -24[rbp]
	mov	r9d, 0
	mov	r8d, -1
	mov	ecx, 34
	mov	edx, 3
	mov	rsi, rax
	mov	edi, 0
	call	mmap@PLT
	mov	QWORD PTR -8[rbp], rax
	cmp	QWORD PTR -8[rbp], -1
	jne	.L2
	mov	eax, 0
	jmp	.L3
.L2:
	mov	rdx, QWORD PTR -24[rbp]
	mov	rax, QWORD PTR -8[rbp]
	mov	esi, 36
	mov	rdi, rax
	call	memset@PLT
	mov	rax, QWORD PTR -8[rbp]
.L3:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.size	map_alloc, .-map_alloc
	.globl	map_file
	.type	map_file, @function
map_file:
.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, 192
	mov	QWORD PTR -184[rbp], rdi
	mov	QWORD PTR -192[rbp], rsi
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	mov	QWORD PTR -168[rbp], 0
	mov	rax, QWORD PTR -184[rbp]
	mov	esi, 2
	mov	rdi, rax
	mov	eax, 0
	call	open@PLT
	mov	DWORD PTR -172[rbp], eax
	cmp	DWORD PTR -172[rbp], -1
	jne	.L5
	mov	eax, 0
	jmp	.L9
.L5:
	lea	rdx, -160[rbp]
	mov	eax, DWORD PTR -172[rbp]
	mov	rsi, rdx
	mov	edi, eax
	call	fstat@PLT
	cmp	eax, -1
	jne	.L7
	mov	eax, 0
	jmp	.L9
.L7:
	mov	rax, QWORD PTR -112[rbp]
	mov	rsi, rax
	mov	eax, DWORD PTR -172[rbp]
	mov	r9d, 0
	mov	r8d, eax
	mov	ecx, 2
	mov	edx, 3
	mov	edi, 0
	call	mmap@PLT
	mov	QWORD PTR -168[rbp], rax
	cmp	QWORD PTR -168[rbp], -1
	jne	.L8
	mov	eax, 0
	jmp	.L9
.L8:
	mov	rax, QWORD PTR -112[rbp]
	mov	rdx, rax
	mov	rax, QWORD PTR -192[rbp]
	mov	QWORD PTR [rax], rdx
	mov	rax, QWORD PTR -192[rbp]
	mov	rdx, QWORD PTR [rax]
	mov	rax, QWORD PTR -168[rbp]
	mov	esi, 36
	mov	rdi, rax
	call	memset@PLT
	mov	rax, QWORD PTR -168[rbp]
.L9:
	mov	rcx, QWORD PTR -8[rbp]
	sub	rcx, QWORD PTR fs:40
	je	.L10
	call	__stack_chk_fail@PLT
.L10:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE1:
	.size	map_file, .-map_file
	.section	.rodata
.LC0:
	.string	"parent %u\n"
.LC1:
	.string	"fork"
.LC2:
	.string	"child %u\n"
.LC3:
	.string	"child terminated"
.LC4:
	.string	"parent terminated"
	.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
	sub	rsp, 32
	mov	QWORD PTR -16[rbp], 0
	mov	eax, 2147483648
	mov	QWORD PTR -8[rbp], rax
	mov	rax, QWORD PTR -8[rbp]
	mov	rdi, rax
	call	map_alloc
	mov	QWORD PTR -16[rbp], rax
	call	getpid@PLT
	mov	esi, eax
	lea	rdi, .LC0[rip]
	mov	eax, 0
	call	printf@PLT
	mov	rax, QWORD PTR stdin[rip]
	mov	rdi, rax
	call	fgetc@PLT
	call	fork@PLT
	mov	DWORD PTR -20[rbp], eax
	cmp	DWORD PTR -20[rbp], -1
	jne	.L12
	lea	rsi, .LC1[rip]
	mov	edi, 1
	mov	eax, 0
	call	err@PLT
.L12:
	cmp	DWORD PTR -20[rbp], 0
	jne	.L13
	call	getpid@PLT
	mov	esi, eax
	lea	rdi, .LC2[rip]
	mov	eax, 0
	call	printf@PLT
	lea	rdi, .LC3[rip]
	call	puts@PLT
	jmp	.L14
.L13:
	mov	eax, DWORD PTR -20[rbp]
	mov	edx, 0
	mov	esi, 0
	mov	edi, eax
	call	waitpid@PLT
	lea	rdi, .LC4[rip]
	call	puts@PLT
.L14:
	mov	eax, 0
	leave
	.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	"510867.c"
	.text
	.align	2
	.global	map_alloc
	.syntax unified
	.arm
	.fpu softvfp
	.type	map_alloc, %function
map_alloc:
	@ args = 0, pretend = 0, frame = 16
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #24
	str	r0, [fp, #-16]
	mov	r3, #0
	str	r3, [sp, #4]
	mvn	r3, #0
	str	r3, [sp]
	mov	r3, #34
	mov	r2, #3
	ldr	r1, [fp, #-16]
	mov	r0, #0
	bl	mmap
	str	r0, [fp, #-8]
	ldr	r3, [fp, #-8]
	cmn	r3, #1
	bne	.L2
	mov	r3, #0
	b	.L3
.L2:
	ldr	r2, [fp, #-16]
	mov	r1, #36
	ldr	r0, [fp, #-8]
	bl	memset
	ldr	r3, [fp, #-8]
.L3:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
	.size	map_alloc, .-map_alloc
	.section	.rodata
	.align	2
.LC0:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	map_file
	.syntax unified
	.arm
	.fpu softvfp
	.type	map_file, %function
map_file:
	@ args = 0, pretend = 0, frame = 112
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #120
	str	r0, [fp, #-112]
	str	r1, [fp, #-116]
	ldr	r3, .L11
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	mov	r3, #0
	str	r3, [fp, #-108]
	mov	r1, #2
	ldr	r0, [fp, #-112]
	bl	open
	str	r0, [fp, #-104]
	ldr	r3, [fp, #-104]
	cmn	r3, #1
	bne	.L5
	mov	r3, #0
	b	.L9
.L5:
	sub	r3, fp, #100
	mov	r1, r3
	ldr	r0, [fp, #-104]
	bl	fstat
	mov	r3, r0
	cmn	r3, #1
	bne	.L7
	mov	r3, #0
	b	.L9
.L7:
	ldr	r3, [fp, #-56]
	mov	r1, r3
	mov	r3, #0
	str	r3, [sp, #4]
	ldr	r3, [fp, #-104]
	str	r3, [sp]
	mov	r3, #2
	mov	r2, #3
	mov	r0, #0
	bl	mmap
	str	r0, [fp, #-108]
	ldr	r3, [fp, #-108]
	cmn	r3, #1
	bne	.L8
	mov	r3, #0
	b	.L9
.L8:
	ldr	r3, [fp, #-56]
	mov	r2, r3
	ldr	r3, [fp, #-116]
	str	r2, [r3]
	ldr	r3, [fp, #-116]
	ldr	r3, [r3]
	mov	r2, r3
	mov	r1, #36
	ldr	r0, [fp, #-108]
	bl	memset
	ldr	r3, [fp, #-108]
.L9:
	ldr	r2, .L11
	ldr	r1, [r2]
	ldr	r2, [fp, #-8]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L10
	bl	__stack_chk_fail
.L10:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L12:
	.align	2
.L11:
	.word	.LC0
	.size	map_file, .-map_file
	.section	.rodata
	.align	2
.LC1:
	.ascii	"parent %u\012\000"
	.align	2
.LC2:
	.ascii	"fork\000"
	.align	2
.LC3:
	.ascii	"child %u\012\000"
	.align	2
.LC4:
	.ascii	"child terminated\000"
	.align	2
.LC5:
	.ascii	"parent terminated\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
	mov	r3, #0
	str	r3, [fp, #-16]
	mov	r3, #-2147483648
	str	r3, [fp, #-12]
	ldr	r0, [fp, #-12]
	bl	map_alloc
	str	r0, [fp, #-16]
	bl	getpid
	mov	r3, r0
	mov	r1, r3
	ldr	r0, .L18
	bl	printf
	ldr	r3, .L18+4
	ldr	r3, [r3]
	mov	r0, r3
	bl	fgetc
	bl	fork
	mov	r3, r0
	str	r3, [fp, #-8]
	ldr	r3, [fp, #-8]
	cmn	r3, #1
	bne	.L14
	ldr	r1, .L18+8
	mov	r0, #1
	bl	err
.L14:
	ldr	r3, [fp, #-8]
	cmp	r3, #0
	bne	.L15
	bl	getpid
	mov	r3, r0
	mov	r1, r3
	ldr	r0, .L18+12
	bl	printf
	ldr	r0, .L18+16
	bl	puts
	b	.L16
.L15:
	mov	r2, #0
	mov	r1, #0
	ldr	r0, [fp, #-8]
	bl	waitpid
	ldr	r0, .L18+20
	bl	puts
.L16:
	mov	r3, #0
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L19:
	.align	2
.L18:
	.word	.LC1
	.word	stdin
	.word	.LC2
	.word	.LC3
	.word	.LC4
	.word	.LC5
	.size	main, .-main
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
