	.file	"extr_genfile.c_read_binary_file.c"
	.intel_syntax noprefix
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"could not stat file \"%s\": %m"
.LC1:
	.string	"requested length too large"
	.section	.rodata.str1.8,"aMS",@progbits,1
	.align 8
.LC2:
	.string	"could not open file \"%s\" for reading: %m"
	.align 8
.LC3:
	.string	"could not seek in file \"%s\": %m"
	.section	.rodata.str1.1
.LC4:
	.string	"could not read file \"%s\": %m"
	.text
	.p2align 4
	.type	read_binary_file, @function
read_binary_file:
.LFB0:
	.cfi_startproc
	endbr64
	push	r14
	.cfi_def_cfa_offset 16
	.cfi_offset 14, -16
	mov	r14, rdi
	push	r13
	.cfi_def_cfa_offset 24
	.cfi_offset 13, -24
	mov	r13, rsi
	push	r12
	.cfi_def_cfa_offset 32
	.cfi_offset 12, -32
	mov	r12, rdx
	push	rbp
	.cfi_def_cfa_offset 40
	.cfi_offset 6, -40
	push	rbx
	.cfi_def_cfa_offset 48
	.cfi_offset 3, -48
	mov	ebx, ecx
	sub	rsp, 16
	.cfi_def_cfa_offset 64
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR 8[rsp], rax
	xor	eax, eax
	test	rdx, rdx
	js	.L30
.L2:
	mov	rax, QWORD PTR MaxAllocSize[rip]
	sub	rax, QWORD PTR VARHDRSZ[rip]
	cmp	rax, r12
	jl	.L31
.L7:
	mov	esi, DWORD PTR PG_BINARY_R[rip]
	mov	rdi, r14
	call	AllocateFile@PLT
	mov	rbp, rax
	test	rax, rax
	je	.L32
.L8:
	test	r13, r13
	mov	edx, DWORD PTR SEEK_SET[rip]
	mov	esi, r13d
	mov	rdi, rbp
	cmovs	edx, DWORD PTR SEEK_END[rip]
	call	fseeko@PLT
	test	rax, rax
	jne	.L33
.L12:
	mov	rdi, QWORD PTR VARHDRSZ[rip]
	add	rdi, r12
	call	palloc@PLT
	mov	rdi, rax
	mov	r13, rax
	call	VARDATA@PLT
	mov	rdx, r12
	mov	rcx, rbp
	mov	esi, 1
	mov	edi, eax
	call	fread@PLT
	mov	rdi, rbp
	mov	r12, rax
	call	ferror@PLT
	test	rax, rax
	jne	.L34
.L13:
	mov	rsi, QWORD PTR VARHDRSZ[rip]
	mov	rdi, r13
	add	rsi, r12
	call	SET_VARSIZE@PLT
	mov	rdi, rbp
	call	FreeFile@PLT
.L1:
	mov	rax, QWORD PTR 8[rsp]
	xor	rax, QWORD PTR fs:40
	jne	.L35
	add	rsp, 16
	.cfi_remember_state
	.cfi_def_cfa_offset 48
	mov	rax, r13
	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
	.p2align 4,,10
	.p2align 3
.L30:
	.cfi_restore_state
	test	rsi, rsi
	jns	.L3
	mov	r12, rsi
	neg	r12
	jmp	.L2
	.p2align 4,,10
	.p2align 3
.L31:
	mov	edi, DWORD PTR ERRCODE_INVALID_PARAMETER_VALUE[rip]
	call	errcode@PLT
	lea	rdi, .LC1[rip]
	xor	eax, eax
	call	errmsg@PLT
	mov	edi, DWORD PTR ERROR[rip]
	mov	esi, eax
	call	ereport@PLT
	jmp	.L7
	.p2align 4,,10
	.p2align 3
.L34:
	xor	eax, eax
	call	errcode_for_file_access@PLT
	mov	rsi, r14
	lea	rdi, .LC4[rip]
	xor	eax, eax
	call	errmsg@PLT
	mov	edi, DWORD PTR ERROR[rip]
	mov	esi, eax
	call	ereport@PLT
	jmp	.L13
	.p2align 4,,10
	.p2align 3
