	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_fbsd_thread_get_local_address  ## -- Begin function fbsd_thread_get_local_address
	.p2align	4, 0x90
_fbsd_thread_get_local_address:         ## @fbsd_thread_get_local_address
	.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
	movl	%edx, %ebx
	movq	%rsi, %r13
	movl	%edi, %r14d
	movq	_OBJF_SHARED@GOTPCREL(%rip), %rax
	movl	(%rax), %r15d
	andl	(%rsi), %r15d
	callq	_IS_THREAD
	testq	%rax, %rax
	je	LBB0_1
## %bb.2:
	movl	%ebx, -44(%rbp)                 ## 4-byte Spill
	movq	%r13, %rdi
	callq	_svr4_fetch_objfile_link_map
	movl	%eax, %r12d
	testl	%eax, %eax
	jne	LBB0_4
## %bb.3:
	testl	%r15d, %r15d
	movq	8(%r13), %rsi
	leaq	L_.str.1(%rip), %rax
	leaq	L_.str(%rip), %rdi
	cmoveq	%rax, %rdi
	xorl	%eax, %eax
	callq	_error
LBB0_4:
	movq	_thread_agent@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	movl	%r14d, %edi
	callq	_GET_THREAD
	leaq	-68(%rbp), %rdx
	movl	%ebx, %edi
	movq	%rax, %rsi
	movq	%rdx, %rbx
	callq	_td_ta_map_id2thr_p
	movq	_builtin_type_void_data_ptr@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	-56(%rbp), %rdi
	movl	%r12d, %edx
	callq	_store_typed_address
	movq	-56(%rbp), %rsi
	leaq	-64(%rbp), %rcx
	movq	%rbx, %rdi
	movl	-44(%rbp), %edx                 ## 4-byte Reload
	callq	_td_thr_tls_get_addr_p
	movl	%eax, %ebx
	movq	_TD_OK@GOTPCREL(%rip), %rax
	cmpl	(%rax), %ebx
	je	LBB0_6
## %bb.5:
	movl	%r14d, %edi
	callq	_GET_THREAD
	movq	%rax, %r14
	movq	8(%r13), %r12
	movl	%ebx, %edi
	callq	_thread_db_err_str
	testl	%r15d, %r15d
	leaq	L_.str.3(%rip), %rcx
	leaq	L_.str.2(%rip), %rdi
	cmoveq	%rcx, %rdi
	movq	%r14, %rsi
	movq	%r12, %rdx
	movl	%eax, %ecx
	xorl	%eax, %eax
	callq	_error
LBB0_6:
	movq	_builtin_type_void_data_ptr@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	-64(%rbp), %rdi
	callq	_extract_typed_address
	jmp	LBB0_7
LBB0_1:
	xorl	%eax, %eax
LBB0_7:
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_OBJF_SHARED,4,2                ## @OBJF_SHARED
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Cannot find shared library `%s' link_map in dynamic linker's module list"

L_.str.1:                               ## @.str.1
	.asciz	"Cannot find executable file `%s' link_map in dynamic linker's module list"

	.comm	_thread_agent,4,2               ## @thread_agent
	.comm	_builtin_type_void_data_ptr,4,2 ## @builtin_type_void_data_ptr
	.comm	_TD_OK,4,2                      ## @TD_OK
L_.str.2:                               ## @.str.2
	.asciz	"Cannot find thread-local storage for thread %ld, shared library %s:\n%s"

L_.str.3:                               ## @.str.3
	.asciz	"Cannot find thread-local storage for thread %ld, executable file %s:\n%s"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_fbsd_thread_get_local_address  ; -- Begin function fbsd_thread_get_local_address
	.p2align	2
_fbsd_thread_get_local_address:         ; @fbsd_thread_get_local_address
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	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
	mov	x21, x2
	mov	x19, x1
	mov	x20, x0
	ldr	w22, [x1]
Lloh0:
	adrp	x8, _OBJF_SHARED@GOTPAGE
