	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function save_guest_fpustate
_save_guest_fpustate:                   ## @save_guest_fpustate
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%rbx
	pushq	%rax
	.cfi_offset %rbx, -24
	movq	%rdi, %rbx
	xorl	%eax, %eax
	callq	_rcr0
	movq	_CR0_TS@GOTPCREL(%rip), %rcx
	testl	%eax, (%rcx)
	jne	LBB0_2
## %bb.1:
	leaq	L_.str(%rip), %rdi
	callq	_panic
LBB0_2:
	xorl	%eax, %eax
	callq	_rcr4
	movq	_CR4_XSAVE@GOTPCREL(%rip), %rcx
	testl	%eax, (%rcx)
	je	LBB0_4
## %bb.3:
	xorl	%edi, %edi
	callq	_rxcr
	movl	%eax, 4(%rbx)
	xorl	%eax, %eax
	callq	_vmm_get_host_xcr0
	xorl	%edi, %edi
	movl	%eax, %esi
	callq	_load_xcr
LBB0_4:
	xorl	%eax, %eax
	callq	_fpu_stop_emulating
	movl	(%rbx), %edi
	callq	_fpusave
	xorl	%eax, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%rbp
	jmp	_fpu_start_emulating            ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_CR0_TS,4,2                     ## @CR0_TS
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"fpu emulation not enabled in host!"

	.comm	_CR4_XSAVE,4,2                  ## @CR4_XSAVE
	.no_dead_strip	_save_guest_fpustate
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function save_guest_fpustate
_save_guest_fpustate:                   ; @save_guest_fpustate
	.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
	bl	_rcr0
Lloh0:
	adrp	x8, _CR0_TS@GOTPAGE
Lloh1:
	ldr	x8, [x8, _CR0_TS@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	tst	w8, w0
	b.ne	LBB0_2
; %bb.1:
Lloh3:
	adrp	x0, l_.str@PAGE
Lloh4:
	add	x0, x0, l_.str@PAGEOFF
	bl	_panic
LBB0_2:
	bl	_rcr4
Lloh5:
	adrp	x8, _CR4_XSAVE@GOTPAGE
Lloh6:
	ldr	x8, [x8, _CR4_XSAVE@GOTPAGEOFF]
Lloh7:
	ldr	w8, [x8]
	tst	w8, w0
	b.eq	LBB0_4
; %bb.3:
	mov	w0, #0
	bl	_rxcr
	str	w0, [x19, #4]
	bl	_vmm_get_host_xcr0
	mov	x1, x0
	mov	w0, #0
	bl	_load_xcr
LBB0_4:
	bl	_fpu_stop_emulating
	ldr	w0, [x19]
	bl	_fpusave
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	b	_fpu_start_emulating
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.cfi_endproc
                                        ; -- End function
	.comm	_CR0_TS,4,2                     ; @CR0_TS
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"fpu emulation not enabled in host!"

	.comm	_CR4_XSAVE,4,2                  ; @CR4_XSAVE
	.no_dead_strip	_save_guest_fpustate
.subsections_via_symbols
