	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function vatpit_update_mode
_vatpit_update_mode:                    ## @vatpit_update_mode
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	movq	_TIMER_SEL_MASK@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	andl	%esi, %ecx
	movq	_TIMER_SEL_READBACK@GOTPCREL(%rip), %rax
	cmpl	(%rax), %ecx
	jne	LBB0_1
## %bb.13:
	popq	%rbp
	jmp	_pit_readback                   ## TAILCALL
LBB0_1:
	movq	_TIMER_MODE_MASK@GOTPCREL(%rip), %rax
	movl	(%rax), %r10d
	andl	%esi, %r10d
	movq	_TIMER_RW_MASK@GOTPCREL(%rip), %rax
	andl	(%rax), %esi
	movq	_TIMER_LATCH@GOTPCREL(%rip), %rax
	movl	(%rax), %r8d
	movl	$-1, %eax
	cmpl	%r8d, %esi
	je	LBB0_3
## %bb.2:
	movq	_TIMER_16BIT@GOTPCREL(%rip), %rdx
	cmpl	(%rdx), %esi
	je	LBB0_3
LBB0_12:
	popq	%rbp
	retq
LBB0_3:
	cmpl	%r8d, %esi
	je	LBB0_8
## %bb.4:
	movq	_TIMER_INTTC@GOTPCREL(%rip), %rdx
	cmpl	(%rdx), %r10d
	je	LBB0_8
## %bb.5:
	movq	_TIMER_RATEGEN@GOTPCREL(%rip), %rdx
	cmpl	(%rdx), %r10d
	je	LBB0_8
## %bb.6:
	movq	_TIMER_SQWAVE@GOTPCREL(%rip), %rdx
	cmpl	(%rdx), %r10d
	je	LBB0_8
## %bb.7:
	movq	_TIMER_SWSTROBE@GOTPCREL(%rip), %rdx
	cmpl	(%rdx), %r10d
	jne	LBB0_12
LBB0_8:
	movq	(%rdi), %rax
	sarl	$6, %ecx
	movslq	%ecx, %rcx
	shlq	$4, %rcx
	leaq	(%rax,%rcx), %r9
	cmpl	%r8d, %esi
	jne	LBB0_10
## %bb.9:
	movq	%r9, %rsi
	movl	$1, %edx
	callq	_pit_update_counter
	jmp	LBB0_11
LBB0_10:
	movl	%r10d, (%r9)
	movq	$0, 8(%rax,%rcx)
	movq	_TIMER_STS_NULLCNT@GOTPCREL(%rip), %rdx
	movl	(%rdx), %edx
	orl	%edx, 4(%rax,%rcx)
LBB0_11:
	xorl	%eax, %eax
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_TIMER_SEL_MASK,4,2             ## @TIMER_SEL_MASK
	.comm	_TIMER_RW_MASK,4,2              ## @TIMER_RW_MASK
	.comm	_TIMER_MODE_MASK,4,2            ## @TIMER_MODE_MASK
	.comm	_TIMER_SEL_READBACK,4,2         ## @TIMER_SEL_READBACK
	.comm	_TIMER_LATCH,4,2                ## @TIMER_LATCH
	.comm	_TIMER_16BIT,4,2                ## @TIMER_16BIT
	.comm	_TIMER_INTTC,4,2                ## @TIMER_INTTC
	.comm	_TIMER_RATEGEN,4,2              ## @TIMER_RATEGEN
	.comm	_TIMER_SQWAVE,4,2               ## @TIMER_SQWAVE
	.comm	_TIMER_SWSTROBE,4,2             ## @TIMER_SWSTROBE
	.comm	_TIMER_STS_NULLCNT,4,2          ## @TIMER_STS_NULLCNT
	.no_dead_strip	_vatpit_update_mode
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function vatpit_update_mode
_vatpit_update_mode:                    ; @vatpit_update_mode
	.cfi_startproc
