	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_vhpet_init                     ## -- Begin function vhpet_init
	.p2align	4, 0x90
_vhpet_init:                            ## @vhpet_init
	.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	%r13
	pushq	%r12
	pushq	%rbx
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r14
	movq	_M_VHPET@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_M_WAITOK@GOTPCREL(%rip), %rax
	movq	_M_ZERO@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edx
	orl	(%rax), %edx
	movl	$24, %edi
	callq	_malloc
	movq	%rax, %r15
	movq	%r14, 16(%rax)
	leaq	12(%rax), %rdi
	movq	_MTX_DEF@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	leaq	L_.str(%rip), %rsi
	xorl	%edx, %edx
	callq	_mtx_init
	movq	_HPET_FREQ@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	-48(%rbp), %rsi
	callq	_FREQ2BT
	movl	-48(%rbp), %edi
	callq	_bttosbt
	movl	%eax, 8(%r15)
	movq	%r14, %rdi
	callq	_vioapic_pincount
	movq	_VHPET_NUM_TIMERS@GOTPCREL(%rip), %r13
	cmpl	$0, (%r13)
	jle	LBB0_3
## %bb.1:
	movq	(%r15), %rax
	movl	$24, %ebx
	xorl	%r12d, %r12d
	movq	_HPET_TCAP_FSB_INT_DEL@GOTPCREL(%rip), %r14
	.p2align	4, 0x90
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	leaq	(%rax,%rbx), %rdi
	movl	-24(%rax,%rbx), %ecx
	movq	_HPET_TCAP_PER_INT@GOTPCREL(%rip), %rsi
	orl	(%rsi), %ecx
	movl	%ecx, -24(%rax,%rbx)
	orl	(%r14), %ecx
	movl	%ecx, -24(%rax,%rbx)
	movl	$-1, -20(%rax,%rbx)
	movl	$1, %esi
	callq	_callout_init
	movq	(%r15), %rax
	movq	%r15, -8(%rax,%rbx)
	movl	%r12d, -16(%rax,%rbx)
	incq	%r12
	movslq	(%r13), %rcx
	addq	$32, %rbx
	cmpq	%rcx, %r12
	jl	LBB0_2
LBB0_3:
	movq	%r15, %rax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_M_VHPET,4,2                    ## @M_VHPET
	.comm	_M_WAITOK,4,2                   ## @M_WAITOK
	.comm	_M_ZERO,4,2                     ## @M_ZERO
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"vhpet lock"

	.comm	_MTX_DEF,4,2                    ## @MTX_DEF
	.comm	_HPET_FREQ,4,2                  ## @HPET_FREQ
	.comm	_VHPET_NUM_TIMERS,4,2           ## @VHPET_NUM_TIMERS
	.comm	_HPET_TCAP_PER_INT,4,2          ## @HPET_TCAP_PER_INT
	.comm	_HPET_TCAP_FSB_INT_DEL,4,2      ## @HPET_TCAP_FSB_INT_DEL
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_vhpet_init                     ; -- Begin function vhpet_init
	.p2align	2
_vhpet_init:                            ; @vhpet_init
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #96
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	mov	x20, x0
Lloh0:
	adrp	x8, _M_VHPET@GOTPAGE
Lloh1:
	ldr	x8, [x8, _M_VHPET@GOTPAGEOFF]
Lloh2:
	adrp	x9, _M_WAITOK@GOTPAGE
Lloh3:
	ldr	x9, [x9, _M_WAITOK@GOTPAGEOFF]
Lloh4:
	ldr	w1, [x8]
Lloh5:
	ldr	w8, [x9]
Lloh6:
	adrp	x9, _M_ZERO@GOTPAGE
Lloh7:
	ldr	x9, [x9, _M_ZERO@GOTPAGEOFF]
Lloh8:
	ldr	w9, [x9]
	orr	w2, w9, w8
	mov	w0, #24
	bl	_malloc
	mov	x19, x0
	str	x20, [x0, #16]
	add	x0, x0, #12
Lloh9:
	adrp	x8, _MTX_DEF@GOTPAGE
Lloh10:
	ldr	x8, [x8, _MTX_DEF@GOTPAGEOFF]
Lloh11:
	ldr	w3, [x8]
Lloh12:
	adrp	x1, l_.str@PAGE
Lloh13:
	add	x1, x1, l_.str@PAGEOFF
	mov	x2, #0
	bl	_mtx_init
Lloh14:
	adrp	x8, _HPET_FREQ@GOTPAGE
Lloh15:
	ldr	x8, [x8, _HPET_FREQ@GOTPAGEOFF]
Lloh16:
	ldr	w0, [x8]
	add	x1, sp, #8
	bl	_FREQ2BT
	ldr	w0, [sp, #8]
	bl	_bttosbt
	str	w0, [x19, #8]
	mov	x0, x20
	bl	_vioapic_pincount
Lloh17:
	adrp	x20, _VHPET_NUM_TIMERS@GOTPAGE
Lloh18:
	ldr	x20, [x20, _VHPET_NUM_TIMERS@GOTPAGEOFF]
	ldr	w8, [x20]
	cmp	w8, #1
	b.lt	LBB0_3
; %bb.1:
	mov	x21, #0
	mov	x22, #0
	ldr	x8, [x19]
Lloh19:
	adrp	x23, _HPET_TCAP_PER_INT@GOTPAGE
Lloh20:
	ldr	x23, [x23, _HPET_TCAP_PER_INT@GOTPAGEOFF]
	mov	w24, #-1
Lloh21:
	adrp	x25, _HPET_TCAP_FSB_INT_DEL@GOTPAGE
Lloh22:
	ldr	x25, [x25, _HPET_TCAP_FSB_INT_DEL@GOTPAGEOFF]
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w9, [x23]
	add	x8, x8, x21
	ldr	w10, [x8]
	orr	w9, w10, w9
	str	w9, [x8]
	ldr	w10, [x25]
	orr	w9, w10, w9
	stp	w9, w24, [x8]
	add	x0, x8, #24
	mov	w1, #1
	bl	_callout_init
	ldr	x8, [x19]
	add	x9, x8, x21
	str	x19, [x9, #16]
	str	w22, [x9, #8]
	add	x22, x22, #1
	ldrsw	x9, [x20]
	add	x21, x21, #32
	cmp	x22, x9
	b.lt	LBB0_2
LBB0_3:
	mov	x0, x19
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #96
	ret
	.loh AdrpLdrGot	Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpAdd	Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh4
	.loh AdrpLdrGot	Lloh21, Lloh22
	.loh AdrpLdrGot	Lloh19, Lloh20
	.cfi_endproc
                                        ; -- End function
	.comm	_M_VHPET,4,2                    ; @M_VHPET
	.comm	_M_WAITOK,4,2                   ; @M_WAITOK
	.comm	_M_ZERO,4,2                     ; @M_ZERO
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"vhpet lock"

	.comm	_MTX_DEF,4,2                    ; @MTX_DEF
	.comm	_HPET_FREQ,4,2                  ; @HPET_FREQ
	.comm	_VHPET_NUM_TIMERS,4,2           ; @VHPET_NUM_TIMERS
	.comm	_HPET_TCAP_PER_INT,4,2          ; @HPET_TCAP_PER_INT
	.comm	_HPET_TCAP_FSB_INT_DEL,4,2      ; @HPET_TCAP_FSB_INT_DEL
.subsections_via_symbols
