	.file	"extr_45033.c_main.c"
	.intel_syntax noprefix
	.text
	.section	.rodata.str1.8,"aMS",@progbits,1
	.align 8
.LC0:
	.string	"usage: ./fallocate <file_to_read>"
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC1:
	.string	"/bin/cat"
.LC2:
	.string	"open 2"
.LC3:
	.string	"fstat"
.LC4:
	.string	"mmap 2"
.LC5:
	.string	"/var/crash/privileged_cat"
.LC6:
	.string	"open"
.LC7:
	.string	"fallocate"
.LC8:
	.string	"mmap"
.LC9:
	.string	"cat"
.LC10:
	.string	"execl"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB0:
	.cfi_startproc
	endbr64
	push	r14
	.cfi_def_cfa_offset 16
	.cfi_offset 14, -16
	push	r13
	.cfi_def_cfa_offset 24
	.cfi_offset 13, -24
	push	r12
	.cfi_def_cfa_offset 32
	.cfi_offset 12, -32
	push	rbp
	.cfi_def_cfa_offset 40
	.cfi_offset 6, -40
	push	rbx
	.cfi_def_cfa_offset 48
	.cfi_offset 3, -48
	sub	rsp, 16
	.cfi_def_cfa_offset 64
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR 8[rsp], rax
	xor	eax, eax
	cmp	edi, 2
	je	.L2
	lea	rdi, .LC0[rip]
	call	printf@PLT
	mov	eax, 1
.L1:
	mov	rbx, QWORD PTR 8[rsp]
	xor	rbx, QWORD PTR fs:40
	jne	.L19
	add	rsp, 16
	.cfi_remember_state
	.cfi_def_cfa_offset 48
	pop	rbx
	.cfi_def_cfa_offset 40
	pop	rbp
	.cfi_def_cfa_offset 32
	pop	r12
	.cfi_def_cfa_offset 24
	pop	r13
	.cfi_def_cfa_offset 16
	pop	r14
	.cfi_def_cfa_offset 8
	ret
.L2:
	.cfi_restore_state
	mov	rbx, rsi
	mov	esi, DWORD PTR O_RDONLY[rip]
	lea	rdi, .LC1[rip]
	xor	eax, eax
	call	open@PLT
	mov	ebp, eax
	cmp	eax, -1
	je	.L20
.L4:
	lea	rsi, 4[rsp]
	mov	edi, ebp
	call	fstat@PLT
	test	rax, rax
	jne	.L21
.L5:
	mov	r13d, DWORD PTR 4[rsp]
	mov	ecx, DWORD PTR MAP_PRIVATE[rip]
	xor	r9d, r9d
	xor	edi, edi
	mov	edx, DWORD PTR PROT_READ[rip]
	mov	r8d, ebp
	mov	esi, r13d
	call	mmap@PLT
	cmp	QWORD PTR MAP_FAILED[rip], rax
	mov	r14, rax
	je	.L22
.L6:
	lea	rdi, .LC5[rip]
	call	unlink@PLT
	mov	esi, DWORD PTR O_RDWR[rip]
	mov	edx, 1517
	xor	eax, eax
	or	esi, DWORD PTR O_CREAT[rip]
	lea	rdi, .LC5[rip]
	or	esi, DWORD PTR O_EXCL[rip]
	call	open@PLT
	mov	ebp, eax
	cmp	eax, -1
	je	.L23
.L7:
	xor	edx, edx
	xor	esi, esi
	mov	ecx, r13d
	mov	edi, ebp
	call	fallocate@PLT
	test	rax, rax
	jne	.L24
.L8:
	mov	ecx, DWORD PTR MAP_SHARED[rip]
	xor	r9d, r9d
	xor	edi, edi
	mov	r8d, ebp
	mov	edx, DWORD PTR PROT_READ[rip]
	mov	esi, r13d
	or	edx, DWORD PTR PROT_WRITE[rip]
	call	mmap@PLT
	cmp	QWORD PTR MAP_FAILED[rip], rax
	mov	r12, rax
	je	.L25
