	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function hpet_set_mode
_hpet_set_mode:                         ## @hpet_set_mode
	.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
                                        ## kill: def $edi killed $edi def $rdi
	addl	$-128, %edi
	cmpl	$4, %edi
	ja	LBB0_10
## %bb.1:
	movl	%edx, %r12d
	movq	%rsi, %r14
	leaq	LJTI0_0(%rip), %rax
	movslq	(%rax,%rdi,4), %rcx
	addq	%rax, %rcx
	jmpq	*%rcx
LBB0_4:
	movl	%r12d, %edi
	callq	_HPET_Tn_CFG
	movl	%eax, %edi
	callq	_hpet_readl
	movq	_HPET_TN_ENABLE@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rbx
	notq	%rbx
	andq	%rax, %rbx
	jmp	LBB0_5
LBB0_10:
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_6:
	testl	%r12d, %r12d
	je	LBB0_7
## %bb.8:
	movq	%r14, %rdi
	callq	_EVT_TO_HPET_DEV
	movq	%rax, %rbx
	movl	(%rax), %edi
	callq	_hpet_setup_msi_irq
	movl	(%rbx), %edi
	callq	_disable_irq
	movl	(%rbx), %r14d
	movl	4(%rbx), %edi
	callq	_cpumask_of
	movl	%r14d, %edi
	movl	%eax, %esi
	callq	_irq_set_affinity
	movl	(%rbx), %edi
	callq	_enable_irq
	jmp	LBB0_9
LBB0_2:
	xorl	%eax, %eax
	callq	_hpet_stop_counter
	movq	_NSEC_PER_SEC@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movq	_HZ@GOTPCREL(%rip), %rcx
	cltd
	idivl	(%rcx)
	movl	%eax, %ebx
	imull	(%r14), %ebx
	movb	4(%r14), %cl
	sarl	%cl, %ebx
	movq	_HPET_COUNTER@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_hpet_readl
	movslq	%ebx, %r14
	leaq	(%rax,%r14), %r15
	movl	%r12d, %edi
	callq	_HPET_Tn_CFG
	movl	%eax, %edi
	callq	_hpet_readl
	movq	_HPET_TN_LEVEL@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rbx
	notq	%rbx
	andq	%rax, %rbx
	movq	_HPET_TN_ENABLE@GOTPCREL(%rip), %rax
	movq	_HPET_TN_PERIODIC@GOTPCREL(%rip), %rcx
	movq	_HPET_TN_SETVAL@GOTPCREL(%rip), %rdx
	movq	_HPET_TN_32BIT@GOTPCREL(%rip), %rsi
	orq	(%rax), %rbx
	orq	(%rcx), %rbx
	orq	(%rdx), %rbx
	orq	(%rsi), %rbx
	movl	%r12d, %edi
	callq	_HPET_Tn_CFG
	movq	%rbx, %rdi
	movl	%eax, %esi
	callq	_hpet_writel
	movl	%r12d, %edi
	callq	_HPET_Tn_CMP
	movq	%r15, %rdi
	movl	%eax, %esi
	callq	_hpet_writel
	movl	$1, %edi
	callq	_udelay
	movl	%r12d, %edi
	callq	_HPET_Tn_CMP
	movq	%r14, %rdi
	movl	%eax, %esi
	callq	_hpet_writel
	xorl	%eax, %eax
	callq	_hpet_start_counter
	jmp	LBB0_9
LBB0_3:
	movl	%r12d, %edi
	callq	_HPET_Tn_CFG
	movl	%eax, %edi
	callq	_hpet_readl
	movq	_HPET_TN_PERIODIC@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rbx
	notq	%rbx
	andq	%rax, %rbx
	movq	_HPET_TN_ENABLE@GOTPCREL(%rip), %rax
	movq	_HPET_TN_32BIT@GOTPCREL(%rip), %rcx
	orq	(%rax), %rbx
	orq	(%rcx), %rbx
LBB0_5:
	movl	%r12d, %edi
	callq	_HPET_Tn_CFG
	movq	%rbx, %rdi
	movl	%eax, %esi
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_hpet_writel                    ## TAILCALL
LBB0_7:
	xorl	%eax, %eax
	callq	_hpet_enable_legacy_int
LBB0_9:
	xorl	%eax, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_hpet_print_config              ## TAILCALL
	.cfi_endproc
	.p2align	2, 0x90
	.data_region jt32
