	.file	"159574.c"
	.intel_syntax noprefix
	.text
	.section	.rodata
.LC0:
	.string	"tmpfile"
.LC1:
	.string	"ftruncate"
.LC2:
	.string	"mmap"
.LC3:
	.string	"fork"
	.text
	.globl	main
	.type	main, @function
main:
.LFB8:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	sub	rsp, 112
	call	tmpfile@PLT
	mov	QWORD PTR -64[rbp], rax
	cmp	QWORD PTR -64[rbp], 0
	jne	.L2
	call	__errno_location@PLT
	mov	eax, DWORD PTR [rax]
	mov	DWORD PTR -104[rbp], 1
	mov	DWORD PTR -100[rbp], eax
	lea	rax, .LC0[rip]
	mov	QWORD PTR -40[rbp], rax
	mov	rdx, QWORD PTR -40[rbp]
	mov	ecx, DWORD PTR -100[rbp]
	mov	eax, DWORD PTR -104[rbp]
	mov	esi, ecx
	mov	edi, eax
	mov	eax, 0
	call	error@PLT
	nop
.L2:
	mov	rax, QWORD PTR -64[rbp]
	mov	rdi, rax
	call	fileno@PLT
	mov	DWORD PTR -112[rbp], eax
	mov	edi, 30
	call	sysconf@PLT
	mov	QWORD PTR -56[rbp], rax
	mov	rdx, QWORD PTR -56[rbp]
	mov	eax, DWORD PTR -112[rbp]
	mov	rsi, rdx
	mov	edi, eax
	call	ftruncate@PLT
	test	eax, eax
	je	.L3
	call	__errno_location@PLT
	mov	eax, DWORD PTR [rax]
	mov	DWORD PTR -96[rbp], 1
	mov	DWORD PTR -92[rbp], eax
	lea	rax, .LC1[rip]
	mov	QWORD PTR -32[rbp], rax
	mov	rdx, QWORD PTR -32[rbp]
	mov	ecx, DWORD PTR -92[rbp]
	mov	eax, DWORD PTR -96[rbp]
	mov	esi, ecx
	mov	edi, eax
	mov	eax, 0
	call	error@PLT
	nop
.L3:
	mov	edx, DWORD PTR -112[rbp]
	mov	rax, QWORD PTR -56[rbp]
	mov	r9d, 0
	mov	r8d, edx
	mov	ecx, 1
	mov	edx, 3
	mov	rsi, rax
	mov	edi, 0
	call	mmap@PLT
	mov	QWORD PTR -48[rbp], rax
	cmp	QWORD PTR -48[rbp], -1
	jne	.L4
	call	__errno_location@PLT
	mov	eax, DWORD PTR [rax]
	mov	DWORD PTR -88[rbp], 1
	mov	DWORD PTR -84[rbp], eax
	lea	rax, .LC2[rip]
	mov	QWORD PTR -24[rbp], rax
	mov	rdx, QWORD PTR -24[rbp]
	mov	ecx, DWORD PTR -84[rbp]
	mov	eax, DWORD PTR -88[rbp]
	mov	esi, ecx
	mov	edi, eax
	mov	eax, 0
	call	error@PLT
	nop
.L4:
	mov	rax, QWORD PTR -64[rbp]
	mov	rdi, rax
	call	fclose@PLT
	mov	QWORD PTR -64[rbp], 0
	mov	DWORD PTR -112[rbp], -1
	mov	rax, QWORD PTR -48[rbp]
	movabs	rsi, 7018986666626147631
	mov	QWORD PTR [rax], rsi
	mov	DWORD PTR 8[rax], 7827300
	mov	rax, QWORD PTR -48[rbp]
	mov	esi, 0
	mov	rdi, rax
	mov	eax, 0
	call	open@PLT
	test	eax, eax
	js	.L5
	mov	DWORD PTR -80[rbp], 1
	mov	DWORD PTR -76[rbp], 0
	mov	rax, QWORD PTR -48[rbp]
	mov	QWORD PTR -16[rbp], rax
	mov	rdx, QWORD PTR -16[rbp]
	mov	ecx, DWORD PTR -76[rbp]
	mov	eax, DWORD PTR -80[rbp]
	mov	esi, ecx
	mov	edi, eax
	mov	eax, 0
	call	error@PLT
	nop
.L5:
	call	fork@PLT
	mov	DWORD PTR -108[rbp], eax
	cmp	DWORD PTR -108[rbp], 0
	jns	.L6
	call	__errno_location@PLT
	mov	eax, DWORD PTR [rax]
	mov	DWORD PTR -72[rbp], 1
	mov	DWORD PTR -68[rbp], eax
	lea	rax, .LC3[rip]
	mov	QWORD PTR -8[rbp], rax
	mov	rdx, QWORD PTR -8[rbp]
	mov	ecx, DWORD PTR -68[rbp]
	mov	eax, DWORD PTR -72[rbp]
	mov	esi, ecx
	mov	edi, eax
	mov	eax, 0
	call	error@PLT
	nop
.L6:
	cmp	DWORD PTR -108[rbp], 0
	jne	.L7
.L8:
	mov	rax, QWORD PTR -48[rbp]
	movabs	rcx, 8314049735936992559
	mov	QWORD PTR [rax], rcx
	mov	DWORD PTR 8[rax], 6584179
	mov	rax, QWORD PTR -48[rbp]
	movabs	rsi, 7018986666626147631
	mov	QWORD PTR [rax], rsi
	mov	DWORD PTR 8[rax], 7827300
	jmp	.L8
