	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_get_cpu_freq_armada38x         ## -- Begin function get_cpu_freq_armada38x
	.p2align	4, 0x90
_get_cpu_freq_armada38x:                ## @get_cpu_freq_armada38x
	.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
	xorl	%r14d, %r14d
	xorl	%eax, %eax
	callq	_get_sar_value_armada38x
	movq	%rax, %rbx
	movq	_A38X_CPU_DDR_CLK_MASK@GOTPCREL(%rip), %rax
	andl	(%rax), %ebx
	movq	_A38X_CPU_DDR_CLK_SHIFT@GOTPCREL(%rip), %rax
	movb	(%rax), %cl
	sarl	%cl, %ebx
	leaq	_get_cpu_freq_armada38x.cpu_frequencies(%rip), %r15
	movq	%r15, %rdi
	callq	_nitems
	cmpl	%eax, %ebx
	jge	LBB0_2
## %bb.1:
	movslq	%ebx, %rax
	movl	(%r15,%rax,4), %eax
	movq	_hw_clockrate@GOTPCREL(%rip), %rcx
	movl	%eax, (%rcx)
	imull	$1000000, %eax, %r14d           ## imm = 0xF4240
LBB0_2:
	movl	%r14d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__const
	.p2align	4                               ## @get_cpu_freq_armada38x.cpu_frequencies
_get_cpu_freq_armada38x.cpu_frequencies:
	.long	0                               ## 0x0
	.long	0                               ## 0x0
	.long	0                               ## 0x0
	.long	0                               ## 0x0
	.long	1066                            ## 0x42a
	.long	0                               ## 0x0
	.long	0                               ## 0x0
	.long	0                               ## 0x0
	.long	1332                            ## 0x534
	.long	0                               ## 0x0
	.long	0                               ## 0x0
	.long	0                               ## 0x0
	.long	1600                            ## 0x640
	.long	0                               ## 0x0
	.long	0                               ## 0x0
	.long	0                               ## 0x0
	.long	1866                            ## 0x74a
	.long	0                               ## 0x0
	.long	0                               ## 0x0
	.long	2000                            ## 0x7d0

	.comm	_A38X_CPU_DDR_CLK_MASK,4,2      ## @A38X_CPU_DDR_CLK_MASK
	.comm	_A38X_CPU_DDR_CLK_SHIFT,4,2     ## @A38X_CPU_DDR_CLK_SHIFT
	.comm	_hw_clockrate,4,2               ## @hw_clockrate
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_get_cpu_freq_armada38x         ; -- Begin function get_cpu_freq_armada38x
	.p2align	2
_get_cpu_freq_armada38x:                ; @get_cpu_freq_armada38x
	.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	_get_sar_value_armada38x
Lloh0:
	adrp	x8, _A38X_CPU_DDR_CLK_MASK@GOTPAGE
Lloh1:
	ldr	x8, [x8, _A38X_CPU_DDR_CLK_MASK@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	and	w8, w8, w0
Lloh3:
	adrp	x9, _A38X_CPU_DDR_CLK_SHIFT@GOTPAGE
Lloh4:
	ldr	x9, [x9, _A38X_CPU_DDR_CLK_SHIFT@GOTPAGEOFF]
Lloh5:
	ldr	w9, [x9]
	asr	w20, w8, w9
Lloh6:
	adrp	x19, _get_cpu_freq_armada38x.cpu_frequencies@PAGE
Lloh7:
	add	x19, x19, _get_cpu_freq_armada38x.cpu_frequencies@PAGEOFF
	mov	x0, x19
	bl	_nitems
	cmp	w20, w0
	b.ge	LBB0_2
; %bb.1:
	ldr	w8, [x19, w20, sxtw #2]
Lloh8:
	adrp	x9, _hw_clockrate@GOTPAGE
Lloh9:
	ldr	x9, [x9, _hw_clockrate@GOTPAGEOFF]
Lloh10:
	str	w8, [x9]
	mov	w9, #16960
	movk	w9, #15, lsl #16
	mul	w0, w8, w9
	b	LBB0_3
LBB0_2:
	mov	w0, #0
LBB0_3:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotStr	Lloh8, Lloh9, Lloh10
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__const
	.p2align	2                               ; @get_cpu_freq_armada38x.cpu_frequencies
_get_cpu_freq_armada38x.cpu_frequencies:
	.long	0                               ; 0x0
	.long	0                               ; 0x0
	.long	0                               ; 0x0
	.long	0                               ; 0x0
	.long	1066                            ; 0x42a
	.long	0                               ; 0x0
	.long	0                               ; 0x0
	.long	0                               ; 0x0
	.long	1332                            ; 0x534
	.long	0                               ; 0x0
	.long	0                               ; 0x0
	.long	0                               ; 0x0
	.long	1600                            ; 0x640
	.long	0                               ; 0x0
	.long	0                               ; 0x0
	.long	0                               ; 0x0
	.long	1866                            ; 0x74a
	.long	0                               ; 0x0
	.long	0                               ; 0x0
	.long	2000                            ; 0x7d0

	.comm	_A38X_CPU_DDR_CLK_MASK,4,2      ; @A38X_CPU_DDR_CLK_MASK
	.comm	_A38X_CPU_DDR_CLK_SHIFT,4,2     ; @A38X_CPU_DDR_CLK_SHIFT
	.comm	_hw_clockrate,4,2               ; @hw_clockrate
.subsections_via_symbols
