	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function child_wait
_child_wait:                            ## @child_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	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, -56(%rbp)                 ## 8-byte Spill
	movq	_inferior_ptid@GOTPCREL(%rip), %r14
	leaq	-44(%rbp), %r15
	movq	_errno@GOTPCREL(%rip), %r12
	jmp	LBB0_1
	.p2align	4, 0x90
LBB0_2:                                 ##   in Loop: Header=BB0_1 Depth=1
	movq	_EINTR@GOTPCREL(%rip), %rax
	cmpl	(%rax), %r13d
	jne	LBB0_3
LBB0_7:                                 ##   in Loop: Header=BB0_1 Depth=1
	movl	(%r14), %edi
	callq	_PIDGET
	cmpl	%eax, %ebx
	je	LBB0_8
LBB0_1:                                 ## =>This Inner Loop Header: Depth=1
	xorl	%eax, %eax
	callq	_set_sigint_trap
	xorl	%eax, %eax
	callq	_set_sigio_trap
	movl	(%r14), %edi
	movq	%r15, %rsi
	callq	_ptrace_wait
	movl	%eax, %ebx
	movl	(%r12), %r13d
	xorl	%eax, %eax
	callq	_clear_sigio_trap
	xorl	%eax, %eax
	callq	_clear_sigint_trap
	cmpl	$-1, %ebx
	je	LBB0_2
## %bb.4:                               ##   in Loop: Header=BB0_1 Depth=1
	movl	-44(%rbp), %esi
	movl	%ebx, %edi
	leaq	-60(%rbp), %rdx
	callq	_target_has_exited
	testq	%rax, %rax
	jne	LBB0_7
## %bb.5:                               ##   in Loop: Header=BB0_1 Depth=1
	movl	%ebx, %edi
	callq	_pid_to_ptid
	movl	%eax, %edi
	callq	_target_thread_alive
	testl	%eax, %eax
	jne	LBB0_7
## %bb.6:
	movq	_TARGET_WAITKIND_SPURIOUS@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movq	-56(%rbp), %rcx                 ## 8-byte Reload
	movl	%eax, (%rcx)
	jmp	LBB0_9
LBB0_8:
	movl	-44(%rbp), %esi
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	callq	_store_waitstatus
	jmp	LBB0_9
LBB0_3:
	movq	_gdb_stderr@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	movl	%r13d, %edi
	callq	_safe_strerror
	leaq	L_.str(%rip), %rsi
	movl	%ebx, %edi
	movl	%eax, %edx
	callq	_fprintf_unfiltered
	movq	_TARGET_WAITKIND_SIGNALLED@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movq	-56(%rbp), %rcx                 ## 8-byte Reload
	movl	%eax, (%rcx)
	movq	_TARGET_SIGNAL_UNKNOWN@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 4(%rcx)
	movl	$-1, %ebx
LBB0_9:
	movl	%ebx, %edi
	callq	_pid_to_ptid
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_inferior_ptid,4,2              ## @inferior_ptid
	.comm	_errno,4,2                      ## @errno
	.comm	_EINTR,4,2                      ## @EINTR
	.comm	_gdb_stderr,4,2                 ## @gdb_stderr
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Child process unexpectedly missing: %s.\n"

	.comm	_TARGET_WAITKIND_SIGNALLED,4,2  ## @TARGET_WAITKIND_SIGNALLED
	.comm	_TARGET_SIGNAL_UNKNOWN,4,2      ## @TARGET_SIGNAL_UNKNOWN
	.comm	_TARGET_WAITKIND_SPURIOUS,4,2   ## @TARGET_WAITKIND_SPURIOUS
	.no_dead_strip	_child_wait
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function child_wait
_child_wait:                            ; @child_wait
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.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
	mov	x19, x1
Lloh0:
	adrp	x22, _inferior_ptid@GOTPAGE
Lloh1:
	ldr	x22, [x22, _inferior_ptid@GOTPAGEOFF]
Lloh2:
	adrp	x23, _errno@GOTPAGE
Lloh3:
	ldr	x23, [x23, _errno@GOTPAGEOFF]