.L9:
	mov	edx, r13d
	mov	rsi, r14
	mov	rdi, r12
	call	memcpy@PLT
	mov	esi, r13d
	mov	rdi, r12
	call	munmap@PLT
	mov	edi, ebp
	call	close@PLT
	mov	rdx, QWORD PTR 8[rbx]
	xor	ecx, ecx
	lea	rsi, .LC9[rip]
	lea	rdi, .LC5[rip]
	call	execl@PLT
	lea	rsi, .LC10[rip]
	mov	edi, 1
	call	err@PLT
	xor	eax, eax
	jmp	.L1
.L24:
	lea	rsi, .LC7[rip]
	mov	edi, 1
	call	err@PLT
	jmp	.L8
.L21:
	lea	rsi, .LC3[rip]
	mov	edi, 1
	call	err@PLT
	jmp	.L5
.L20:
	lea	rsi, .LC2[rip]
	mov	edi, 1
	call	err@PLT
	jmp	.L4
.L23:
	lea	rsi, .LC6[rip]
	mov	edi, 1
	call	err@PLT
	jmp	.L7
.L22:
	lea	rsi, .LC4[rip]
	mov	edi, 1
	call	err@PLT
	jmp	.L6
.L25:
	lea	rsi, .LC8[rip]
	mov	edi, 1
	call	err@PLT
	jmp	.L9
.L19:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE0:
	.size	main, .-main
	.comm	PROT_WRITE,4,4
	.comm	PROT_READ,4,4
	.comm	O_RDWR,4,4
	.comm	O_RDONLY,4,4
	.comm	O_EXCL,4,4
	.comm	O_CREAT,4,4
	.comm	MAP_SHARED,4,4
	.comm	MAP_PRIVATE,4,4
	.comm	MAP_FAILED,8,8
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.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, 2
	.eabi_attribute 34, 0
	.eabi_attribute 18, 4
	.file	"extr_45033.c_main.c"
	.text
	.section	.rodata.str1.4,"aMS",%progbits,1
	.align	2
.LC0:
	.ascii	"usage: ./fallocate <file_to_read>\000"
	.align	2
.LC1:
	.ascii	"/bin/cat\000"
	.align	2
.LC2:
	.ascii	"open 2\000"
	.align	2
.LC3:
	.ascii	"fstat\000"
	.align	2
.LC4:
	.ascii	"mmap 2\000"
	.align	2
.LC5:
	.ascii	"/var/crash/privileged_cat\000"
	.align	2
.LC6:
	.ascii	"open\000"
	.align	2
.LC7:
	.ascii	"fallocate\000"
	.align	2
.LC8:
	.ascii	"mmap\000"
	.align	2
.LC9:
	.ascii	"cat\000"
	.align	2
.LC10:
	.ascii	"execl\000"
	.section	.rodata.cst4,"aM",%progbits,4
	.align	2
.LC11:
	.word	__stack_chk_guard
	.section	.text.startup,"ax",%progbits
	.align	2
	.global	main
	.syntax unified
	.arm
	.fpu softvfp
	.type	main, %function