.set L0_0_set_4, LBB0_4-LJTI0_0
.set L0_0_set_6, LBB0_6-LJTI0_0
.set L0_0_set_2, LBB0_2-LJTI0_0
.set L0_0_set_3, LBB0_3-LJTI0_0
LJTI0_0:
	.long	L0_0_set_4
	.long	L0_0_set_4
	.long	L0_0_set_6
	.long	L0_0_set_2
	.long	L0_0_set_3
	.end_data_region
                                        ## -- End function
	.comm	_NSEC_PER_SEC,4,2               ## @NSEC_PER_SEC
	.comm	_HZ,4,2                         ## @HZ
	.comm	_HPET_COUNTER,4,2               ## @HPET_COUNTER
	.comm	_HPET_TN_LEVEL,8,3              ## @HPET_TN_LEVEL
	.comm	_HPET_TN_ENABLE,8,3             ## @HPET_TN_ENABLE
	.comm	_HPET_TN_PERIODIC,8,3           ## @HPET_TN_PERIODIC
	.comm	_HPET_TN_SETVAL,8,3             ## @HPET_TN_SETVAL
	.comm	_HPET_TN_32BIT,8,3              ## @HPET_TN_32BIT
	.no_dead_strip	_hpet_set_mode
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function hpet_set_mode
_hpet_set_mode:                         ; @hpet_set_mode
	.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
	sub	w8, w0, #128
	cmp	w8, #4
	b.hi	LBB0_3
; %bb.1:
	mov	x19, x2
	mov	x20, x1
Lloh0:
	adrp	x9, lJTI0_0@PAGE
Lloh1:
	add	x9, x9, lJTI0_0@PAGEOFF
	adr	x10, LBB0_2
	ldrb	w11, [x9, x8]
	add	x10, x10, x11, lsl #2
	br	x10
LBB0_2:
	mov	x0, x19
	bl	_HPET_Tn_CFG
	bl	_hpet_readl
Lloh2:
	adrp	x8, _HPET_TN_ENABLE@GOTPAGE
Lloh3:
	ldr	x8, [x8, _HPET_TN_ENABLE@GOTPAGEOFF]
Lloh4:
	ldr	x8, [x8]
	bic	x20, x0, x8
	b	LBB0_8
LBB0_3:
	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
LBB0_4:
	cbz	w19, LBB0_9
; %bb.5:
	mov	x0, x20
	bl	_EVT_TO_HPET_DEV
	mov	x19, x0
	ldr	w0, [x0]
	bl	_hpet_setup_msi_irq
	ldr	w0, [x19]
	bl	_disable_irq
	ldp	w20, w0, [x19]
	bl	_cpumask_of
	mov	x1, x0
	mov	x0, x20
	bl	_irq_set_affinity
	ldr	w0, [x19]
	bl	_enable_irq
	b	LBB0_10
LBB0_6:
	bl	_hpet_stop_counter
Lloh5:
	adrp	x8, _NSEC_PER_SEC@GOTPAGE
Lloh6:
	ldr	x8, [x8, _NSEC_PER_SEC@GOTPAGEOFF]
Lloh7:
	ldr	w8, [x8]
Lloh8:
	adrp	x9, _HZ@GOTPAGE
Lloh9:
	ldr	x9, [x9, _HZ@GOTPAGEOFF]
Lloh10:
	ldr	w9, [x9]
	sdiv	w8, w8, w9
	ldp	w9, w10, [x20]
	mul	w8, w9, w8
	asr	w20, w8, w10
Lloh11:
	adrp	x8, _HPET_COUNTER@GOTPAGE
Lloh12:
	ldr	x8, [x8, _HPET_COUNTER@GOTPAGEOFF]
Lloh13:
	ldr	w0, [x8]
	bl	_hpet_readl
	sxtw	x20, w20
	add	x21, x0, x20
	mov	x0, x19
	bl	_HPET_Tn_CFG
	bl	_hpet_readl
Lloh14:
	adrp	x8, _HPET_TN_LEVEL@GOTPAGE
Lloh15:
	ldr	x8, [x8, _HPET_TN_LEVEL@GOTPAGEOFF]
Lloh16:
	ldr	x8, [x8]
	bic	x8, x0, x8
Lloh17:
	adrp	x9, _HPET_TN_ENABLE@GOTPAGE
