	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function set_pipe_stdin
_set_pipe_stdin:                        ## @set_pipe_stdin
	.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
	subq	$16, %rsp
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	$0, -40(%rbp)
	movq	_stdin@GOTPCREL(%rip), %r12
	movq	(%r12), %r14
	leaq	-40(%rbp), %rdi
	callq	_open_term
	cmpl	$-1, %eax
	je	LBB0_11
## %bb.1:
	movq	(%r12), %rdi
	callq	_fileno
	movq	%rax, %rdi
	callq	_dup
	movl	%eax, %r15d
	cmpl	$-1, %eax
	jne	LBB0_3
## %bb.2:
	movq	_errno@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_strerror
	leaq	L_.str(%rip), %rdi
	movl	%eax, %esi
	xorl	%eax, %eax
	callq	_FATAL
LBB0_3:
	leaq	L_.str.1(%rip), %rbx
	movl	%r15d, %edi
	movq	%rbx, %rsi
	callq	_fdopen
	movq	%rax, %r14
	movq	-40(%rbp), %rdi
	movq	(%r12), %rdx
	movq	%rbx, %rsi
	callq	_freopen
	testq	%rax, %rax
	jne	LBB0_5
## %bb.4:
	leaq	L_.str.2(%rip), %rdi
	xorl	%eax, %eax
	callq	_FATAL
LBB0_5:
	movq	(%r12), %rdi
	callq	_fileno
	testq	%rax, %rax
	je	LBB0_7
## %bb.6:
	movq	(%r12), %rdi
	callq	_fileno
	movq	%rax, %rdi
	xorl	%esi, %esi
	callq	_dup2
LBB0_7:
	xorl	%eax, %eax
	callq	_add_dash_filename
	movq	_conf@GOTPCREL(%rip), %rax
	cmpq	$0, 8(%rax)
	je	LBB0_9
## %bb.8:
	cmpl	$0, (%rax)
	je	LBB0_11
LBB0_9:
	movq	_F_SETFL@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	movq	_F_GETFL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	%r15d, %edi
	xorl	%edx, %edx
	callq	_fcntl
	movq	_O_NONBLOCK@GOTPCREL(%rip), %rcx
	orl	(%rcx), %eax
	movl	%r15d, %edi
	movl	%ebx, %esi
	movl	%eax, %edx
	callq	_fcntl
	cmpl	$-1, %eax
	jne	LBB0_11
## %bb.10:
	movq	_errno@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_strerror
	leaq	L_.str.3(%rip), %rdi
	movl	%eax, %esi
	xorl	%eax, %eax
	callq	_FATAL
LBB0_11:
	movq	_glog@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%r14, (%rax)
	movq	-40(%rbp), %rdi
	callq	_free
	addq	$16, %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_stdin,8,3                      ## @stdin
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Unable to dup stdin: %s"

	.comm	_errno,4,2                      ## @errno
L_.str.1:                               ## @.str.1
	.asciz	"r"

L_.str.2:                               ## @.str.2
	.asciz	"Unable to open input from TTY"

	.comm	_conf,16,3                      ## @conf
	.comm	_F_SETFL,4,2                    ## @F_SETFL
	.comm	_F_GETFL,4,2                    ## @F_GETFL
	.comm	_O_NONBLOCK,4,2                 ## @O_NONBLOCK
