	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function open_input
_open_input:                            ## @open_input
	.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	%rbx
	subq	$24, %rsp
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r14
	movq	%rdi, %rbx
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -32(%rbp)
	testq	%rdi, %rdi
	leaq	L_.str(%rip), %rax
	cmovneq	%rdi, %rax
	movq	_infilename@GOTPCREL(%rip), %r15
	movq	%rax, (%r15)
	leaq	-40(%rbp), %rdi
	callq	_pipe
	xorl	%eax, %eax
	callq	_fork
	movq	_childpid@GOTPCREL(%rip), %rcx
	movl	%eax, (%rcx)
	cmpl	$-1, %eax
	je	LBB0_5
## %bb.1:
	testl	%eax, %eax
	jne	LBB0_6
## %bb.2:
	xorl	%eax, %eax
	callq	_prepend_cpp
	movq	%r14, %rdi
	callq	_addarg
	testq	%rbx, %rbx
	je	LBB0_4
## %bb.3:
	movq	%rbx, %rdi
	callq	_addarg
LBB0_4:
	xorl	%edi, %edi
	callq	_addarg
	movl	$1, %edi
	callq	_close
	movl	-36(%rbp), %edi
	movl	$1, %esi
	callq	_dup2
	movl	-40(%rbp), %edi
	callq	_close
	movq	_arglist@GOTPCREL(%rip), %rbx
	movq	(%rbx), %rsi
	movl	(%rsi), %edi
	callq	_execvp
	movq	(%rbx), %rax
	movl	(%rax), %edx
	leaq	L_.str.1(%rip), %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	callq	_err
LBB0_5:
	leaq	L_.str.2(%rip), %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	callq	_err
LBB0_6:
	movl	-36(%rbp), %edi
	callq	_close
	movl	-40(%rbp), %edi
	leaq	L_.str.3(%rip), %rsi
	callq	_fdopen
	movq	_fin@GOTPCREL(%rip), %rcx
	movq	%rax, (%rcx)
	testq	%rax, %rax
	jne	LBB0_8
## %bb.7:
	movq	(%r15), %rsi
	leaq	L_.str.4(%rip), %rdi
	callq	_warn
	xorl	%eax, %eax
	callq	_crash
LBB0_8:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-32(%rbp), %rax
	jne	LBB0_10
## %bb.9:
	addq	$24, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_10:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"<stdin>"

	.comm	_infilename,8,3                 ## @infilename
	.comm	_childpid,4,2                   ## @childpid
	.comm	_arglist,8,3                    ## @arglist
L_.str.1:                               ## @.str.1
	.asciz	"execvp %s"

L_.str.2:                               ## @.str.2
	.asciz	"fork"

L_.str.3:                               ## @.str.3
	.asciz	"r"

	.comm	_fin,8,3                        ## @fin
L_.str.4:                               ## @.str.4
	.asciz	"%s"

	.no_dead_strip	_open_input
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function open_input
_open_input:                            ; @open_input
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.cfi_def_cfa_offset 80
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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	x20, x1
	mov	x19, x0
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
Lloh3:
	adrp	x9, l_.str@PAGE
Lloh4:
	add	x9, x9, l_.str@PAGEOFF
	str	x8, [sp, #24]
	cmp	x0, #0
	csel	x8, x9, x0, eq
Lloh5:
	adrp	x21, _infilename@GOTPAGE
Lloh6:
	ldr	x21, [x21, _infilename@GOTPAGEOFF]
	str	x8, [x21]
	add	x0, sp, #16
	bl	_pipe
	bl	_fork
Lloh7:
	adrp	x8, _childpid@GOTPAGE
Lloh8:
	ldr	x8, [x8, _childpid@GOTPAGEOFF]
Lloh9:
	str	w0, [x8]
	cmn	w0, #1
	b.eq	LBB0_5
; %bb.1:
	cbnz	w0, LBB0_6
; %bb.2:
	bl	_prepend_cpp
	mov	x0, x20
	bl	_addarg
	cbz	x19, LBB0_4
; %bb.3:
	mov	x0, x19
	bl	_addarg
LBB0_4:
	mov	x0, #0
	bl	_addarg
	mov	w0, #1
	bl	_close
	ldr	w0, [sp, #20]
	mov	w1, #1
	bl	_dup2
	ldr	w0, [sp, #16]
	bl	_close
Lloh10:
	adrp	x19, _arglist@GOTPAGE
Lloh11:
	ldr	x19, [x19, _arglist@GOTPAGEOFF]
	ldr	x1, [x19]
	ldr	w0, [x1]
	bl	_execvp
	ldr	x8, [x19]
	ldr	w8, [x8]
	str	x8, [sp]
Lloh12:
	adrp	x1, l_.str.1@PAGE
Lloh13:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	w0, #1
	bl	_err
LBB0_5:
Lloh14:
	adrp	x1, l_.str.2@PAGE
Lloh15:
	add	x1, x1, l_.str.2@PAGEOFF
	mov	w0, #1
	bl	_err
LBB0_6:
	ldr	w0, [sp, #20]
	bl	_close
	ldr	w0, [sp, #16]
Lloh16:
	adrp	x1, l_.str.3@PAGE
Lloh17:
	add	x1, x1, l_.str.3@PAGEOFF
	bl	_fdopen
Lloh18:
	adrp	x8, _fin@GOTPAGE
Lloh19:
	ldr	x8, [x8, _fin@GOTPAGEOFF]
Lloh20:
	str	x0, [x8]
	cbnz	x0, LBB0_8
; %bb.7:
	ldr	x1, [x21]
Lloh21:
	adrp	x0, l_.str.4@PAGE
Lloh22:
	add	x0, x0, l_.str.4@PAGEOFF
	bl	_warn
	bl	_crash
LBB0_8:
	ldr	x8, [sp, #24]
Lloh23:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh24:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh25:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_10
; %bb.9:
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #80
	ret
LBB0_10:
	bl	___stack_chk_fail
	.loh AdrpLdrGotStr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh12, Lloh13
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpAdd	Lloh14, Lloh15
	.loh AdrpLdrGotStr	Lloh18, Lloh19, Lloh20
	.loh AdrpAdd	Lloh16, Lloh17
	.loh AdrpAdd	Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"<stdin>"

	.comm	_infilename,8,3                 ; @infilename
	.comm	_childpid,4,2                   ; @childpid
	.comm	_arglist,8,3                    ; @arglist
l_.str.1:                               ; @.str.1
	.asciz	"execvp %s"

l_.str.2:                               ; @.str.2
	.asciz	"fork"

l_.str.3:                               ; @.str.3
	.asciz	"r"

	.comm	_fin,8,3                        ; @fin
l_.str.4:                               ; @.str.4
	.asciz	"%s"

	.no_dead_strip	_open_input
.subsections_via_symbols
