	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function my_popen
_my_popen:                              ## @my_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	$1096, %rsp                     ## imm = 0x448
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdx, %r14
	movq	%rsi, %rbx
	movq	%rdi, %r15
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	leaq	L_.str(%rip), %rsi
	movq	%rbx, %rdi
	callq	_strcmp
	testq	%rax, %rax
	je	LBB0_3
## %bb.1:
	leaq	L_.str.1(%rip), %rsi
	movq	%rbx, %rdi
	callq	_strcmp
	testq	%rax, %rax
	je	LBB0_3
## %bb.2:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movq	_errno@GOTPCREL(%rip), %rcx
	movl	%eax, (%rcx)
	xorl	%ebx, %ebx
	jmp	LBB0_14
LBB0_3:
	leaq	-56(%rbp), %rdi
	callq	_pipe
	testq	%rax, %rax
	js	LBB0_4
## %bb.5:
	leaq	-64(%rbp), %rdi
	callq	_pipe
	testq	%rax, %rax
	js	LBB0_6
## %bb.8:
	leaq	L_.str.2(%rip), %rsi
	leaq	-1124(%rbp), %rdi
	callq	_strcpy
	leaq	L_.str.3(%rip), %rsi
	leaq	-1128(%rbp), %r13
	movq	%r13, %rdi
	callq	_strcpy
	leaq	-1120(%rbp), %r12
	movq	%r12, %rdi
	movq	%r15, %rsi
	callq	_strcpy
	leaq	-1124(%rbp), %rax
	movq	%rax, -96(%rbp)
	movq	%r13, -88(%rbp)
	movq	%r12, -80(%rbp)
	movq	$0, -72(%rbp)
	xorl	%eax, %eax
	callq	_fork
	cmpl	$-1, %eax
	je	LBB0_16
## %bb.9:
	testl	%eax, %eax
	je	LBB0_17
## %bb.10:
	movl	%eax, (%r14)
	leaq	L_.str(%rip), %rsi
	movq	%rbx, %rdi
	callq	_strcmp
	testq	%rax, %rax
	je	LBB0_12
## %bb.11:
	movl	-52(%rbp), %edi
	leaq	L_.str.1(%rip), %rsi
	callq	_fdopen
	movq	%rax, %rbx
	movl	-56(%rbp), %edi
	callq	_close
	movl	-64(%rbp), %edi
	callq	_close
	movl	-60(%rbp), %edi
	jmp	LBB0_13
LBB0_4:
	xorl	%ebx, %ebx
	jmp	LBB0_14
LBB0_6:
	movl	-56(%rbp), %edi
	callq	_close
	movl	-52(%rbp), %edi
	jmp	LBB0_7
LBB0_16:
	movl	-56(%rbp), %edi
	callq	_close
	movl	-52(%rbp), %edi
	callq	_close
	movl	-64(%rbp), %edi
	callq	_close
	movl	-60(%rbp), %edi
LBB0_7:
	callq	_close
	xorl	%ebx, %ebx
	jmp	LBB0_14
LBB0_12:
	movl	-64(%rbp), %edi
	leaq	L_.str(%rip), %rsi
	callq	_fdopen
	movq	%rax, %rbx
	movl	-60(%rbp), %edi
	callq	_close
	movl	-56(%rbp), %edi
	callq	_close
	movl	-52(%rbp), %edi
LBB0_13:
	callq	_close
LBB0_14:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-48(%rbp), %rax
	jne	LBB0_18
## %bb.15:
	movq	%rbx, %rax
	addq	$1096, %rsp                     ## imm = 0x448
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_18:
	callq	___stack_chk_fail
LBB0_17:
	movl	-52(%rbp), %edi
	callq	_close
	movl	-64(%rbp), %edi
	callq	_close
	xorl	%edi, %edi
	callq	_close
	movl	-56(%rbp), %edi
	callq	_dup
	movl	-56(%rbp), %edi
	callq	_close
	movl	$1, %edi
	callq	_close
	movl	-60(%rbp), %edi
	callq	_dup
	movl	$2, %edi
	callq	_close
	movl	-60(%rbp), %edi
	callq	_dup
	movl	-60(%rbp), %edi
	callq	_close
	movq	_environ@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	leaq	L_.str.4(%rip), %rdi
	leaq	-96(%rbp), %rsi
	callq	_execve
	movl	$127, %edi
	callq	_exit
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"r"

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

	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_errno,4,2                      ## @errno
L_.str.2:                               ## @.str.2
	.asciz	"sh"

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

L_.str.4:                               ## @.str.4
	.asciz	"/bin/sh"

	.comm	_environ,4,2                    ## @environ
	.no_dead_strip	_my_popen
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function my_popen
_my_popen:                              ; @my_popen
	.cfi_startproc
