	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function hpet_next_event
_hpet_next_event:                       ## @hpet_next_event
	.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
	movl	%edx, %r14d
	movq	%rdi, %rbx
	movq	_HPET_COUNTER@GOTPCREL(%rip), %r15
	movl	(%r15), %edi
	callq	_hpet_readl
	addq	%rax, %rbx
	movl	%r14d, %edi
	callq	_HPET_Tn_CMP
	movq	%rbx, %rdi
	movl	%eax, %esi
	callq	_hpet_writel
	movl	(%r15), %edi
	callq	_hpet_readl
	subq	%rax, %rbx
	movq	_HPET_MIN_CYCLES@GOTPCREL(%rip), %rcx
	movq	_ETIME@GOTPCREL(%rip), %rdx
	xorl	%esi, %esi
	xorl	%eax, %eax
	subl	(%rdx), %eax
	cmpq	(%rcx), %rbx
	cmovgel	%esi, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_HPET_COUNTER,4,2               ## @HPET_COUNTER
	.comm	_HPET_MIN_CYCLES,8,3            ## @HPET_MIN_CYCLES
	.comm	_ETIME,4,2                      ## @ETIME
	.no_dead_strip	_hpet_next_event
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function hpet_next_event
_hpet_next_event:                       ; @hpet_next_event
	.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
	mov	x19, x2
	mov	x20, x0
Lloh0:
	adrp	x21, _HPET_COUNTER@GOTPAGE
Lloh1:
	ldr	x21, [x21, _HPET_COUNTER@GOTPAGEOFF]
	ldr	w0, [x21]
	bl	_hpet_readl
	add	x20, x0, x20
	mov	x0, x19
	bl	_HPET_Tn_CMP
	mov	x1, x0
	mov	x0, x20
	bl	_hpet_writel
	ldr	w0, [x21]
	bl	_hpet_readl
Lloh2:
	adrp	x8, _HPET_MIN_CYCLES@GOTPAGE
Lloh3:
	ldr	x8, [x8, _HPET_MIN_CYCLES@GOTPAGEOFF]
Lloh4:
	adrp	x9, _ETIME@GOTPAGE
Lloh5:
	ldr	x9, [x9, _ETIME@GOTPAGEOFF]
Lloh6:
	ldr	x8, [x8]
Lloh7:
	ldr	w9, [x9]
	sub	x10, x20, x0
	cmp	x10, x8
	csneg	w0, wzr, w9, ge
	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
	ret
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh7
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh6
	.loh AdrpLdrGot	Lloh0, Lloh1
	.cfi_endproc
                                        ; -- End function
	.comm	_HPET_COUNTER,4,2               ; @HPET_COUNTER
	.comm	_HPET_MIN_CYCLES,8,3            ; @HPET_MIN_CYCLES
	.comm	_ETIME,4,2                      ; @ETIME
	.no_dead_strip	_hpet_next_event
.subsections_via_symbols
