	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function kvm_vcpu_ioctl_x86_set_xcrs
_kvm_vcpu_ioctl_x86_set_xcrs:           ## @kvm_vcpu_ioctl_x86_set_xcrs
	.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	_cpu_has_xsave@GOTPCREL(%rip), %rax
	cmpl	$0, (%rax)
	je	LBB0_6
## %bb.1:
	movl	(%rsi), %eax
	movq	_KVM_MAX_XCRS@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %eax
	jg	LBB0_6
## %bb.2:
	cmpq	$0, 16(%rsi)
	je	LBB0_3
LBB0_6:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
LBB0_7:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%rbp
	retq
LBB0_3:
	xorl	%ebx, %ebx
	testl	%eax, %eax
	jle	LBB0_7
## %bb.4:
	movq	8(%rsi), %rax
	movq	(%rax), %rsi
	movq	_XCR_XFEATURE_ENABLED_MASK@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rsi
	jne	LBB0_7
## %bb.5:
	movl	8(%rax), %edx
	callq	___kvm_set_xcr
	testl	%eax, %eax
	jne	LBB0_6
	jmp	LBB0_7
	.cfi_endproc
                                        ## -- End function
	.comm	_cpu_has_xsave,4,2              ## @cpu_has_xsave
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_KVM_MAX_XCRS,4,2               ## @KVM_MAX_XCRS
	.comm	_XCR_XFEATURE_ENABLED_MASK,8,3  ## @XCR_XFEATURE_ENABLED_MASK
	.no_dead_strip	_kvm_vcpu_ioctl_x86_set_xcrs
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function kvm_vcpu_ioctl_x86_set_xcrs
_kvm_vcpu_ioctl_x86_set_xcrs:           ; @kvm_vcpu_ioctl_x86_set_xcrs
	.cfi_startproc
; %bb.0:
	stp	x29, x30, [sp, #-16]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 16
	mov	x29, sp
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
Lloh0:
	adrp	x8, _cpu_has_xsave@GOTPAGE
Lloh1:
	ldr	x8, [x8, _cpu_has_xsave@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	cbz	w8, LBB0_3
; %bb.1:
	ldr	w8, [x1]
Lloh3:
	adrp	x9, _KVM_MAX_XCRS@GOTPAGE
Lloh4:
	ldr	x9, [x9, _KVM_MAX_XCRS@GOTPAGEOFF]
Lloh5:
	ldr	w9, [x9]
	cmp	w8, w9
	b.gt	LBB0_3
; %bb.2:
	ldr	x9, [x1, #16]
	cbz	x9, LBB0_5
LBB0_3:
Lloh6:
	adrp	x8, _EINVAL@GOTPAGE
Lloh7:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh8:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_4:
	ldp	x29, x30, [sp], #16             ; 16-byte Folded Reload
	ret
LBB0_5:
	cmp	w8, #1
	b.lt	LBB0_8
; %bb.6:
	ldr	x8, [x1, #8]
	ldr	x1, [x8]
Lloh9:
	adrp	x9, _XCR_XFEATURE_ENABLED_MASK@GOTPAGE
Lloh10:
	ldr	x9, [x9, _XCR_XFEATURE_ENABLED_MASK@GOTPAGEOFF]
Lloh11:
	ldr	x9, [x9]
	cmp	x1, x9
	b.ne	LBB0_8
; %bb.7:
	ldr	w2, [x8, #8]
	bl	___kvm_set_xcr
	cbnz	w0, LBB0_3
	b	LBB0_4
LBB0_8:
	mov	w0, #0
	ldp	x29, x30, [sp], #16             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.cfi_endproc
                                        ; -- End function
	.comm	_cpu_has_xsave,4,2              ; @cpu_has_xsave
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_KVM_MAX_XCRS,4,2               ; @KVM_MAX_XCRS
	.comm	_XCR_XFEATURE_ENABLED_MASK,8,3  ; @XCR_XFEATURE_ENABLED_MASK
	.no_dead_strip	_kvm_vcpu_ioctl_x86_set_xcrs
.subsections_via_symbols