L_.str.3:                               ## @.str.3
	.asciz	"Unable to set fd as non-blocking: %s."

	.comm	_glog,8,3                       ## @glog
	.no_dead_strip	_set_pipe_stdin
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function set_pipe_stdin
_set_pipe_stdin:                        ; @set_pipe_stdin
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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
	str	xzr, [sp, #8]
Lloh0:
	adrp	x22, _stdin@GOTPAGE
Lloh1:
	ldr	x22, [x22, _stdin@GOTPAGEOFF]
	ldr	x19, [x22]
	add	x0, sp, #8
	bl	_open_term
	cmn	w0, #1
	b.eq	LBB0_11
; %bb.1:
	ldr	x0, [x22]
	bl	_fileno
	bl	_dup
	mov	x20, x0
	cmn	w0, #1
	b.ne	LBB0_3
; %bb.2:
Lloh2:
	adrp	x8, _errno@GOTPAGE
Lloh3:
	ldr	x8, [x8, _errno@GOTPAGEOFF]
Lloh4:
	ldr	w0, [x8]
	bl	_strerror
                                        ; kill: def $w0 killed $w0 def $x0
	str	x0, [sp]
Lloh5:
	adrp	x0, l_.str@PAGE
Lloh6:
	add	x0, x0, l_.str@PAGEOFF
	bl	_FATAL
LBB0_3:
Lloh7:
	adrp	x21, l_.str.1@PAGE
Lloh8:
	add	x21, x21, l_.str.1@PAGEOFF
	mov	x0, x20
	mov	x1, x21
	bl	_fdopen
	mov	x19, x0
	ldr	x0, [sp, #8]
	ldr	x2, [x22]
	mov	x1, x21
	bl	_freopen
	cbnz	x0, LBB0_5
; %bb.4:
Lloh9:
	adrp	x0, l_.str.2@PAGE
Lloh10:
	add	x0, x0, l_.str.2@PAGEOFF
	bl	_FATAL
LBB0_5:
	ldr	x0, [x22]
	bl	_fileno
	cbz	x0, LBB0_7
; %bb.6:
	ldr	x0, [x22]
	bl	_fileno
	mov	w1, #0
	bl	_dup2
LBB0_7:
	bl	_add_dash_filename
Lloh11:
	adrp	x8, _conf@GOTPAGE
Lloh12:
	ldr	x8, [x8, _conf@GOTPAGEOFF]
	ldr	x9, [x8, #8]
	cbz	x9, LBB0_9
; %bb.8:
	ldr	w8, [x8]
	cbz	w8, LBB0_11
LBB0_9:
Lloh13:
	adrp	x8, _F_SETFL@GOTPAGE
Lloh14:
	ldr	x8, [x8, _F_SETFL@GOTPAGEOFF]
Lloh15:
	ldr	w21, [x8]
Lloh16:
	adrp	x8, _F_GETFL@GOTPAGE
Lloh17:
	ldr	x8, [x8, _F_GETFL@GOTPAGEOFF]
Lloh18:
	ldr	w1, [x8]
	mov	x0, x20
	mov	w2, #0
	bl	_fcntl
Lloh19:
	adrp	x8, _O_NONBLOCK@GOTPAGE
Lloh20:
	ldr	x8, [x8, _O_NONBLOCK@GOTPAGEOFF]
Lloh21:
	ldr	w8, [x8]
	orr	w2, w8, w0
	mov	x0, x20
	mov	x1, x21
	bl	_fcntl
	cmn	w0, #1
	b.ne	LBB0_11
; %bb.10:
Lloh22:
	adrp	x8, _errno@GOTPAGE
Lloh23:
	ldr	x8, [x8, _errno@GOTPAGEOFF]
Lloh24:
	ldr	w0, [x8]
	bl	_strerror
                                        ; kill: def $w0 killed $w0 def $x0
	str	x0, [sp]
Lloh25:
	adrp	x0, l_.str.3@PAGE
Lloh26:
	add	x0, x0, l_.str.3@PAGEOFF
	bl	_FATAL
LBB0_11:
Lloh27:
	adrp	x8, _glog@GOTPAGE
Lloh28:
	ldr	x8, [x8, _glog@GOTPAGEOFF]
Lloh29:
	ldr	x8, [x8]
	str	x19, [x8]
	ldr	x0, [sp, #8]
	bl	_free
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #64
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpAdd	Lloh7, Lloh8
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpAdd	Lloh25, Lloh26
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.loh AdrpLdrGotLdr	Lloh27, Lloh28, Lloh29
	.cfi_endproc
                                        ; -- End function
	.comm	_stdin,8,3                      ; @stdin
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Unable to dup stdin: %s"

	.comm	_errno,4,2                      ; @errno
l_.str.1:                               ; @.str.1
	.asciz	"r"

l_.str.2:                               ; @.str.2
	.asciz	"Unable to open input from TTY"

	.comm	_conf,16,3                      ; @conf
	.comm	_F_SETFL,4,2                    ; @F_SETFL
	.comm	_F_GETFL,4,2                    ; @F_GETFL
	.comm	_O_NONBLOCK,4,2                 ; @O_NONBLOCK
l_.str.3:                               ; @.str.3
	.asciz	"Unable to set fd as non-blocking: %s."

	.comm	_glog,8,3                       ; @glog
	.no_dead_strip	_set_pipe_stdin
.subsections_via_symbols
