	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function imx51_get_pll_freq
_imx51_get_pll_freq:                    ## @imx51_get_pll_freq
	.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	%r13
	pushq	%r12
	pushq	%rbx
	subq	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%edi, %r13d
	testl	%edi, %edi
	setg	%al
	movq	_IMX51_N_DPLLS@GOTPCREL(%rip), %rcx
	cmpl	%edi, (%rcx)
	setge	%cl
	andb	%al, %cl
	movzbl	%cl, %edi
	leaq	L_.str(%rip), %rsi
	callq	_KASSERT
	movq	_ccm_softc@GOTPCREL(%rip), %r12
	movq	(%r12), %rdi
	movq	_DPLL_DP_CTL@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movl	%r13d, %esi
	callq	_pll_read_4
	movl	%eax, -44(%rbp)                 ## 4-byte Spill
	movq	_DP_CTL_HFSM@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	andl	%eax, %ecx
	movq	(%r12), %rdi
	movq	_DPLL_DP_HFS_OP@GOTPCREL(%rip), %rax
	cmoveq	_DPLL_DP_OP@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	_DPLL_DP_HFS_MFD@GOTPCREL(%rip), %rbx
	cmoveq	_DPLL_DP_MFD@GOTPCREL(%rip), %rbx
	movq	_DPLL_DP_HFS_MFN@GOTPCREL(%rip), %r14
	cmoveq	_DPLL_DP_MFN@GOTPCREL(%rip), %r14
	movl	%r13d, %esi
	callq	_pll_read_4
	movl	%eax, %r15d
	movq	(%r12), %rdi
	movl	(%rbx), %edx
	movl	%r13d, %esi
	callq	_pll_read_4
	movl	%eax, -52(%rbp)                 ## 4-byte Spill
	movq	(%r12), %rdi
	movl	(%r14), %edx
	movl	%r13d, %esi
	callq	_pll_read_4
	movl	%eax, %r12d
	movq	_DP_OP_PDF_MASK@GOTPCREL(%rip), %rax
	movl	(%rax), %r14d
	movq	_DP_OP_MFI_MASK@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	%r15d, -48(%rbp)                ## 4-byte Spill
	andl	%r15d, %esi
	movq	_DP_OP_MFI_SHIFT@GOTPCREL(%rip), %rax
	movb	(%rax), %cl
	sarl	%cl, %esi
	movl	$5, %edi
	callq	_max
	movl	-44(%rbp), %esi                 ## 4-byte Reload
	movl	%eax, %ebx
	movq	_DP_CTL_REF_CLK_SEL_MASK@GOTPCREL(%rip), %rcx
	movl	%esi, %eax
	andl	(%rcx), %eax
	cmpl	$129, %eax
	je	LBB0_1
## %bb.2:
	cmpl	$128, %eax
	jne	LBB0_4
## %bb.3:
	movq	_ccm_softc@GOTPCREL(%rip), %rax
	movq	(%rax), %rdi
	movq	_CCMC_CCR@GOTPCREL(%rip), %rax
	movl	%esi, %r15d
	movl	(%rax), %esi
	callq	_ccm_read_4
	movl	%r15d, %esi
	movl	%eax, %ecx
	movq	_CCR_FPM_MULT@GOTPCREL(%rip), %rdx
	xorl	%eax, %eax
	testl	%ecx, (%rdx)
	setne	%al
	shll	$24, %eax
	addl	$16777216, %eax                 ## imm = 0x1000000
	jmp	LBB0_5
LBB0_1:
	movl	$24000000, %eax                 ## imm = 0x16E3600
	jmp	LBB0_5
LBB0_4:
	xorl	%eax, %eax
LBB0_5:
	movl	%r12d, %edx
	orl	$-134217728, %edx               ## imm = 0xF8000000
	testl	$67108864, %r12d                ## imm = 0x4000000
	cmovel	%r12d, %edx
	andl	-48(%rbp), %r14d                ## 4-byte Folded Reload
	movq	_DP_CTL_REF_CLK_DIV@GOTPCREL(%rip), %rcx
	testl	%esi, (%rcx)
	setne	%cl
	shrl	%cl, %eax
	shll	$2, %eax
	imull	%eax, %ebx
	imull	%edx, %eax
	movl	-52(%rbp), %ecx                 ## 4-byte Reload
	incl	%ecx
	cltd
	idivl	%ecx
	addl	%ebx, %eax
	incl	%r14d
	cltd
	idivl	%r14d
	movq	_DP_CTL_DPDCK0_2_EN@GOTPCREL(%rip), %rcx
	testl	%esi, (%rcx)
	jne	LBB0_7