main:
	@ args = 0, pretend = 0, frame = 8
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, r9, lr}
	ldr	r3, .L26
	sub	sp, sp, #20
	cmp	r0, #2
	ldr	r3, [r3]
	str	r3, [sp, #12]
	mov	r3,#0
	beq	.L2
	ldr	r0, .L26+4
	bl	printf
	mov	r0, #1
.L1:
	ldr	r3, .L26
	ldr	r2, [r3]
	ldr	r3, [sp, #12]
	eors	r2, r3, r2
	mov	r3, #0
	bne	.L19
	add	sp, sp, #20
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, pc}
.L2:
	ldr	r3, .L26+8
	mov	r4, r1
	ldr	r0, .L26+12
	ldr	r1, [r3]
	bl	open
	cmn	r0, #1
	mov	r5, r0
	beq	.L20
.L4:
	mov	r0, r5
	add	r1, sp, #8
	bl	fstat
	cmp	r0, #0
	bne	.L21
.L5:
	mov	r0, #0
	ldr	r7, [sp, #8]
	ldr	r3, .L26+16
	ldr	r6, .L26+20
	str	r5, [sp]
	str	r0, [sp, #4]
	ldr	r3, [r3]
	mov	r1, r7
	ldr	r2, [r6]
	bl	mmap
	ldr	r9, .L26+24
	mov	r8, r0
	ldr	r3, [r9]
	cmp	r3, r0
	beq	.L22
.L6:
	ldr	r0, .L26+28
	bl	unlink
	ldr	r3, .L26+32
	ldr	r2, .L26+36
	ldr	r1, .L26+40
	ldr	r2, [r2]
	ldr	r3, [r3]
	ldr	r1, [r1]
	orr	r3, r3, r2
	ldr	r0, .L26+28
	ldr	r2, .L26+44
	orr	r1, r3, r1
	bl	open
	cmn	r0, #1
	mov	r5, r0
	beq	.L23
.L7:
	mov	r2, #0
	mov	r3, r7
	mov	r1, r2
	mov	r0, r5
	bl	fallocate
	cmp	r0, #0
	bne	.L24
.L8:
	mov	r0, #0
	ldr	r3, .L26+48
	ldr	r1, [r6]
	ldr	r2, [r3]
	ldr	r3, .L26+52
	str	r5, [sp]
	str	r0, [sp, #4]
	ldr	r3, [r3]
	orr	r2, r1, r2
	mov	r1, r7
	bl	mmap
	ldr	r3, [r9]
	mov	r6, r0
	cmp	r3, r0
	beq	.L25
.L9:
	mov	r2, r7
	mov	r1, r8
	mov	r0, r6
	bl	memcpy
	mov	r1, r7
	mov	r0, r6
	bl	munmap
	mov	r0, r5
	bl	close
	mov	r3, #0
	ldr	r2, [r4, #4]
	ldr	r1, .L26+56
	ldr	r0, .L26+28
	bl	execl
	mov	r0, #1
	ldr	r1, .L26+60
	bl	err
	mov	r0, #0
	b	.L1
.L24:
	ldr	r1, .L26+64
	mov	r0, #1
	bl	err
	b	.L8
.L21:
	ldr	r1, .L26+68
	mov	r0, #1
	bl	err
	b	.L5
.L20:
	ldr	r1, .L26+72
	mov	r0, #1
	bl	err
	b	.L4
.L23:
	ldr	r1, .L26+76
	mov	r0, #1
	bl	err
	b	.L7
.L22:
	ldr	r1, .L26+80
	mov	r0, #1
	bl	err
	b	.L6
.L25:
	ldr	r1, .L26+84
	mov	r0, #1
	bl	err
	b	.L9
.L19:
	bl	__stack_chk_fail
.L27:
	.align	2
.L26:
	.word	.LC11
	.word	.LC0
	.word	O_RDONLY
	.word	.LC1
	.word	MAP_PRIVATE
	.word	PROT_READ
	.word	MAP_FAILED
	.word	.LC5
	.word	O_RDWR
	.word	O_CREAT
	.word	O_EXCL
	.word	1517
	.word	PROT_WRITE
	.word	MAP_SHARED
	.word	.LC9
	.word	.LC10
	.word	.LC7
	.word	.LC3
	.word	.LC2
	.word	.LC6
	.word	.LC4
	.word	.LC8
	.size	main, .-main
	.comm	PROT_WRITE,4,4
	.comm	PROT_READ,4,4
	.comm	O_RDWR,4,4
	.comm	O_RDONLY,4,4
	.comm	O_EXCL,4,4
	.comm	O_CREAT,4,4
	.comm	MAP_SHARED,4,4
	.comm	MAP_PRIVATE,4,4
	.comm	MAP_FAILED,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
