	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function kvm_guest_time_update
_kvm_guest_time_update:                 ## @kvm_guest_time_update
	.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	%r12
	pushq	%rbx
	subq	$16, %rsp
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %rbx
	callq	_local_irq_save
	movq	_MSR_IA32_TSC@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	-48(%rbp), %rdx
	movq	%rbx, %rdi
	callq	_kvm_get_msr
	xorl	%eax, %eax
	callq	_get_kernel_ns
	movq	%rax, %r14
	movq	%rbx, %rdi
	callq	_vcpu_tsc_khz
	movq	%rax, %r15
	xorl	%edi, %edi
	testq	%rax, %rax
	sete	%dil
	callq	_unlikely
	testq	%rax, %rax
	je	LBB0_2
## %bb.1:
	callq	_local_irq_restore
	movq	_KVM_REQ_CLOCK_UPDATE@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	addq	$8, %rbx
	movq	%rbx, %rsi
	callq	_set_bit
	movl	$1, %eax
	jmp	LBB0_25
LBB0_2:
	cmpq	$0, 96(%rbx)
	je	LBB0_5
## %bb.3:
	movq	%rbx, %rdi
	movq	%r14, %rsi
	callq	_compute_guest_tsc
	movq	%rax, %rsi
	subq	-48(%rbp), %rsi
	jle	LBB0_5
## %bb.4:
	movq	%rax, %r12
	movq	%rbx, %rdi
	callq	_adjust_tsc_offset_guest
	movq	%r12, -48(%rbp)
LBB0_5:
	callq	_local_irq_restore
	cmpl	$0, 92(%rbx)
	je	LBB0_24
## %bb.6:
	movq	56(%rbx), %rax
	testq	%rax, %rax
	je	LBB0_10
## %bb.7:
	movq	16(%rbx), %rdi
	testq	%rdi, %rdi
	je	LBB0_10
## %bb.8:
	subq	%rax, %rdi
	movl	80(%rbx), %esi
	movl	84(%rbx), %edx
	callq	_pvclock_scale_delta
	movq	%rax, %r12
	addq	24(%rbx), %r12
	jmp	LBB0_11
LBB0_10:
	xorl	%r12d, %r12d
LBB0_11:
	xorl	%edi, %edi
	cmpq	%r15, 32(%rbx)
	setne	%dil
	callq	_unlikely
	testq	%rax, %rax
	je	LBB0_13
## %bb.12:
	movq	_NSEC_PER_SEC@GOTPCREL(%rip), %rax
	movslq	(%rax), %rax
	imulq	$274877907, %rax, %rdi          ## imm = 0x10624DD3
	movq	%rdi, %rax
	shrq	$63, %rax
	sarq	$38, %rdi
	addl	%eax, %edi
	leaq	84(%rbx), %rdx
	leaq	80(%rbx), %rcx
                                        ## kill: def $edi killed $edi killed $rdi
	movq	%r15, %rsi
	callq	_kvm_get_time_scale
	movq	%r15, 32(%rbx)
LBB0_13:
	cmpq	%r14, %r12
	cmovgq	%r12, %r14
	movq	-48(%rbp), %rax
	movq	%rax, 56(%rbx)
	movq	(%rbx), %rcx
	movq	40(%rbx), %r15
	movq	(%rcx), %rcx
	addq	%r14, %rcx
	movq	%rcx, 72(%rbx)
	movq	%r14, 24(%rbx)
	movq	%rax, 16(%rbx)
	addl	$2, 64(%rbx)
	andq	$-2, %r15
	movq	_PAGE_SIZE@GOTPCREL(%rip), %rax
	movl	(%rax), %r12d
	movq	%r15, %rdi
	callq	_offset_in_page
	subl	%eax, %r12d
	xorl	%r14d, %r14d
	cmpl	$4, %r12d
	setae	%r14b
	movl	%r14d, %edi
	callq	_likely
	movq	(%rbx), %rdi
	testq	%rax, %rax
	je	LBB0_15
## %bb.14:
	leaq	88(%rbx), %rsi
	leaq	-40(%rbp), %rdx
	movl	$4, %ecx
	callq	_kvm_read_guest_cached
	jmp	LBB0_16
LBB0_15:
	leaq	-40(%rbp), %rdx
	movq	%r15, %rsi
	movl	$4, %ecx
	callq	_kvm_read_guest
