	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ov5640_set_dvp_pclk
_ov5640_set_dvp_pclk:                   ## @ov5640_set_dvp_pclk
	.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
	subq	$24, %rsp
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r15
	leaq	-32(%rbp), %rax
	leaq	-28(%rbp), %rbx
	leaq	-48(%rbp), %rdx
	leaq	-44(%rbp), %rcx
	leaq	-40(%rbp), %r8
	leaq	-36(%rbp), %r9
	pushq	%rax
	pushq	%rbx
	callq	_ov5640_calc_pclk
	addq	$16, %rsp
	movl	-28(%rbp), %ecx
	cmpl	$2, %ecx
	jne	LBB0_2
## %bb.1:
	movl	$8, -28(%rbp)
	movl	$8, %ecx
LBB0_2:
	movq	_OV5640_REG_SC_PLL_CTRL0@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r15, %rdi
	movl	$15, %edx
	callq	_ov5640_mod_reg
	testl	%eax, %eax
	jne	LBB0_7
## %bb.3:
	movq	_OV5640_REG_SC_PLL_CTRL1@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	-40(%rbp), %ecx
	shll	$4, %ecx
	movq	%r15, %rdi
	movl	$255, %edx
	callq	_ov5640_mod_reg
	testl	%eax, %eax
	jne	LBB0_7
## %bb.4:
	movq	_OV5640_REG_SC_PLL_CTRL2@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	-44(%rbp), %ecx
	movq	%r15, %rdi
	movl	$255, %edx
	callq	_ov5640_mod_reg
	testl	%eax, %eax
	jne	LBB0_7
## %bb.5:
	movq	_OV5640_REG_SC_PLL_CTRL3@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	-36(%rbp), %ecx
	shll	$4, %ecx
	addl	$-16, %ecx
	orl	-48(%rbp), %ecx
	movq	%r15, %rdi
	movl	$31, %edx
	callq	_ov5640_mod_reg
	testl	%eax, %eax
	jne	LBB0_7
## %bb.6:
	movq	_OV5640_REG_SYS_ROOT_DIVIDER@GOTPCREL(%rip), %rax
	movl	(%rax), %r14d
	movl	-32(%rbp), %edi
	callq	_ilog2
	shll	$4, %eax
	movq	%r15, %rdi
	movl	%r14d, %esi
	movl	$48, %edx
	movl	%eax, %ecx
	callq	_ov5640_mod_reg
LBB0_7:
	addq	$24, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_OV5640_REG_SC_PLL_CTRL0,4,2    ## @OV5640_REG_SC_PLL_CTRL0
	.comm	_OV5640_REG_SC_PLL_CTRL1,4,2    ## @OV5640_REG_SC_PLL_CTRL1
	.comm	_OV5640_REG_SC_PLL_CTRL2,4,2    ## @OV5640_REG_SC_PLL_CTRL2
	.comm	_OV5640_REG_SC_PLL_CTRL3,4,2    ## @OV5640_REG_SC_PLL_CTRL3
	.comm	_OV5640_REG_SYS_ROOT_DIVIDER,4,2 ## @OV5640_REG_SYS_ROOT_DIVIDER
	.no_dead_strip	_ov5640_set_dvp_pclk
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ov5640_set_dvp_pclk
_ov5640_set_dvp_pclk:                   ; @ov5640_set_dvp_pclk
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.cfi_def_cfa_offset 64
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	mov	x19, x0
	sub	x2, x29, #20
	add	x3, sp, #24
	add	x4, sp, #20
	add	x5, sp, #16
	add	x6, sp, #12
	add	x7, sp, #8
	bl	_ov5640_calc_pclk
	ldr	w3, [sp, #12]
	cmp	w3, #2
	b.ne	LBB0_2
; %bb.1:
	mov	w3, #8
	str	w3, [sp, #12]
LBB0_2:
Lloh0:
	adrp	x8, _OV5640_REG_SC_PLL_CTRL0@GOTPAGE
Lloh1:
	ldr	x8, [x8, _OV5640_REG_SC_PLL_CTRL0@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	mov	x0, x19
	mov	w2, #15
	bl	_ov5640_mod_reg
	cbnz	w0, LBB0_7
; %bb.3:
Lloh3:
	adrp	x8, _OV5640_REG_SC_PLL_CTRL1@GOTPAGE
Lloh4:
	ldr	x8, [x8, _OV5640_REG_SC_PLL_CTRL1@GOTPAGEOFF]
Lloh5:
	ldr	w1, [x8]
	ldr	w8, [sp, #20]
	lsl	w3, w8, #4
	mov	x0, x19
	mov	w2, #255
	bl	_ov5640_mod_reg
	cbnz	w0, LBB0_7
; %bb.4:
Lloh6:
	adrp	x8, _OV5640_REG_SC_PLL_CTRL2@GOTPAGE
Lloh7:
	ldr	x8, [x8, _OV5640_REG_SC_PLL_CTRL2@GOTPAGEOFF]
Lloh8:
	ldr	w1, [x8]
	ldr	w3, [sp, #24]
	mov	x0, x19
	mov	w2, #255
	bl	_ov5640_mod_reg
	cbnz	w0, LBB0_7
; %bb.5:
Lloh9:
	adrp	x8, _OV5640_REG_SC_PLL_CTRL3@GOTPAGE
Lloh10:
	ldr	x8, [x8, _OV5640_REG_SC_PLL_CTRL3@GOTPAGEOFF]
Lloh11:
	ldr	w1, [x8]
	ldur	w8, [x29, #-20]
	ldr	w9, [sp, #16]
	lsl	w9, w9, #4
	sub	w9, w9, #16
	orr	w3, w9, w8
	mov	x0, x19
	mov	w2, #31
	bl	_ov5640_mod_reg
	cbnz	w0, LBB0_7
; %bb.6:
Lloh12:
	adrp	x8, _OV5640_REG_SYS_ROOT_DIVIDER@GOTPAGE
Lloh13:
	ldr	x8, [x8, _OV5640_REG_SYS_ROOT_DIVIDER@GOTPAGEOFF]
Lloh14:
	ldr	w20, [x8]
	ldr	w0, [sp, #8]
	bl	_ilog2
	lsl	w3, w0, #4
	mov	x0, x19
	mov	x1, x20
	mov	w2, #48
	bl	_ov5640_mod_reg
LBB0_7:
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #64
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.cfi_endproc
                                        ; -- End function
	.comm	_OV5640_REG_SC_PLL_CTRL0,4,2    ; @OV5640_REG_SC_PLL_CTRL0
	.comm	_OV5640_REG_SC_PLL_CTRL1,4,2    ; @OV5640_REG_SC_PLL_CTRL1
	.comm	_OV5640_REG_SC_PLL_CTRL2,4,2    ; @OV5640_REG_SC_PLL_CTRL2
	.comm	_OV5640_REG_SC_PLL_CTRL3,4,2    ; @OV5640_REG_SC_PLL_CTRL3
	.comm	_OV5640_REG_SYS_ROOT_DIVIDER,4,2 ; @OV5640_REG_SYS_ROOT_DIVIDER
	.no_dead_strip	_ov5640_set_dvp_pclk
.subsections_via_symbols