.L33:
	xor	eax, eax
	call	errcode_for_file_access@PLT
	mov	rsi, r14
	lea	rdi, .LC3[rip]
	xor	eax, eax
	call	errmsg@PLT
	mov	edi, DWORD PTR ERROR[rip]
	mov	esi, eax
	call	ereport@PLT
	jmp	.L12
	.p2align 4,,10
	.p2align 3
.L32:
	test	ebx, ebx
	je	.L9
	mov	rax, QWORD PTR ENOENT[rip]
	cmp	QWORD PTR errno[rip], rax
	je	.L15
.L9:
	xor	eax, eax
	call	errcode_for_file_access@PLT
	mov	rsi, r14
	lea	rdi, .LC2[rip]
	xor	eax, eax
	call	errmsg@PLT
	mov	edi, DWORD PTR ERROR[rip]
	mov	esi, eax
	call	ereport@PLT
	jmp	.L8
	.p2align 4,,10
	.p2align 3
.L3:
	mov	rsi, rsp
	call	stat@PLT
	test	rax, rax
	js	.L36
.L4:
	mov	r12, QWORD PTR [rsp]
	sub	r12, r13
	jmp	.L2
	.p2align 4,,10
	.p2align 3
.L36:
	test	ebx, ebx
	je	.L5
	mov	rax, QWORD PTR ENOENT[rip]
	cmp	QWORD PTR errno[rip], rax
	jne	.L5
	.p2align 4,,10
	.p2align 3
.L15:
	xor	r13d, r13d
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L5:
	xor	eax, eax
	call	errcode_for_file_access@PLT
	mov	rsi, r14
	lea	rdi, .LC0[rip]
	xor	eax, eax
	call	errmsg@PLT
	mov	edi, DWORD PTR ERROR[rip]
	mov	esi, eax
	call	ereport@PLT
	jmp	.L4
.L35:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE0:
	.size	read_binary_file, .-read_binary_file
	.comm	errno,8,8
	.comm	VARHDRSZ,8,8
	.comm	SEEK_SET,4,4
	.comm	SEEK_END,4,4
	.comm	PG_BINARY_R,4,4
	.comm	MaxAllocSize,8,8
	.comm	ERROR,4,4
	.comm	ERRCODE_INVALID_PARAMETER_VALUE,4,4
	.comm	ENOENT,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_genfile.c_read_binary_file.c"
	.text
	.section	.rodata.str1.4,"aMS",%progbits,1
	.align	2
.LC0:
	.ascii	"could not stat file \"%s\": %m\000"
	.align	2
.LC1:
	.ascii	"requested length too large\000"
	.align	2
.LC2:
	.ascii	"could not open file \"%s\" for reading: %m\000"
	.align	2
.LC3:
	.ascii	"could not seek in file \"%s\": %m\000"
	.align	2
.LC4:
	.ascii	"could not read file \"%s\": %m\000"
	.section	.rodata.cst4,"aM",%progbits,4
	.align	2
