	.file	"extr_setup.c_sanitize_stdfds.c"
	.intel_syntax noprefix
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"/dev/null"
.LC1:
	.string	"open /dev/null or dup failed"
	.text
	.p2align 4
	.globl	sanitize_stdfds
	.type	sanitize_stdfds, @function
sanitize_stdfds:
.LFB0:
	.cfi_startproc
	endbr64
	sub	rsp, 8
	.cfi_def_cfa_offset 16
	mov	esi, DWORD PTR O_RDWR[rip]
	lea	rdi, .LC0[rip]
	xor	edx, edx
	call	open@PLT
	mov	edi, eax
	cmp	eax, 1
	jg	.L2
	cmp	eax, -1
	je	.L17
	.p2align 4,,10
	.p2align 3
.L3:
	call	dup@PLT
	mov	edi, eax
	cmp	eax, -1
	je	.L17
	cmp	eax, 1
	jle	.L3
.L2:
	cmp	edi, -1
	je	.L17
	cmp	edi, 2
	jg	.L20
	add	rsp, 8
	.cfi_remember_state
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L20:
	.cfi_restore_state
	add	rsp, 8
	.cfi_remember_state
	.cfi_def_cfa_offset 8
	jmp	close@PLT
	.p2align 4,,10
	.p2align 3
.L17:
	.cfi_restore_state
	lea	rdi, .LC1[rip]
	call	_@PLT
	add	rsp, 8
	.cfi_def_cfa_offset 8
	mov	edi, eax
	jmp	die_errno@PLT
	.cfi_endproc
.LFE0:
	.size	sanitize_stdfds, .-sanitize_stdfds
	.comm	O_RDWR,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_setup.c_sanitize_stdfds.c"
	.text
	.section	.rodata.str1.4,"aMS",%progbits,1
	.align	2
.LC0:
	.ascii	"/dev/null\000"
	.align	2
.LC1:
	.ascii	"open /dev/null or dup failed\000"
	.text
	.align	2
	.global	sanitize_stdfds
	.syntax unified
	.arm
	.fpu softvfp
	.type	sanitize_stdfds, %function
sanitize_stdfds:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	ldr	r3, .L15
	mov	r2, #0
	push	{r4, lr}
	ldr	r1, [r3]
	ldr	r0, .L15+4
	bl	open
	b	.L11
.L13:
	bl	dup
.L11:
	cmp	r0, #1
	movgt	r3, #0
	movle	r3, #1
	cmn	r0, #1
	moveq	r3, #0
	cmp	r3, #0
	bne	.L13
	cmn	r0, #1
	beq	.L14
	cmp	r0, #2
	pople	{r4, pc}
	pop	{r4, lr}
	b	close
.L14:
	ldr	r0, .L15+8
	bl	_
	pop	{r4, lr}
	b	die_errno
.L16:
	.align	2
.L15:
	.word	O_RDWR
	.word	.LC0
	.word	.LC1
	.size	sanitize_stdfds, .-sanitize_stdfds
	.comm	O_RDWR,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
