	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_pex_read_output                ## -- Begin function pex_read_output
	.p2align	4, 0x90
_pex_read_output:                       ## @pex_read_output
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r14
	pushq	%rbx
	subq	$16, %rsp
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movl	%esi, %r14d
	movq	%rdi, %rbx
	cmpq	$0, 24(%rdi)
	je	LBB0_6
## %bb.1:
	leaq	-32(%rbp), %rdx
	leaq	-20(%rbp), %rcx
	movq	%rbx, %rdi
	xorl	%esi, %esi
	callq	_pex_get_status_and_time
	testl	%eax, %eax
	je	LBB0_5
## %bb.2:
	movq	24(%rbx), %rdi
	testl	%r14d, %r14d
	leaq	L_.str.1(%rip), %rax
	leaq	L_.str(%rip), %rsi
	cmoveq	%rax, %rsi
	callq	_fopen
	movq	%rax, 8(%rbx)
	cmpq	$0, 32(%rbx)
	je	LBB0_4
## %bb.3:
	movq	24(%rbx), %rdi
	callq	_free
	movq	$0, 32(%rbx)
	movq	8(%rbx), %rax
LBB0_4:
	movq	$0, 24(%rbx)
	jmp	LBB0_9
LBB0_6:
	movl	(%rbx), %esi
	xorl	%eax, %eax
	testl	%esi, %esi
	js	LBB0_9
## %bb.7:
	movq	_STDIN_FILE_NO@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %esi
	je	LBB0_9
## %bb.8:
	movq	16(%rbx), %rax
	movq	%rbx, %rdi
	movl	%r14d, %edx
	callq	*(%rax)
	movq	%rax, 8(%rbx)
	movl	$-1, (%rbx)
	jmp	LBB0_9
LBB0_5:
	movl	-20(%rbp), %eax
	movq	_errno@GOTPCREL(%rip), %rcx
	movl	%eax, (%rcx)
	xorl	%eax, %eax
LBB0_9:
	addq	$16, %rsp
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_errno,4,2                      ## @errno
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"rb"

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

	.comm	_STDIN_FILE_NO,4,2              ## @STDIN_FILE_NO
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_pex_read_output                ; -- Begin function pex_read_output
	.p2align	2
_pex_read_output:                       ; @pex_read_output
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #48
	.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
	mov	x20, x1
	mov	x19, x0
	ldr	x8, [x0, #24]
	cbz	x8, LBB0_5
; %bb.1:
	add	x2, sp, #8
	add	x3, sp, #4
	mov	x0, x19
	mov	w1, #0
	bl	_pex_get_status_and_time
	cbz	w0, LBB0_8
; %bb.2:
	ldr	x0, [x19, #24]
Lloh0:
	adrp	x8, l_.str@PAGE
Lloh1:
	add	x8, x8, l_.str@PAGEOFF
Lloh2:
	adrp	x9, l_.str.1@PAGE
Lloh3:
	add	x9, x9, l_.str.1@PAGEOFF
	cmp	w20, #0
	csel	x1, x9, x8, eq
	bl	_fopen
	str	x0, [x19, #8]
	ldr	x8, [x19, #32]
	cbz	x8, LBB0_4
; %bb.3:
	ldr	x0, [x19, #24]
	bl	_free
	str	xzr, [x19, #32]
	ldr	x0, [x19, #8]
LBB0_4:
	str	xzr, [x19, #24]
	b	LBB0_9
LBB0_5:
	mov	x0, #0
	ldr	w1, [x19]
	tbnz	w1, #31, LBB0_9
; %bb.6:
Lloh4:
	adrp	x8, _STDIN_FILE_NO@GOTPAGE
Lloh5:
	ldr	x8, [x8, _STDIN_FILE_NO@GOTPAGEOFF]
Lloh6:
	ldr	w8, [x8]
	cmp	w1, w8
	b.eq	LBB0_9
; %bb.7:
	ldr	x8, [x19, #16]
	ldr	x8, [x8]
	mov	x0, x19
	mov	x2, x20
	blr	x8
	str	x0, [x19, #8]
	mov	w8, #-1
	str	w8, [x19]
	b	LBB0_9
LBB0_8:
	mov	x0, #0
	ldr	w8, [sp, #4]
Lloh7:
	adrp	x9, _errno@GOTPAGE
Lloh8:
	ldr	x9, [x9, _errno@GOTPAGEOFF]
Lloh9:
	str	w8, [x9]
LBB0_9:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #48
	ret
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpLdrGotStr	Lloh7, Lloh8, Lloh9
	.cfi_endproc
                                        ; -- End function
	.comm	_errno,4,2                      ; @errno
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"rb"

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

	.comm	_STDIN_FILE_NO,4,2              ; @STDIN_FILE_NO
.subsections_via_symbols
