	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_vmx_set_ctlreg                 ## -- Begin function vmx_set_ctlreg
	.p2align	4, 0x90
_vmx_set_ctlreg:                        ## @vmx_set_ctlreg
	.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	$56, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%esi, %r14d
	movl	%ecx, %eax
	xorl	%edx, %eax
	movl	%ecx, %esi
	orl	%edx, %esi
	cmpl	%esi, %eax
	jne	LBB0_22
## %bb.1:
	movq	%r8, %r12
	movl	%edi, %r15d
	movl	%edx, -56(%rbp)                 ## 4-byte Spill
	movl	%ecx, -52(%rbp)                 ## 4-byte Spill
	movq	_MSR_VMX_BASIC@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_rdmsr
	movq	%rax, %r13
	movl	%r15d, -60(%rbp)                ## 4-byte Spill
	movl	%r15d, %edi
	callq	_rdmsr
	movq	%rax, %rbx
	movq	%r13, -80(%rbp)                 ## 8-byte Spill
	btq	$55, %r13
	movq	%rax, -72(%rbp)                 ## 8-byte Spill
	jae	LBB0_3
## %bb.2:
	movl	%r14d, %edi
	callq	_rdmsr
	movq	%rax, -72(%rbp)                 ## 8-byte Spill
LBB0_3:
	movl	%r14d, -64(%rbp)                ## 4-byte Spill
	movslq	%r14d, %rax
	movq	%rax, -88(%rbp)                 ## 8-byte Spill
	xorl	%r14d, %r14d
	movq	%r12, -48(%rbp)                 ## 8-byte Spill
	jmp	LBB0_8
	.p2align	4, 0x90
LBB0_4:                                 ##   in Loop: Header=BB0_8 Depth=1
	testl	%r12d, -52(%rbp)                ## 4-byte Folded Reload
	movq	%r13, %rbx
	je	LBB0_17
LBB0_5:                                 ##   in Loop: Header=BB0_8 Depth=1
	notl	%r12d
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	andl	%r12d, (%rax)
LBB0_6:                                 ##   in Loop: Header=BB0_8 Depth=1
	movq	%rax, %r12
LBB0_7:                                 ##   in Loop: Header=BB0_8 Depth=1
	incl	%r14d
	cmpl	$32, %r14d
	je	LBB0_23
LBB0_8:                                 ## =>This Inner Loop Header: Depth=1
	movq	%rbx, %r13
	movq	-72(%rbp), %rbx                 ## 8-byte Reload
	movq	%rbx, %rdi
	movl	%r14d, %esi
	callq	_vmx_ctl_allows_one_setting
	movl	%eax, %r15d
	movq	%rbx, %rdi
	movl	%r14d, %esi
	callq	_vmx_ctl_allows_zero_setting
	movl	%eax, %ebx
	xorl	%edi, %edi
	movl	%r15d, %eax
	orl	%ebx, %eax
	setne	%dil
	movq	-88(%rbp), %rsi                 ## 8-byte Reload
	callq	_KASSERT
	testl	%ebx, %ebx
	je	LBB0_12
## %bb.9:                               ##   in Loop: Header=BB0_8 Depth=1
	testl	%r15d, %r15d
	jne	LBB0_12
## %bb.10:                              ##   in Loop: Header=BB0_8 Depth=1
	movl	$1, %eax
	movl	%r14d, %ecx
	shll	%cl, %eax
	movl	-56(%rbp), %ecx                 ## 4-byte Reload
	btl	%r14d, %ecx
	jb	LBB0_22
## %bb.11:                              ##   in Loop: Header=BB0_8 Depth=1
	notl	%eax
	andl	%eax, (%r12)
	movq	%r13, %rbx
	jmp	LBB0_7
	.p2align	4, 0x90
LBB0_12:                                ##   in Loop: Header=BB0_8 Depth=1
	movl	$1, %r12d
	movl	%r14d, %ecx
	shll	%cl, %r12d
	testl	%r15d, %r15d
	je	LBB0_4
