	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function thread_db_wait
_thread_db_wait:                        ## @thread_db_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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r15
	movl	%edi, %ebx
	callq	_GET_PID
	cmpl	$-1, %eax
	je	LBB0_3
## %bb.1:
	movl	%ebx, %edi
	callq	_is_thread
	testq	%rax, %rax
	je	LBB0_3
## %bb.2:
	movl	%ebx, %edi
	callq	_lwp_from_thread
	movl	%eax, %ebx
LBB0_3:
	movq	_target_beneath@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movl	%ebx, %edi
	movq	%r15, %rsi
	callq	*(%rax)
	movl	%eax, %r14d
	movq	_proc_handle@GOTPCREL(%rip), %rax
	cmpq	$0, (%rax)
	je	LBB0_11
## %bb.4:
	movq	(%r15), %rax
	movq	_TARGET_WAITKIND_EXITED@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_5
## %bb.12:
	movl	$-1, %edi
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_pid_to_ptid                    ## TAILCALL
LBB0_11:
	movl	%r14d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_5:
	movq	_TARGET_WAITKIND_STOPPED@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_8
## %bb.6:
	movq	8(%r15), %rax
	movq	_TARGET_SIGNAL_TRAP@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_8
## %bb.7:
	movl	%r14d, %edi
	callq	_check_event
LBB0_8:
	movq	_trap_ptid@GOTPCREL(%rip), %rbx
	movl	(%rbx), %edi
	movq	_null_ptid@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_ptid_equal
	testl	%eax, %eax
	jne	LBB0_10
## %bb.9:
	movl	(%rbx), %edi
	callq	_thread_from_lwp
	movl	%eax, (%rbx)
LBB0_10:
	movl	%r14d, %edi
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_thread_from_lwp                ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_target_beneath,8,3             ## @target_beneath
	.comm	_proc_handle,8,3                ## @proc_handle
	.comm	_TARGET_WAITKIND_EXITED,8,3     ## @TARGET_WAITKIND_EXITED
	.comm	_TARGET_WAITKIND_STOPPED,8,3    ## @TARGET_WAITKIND_STOPPED
	.comm	_TARGET_SIGNAL_TRAP,8,3         ## @TARGET_SIGNAL_TRAP
	.comm	_null_ptid,4,2                  ## @null_ptid
	.no_dead_strip	_thread_db_wait
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function thread_db_wait
_thread_db_wait:                        ; @thread_db_wait
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	mov	x19, x1
	mov	x20, x0
	bl	_GET_PID
	cmn	w0, #1
	b.eq	LBB0_3
; %bb.1:
	mov	x0, x20
	bl	_is_thread
	cbz	x0, LBB0_3
; %bb.2:
	mov	x0, x20
	bl	_lwp_from_thread
	mov	x20, x0
LBB0_3:
Lloh0:
	adrp	x8, _target_beneath@GOTPAGE
Lloh1:
	ldr	x8, [x8, _target_beneath@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	ldr	x8, [x8]
	mov	x0, x20
	mov	x1, x19
	blr	x8
	mov	x20, x0
Lloh3:
	adrp	x8, _proc_handle@GOTPAGE
Lloh4:
	ldr	x8, [x8, _proc_handle@GOTPAGEOFF]
Lloh5:
	ldr	x8, [x8]
	cbz	x8, LBB0_6
; %bb.4:
	ldr	x8, [x19]
Lloh6:
	adrp	x9, _TARGET_WAITKIND_EXITED@GOTPAGE
Lloh7:
	ldr	x9, [x9, _TARGET_WAITKIND_EXITED@GOTPAGEOFF]
Lloh8:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_7
; %bb.5:
	mov	w0, #-1
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	b	_pid_to_ptid
LBB0_6:
	mov	x0, x20
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
LBB0_7:
Lloh9:
	adrp	x9, _TARGET_WAITKIND_STOPPED@GOTPAGE
Lloh10:
	ldr	x9, [x9, _TARGET_WAITKIND_STOPPED@GOTPAGEOFF]
Lloh11:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_10
; %bb.8:
	ldr	x8, [x19, #8]
Lloh12:
	adrp	x9, _TARGET_SIGNAL_TRAP@GOTPAGE
Lloh13:
	ldr	x9, [x9, _TARGET_SIGNAL_TRAP@GOTPAGEOFF]
Lloh14:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_10
; %bb.9:
	mov	x0, x20
	bl	_check_event
LBB0_10:
Lloh15:
	adrp	x19, _trap_ptid@GOTPAGE
Lloh16:
	ldr	x19, [x19, _trap_ptid@GOTPAGEOFF]
	ldr	w0, [x19]
Lloh17:
	adrp	x8, _null_ptid@GOTPAGE
Lloh18:
	ldr	x8, [x8, _null_ptid@GOTPAGEOFF]
Lloh19:
	ldr	w1, [x8]
	bl	_ptid_equal
	cbnz	w0, LBB0_12
; %bb.11:
	ldr	w0, [x19]
	bl	_thread_from_lwp
	str	w0, [x19]
LBB0_12:
	mov	x0, x20
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	b	_thread_from_lwp
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGot	Lloh15, Lloh16
	.cfi_endproc
                                        ; -- End function
	.comm	_target_beneath,8,3             ; @target_beneath
	.comm	_proc_handle,8,3                ; @proc_handle
	.comm	_TARGET_WAITKIND_EXITED,8,3     ; @TARGET_WAITKIND_EXITED
	.comm	_TARGET_WAITKIND_STOPPED,8,3    ; @TARGET_WAITKIND_STOPPED
	.comm	_TARGET_SIGNAL_TRAP,8,3         ; @TARGET_SIGNAL_TRAP
	.comm	_null_ptid,4,2                  ; @null_ptid
	.no_dead_strip	_thread_db_wait
.subsections_via_symbols