Lloh18:
	ldr	x9, [x9, _HPET_TN_ENABLE@GOTPAGEOFF]
Lloh19:
	adrp	x10, _HPET_TN_PERIODIC@GOTPAGE
Lloh20:
	ldr	x10, [x10, _HPET_TN_PERIODIC@GOTPAGEOFF]
Lloh21:
	ldr	x9, [x9]
Lloh22:
	ldr	x10, [x10]
Lloh23:
	adrp	x11, _HPET_TN_SETVAL@GOTPAGE
Lloh24:
	ldr	x11, [x11, _HPET_TN_SETVAL@GOTPAGEOFF]
Lloh25:
	adrp	x12, _HPET_TN_32BIT@GOTPAGE
Lloh26:
	ldr	x12, [x12, _HPET_TN_32BIT@GOTPAGEOFF]
Lloh27:
	ldr	x11, [x11]
Lloh28:
	ldr	x12, [x12]
	orr	x8, x8, x9
	orr	x8, x8, x10
	orr	x8, x8, x11
	orr	x22, x8, x12
	mov	x0, x19
	bl	_HPET_Tn_CFG
	mov	x1, x0
	mov	x0, x22
	bl	_hpet_writel
	mov	x0, x19
	bl	_HPET_Tn_CMP
	mov	x1, x0
	mov	x0, x21
	bl	_hpet_writel
	mov	w0, #1
	bl	_udelay
	mov	x0, x19
	bl	_HPET_Tn_CMP
	mov	x1, x0
	mov	x0, x20
	bl	_hpet_writel
	bl	_hpet_start_counter
	b	LBB0_10
LBB0_7:
	mov	x0, x19
	bl	_HPET_Tn_CFG
	bl	_hpet_readl
Lloh29:
	adrp	x8, _HPET_TN_PERIODIC@GOTPAGE
Lloh30:
	ldr	x8, [x8, _HPET_TN_PERIODIC@GOTPAGEOFF]
Lloh31:
	ldr	x8, [x8]
	bic	x8, x0, x8
Lloh32:
	adrp	x9, _HPET_TN_ENABLE@GOTPAGE
Lloh33:
	ldr	x9, [x9, _HPET_TN_ENABLE@GOTPAGEOFF]
Lloh34:
	ldr	x9, [x9]
Lloh35:
	adrp	x10, _HPET_TN_32BIT@GOTPAGE
Lloh36:
	ldr	x10, [x10, _HPET_TN_32BIT@GOTPAGEOFF]
Lloh37:
	ldr	x10, [x10]
	orr	x8, x8, x9
	orr	x20, x8, x10
LBB0_8:
	mov	x0, x19
	bl	_HPET_Tn_CFG
	mov	x1, x0
	mov	x0, x20
	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	_hpet_writel
LBB0_9:
	bl	_hpet_enable_legacy_int
LBB0_10:
	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	_hpet_print_config
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh25, Lloh26, Lloh28
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh27
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh22
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh21
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh35, Lloh36, Lloh37
	.loh AdrpLdrGotLdr	Lloh32, Lloh33, Lloh34
	.loh AdrpLdrGotLdr	Lloh29, Lloh30, Lloh31
	.cfi_endproc
	.section	__TEXT,__const
lJTI0_0:
	.byte	(LBB0_2-LBB0_2)>>2
	.byte	(LBB0_2-LBB0_2)>>2
	.byte	(LBB0_4-LBB0_2)>>2
	.byte	(LBB0_6-LBB0_2)>>2
	.byte	(LBB0_7-LBB0_2)>>2
                                        ; -- End function
	.comm	_NSEC_PER_SEC,4,2               ; @NSEC_PER_SEC
	.comm	_HZ,4,2                         ; @HZ
	.comm	_HPET_COUNTER,4,2               ; @HPET_COUNTER
	.comm	_HPET_TN_LEVEL,8,3              ; @HPET_TN_LEVEL
	.comm	_HPET_TN_ENABLE,8,3             ; @HPET_TN_ENABLE
	.comm	_HPET_TN_PERIODIC,8,3           ; @HPET_TN_PERIODIC
	.comm	_HPET_TN_SETVAL,8,3             ; @HPET_TN_SETVAL
	.comm	_HPET_TN_32BIT,8,3              ; @HPET_TN_32BIT
	.no_dead_strip	_hpet_set_mode
.subsections_via_symbols
