	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ov2659_pll_calc_params
_ov2659_pll_calc_params:                ## @ov2659_pll_calc_params
	.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
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	32(%rdi), %rax
	movq	%rax, -64(%rbp)                 ## 8-byte Spill
	movq	_ctrl1@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -56(%rbp)                 ## 8-byte Spill
	movq	(%rax), %rbx
	testq	%rbx, %rbx
	movq	%rdi, -48(%rbp)                 ## 8-byte Spill
	je	LBB0_1
## %bb.2:
	movq	40(%rdi), %rax
	movl	(%rax), %r13d
	movq	_ctrl3@GOTPCREL(%rip), %rax
	movq	(%rax), %rdx
	movq	(%rdx), %r12
	movl	$-1, %r10d
	xorl	%esi, %esi
	xorl	%r9d, %r9d
	xorl	%r15d, %r15d
	xorl	%r8d, %r8d
	movq	%r12, -72(%rbp)                 ## 8-byte Spill
	movq	%rdx, -88(%rbp)                 ## 8-byte Spill
	jmp	LBB0_3
	.p2align	4, 0x90
LBB0_11:                                ##   in Loop: Header=BB0_3 Depth=1
	movq	-80(%rbp), %rsi                 ## 8-byte Reload
	incq	%rsi
	movq	%rsi, %rax
	shlq	$4, %rax
	movq	-56(%rbp), %rcx                 ## 8-byte Reload
	movq	(%rcx,%rax), %rbx
	testq	%rbx, %rbx
	movq	-72(%rbp), %r12                 ## 8-byte Reload
	je	LBB0_12
LBB0_3:                                 ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_5 Depth 2
                                        ##       Child Loop BB0_6 Depth 3
	testq	%r12, %r12
	movq	%rsi, -80(%rbp)                 ## 8-byte Spill
	je	LBB0_11
## %bb.4:                               ##   in Loop: Header=BB0_3 Depth=1
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	movl	(%rax), %r11d
	movq	%rsi, %rax
	shlq	$4, %rax
	movq	-56(%rbp), %rcx                 ## 8-byte Reload
	leaq	(%rcx,%rax), %rdi
	addq	$8, %rdi
	xorl	%ecx, %ecx
	jmp	LBB0_5
	.p2align	4, 0x90
LBB0_10:                                ##   in Loop: Header=BB0_5 Depth=2
	movq	-96(%rbp), %rcx                 ## 8-byte Reload
	incq	%rcx
	movq	%rcx, %rax
	shlq	$4, %rax
	movq	-88(%rbp), %rdx                 ## 8-byte Reload
	movq	(%rdx,%rax), %r12
	testq	%r12, %r12
	je	LBB0_11
LBB0_5:                                 ##   Parent Loop BB0_3 Depth=1
                                        ## =>  This Loop Header: Depth=2
                                        ##       Child Loop BB0_6 Depth 3
	movq	%rcx, -96(%rbp)                 ## 8-byte Spill
	movq	%rcx, %rax
	shlq	$4, %rax
	leaq	(%rdx,%rax), %r14
	addq	$8, %r14
	movl	$1, %ecx
	movl	%r11d, %esi
	jmp	LBB0_6
	.p2align	4, 0x90
LBB0_8:                                 ##   in Loop: Header=BB0_6 Depth=3
	movq	(%rdi), %r9
	movq	(%r14), %r8
	movq	%rcx, %r15
	movl	%edx, %r10d
LBB0_9:                                 ##   in Loop: Header=BB0_6 Depth=3
	incq	%rcx
	addl	%r11d, %esi
	cmpq	$64, %rcx
	je	LBB0_10
LBB0_6:                                 ##   Parent Loop BB0_3 Depth=1
                                        ##     Parent Loop BB0_5 Depth=2
                                        ## =>    This Inner Loop Header: Depth=3
	movl	%esi, %eax
	cltd
	idivl	%r12d
	cltd
	idivl	%ebx
	subl	%r13d, %eax
	movl	%eax, %edx
	negl	%edx
	cmovsl	%eax, %edx
	cmpl	$-1, %r10d
	je	LBB0_8
## %bb.7:                               ##   in Loop: Header=BB0_6 Depth=3
	cmpl	%r10d, %edx
	jge	LBB0_9
	jmp	LBB0_8
LBB0_1:
	xorl	%r8d, %r8d
	xorl	%r15d, %r15d
	xorl	%r9d, %r9d
