	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function kvm_vcpu_ioctl_x86_setup_mce
_kvm_vcpu_ioctl_x86_setup_mce:          ## @kvm_vcpu_ioctl_x86_setup_mce
	.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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%esi, %ebx
	movq	%rdi, %r14
	callq	_vcpu_load
	movq	_EINVAL@GOTPCREL(%rip), %rax
	xorl	%r15d, %r15d
	subl	(%rax), %r15d
	movl	%ebx, %ecx
	andl	$255, %ecx
	je	LBB0_12
## %bb.1:
	movq	_KVM_MAX_MCE_BANKS@GOTPCREL(%rip), %rax
	cmpl	(%rax), %ecx
	jae	LBB0_12
## %bb.2:
	movq	_KVM_MCE_CAP_SUPPORTED@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	notl	%eax
	andl	%ebx, %eax
	testl	$-16711936, %eax                ## imm = 0xFF00FF00
	jne	LBB0_12
## %bb.3:
	movl	%ebx, (%r14)
	movq	_MCG_CTL_P@GOTPCREL(%rip), %rax
	testl	%ebx, (%rax)
	je	LBB0_5
## %bb.4:
	movl	$-1, 4(%r14)
LBB0_5:
	movq	8(%r14), %rax
	movl	%ecx, %edx
	leaq	-1(%rdx), %rsi
	movl	%edx, %ecx
	andl	$3, %ecx
	xorl	%r15d, %r15d
	cmpq	$3, %rsi
	jae	LBB0_7
## %bb.6:
	xorl	%esi, %esi
	jmp	LBB0_9
LBB0_7:
	andl	$-4, %edx
	leaq	48(%rax), %rdi
	xorl	%esi, %esi
	.p2align	4, 0x90
LBB0_8:                                 ## =>This Inner Loop Header: Depth=1
	movl	$-1, -48(%rdi)
	movl	$-1, -32(%rdi)
	movl	$-1, -16(%rdi)
	movl	$-1, (%rdi)
	addq	$4, %rsi
	addq	$64, %rdi
	cmpq	%rsi, %rdx
	jne	LBB0_8
LBB0_9:
	testq	%rcx, %rcx
	je	LBB0_12
## %bb.10:
	shlq	$4, %rsi
	addq	%rsi, %rax
	shlq	$4, %rcx
	xorl	%r15d, %r15d
	xorl	%edx, %edx
	.p2align	4, 0x90
LBB0_11:                                ## =>This Inner Loop Header: Depth=1
	movl	$-1, (%rax,%rdx)
	addq	$16, %rdx
	cmpq	%rdx, %rcx
	jne	LBB0_11
LBB0_12:
	movq	%r14, %rdi
	callq	_vcpu_put
	movl	%r15d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_KVM_MAX_MCE_BANKS,4,2          ## @KVM_MAX_MCE_BANKS
	.comm	_KVM_MCE_CAP_SUPPORTED,4,2      ## @KVM_MCE_CAP_SUPPORTED
	.comm	_MCG_CTL_P,4,2                  ## @MCG_CTL_P
	.no_dead_strip	_kvm_vcpu_ioctl_x86_setup_mce
.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_setup_mce
_kvm_vcpu_ioctl_x86_setup_mce:          ; @kvm_vcpu_ioctl_x86_setup_mce
	.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
	mov	x21, x1
	mov	x19, x0
	and	w22, w1, #0xff
	bl	_vcpu_load
Lloh0:
	adrp	x8, _EINVAL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	neg	w20, w8
	cbz	w22, LBB0_13
; %bb.1:
Lloh3:
	adrp	x8, _KVM_MAX_MCE_BANKS@GOTPAGE
Lloh4:
	ldr	x8, [x8, _KVM_MAX_MCE_BANKS@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	cmp	w22, w8
	b.hs	LBB0_13
; %bb.2:
Lloh6:
	adrp	x8, _KVM_MCE_CAP_SUPPORTED@GOTPAGE
Lloh7:
	ldr	x8, [x8, _KVM_MCE_CAP_SUPPORTED@GOTPAGEOFF]
Lloh8:
	ldr	w8, [x8]
	bic	w8, w21, w8
	tst	w8, #0xff00ff00
	b.ne	LBB0_13
; %bb.3:
	str	w21, [x19]
Lloh9:
	adrp	x8, _MCG_CTL_P@GOTPAGE
Lloh10:
	ldr	x8, [x8, _MCG_CTL_P@GOTPAGEOFF]
Lloh11:
	ldr	w8, [x8]
	tst	w8, w21
	b.eq	LBB0_5
; %bb.4:
	mov	w8, #-1
	str	w8, [x19, #4]
LBB0_5:
	ldr	x8, [x19, #8]
	cmp	w22, #4
	b.hs	LBB0_7
; %bb.6:
	mov	x9, #0
	b	LBB0_10
LBB0_7:
	and	x9, x22, #0xfc
	add	x10, x8, #32
	mov	w11, #-1
	mov	x12, x9
LBB0_8:                                 ; =>This Inner Loop Header: Depth=1
	stur	w11, [x10, #-32]
	stur	w11, [x10, #-16]
	str	w11, [x10]
	str	w11, [x10, #16]
	add	x10, x10, #64
	subs	x12, x12, #4
	b.ne	LBB0_8
; %bb.9:
	cmp	x9, x22
	b.eq	LBB0_12
LBB0_10:
	add	x8, x8, x9, lsl #4
	sub	x9, x22, x9
	mov	w10, #-1
LBB0_11:                                ; =>This Inner Loop Header: Depth=1
	str	w10, [x8], #16
	subs	x9, x9, #1
	b.ne	LBB0_11
LBB0_12:
	mov	w20, #0
LBB0_13:
	mov	x0, x19
	bl	_vcpu_put
	mov	x0, x20
	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
	.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	_EINVAL,4,2                     ; @EINVAL
	.comm	_KVM_MAX_MCE_BANKS,4,2          ; @KVM_MAX_MCE_BANKS
	.comm	_KVM_MCE_CAP_SUPPORTED,4,2      ; @KVM_MCE_CAP_SUPPORTED
	.comm	_MCG_CTL_P,4,2                  ; @MCG_CTL_P
	.no_dead_strip	_kvm_vcpu_ioctl_x86_setup_mce
.subsections_via_symbols