.LC5:
	.word	__stack_chk_guard
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	read_binary_file, %function
read_binary_file:
	@ args = 0, pretend = 0, frame = 8
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, r9, lr}
	mov	r5, r3
	ldr	r3, .L37
	sub	sp, sp, #12
	subs	r6, r2, #0
	mov	r9, r1
	ldr	r3, [r3]
	str	r3, [sp, #4]
	mov	r3,#0
	mov	r7, r0
	blt	.L30
.L2:
	ldr	r3, .L37+4
	ldr	r8, .L37+8
	ldr	ip, [r3]
	ldr	r3, [r8]
	sub	ip, ip, r3
	cmp	ip, r6
	blt	.L31
.L7:
	ldr	r3, .L37+12
	mov	r0, r7
	ldr	r1, [r3]
	bl	AllocateFile
	subs	r4, r0, #0
	beq	.L32
.L8:
	cmp	r9, #0
	ldrge	r3, .L37+16
	ldrlt	r3, .L37+20
	mov	r1, r9
	mov	r0, r4
	ldr	r2, [r3]
	bl	fseeko
	cmp	r0, #0
	bne	.L33
.L12:
	ldr	r0, [r8]
	add	r0, r6, r0
	bl	palloc
	mov	r5, r0
	bl	VARDATA
	mov	r2, r6
	mov	r3, r4
	mov	r1, #1
	bl	fread
	mov	r6, r0
	mov	r0, r4
	bl	ferror
	cmp	r0, #0
	bne	.L34
.L13:
	ldr	r1, [r8]
	mov	r0, r5
	add	r1, r6, r1
	bl	SET_VARSIZE
	mov	r0, r4
	bl	FreeFile
.L1:
	ldr	r3, .L37
	ldr	r2, [r3]
	ldr	r3, [sp, #4]
	eors	r2, r3, r2
	mov	r3, #0
	bne	.L35
	mov	r0, r5
	add	sp, sp, #12
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, pc}
.L30:
	cmp	r1, #0
	rsblt	r6, r1, #0
	blt	.L2
	mov	r1, sp
	bl	stat
	cmp	r0, #0
	blt	.L36
.L4:
	ldr	r2, [sp]
	sub	r6, r2, r9
	b	.L2
.L31:
	ldr	r2, .L37+24
	ldr	r3, .L37+28
	ldr	r0, [r2]
	ldr	r4, [r3]
	bl	errcode
	ldr	r0, .L37+32
	bl	errmsg
	mov	r1, r0
	mov	r0, r4
	bl	ereport
	b	.L7
.L34:
	ldr	r3, .L37+28
	ldr	r9, [r3]
	bl	errcode_for_file_access
	mov	r1, r7
	ldr	r0, .L37+36
	bl	errmsg
	mov	r1, r0
	mov	r0, r9
	bl	ereport
	b	.L13
.L33:
	ldr	r3, .L37+28
	ldr	r5, [r3]
	bl	errcode_for_file_access
	mov	r1, r7
	ldr	r0, .L37+40
	bl	errmsg
	mov	r1, r0
	mov	r0, r5
	bl	ereport
	b	.L12
.L32:
	cmp	r5, #0
	beq	.L9
	ldr	r2, .L37+44
	ldr	r3, .L37+48
	ldr	r2, [r2]
	ldr	r3, [r3]
	cmp	r2, r3
	beq	.L15
.L9:
	ldr	r3, .L37+28
	ldr	r5, [r3]
	bl	errcode_for_file_access
	mov	r1, r7
	ldr	r0, .L37+52
	bl	errmsg
	mov	r1, r0
	mov	r0, r5
	bl	ereport
	b	.L8
.L36:
	cmp	r5, #0
	beq	.L5
	ldr	r2, .L37+44
	ldr	r3, .L37+48
	ldr	r2, [r2]
	ldr	r3, [r3]
	cmp	r2, r3
	moveq	r5, #0
	beq	.L1
.L5:
	ldr	r3, .L37+28
	ldr	r4, [r3]
	bl	errcode_for_file_access
	mov	r1, r7
	ldr	r0, .L37+56
	bl	errmsg
	mov	r1, r0
	mov	r0, r4
	bl	ereport
	b	.L4
.L15:
	mov	r5, r4
	b	.L1
.L35:
	bl	__stack_chk_fail
.L38:
	.align	2
.L37:
	.word	.LC5
	.word	MaxAllocSize
	.word	VARHDRSZ
	.word	PG_BINARY_R
	.word	SEEK_SET
	.word	SEEK_END
	.word	ERRCODE_INVALID_PARAMETER_VALUE
	.word	ERROR
	.word	.LC1
	.word	.LC4
	.word	.LC3
	.word	errno
	.word	ENOENT
	.word	.LC2
	.word	.LC0
	.size	read_binary_file, .-read_binary_file
	.comm	errno,4,4
	.comm	VARHDRSZ,4,4
	.comm	SEEK_SET,4,4
	.comm	SEEK_END,4,4
	.comm	PG_BINARY_R,4,4
	.comm	MaxAllocSize,4,4
	.comm	ERROR,4,4
	.comm	ERRCODE_INVALID_PARAMETER_VALUE,4,4
	.comm	ENOENT,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
