	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	__thr_find_thread               ## -- Begin function _thr_find_thread
	.p2align	4, 0x90
__thr_find_thread:                      ## @_thr_find_thread
	.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
	testq	%rsi, %rsi
	je	LBB0_1
## %bb.2:
	movl	%edx, %r15d
	movq	%rsi, %rbx
	movq	%rdi, %r14
	callq	_THREAD_LIST_RDLOCK
	movq	%rbx, %rdi
	callq	__thr_hash_find
	testq	%rax, %rax
	je	LBB0_6
## %bb.3:
	movq	%rax, %rbx
	movq	%r14, %rdi
	movq	%rax, %rsi
	callq	_THR_THREAD_LOCK
	xorl	%r12d, %r12d
	testl	%r15d, %r15d
	jne	LBB0_7
## %bb.4:
	movq	(%rbx), %rax
	movq	_PS_DEAD@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_7
## %bb.5:
	movq	%r14, %rdi
	movq	%rbx, %rsi
	callq	_THR_THREAD_UNLOCK
LBB0_6:
	movq	_ESRCH@GOTPCREL(%rip), %rax
	movl	(%rax), %r12d
LBB0_7:
	movq	%r14, %rdi
	callq	_THREAD_LIST_UNLOCK
	jmp	LBB0_8
LBB0_1:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	movl	(%rax), %r12d
LBB0_8:
	movl	%r12d, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_PS_DEAD,8,3                    ## @PS_DEAD
	.comm	_ESRCH,4,2                      ## @ESRCH
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	__thr_find_thread               ; -- Begin function _thr_find_thread
	.p2align	2
__thr_find_thread:                      ; @_thr_find_thread
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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
	cbz	x1, LBB0_6
; %bb.1:
	mov	x20, x2
	mov	x21, x1
	mov	x19, x0
	bl	_THREAD_LIST_RDLOCK
	mov	x0, x21
	bl	__thr_hash_find
	cbz	x0, LBB0_5
; %bb.2:
	mov	x21, x0
	mov	x0, x19
	mov	x1, x21
	bl	_THR_THREAD_LOCK
	cbnz	w20, LBB0_7
; %bb.3:
	ldr	x8, [x21]
Lloh0:
	adrp	x9, _PS_DEAD@GOTPAGE
Lloh1:
	ldr	x9, [x9, _PS_DEAD@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_7
; %bb.4:
	mov	x0, x19
	mov	x1, x21
	bl	_THR_THREAD_UNLOCK
LBB0_5:
Lloh3:
	adrp	x8, _ESRCH@GOTPAGE
Lloh4:
	ldr	x8, [x8, _ESRCH@GOTPAGEOFF]
Lloh5:
	ldr	w20, [x8]
	b	LBB0_8
LBB0_6:
Lloh6:
	adrp	x8, _EINVAL@GOTPAGE
Lloh7:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh8:
	ldr	w20, [x8]
	b	LBB0_9
LBB0_7:
	mov	w20, #0
LBB0_8:
	mov	x0, x19
	bl	_THREAD_LIST_UNLOCK
LBB0_9:
	mov	x0, x20
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.cfi_endproc
                                        ; -- End function
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_PS_DEAD,8,3                    ; @PS_DEAD
	.comm	_ESRCH,4,2                      ; @ESRCH
.subsections_via_symbols
