	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_Popen                          ## -- Begin function Popen
	.p2align	4, 0x90
_Popen:                                 ## @Popen
	.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	%r13
	pushq	%r12
	pushq	%rbx
	subq	$56, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r15
	movq	%rdi, %rbx
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	leaq	-56(%rbp), %rdi
	callq	_pipe
	testq	%rax, %rax
	js	LBB0_9
## %bb.1:
	movq	%rbx, -72(%rbp)                 ## 8-byte Spill
	movq	_READ@GOTPCREL(%rip), %r12
	movq	(%r12), %rax
	movl	-56(%rbp,%rax,4), %edi
	movq	_F_SETFD@GOTPCREL(%rip), %r14
	movl	(%r14), %esi
	movl	$1, %edx
	callq	_fcntl
	movq	_WRITE@GOTPCREL(%rip), %rbx
	movq	(%rbx), %rax
	movl	-56(%rbp,%rax,4), %edi
	movl	(%r14), %esi
	movl	$1, %edx
	callq	_fcntl
	movq	%r15, -64(%rbp)                 ## 8-byte Spill
	cmpb	$114, (%r15)
	jne	LBB0_4
## %bb.2:
	movq	_WRITE@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movl	-56(%rbp,%rax,4), %r13d
	movl	%r13d, %r15d
	movq	%r12, %rbx
	jmp	LBB0_5
LBB0_4:
	movq	(%r12), %rax
	movl	-56(%rbp,%rax,4), %r13d
	movl	$-1, %r15d
LBB0_5:
	movq	(%rbx), %rax
	movl	-56(%rbp,%rax,4), %r12d
	leaq	-76(%rbp), %r14
	movq	%r14, %rdi
	callq	_sigemptyset
	leaq	L_.str(%rip), %rdi
	callq	_value
	movq	$0, (%rsp)
	leaq	L_.str.1(%rip), %r8
	movl	%eax, %edi
	movq	%r14, %rsi
	movl	%r13d, %edx
	movl	%r15d, %ecx
	movq	-72(%rbp), %r9                  ## 8-byte Reload
	callq	_start_command
	testq	%rax, %rax
	js	LBB0_8
## %bb.6:
	movq	%rax, %r14
	movl	%r13d, %edi
	callq	_close
	movl	%r12d, %edi
	movq	-64(%rbp), %rsi                 ## 8-byte Reload
	callq	_fdopen
	testq	%rax, %rax
	je	LBB0_9
## %bb.7:
	movq	%rax, %rbx
	movq	%rax, %rdi
	movl	$1, %esi
	movq	%r14, %rdx
	callq	_register_file
	jmp	LBB0_10
LBB0_8:
	movq	_READ@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movl	-56(%rbp,%rax,4), %edi
	callq	_close
	movq	_WRITE@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movl	-56(%rbp,%rax,4), %edi
	callq	_close
LBB0_9:
	xorl	%ebx, %ebx
LBB0_10:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-48(%rbp), %rax
	jne	LBB0_12
## %bb.11:
	movq	%rbx, %rax
	addq	$56, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_12:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_READ,8,3                       ## @READ
	.comm	_F_SETFD,4,2                    ## @F_SETFD
	.comm	_WRITE,8,3                      ## @WRITE
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"SHELL"

L_.str.1:                               ## @.str.1
	.asciz	"-c"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_Popen                          ; -- Begin function Popen
	.p2align	2
_Popen:                                 ; @Popen
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	stp	x26, x25, [sp, #32]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #48]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #64]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #80]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #96]             ; 16-byte Folded Spill
	add	x29, sp, #96
	.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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	mov	x19, x1
	mov	x20, x0
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	str	x8, [sp, #24]
	add	x21, sp, #16
	add	x0, sp, #16
	bl	_pipe
	tbnz	x0, #63, LBB0_8
; %bb.1:
Lloh3:
	adrp	x24, _READ@GOTPAGE
Lloh4:
	ldr	x24, [x24, _READ@GOTPAGEOFF]
	ldr	x8, [x24]
	ldr	w0, [x21, x8, lsl #2]
Lloh5:
	adrp	x22, _F_SETFD@GOTPAGE
Lloh6:
	ldr	x22, [x22, _F_SETFD@GOTPAGEOFF]
	ldr	w1, [x22]
	mov	w2, #1
	bl	_fcntl
Lloh7:
	adrp	x25, _WRITE@GOTPAGE
Lloh8:
	ldr	x25, [x25, _WRITE@GOTPAGEOFF]
	ldr	x8, [x25]
	ldr	w0, [x21, x8, lsl #2]
	ldr	w1, [x22]
	mov	w2, #1
	bl	_fcntl
	ldrb	w8, [x19]
	cmp	w8, #114
	b.ne	LBB0_3
; %bb.2:
	ldr	x8, [x25]
	add	x9, sp, #16
	ldr	w21, [x9, x8, lsl #2]
Lloh9:
	adrp	x8, _READ@GOTPAGE
Lloh10:
	ldr	x8, [x8, _READ@GOTPAGEOFF]
	mov	x23, x21
	b	LBB0_4
LBB0_3:
	ldr	x8, [x24]
	add	x9, sp, #16
	ldr	w21, [x9, x8, lsl #2]
Lloh11:
	adrp	x8, _WRITE@GOTPAGE
Lloh12:
	ldr	x8, [x8, _WRITE@GOTPAGEOFF]
	mov	w23, #-1
LBB0_4:
	ldr	x8, [x8]
	add	x26, sp, #16
	ldr	w22, [x26, x8, lsl #2]
	add	x0, sp, #12
	bl	_sigemptyset
Lloh13:
	adrp	x0, l_.str@PAGE
Lloh14:
	add	x0, x0, l_.str@PAGEOFF
	bl	_value
Lloh15:
	adrp	x4, l_.str.1@PAGE
Lloh16:
	add	x4, x4, l_.str.1@PAGEOFF
	add	x1, sp, #12
	mov	x2, x21
	mov	x3, x23
	mov	x5, x20
	mov	x6, #0
	bl	_start_command
	tbnz	x0, #63, LBB0_7
; %bb.5:
	mov	x20, x0
	mov	x0, x21
	bl	_close
	mov	x0, x22
	mov	x1, x19
	bl	_fdopen
	mov	x19, x0
	cbz	x0, LBB0_9
; %bb.6:
	mov	x0, x19
	mov	w1, #1
	mov	x2, x20
	bl	_register_file
	b	LBB0_9
LBB0_7:
	ldr	x8, [x24]
	ldr	w0, [x26, x8, lsl #2]
	bl	_close
	ldr	x8, [x25]
	ldr	w0, [x26, x8, lsl #2]
	bl	_close
LBB0_8:
	mov	x19, #0
LBB0_9:
	ldr	x8, [sp, #24]
Lloh17:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh18:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh19:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_11
; %bb.10:
	mov	x0, x19
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #48]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #112
	ret
LBB0_11:
	bl	___stack_chk_fail
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpAdd	Lloh15, Lloh16
	.loh AdrpAdd	Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.cfi_endproc
                                        ; -- End function
	.comm	_READ,8,3                       ; @READ
	.comm	_F_SETFD,4,2                    ; @F_SETFD
	.comm	_WRITE,8,3                      ; @WRITE
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"SHELL"

l_.str.1:                               ; @.str.1
	.asciz	"-c"

.subsections_via_symbols
