	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function dispc_mgr_lclk_rate
_dispc_mgr_lclk_rate:                   ## @dispc_mgr_lclk_rate
	.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
	movl	%esi, %r12d
	movq	%rdi, %r14
	movl	%esi, %edi
	callq	_dss_mgr_is_lcd
	testl	%eax, %eax
	je	LBB0_8
## %bb.1:
	movl	(%r14), %edi
	movl	%r12d, %esi
	callq	_dss_get_lcd_clk_source
	movl	%eax, %ebx
	movq	_DSS_CLK_SRC_FCK@GOTPCREL(%rip), %rax
	movl	(%r14), %edi
	cmpl	(%rax), %ebx
	jne	LBB0_3
## %bb.2:
	callq	_dss_get_dispc_clk_rate
	movq	%rax, %r15
	jmp	LBB0_4
LBB0_8:
	movq	%r14, %rdi
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_dispc_fclk_rate                ## TAILCALL
LBB0_3:
	movl	%ebx, %esi
	callq	_dss_pll_find_by_src
	movq	%rax, %r15
	movl	%ebx, %edi
	callq	_dss_pll_get_clkout_idx_for_src
	movq	(%r15), %rcx
	movl	%eax, %eax
	movq	(%rcx,%rax,8), %r15
LBB0_4:
	movl	%r12d, %edi
	callq	_DISPC_DIVISORo
	movq	%r14, %rdi
	movl	%eax, %esi
	movl	$23, %edx
	movl	$16, %ecx
	callq	_REG_GET
	movl	%eax, %ecx
	movslq	%eax, %rsi
	movq	%r15, %rax
	orq	%rsi, %rax
	shrq	$32, %rax
	je	LBB0_5
## %bb.6:
	movq	%r15, %rax
	xorl	%edx, %edx
	divq	%rsi
	jmp	LBB0_7
LBB0_5:
	movl	%r15d, %eax
	xorl	%edx, %edx
	divl	%ecx
                                        ## kill: def $eax killed $eax def $rax
LBB0_7:
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_DSS_CLK_SRC_FCK,4,2            ## @DSS_CLK_SRC_FCK
	.no_dead_strip	_dispc_mgr_lclk_rate
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function dispc_mgr_lclk_rate
_dispc_mgr_lclk_rate:                   ; @dispc_mgr_lclk_rate
	.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	x20, x1
	mov	x19, x0
	mov	x0, x1
	bl	_dss_mgr_is_lcd
	cbz	w0, LBB0_3
; %bb.1:
	ldr	w0, [x19]
	mov	x1, x20
	bl	_dss_get_lcd_clk_source
	mov	x21, x0
Lloh0:
	adrp	x8, _DSS_CLK_SRC_FCK@GOTPAGE
Lloh1:
	ldr	x8, [x8, _DSS_CLK_SRC_FCK@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	ldr	w0, [x19]
	cmp	w21, w8
	b.ne	LBB0_4
; %bb.2:
	bl	_dss_get_dispc_clk_rate
	mov	x21, x0
	b	LBB0_5
LBB0_3:
	mov	x0, x19
	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	_dispc_fclk_rate
LBB0_4:
	mov	x1, x21
	bl	_dss_pll_find_by_src
	mov	x22, x0
	mov	x0, x21
	bl	_dss_pll_get_clkout_idx_for_src
	ldr	x8, [x22]
	ldr	x21, [x8, w0, uxtw #3]
LBB0_5:
	mov	x0, x20
	bl	_DISPC_DIVISORo
	mov	x1, x0
	mov	x0, x19
	mov	w2, #23
	mov	w3, #16
	bl	_REG_GET
                                        ; kill: def $w0 killed $w0 def $x0
	sxtw	x8, w0
	udiv	x0, x21, 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	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_DSS_CLK_SRC_FCK,4,2            ; @DSS_CLK_SRC_FCK
	.no_dead_strip	_dispc_mgr_lclk_rate
.subsections_via_symbols
