	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function cmd_popen
_cmd_popen:                             ## @cmd_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	%r14
	pushq	%rbx
	subq	$64, %rsp
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	%rsi, %r14
	movq	%rdi, %rbx
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -24(%rbp)
	leaq	-80(%rbp), %rdi
	callq	_pipe
	testq	%rax, %rax
	js	LBB0_8
## %bb.1:
	leaq	-72(%rbp), %rdi
	callq	_pipe
	testq	%rax, %rax
	js	LBB0_2
## %bb.3:
	leaq	L_.str(%rip), %rax
	movq	%rax, -64(%rbp)
	leaq	L_.str.1(%rip), %rax
	movq	%rax, -56(%rbp)
	movq	%rbx, -48(%rbp)
	movq	$0, -40(%rbp)
	callq	_vfork
	cmpl	$-1, %eax
	je	LBB0_6
## %bb.4:
	testl	%eax, %eax
	je	LBB0_11
## %bb.5:
	movl	-68(%rbp), %edi
	leaq	L_.str.3(%rip), %rsi
	callq	_fdopen
	movq	%rax, (%r14)
	movl	-80(%rbp), %edi
	leaq	L_.str.4(%rip), %rsi
	callq	_fdopen
	movq	%rax, 8(%r14)
	movl	-76(%rbp), %edi
	callq	_close
	movl	-72(%rbp), %edi
	callq	_close
	jmp	LBB0_9
LBB0_2:
	movl	$1, %eax
	movl	-80(%rbp), %edi
	jmp	LBB0_7
LBB0_6:
	movl	-80(%rbp), %edi
	callq	_close
	movl	-76(%rbp), %edi
	callq	_close
	movl	$3, %eax
	movl	-72(%rbp), %edi
LBB0_7:
	movq	%rax, %rbx
	callq	_close
	movl	-80(%rbp,%rbx,4), %edi
	callq	_close
LBB0_8:
	xorps	%xmm0, %xmm0
	movups	%xmm0, (%r14)
LBB0_9:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-24(%rbp), %rax
	jne	LBB0_12
## %bb.10:
	addq	$64, %rsp
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
LBB0_12:
	callq	___stack_chk_fail
LBB0_11:
	movl	-76(%rbp), %edi
	movq	_STDOUT_FILENO@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_dup2
	movl	-72(%rbp), %edi
	movq	_STDIN_FILENO@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_dup2
	movl	-80(%rbp), %edi
	callq	_close
	movl	-68(%rbp), %edi
	callq	_close
	movq	_environ@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	leaq	L_.str.2(%rip), %rdi
	leaq	-64(%rbp), %rsi
	callq	_execve
	movl	$127, %edi
	callq	_exit
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"sh"

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

	.comm	_STDOUT_FILENO,4,2              ## @STDOUT_FILENO
	.comm	_STDIN_FILENO,4,2               ## @STDIN_FILENO
L_.str.2:                               ## @.str.2
	.asciz	"/bin/sh"

	.comm	_environ,4,2                    ## @environ
L_.str.3:                               ## @.str.3
	.asciz	"w"

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

	.no_dead_strip	_cmd_popen
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function cmd_popen
_cmd_popen:                             ; @cmd_popen
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	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
	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]
	stur	x8, [x29, #-40]
	add	x21, sp, #8
	mov	x0, x21
	bl	_pipe
	tbnz	x0, #63, LBB0_8
; %bb.1:
	add	x0, x21, #8
	bl	_pipe
	tbnz	x0, #63, LBB0_5
; %bb.2:
Lloh3:
	adrp	x9, l_.str@PAGE
Lloh4:
	add	x9, x9, l_.str@PAGEOFF
Lloh5:
	adrp	x10, l_.str.1@PAGE
Lloh6:
	add	x10, x10, l_.str.1@PAGEOFF
	stp	x9, x10, [sp, #24]
	stp	x20, xzr, [sp, #40]
	bl	_vfork
	cmn	w0, #1
	b.eq	LBB0_6
; %bb.3:
	cbz	w0, LBB0_12
; %bb.4:
	ldr	w0, [sp, #20]
Lloh7:
	adrp	x1, l_.str.3@PAGE
Lloh8:
	add	x1, x1, l_.str.3@PAGEOFF
	bl	_fdopen
	str	x0, [x19]
	ldr	w0, [sp, #8]
Lloh9:
	adrp	x1, l_.str.4@PAGE
Lloh10:
	add	x1, x1, l_.str.4@PAGEOFF
	bl	_fdopen
	str	x0, [x19, #8]
	ldr	w0, [sp, #12]
	bl	_close
	ldr	w0, [sp, #16]
	bl	_close
	b	LBB0_9
LBB0_5:
	ldr	w0, [sp, #8]
	mov	w9, #1
	mov	x1, x9
	mov	x8, x1
	b	LBB0_7
LBB0_6:
	ldr	w0, [sp, #8]
	bl	_close
	ldr	w0, [sp, #12]
	bl	_close
	mov	w8, #3
                                        ; kill: def $x8 killed $w8
	ldr	w0, [sp, #16]
LBB0_7:
	mov	x20, x8
	bl	_close
	add	x8, sp, #8
	ldr	w0, [x8, x20, lsl #2]
	bl	_close
LBB0_8:
	mov	x8, #0
	stp	xzr, xzr, [x19]
LBB0_9:
	ldur	x8, [x29, #-40]
Lloh11:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh12:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh13:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_11
; %bb.10:
	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
	add	sp, sp, #112
	ret
LBB0_11:
	bl	___stack_chk_fail
LBB0_12:
	ldr	w0, [sp, #12]
Lloh14:
	adrp	x8, _STDOUT_FILENO@GOTPAGE
Lloh15:
	ldr	x8, [x8, _STDOUT_FILENO@GOTPAGEOFF]
Lloh16:
	ldr	w1, [x8]
	bl	_dup2
	ldr	w0, [sp, #16]
Lloh17:
	adrp	x8, _STDIN_FILENO@GOTPAGE
Lloh18:
	ldr	x8, [x8, _STDIN_FILENO@GOTPAGEOFF]
Lloh19:
	ldr	w1, [x8]
	bl	_dup2
	ldr	w0, [sp, #8]
	bl	_close
	ldr	w0, [sp, #20]
	bl	_close
Lloh20:
	adrp	x8, _environ@GOTPAGE
Lloh21:
	ldr	x8, [x8, _environ@GOTPAGEOFF]
Lloh22:
	ldr	w2, [x8]
Lloh23:
	adrp	x0, l_.str.2@PAGE
Lloh24:
	add	x0, x0, l_.str.2@PAGEOFF
	add	x1, sp, #24
	bl	_execve
	mov	w0, #127
	bl	_exit
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpAdd	Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpAdd	Lloh23, Lloh24
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"sh"

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

	.comm	_STDOUT_FILENO,4,2              ; @STDOUT_FILENO
	.comm	_STDIN_FILENO,4,2               ; @STDIN_FILENO
l_.str.2:                               ; @.str.2
	.asciz	"/bin/sh"

	.comm	_environ,4,2                    ; @environ
l_.str.3:                               ; @.str.3
	.asciz	"w"

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

	.no_dead_strip	_cmd_popen
.subsections_via_symbols
