	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function restore_fpu_curthread
_restore_fpu_curthread:                 ## @restore_fpu_curthread
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r14
	pushq	%rbx
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	%rdi, %rbx
	movq	_fpcurthread@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	%rbx, %rsi
	callq	_PCPU_SET
	xorl	%eax, %eax
	callq	_stop_emulating
	xorl	%eax, %eax
	callq	_fpu_clean_state
	movq	(%rbx), %rbx
	movq	_PCB_FPUINITDONE@GOTPCREL(%rip), %r14
	movl	(%r14), %eax
	testl	%eax, (%rbx)
	je	LBB0_1
## %bb.6:
	movl	16(%rbx), %edi
	popq	%rbx
	popq	%r14
	popq	%rbp
	jmp	_fpurestore                     ## TAILCALL
LBB0_1:
	movq	_fpu_initialstate@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movl	16(%rbx), %esi
	movq	_cpu_max_ext_state_size@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	callq	_bcopy
	movl	16(%rbx), %edi
	callq	_fpurestore
	movq	8(%rbx), %rdi
	movq	___INITIAL_FPUCW__@GOTPCREL(%rip), %rax
	cmpq	(%rax), %rdi
	je	LBB0_3
## %bb.2:
	callq	_fldcw
LBB0_3:
	movq	%rbx, %rdi
	callq	_PCB_USER_FPU
	movl	(%r14), %esi
	testq	%rax, %rax
	je	LBB0_5
## %bb.4:
	movq	_PCB_USERFPUINITDONE@GOTPCREL(%rip), %rax
	orl	(%rax), %esi
LBB0_5:
	movq	%rbx, %rdi
	popq	%rbx
	popq	%r14
	popq	%rbp
	jmp	_set_pcb_flags                  ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_fpcurthread,4,2                ## @fpcurthread
	.comm	_PCB_FPUINITDONE,4,2            ## @PCB_FPUINITDONE
	.comm	_fpu_initialstate,4,2           ## @fpu_initialstate
	.comm	_cpu_max_ext_state_size,4,2     ## @cpu_max_ext_state_size
	.comm	___INITIAL_FPUCW__,8,3          ## @__INITIAL_FPUCW__
	.comm	_PCB_USERFPUINITDONE,4,2        ## @PCB_USERFPUINITDONE
	.no_dead_strip	_restore_fpu_curthread
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function restore_fpu_curthread
_restore_fpu_curthread:                 ; @restore_fpu_curthread
	.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, x0
Lloh0:
	adrp	x8, _fpcurthread@GOTPAGE
Lloh1:
	ldr	x8, [x8, _fpcurthread@GOTPAGEOFF]
Lloh2:
	ldr	w0, [x8]
	mov	x1, x19
	bl	_PCPU_SET
	bl	_stop_emulating
	bl	_fpu_clean_state
	ldr	x19, [x19]
	ldr	w8, [x19]
Lloh3:
	adrp	x20, _PCB_FPUINITDONE@GOTPAGE
Lloh4:
	ldr	x20, [x20, _PCB_FPUINITDONE@GOTPAGEOFF]
	ldr	w9, [x20]
	tst	w9, w8
	b.eq	LBB0_2
; %bb.1:
	ldr	w0, [x19, #16]
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	b	_fpurestore
LBB0_2:
Lloh5:
	adrp	x8, _fpu_initialstate@GOTPAGE
Lloh6:
	ldr	x8, [x8, _fpu_initialstate@GOTPAGEOFF]
Lloh7:
	ldr	w0, [x8]
	ldr	w1, [x19, #16]
Lloh8:
	adrp	x8, _cpu_max_ext_state_size@GOTPAGE
Lloh9:
	ldr	x8, [x8, _cpu_max_ext_state_size@GOTPAGEOFF]
Lloh10:
	ldr	w2, [x8]
	bl	_bcopy
	ldr	w0, [x19, #16]
	bl	_fpurestore
	ldr	x0, [x19, #8]
Lloh11:
	adrp	x8, ___INITIAL_FPUCW__@GOTPAGE
Lloh12:
	ldr	x8, [x8, ___INITIAL_FPUCW__@GOTPAGEOFF]
Lloh13:
	ldr	x8, [x8]
	cmp	x0, x8
	b.eq	LBB0_4
; %bb.3:
	bl	_fldcw
LBB0_4:
	mov	x0, x19
	bl	_PCB_USER_FPU
	ldr	w1, [x20]
	cbz	x0, LBB0_6
; %bb.5:
Lloh14:
	adrp	x8, _PCB_USERFPUINITDONE@GOTPAGE
Lloh15:
	ldr	x8, [x8, _PCB_USERFPUINITDONE@GOTPAGEOFF]
Lloh16:
	ldr	w8, [x8]
	orr	w1, w8, w1
LBB0_6:
	mov	x0, x19
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	b	_set_pcb_flags
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.cfi_endproc
                                        ; -- End function
	.comm	_fpcurthread,4,2                ; @fpcurthread
	.comm	_PCB_FPUINITDONE,4,2            ; @PCB_FPUINITDONE
	.comm	_fpu_initialstate,4,2           ; @fpu_initialstate
	.comm	_cpu_max_ext_state_size,4,2     ; @cpu_max_ext_state_size
	.comm	___INITIAL_FPUCW__,8,3          ; @__INITIAL_FPUCW__
	.comm	_PCB_USERFPUINITDONE,4,2        ; @PCB_USERFPUINITDONE
	.no_dead_strip	_restore_fpu_curthread
.subsections_via_symbols