## %bb.13:                              ##   in Loop: Header=BB0_8 Depth=1
	testl	%ebx, %ebx
	jne	LBB0_4
## %bb.14:                              ##   in Loop: Header=BB0_8 Depth=1
	testl	%r12d, -52(%rbp)                ## 4-byte Folded Reload
	jne	LBB0_22
## %bb.15:                              ##   in Loop: Header=BB0_8 Depth=1
	movq	%r13, %rbx
LBB0_16:                                ##   in Loop: Header=BB0_8 Depth=1
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	orl	%r12d, (%rax)
	jmp	LBB0_6
LBB0_17:                                ##   in Loop: Header=BB0_8 Depth=1
	testl	%r12d, -56(%rbp)                ## 4-byte Folded Reload
	jne	LBB0_16
## %bb.18:                              ##   in Loop: Header=BB0_8 Depth=1
	btq	$55, -80(%rbp)                  ## 8-byte Folded Reload
	jae	LBB0_5
## %bb.19:                              ##   in Loop: Header=BB0_8 Depth=1
	movq	%rbx, %rdi
	movl	%r14d, %esi
	callq	_vmx_ctl_allows_zero_setting
	testl	%eax, %eax
	jne	LBB0_5
## %bb.20:                              ##   in Loop: Header=BB0_8 Depth=1
	movq	%rbx, %rdi
	movl	%r14d, %esi
	callq	_vmx_ctl_allows_one_setting
	testl	%eax, %eax
	jne	LBB0_16
## %bb.21:                              ##   in Loop: Header=BB0_8 Depth=1
	leaq	L_.str.1(%rip), %rdi
	movl	%r14d, %esi
	movl	-60(%rbp), %edx                 ## 4-byte Reload
	movl	-64(%rbp), %ecx                 ## 4-byte Reload
	callq	_panic
	movq	-48(%rbp), %r12                 ## 8-byte Reload
	jmp	LBB0_7
LBB0_22:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	jmp	LBB0_24
LBB0_23:
	xorl	%eax, %eax
LBB0_24:
	addq	$56, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_MSR_VMX_BASIC,4,2              ## @MSR_VMX_BASIC
	.section	__TEXT,__cstring,cstring_literals
L_.str.1:                               ## @.str.1
	.asciz	"vmx_set_ctlreg: unable to determine correct value of ctl bit %d for msr 0x%0x and true msr 0x%0x"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_vmx_set_ctlreg                 ; -- Begin function vmx_set_ctlreg
	.p2align	2
