	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_sanitize_stdfds                ## -- Begin function sanitize_stdfds
	.p2align	4, 0x90
_sanitize_stdfds:                       ## @sanitize_stdfds
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	movq	_O_RDWR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str(%rip), %rdi
	xorl	%edx, %edx
	callq	_open
	cmpl	$-1, %eax
	je	LBB0_4
## %bb.1:
	cmpl	$1, %eax
	jg	LBB0_4
	.p2align	4, 0x90
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	movl	%eax, %edi
	callq	_dup
	cmpl	$-1, %eax
	je	LBB0_4
## %bb.3:                               ##   in Loop: Header=BB0_2 Depth=1
	cmpl	$2, %eax
	jl	LBB0_2
LBB0_4:
	cmpl	$-1, %eax
	je	LBB0_7
## %bb.5:
	cmpl	$3, %eax
	jb	LBB0_6
## %bb.8:
	movl	%eax, %edi
	popq	%rbp
	jmp	_close                          ## TAILCALL
LBB0_7:
	leaq	L_.str.1(%rip), %rdi
	callq	__
	movl	%eax, %edi
	popq	%rbp
	jmp	_die_errno                      ## TAILCALL
LBB0_6:
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"/dev/null"

	.comm	_O_RDWR,4,2                     ## @O_RDWR
L_.str.1:                               ## @.str.1
	.asciz	"open /dev/null or dup failed"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_sanitize_stdfds                ; -- Begin function sanitize_stdfds
	.p2align	2
_sanitize_stdfds:                       ; @sanitize_stdfds
	.cfi_startproc
; %bb.0:
	stp	x29, x30, [sp, #-16]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 16
	mov	x29, sp
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
Lloh0:
	adrp	x8, _O_RDWR@GOTPAGE
Lloh1:
	ldr	x8, [x8, _O_RDWR@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
Lloh3:
	adrp	x0, l_.str@PAGE
Lloh4:
	add	x0, x0, l_.str@PAGEOFF
	mov	w2, #0
	bl	_open
	cmn	w0, #1
	ccmp	w0, #1, #0, ne
	b.gt	LBB0_3
LBB0_1:                                 ; =>This Inner Loop Header: Depth=1
	bl	_dup
	cmn	w0, #1
	b.eq	LBB0_3
; %bb.2:                                ;   in Loop: Header=BB0_1 Depth=1
	cmp	w0, #2
	b.lt	LBB0_1
LBB0_3:
	cmn	w0, #1
	b.eq	LBB0_6
; %bb.4:
	cmp	w0, #3
	b.lo	LBB0_7
; %bb.5:
	ldp	x29, x30, [sp], #16             ; 16-byte Folded Reload
	b	_close
LBB0_6:
Lloh5:
	adrp	x0, l_.str.1@PAGE
Lloh6:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	__
	ldp	x29, x30, [sp], #16             ; 16-byte Folded Reload
	b	_die_errno
LBB0_7:
	ldp	x29, x30, [sp], #16             ; 16-byte Folded Reload
	ret
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh5, Lloh6
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"/dev/null"

	.comm	_O_RDWR,4,2                     ; @O_RDWR
l_.str.1:                               ; @.str.1
	.asciz	"open /dev/null or dup failed"

.subsections_via_symbols
