	.file	"extr_mkmylofw.c_get_file_crc.c"
	.intel_syntax noprefix
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"r"
.LC1:
	.string	"unable to open file %s"
.LC2:
	.string	"unable to read from file %s"
	.text
	.p2align 4
	.globl	get_file_crc
	.type	get_file_crc, @function
get_file_crc:
.LFB0:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	push	r15
	push	r14
	push	r13
	push	r12
	push	rbx
	sub	rsp, 40
	.cfi_offset 15, -24
	.cfi_offset 14, -32
	.cfi_offset 13, -40
	.cfi_offset 12, -48
	.cfi_offset 3, -56
	mov	QWORD PTR -72[rbp], rdi
	movsx	r8, DWORD PTR FILE_BUF_LEN[rip]
	mov	rcx, rsp
	lea	r14, 0[0+r8*4]
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -56[rbp], rax
	xor	eax, eax
	lea	rax, 15[r14]
	mov	rdx, rax
	and	rax, -4096
	sub	rcx, rax
	and	rdx, -16
	mov	rax, rcx
	cmp	rsp, rax
	je	.L3
.L24:
	sub	rsp, 4096
	or	QWORD PTR 4088[rsp], 0
	cmp	rsp, rax
	jne	.L24
.L3:
	and	edx, 4095
	sub	rsp, rdx
	test	rdx, rdx
	jne	.L25
.L4:
	mov	rax, QWORD PTR -72[rbp]
	mov	r12, rsp
	mov	r15d, DWORD PTR [rax]
	and	r15d, DWORD PTR BLOCK_FLAG_HAVEHDR[rip]
	jne	.L26
.L1:
	mov	rax, QWORD PTR -56[rbp]
	xor	rax, QWORD PTR fs:40
	jne	.L27
	lea	rsp, -40[rbp]
	mov	eax, r15d
	pop	rbx
	pop	r12
	pop	r13
	pop	r14
	pop	r15
	pop	rbp
	.cfi_remember_state
	.cfi_def_cfa 7, 8
	ret
	.p2align 4,,10
	.p2align 3
.L26:
	.cfi_restore_state
	mov	edi, DWORD PTR 20[rax]
	lea	rsi, .LC0[rip]
	mov	QWORD PTR errno[rip], 0
	call	fopen@PLT
	cmp	QWORD PTR errno[rip], 0
	mov	r13, rax
	mov	rax, QWORD PTR -72[rbp]
	jne	.L28
	mov	rbx, QWORD PTR 8[rax]
	mov	DWORD PTR 16[rax], 0
	test	rbx, rbx
	je	.L7
	lea	r15, 16[rax]
	jmp	.L10
	.p2align 4,,10
	.p2align 3
.L8:
	mov	rdx, r15
	mov	rsi, r14
	mov	rdi, r12
	call	update_crc@PLT
	sub	rbx, r14
	je	.L7
.L10:
	cmp	r14, rbx
	mov	rcx, r13
	mov	edx, 1
	mov	rdi, r12
	mov	QWORD PTR errno[rip], 0
	cmova	r14, rbx
	mov	rsi, r14
	call	fread@PLT
	cmp	QWORD PTR errno[rip], 0
	je	.L8
	mov	rax, QWORD PTR -72[rbp]
	lea	rsi, .LC2[rip]
	mov	edi, 1
	mov	r15d, -1
	mov	edx, DWORD PTR 20[rax]
	call	errmsg@PLT
.L9:
.L5:
	endbr64
	mov	rdi, r13
	call	fclose@PLT
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L7:
	xor	r15d, r15d
	jmp	.L9
	.p2align 4,,10
	.p2align 3
.L25:
	or	QWORD PTR -8[rsp+rdx], 0
	jmp	.L4
.L28:
	mov	edx, DWORD PTR 20[rax]
	lea	rsi, .LC1[rip]
	mov	edi, 1
	mov	r15d, -1
	call	errmsg@PLT
	jmp	.L1