Lloh1:
	ldr	x8, [x8, _OBJF_SHARED@GOTPAGEOFF]
Lloh2:
	ldr	w23, [x8]
	bl	_IS_THREAD
	cbz	x0, LBB0_6
; %bb.1:
	and	w24, w23, w22
	mov	x0, x19
	bl	_svr4_fetch_objfile_link_map
	mov	x22, x0
	cbnz	w0, LBB0_3
; %bb.2:
	ldr	x8, [x19, #8]
Lloh3:
	adrp	x9, l_.str@PAGE
Lloh4:
	add	x9, x9, l_.str@PAGEOFF
Lloh5:
	adrp	x10, l_.str.1@PAGE
Lloh6:
	add	x10, x10, l_.str.1@PAGEOFF
	cmp	w24, #0
	csel	x0, x10, x9, eq
	str	x8, [sp]
	bl	_error
LBB0_3:
Lloh7:
	adrp	x8, _thread_agent@GOTPAGE
Lloh8:
	ldr	x8, [x8, _thread_agent@GOTPAGEOFF]
Lloh9:
	ldr	w23, [x8]
	mov	x0, x20
	bl	_GET_THREAD
	mov	x1, x0
	add	x2, sp, #44
	mov	x0, x23
	bl	_td_ta_map_id2thr_p
Lloh10:
	adrp	x23, _builtin_type_void_data_ptr@GOTPAGE
Lloh11:
	ldr	x23, [x23, _builtin_type_void_data_ptr@GOTPAGEOFF]
	ldr	w1, [x23]
	add	x0, sp, #24
	mov	x2, x22
	bl	_store_typed_address
	ldr	x1, [sp, #24]
	add	x0, sp, #44
	add	x3, sp, #32
	mov	x2, x21
	bl	_td_thr_tls_get_addr_p
Lloh12:
	adrp	x8, _TD_OK@GOTPAGE
Lloh13:
	ldr	x8, [x8, _TD_OK@GOTPAGEOFF]
Lloh14:
	ldr	w8, [x8]
	cmp	w0, w8
	b.eq	LBB0_5
; %bb.4:
	mov	x21, x0
	mov	x0, x20
	bl	_GET_THREAD
	mov	x20, x0
	ldr	x19, [x19, #8]
	mov	x0, x21
	bl	_thread_db_err_str
                                        ; kill: def $w0 killed $w0 def $x0
Lloh15:
	adrp	x8, l_.str.2@PAGE
Lloh16:
	add	x8, x8, l_.str.2@PAGEOFF
Lloh17:
	adrp	x9, l_.str.3@PAGE
Lloh18:
	add	x9, x9, l_.str.3@PAGEOFF
	cmp	w24, #0
	csel	x8, x9, x8, eq
	stp	x19, x0, [sp, #8]
	str	x20, [sp]
	mov	x0, x8
	bl	_error
LBB0_5:
	ldr	w1, [x23]
	add	x0, sp, #32
	bl	_extract_typed_address
LBB0_6:
	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
	add	sp, sp, #112
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpAdd	Lloh17, Lloh18
	.loh AdrpAdd	Lloh15, Lloh16
	.cfi_endproc
                                        ; -- End function
	.comm	_OBJF_SHARED,4,2                ; @OBJF_SHARED
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Cannot find shared library `%s' link_map in dynamic linker's module list"

l_.str.1:                               ; @.str.1
	.asciz	"Cannot find executable file `%s' link_map in dynamic linker's module list"

	.comm	_thread_agent,4,2               ; @thread_agent
	.comm	_builtin_type_void_data_ptr,4,2 ; @builtin_type_void_data_ptr
	.comm	_TD_OK,4,2                      ; @TD_OK
l_.str.2:                               ; @.str.2
	.asciz	"Cannot find thread-local storage for thread %ld, shared library %s:\n%s"

l_.str.3:                               ; @.str.3
	.asciz	"Cannot find thread-local storage for thread %ld, executable file %s:\n%s"

.subsections_via_symbols