Lloh4:
	adrp	x24, _EINTR@GOTPAGE
Lloh5:
	ldr	x24, [x24, _EINTR@GOTPAGEOFF]
	b	LBB0_3
LBB0_1:                                 ;   in Loop: Header=BB0_3 Depth=1
	ldr	w8, [x24]
	cmp	w21, w8
	b.ne	LBB0_8
LBB0_2:                                 ;   in Loop: Header=BB0_3 Depth=1
	ldr	w0, [x22]
	bl	_PIDGET
	cmp	w20, w0
	b.eq	LBB0_7
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	bl	_set_sigint_trap
	bl	_set_sigio_trap
	ldr	w0, [x22]
	add	x1, sp, #12
	bl	_ptrace_wait
	mov	x20, x0
	ldr	w21, [x23]
	bl	_clear_sigio_trap
	bl	_clear_sigint_trap
	cmn	w20, #1
	b.eq	LBB0_1
; %bb.4:                                ;   in Loop: Header=BB0_3 Depth=1
	ldr	w1, [sp, #12]
	add	x2, sp, #8
	mov	x0, x20
	bl	_target_has_exited
	cbnz	x0, LBB0_2
; %bb.5:                                ;   in Loop: Header=BB0_3 Depth=1
	mov	x0, x20
	bl	_pid_to_ptid
	bl	_target_thread_alive
	cbnz	w0, LBB0_2
; %bb.6:
Lloh6:
	adrp	x8, _TARGET_WAITKIND_SPURIOUS@GOTPAGE
Lloh7:
	ldr	x8, [x8, _TARGET_WAITKIND_SPURIOUS@GOTPAGEOFF]
Lloh8:
	ldr	w8, [x8]
	str	w8, [x19]
	b	LBB0_9
LBB0_7:
	ldr	w1, [sp, #12]
	mov	x0, x19
	bl	_store_waitstatus
	b	LBB0_9
LBB0_8:
Lloh9:
	adrp	x8, _gdb_stderr@GOTPAGE
Lloh10:
	ldr	x8, [x8, _gdb_stderr@GOTPAGEOFF]
Lloh11:
	ldr	w20, [x8]
	mov	x0, x21
	bl	_safe_strerror
	mov	x2, x0
Lloh12:
	adrp	x1, l_.str@PAGE
Lloh13:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x20
	bl	_fprintf_unfiltered
Lloh14:
	adrp	x8, _TARGET_WAITKIND_SIGNALLED@GOTPAGE
Lloh15:
	ldr	x8, [x8, _TARGET_WAITKIND_SIGNALLED@GOTPAGEOFF]
Lloh16:
	ldr	w8, [x8]
	str	w8, [x19]
Lloh17:
	adrp	x8, _TARGET_SIGNAL_UNKNOWN@GOTPAGE
Lloh18:
	ldr	x8, [x8, _TARGET_SIGNAL_UNKNOWN@GOTPAGEOFF]
Lloh19:
	ldr	w8, [x8]
	str	w8, [x19, #4]
	mov	w20, #-1
LBB0_9:
	mov	x0, x20
	bl	_pid_to_ptid
	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
	add	sp, sp, #80
	ret
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpAdd	Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.cfi_endproc
                                        ; -- End function
	.comm	_inferior_ptid,4,2              ; @inferior_ptid
	.comm	_errno,4,2                      ; @errno
	.comm	_EINTR,4,2                      ; @EINTR
	.comm	_gdb_stderr,4,2                 ; @gdb_stderr
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Child process unexpectedly missing: %s.\n"

	.comm	_TARGET_WAITKIND_SIGNALLED,4,2  ; @TARGET_WAITKIND_SIGNALLED
	.comm	_TARGET_SIGNAL_UNKNOWN,4,2      ; @TARGET_SIGNAL_UNKNOWN
	.comm	_TARGET_WAITKIND_SPURIOUS,4,2   ; @TARGET_WAITKIND_SPURIOUS
	.no_dead_strip	_child_wait
.subsections_via_symbols
