	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_dlg_popen                      ## -- Begin function dlg_popen
	.p2align	4, 0x90
_dlg_popen:                             ## @dlg_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	$16, %rsp
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -24(%rbp)
	cmpb	$119, (%rsi)
	je	LBB0_1
## %bb.2:
	movq	%rsi, %rbx
	movq	%rdi, %r14
	leaq	-32(%rbp), %rdi
	callq	_pipe
	testq	%rax, %rax
	je	LBB0_4
LBB0_1:
	xorl	%ebx, %ebx
LBB0_11:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-24(%rbp), %rax
	jne	LBB0_13
## %bb.12:
	movq	%rbx, %rax
	addq	$16, %rsp
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
LBB0_4:
	xorl	%eax, %eax
	callq	_fork
	cmpl	$-1, %eax
	je	LBB0_8
## %bb.5:
	testl	%eax, %eax
	je	LBB0_14
## %bb.6:
	cmpb	$114, (%rbx)
	jne	LBB0_9
## %bb.7:
	movl	-32(%rbp), %edi
	movq	%rbx, %rsi
	callq	_fdopen
	movq	%rax, %rbx
	movl	-28(%rbp), %edi
	jmp	LBB0_10
LBB0_8:
	movl	-32(%rbp), %edi
	callq	_close
	xorl	%ebx, %ebx
	movl	-28(%rbp), %edi
	jmp	LBB0_10
LBB0_9:
	movl	-28(%rbp), %edi
	movq	%rbx, %rsi
	callq	_fdopen
	movq	%rax, %rbx
	movl	-32(%rbp), %edi
LBB0_10:
	callq	_close
	jmp	LBB0_11
LBB0_13:
	callq	___stack_chk_fail
LBB0_14:
	cmpb	$114, (%rbx)
	jne	LBB0_18
## %bb.15:
	movl	-28(%rbp), %edi
	movq	_STDOUT_FILENO@GOTPCREL(%rip), %rbx
	movl	(%rbx), %esi
	cmpl	%esi, %edi
	je	LBB0_17
## %bb.16:
	callq	_dup2
	movl	-28(%rbp), %edi
	callq	_close
	movl	(%rbx), %edi
LBB0_17:
	movq	_STDERR_FILENO@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_dup2
	movl	-32(%rbp), %edi
	jmp	LBB0_21
LBB0_18:
	movl	-32(%rbp), %edi
	movq	_STDIN_FILENO@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	cmpl	%esi, %edi
	je	LBB0_20
## %bb.19:
	callq	_dup2
	movl	-32(%rbp), %edi
	callq	_close
LBB0_20:
	movl	-28(%rbp), %edi
	callq	_close
	movq	_STDERR_FILENO@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
LBB0_21:
	callq	_close
	movq	%r14, %rdi
	callq	_strlen
                                        ## kill: def $eax killed $eax def $rax
	leal	10(%rax), %edi
	callq	_malloc
	testq	%rax, %rax
	je	LBB0_23
## %bb.22:
	movq	%rax, %rbx
	leaq	L_.str(%rip), %rsi
	movq	%rax, %rdi
	movq	%r14, %rdx
	callq	_sprintf
	movq	%rbx, %rdi
	callq	_dlg_string_to_argv
	leaq	L_.str.1(%rip), %rdi
	movq	%rax, %rsi
	callq	_execvp
LBB0_23:
	movl	$127, %edi
	callq	__exit
	.cfi_endproc
                                        ## -- End function
	.comm	_STDOUT_FILENO,4,2              ## @STDOUT_FILENO
	.comm	_STDERR_FILENO,4,2              ## @STDERR_FILENO
	.comm	_STDIN_FILENO,4,2               ## @STDIN_FILENO
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"sh -c \"%s\""

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

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_dlg_popen                      ; -- Begin function dlg_popen
	.p2align	2
