	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function thread_from_lwp
_thread_from_lwp:                       ## @thread_from_lwp
	.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
	movq	%rdx, %r14
	movq	%rsi, %r15
	movl	%edi, %ebx
	callq	_IS_LWP
	movl	%eax, %edi
	callq	_gdb_assert
	movq	_fbsd_thread_active@GOTPCREL(%rip), %rax
	cmpq	$0, (%rax)
	je	LBB0_5
## %bb.1:
	movq	_thread_agent@GOTPCREL(%rip), %rax
	movl	(%rax), %r12d
	movl	%ebx, %edi
	callq	_GET_LWP
	movl	%r12d, %edi
	movl	%eax, %esi
	movq	%r15, %rdx
	callq	_td_ta_map_lwp2thr_p
	movq	_TD_OK@GOTPCREL(%rip), %r12
	cmpq	(%r12), %rax
	jne	LBB0_5
## %bb.2:
	movq	%r15, %rdi
	movq	%r14, %rsi
	callq	_td_thr_get_info_p
	cmpq	(%r12), %rax
	je	LBB0_4
## %bb.3:
	movq	%rax, %rdi
	callq	_thread_db_err_str
	leaq	L_.str(%rip), %rdi
	movl	%eax, %esi
	callq	_error
LBB0_4:
	movl	(%r14), %r14d
	movl	%ebx, %edi
	callq	_GET_PID
	movl	%r14d, %edi
	movl	%eax, %esi
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_BUILD_THREAD                   ## TAILCALL
LBB0_5:
	movl	%ebx, %edi
	callq	_GET_LWP
	movl	%eax, %r14d
	movl	%ebx, %edi
	callq	_GET_PID
	movl	%r14d, %edi
	movl	%eax, %esi
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_BUILD_LWP                      ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_fbsd_thread_active,8,3         ## @fbsd_thread_active
	.comm	_thread_agent,4,2               ## @thread_agent
	.comm	_TD_OK,8,3                      ## @TD_OK
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Cannot get thread info: %s"

	.no_dead_strip	_thread_from_lwp
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function thread_from_lwp
_thread_from_lwp:                       ; @thread_from_lwp
	.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
	mov	x20, x2
	mov	x21, x1
	mov	x19, x0
	bl	_IS_LWP
	bl	_gdb_assert
Lloh0:
	adrp	x8, _fbsd_thread_active@GOTPAGE
Lloh1:
	ldr	x8, [x8, _fbsd_thread_active@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	cbz	x8, LBB0_5
; %bb.1:
Lloh3:
	adrp	x8, _thread_agent@GOTPAGE
Lloh4:
	ldr	x8, [x8, _thread_agent@GOTPAGEOFF]
Lloh5:
	ldr	w22, [x8]
	mov	x0, x19
	bl	_GET_LWP
	mov	x1, x0
	mov	x0, x22
	mov	x2, x21
	bl	_td_ta_map_lwp2thr_p
Lloh6:
	adrp	x22, _TD_OK@GOTPAGE
Lloh7:
	ldr	x22, [x22, _TD_OK@GOTPAGEOFF]
	ldr	x8, [x22]
	cmp	x0, x8
	b.ne	LBB0_5
; %bb.2:
	mov	x0, x21
	mov	x1, x20
	bl	_td_thr_get_info_p
	ldr	x8, [x22]
	cmp	x0, x8
	b.eq	LBB0_4
; %bb.3:
	bl	_thread_db_err_str
	mov	x1, x0
Lloh8:
	adrp	x0, l_.str@PAGE
Lloh9:
	add	x0, x0, l_.str@PAGEOFF
	bl	_error
LBB0_4:
	ldr	w20, [x20]
	mov	x0, x19
	bl	_GET_PID
	mov	x1, x0
	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
	b	_BUILD_THREAD
LBB0_5:
	mov	x0, x19
	bl	_GET_LWP
	mov	x20, x0
	mov	x0, x19
	bl	_GET_PID
	mov	x1, x0
	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
	b	_BUILD_LWP
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpAdd	Lloh8, Lloh9
	.cfi_endproc
                                        ; -- End function
	.comm	_fbsd_thread_active,8,3         ; @fbsd_thread_active
	.comm	_thread_agent,4,2               ; @thread_agent
	.comm	_TD_OK,8,3                      ; @TD_OK
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Cannot get thread info: %s"

	.no_dead_strip	_thread_from_lwp
.subsections_via_symbols
