	.file	"extr_fd.c_BasicOpenFilePerm.c"
	.intel_syntax noprefix
	.text
	.section	.rodata.str1.8,"aMS",@progbits,1
	.align 8
.LC0:
	.string	"out of file descriptors: %m; release and retry"
	.text
	.p2align 4
	.globl	BasicOpenFilePerm
	.type	BasicOpenFilePerm, @function
BasicOpenFilePerm:
.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
	lea	r13, .LC0[rip]
	push	r12
	.cfi_def_cfa_offset 32
	.cfi_offset 12, -32
	mov	r12, rdi
	push	rbp
	.cfi_def_cfa_offset 40
	.cfi_offset 6, -40
	mov	ebp, esi
	push	rbx
	.cfi_def_cfa_offset 48
	.cfi_offset 3, -48
	mov	ebx, edx
	jmp	.L2
	.p2align 4,,10
	.p2align 3
.L10:
	mov	r14d, DWORD PTR errno[rip]
	cmp	r14d, DWORD PTR EMFILE[rip]
	je	.L4
	cmp	r14d, DWORD PTR ENFILE[rip]
	jne	.L5
.L4:
	mov	edi, DWORD PTR ERRCODE_INSUFFICIENT_RESOURCES[rip]
	call	errcode@PLT
	mov	rdi, r13
	call	errmsg@PLT
	mov	edi, DWORD PTR LOG[rip]
	mov	esi, eax
	call	ereport@PLT
	xor	eax, eax
	mov	DWORD PTR errno[rip], 0
	call	ReleaseLruFile@PLT
	test	rax, rax
	je	.L9
.L2:
	mov	edx, ebx
	mov	esi, ebp
	mov	rdi, r12
	call	open@PLT
	test	eax, eax
	js	.L10
	pop	rbx
	.cfi_remember_state
	.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
.L9:
	.cfi_restore_state
	pop	rbx
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	mov	eax, -1
	pop	rbp
	.cfi_def_cfa_offset 32
	mov	DWORD PTR errno[rip], r14d
	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
.L5:
	.cfi_restore_state
	pop	rbx
	.cfi_def_cfa_offset 40
	mov	eax, -1
	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
	.cfi_endproc
.LFE0:
	.size	BasicOpenFilePerm, .-BasicOpenFilePerm
	.comm	errno,4,4
	.comm	LOG,4,4
	.comm	ERRCODE_INSUFFICIENT_RESOURCES,4,4
	.comm	ENFILE,4,4
	.comm	EMFILE,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_fd.c_BasicOpenFilePerm.c"
	.text
	.section	.rodata.str1.4,"aMS",%progbits,1
	.align	2
.LC0:
	.ascii	"out of file descriptors: %m; release and retry\000"
	.text
	.align	2
	.global	BasicOpenFilePerm
	.syntax unified
	.arm
	.fpu softvfp
	.type	BasicOpenFilePerm, %function
BasicOpenFilePerm:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r3, r4, r5, r6, r7, r8, r9, r10, fp, lr}
	mov	r7, r0
	mov	r6, r1
	mov	r5, r2
	ldr	r4, .L9
	ldr	r8, .L9+4
	ldr	r9, .L9+8
.L2:
	mov	r2, r5
	mov	r1, r6
	mov	r0, r7
	bl	open
	cmp	r0, #0
	popge	{r3, r4, r5, r6, r7, r8, r9, r10, fp, pc}
	ldr	r10, [r4]
	ldr	r2, [r8]
	cmp	r10, r2
	beq	.L4
	ldr	r3, .L9+12
	ldr	r2, [r3]
	cmp	r10, r2
	bne	.L5
.L4:
	ldr	r3, .L9+16
	ldr	r0, [r3]
	ldr	r3, .L9+20
	ldr	fp, [r3]
	bl	errcode
	mov	r0, r9
	bl	errmsg
	mov	r1, r0
	mov	r0, fp
	bl	ereport
	mov	r2, #0
	str	r2, [r4]
	bl	ReleaseLruFile
	cmp	r0, #0
	bne	.L2
	mvn	r0, #0
	str	r10, [r4]
	pop	{r3, r4, r5, r6, r7, r8, r9, r10, fp, pc}
.L5:
	mvn	r0, #0
	pop	{r3, r4, r5, r6, r7, r8, r9, r10, fp, pc}
.L10:
	.align	2
.L9:
	.word	errno
	.word	EMFILE
	.word	.LC0
	.word	ENFILE
	.word	ERRCODE_INSUFFICIENT_RESOURCES
	.word	LOG
	.size	BasicOpenFilePerm, .-BasicOpenFilePerm
	.comm	errno,4,4
	.comm	LOG,4,4
	.comm	ERRCODE_INSUFFICIENT_RESOURCES,4,4
	.comm	ENFILE,4,4
	.comm	EMFILE,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
