	.file	"extr_fix-u-media-header.c_read_to_buf.c"
	.intel_syntax noprefix
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"r"
	.section	.rodata.str1.8,"aMS",@progbits,1
	.align 8
.LC1:
	.string	"could not open \"%s\" for reading"
	.section	.rodata.str1.1
.LC2:
	.string	"unable to read from file \"%s\""
	.text
	.p2align 4
	.type	read_to_buf, @function
read_to_buf:
.LFB0:
	.cfi_startproc
	endbr64
	push	r13
	.cfi_def_cfa_offset 16
	.cfi_offset 13, -16
	push	r12
	.cfi_def_cfa_offset 24
	.cfi_offset 12, -24
	mov	r12, rsi
	lea	rsi, .LC0[rip]
	push	rbp
	.cfi_def_cfa_offset 32
	.cfi_offset 6, -32
	push	rbx
	.cfi_def_cfa_offset 40
	.cfi_offset 3, -40
	mov	rbx, rdi
	sub	rsp, 8
	.cfi_def_cfa_offset 48
	mov	edi, DWORD PTR [rdi]
	mov	r13d, DWORD PTR EXIT_FAILURE[rip]
	call	fopen@PLT
	test	rax, rax
	je	.L8
	mov	esi, DWORD PTR 4[rbx]
	mov	rcx, rax
	mov	edx, 1
	mov	rdi, r12
	mov	QWORD PTR errno[rip], 0
	mov	rbp, rax
	call	fread@PLT
	cmp	QWORD PTR errno[rip], 0
	jne	.L9
	mov	r13d, DWORD PTR EXIT_SUCCESS[rip]
.L5:
.L3:
	endbr64
	mov	rdi, rbp
	call	fclose@PLT
	add	rsp, 8
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	mov	eax, r13d
	pop	rbx
	.cfi_def_cfa_offset 32
	pop	rbp
	.cfi_def_cfa_offset 24
	pop	r12
	.cfi_def_cfa_offset 16
	pop	r13
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L8:
	.cfi_restore_state
	mov	esi, DWORD PTR [rbx]
	lea	rdi, .LC1[rip]
	call	ERRS@PLT
	add	rsp, 8
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	mov	eax, r13d
	pop	rbx
	.cfi_def_cfa_offset 32
	pop	rbp
	.cfi_def_cfa_offset 24
	pop	r12
	.cfi_def_cfa_offset 16
	pop	r13
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L9:
	.cfi_restore_state
	mov	esi, DWORD PTR [rbx]
	lea	rdi, .LC2[rip]
	call	ERRS@PLT
	jmp	.L5
	.cfi_endproc
.LFE0:
	.size	read_to_buf, .-read_to_buf
	.comm	errno,8,8
	.comm	EXIT_SUCCESS,4,4
	.comm	EXIT_FAILURE,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_fix-u-media-header.c_read_to_buf.c"
	.text
	.section	.rodata.str1.4,"aMS",%progbits,1
	.align	2
.LC0:
	.ascii	"r\000"
	.align	2
.LC1:
	.ascii	"could not open \"%s\" for reading\000"
	.align	2
.LC2:
	.ascii	"unable to read from file \"%s\"\000"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	read_to_buf, %function
read_to_buf:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	ldr	r2, .L10
	push	{r4, r5, r6, r7, r8, lr}
	mov	r5, r0
	mov	r6, r1
	ldr	r0, [r0]
	ldr	r1, .L10+4
	ldr	r7, [r2]
	bl	fopen
	subs	r4, r0, #0
	beq	.L8
	mov	ip, #0
	ldr	r8, .L10+8
	mov	r3, r4
	mov	r0, r6
	mov	r2, #1
	ldr	r1, [r5, #4]
	str	ip, [r8]
	bl	fread
	ldr	r3, [r8]
	cmp	r3, #0
	bne	.L9
	ldr	r3, .L10+12
	ldr	r7, [r3]
.L5:
.L3:
	mov	r0, r4
	bl	fclose
	mov	r0, r7
	pop	{r4, r5, r6, r7, r8, pc}
.L8:
	ldr	r1, [r5]
	ldr	r0, .L10+16
	bl	ERRS
	mov	r0, r7
	pop	{r4, r5, r6, r7, r8, pc}
.L9:
	ldr	r1, [r5]
	ldr	r0, .L10+20
	bl	ERRS
	b	.L5
.L11:
	.align	2
.L10:
	.word	EXIT_FAILURE
	.word	.LC0
	.word	errno
	.word	EXIT_SUCCESS
	.word	.LC1
	.word	.LC2
	.size	read_to_buf, .-read_to_buf
	.comm	errno,4,4
	.comm	EXIT_SUCCESS,4,4
	.comm	EXIT_FAILURE,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