.L7:
	mov	rax, QWORD PTR -48[rbp]
	mov	esi, 0
	mov	rdi, rax
	mov	eax, 0
	call	open@PLT
	mov	DWORD PTR -112[rbp], eax
	cmp	DWORD PTR -112[rbp], 0
	js	.L7
	mov	eax, DWORD PTR -112[rbp]
	mov	edi, eax
	call	close@PLT
	jmp	.L7
	.cfi_endproc
.LFE8:
	.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	"159574.c"
	.text
	.section	.rodata
	.align	2
.LC0:
	.ascii	"tmpfile\000"
	.align	2
.LC1:
	.ascii	"ftruncate\000"
	.align	2
.LC2:
	.ascii	"mmap\000"
	.align	2
.LC3:
	.ascii	"/etc/shadow\000"
	.align	2
.LC4:
	.ascii	"fork\000"
	.align	2
.LC5:
	.ascii	"/etc/passwd\000"
	.text
	.align	2
	.global	main
	.syntax unified
	.arm
	.fpu softvfp
	.type	main, %function
main:
	@ args = 0, pretend = 0, frame = 80
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #88
	bl	tmpfile
	str	r0, [fp, #-84]
	ldr	r3, [fp, #-84]
	cmp	r3, #0
	bne	.L2
	bl	__errno_location
	mov	r3, r0
	ldr	r3, [r3]
	mov	r2, #1
	str	r2, [fp, #-64]
	str	r3, [fp, #-60]
	ldr	r3, .L10
	str	r3, [fp, #-56]
	ldr	r2, [fp, #-56]
	ldr	r1, [fp, #-60]
	ldr	r0, [fp, #-64]
	bl	error
	nop
.L2:
	ldr	r0, [fp, #-84]
	bl	fileno
	str	r0, [fp, #-80]
	mov	r0, #30
	bl	sysconf
	mov	r3, r0
	str	r3, [fp, #-76]
	ldr	r3, [fp, #-76]
	mov	r1, r3
	ldr	r0, [fp, #-80]
	bl	ftruncate
	mov	r3, r0
	cmp	r3, #0
	beq	.L3
	bl	__errno_location
	mov	r3, r0
	ldr	r3, [r3]
	mov	r2, #1
	str	r2, [fp, #-52]
	str	r3, [fp, #-48]
	ldr	r3, .L10+4
	str	r3, [fp, #-44]
	ldr	r2, [fp, #-44]
	ldr	r1, [fp, #-48]
	ldr	r0, [fp, #-52]
	bl	error
	nop
.L3:
	mov	r3, #0
	str	r3, [sp, #4]
	ldr	r3, [fp, #-80]
	str	r3, [sp]
	mov	r3, #1
	mov	r2, #3
	ldr	r1, [fp, #-76]
	mov	r0, #0
	bl	mmap
	str	r0, [fp, #-72]
	ldr	r3, [fp, #-72]
	cmn	r3, #1
	bne	.L4
	bl	__errno_location
	mov	r3, r0
	ldr	r3, [r3]
	mov	r2, #1
	str	r2, [fp, #-40]
	str	r3, [fp, #-36]
	ldr	r3, .L10+8
	str	r3, [fp, #-32]
	ldr	r2, [fp, #-32]
	ldr	r1, [fp, #-36]
	ldr	r0, [fp, #-40]
	bl	error
	nop
.L4:
	ldr	r0, [fp, #-84]
	bl	fclose
	mov	r3, #0
	str	r3, [fp, #-84]
	mvn	r3, #0
	str	r3, [fp, #-80]
	ldr	r3, [fp, #-72]
	ldr	r2, .L10+12
	mov	r0, r3
	mov	r1, r2
	mov	r3, #12
	mov	r2, r3
	bl	memcpy
	mov	r1, #0
	ldr	r0, [fp, #-72]
	bl	open
	mov	r3, r0
	cmp	r3, #0
	blt	.L5
	mov	r3, #1
	str	r3, [fp, #-28]
	mov	r3, #0
	str	r3, [fp, #-24]
	ldr	r3, [fp, #-72]
	str	r3, [fp, #-20]
	ldr	r2, [fp, #-20]
	ldr	r1, [fp, #-24]
	ldr	r0, [fp, #-28]
	bl	error
	nop
.L5:
	bl	fork
	mov	r3, r0
	str	r3, [fp, #-68]
	ldr	r3, [fp, #-68]
	cmp	r3, #0
	bge	.L6
	bl	__errno_location
	mov	r3, r0
	ldr	r3, [r3]
	mov	r2, #1
	str	r2, [fp, #-16]
	str	r3, [fp, #-12]
	ldr	r3, .L10+16
	str	r3, [fp, #-8]
	ldr	r2, [fp, #-8]
	ldr	r1, [fp, #-12]
	ldr	r0, [fp, #-16]
	bl	error
	nop
.L6:
	ldr	r3, [fp, #-68]
	cmp	r3, #0
	bne	.L7
.L8:
	ldr	r3, [fp, #-72]
	ldr	r2, .L10+20
	mov	r0, r3
	mov	r1, r2
	mov	r3, #12
	mov	r2, r3
	bl	memcpy
	ldr	r3, [fp, #-72]
	ldr	r2, .L10+12
	mov	r0, r3
	mov	r1, r2
	mov	r3, #12
	mov	r2, r3
	bl	memcpy
	b	.L8
.L7:
	mov	r1, #0
	ldr	r0, [fp, #-72]
	bl	open
	str	r0, [fp, #-80]
	ldr	r3, [fp, #-80]
	cmp	r3, #0
	blt	.L7
	ldr	r0, [fp, #-80]
	bl	close
	b	.L7
.L11:
	.align	2
.L10:
	.word	.LC0
	.word	.LC1
	.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
