	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.section	__TEXT,__literal16,16byte_literals
	.p2align	4                               ## -- Begin function fbsd_wait
LCPI0_0:
	.space	16
	.section	__TEXT,__text,regular,pure_instructions
	.p2align	4, 0x90
_fbsd_wait:                             ## @fbsd_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	%r13
	pushq	%r12
	pushq	%rbx
	subq	$40, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, -48(%rbp)                 ## 8-byte Spill
	leaq	-72(%rbp), %r14
	movq	_cont_thread@GOTPCREL(%rip), %r12
	movq	_all_threads@GOTPCREL(%rip), %r15
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_1:                                 ## =>This Inner Loop Header: Depth=1
	movq	(%r12), %rsi
	testq	%rsi, %rsi
	jle	LBB0_4
## %bb.2:                               ##   in Loop: Header=BB0_1 Depth=1
	movq	%r15, %rdi
	callq	_find_inferior_id
	movq	%rax, %rbx
	testq	%rax, %rax
	jne	LBB0_4
## %bb.3:                               ##   in Loop: Header=BB0_1 Depth=1
	movl	$-1, -80(%rbp)
	xorps	%xmm0, %xmm0
	movups	%xmm0, (%r14)
	movq	$0, 16(%r14)
	leaq	-80(%rbp), %rdi
	callq	_fbsd_resume
	xorl	%ebx, %ebx
LBB0_4:                                 ##   in Loop: Header=BB0_1 Depth=1
	xorl	%eax, %eax
	callq	_enable_async_io
	xorl	%eax, %eax
	callq	_unblock_async_io
	movq	%rbx, %rdi
	callq	_fbsd_wait_for_event
	movl	%eax, %r13d
	xorl	%eax, %eax
	callq	_stop_all_processes
	xorl	%eax, %eax
	callq	_disable_async_io
	movq	(%r15), %rax
	cmpq	8(%r15), %rax
	je	LBB0_7
## %bb.5:                               ##   in Loop: Header=BB0_1 Depth=1
	movl	%r13d, %edi
	callq	_WIFSTOPPED
	testl	%eax, %eax
	je	LBB0_1
LBB0_6:
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	movb	$84, (%rax)
	movl	%r13d, %edi
	callq	_WSTOPSIG
	jmp	LBB0_10
LBB0_7:
	movl	%r13d, %edi
	callq	_WIFEXITED
	testq	%rax, %rax
	je	LBB0_11
## %bb.8:
	movq	_stderr@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	movl	%r13d, %edi
	callq	_WEXITSTATUS
	leaq	L_.str(%rip), %rsi
	movl	%ebx, %edi
	movl	%eax, %edx
	callq	_fprintf
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	movb	$87, (%rax)
	xorl	%eax, %eax
	callq	_clear_inferiors
	movq	_all_processes@GOTPCREL(%rip), %rbx
	movl	8(%rbx), %edi
	callq	_free
	movq	$0, (%rbx)
	movl	$0, 8(%rbx)
	movl	%r13d, %edi
	callq	_WEXITSTATUS
LBB0_9:
                                        ## kill: def $eax killed $eax def $rax
LBB0_10:
	movzbl	%al, %eax
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_11:
	movl	%r13d, %edi
	callq	_WIFSTOPPED
	testl	%eax, %eax
	jne	LBB0_6
## %bb.12:
	movq	_stderr@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	movl	%r13d, %edi
	callq	_WTERMSIG
	leaq	L_.str.1(%rip), %rsi
	movl	%ebx, %edi
	movl	%eax, %edx
	callq	_fprintf
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	movb	$88, (%rax)
	xorl	%eax, %eax
	callq	_clear_inferiors
	movq	_all_processes@GOTPCREL(%rip), %rbx
	movl	8(%rbx), %edi
	callq	_free
	movq	$0, (%rbx)
	movl	$0, 8(%rbx)
	movl	%r13d, %edi
	callq	_WTERMSIG
	jmp	LBB0_9
	.cfi_endproc
                                        ## -- End function
	.comm	_cont_thread,8,3                ## @cont_thread
	.comm	_all_threads,16,3               ## @all_threads
	.comm	_stderr,4,2                     ## @stderr
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"\nChild exited with retcode = %x \n"

	.comm	_all_processes,16,3             ## @all_processes
