	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function vatpit_callout_handler
_vatpit_callout_handler:                ## @vatpit_callout_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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	(%rdi), %rdx
	movq	8(%rdi), %r12
	movq	8(%r12), %r15
	movq	%rdx, %rbx
	shlq	$4, %rbx
	leaq	(%r15,%rbx), %r14
	addq	$8, %r14
	movl	(%r12), %edi
	leaq	L_.str(%rip), %rsi
	callq	_VM_CTR1
	movq	%r12, %rdi
	callq	_VATPIT_LOCK
	movq	%r14, %rdi
	callq	_callout_pending
	testq	%rax, %rax
	jne	LBB0_5
## %bb.1:
	movq	%r14, %rdi
	callq	_callout_active
	testl	%eax, %eax
	je	LBB0_5
## %bb.2:
	movq	%r14, %rdi
	callq	_callout_deactivate
	movq	(%r15,%rbx), %rax
	movq	_TIMER_RATEGEN@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_4
## %bb.3:
	movq	%r12, %rdi
	callq	_pit_timer_start_cntr0
LBB0_4:
	movl	(%r12), %edi
	xorl	%esi, %esi
	callq	_vatpic_pulse_irq
	movl	(%r12), %edi
	movl	$2, %esi
	callq	_vioapic_pulse_irq
LBB0_5:
	movq	%r12, %rdi
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_VATPIT_UNLOCK                  ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"atpit t%d fired"

	.comm	_TIMER_RATEGEN,8,3              ## @TIMER_RATEGEN
	.no_dead_strip	_vatpit_callout_handler
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function vatpit_callout_handler
_vatpit_callout_handler:                ; @vatpit_callout_handler
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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
	ldp	x20, x19, [x0]
	ldr	x22, [x19, #8]
	add	x8, x22, x20, lsl #4
	add	x21, x8, #8
	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	_VATPIT_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
	lsl	x8, x20, #4
	ldr	x8, [x22, x8]
Lloh2:
	adrp	x9, _TIMER_RATEGEN@GOTPAGE
Lloh3:
	ldr	x9, [x9, _TIMER_RATEGEN@GOTPAGEOFF]
Lloh4:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_4
; %bb.3:
	mov	x0, x19
	bl	_pit_timer_start_cntr0
LBB0_4:
	ldr	w0, [x19]
	mov	w1, #0
	bl	_vatpic_pulse_irq
	ldr	w0, [x19]
	mov	w1, #2
	bl	_vioapic_pulse_irq
LBB0_5:
	mov	x0, x19
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	b	_VATPIT_UNLOCK
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"atpit t%d fired"

	.comm	_TIMER_RATEGEN,8,3              ; @TIMER_RATEGEN
	.no_dead_strip	_vatpit_callout_handler
.subsections_via_symbols