_vmx_set_ctlreg:                        ; @vmx_set_ctlreg
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #128
	.cfi_def_cfa_offset 128
	stp	x28, x27, [sp, #32]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #48]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #64]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #80]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #96]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #112]            ; 16-byte Folded Spill
	add	x29, sp, #112
	.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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	eor	w8, w3, w2
	orr	w9, w3, w2
	cmp	w8, w9
	b.ne	LBB0_20
; %bb.1:
	mov	x19, x4
	mov	x20, x3
	mov	x21, x2
	mov	x22, x1
	mov	x23, x0
Lloh0:
	adrp	x8, _MSR_VMX_BASIC@GOTPAGE
Lloh1:
	ldr	x8, [x8, _MSR_VMX_BASIC@GOTPAGEOFF]
Lloh2:
	ldr	w0, [x8]
	bl	_rdmsr
	mov	x24, x0
	str	w23, [sp, #4]                   ; 4-byte Folded Spill
	mov	x0, x23
	bl	_rdmsr
	mov	x26, x0
	stp	x0, x24, [sp, #16]              ; 16-byte Folded Spill
	tbz	x24, #55, LBB0_3
; %bb.2:
	mov	x0, x22
	bl	_rdmsr
	mov	x26, x0
LBB0_3:
	mov	w27, #0
	str	x22, [sp, #8]                   ; 8-byte Folded Spill
	sxtw	x28, w22
	mov	w23, #1
LBB0_4:                                 ; =>This Inner Loop Header: Depth=1
	mov	x0, x26
	mov	x1, x27
	bl	_vmx_ctl_allows_one_setting
	mov	x25, x0
	mov	x0, x26
	mov	x1, x27
	bl	_vmx_ctl_allows_zero_setting
	mov	x24, x0
	orr	w8, w25, w0
	cmp	w8, #0
	cset	w0, ne
	mov	x1, x28
	bl	_KASSERT
	lsl	w22, w23, w27
	cbz	w24, LBB0_7
; %bb.5:                                ;   in Loop: Header=BB0_4 Depth=1
	cbnz	w25, LBB0_7
; %bb.6:                                ;   in Loop: Header=BB0_4 Depth=1
	tst	w22, w21
	b.eq	LBB0_12
	b	LBB0_20
LBB0_7:                                 ;   in Loop: Header=BB0_4 Depth=1
	and	w8, w22, w20
	cbz	w25, LBB0_11
; %bb.8:                                ;   in Loop: Header=BB0_4 Depth=1
	cbnz	w24, LBB0_11
; %bb.9:                                ;   in Loop: Header=BB0_4 Depth=1
	cbnz	w8, LBB0_20
LBB0_10:                                ;   in Loop: Header=BB0_4 Depth=1
	ldr	w8, [x19]
	orr	w8, w8, w22
	b	LBB0_13
LBB0_11:                                ;   in Loop: Header=BB0_4 Depth=1
	cbz	w8, LBB0_15
LBB0_12:                                ;   in Loop: Header=BB0_4 Depth=1
	ldr	w8, [x19]
	bic	w8, w8, w22
LBB0_13:                                ;   in Loop: Header=BB0_4 Depth=1
	str	w8, [x19]
LBB0_14:                                ;   in Loop: Header=BB0_4 Depth=1
	add	w27, w27, #1
	cmp	w27, #32
	b.ne	LBB0_4
	b	LBB0_21
LBB0_15:                                ;   in Loop: Header=BB0_4 Depth=1
	tst	w22, w21
	b.ne	LBB0_10
; %bb.16:                               ;   in Loop: Header=BB0_4 Depth=1
	ldr	x8, [sp, #24]                   ; 8-byte Folded Reload
	tbz	x8, #55, LBB0_12
; %bb.17:                               ;   in Loop: Header=BB0_4 Depth=1
	ldr	x24, [sp, #16]                  ; 8-byte Folded Reload
	mov	x0, x24
	mov	x1, x27
	bl	_vmx_ctl_allows_zero_setting
	cbnz	w0, LBB0_12
; %bb.18:                               ;   in Loop: Header=BB0_4 Depth=1
	mov	x0, x24
	mov	x1, x27
	bl	_vmx_ctl_allows_one_setting
	cbnz	w0, LBB0_10
; %bb.19:                               ;   in Loop: Header=BB0_4 Depth=1
Lloh3:
	adrp	x0, l_.str.1@PAGE
Lloh4:
	add	x0, x0, l_.str.1@PAGEOFF
	mov	x1, x27
	ldr	w2, [sp, #4]                    ; 4-byte Folded Reload
	ldr	x3, [sp, #8]                    ; 8-byte Folded Reload
                                        ; kill: def $w3 killed $w3 killed $x3
	bl	_panic
	b	LBB0_14
LBB0_20:
Lloh5:
	adrp	x8, _EINVAL@GOTPAGE
Lloh6:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh7:
	ldr	w0, [x8]
	b	LBB0_22
LBB0_21:
	mov	w0, #0
LBB0_22:
	ldp	x29, x30, [sp, #112]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #96]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #80]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #64]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #48]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #128
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.cfi_endproc
                                        ; -- End function
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_MSR_VMX_BASIC,4,2              ; @MSR_VMX_BASIC
	.section	__TEXT,__cstring,cstring_literals
l_.str.1:                               ; @.str.1
	.asciz	"vmx_set_ctlreg: unable to determine correct value of ctl bit %d for msr 0x%0x and true msr 0x%0x"

.subsections_via_symbols