## %bb.6:
	movl	%eax, %ecx
	shrl	$31, %ecx
	addl	%eax, %ecx
	sarl	%ecx
	movl	%ecx, %eax
LBB0_7:
	movq	_ccm_softc@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	movq	(%rcx), %rcx
	movslq	%r13d, %rdx
	movl	%eax, -4(%rcx,%rdx,4)
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_IMX51_N_DPLLS,4,2              ## @IMX51_N_DPLLS
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Wrong PLL id"

	.comm	_ccm_softc,8,3                  ## @ccm_softc
	.comm	_DPLL_DP_CTL,4,2                ## @DPLL_DP_CTL
	.comm	_DP_CTL_HFSM,4,2                ## @DP_CTL_HFSM
	.comm	_DPLL_DP_HFS_OP,4,2             ## @DPLL_DP_HFS_OP
	.comm	_DPLL_DP_HFS_MFD,4,2            ## @DPLL_DP_HFS_MFD
	.comm	_DPLL_DP_HFS_MFN,4,2            ## @DPLL_DP_HFS_MFN
	.comm	_DPLL_DP_OP,4,2                 ## @DPLL_DP_OP
	.comm	_DPLL_DP_MFD,4,2                ## @DPLL_DP_MFD
	.comm	_DPLL_DP_MFN,4,2                ## @DPLL_DP_MFN
	.comm	_DP_OP_PDF_MASK,4,2             ## @DP_OP_PDF_MASK
	.comm	_DP_OP_MFI_MASK,4,2             ## @DP_OP_MFI_MASK
	.comm	_DP_OP_MFI_SHIFT,4,2            ## @DP_OP_MFI_SHIFT
	.comm	_DP_CTL_REF_CLK_SEL_MASK,4,2    ## @DP_CTL_REF_CLK_SEL_MASK
	.comm	_CCMC_CCR,4,2                   ## @CCMC_CCR
	.comm	_CCR_FPM_MULT,4,2               ## @CCR_FPM_MULT
	.comm	_DP_CTL_REF_CLK_DIV,4,2         ## @DP_CTL_REF_CLK_DIV
	.comm	_DP_CTL_DPDCK0_2_EN,4,2         ## @DP_CTL_DPDCK0_2_EN
	.no_dead_strip	_imx51_get_pll_freq
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function imx51_get_pll_freq
_imx51_get_pll_freq:                    ; @imx51_get_pll_freq
	.cfi_startproc
