	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function sol_thread_store_registers
_sol_thread_store_registers:            ## @sol_thread_store_registers
	.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
	movl	%edi, %r13d
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	movq	_inferior_ptid@GOTPCREL(%rip), %rbx
	movl	(%rbx), %edi
	callq	_is_thread
	testl	%eax, %eax
	je	LBB0_1
## %bb.3:
	movl	(%rbx), %edi
	callq	_GET_THREAD
	movq	_main_ta@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edi
	leaq	-52(%rbp), %rdx
	movl	%eax, %esi
	callq	_p_td_ta_map_id2thr
	movq	_TD_OK@GOTPCREL(%rip), %r15
	cmpq	(%r15), %rax
	je	LBB0_5
## %bb.4:
	movq	%rax, %rdi
	callq	_td_err_string
	leaq	L_.str(%rip), %rdi
	movl	%eax, %esi
	callq	_error
LBB0_5:
	cmpl	$-1, %r13d
	je	LBB0_11
## %bb.6:
	movq	%rsp, %r12
	movq	_MAX_REGISTER_SIZE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	callq	____chkstk_darwin
	addq	$15, %rax
	andq	$-16, %rax
	subq	%rax, %rsp
	movq	%rsp, %r14
	movl	%r13d, %edi
	movq	%r14, %rsi
	callq	_regcache_collect
	leaq	-52(%rbp), %rdi
	callq	_p_td_thr_getgregs
	cmpq	(%r15), %rax
	je	LBB0_8
## %bb.7:
	movq	%rax, %rdi
	callq	_td_err_string
	leaq	L_.str.1(%rip), %rdi
	movl	%eax, %esi
	callq	_error
LBB0_8:
	leaq	-52(%rbp), %rdi
	leaq	-56(%rbp), %rsi
	callq	_p_td_thr_getfpregs
	cmpq	(%r15), %rax
	je	LBB0_10
## %bb.9:
	movq	%rax, %rdi
	callq	_td_err_string
	leaq	L_.str.2(%rip), %rdi
	movl	%eax, %esi
	callq	_error
LBB0_10:
	movl	%r13d, %edi
	movq	%r14, %rsi
	callq	_supply_register
	movq	%r12, %rsp
LBB0_11:
	leaq	-60(%rbp), %rdi
	movl	%r13d, %esi
	callq	_fill_gregset
	leaq	-56(%rbp), %rdi
	movl	%r13d, %esi
	callq	_fill_fpregset
	movl	-60(%rbp), %esi
	leaq	-52(%rbp), %rdi
	callq	_p_td_thr_setgregs
	cmpq	(%r15), %rax
	je	LBB0_13
## %bb.12:
	movq	%rax, %rdi
	callq	_td_err_string
	leaq	L_.str.3(%rip), %rdi
	movl	%eax, %esi
	callq	_error
LBB0_13:
	leaq	-52(%rbp), %rdi
	leaq	-56(%rbp), %rsi
	callq	_p_td_thr_setfpregs
	cmpq	(%r15), %rax
	je	LBB0_15
## %bb.14:
	movq	%rax, %rdi
	callq	_td_err_string
	leaq	L_.str.4(%rip), %rdi
	movl	%eax, %esi
	callq	_error
LBB0_15:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-48(%rbp), %rax
	jne	LBB0_17
## %bb.16:
	leaq	-40(%rbp), %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_1:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-48(%rbp), %rax
	jne	LBB0_17
## %bb.2:
	movq	_procfs_ops@GOTPCREL(%rip), %rax
	movl	%r13d, %edi
	leaq	-40(%rbp), %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmpq	*(%rax)                         ## TAILCALL
LBB0_17:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_inferior_ptid,4,2              ## @inferior_ptid
	.comm	_procfs_ops,8,3                 ## @procfs_ops
	.comm	_main_ta,4,2                    ## @main_ta
	.comm	_TD_OK,8,3                      ## @TD_OK
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"sol_thread_store_registers: td_ta_map_id2thr %s"

	.comm	_MAX_REGISTER_SIZE,4,2          ## @MAX_REGISTER_SIZE
L_.str.1:                               ## @.str.1
	.asciz	"sol_thread_store_registers: td_thr_getgregs %s"

L_.str.2:                               ## @.str.2
	.asciz	"sol_thread_store_registers: td_thr_getfpregs %s"

L_.str.3:                               ## @.str.3
	.asciz	"sol_thread_store_registers: td_thr_setgregs %s"

