	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function aw_clk_mipi_find_best
_aw_clk_mipi_find_best:                 ## @aw_clk_mipi_find_best
	.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	$88, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdx, -120(%rbp)                ## 8-byte Spill
	movq	%rsi, -80(%rbp)                 ## 8-byte Spill
	movq	%rdi, %r13
	movq	%r9, -112(%rbp)                 ## 8-byte Spill
	movq	$0, (%r9)
	movq	%rcx, -96(%rbp)                 ## 8-byte Spill
	movq	$0, (%rcx)
	movq	%r8, -104(%rbp)                 ## 8-byte Spill
	movq	$0, (%r8)
	leaq	8(%rdi), %rbx
	movq	%rbx, %rdi
	callq	_aw_clk_factor_get_min
	movq	%rax, %r14
	movq	%rbx, -88(%rbp)                 ## 8-byte Spill
	movq	%rbx, %rdi
	callq	_aw_clk_factor_get_max
	movq	%r14, -48(%rbp)                 ## 8-byte Spill
	cmpq	%rax, %r14
	jle	LBB0_2
## %bb.1:
	xorl	%r15d, %r15d
LBB0_16:
	movq	%r15, %rax
	addq	$88, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_2:
	leaq	4(%r13), %rbx
	xorl	%r15d, %r15d
	movq	%r13, -64(%rbp)                 ## 8-byte Spill
	movq	%rbx, -56(%rbp)                 ## 8-byte Spill
LBB0_3:                                 ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_5 Depth 2
                                        ##       Child Loop BB0_8 Depth 3
	movq	%rbx, %rdi
	callq	_aw_clk_factor_get_min
	movq	%rax, %r12
	movq	%rbx, %rdi
	callq	_aw_clk_factor_get_max
	cmpq	%rax, %r12
	jle	LBB0_4
LBB0_15:                                ##   in Loop: Header=BB0_3 Depth=1
	movq	-48(%rbp), %rbx                 ## 8-byte Reload
	leaq	1(%rbx), %r14
	movq	-88(%rbp), %rdi                 ## 8-byte Reload
	callq	_aw_clk_factor_get_max
	cmpq	%rax, %rbx
	movq	%r14, -48(%rbp)                 ## 8-byte Spill
	movq	-56(%rbp), %rbx                 ## 8-byte Reload
	jl	LBB0_3
	jmp	LBB0_16
	.p2align	4, 0x90
LBB0_4:                                 ##   in Loop: Header=BB0_3 Depth=1
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	imulq	-80(%rbp), %rax                 ## 8-byte Folded Reload
	movq	%rax, -72(%rbp)                 ## 8-byte Spill
	jmp	LBB0_5
	.p2align	4, 0x90
LBB0_14:                                ##   in Loop: Header=BB0_5 Depth=2
	leaq	1(%r12), %rbx
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	callq	_aw_clk_factor_get_max
	cmpq	%rax, %r12
	movq	%rbx, %r12
	movq	-64(%rbp), %r13                 ## 8-byte Reload
	jge	LBB0_15
LBB0_5:                                 ##   Parent Loop BB0_3 Depth=1
                                        ## =>  This Loop Header: Depth=2
                                        ##       Child Loop BB0_8 Depth 3
	movq	%r13, %rdi
	callq	_aw_clk_factor_get_min
	movq	%rax, %r14
	movq	%r13, %rdi
	callq	_aw_clk_factor_get_max
	cmpq	%rax, %r14
	jg	LBB0_14
## %bb.6:                               ##   in Loop: Header=BB0_5 Depth=2
	movq	-72(%rbp), %rbx                 ## 8-byte Reload
	imulq	%r12, %rbx
	.p2align	4, 0x90
LBB0_8:                                 ##   Parent Loop BB0_3 Depth=1
                                        ##     Parent Loop BB0_5 Depth=2
                                        ## =>    This Inner Loop Header: Depth=3
	movq	%rbx, %rax
	orq	%r14, %rax
	shrq	$32, %rax
	je	LBB0_9
## %bb.10:                              ##   in Loop: Header=BB0_8 Depth=3
	movq	%rbx, %rax
	cqto
	idivq	%r14
	cmpq	%rax, %r15
	jge	LBB0_13
LBB0_12:                                ##   in Loop: Header=BB0_8 Depth=3
	movq	-112(%rbp), %rcx                ## 8-byte Reload
	movq	-48(%rbp), %rdx                 ## 8-byte Reload
	movq	%rdx, (%rcx)
	movq	-96(%rbp), %rcx                 ## 8-byte Reload
	movq	%r12, (%rcx)
	movq	-104(%rbp), %rcx                ## 8-byte Reload
	movq	%r14, (%rcx)
	movq	%rax, %r15
LBB0_13:                                ##   in Loop: Header=BB0_8 Depth=3
	movq	-120(%rbp), %rax                ## 8-byte Reload
	cmpq	(%rax), %r15
	je	LBB0_16
## %bb.7:                               ##   in Loop: Header=BB0_8 Depth=3
	leaq	1(%r14), %r13
	movq	-64(%rbp), %rdi                 ## 8-byte Reload
	callq	_aw_clk_factor_get_max
	cmpq	%rax, %r14
	movq	%r13, %r14
	jl	LBB0_8
	jmp	LBB0_14
	.p2align	4, 0x90
