	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_xlp_get_cpu_frequency          ## -- Begin function xlp_get_cpu_frequency
	.p2align	4, 0x90
_xlp_get_cpu_frequency:                 ## @xlp_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	%r15
	pushq	%r14
	pushq	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%esi, %r14d
	callq	_nlm_get_sys_regbase
	movl	%eax, %r15d
	movq	_SYS_POWER_ON_RESET_CFG@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	%r15d, %edi
	callq	_nlm_read_sys_reg
	movl	%eax, %ebx
	movq	_SYS_CORE_DFS_DIV_VALUE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	%r15d, %edi
	callq	_nlm_read_sys_reg
	movl	%eax, %r15d
	xorl	%eax, %eax
	callq	_nlm_is_xlp8xx_ax
	movl	%ebx, %ecx
	shrl	$30, %ecx
	incl	%ecx
	testl	%eax, %eax
	movl	$1, %edx
	cmovel	%ecx, %edx
	movl	%ebx, %esi
	shrl	$8, %esi
	andl	$3, %esi
	shrl	$10, %ebx
	andl	$127, %ebx
	incl	%ebx
	shll	$2, %r14d
	movl	%r14d, %ecx
	shrl	%cl, %r15d
	andl	$15, %r15d
	incl	%r15d
	imulq	$800000000, %rbx, %rax          ## imm = 0x2FAF0800
	leal	(%rsi,%rsi,2), %ecx
	addl	$3, %ecx
	imull	%edx, %ecx
	imull	%r15d, %ecx
	movabsq	$270582939648, %rdx             ## imm = 0x3F00000000
	testq	%rdx, %rax
	je	LBB0_1
## %bb.2:
	xorl	%edx, %edx
	divq	%rcx
	jmp	LBB0_3
LBB0_1:
                                        ## kill: def $eax killed $eax killed $rax
	xorl	%edx, %edx
	divl	%ecx
                                        ## kill: def $eax killed $eax def $rax
LBB0_3:
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_SYS_POWER_ON_RESET_CFG,4,2     ## @SYS_POWER_ON_RESET_CFG
	.comm	_SYS_CORE_DFS_DIV_VALUE,4,2     ## @SYS_CORE_DFS_DIV_VALUE
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_xlp_get_cpu_frequency          ; -- Begin function xlp_get_cpu_frequency
	.p2align	2
_xlp_get_cpu_frequency:                 ; @xlp_get_cpu_frequency
	.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, x1
	bl	_nlm_get_sys_regbase
	mov	x20, x0
Lloh0:
	adrp	x8, _SYS_POWER_ON_RESET_CFG@GOTPAGE
Lloh1:
	ldr	x8, [x8, _SYS_POWER_ON_RESET_CFG@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	bl	_nlm_read_sys_reg
	mov	x21, x0
Lloh3:
	adrp	x8, _SYS_CORE_DFS_DIV_VALUE@GOTPAGE
Lloh4:
	ldr	x8, [x8, _SYS_CORE_DFS_DIV_VALUE@GOTPAGEOFF]
Lloh5:
	ldr	w1, [x8]
	mov	x0, x20
	bl	_nlm_read_sys_reg
	mov	x20, x0
	bl	_nlm_is_xlp8xx_ax
	lsr	w8, w21, #30
	cmp	w0, #0
	mov	w9, #1
	csinc	w8, w9, w8, ne
	ubfx	w9, w21, #8, #2
	ubfx	w10, w21, #10, #7
	add	w10, w10, #1
	lsl	w11, w19, #2
	lsr	w11, w20, w11
	and	w11, w11, #0xf
	mov	w12, #2048
	movk	w12, #12207, lsl #16
	umull	x10, w10, w12
	add	w9, w9, w9, lsl #1
	add	w9, w9, #3
	mul	w8, w8, w9
	madd	w8, w8, w11, w8
	udiv	x0, x10, x8
	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	_SYS_POWER_ON_RESET_CFG,4,2     ; @SYS_POWER_ON_RESET_CFG
	.comm	_SYS_CORE_DFS_DIV_VALUE,4,2     ; @SYS_CORE_DFS_DIV_VALUE
.subsections_via_symbols