LBB0_12:
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	movq	%r9, 24(%rax)
	movq	%r15, 16(%rax)
	movq	%r8, 8(%rax)
	leaq	L_.str(%rip), %rsi
	movq	-64(%rbp), %rdi                 ## 8-byte Reload
	movq	%r9, %rdx
	movq	%r15, %rcx
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_dev_dbg                        ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_ctrl1,8,3                      ## @ctrl1
	.comm	_ctrl3,8,3                      ## @ctrl3
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Actual reg config: ctrl1_reg: %02x ctrl2_reg: %02x ctrl3_reg: %02x\n"

	.no_dead_strip	_ov2659_pll_calc_params
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ov2659_pll_calc_params
_ov2659_pll_calc_params:                ; @ov2659_pll_calc_params
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-16]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 16
	.cfi_offset w19, -8
	.cfi_offset w20, -16
	ldr	x8, [x0, #32]
Lloh0:
	adrp	x9, _ctrl1@GOTPAGE
Lloh1:
	ldr	x9, [x9, _ctrl1@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x9]
	ldr	x14, [x9]
	cbz	x14, LBB0_11
; %bb.1:
	mov	x10, #0
	mov	x2, #0
	mov	x3, #0
	mov	x4, #0
	ldr	x11, [x0, #40]
	ldr	w11, [x11]
Lloh3:
	adrp	x12, _ctrl3@GOTPAGE
Lloh4:
	ldr	x12, [x12, _ctrl3@GOTPAGEOFF]
Lloh5:
	ldr	x12, [x12]
	ldr	x13, [x12]
	mov	w15, #-1
	b	LBB0_3
LBB0_2:                                 ;   in Loop: Header=BB0_3 Depth=1
	add	x10, x10, #1
	lsl	x14, x10, #4
	ldr	x14, [x9, x14]
	cbz	x14, LBB0_12
LBB0_3:                                 ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_6 Depth 2
                                        ;       Child Loop BB0_9 Depth 3
	cbz	x13, LBB0_2
; %bb.4:                                ;   in Loop: Header=BB0_3 Depth=1
	mov	x16, #0
	ldr	w17, [x0]
	add	x1, x9, x10, lsl #4
	add	x1, x1, #8
	mov	x5, x13
	b	LBB0_6
LBB0_5:                                 ;   in Loop: Header=BB0_6 Depth=2
	add	x16, x16, #1
	lsl	x5, x16, #4
	ldr	x5, [x12, x5]
	cbz	x5, LBB0_2
LBB0_6:                                 ;   Parent Loop BB0_3 Depth=1
                                        ; =>  This Loop Header: Depth=2
                                        ;       Child Loop BB0_9 Depth 3
	add	x6, x12, x16, lsl #4
	add	x6, x6, #8
	mov	x7, x17
	mov	w19, #1
	b	LBB0_9
LBB0_7:                                 ;   in Loop: Header=BB0_9 Depth=3
	ldr	x2, [x1]
	ldr	x4, [x6]
	mov	x3, x19
	mov	x15, x20
LBB0_8:                                 ;   in Loop: Header=BB0_9 Depth=3
	add	x19, x19, #1
	add	w7, w7, w17
	cmp	x19, #64
	b.eq	LBB0_5
LBB0_9:                                 ;   Parent Loop BB0_3 Depth=1
                                        ;     Parent Loop BB0_6 Depth=2
                                        ; =>    This Inner Loop Header: Depth=3
	sdiv	w20, w7, w5
	sdiv	w20, w20, w14
	subs	w20, w20, w11
	cneg	w20, w20, mi
	cmn	w15, #1
	b.eq	LBB0_7
; %bb.10:                               ;   in Loop: Header=BB0_9 Depth=3
	cmp	w20, w15
	b.ge	LBB0_8
	b	LBB0_7
LBB0_11:
	mov	x4, #0
	mov	x3, #0
	mov	x2, #0
LBB0_12:
	stp	x3, x2, [x0, #16]
Lloh6:
	adrp	x1, l_.str@PAGE
Lloh7:
	add	x1, x1, l_.str@PAGEOFF
	str	x4, [x0, #8]
	mov	x0, x8
	ldp	x20, x19, [sp], #16             ; 16-byte Folded Reload
	b	_dev_dbg
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpAdd	Lloh6, Lloh7
	.cfi_endproc
                                        ; -- End function
	.comm	_ctrl1,8,3                      ; @ctrl1
	.comm	_ctrl3,8,3                      ; @ctrl3
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Actual reg config: ctrl1_reg: %02x ctrl2_reg: %02x ctrl3_reg: %02x\n"

	.no_dead_strip	_ov2659_pll_calc_params
.subsections_via_symbols