.L27:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE0:
	.size	get_file_crc, .-get_file_crc
	.comm	errno,8,8
	.comm	FILE_BUF_LEN,4,4
	.comm	BLOCK_FLAG_HAVEHDR,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_mkmylofw.c_get_file_crc.c"
	.text
	.section	.rodata.str1.4,"aMS",%progbits,1
	.align	2
.LC0:
	.ascii	"r\000"
	.align	2
.LC1:
	.ascii	"unable to open file %s\000"
	.align	2
.LC2:
	.ascii	"unable to read from file %s\000"
	.section	.rodata.cst4,"aM",%progbits,4
	.align	2
.LC3:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	get_file_crc
	.syntax unified
	.arm
	.fpu softvfp
	.type	get_file_crc, %function
get_file_crc:
	@ args = 0, pretend = 0, frame = 16
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, r9, r10, fp, lr}
	add	fp, sp, #32
	sub	sp, sp, #20
	ldr	r3, .L21
	ldr	r2, .L21+4
	ldr	r4, [r3]
	ldr	r1, [r0]
	lsl	r4, r4, #2
	ldr	r2, [r2]
	add	r3, r4, #7
	bic	r3, r3, #7
	sub	sp, sp, r3
	ands	r3, r1, r2
	str	r3, [fp, #-48]
	ldr	r3, .L21+8
	ldr	r3, [r3]
	str	r3, [fp, #-40]
	mov	r3,#0
	bne	.L18
.L1:
	ldr	r3, .L21+8
	ldr	r2, [r3]
	ldr	r3, [fp, #-40]
	eors	r2, r3, r2
	mov	r3, #0
	bne	.L19
	ldr	r0, [fp, #-48]
	sub	sp, fp, #32
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, r10, fp, pc}
.L18:
	mov	r3, #0
	ldr	r6, .L21+12
	mov	r8, r0
	ldr	r1, .L21+16
	ldr	r0, [r0, #12]
	str	r3, [r6]
	bl	fopen
	ldr	r3, [r6]
	mov	r9, r0
	cmp	r3, #0
	str	r3, [fp, #-48]
	bne	.L20
	ldr	r5, [r8, #4]
	ldr	r3, [fp, #-48]
	cmp	r5, #0
	str	r3, [r8, #8]
	beq	.L6
	mov	r7, sp
	add	r10, r8, #8
	b	.L7
.L5:
	mov	r2, r10
	mov	r1, r4
	mov	r0, r7
	bl	update_crc
	subs	r5, r5, r4
	beq	.L6
.L7:
	cmp	r4, r5
	movcs	r4, r5
	mov	ip, #0
	mov	r3, r9
	mov	r1, r4
	mov	r2, #1
	mov	r0, r7
	str	ip, [r6]
	bl	fread
	ldr	r3, [r6]
	cmp	r3, #0
	beq	.L5
	mov	r0, #1
	ldr	r2, [r8, #12]
	ldr	r1, .L21+20
	bl	errmsg
	mvn	r3, #0
	str	r3, [fp, #-48]
.L6:
.L2:
	mov	r0, r9
	bl	fclose
	b	.L1
.L20:
	mov	r0, #1
	ldr	r2, [r8, #12]
	ldr	r1, .L21+24
	bl	errmsg
	mvn	r3, #0
	str	r3, [fp, #-48]
	b	.L1
.L19:
	bl	__stack_chk_fail
.L22:
	.align	2
.L21:
	.word	FILE_BUF_LEN
	.word	BLOCK_FLAG_HAVEHDR
	.word	.LC3
	.word	errno
	.word	.LC0
	.word	.LC2
	.word	.LC1
	.size	get_file_crc, .-get_file_crc
	.comm	errno,4,4
	.comm	FILE_BUF_LEN,4,4
	.comm	BLOCK_FLAG_HAVEHDR,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
