	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function cb_setcr
_cb_setcr:                              ## @cb_setcr
	.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
	movl	%edx, %r14d
	movq	_VM_REG_LAST@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	cmpl	$4, %esi
	je	LBB0_5
## %bb.1:
	cmpl	$3, %esi
	je	LBB0_4
## %bb.2:
	testl	%esi, %esi
	jne	LBB0_8
## %bb.3:
	movq	_VM_REG_GUEST_CR0@GOTPCREL(%rip), %rax
	jmp	LBB0_6
LBB0_5:
	movq	_VM_REG_GUEST_CR4@GOTPCREL(%rip), %rax
LBB0_6:
	movl	(%rax), %edx
	cmpl	%ebx, %edx
	jne	LBB0_9
LBB0_8:
	leaq	L_.str(%rip), %rdi
	callq	_printf
	movq	_USERBOOT_EXIT_QUIT@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	xorl	%edi, %edi
	callq	_cb_exit
	movl	%ebx, %edx
LBB0_9:
	movq	_ctx@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	_BSP@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	%r14d, %ecx
	callq	_vm_set_register
	testl	%eax, %eax
	jne	LBB0_10
LBB0_11:
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
LBB0_4:
	movq	_VM_REG_GUEST_CR3@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	_cr3@GOTPCREL(%rip), %rax
	movl	%r14d, (%rax)
	cmpl	%ebx, %edx
	je	LBB0_8
	jmp	LBB0_9
LBB0_10:
	callq	_cb_setcr.cold.1
	jmp	LBB0_11
	.cfi_endproc
                                        ## -- End function
	.p2align	4, 0x90                         ## -- Begin function cb_setcr.cold.1
_cb_setcr.cold.1:                       ## @cb_setcr.cold.1
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	leaq	L_.str.1(%rip), %rdi
	callq	_perror
	movq	_USERBOOT_EXIT_QUIT@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	xorl	%edi, %edi
	popq	%rbp
	jmp	_cb_exit                        ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_VM_REG_LAST,4,2                ## @VM_REG_LAST
	.comm	_VM_REG_GUEST_CR0,4,2           ## @VM_REG_GUEST_CR0
	.comm	_VM_REG_GUEST_CR3,4,2           ## @VM_REG_GUEST_CR3
	.comm	_cr3,4,2                        ## @cr3
	.comm	_VM_REG_GUEST_CR4,4,2           ## @VM_REG_GUEST_CR4
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"test_setcr(%d): not implemented\n"

	.comm	_USERBOOT_EXIT_QUIT,4,2         ## @USERBOOT_EXIT_QUIT
	.comm	_ctx,4,2                        ## @ctx
	.comm	_BSP,4,2                        ## @BSP
L_.str.1:                               ## @.str.1
	.asciz	"vm_set_cr"

	.no_dead_strip	_cb_setcr
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function cb_setcr
_cb_setcr:                              ; @cb_setcr
	.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, x2
Lloh0:
	adrp	x8, _VM_REG_LAST@GOTPAGE
Lloh1:
	ldr	x8, [x8, _VM_REG_LAST@GOTPAGEOFF]
Lloh2:
	ldr	w20, [x8]
	cmp	w1, #4
	b.eq	LBB0_4
; %bb.1:
	cmp	w1, #3
	b.eq	LBB0_9
; %bb.2:
	cbnz	w1, LBB0_6
; %bb.3:
Lloh3:
	adrp	x8, _VM_REG_GUEST_CR0@GOTPAGE
Lloh4:
	ldr	x8, [x8, _VM_REG_GUEST_CR0@GOTPAGEOFF]
	b	LBB0_5
LBB0_4:
Lloh5:
	adrp	x8, _VM_REG_GUEST_CR4@GOTPAGE
Lloh6:
	ldr	x8, [x8, _VM_REG_GUEST_CR4@GOTPAGEOFF]
LBB0_5:
	ldr	w2, [x8]
	cmp	w2, w20
	b.ne	LBB0_7
LBB0_6:
Lloh7:
	adrp	x0, l_.str@PAGE
Lloh8:
	add	x0, x0, l_.str@PAGEOFF
	bl	_printf
Lloh9:
	adrp	x8, _USERBOOT_EXIT_QUIT@GOTPAGE
Lloh10:
	ldr	x8, [x8, _USERBOOT_EXIT_QUIT@GOTPAGEOFF]
Lloh11:
	ldr	w1, [x8]
	mov	x0, #0
	bl	_cb_exit
	mov	x2, x20
LBB0_7:
Lloh12:
	adrp	x8, _ctx@GOTPAGE
Lloh13:
	ldr	x8, [x8, _ctx@GOTPAGEOFF]
Lloh14:
	ldr	w0, [x8]
Lloh15:
	adrp	x8, _BSP@GOTPAGE
Lloh16:
	ldr	x8, [x8, _BSP@GOTPAGEOFF]
Lloh17:
	ldr	w1, [x8]
	mov	x3, x19
	bl	_vm_set_register
	cbnz	w0, LBB0_10
LBB0_8:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
LBB0_9:
Lloh18:
	adrp	x8, _VM_REG_GUEST_CR3@GOTPAGE
Lloh19:
	ldr	x8, [x8, _VM_REG_GUEST_CR3@GOTPAGEOFF]
Lloh20:
	ldr	w2, [x8]
Lloh21:
	adrp	x8, _cr3@GOTPAGE
Lloh22:
	ldr	x8, [x8, _cr3@GOTPAGEOFF]
Lloh23:
	str	w19, [x8]
	cmp	w2, w20
	b.eq	LBB0_6
	b	LBB0_7
LBB0_10:
	bl	_cb_setcr.cold.1
	b	LBB0_8
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpAdd	Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotStr	Lloh21, Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.cfi_endproc
                                        ; -- End function
	.p2align	2                               ; -- Begin function cb_setcr.cold.1
_cb_setcr.cold.1:                       ; @cb_setcr.cold.1
	.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
Lloh24:
	adrp	x0, l_.str.1@PAGE
Lloh25:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_perror
Lloh26:
	adrp	x8, _USERBOOT_EXIT_QUIT@GOTPAGE
Lloh27:
	ldr	x8, [x8, _USERBOOT_EXIT_QUIT@GOTPAGEOFF]
Lloh28:
	ldr	w1, [x8]
	mov	x0, #0
	ldp	x29, x30, [sp], #16             ; 16-byte Folded Reload
	b	_cb_exit
	.loh AdrpLdrGotLdr	Lloh26, Lloh27, Lloh28
	.loh AdrpAdd	Lloh24, Lloh25
	.cfi_endproc
                                        ; -- End function
	.comm	_VM_REG_LAST,4,2                ; @VM_REG_LAST
	.comm	_VM_REG_GUEST_CR0,4,2           ; @VM_REG_GUEST_CR0
	.comm	_VM_REG_GUEST_CR3,4,2           ; @VM_REG_GUEST_CR3
	.comm	_cr3,4,2                        ; @cr3
	.comm	_VM_REG_GUEST_CR4,4,2           ; @VM_REG_GUEST_CR4
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"test_setcr(%d): not implemented\n"

	.comm	_USERBOOT_EXIT_QUIT,4,2         ; @USERBOOT_EXIT_QUIT
	.comm	_ctx,4,2                        ; @ctx
	.comm	_BSP,4,2                        ; @BSP
l_.str.1:                               ; @.str.1
	.asciz	"vm_set_cr"

	.no_dead_strip	_cb_setcr
.subsections_via_symbols
