	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_wait_with_trace                ## -- Begin function wait_with_trace
	.p2align	4, 0x90
_wait_with_trace:                       ## @wait_with_trace
	.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
	subq	$16, %rsp
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%edx, %ebx
	movq	%rsi, %r15
	movq	%rdi, %r14
	movl	$0, -36(%rbp)
	xorl	%eax, %eax
	callq	_prepare_to_trace
	movq	_procfs_trace@GOTPCREL(%rip), %r12
	cmpq	$0, (%r12)
	je	LBB0_9
## %bb.1:
	movq	_info_verbose@GOTPCREL(%rip), %rax
	cmpq	$0, (%rax)
	je	LBB0_5
## %bb.2:
	movq	_procfs_file@GOTPCREL(%rip), %rax
	movq	(%rax), %rdi
	testq	%rdi, %rdi
	jne	LBB0_4
## %bb.3:
	movq	_stdout@GOTPCREL(%rip), %rax
	movq	(%rax), %rdi
LBB0_4:
	leaq	L_.str(%rip), %rsi
	movq	%r15, %rdx
	movl	%ebx, %ecx
	xorl	%eax, %eax
	callq	_fprintf
LBB0_5:
	movq	_procfs_file@GOTPCREL(%rip), %r15
	movq	(%r15), %rdi
	testq	%rdi, %rdi
	jne	LBB0_7
## %bb.6:
	movq	_stdout@GOTPCREL(%rip), %rax
	movq	(%rax), %rdi
LBB0_7:
	leaq	L_.str.1(%rip), %rsi
	movl	%ebx, %edx
	xorl	%eax, %eax
	callq	_fprintf
	movq	(%r15), %rdi
	testq	%rdi, %rdi
	je	LBB0_9
## %bb.8:
	callq	_fflush
LBB0_9:
	movq	_errno@GOTPCREL(%rip), %rbx
	movq	$0, (%rbx)
	leaq	-36(%rbp), %rdi
	callq	_wait
	movl	%eax, %r15d
	cmpq	$0, (%r12)
	je	LBB0_17
## %bb.10:
	movq	(%rbx), %rdi
	movq	_procfs_file@GOTPCREL(%rip), %r12
	movq	(%r12), %rbx
	testq	%rbx, %rbx
	jne	LBB0_12
## %bb.11:
	movq	_stdout@GOTPCREL(%rip), %rax
	movq	(%rax), %rbx
LBB0_12:
	testq	%rdi, %rdi
	je	LBB0_14
## %bb.13:
	callq	_safe_strerror
	leaq	L_.str.2(%rip), %rsi
	movq	%rbx, %rdi
	movq	%rax, %rdx
	xorl	%eax, %eax
	callq	_fprintf
	jmp	LBB0_15
LBB0_14:
	movl	-36(%rbp), %ecx
	leaq	L_.str.3(%rip), %rsi
	movq	%rbx, %rdi
	movl	%r15d, %edx
	xorl	%eax, %eax
	callq	_fprintf
LBB0_15:
	movq	(%r12), %rdi
	testq	%rdi, %rdi
	je	LBB0_17
## %bb.16:
	callq	_fflush
LBB0_17:
	testq	%r14, %r14
	je	LBB0_19
## %bb.18:
	movl	-36(%rbp), %eax
	movl	%eax, (%r14)
LBB0_19:
	movl	%r15d, %eax
	addq	$16, %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_procfs_trace,8,3               ## @procfs_trace
	.comm	_info_verbose,8,3               ## @info_verbose
	.comm	_procfs_file,8,3                ## @procfs_file
	.comm	_stdout,8,3                     ## @stdout
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"%s:%d -- "

L_.str.1:                               ## @.str.1
	.asciz	"wait (line %d) "

	.comm	_errno,8,3                      ## @errno
L_.str.2:                               ## @.str.2
	.asciz	"[wait FAILED! (%s)]\n"

L_.str.3:                               ## @.str.3
	.asciz	"returned pid %d, status 0x%x\n"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_wait_with_trace                ; -- Begin function wait_with_trace
	.p2align	2