L_.str.1:                               ## @.str.1
	.asciz	"\nChild terminated with signal = %x \n"

	.no_dead_strip	_fbsd_wait
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function fbsd_wait
_fbsd_wait:                             ; @fbsd_wait
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	stp	x26, x25, [sp, #32]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #48]             ; 16-byte Folded Spill
	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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	mov	x19, x0
	mov	x22, #0
	mov	x8, sp
	add	x23, x8, #8
Lloh0:
	adrp	x24, _cont_thread@GOTPAGE
Lloh1:
	ldr	x24, [x24, _cont_thread@GOTPAGEOFF]
Lloh2:
	adrp	x21, _all_threads@GOTPAGE
Lloh3:
	ldr	x21, [x21, _all_threads@GOTPAGEOFF]
	mov	w25, #-1
LBB0_1:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x1, [x24]
	cmp	x1, #1
	b.lt	LBB0_4
; %bb.2:                                ;   in Loop: Header=BB0_1 Depth=1
	mov	x0, x21
	bl	_find_inferior_id
	mov	x22, x0
	cbnz	x0, LBB0_4
; %bb.3:                                ;   in Loop: Header=BB0_1 Depth=1
	str	w25, [sp]
	stp	xzr, xzr, [x23, #8]
	str	xzr, [x23]
	mov	x0, sp
	bl	_fbsd_resume
LBB0_4:                                 ;   in Loop: Header=BB0_1 Depth=1
	bl	_enable_async_io
	bl	_unblock_async_io
	mov	x0, x22
	bl	_fbsd_wait_for_event
	mov	x20, x0
	bl	_stop_all_processes
	bl	_disable_async_io
	ldp	x8, x9, [x21]
	mov	x0, x20
	cmp	x8, x9
	b.eq	LBB0_7
; %bb.5:                                ;   in Loop: Header=BB0_1 Depth=1
	bl	_WIFSTOPPED
	cbz	w0, LBB0_1
LBB0_6:
	mov	w8, #84
	strb	w8, [x19]
	mov	x0, x20
	bl	_WSTOPSIG
	b	LBB0_10
LBB0_7:
	bl	_WIFEXITED
	cbz	x0, LBB0_11
; %bb.8:
Lloh4:
	adrp	x8, _stderr@GOTPAGE
Lloh5:
	ldr	x8, [x8, _stderr@GOTPAGEOFF]
Lloh6:
	ldr	w21, [x8]
	mov	x0, x20
	bl	_WEXITSTATUS
	mov	x2, x0
Lloh7:
	adrp	x1, l_.str@PAGE
Lloh8:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x21
	bl	_fprintf
	mov	w8, #87
	strb	w8, [x19]
	bl	_clear_inferiors
Lloh9:
	adrp	x19, _all_processes@GOTPAGE
Lloh10:
	ldr	x19, [x19, _all_processes@GOTPAGEOFF]
	ldr	w0, [x19, #8]
	bl	_free
	str	xzr, [x19]
	str	wzr, [x19, #8]
	mov	x0, x20
	bl	_WEXITSTATUS
LBB0_9:
                                        ; kill: def $w0 killed $w0 def $x0
LBB0_10:
	and	w0, w0, #0xff
	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
	ldp	x24, x23, [sp, #48]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #112
	ret
LBB0_11:
	mov	x0, x20
	bl	_WIFSTOPPED
	cbnz	w0, LBB0_6
; %bb.12:
Lloh11:
	adrp	x8, _stderr@GOTPAGE
Lloh12:
	ldr	x8, [x8, _stderr@GOTPAGEOFF]
Lloh13:
	ldr	w21, [x8]
	mov	x0, x20
	bl	_WTERMSIG
	mov	x2, x0
Lloh14:
	adrp	x1, l_.str.1@PAGE
Lloh15:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x21
	bl	_fprintf
	mov	w8, #88
	strb	w8, [x19]
	bl	_clear_inferiors
Lloh16:
	adrp	x19, _all_processes@GOTPAGE
Lloh17:
	ldr	x19, [x19, _all_processes@GOTPAGEOFF]
	ldr	w0, [x19, #8]
	bl	_free
	str	xzr, [x19]
	str	wzr, [x19, #8]
	mov	x0, x20
	bl	_WTERMSIG
	b	LBB0_9
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpAdd	Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh16, Lloh17
	.loh AdrpAdd	Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.cfi_endproc
                                        ; -- End function
	.comm	_cont_thread,8,3                ; @cont_thread
	.comm	_all_threads,16,3               ; @all_threads
	.comm	_stderr,4,2                     ; @stderr
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"\nChild exited with retcode = %x \n"

	.comm	_all_processes,16,3             ; @all_processes
l_.str.1:                               ; @.str.1
	.asciz	"\nChild terminated with signal = %x \n"

	.no_dead_strip	_fbsd_wait
.subsections_via_symbols
