	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_setup_and_wait                 ## -- Begin function setup_and_wait
	.p2align	4, 0x90
_setup_and_wait:                        ## @setup_and_wait
	.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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %rbx
	movq	%rdi, %r14
	callq	_vfork
	movl	%eax, %r15d
	testl	%eax, %eax
	je	LBB0_3
## %bb.1:
	cmpl	$-1, %eax
	jne	LBB0_4
## %bb.2:
	leaq	L_.str(%rip), %rsi
	xorl	%eax, %eax
                                        ## kill: def $al killed $al killed $eax
	movl	$1, %edi
	callq	_err
	jmp	LBB0_4
LBB0_3:
	movq	_PT_TRACE_ME@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	xorl	%r12d, %r12d
	movl	%r12d, %esi
	movl	%r12d, %edx
	movl	%r12d, %ecx
	callq	_ptrace
	movq	(%rbx), %rdi
	movq	%rbx, %rsi
	callq	_execvp
	movq	(%rbx), %rdx
	leaq	L_.str.1(%rip), %rsi
	movl	%r12d, %eax
	movl	$1, %edi
	callq	_err
LBB0_4:
	xorl	%edx, %edx
	movl	%edx, %esi
	movl	%r15d, %edi
	callq	_waitpid
	testq	%rax, %rax
	jns	LBB0_6
## %bb.5:
	leaq	L_.str.2(%rip), %rsi
	xorl	%eax, %eax
                                        ## kill: def $al killed $al killed $eax
	movl	$1, %edi
	callq	_err
LBB0_6:
	xorl	%edx, %edx
	movq	%r14, %rdi
	movl	%r15d, %esi
	callq	_new_proc
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"fork failed"

	.comm	_PT_TRACE_ME,4,2                ## @PT_TRACE_ME
L_.str.1:                               ## @.str.1
	.asciz	"execvp %s"

L_.str.2:                               ## @.str.2
	.asciz	"unexpect stop in waitpid"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_setup_and_wait                 ; -- Begin function setup_and_wait
	.p2align	2
_setup_and_wait:                        ; @setup_and_wait
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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	x21, x1
	mov	x19, x0
	bl	_vfork
	mov	x20, x0
	cbz	w0, LBB0_3
; %bb.1:
	cmn	w0, #1
	b.ne	LBB0_5
; %bb.2:
Lloh0:
	adrp	x1, l_.str@PAGE
Lloh1:
	add	x1, x1, l_.str@PAGEOFF
	b	LBB0_4
LBB0_3:
Lloh2:
	adrp	x8, _PT_TRACE_ME@GOTPAGE
Lloh3:
	ldr	x8, [x8, _PT_TRACE_ME@GOTPAGEOFF]
Lloh4:
	ldr	w0, [x8]
	mov	w1, #0
	mov	w2, #0
	mov	w3, #0
	bl	_ptrace
	ldr	x0, [x21]
	mov	x1, x21
	bl	_execvp
	ldr	x8, [x21]
	mov	x9, sp
	str	x8, [x9]
Lloh5:
	adrp	x1, l_.str.1@PAGE
Lloh6:
	add	x1, x1, l_.str.1@PAGEOFF
LBB0_4:
	mov	w0, #1
	bl	_err
LBB0_5:
	mov	x1, #0
	mov	w2, #0
	mov	x0, x20
	bl	_waitpid
	tbz	x0, #63, LBB0_7
; %bb.6:
Lloh7:
	adrp	x1, l_.str.2@PAGE
Lloh8:
	add	x1, x1, l_.str.2@PAGEOFF
	mov	w0, #1
	bl	_err
LBB0_7:
	mov	w2, #0
	mov	x0, x19
	mov	x1, x20
	bl	_new_proc
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #64
	ret
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpAdd	Lloh7, Lloh8
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"fork failed"

	.comm	_PT_TRACE_ME,4,2                ; @PT_TRACE_ME
l_.str.1:                               ; @.str.1
	.asciz	"execvp %s"

l_.str.2:                               ; @.str.2
	.asciz	"unexpect stop in waitpid"

.subsections_via_symbols
