	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_pex_input_pipe                 ## -- Begin function pex_input_pipe
	.p2align	4, 0x90
_pex_input_pipe:                        ## @pex_input_pipe
	.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	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -40(%rbp)
	cmpq	$0, (%rdi)
	jle	LBB0_1
LBB0_9:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movq	_errno@GOTPCREL(%rip), %rcx
	movl	%eax, (%rcx)
LBB0_10:
	xorl	%eax, %eax
LBB0_11:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	cmpq	-40(%rbp), %rcx
	jne	LBB0_13
## %bb.12:
	addq	$16, %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_1:
	movq	%rdi, %rbx
	movq	_PEX_USE_PIPES@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, 8(%rdi)
	je	LBB0_9
## %bb.2:
	movl	12(%rbx), %eax
	testl	%eax, %eax
	js	LBB0_4
## %bb.3:
	movq	_STDIN_FILE_NO@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %eax
	jne	LBB0_9
LBB0_4:
	cmpq	$0, 24(%rbx)
	jne	LBB0_9
## %bb.5:
	movq	16(%rbx), %rax
	xorl	%r14d, %r14d
	testl	%esi, %esi
	setne	%r14b
	leaq	-48(%rbp), %rsi
	movq	%rbx, %rdi
	movl	%r14d, %edx
	callq	*(%rax)
	testq	%rax, %rax
	js	LBB0_10
## %bb.6:
	movq	16(%rbx), %rax
	movq	_WRITE_PORT@GOTPCREL(%rip), %r15
	movq	(%r15), %rcx
	movl	-48(%rbp,%rcx,4), %esi
	movq	%rbx, %rdi
	movl	%r14d, %edx
	callq	*16(%rax)
	testq	%rax, %rax
	je	LBB0_7
## %bb.8:
	movq	_READ_PORT@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	movl	-48(%rbp,%rcx,4), %ecx
	movl	%ecx, 12(%rbx)
	jmp	LBB0_11
LBB0_7:
	movq	_errno@GOTPCREL(%rip), %r14
	movl	(%r14), %r12d
	movq	16(%rbx), %rax
	movq	_READ_PORT@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	movl	-48(%rbp,%rcx,4), %esi
	movq	%rbx, %rdi
	callq	*8(%rax)
	movq	16(%rbx), %rax
	movq	(%r15), %rcx
	movl	-48(%rbp,%rcx,4), %esi
	movq	%rbx, %rdi
	callq	*8(%rax)
	movl	%r12d, (%r14)
	jmp	LBB0_10
LBB0_13:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_PEX_USE_PIPES,4,2              ## @PEX_USE_PIPES
	.comm	_STDIN_FILE_NO,4,2              ## @STDIN_FILE_NO
	.comm	_WRITE_PORT,8,3                 ## @WRITE_PORT
	.comm	_errno,4,2                      ## @errno
	.comm	_READ_PORT,8,3                  ## @READ_PORT
	.comm	_EINVAL,4,2                     ## @EINVAL
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_pex_input_pipe                 ; -- Begin function pex_input_pipe
	.p2align	2
_pex_input_pipe:                        ; @pex_input_pipe
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	str	x8, [sp, #8]
	ldr	x8, [x0]
	cmp	x8, #0
	b.le	LBB0_4
LBB0_1:
	mov	x0, #0
Lloh3:
	adrp	x8, _EINVAL@GOTPAGE
Lloh4:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
Lloh6:
	adrp	x9, _errno@GOTPAGE
Lloh7:
	ldr	x9, [x9, _errno@GOTPAGEOFF]
Lloh8:
	str	w8, [x9]
LBB0_2:
	ldr	x8, [sp, #8]
Lloh9:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh10:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh11:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_13
; %bb.3:
	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
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #80
	ret
LBB0_4:
	mov	x19, x0
	ldr	w8, [x0, #8]
Lloh12:
	adrp	x9, _PEX_USE_PIPES@GOTPAGE
Lloh13:
	ldr	x9, [x9, _PEX_USE_PIPES@GOTPAGEOFF]
Lloh14:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_1
; %bb.5:
	ldr	w8, [x19, #12]
	tbnz	w8, #31, LBB0_7
; %bb.6:
Lloh15:
	adrp	x9, _STDIN_FILE_NO@GOTPAGE
Lloh16:
	ldr	x9, [x9, _STDIN_FILE_NO@GOTPAGEOFF]
Lloh17:
	ldr	w9, [x9]
	cmp	w8, w9
	b.ne	LBB0_1
LBB0_7:
	ldr	x8, [x19, #24]
	cbnz	x8, LBB0_1
; %bb.8:
	ldr	x8, [x19, #16]
	ldr	x8, [x8]
	cmp	w1, #0
	cset	w20, ne
	mov	x22, sp
	mov	x1, sp
	mov	x0, x19
	mov	x2, x20
	blr	x8
	tbnz	x0, #63, LBB0_11
; %bb.9:
	ldr	x8, [x19, #16]
	ldr	x8, [x8, #16]
Lloh18:
	adrp	x21, _WRITE_PORT@GOTPAGE
Lloh19:
	ldr	x21, [x21, _WRITE_PORT@GOTPAGEOFF]
	ldr	x9, [x21]
	ldr	w1, [x22, x9, lsl #2]
	mov	x0, x19
	mov	x2, x20
	blr	x8
	cbz	x0, LBB0_12
; %bb.10:
Lloh20:
	adrp	x8, _READ_PORT@GOTPAGE
Lloh21:
	ldr	x8, [x8, _READ_PORT@GOTPAGEOFF]
Lloh22:
	ldr	x8, [x8]
	mov	x9, sp
	ldr	w8, [x9, x8, lsl #2]
	str	w8, [x19, #12]
	b	LBB0_2
LBB0_11:
	mov	x0, #0
	b	LBB0_2
LBB0_12:
Lloh23:
	adrp	x20, _errno@GOTPAGE
Lloh24:
	ldr	x20, [x20, _errno@GOTPAGEOFF]
	ldr	w22, [x20]
	ldr	x8, [x19, #16]
	ldr	x8, [x8, #8]
Lloh25:
	adrp	x9, _READ_PORT@GOTPAGE
Lloh26:
	ldr	x9, [x9, _READ_PORT@GOTPAGEOFF]
Lloh27:
	ldr	x9, [x9]
	mov	x23, sp
	ldr	w1, [x23, x9, lsl #2]
	mov	x0, x19
	blr	x8
	ldr	x8, [x19, #16]
	ldr	x8, [x8, #8]
	ldr	x9, [x21]
	ldr	w1, [x23, x9, lsl #2]
	mov	x0, x19
	blr	x8
	mov	x0, #0
	str	w22, [x20]
	b	LBB0_2
LBB0_13:
	bl	___stack_chk_fail
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotStr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGot	Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh25, Lloh26, Lloh27
	.loh AdrpLdrGot	Lloh23, Lloh24
	.cfi_endproc
                                        ; -- End function
	.comm	_PEX_USE_PIPES,4,2              ; @PEX_USE_PIPES
	.comm	_STDIN_FILE_NO,4,2              ; @STDIN_FILE_NO
	.comm	_WRITE_PORT,8,3                 ; @WRITE_PORT
	.comm	_errno,4,2                      ; @errno
	.comm	_READ_PORT,8,3                  ; @READ_PORT
	.comm	_EINVAL,4,2                     ; @EINVAL
.subsections_via_symbols