L_.str.4:                               ## @.str.4
	.asciz	"sol_thread_store_registers: td_thr_setfpregs %s"

	.comm	_TD_NOXREGS,8,3                 ## @TD_NOXREGS
	.no_dead_strip	_sol_thread_store_registers
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function sol_thread_store_registers
_sol_thread_store_registers:            ; @sol_thread_store_registers
	.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
	sub	sp, sp, #32
	mov	x19, x0
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	stur	x8, [x29, #-40]
Lloh3:
	adrp	x20, _inferior_ptid@GOTPAGE
Lloh4:
	ldr	x20, [x20, _inferior_ptid@GOTPAGEOFF]
	ldr	w0, [x20]
	bl	_is_thread
	cbz	w0, LBB0_15
; %bb.1:
	ldr	w0, [x20]
	bl	_GET_THREAD
	mov	x1, x0
Lloh5:
	adrp	x8, _main_ta@GOTPAGE
Lloh6:
	ldr	x8, [x8, _main_ta@GOTPAGEOFF]
Lloh7:
	ldr	w0, [x8]
	sub	x2, x29, #44
	bl	_p_td_ta_map_id2thr
Lloh8:
	adrp	x21, _TD_OK@GOTPAGE
Lloh9:
	ldr	x21, [x21, _TD_OK@GOTPAGEOFF]
	ldr	x8, [x21]
	cmp	x0, x8
	b.eq	LBB0_3
; %bb.2:
	bl	_td_err_string
	mov	x1, x0
Lloh10:
	adrp	x0, l_.str@PAGE
Lloh11:
	add	x0, x0, l_.str@PAGEOFF
	bl	_error
LBB0_3:
	cmn	w19, #1
	b.eq	LBB0_9
; %bb.4:
	mov	x22, sp
Lloh12:
	adrp	x8, _MAX_REGISTER_SIZE@GOTPAGE
Lloh13:
	ldr	x8, [x8, _MAX_REGISTER_SIZE@GOTPAGEOFF]
Lloh14:
	ldr	w8, [x8]
	mov	x9, x8
Lloh15:
	adrp	x16, ___chkstk_darwin@GOTPAGE
Lloh16:
	ldr	x16, [x16, ___chkstk_darwin@GOTPAGEOFF]
	blr	x16
	mov	x9, sp
	add	x8, x8, #15
	and	x8, x8, #0x1fffffff0
	sub	x20, x9, x8
	mov	sp, x20
	mov	x0, x19
	mov	x1, x20
	bl	_regcache_collect
	sub	x0, x29, #44
	bl	_p_td_thr_getgregs
	ldr	x8, [x21]
	cmp	x0, x8
	b.eq	LBB0_6
; %bb.5:
	bl	_td_err_string
	mov	x1, x0
Lloh17:
	adrp	x0, l_.str.1@PAGE
Lloh18:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_error
LBB0_6:
	sub	x0, x29, #44
	sub	x1, x29, #52
	bl	_p_td_thr_getfpregs
	ldr	x8, [x21]
	cmp	x0, x8
	b.eq	LBB0_8
; %bb.7:
	bl	_td_err_string
	mov	x1, x0
Lloh19:
	adrp	x0, l_.str.2@PAGE
Lloh20:
	add	x0, x0, l_.str.2@PAGEOFF
	bl	_error
LBB0_8:
	mov	x0, x19
	mov	x1, x20
	bl	_supply_register
	mov	sp, x22
LBB0_9:
	sub	x0, x29, #48
	mov	x1, x19
	bl	_fill_gregset
	sub	x0, x29, #52
	mov	x1, x19
	bl	_fill_fpregset
	ldur	w1, [x29, #-48]
	sub	x0, x29, #44
	bl	_p_td_thr_setgregs
	ldr	x8, [x21]
	cmp	x0, x8
	b.eq	LBB0_11
; %bb.10:
	bl	_td_err_string
	mov	x1, x0
Lloh21:
	adrp	x0, l_.str.3@PAGE
Lloh22:
	add	x0, x0, l_.str.3@PAGEOFF
	bl	_error
LBB0_11:
	sub	x0, x29, #44
	sub	x1, x29, #52
	bl	_p_td_thr_setfpregs
	ldr	x8, [x21]
	cmp	x0, x8
	b.eq	LBB0_13
; %bb.12:
	bl	_td_err_string
	mov	x1, x0
Lloh23:
	adrp	x0, l_.str.4@PAGE
Lloh24:
	add	x0, x0, l_.str.4@PAGEOFF
	bl	_error
LBB0_13:
	ldur	x8, [x29, #-40]
Lloh25:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh26:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh27:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_17
; %bb.14:
	sub	sp, x29, #32
	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
LBB0_15:
Lloh28:
	adrp	x8, _procfs_ops@GOTPAGE
Lloh29:
	ldr	x8, [x8, _procfs_ops@GOTPAGEOFF]
Lloh30:
	ldr	x1, [x8]
	ldur	x8, [x29, #-40]
Lloh31:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh32:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh33:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_17
; %bb.16:
	mov	x0, x19
	sub	sp, x29, #32
	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
	br	x1
LBB0_17:
	bl	___stack_chk_fail
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpAdd	Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpAdd	Lloh17, Lloh18
	.loh AdrpAdd	Lloh19, Lloh20
	.loh AdrpAdd	Lloh21, Lloh22
	.loh AdrpAdd	Lloh23, Lloh24
	.loh AdrpLdrGotLdr	Lloh25, Lloh26, Lloh27
	.loh AdrpLdrGotLdr	Lloh31, Lloh32, Lloh33
	.loh AdrpLdrGotLdr	Lloh28, Lloh29, Lloh30
	.cfi_endproc
                                        ; -- End function
	.comm	_inferior_ptid,4,2              ; @inferior_ptid
	.comm	_procfs_ops,8,3                 ; @procfs_ops
	.comm	_main_ta,4,2                    ; @main_ta
	.comm	_TD_OK,8,3                      ; @TD_OK
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"sol_thread_store_registers: td_ta_map_id2thr %s"

	.comm	_MAX_REGISTER_SIZE,4,2          ; @MAX_REGISTER_SIZE
l_.str.1:                               ; @.str.1
	.asciz	"sol_thread_store_registers: td_thr_getgregs %s"

l_.str.2:                               ; @.str.2
	.asciz	"sol_thread_store_registers: td_thr_getfpregs %s"

l_.str.3:                               ; @.str.3
	.asciz	"sol_thread_store_registers: td_thr_setgregs %s"

l_.str.4:                               ; @.str.4
	.asciz	"sol_thread_store_registers: td_thr_setfpregs %s"

	.comm	_TD_NOXREGS,8,3                 ; @TD_NOXREGS
	.no_dead_strip	_sol_thread_store_registers
.subsections_via_symbols
