	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_setinputfile                   ## -- Begin function setinputfile
	.p2align	4, 0x90
_setinputfile:                          ## @setinputfile
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r15
	pushq	%r14
	pushq	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%esi, %r14d
	movq	%rdi, %r15
	movq	_O_RDONLY@GOTPCREL(%rip), %rax
	movq	_O_CLOEXEC@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	orl	(%rax), %esi
	callq	_open
	movl	%eax, %ebx
	testl	%eax, %eax
	js	LBB0_1
## %bb.4:
	cmpl	$9, %ebx
	jbe	LBB0_2
## %bb.5:
	movl	%ebx, %r15d
	jmp	LBB0_6
LBB0_1:
	movq	_errno@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	_ENOENT@GOTPCREL(%rip), %rax
	cmpl	(%rax), %edi
	sete	%al
	movq	_ENOTDIR@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %edi
	sete	%cl
	orb	%al, %cl
	movzbl	%cl, %r12d
	orl	$126, %r12d
	callq	_strerror
	leaq	L_.str(%rip), %rsi
	movl	%r12d, %edi
	movq	%r15, %rdx
	movl	%eax, %ecx
	callq	_errorwithstatus
LBB0_2:
	movq	_F_DUPFD_CLOEXEC@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	%ebx, %edi
	movl	$10, %edx
	callq	_fcntl
	movl	%eax, %r15d
	movl	%ebx, %edi
	callq	_close
	testl	%r15d, %r15d
	jns	LBB0_6
## %bb.3:
	leaq	L_.str.1(%rip), %rdi
	callq	_error
LBB0_6:
	movl	%r15d, %edi
	movl	%r14d, %esi
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_setinputfd                     ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_INTOFF,4,2                     ## @INTOFF
	.comm	_O_RDONLY,4,2                   ## @O_RDONLY
	.comm	_O_CLOEXEC,4,2                  ## @O_CLOEXEC
	.comm	_errno,4,2                      ## @errno
	.comm	_ENOENT,4,2                     ## @ENOENT
	.comm	_ENOTDIR,4,2                    ## @ENOTDIR
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"cannot open %s: %s"

	.comm	_F_DUPFD_CLOEXEC,4,2            ## @F_DUPFD_CLOEXEC
L_.str.1:                               ## @.str.1
	.asciz	"Out of file descriptors"

	.comm	_INTON,4,2                      ## @INTON
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_setinputfile                   ; -- Begin function setinputfile
	.p2align	2
_setinputfile:                          ; @setinputfile
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	.cfi_offset w21, -40
	.cfi_offset w22, -48
	mov	x19, x1
	mov	x21, x0
Lloh0:
	adrp	x8, _O_RDONLY@GOTPAGE
Lloh1:
	ldr	x8, [x8, _O_RDONLY@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
Lloh3:
	adrp	x9, _O_CLOEXEC@GOTPAGE
Lloh4:
	ldr	x9, [x9, _O_CLOEXEC@GOTPAGEOFF]
Lloh5:
	ldr	w9, [x9]
	orr	w1, w9, w8
	bl	_open
	mov	x20, x0
	tbnz	w0, #31, LBB0_3
; %bb.1:
	cmp	w20, #9
	b.ls	LBB0_4
; %bb.2:
	mov	x21, x20
	b	LBB0_6
LBB0_3:
Lloh6:
	adrp	x8, _errno@GOTPAGE
Lloh7:
	ldr	x8, [x8, _errno@GOTPAGEOFF]
Lloh8:
	ldr	w0, [x8]
Lloh9:
	adrp	x8, _ENOENT@GOTPAGE
Lloh10:
	ldr	x8, [x8, _ENOENT@GOTPAGEOFF]
Lloh11:
	adrp	x9, _ENOTDIR@GOTPAGE
Lloh12:
	ldr	x9, [x9, _ENOTDIR@GOTPAGEOFF]
Lloh13:
	ldr	w8, [x8]
Lloh14:
	ldr	w9, [x9]
	cmp	w0, w9
	ccmp	w0, w8, #4, ne
	mov	w8, #126
	cinc	w22, w8, eq
	bl	_strerror
	mov	x3, x0
Lloh15:
	adrp	x1, l_.str@PAGE
Lloh16:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x22
	mov	x2, x21
	bl	_errorwithstatus
LBB0_4:
Lloh17:
	adrp	x8, _F_DUPFD_CLOEXEC@GOTPAGE
Lloh18:
	ldr	x8, [x8, _F_DUPFD_CLOEXEC@GOTPAGEOFF]
Lloh19:
	ldr	w1, [x8]
	mov	x0, x20
	mov	w2, #10
	bl	_fcntl
	mov	x21, x0
	mov	x0, x20
	bl	_close
	tbz	w21, #31, LBB0_6
; %bb.5:
Lloh20:
	adrp	x0, l_.str.1@PAGE
Lloh21:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_error
LBB0_6:
	mov	x0, x21
	mov	x1, x19
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	b	_setinputfd
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh14
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh13
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpAdd	Lloh20, Lloh21
	.cfi_endproc
                                        ; -- End function
	.comm	_INTOFF,4,2                     ; @INTOFF
	.comm	_O_RDONLY,4,2                   ; @O_RDONLY
	.comm	_O_CLOEXEC,4,2                  ; @O_CLOEXEC
	.comm	_errno,4,2                      ; @errno
	.comm	_ENOENT,4,2                     ; @ENOENT
	.comm	_ENOTDIR,4,2                    ; @ENOTDIR
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"cannot open %s: %s"

	.comm	_F_DUPFD_CLOEXEC,4,2            ; @F_DUPFD_CLOEXEC
l_.str.1:                               ; @.str.1
	.asciz	"Out of file descriptors"

	.comm	_INTON,4,2                      ; @INTON
.subsections_via_symbols
