	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function __rcar_lvds_pll_setup_d3_e3
___rcar_lvds_pll_setup_d3_e3:           ## @__rcar_lvds_pll_setup_d3_e3
	.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	$56, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%edx, %r12d
	movl	%esi, %r15d
	movq	%rdi, %r14
	xorps	%xmm0, %xmm0
	movups	%xmm0, -64(%rbp)
	movups	%xmm0, -80(%rbp)
	movq	$0, -48(%rbp)
	movq	$-1, -88(%rbp)
	movq	8(%rdi), %rax
	movl	(%rax), %ebx
	xorl	%edi, %edi
	callq	_LVDPLLCR_CKSEL_DU_DOTCLKIN
	leaq	-88(%rbp), %r13
	movq	%r14, %rdi
	movl	%ebx, %esi
	movl	%r15d, %edx
	movq	%r13, %rcx
	movl	%eax, %r8d
	movl	%r12d, %r9d
	callq	_rcar_lvds_d3_e3_pll_calc
	movq	8(%r14), %rax
	movl	4(%rax), %ebx
	movl	$1, %edi
	callq	_LVDPLLCR_CKSEL_DU_DOTCLKIN
	movq	%r14, %rdi
	movl	%ebx, %esi
	movl	%r15d, %edx
	movq	%r13, %rcx
	movl	%eax, %r8d
	movl	%r12d, %r9d
	callq	_rcar_lvds_d3_e3_pll_calc
	movl	(%r14), %esi
	movq	_LVDPLLCR_CKSEL_EXTAL@GOTPCREL(%rip), %rax
	movl	(%rax), %r8d
	movq	%r14, %rdi
	movl	%r15d, %edx
	movq	%r13, %rcx
	movl	%r12d, %r9d
	callq	_rcar_lvds_d3_e3_pll_calc
	movq	_LVDPLLCR_PLLON@GOTPCREL(%rip), %rax
	movl	-80(%rbp), %r13d
	orl	(%rax), %r13d
	movq	_LVDPLLCR_CLKOUT@GOTPCREL(%rip), %rax
	orl	(%rax), %r13d
	movq	-48(%rbp), %rdi
	decq	%rdi
	callq	_LVDPLLCR_PLLN
	movl	%eax, %r15d
	movq	-56(%rbp), %rdi
	decq	%rdi
	callq	_LVDPLLCR_PLLM
	movl	%eax, %ebx
	orl	%r15d, %ebx
	orl	%r13d, %ebx
	movq	-72(%rbp), %rdi
	testq	%rdi, %rdi
	jle	LBB0_2
## %bb.1:
	movq	_LVDPLLCR_STP_CLKOUTE@GOTPCREL(%rip), %rax
	movq	_LVDPLLCR_OUTCLKSEL@GOTPCREL(%rip), %rcx
	decq	%rdi
	orl	(%rax), %ebx
	orl	(%rcx), %ebx
	callq	_LVDPLLCR_PLLE
	orl	%eax, %ebx
LBB0_2:
	testl	%r12d, %r12d
	je	LBB0_4
## %bb.3:
	movq	_LVDPLLCR_OCKSEL@GOTPCREL(%rip), %rax
	movl	(%rax), %r12d
LBB0_4:
	orl	%ebx, %r12d
	movq	_LVDPLLCR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r14, %rdi
	movl	%r12d, %edx
	callq	_rcar_lvds_write
	movl	-64(%rbp), %edi
	xorl	%edx, %edx
	movq	_LVDDIV@GOTPCREL(%rip), %rax
	movl	(%rax), %r15d
	cmpl	$2, %edi
	jl	LBB0_6
## %bb.5:
	movq	_LVDDIV_DIVSEL@GOTPCREL(%rip), %rax
	movq	_LVDDIV_DIVRESET@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ebx
	orl	(%rax), %ebx
	decl	%edi
	callq	_LVDDIV_DIV
	movl	%eax, %edx
	orl	%ebx, %edx