; %bb.0:
	stp	x29, x30, [sp, #-16]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 16
	mov	x29, sp
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
Lloh0:
	adrp	x8, _TIMER_SEL_MASK@GOTPAGE
Lloh1:
	ldr	x8, [x8, _TIMER_SEL_MASK@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	and	w8, w8, w1
Lloh3:
	adrp	x9, _TIMER_SEL_READBACK@GOTPAGE
Lloh4:
	ldr	x9, [x9, _TIMER_SEL_READBACK@GOTPAGEOFF]
Lloh5:
	ldr	w9, [x9]
	cmp	w8, w9
	b.ne	LBB0_2
; %bb.1:
	ldp	x29, x30, [sp], #16             ; 16-byte Folded Reload
	b	_pit_readback
LBB0_2:
Lloh6:
	adrp	x9, _TIMER_RW_MASK@GOTPAGE
Lloh7:
	ldr	x9, [x9, _TIMER_RW_MASK@GOTPAGEOFF]
Lloh8:
	ldr	w9, [x9]
	and	w9, w9, w1
Lloh9:
	adrp	x10, _TIMER_LATCH@GOTPAGE
Lloh10:
	ldr	x10, [x10, _TIMER_LATCH@GOTPAGEOFF]
Lloh11:
	ldr	w10, [x10]
Lloh12:
	adrp	x11, _TIMER_16BIT@GOTPAGE
Lloh13:
	ldr	x11, [x11, _TIMER_16BIT@GOTPAGEOFF]
Lloh14:
	ldr	w11, [x11]
	cmp	w9, w10
	ccmp	w9, w11, #4, ne
	b.ne	LBB0_6
; %bb.3:
Lloh15:
	adrp	x11, _TIMER_MODE_MASK@GOTPAGE
Lloh16:
	ldr	x11, [x11, _TIMER_MODE_MASK@GOTPAGEOFF]
Lloh17:
	ldr	w11, [x11]
	and	w11, w11, w1
Lloh18:
	adrp	x12, _TIMER_INTTC@GOTPAGE
Lloh19:
	ldr	x12, [x12, _TIMER_INTTC@GOTPAGEOFF]
Lloh20:
	ldr	w12, [x12]
Lloh21:
	adrp	x13, _TIMER_RATEGEN@GOTPAGE
Lloh22:
	ldr	x13, [x13, _TIMER_RATEGEN@GOTPAGEOFF]
Lloh23:
	ldr	w13, [x13]
Lloh24:
	adrp	x14, _TIMER_SQWAVE@GOTPAGE
Lloh25:
	ldr	x14, [x14, _TIMER_SQWAVE@GOTPAGEOFF]
Lloh26:
	ldr	w14, [x14]
Lloh27:
	adrp	x15, _TIMER_SWSTROBE@GOTPAGE
Lloh28:
	ldr	x15, [x15, _TIMER_SWSTROBE@GOTPAGEOFF]
Lloh29:
	ldr	w15, [x15]
	cmp	w9, w10
	ccmp	w11, w12, #4, ne
	ccmp	w11, w13, #4, ne
	ccmp	w11, w14, #4, ne
	ccmp	w11, w15, #4, ne
	b.ne	LBB0_6
; %bb.4:
	ldr	x12, [x0]
	asr	w13, w8, #6
	add	x1, x12, w13, sxtw #4
	cmp	w9, w10
	b.ne	LBB0_7
; %bb.5:
	mov	w2, #1
	bl	_pit_update_counter
	mov	w0, #0
	ldp	x29, x30, [sp], #16             ; 16-byte Folded Reload
	ret
LBB0_6:
	mov	w0, #-1
	ldp	x29, x30, [sp], #16             ; 16-byte Folded Reload
	ret
LBB0_7:
	mov	w0, #0
	sbfx	x8, x8, #6, #26
	str	w11, [x1]
	add	x8, x12, x8, lsl #4
	str	xzr, [x8, #8]
Lloh30:
	adrp	x9, _TIMER_STS_NULLCNT@GOTPAGE
Lloh31:
	ldr	x9, [x9, _TIMER_STS_NULLCNT@GOTPAGEOFF]
Lloh32:
	ldr	w9, [x9]
	ldr	w10, [x8, #4]
	orr	w9, w10, w9
	str	w9, [x8, #4]
	ldp	x29, x30, [sp], #16             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh27, Lloh28, Lloh29
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh26
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh30, Lloh31, Lloh32
	.cfi_endproc
                                        ; -- End function
	.comm	_TIMER_SEL_MASK,4,2             ; @TIMER_SEL_MASK
	.comm	_TIMER_RW_MASK,4,2              ; @TIMER_RW_MASK
	.comm	_TIMER_MODE_MASK,4,2            ; @TIMER_MODE_MASK
	.comm	_TIMER_SEL_READBACK,4,2         ; @TIMER_SEL_READBACK
	.comm	_TIMER_LATCH,4,2                ; @TIMER_LATCH
	.comm	_TIMER_16BIT,4,2                ; @TIMER_16BIT
	.comm	_TIMER_INTTC,4,2                ; @TIMER_INTTC
	.comm	_TIMER_RATEGEN,4,2              ; @TIMER_RATEGEN
	.comm	_TIMER_SQWAVE,4,2               ; @TIMER_SQWAVE
	.comm	_TIMER_SWSTROBE,4,2             ; @TIMER_SWSTROBE
	.comm	_TIMER_STS_NULLCNT,4,2          ; @TIMER_STS_NULLCNT
	.no_dead_strip	_vatpit_update_mode
.subsections_via_symbols
