	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function vhpet_handler
_vhpet_handler:                         ## @vhpet_handler
	.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
	movq	8(%rdi), %r15
	movslq	(%rdi), %r14
	movq	%r14, %rbx
	shlq	$2, %rbx
	addq	8(%r15), %rbx
	movl	(%r15), %edi
	leaq	L_.str(%rip), %rsi
	movl	%r14d, %edx
	callq	_VM_CTR1
	movq	%r15, %rdi
	callq	_VHPET_LOCK
	movq	%rbx, %rdi
	callq	_callout_pending
	testq	%rax, %rax
	jne	LBB0_5
## %bb.1:
	movq	%rbx, %rdi
	callq	_callout_active
	testl	%eax, %eax
	je	LBB0_5
## %bb.2:
	movq	%rbx, %rdi
	callq	_callout_deactivate
	movq	%r15, %rdi
	callq	_vhpet_counter_enabled
	testl	%eax, %eax
	jne	LBB0_4
## %bb.3:
	leaq	L_.str.1(%rip), %rdi
	movq	%r15, %rsi
	callq	_panic
LBB0_4:
	leaq	-28(%rbp), %rsi
	movq	%r15, %rdi
	callq	_vhpet_counter
	movl	-28(%rbp), %ecx
	movq	%r15, %rdi
	movl	%r14d, %esi
	movl	%eax, %edx
	callq	_vhpet_start_timer
	movq	%r15, %rdi
	movl	%r14d, %esi
	callq	_vhpet_timer_interrupt
LBB0_5:
	movq	%r15, %rdi
	callq	_VHPET_UNLOCK
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"hpet t%d fired"

L_.str.1:                               ## @.str.1
	.asciz	"vhpet(%p) callout with counter disabled"

	.no_dead_strip	_vhpet_handler
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function vhpet_handler
_vhpet_handler:                         ; @vhpet_handler
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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
	ldr	x19, [x0, #8]
	ldrsw	x20, [x0]
	ldr	x8, [x19, #8]
	add	x21, x8, x20, lsl #2
	ldr	w0, [x19]
Lloh0:
	adrp	x1, l_.str@PAGE
Lloh1:
	add	x1, x1, l_.str@PAGEOFF
	mov	x2, x20
	bl	_VM_CTR1
	mov	x0, x19
	bl	_VHPET_LOCK
	mov	x0, x21
	bl	_callout_pending
	cbnz	x0, LBB0_5
; %bb.1:
	mov	x0, x21
	bl	_callout_active
	cbz	w0, LBB0_5
; %bb.2:
	mov	x0, x21
	bl	_callout_deactivate
	mov	x0, x19
	bl	_vhpet_counter_enabled
	cbnz	w0, LBB0_4
; %bb.3:
Lloh2:
	adrp	x0, l_.str.1@PAGE
Lloh3:
	add	x0, x0, l_.str.1@PAGEOFF
	mov	x1, x19
	bl	_panic
LBB0_4:
	add	x1, sp, #12
	mov	x0, x19
	bl	_vhpet_counter
	mov	x2, x0
	ldr	w3, [sp, #12]
	mov	x0, x19
	mov	x1, x20
	bl	_vhpet_start_timer
	mov	x0, x19
	mov	x1, x20
	bl	_vhpet_timer_interrupt
LBB0_5:
	mov	x0, x19
	bl	_VHPET_UNLOCK
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #64
	ret
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpAdd	Lloh2, Lloh3
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"hpet t%d fired"

l_.str.1:                               ; @.str.1
	.asciz	"vhpet(%p) callout with counter disabled"

	.no_dead_strip	_vhpet_handler
.subsections_via_symbols