LBB0_6:
	movq	%r14, %rdi
	movl	%r15d, %esi
	callq	_rcar_lvds_write
	addq	$56, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_LVDPLLCR_CKSEL_EXTAL,4,2       ## @LVDPLLCR_CKSEL_EXTAL
	.comm	_LVDPLLCR_PLLON,4,2             ## @LVDPLLCR_PLLON
	.comm	_LVDPLLCR_CLKOUT,4,2            ## @LVDPLLCR_CLKOUT
	.comm	_LVDPLLCR_STP_CLKOUTE,4,2       ## @LVDPLLCR_STP_CLKOUTE
	.comm	_LVDPLLCR_OUTCLKSEL,4,2         ## @LVDPLLCR_OUTCLKSEL
	.comm	_LVDPLLCR_OCKSEL,4,2            ## @LVDPLLCR_OCKSEL
	.comm	_LVDPLLCR,4,2                   ## @LVDPLLCR
	.comm	_LVDDIV,4,2                     ## @LVDDIV
	.comm	_LVDDIV_DIVSEL,4,2              ## @LVDDIV_DIVSEL
	.comm	_LVDDIV_DIVRESET,4,2            ## @LVDDIV_DIVRESET
	.no_dead_strip	___rcar_lvds_pll_setup_d3_e3
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function __rcar_lvds_pll_setup_d3_e3
___rcar_lvds_pll_setup_d3_e3:           ; @__rcar_lvds_pll_setup_d3_e3
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	stp	x24, x23, [sp, #48]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #64]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #80]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #96]             ; 16-byte Folded Spill
	add	x29, sp, #96
	.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
	mov	x20, x2
	mov	x21, x1
	mov	x19, x0
	str	xzr, [sp, #40]
	movi.2d	v0, #0000000000000000
	stur	q0, [sp, #24]
	stur	q0, [sp, #8]
	mov	x8, #-1
	str	x8, [sp]
	ldr	x8, [x0, #8]
	ldr	w22, [x8]
	mov	w0, #0
	bl	_LVDPLLCR_CKSEL_DU_DOTCLKIN
	mov	x4, x0
	mov	x3, sp
	mov	x0, x19
	mov	x1, x22
	mov	x2, x21
	mov	x5, x20
	bl	_rcar_lvds_d3_e3_pll_calc
	ldr	x8, [x19, #8]
	ldr	w22, [x8, #4]
	mov	w0, #1
	bl	_LVDPLLCR_CKSEL_DU_DOTCLKIN
	mov	x4, x0
	mov	x3, sp
	mov	x0, x19
	mov	x1, x22
	mov	x2, x21
	mov	x5, x20
	bl	_rcar_lvds_d3_e3_pll_calc
	ldr	w1, [x19]
Lloh0:
	adrp	x8, _LVDPLLCR_CKSEL_EXTAL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _LVDPLLCR_CKSEL_EXTAL@GOTPAGEOFF]
Lloh2:
	ldr	w4, [x8]
	mov	x3, sp
	mov	x0, x19
	mov	x2, x21
	mov	x5, x20
	bl	_rcar_lvds_d3_e3_pll_calc
Lloh3:
	adrp	x8, _LVDPLLCR_PLLON@GOTPAGE
Lloh4:
	ldr	x8, [x8, _LVDPLLCR_PLLON@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	ldr	w9, [sp, #8]
	orr	w8, w9, w8
Lloh6:
	adrp	x9, _LVDPLLCR_CLKOUT@GOTPAGE
Lloh7:
	ldr	x9, [x9, _LVDPLLCR_CLKOUT@GOTPAGEOFF]
Lloh8:
	ldr	w9, [x9]
	orr	w21, w8, w9
	ldr	x8, [sp, #40]
	sub	x0, x8, #1
	bl	_LVDPLLCR_PLLN
	orr	w21, w21, w0
	ldr	x8, [sp, #32]
	sub	x0, x8, #1
	bl	_LVDPLLCR_PLLM
	orr	w21, w21, w0
	ldr	x8, [sp, #16]
	subs	x0, x8, #1
	b.lt	LBB0_2
; %bb.1:
Lloh9:
	adrp	x8, _LVDPLLCR_STP_CLKOUTE@GOTPAGE
Lloh10:
	ldr	x8, [x8, _LVDPLLCR_STP_CLKOUTE@GOTPAGEOFF]
Lloh11:
	ldr	w22, [x8]
Lloh12:
	adrp	x8, _LVDPLLCR_OUTCLKSEL@GOTPAGE
Lloh13:
	ldr	x8, [x8, _LVDPLLCR_OUTCLKSEL@GOTPAGEOFF]
Lloh14:
	ldr	w23, [x8]
	bl	_LVDPLLCR_PLLE
	orr	w8, w22, w21
	orr	w8, w8, w23
	orr	w21, w8, w0
LBB0_2:
Lloh15:
	adrp	x8, _LVDPLLCR_OCKSEL@GOTPAGE
Lloh16:
	ldr	x8, [x8, _LVDPLLCR_OCKSEL@GOTPAGEOFF]
Lloh17:
	ldr	w8, [x8]
	cmp	w20, #0
	csel	w8, wzr, w8, eq
	orr	w2, w8, w21
Lloh18:
	adrp	x8, _LVDPLLCR@GOTPAGE
Lloh19:
	ldr	x8, [x8, _LVDPLLCR@GOTPAGEOFF]
Lloh20:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_rcar_lvds_write
	mov	w2, #0
	ldr	w8, [sp, #24]
Lloh21:
	adrp	x9, _LVDDIV@GOTPAGE
Lloh22:
	ldr	x9, [x9, _LVDDIV@GOTPAGEOFF]
Lloh23:
	ldr	w20, [x9]
	cmp	w8, #2
	b.lt	LBB0_4
; %bb.3:
Lloh24:
	adrp	x9, _LVDDIV_DIVSEL@GOTPAGE
Lloh25:
	ldr	x9, [x9, _LVDDIV_DIVSEL@GOTPAGEOFF]
Lloh26:
	ldr	w9, [x9]
Lloh27:
	adrp	x10, _LVDDIV_DIVRESET@GOTPAGE
Lloh28:
	ldr	x10, [x10, _LVDDIV_DIVRESET@GOTPAGEOFF]
Lloh29:
	ldr	w10, [x10]
	orr	w21, w10, w9
	sub	w0, w8, #1
	bl	_LVDDIV_DIV
	orr	w2, w21, w0
LBB0_4:
	mov	x0, x19
	mov	x1, x20
	bl	_rcar_lvds_write
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #48]             ; 16-byte Folded Reload
	add	sp, sp, #112
	ret
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh27, Lloh28, Lloh29
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh26
	.cfi_endproc
                                        ; -- End function
	.comm	_LVDPLLCR_CKSEL_EXTAL,4,2       ; @LVDPLLCR_CKSEL_EXTAL
	.comm	_LVDPLLCR_PLLON,4,2             ; @LVDPLLCR_PLLON
	.comm	_LVDPLLCR_CLKOUT,4,2            ; @LVDPLLCR_CLKOUT
	.comm	_LVDPLLCR_STP_CLKOUTE,4,2       ; @LVDPLLCR_STP_CLKOUTE
	.comm	_LVDPLLCR_OUTCLKSEL,4,2         ; @LVDPLLCR_OUTCLKSEL
	.comm	_LVDPLLCR_OCKSEL,4,2            ; @LVDPLLCR_OCKSEL
	.comm	_LVDPLLCR,4,2                   ; @LVDPLLCR
	.comm	_LVDDIV,4,2                     ; @LVDDIV
	.comm	_LVDDIV_DIVSEL,4,2              ; @LVDDIV_DIVSEL
	.comm	_LVDDIV_DIVRESET,4,2            ; @LVDDIV_DIVRESET
	.no_dead_strip	___rcar_lvds_pll_setup_d3_e3
.subsections_via_symbols