_dlg_popen:                             ; @dlg_popen
	.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
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	str	x8, [sp, #8]
	ldrb	w8, [x1]
	cmp	w8, #119
	b.eq	LBB0_2
; %bb.1:
	mov	x20, x1
	mov	x19, x0
	mov	x0, sp
	bl	_pipe
	cbz	x0, LBB0_5
LBB0_2:
	mov	x19, #0
LBB0_3:
	ldr	x8, [sp, #8]
Lloh3:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh4:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh5:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_12
; %bb.4:
	mov	x0, x19
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #48
	ret
LBB0_5:
	bl	_fork
	cmn	w0, #1
	b.eq	LBB0_9
; %bb.6:
	cbz	w0, LBB0_13
; %bb.7:
	ldrb	w8, [x20]
	cmp	w8, #114
	b.ne	LBB0_10
; %bb.8:
	ldr	w0, [sp]
	mov	x1, x20
	bl	_fdopen
	mov	x19, x0
	ldr	w0, [sp, #4]
	b	LBB0_11
LBB0_9:
	ldr	w0, [sp]
	bl	_close
	mov	x19, #0
	ldr	w0, [sp, #4]
	b	LBB0_11
LBB0_10:
	ldr	w0, [sp, #4]
	mov	x1, x20
	bl	_fdopen
	mov	x19, x0
	ldr	w0, [sp]
LBB0_11:
	bl	_close
	b	LBB0_3
LBB0_12:
	bl	___stack_chk_fail
LBB0_13:
	ldrb	w8, [x20]
	cmp	w8, #114
	b.ne	LBB0_17
; %bb.14:
	ldr	w0, [sp, #4]
Lloh6:
	adrp	x20, _STDOUT_FILENO@GOTPAGE
Lloh7:
	ldr	x20, [x20, _STDOUT_FILENO@GOTPAGEOFF]
	ldr	w1, [x20]
	cmp	w0, w1
	b.eq	LBB0_16
; %bb.15:
	bl	_dup2
	ldr	w0, [sp, #4]
	bl	_close
	ldr	w0, [x20]
LBB0_16:
Lloh8:
	adrp	x8, _STDERR_FILENO@GOTPAGE
Lloh9:
	ldr	x8, [x8, _STDERR_FILENO@GOTPAGEOFF]
Lloh10:
	ldr	w1, [x8]
	bl	_dup2
	ldr	w0, [sp]
	b	LBB0_20
LBB0_17:
	ldr	w0, [sp]
Lloh11:
	adrp	x8, _STDIN_FILENO@GOTPAGE
Lloh12:
	ldr	x8, [x8, _STDIN_FILENO@GOTPAGEOFF]
Lloh13:
	ldr	w1, [x8]
	cmp	w0, w1
	b.eq	LBB0_19
; %bb.18:
	bl	_dup2
	ldr	w0, [sp]
	bl	_close
LBB0_19:
	ldr	w0, [sp, #4]
	bl	_close
Lloh14:
	adrp	x8, _STDERR_FILENO@GOTPAGE
Lloh15:
	ldr	x8, [x8, _STDERR_FILENO@GOTPAGEOFF]
Lloh16:
	ldr	w0, [x8]
LBB0_20:
	bl	_close
	mov	x0, x19
	bl	_strlen
	add	w0, w0, #10
	bl	_malloc
	cbz	x0, LBB0_22
; %bb.21:
	mov	x20, x0
Lloh17:
	adrp	x1, l_.str@PAGE
Lloh18:
	add	x1, x1, l_.str@PAGEOFF
	mov	x2, x19
	bl	_sprintf
	mov	x0, x20
	bl	_dlg_string_to_argv
	mov	x1, x0
Lloh19:
	adrp	x0, l_.str.1@PAGE
Lloh20:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_execvp
LBB0_22:
	mov	w0, #127
	bl	__exit
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpAdd	Lloh19, Lloh20
	.loh AdrpAdd	Lloh17, Lloh18
	.cfi_endproc
                                        ; -- End function
	.comm	_STDOUT_FILENO,4,2              ; @STDOUT_FILENO
	.comm	_STDERR_FILENO,4,2              ; @STDERR_FILENO
	.comm	_STDIN_FILENO,4,2               ; @STDIN_FILENO
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"sh -c \"%s\""

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

.subsections_via_symbols