; %bb.0:
	stp	x28, x27, [sp, #-80]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w27, -72
	.cfi_offset w28, -80
	sub	sp, sp, #1088
	mov	x20, x2
	mov	x19, x1
	mov	x21, x0
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	stur	x8, [x29, #-72]
Lloh3:
	adrp	x1, l_.str@PAGE
Lloh4:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x19
	bl	_strcmp
	cbz	x0, LBB0_3
; %bb.1:
Lloh5:
	adrp	x1, l_.str.1@PAGE
Lloh6:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x19
	bl	_strcmp
	cbz	x0, LBB0_3
; %bb.2:
	mov	x19, #0
Lloh7:
	adrp	x8, _EINVAL@GOTPAGE
Lloh8:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh9:
	ldr	w8, [x8]
Lloh10:
	adrp	x9, _errno@GOTPAGE
Lloh11:
	ldr	x9, [x9, _errno@GOTPAGEOFF]
Lloh12:
	str	w8, [x9]
	b	LBB0_15
LBB0_3:
	sub	x0, x29, #80
	bl	_pipe
	tbnz	x0, #63, LBB0_9
; %bb.4:
	sub	x0, x29, #88
	bl	_pipe
	tbnz	x0, #63, LBB0_10
; %bb.5:
Lloh13:
	adrp	x1, l_.str.2@PAGE
Lloh14:
	add	x1, x1, l_.str.2@PAGEOFF
	add	x22, sp, #4
	add	x0, sp, #4
	bl	_strcpy
Lloh15:
	adrp	x1, l_.str.3@PAGE
Lloh16:
	add	x1, x1, l_.str.3@PAGEOFF
	mov	x23, sp
	mov	x0, sp
	bl	_strcpy
	add	x24, sp, #8
	add	x0, sp, #8
	mov	x1, x21
	bl	_strcpy
	stp	x22, x23, [x29, #-120]
	stp	x24, xzr, [x29, #-104]
	bl	_fork
	cmn	w0, #1
	b.eq	LBB0_11
; %bb.6:
	cbz	w0, LBB0_18
; %bb.7:
	str	w0, [x20]
Lloh17:
	adrp	x1, l_.str@PAGE
Lloh18:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x19
	bl	_strcmp
	cbz	x0, LBB0_13
; %bb.8:
	ldur	w0, [x29, #-76]
Lloh19:
	adrp	x1, l_.str.1@PAGE
Lloh20:
	add	x1, x1, l_.str.1@PAGEOFF
	bl	_fdopen
	mov	x19, x0
	ldur	w0, [x29, #-80]
	bl	_close
	ldur	w0, [x29, #-88]
	bl	_close
	ldur	w0, [x29, #-84]
	b	LBB0_14
LBB0_9:
	mov	x19, #0
	b	LBB0_15
LBB0_10:
	ldur	w0, [x29, #-80]
	bl	_close
	ldur	w0, [x29, #-76]
	b	LBB0_12
LBB0_11:
	ldur	w0, [x29, #-80]
	bl	_close
	ldur	w0, [x29, #-76]
	bl	_close
	ldur	w0, [x29, #-88]
	bl	_close
	ldur	w0, [x29, #-84]
LBB0_12:
	bl	_close
	mov	x19, #0
	b	LBB0_15
LBB0_13:
	ldur	w0, [x29, #-88]
Lloh21:
	adrp	x1, l_.str@PAGE
Lloh22:
	add	x1, x1, l_.str@PAGEOFF
	bl	_fdopen
	mov	x19, x0
	ldur	w0, [x29, #-84]
	bl	_close
	ldur	w0, [x29, #-80]
	bl	_close
	ldur	w0, [x29, #-76]
LBB0_14:
	bl	_close
LBB0_15:
	ldur	x8, [x29, #-72]
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_17
; %bb.16:
	mov	x0, x19
	add	sp, sp, #1088
	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
	ldp	x28, x27, [sp], #80             ; 16-byte Folded Reload
	ret
LBB0_17:
	bl	___stack_chk_fail
LBB0_18:
	ldur	w0, [x29, #-76]
	bl	_close
	ldur	w0, [x29, #-88]
	bl	_close
	mov	w0, #0
	bl	_close
	ldur	w0, [x29, #-80]
	bl	_dup
	ldur	w0, [x29, #-80]
	bl	_close
	mov	w0, #1
	bl	_close
	ldur	w0, [x29, #-84]
	bl	_dup
	mov	w0, #2
	bl	_close
	ldur	w0, [x29, #-84]
	bl	_dup
	ldur	w0, [x29, #-84]
	bl	_close
Lloh26:
	adrp	x8, _environ@GOTPAGE
Lloh27:
	ldr	x8, [x8, _environ@GOTPAGEOFF]
Lloh28:
	ldr	w2, [x8]
Lloh29:
	adrp	x0, l_.str.4@PAGE
Lloh30:
	add	x0, x0, l_.str.4@PAGEOFF
	sub	x1, x29, #120
	bl	_execve
	mov	w0, #127
	bl	_exit
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpLdrGotStr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpAdd	Lloh15, Lloh16
	.loh AdrpAdd	Lloh13, Lloh14
	.loh AdrpAdd	Lloh17, Lloh18
	.loh AdrpAdd	Lloh19, Lloh20
	.loh AdrpAdd	Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.loh AdrpAdd	Lloh29, Lloh30
	.loh AdrpLdrGotLdr	Lloh26, Lloh27, Lloh28
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"r"

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

	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_errno,4,2                      ; @errno
l_.str.2:                               ; @.str.2
	.asciz	"sh"

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

l_.str.4:                               ; @.str.4
	.asciz	"/bin/sh"

	.comm	_environ,4,2                    ; @environ
	.no_dead_strip	_my_popen
.subsections_via_symbols