LBB0_16:
	movl	%eax, %edi
	callq	_unlikely
	testq	%rax, %rax
	je	LBB0_18
## %bb.17:
	movq	_EFAULT@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
	jmp	LBB0_25
LBB0_18:
	movq	_PVCLOCK_GUEST_STOPPED@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	cmpl	$0, 48(%rbx)
	je	LBB0_20
## %bb.19:
	movl	$0, 48(%rbx)
	jmp	LBB0_21
LBB0_20:
	andl	-40(%rbp), %eax
LBB0_21:
	leaq	56(%rbx), %r12
	movl	%eax, 68(%rbx)
	movl	%r14d, %edi
	callq	_likely
	movq	(%rbx), %rdi
	testq	%rax, %rax
	je	LBB0_23
## %bb.22:
	addq	$88, %rbx
	movq	%rbx, %rsi
	movq	%r12, %rdx
	movl	$32, %ecx
	callq	_kvm_write_guest_cached
	jmp	LBB0_24
LBB0_23:
	movq	%r15, %rsi
	movq	%r12, %rdx
	movl	$4, %ecx
	callq	_kvm_write_guest
LBB0_24:
	xorl	%eax, %eax
LBB0_25:
	addq	$16, %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_MSR_IA32_TSC,4,2               ## @MSR_IA32_TSC
	.comm	_KVM_REQ_CLOCK_UPDATE,4,2       ## @KVM_REQ_CLOCK_UPDATE
	.comm	_NSEC_PER_SEC,4,2               ## @NSEC_PER_SEC
	.comm	_PAGE_SIZE,4,2                  ## @PAGE_SIZE
	.comm	_EFAULT,4,2                     ## @EFAULT
	.comm	_PVCLOCK_GUEST_STOPPED,4,2      ## @PVCLOCK_GUEST_STOPPED
	.no_dead_strip	_kvm_guest_time_update
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function kvm_guest_time_update
_kvm_guest_time_update:                 ; @kvm_guest_time_update
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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
	mov	x19, x0
	bl	_local_irq_save
Lloh0:
	adrp	x8, _MSR_IA32_TSC@GOTPAGE