_wait_with_trace:                       ; @wait_with_trace
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #96
	.cfi_def_cfa_offset 96
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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
	mov	x20, x2
	mov	x21, x1
	mov	x19, x0
	str	wzr, [sp, #28]
	bl	_prepare_to_trace
Lloh0:
	adrp	x24, _procfs_trace@GOTPAGE
Lloh1:
	ldr	x24, [x24, _procfs_trace@GOTPAGEOFF]
	ldr	x8, [x24]
Lloh2:
	adrp	x22, _procfs_file@GOTPAGE
Lloh3:
	ldr	x22, [x22, _procfs_file@GOTPAGEOFF]
Lloh4:
	adrp	x23, _stdout@GOTPAGE
Lloh5:
	ldr	x23, [x23, _stdout@GOTPAGEOFF]
	cbz	x8, LBB0_5
; %bb.1:
Lloh6:
	adrp	x8, _info_verbose@GOTPAGE
Lloh7:
	ldr	x8, [x8, _info_verbose@GOTPAGEOFF]
Lloh8:
	ldr	x8, [x8]
	cbz	x8, LBB0_3
; %bb.2:
	ldr	x8, [x22]
	ldr	x9, [x23]
	cmp	x8, #0
	csel	x0, x9, x8, eq
	mov	x8, x20
	stp	x21, x8, [sp]
Lloh9:
	adrp	x1, l_.str@PAGE
Lloh10:
	add	x1, x1, l_.str@PAGEOFF
	bl	_fprintf
LBB0_3:
	ldr	x8, [x22]
	ldr	x9, [x23]
	cmp	x8, #0
	csel	x0, x9, x8, eq
	str	x20, [sp]
Lloh11:
	adrp	x1, l_.str.1@PAGE
Lloh12:
	add	x1, x1, l_.str.1@PAGEOFF
	bl	_fprintf
	ldr	x0, [x22]
	cbz	x0, LBB0_5
; %bb.4:
	bl	_fflush
LBB0_5:
Lloh13:
	adrp	x21, _errno@GOTPAGE
Lloh14:
	ldr	x21, [x21, _errno@GOTPAGEOFF]
	str	xzr, [x21]
	add	x0, sp, #28
	bl	_wait
	mov	x20, x0
	ldr	x8, [x24]
	cbz	x8, LBB0_11
; %bb.6:
	ldr	x0, [x21]
	ldr	x8, [x22]
	ldr	x9, [x23]
	cmp	x8, #0
	csel	x21, x9, x8, eq
	cbz	x0, LBB0_8
; %bb.7:
	bl	_safe_strerror
	str	x0, [sp]
Lloh15:
	adrp	x1, l_.str.2@PAGE
Lloh16:
	add	x1, x1, l_.str.2@PAGEOFF
	b	LBB0_9
LBB0_8:
	ldr	w8, [sp, #28]
	stp	x20, x8, [sp]
Lloh17:
	adrp	x1, l_.str.3@PAGE
Lloh18:
	add	x1, x1, l_.str.3@PAGEOFF
LBB0_9:
	mov	x0, x21
	bl	_fprintf
	ldr	x0, [x22]
	cbz	x0, LBB0_11
; %bb.10:
	bl	_fflush
LBB0_11:
	cbz	x19, LBB0_13
; %bb.12:
	ldr	w8, [sp, #28]
	str	w8, [x19]
LBB0_13:
	mov	x0, x20
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #96
	ret
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpAdd	Lloh11, Lloh12
	.loh AdrpLdrGot	Lloh13, Lloh14
	.loh AdrpAdd	Lloh15, Lloh16
	.loh AdrpAdd	Lloh17, Lloh18
	.cfi_endproc
                                        ; -- End function
	.comm	_procfs_trace,8,3               ; @procfs_trace
	.comm	_info_verbose,8,3               ; @info_verbose
	.comm	_procfs_file,8,3                ; @procfs_file
	.comm	_stdout,8,3                     ; @stdout
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"%s:%d -- "

l_.str.1:                               ; @.str.1
	.asciz	"wait (line %d) "

	.comm	_errno,8,3                      ; @errno
l_.str.2:                               ; @.str.2
	.asciz	"[wait FAILED! (%s)]\n"

l_.str.3:                               ; @.str.3
	.asciz	"returned pid %d, status 0x%x\n"

.subsections_via_symbols