; %bb.0:
	stp	x26, x25, [sp, #-80]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	mov	x19, x0
	cmp	w0, #0
Lloh0:
	adrp	x8, _IMX51_N_DPLLS@GOTPAGE
Lloh1:
	ldr	x8, [x8, _IMX51_N_DPLLS@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	ccmp	w8, w0, #8, gt
	cset	w0, ge
Lloh3:
	adrp	x1, l_.str@PAGE
Lloh4:
	add	x1, x1, l_.str@PAGEOFF
	bl	_KASSERT
Lloh5:
	adrp	x25, _ccm_softc@GOTPAGE
Lloh6:
	ldr	x25, [x25, _ccm_softc@GOTPAGEOFF]
	ldr	x0, [x25]
Lloh7:
	adrp	x8, _DPLL_DP_CTL@GOTPAGE
Lloh8:
	ldr	x8, [x8, _DPLL_DP_CTL@GOTPAGEOFF]
Lloh9:
	ldr	w2, [x8]
	mov	x1, x19
	bl	_pll_read_4
	mov	x20, x0
Lloh10:
	adrp	x8, _DP_CTL_HFSM@GOTPAGE
Lloh11:
	ldr	x8, [x8, _DP_CTL_HFSM@GOTPAGEOFF]
Lloh12:
	ldr	w8, [x8]
Lloh13:
	adrp	x9, _DPLL_DP_OP@GOTPAGE
Lloh14:
	ldr	x9, [x9, _DPLL_DP_OP@GOTPAGEOFF]
	ldr	x0, [x25]
Lloh15:
	adrp	x10, _DPLL_DP_HFS_OP@GOTPAGE
Lloh16:
	ldr	x10, [x10, _DPLL_DP_HFS_OP@GOTPAGEOFF]
	tst	w8, w20
	csel	x8, x9, x10, eq
	ldr	w2, [x8]
Lloh17:
	adrp	x8, _DPLL_DP_MFD@GOTPAGE
Lloh18:
	ldr	x8, [x8, _DPLL_DP_MFD@GOTPAGEOFF]
Lloh19:
	adrp	x9, _DPLL_DP_HFS_MFD@GOTPAGE
Lloh20:
	ldr	x9, [x9, _DPLL_DP_HFS_MFD@GOTPAGEOFF]
	csel	x22, x8, x9, eq
Lloh21:
	adrp	x8, _DPLL_DP_MFN@GOTPAGE
Lloh22:
	ldr	x8, [x8, _DPLL_DP_MFN@GOTPAGEOFF]
Lloh23:
	adrp	x9, _DPLL_DP_HFS_MFN@GOTPAGE
Lloh24:
	ldr	x9, [x9, _DPLL_DP_HFS_MFN@GOTPAGEOFF]
	csel	x23, x8, x9, eq
	mov	x1, x19
	bl	_pll_read_4
	mov	x21, x0
	ldr	x0, [x25]
	ldr	w2, [x22]
	mov	x1, x19
	bl	_pll_read_4
	mov	x22, x0
	ldr	x0, [x25]
	ldr	w2, [x23]
	mov	x1, x19
	bl	_pll_read_4
	mov	x23, x0
Lloh25:
	adrp	x8, _DP_OP_PDF_MASK@GOTPAGE
Lloh26:
	ldr	x8, [x8, _DP_OP_PDF_MASK@GOTPAGEOFF]
Lloh27:
	ldr	w26, [x8]
Lloh28:
	adrp	x8, _DP_OP_MFI_MASK@GOTPAGE
Lloh29:
	ldr	x8, [x8, _DP_OP_MFI_MASK@GOTPAGEOFF]
Lloh30:
	ldr	w8, [x8]
	and	w8, w8, w21
Lloh31:
	adrp	x9, _DP_OP_MFI_SHIFT@GOTPAGE
Lloh32:
	ldr	x9, [x9, _DP_OP_MFI_SHIFT@GOTPAGEOFF]
Lloh33:
	ldr	w9, [x9]
	asr	w1, w8, w9
	mov	w0, #5
	bl	_max
	mov	x24, x0
Lloh34:
	adrp	x8, _DP_CTL_REF_CLK_SEL_MASK@GOTPAGE
Lloh35:
	ldr	x8, [x8, _DP_CTL_REF_CLK_SEL_MASK@GOTPAGEOFF]
Lloh36:
	ldr	w8, [x8]
	and	w8, w8, w20
	cmp	w8, #129
	b.eq	LBB0_3
; %bb.1:
	cmp	w8, #128
	b.ne	LBB0_4
; %bb.2:
	ldr	x0, [x25]
Lloh37:
	adrp	x8, _CCMC_CCR@GOTPAGE
Lloh38:
	ldr	x8, [x8, _CCMC_CCR@GOTPAGEOFF]
Lloh39:
	ldr	w1, [x8]
	bl	_ccm_read_4
Lloh40:
	adrp	x8, _CCR_FPM_MULT@GOTPAGE
Lloh41:
	ldr	x8, [x8, _CCR_FPM_MULT@GOTPAGEOFF]
Lloh42:
	ldr	w8, [x8]
	tst	w8, w0
	mov	w8, #33554432
	mov	w9, #16777216
	csel	w8, w9, w8, eq
	b	LBB0_5
LBB0_3:
	mov	w8, #13824
	movk	w8, #366, lsl #16
	b	LBB0_5
LBB0_4:
	mov	w8, #0
LBB0_5:
	orr	w9, w23, #0xf8000000
	tst	w23, #0x4000000
	csel	w9, w23, w9, eq
	and	w10, w26, w21
Lloh43:
	adrp	x11, _DP_CTL_REF_CLK_DIV@GOTPAGE
Lloh44:
	ldr	x11, [x11, _DP_CTL_REF_CLK_DIV@GOTPAGEOFF]
Lloh45:
	ldr	w11, [x11]
	tst	w11, w20
	cset	w11, ne
	lsr	w8, w8, w11
	lsl	w8, w8, #2
	mul	w9, w8, w9
	add	w11, w22, #1
	sdiv	w9, w9, w11
	madd	w8, w8, w24, w9
	add	w9, w10, #1
	sdiv	w8, w8, w9
Lloh46:
	adrp	x9, _DP_CTL_DPDCK0_2_EN@GOTPAGE
Lloh47:
	ldr	x9, [x9, _DP_CTL_DPDCK0_2_EN@GOTPAGEOFF]
Lloh48:
	ldr	w9, [x9]
	cmp	w8, #0
	cinc	w10, w8, lt
	asr	w10, w10, #1
	tst	w9, w20
	csel	w0, w10, w8, eq
	ldr	x8, [x25]
	ldr	x8, [x8]
	sub	w9, w19, #1
	str	w0, [x8, w9, sxtw #2]
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh34, Lloh35, Lloh36
	.loh AdrpLdrGotLdr	Lloh31, Lloh32, Lloh33
	.loh AdrpLdrGotLdr	Lloh28, Lloh29, Lloh30
	.loh AdrpLdrGotLdr	Lloh25, Lloh26, Lloh27
	.loh AdrpLdrGot	Lloh23, Lloh24
	.loh AdrpLdrGot	Lloh21, Lloh22
	.loh AdrpLdrGot	Lloh19, Lloh20
	.loh AdrpLdrGot	Lloh17, Lloh18
	.loh AdrpLdrGot	Lloh15, Lloh16
	.loh AdrpLdrGot	Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh40, Lloh41, Lloh42
	.loh AdrpLdrGotLdr	Lloh37, Lloh38, Lloh39
	.loh AdrpLdrGotLdr	Lloh46, Lloh47, Lloh48
	.loh AdrpLdrGotLdr	Lloh43, Lloh44, Lloh45
	.cfi_endproc
                                        ; -- End function
	.comm	_IMX51_N_DPLLS,4,2              ; @IMX51_N_DPLLS
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Wrong PLL id"

	.comm	_ccm_softc,8,3                  ; @ccm_softc
	.comm	_DPLL_DP_CTL,4,2                ; @DPLL_DP_CTL
	.comm	_DP_CTL_HFSM,4,2                ; @DP_CTL_HFSM
	.comm	_DPLL_DP_HFS_OP,4,2             ; @DPLL_DP_HFS_OP
	.comm	_DPLL_DP_HFS_MFD,4,2            ; @DPLL_DP_HFS_MFD
	.comm	_DPLL_DP_HFS_MFN,4,2            ; @DPLL_DP_HFS_MFN
	.comm	_DPLL_DP_OP,4,2                 ; @DPLL_DP_OP
	.comm	_DPLL_DP_MFD,4,2                ; @DPLL_DP_MFD
	.comm	_DPLL_DP_MFN,4,2                ; @DPLL_DP_MFN
	.comm	_DP_OP_PDF_MASK,4,2             ; @DP_OP_PDF_MASK
	.comm	_DP_OP_MFI_MASK,4,2             ; @DP_OP_MFI_MASK
	.comm	_DP_OP_MFI_SHIFT,4,2            ; @DP_OP_MFI_SHIFT
	.comm	_DP_CTL_REF_CLK_SEL_MASK,4,2    ; @DP_CTL_REF_CLK_SEL_MASK
	.comm	_CCMC_CCR,4,2                   ; @CCMC_CCR
	.comm	_CCR_FPM_MULT,4,2               ; @CCR_FPM_MULT
	.comm	_DP_CTL_REF_CLK_DIV,4,2         ; @DP_CTL_REF_CLK_DIV
	.comm	_DP_CTL_DPDCK0_2_EN,4,2         ; @DP_CTL_DPDCK0_2_EN
	.no_dead_strip	_imx51_get_pll_freq
.subsections_via_symbols