LBB0_9:                                 ##   in Loop: Header=BB0_8 Depth=3
	movl	%ebx, %eax
	xorl	%edx, %edx
	divl	%r14d
                                        ## kill: def $eax killed $eax def $rax
	cmpq	%rax, %r15
	jl	LBB0_12
	jmp	LBB0_13
	.cfi_endproc
                                        ## -- End function
	.no_dead_strip	_aw_clk_mipi_find_best
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function aw_clk_mipi_find_best
_aw_clk_mipi_find_best:                 ; @aw_clk_mipi_find_best
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #144
	.cfi_def_cfa_offset 144
	stp	x28, x27, [sp, #48]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #64]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #80]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #96]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #112]            ; 16-byte Folded Spill
	stp	x29, x30, [sp, #128]            ; 16-byte Folded Spill
	add	x29, sp, #128
	.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
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	mov	x20, x4
	mov	x21, x3
	mov	x22, x2
	str	x1, [sp, #16]                   ; 8-byte Folded Spill
	mov	x24, x0
	str	x5, [sp, #40]                   ; 8-byte Folded Spill
	str	xzr, [x5]
	str	xzr, [x3]
	str	xzr, [x4]
	add	x19, x0, #8
	mov	x0, x19
	bl	_aw_clk_factor_get_min
	mov	x26, x0
	str	x19, [sp, #24]                  ; 8-byte Folded Spill
	mov	x0, x19
	bl	_aw_clk_factor_get_max
	mov	x27, #0
	cmp	x26, x0
	b.le	LBB0_2
LBB0_1:
	mov	x0, x27
	ldp	x29, x30, [sp, #128]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #112]            ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #96]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #80]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #64]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #48]             ; 16-byte Folded Reload
	add	sp, sp, #144
	ret
LBB0_2:
	mov	x27, #0
	add	x25, x24, #4
	str	x25, [sp, #32]                  ; 8-byte Folded Spill
LBB0_3:                                 ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_7 Depth 2
                                        ;       Child Loop BB0_9 Depth 3
	mov	x0, x25
	bl	_aw_clk_factor_get_min
	mov	x23, x0
	mov	x0, x25
	bl	_aw_clk_factor_get_max
	cmp	x23, x0
	b.le	LBB0_5
LBB0_4:                                 ;   in Loop: Header=BB0_3 Depth=1
	add	x19, x26, #1
	ldr	x0, [sp, #24]                   ; 8-byte Folded Reload
	bl	_aw_clk_factor_get_max
	cmp	x26, x0
	mov	x26, x19
	b.lt	LBB0_3
	b	LBB0_1
LBB0_5:                                 ;   in Loop: Header=BB0_3 Depth=1
	ldr	x8, [sp, #16]                   ; 8-byte Folded Reload
	mul	x8, x26, x8
	str	x8, [sp, #8]                    ; 8-byte Folded Spill
	b	LBB0_7
LBB0_6:                                 ;   in Loop: Header=BB0_7 Depth=2
	add	x19, x23, #1
	ldr	x25, [sp, #32]                  ; 8-byte Folded Reload
	mov	x0, x25
	bl	_aw_clk_factor_get_max
	cmp	x23, x0
	mov	x23, x19
	b.ge	LBB0_4
LBB0_7:                                 ;   Parent Loop BB0_3 Depth=1
                                        ; =>  This Loop Header: Depth=2
                                        ;       Child Loop BB0_9 Depth 3
	mov	x0, x24
	bl	_aw_clk_factor_get_min
	mov	x25, x0
	mov	x0, x24
	bl	_aw_clk_factor_get_max
	cmp	x25, x0
	b.gt	LBB0_6
; %bb.8:                                ;   in Loop: Header=BB0_7 Depth=2
	ldr	x8, [sp, #8]                    ; 8-byte Folded Reload
	mul	x28, x8, x23
LBB0_9:                                 ;   Parent Loop BB0_3 Depth=1
                                        ;     Parent Loop BB0_7 Depth=2
                                        ; =>    This Inner Loop Header: Depth=3
	sdiv	x8, x28, x25
	cmp	x27, x8
	b.ge	LBB0_11
; %bb.10:                               ;   in Loop: Header=BB0_9 Depth=3
	ldr	x9, [sp, #40]                   ; 8-byte Folded Reload
	str	x26, [x9]
	str	x23, [x21]
	mov	x27, x8
	str	x25, [x20]
LBB0_11:                                ;   in Loop: Header=BB0_9 Depth=3
	ldr	x8, [x22]
	cmp	x27, x8
	b.eq	LBB0_1
; %bb.12:                               ;   in Loop: Header=BB0_9 Depth=3
	add	x19, x25, #1
	mov	x0, x24
	bl	_aw_clk_factor_get_max
	cmp	x25, x0
	mov	x25, x19
	b.lt	LBB0_9
	b	LBB0_6
	.cfi_endproc
                                        ; -- End function
	.no_dead_strip	_aw_clk_mipi_find_best
.subsections_via_symbols
