	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function cb_setreg
_cb_setreg:                             ## @cb_setreg
	.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
	jne	LBB0_2
## %bb.1:
	movq	_VM_REG_GUEST_RSP@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	_rsp@GOTPCREL(%rip), %rax
	movl	%r14d, (%rax)
	cmpl	%ebx, %edx
	jne	LBB0_3
LBB0_2:
	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_3:
	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_4
LBB0_5:
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
LBB0_4:
	callq	_cb_setreg.cold.1
	jmp	LBB0_5
	.cfi_endproc
                                        ## -- End function
	.p2align	4, 0x90                         ## -- Begin function cb_setreg.cold.1
_cb_setreg.cold.1:                      ## @cb_setreg.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_RSP,4,2           ## @VM_REG_GUEST_RSP
	.comm	_rsp,4,2                        ## @rsp
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"test_setreg(%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_register"

	.no_dead_strip	_cb_setreg
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function cb_setreg
_cb_setreg:                             ; @cb_setreg
	.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.ne	LBB0_2
; %bb.1:
Lloh3:
	adrp	x8, _VM_REG_GUEST_RSP@GOTPAGE
Lloh4:
	ldr	x8, [x8, _VM_REG_GUEST_RSP@GOTPAGEOFF]
Lloh5:
	ldr	w2, [x8]
Lloh6:
	adrp	x8, _rsp@GOTPAGE
Lloh7:
	ldr	x8, [x8, _rsp@GOTPAGEOFF]
Lloh8:
	str	w19, [x8]
	cmp	w2, w20
	b.ne	LBB0_3
LBB0_2:
Lloh9:
	adrp	x0, l_.str@PAGE
Lloh10:
	add	x0, x0, l_.str@PAGEOFF
	bl	_printf
Lloh11:
	adrp	x8, _USERBOOT_EXIT_QUIT@GOTPAGE
Lloh12:
	ldr	x8, [x8, _USERBOOT_EXIT_QUIT@GOTPAGEOFF]
Lloh13:
	ldr	w1, [x8]
	mov	x0, #0
	bl	_cb_exit
	mov	x2, x20
LBB0_3:
Lloh14:
	adrp	x8, _ctx@GOTPAGE
Lloh15:
	ldr	x8, [x8, _ctx@GOTPAGEOFF]
Lloh16:
	ldr	w0, [x8]
Lloh17:
	adrp	x8, _BSP@GOTPAGE
Lloh18:
	ldr	x8, [x8, _BSP@GOTPAGEOFF]
Lloh19:
	ldr	w1, [x8]
	mov	x3, x19
	bl	_vm_set_register
	cbnz	w0, LBB0_5
LBB0_4:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
LBB0_5:
	bl	_cb_setreg.cold.1
	b	LBB0_4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotStr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.cfi_endproc
                                        ; -- End function
	.p2align	2                               ; -- Begin function cb_setreg.cold.1
_cb_setreg.cold.1:                      ; @cb_setreg.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
Lloh20:
	adrp	x0, l_.str.1@PAGE
Lloh21:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_perror
Lloh22:
	adrp	x8, _USERBOOT_EXIT_QUIT@GOTPAGE
Lloh23:
	ldr	x8, [x8, _USERBOOT_EXIT_QUIT@GOTPAGEOFF]
Lloh24:
	ldr	w1, [x8]
	mov	x0, #0
	ldp	x29, x30, [sp], #16             ; 16-byte Folded Reload
	b	_cb_exit
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.loh AdrpAdd	Lloh20, Lloh21
	.cfi_endproc
                                        ; -- End function
	.comm	_VM_REG_LAST,4,2                ; @VM_REG_LAST
	.comm	_VM_REG_GUEST_RSP,4,2           ; @VM_REG_GUEST_RSP
	.comm	_rsp,4,2                        ; @rsp
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"test_setreg(%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_register"

	.no_dead_strip	_cb_setreg
.subsections_via_symbols
