	.file	"extr_m_misc.c_M_ReadFile.c"
	.intel_syntax noprefix
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"Couldn't read file %s"
	.text
	.p2align 4
	.globl	M_ReadFile
	.type	M_ReadFile, @function
M_ReadFile:
.LFB0:
	.cfi_startproc
	endbr64
	push	r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	mov	edx, 438
	push	r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	push	r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	mov	r13, rsi
	push	r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	mov	r12, rdi
	push	rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	push	rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	sub	rsp, 24
	.cfi_def_cfa_offset 80
	mov	esi, DWORD PTR O_RDONLY[rip]
	or	esi, DWORD PTR O_BINARY[rip]
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR 8[rsp], rax
	xor	eax, eax
	call	open@PLT
	mov	ebp, eax
	cmp	eax, -1
	je	.L8
.L2:
	lea	rsi, 4[rsp]
	mov	edi, ebp
	call	fstat@PLT
	cmp	eax, -1
	je	.L9
.L3:
	mov	r14d, DWORD PTR 4[rsp]
	mov	esi, DWORD PTR PU_STATIC[rip]
	xor	edx, edx
	mov	edi, r14d
	call	Z_Malloc@PLT
	mov	edi, ebp
	mov	edx, r14d
	mov	rsi, rax
	mov	rbx, rax
	call	read@PLT
	mov	edi, ebp
	mov	r15d, eax
	call	close@PLT
	cmp	r14d, r15d
	jg	.L10
.L4:
	mov	QWORD PTR 0[r13], rbx
	mov	rax, QWORD PTR 8[rsp]
	xor	rax, QWORD PTR fs:40
	jne	.L11
	add	rsp, 24
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	mov	eax, r14d
	pop	rbx
	.cfi_def_cfa_offset 48
	pop	rbp
	.cfi_def_cfa_offset 40
	pop	r12
	.cfi_def_cfa_offset 32
	pop	r13
	.cfi_def_cfa_offset 24
	pop	r14
	.cfi_def_cfa_offset 16
	pop	r15
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L10:
	.cfi_restore_state
	mov	rsi, r12
	lea	rdi, .LC0[rip]
	call	I_Error@PLT
	jmp	.L4
	.p2align 4,,10
	.p2align 3
.L9:
	mov	rsi, r12
	lea	rdi, .LC0[rip]
	call	I_Error@PLT
	jmp	.L3
	.p2align 4,,10
	.p2align 3
.L8:
	mov	rsi, r12
	lea	rdi, .LC0[rip]
	call	I_Error@PLT
	jmp	.L2
.L11:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE0:
	.size	M_ReadFile, .-M_ReadFile
	.comm	PU_STATIC,4,4
	.comm	O_RDONLY,4,4
	.comm	O_BINARY,4,4
	.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_m_misc.c_M_ReadFile.c"
	.text
	.section	.rodata.str1.4,"aMS",%progbits,1
	.align	2
.LC0:
	.ascii	"Couldn't read file %s\000"
	.section	.rodata.cst4,"aM",%progbits,4
	.align	2
.LC1:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	M_ReadFile
	.syntax unified
	.arm
	.fpu softvfp
	.type	M_ReadFile, %function
M_ReadFile:
	@ args = 0, pretend = 0, frame = 8
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, r9, lr}
	ldr	r2, .L12
	ldr	r3, .L12+4
	mov	r7, r1
	ldr	r3, [r3]
	ldr	r1, [r2]
	sub	sp, sp, #12
	orr	r1, r1, r3
	ldr	r3, .L12+8
	ldr	r2, .L12+12
	ldr	r3, [r3]
	str	r3, [sp, #4]
	mov	r3,#0
	mov	r9, r0
	bl	open
	cmn	r0, #1
	mov	r4, r0
	beq	.L8
.L2:
	mov	r1, sp
	mov	r0, r4
	bl	fstat
	cmn	r0, #1
	beq	.L9
.L3:
	ldr	r6, [sp]
	ldr	r3, .L12+16
	mov	r2, #0
	ldr	r1, [r3]
	mov	r0, r6
	bl	Z_Malloc
	mov	r2, r6
	mov	r1, r0
	mov	r5, r0
	mov	r0, r4
	bl	read
	mov	r8, r0
	mov	r0, r4
	bl	close
	cmp	r6, r8
	bgt	.L10
.L4:
	ldr	r3, .L12+8
	str	r5, [r7]
	ldr	r2, [r3]
	ldr	r3, [sp, #4]
	eors	r2, r3, r2
	mov	r3, #0
	bne	.L11
	mov	r0, r6
	add	sp, sp, #12
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, pc}
.L10:
	mov	r1, r9
	ldr	r0, .L12+20
	bl	I_Error
	b	.L4
.L9:
	mov	r1, r9
	ldr	r0, .L12+20
	bl	I_Error
	b	.L3
.L8:
	mov	r1, r9
	ldr	r0, .L12+20
	bl	I_Error
	b	.L2
.L11:
	bl	__stack_chk_fail
.L13:
	.align	2
.L12:
	.word	O_RDONLY
	.word	O_BINARY
	.word	.LC1
	.word	438
	.word	PU_STATIC
	.word	.LC0
	.size	M_ReadFile, .-M_ReadFile
	.comm	PU_STATIC,4,4
	.comm	O_RDONLY,4,4
	.comm	O_BINARY,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