Lloh1:
	ldr	x8, [x8, _MSR_IA32_TSC@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	add	x2, sp, #8
	mov	x0, x19
	bl	_kvm_get_msr
	bl	_get_kernel_ns
	mov	x21, x0
	mov	x0, x19
	bl	_vcpu_tsc_khz
	mov	x22, x0
	cmp	x0, #0
	cset	w0, eq
	bl	_unlikely
	cbz	x0, LBB0_2
; %bb.1:
	bl	_local_irq_restore
Lloh3:
	adrp	x8, _KVM_REQ_CLOCK_UPDATE@GOTPAGE
Lloh4:
	ldr	x8, [x8, _KVM_REQ_CLOCK_UPDATE@GOTPAGEOFF]
Lloh5:
	ldr	w0, [x8]
	add	x1, x19, #8
	bl	_set_bit
	mov	w0, #1
	b	LBB0_23
LBB0_2:
	ldr	x8, [x19, #96]
	cbz	x8, LBB0_5
; %bb.3:
	mov	x0, x19
	mov	x1, x21
	bl	_compute_guest_tsc
	ldr	x8, [sp, #8]
	subs	x1, x0, x8
	b.le	LBB0_5
; %bb.4:
	mov	x20, x0
	mov	x0, x19
	bl	_adjust_tsc_offset_guest
	str	x20, [sp, #8]
LBB0_5:
	bl	_local_irq_restore
	ldr	w8, [x19, #92]
	cbz	w8, LBB0_22
; %bb.6:
	mov	x20, x19
	ldr	x8, [x20, #56]!
	cbz	x8, LBB0_9
; %bb.7:
	ldr	x9, [x19, #16]
	cbz	x9, LBB0_9
; %bb.8:
	sub	x0, x9, x8
	ldp	w1, w2, [x19, #80]
	bl	_pvclock_scale_delta
	ldr	x8, [x19, #24]
	add	x23, x8, x0
	b	LBB0_10
LBB0_9:
	mov	x23, #0
LBB0_10:
	ldr	x8, [x19, #32]
	cmp	x8, x22
	cset	w0, ne
	bl	_unlikely
	cbz	x0, LBB0_12
; %bb.11:
Lloh6:
	adrp	x8, _NSEC_PER_SEC@GOTPAGE
Lloh7:
	ldr	x8, [x8, _NSEC_PER_SEC@GOTPAGEOFF]
Lloh8:
	ldrsw	x8, [x8]
	mov	w9, #19923
	movk	w9, #4194, lsl #16
	mul	x8, x8, x9
	lsr	x9, x8, #32
	lsr	x8, x8, #63
	add	w0, w8, w9, asr #6
	add	x2, x19, #84
	add	x3, x19, #80
	mov	x1, x22
	bl	_kvm_get_time_scale
	str	x22, [x19, #32]
LBB0_12:
	cmp	x23, x21
	csel	x8, x23, x21, gt
	ldr	x9, [sp, #8]
	str	x9, [x19, #56]
	ldr	x10, [x19]
	ldr	x10, [x10]
	add	x10, x10, x8
	str	x10, [x19, #72]
	stp	x9, x8, [x19, #16]
	ldr	w8, [x19, #64]
	add	w8, w8, #2
	str	w8, [x19, #64]
	ldr	x8, [x19, #40]
	and	x21, x8, #0xfffffffffffffffe
Lloh9:
	adrp	x8, _PAGE_SIZE@GOTPAGE
Lloh10:
	ldr	x8, [x8, _PAGE_SIZE@GOTPAGEOFF]
Lloh11:
	ldr	w22, [x8]
	mov	x0, x21
	bl	_offset_in_page
	sub	w8, w22, w0
	cmp	w8, #3
	cset	w22, hi
	mov	x0, x22
	bl	_likely
	mov	x8, x0
	ldr	x0, [x19]
	cbz	x8, LBB0_15
; %bb.13:
	add	x1, x19, #88
	mov	x2, sp
	mov	w3, #4
	bl	_kvm_read_guest_cached
	bl	_unlikely
	cbz	x0, LBB0_16
LBB0_14:
Lloh12:
	adrp	x8, _EFAULT@GOTPAGE
Lloh13:
	ldr	x8, [x8, _EFAULT@GOTPAGEOFF]
Lloh14:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_23
LBB0_15:
	mov	x2, sp
	mov	x1, x21
	mov	w3, #4
	bl	_kvm_read_guest
	bl	_unlikely
	cbnz	x0, LBB0_14
LBB0_16:
Lloh15:
	adrp	x8, _PVCLOCK_GUEST_STOPPED@GOTPAGE
Lloh16:
	ldr	x8, [x8, _PVCLOCK_GUEST_STOPPED@GOTPAGEOFF]
Lloh17:
	ldr	w8, [x8]
	ldr	w9, [x19, #48]
	cbz	w9, LBB0_18
; %bb.17:
	str	wzr, [x19, #48]
	b	LBB0_19
LBB0_18:
	ldr	w9, [sp]
	and	w8, w8, w9
LBB0_19:
	str	w8, [x19, #68]
	mov	x0, x22
	bl	_likely
	mov	x8, x0
	ldr	x0, [x19]
	cbz	x8, LBB0_21
; %bb.20:
	add	x1, x19, #88
	mov	x2, x20
	mov	w3, #32
	bl	_kvm_write_guest_cached
	b	LBB0_22
LBB0_21:
	mov	x1, x21
	mov	x2, x20
	mov	w3, #4
	bl	_kvm_write_guest
LBB0_22:
	mov	w0, #0
LBB0_23:
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #80
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.cfi_endproc
                                        ; -- End function
	.comm	_MSR_IA32_TSC,4,2               ; @MSR_IA32_TSC
	.comm	_KVM_REQ_CLOCK_UPDATE,4,2       ; @KVM_REQ_CLOCK_UPDATE
	.comm	_NSEC_PER_SEC,4,2               ; @NSEC_PER_SEC
	.comm	_PAGE_SIZE,4,2                  ; @PAGE_SIZE
	.comm	_EFAULT,4,2                     ; @EFAULT
	.comm	_PVCLOCK_GUEST_STOPPED,4,2      ; @PVCLOCK_GUEST_STOPPED
	.no_dead_strip	_kvm_guest_time_update
.subsections_via_symbols
