	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function elanfreq_get_cpu_frequency
_elanfreq_get_cpu_frequency:            ## @elanfreq_get_cpu_frequency
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r14
	pushq	%rbx
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	xorl	%ebx, %ebx
	xorl	%eax, %eax
	callq	_local_irq_disable
	movq	_REG_CSCIR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	$128, %edi
	callq	_outb_p
	movq	_REG_CSCDR@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_inb_p
	movl	%eax, %r14d
	xorl	%eax, %eax
	callq	_local_irq_enable
	movl	%r14d, %ecx
	andl	$224, %ecx
	cmpb	$-96, %cl
	je	LBB0_4
## %bb.1:
	cmpb	$-32, %cl
	je	LBB0_6
## %bb.2:
	cmpb	$-64, %cl
	jne	LBB0_5
## %bb.3:
	testb	$1, %r14b
	movl	$66000, %eax                    ## imm = 0x101D0
	movl	$99000, %ebx                    ## imm = 0x182B8
	cmovel	%eax, %ebx
	jmp	LBB0_6
LBB0_4:
	movl	$33000, %ebx                    ## imm = 0x80E8
	jmp	LBB0_6
LBB0_5:
	shrl	$5, %ecx
	movl	$1000, %ebx                     ## imm = 0x3E8
                                        ## kill: def $cl killed $cl killed $ecx
	shll	%cl, %ebx
LBB0_6:
	movl	%ebx, %eax
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_REG_CSCIR,4,2                  ## @REG_CSCIR
	.comm	_REG_CSCDR,4,2                  ## @REG_CSCDR
	.no_dead_strip	_elanfreq_get_cpu_frequency
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function elanfreq_get_cpu_frequency
_elanfreq_get_cpu_frequency:            ; @elanfreq_get_cpu_frequency
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	bl	_local_irq_disable
Lloh0:
	adrp	x8, _REG_CSCIR@GOTPAGE
Lloh1:
	ldr	x8, [x8, _REG_CSCIR@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	mov	w0, #128
	bl	_outb_p
Lloh3:
	adrp	x8, _REG_CSCDR@GOTPAGE
Lloh4:
	ldr	x8, [x8, _REG_CSCDR@GOTPAGEOFF]
Lloh5:
	ldr	w0, [x8]
	bl	_inb_p
	mov	x19, x0
	bl	_local_irq_enable
	and	w8, w19, #0xe0
	cmp	w8, #160
	b.eq	LBB0_4
; %bb.1:
	cmp	w8, #224
	b.eq	LBB0_5
; %bb.2:
	cmp	w8, #192
	b.ne	LBB0_6
; %bb.3:
	tst	w19, #0x1
	mov	w8, #33464
	movk	w8, #1, lsl #16
	mov	w9, #464
	movk	w9, #1, lsl #16
	csel	w0, w9, w8, eq
	b	LBB0_7
LBB0_4:
	mov	w0, #33000
	b	LBB0_7
LBB0_5:
	mov	w0, #0
	b	LBB0_7
LBB0_6:
	lsr	w8, w8, #5
	mov	w9, #1000
	lsl	w0, w9, w8
LBB0_7:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_REG_CSCIR,4,2                  ; @REG_CSCIR
	.comm	_REG_CSCDR,4,2                  ; @REG_CSCDR
	.no_dead_strip	_elanfreq_get_cpu_frequency
.subsections_via_symbols
