	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function pit_update_counter
_pit_update_counter:                    ## @pit_update_counter
	.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	%rsi, %rbx
	movq	%rdi, %r15
	testl	%edx, %edx
	je	LBB0_2
## %bb.1:
	xorl	%ecx, %ecx
	cmpl	$0, (%rbx)
	jne	LBB0_6
LBB0_2:
	cmpl	$0, 4(%rbx)
	jne	LBB0_4
## %bb.3:
	movq	_PIT_8254_FREQ@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movl	$100, %esi
	callq	_TIMER_DIV
	movl	%eax, 4(%rbx)
	leaq	20(%rbx), %rdi
	callq	_binuptime
	movq	_TIMER_STS_NULLCNT@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	notl	%eax
	andl	%eax, 16(%rbx)
LBB0_4:
	movq	%r15, %rdi
	movq	%rbx, %rsi
	callq	_vatpit_delta_ticks
	movl	4(%rbx), %ecx
	cltd
	idivl	%ecx
	subl	%edx, %ecx
	testl	%r14d, %r14d
	je	LBB0_6
## %bb.5:
	movl	$2, (%rbx)
	movq	8(%rbx), %rax
	movl	%ecx, 4(%rax)
	movl	%ecx, %edx
	sarl	$8, %edx
	movl	%edx, (%rax)
LBB0_6:
	movl	%ecx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_PIT_8254_FREQ,4,2              ## @PIT_8254_FREQ
	.comm	_TIMER_STS_NULLCNT,4,2          ## @TIMER_STS_NULLCNT
	.no_dead_strip	_pit_update_counter
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function pit_update_counter
_pit_update_counter:                    ; @pit_update_counter
	.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	x20, x2
	mov	x19, x1
	mov	x21, x0
	cbz	w2, LBB0_3
; %bb.1:
	ldr	w8, [x19]
	cbz	w8, LBB0_3
; %bb.2:
	mov	w0, #0
	b	LBB0_7
LBB0_3:
	ldr	w8, [x19, #4]
	cbnz	w8, LBB0_5
; %bb.4:
Lloh0:
	adrp	x8, _PIT_8254_FREQ@GOTPAGE
Lloh1:
	ldr	x8, [x8, _PIT_8254_FREQ@GOTPAGEOFF]
Lloh2:
	ldr	w0, [x8]
	mov	w1, #100
	bl	_TIMER_DIV
	str	w0, [x19, #4]
	add	x0, x19, #20
	bl	_binuptime
Lloh3:
	adrp	x8, _TIMER_STS_NULLCNT@GOTPAGE
Lloh4:
	ldr	x8, [x8, _TIMER_STS_NULLCNT@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	ldr	w9, [x19, #16]
	bic	w8, w9, w8
	str	w8, [x19, #16]
LBB0_5:
	mov	x0, x21
	mov	x1, x19
	bl	_vatpit_delta_ticks
	ldr	w8, [x19, #4]
	sdiv	w9, w0, w8
	neg	w10, w0
	madd	w9, w9, w8, w10
	add	w0, w8, w9
	cbz	w20, LBB0_7
; %bb.6:
	mov	w8, #2
	str	w8, [x19]
	ldr	x8, [x19, #8]
	asr	w9, w0, #8
	stp	w9, w0, [x8]
LBB0_7:
	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	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_PIT_8254_FREQ,4,2              ; @PIT_8254_FREQ
	.comm	_TIMER_STS_NULLCNT,4,2          ; @TIMER_STS_NULLCNT
	.no_dead_strip	_pit_update_counter
.subsections_via_symbols
