	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function aw_clk_frac_find_best
_aw_clk_frac_find_best:                 ## @aw_clk_frac_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	$72, %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, %rbx
	movq	%r8, -96(%rbp)                  ## 8-byte Spill
	movl	$0, (%r8)
	movq	%rcx, -88(%rbp)                 ## 8-byte Spill
	movl	$0, (%rcx)
	leaq	8(%rdi), %r14
	movq	%r14, %rdi
	callq	_aw_clk_factor_get_max
                                        ## kill: def $eax killed $eax def $rax
	movq	%rax, -80(%rbp)                 ## 8-byte Spill
	leaq	12(%rbx), %rdi
	callq	_aw_clk_factor_get_max
	movl	%eax, %r13d
	movq	%r14, %rdi
	callq	_aw_clk_factor_get_min
	movq	%rbx, %rcx
	movl	%eax, %ebx
	movl	(%rcx), %eax
	cltd
	movl	%r15d, -60(%rbp)                ## 4-byte Spill
	idivl	%r15d
                                        ## kill: def $eax killed $eax def $rax
	movl	$0, -44(%rbp)                   ## 4-byte Folded Spill
	movl	%r13d, -68(%rbp)                ## 4-byte Spill
	movq	%rax, -56(%rbp)                 ## 8-byte Spill
	cmpl	%r13d, %eax
	jg	LBB0_12
## %bb.1:
	movq	-80(%rbp), %rax                 ## 8-byte Reload
	leal	1(%rax), %edi
	movl	$0, -44(%rbp)                   ## 4-byte Folded Spill
	movl	%ebx, -64(%rbp)                 ## 4-byte Spill
	movq	%rcx, -104(%rbp)                ## 8-byte Spill
	movl	%edi, -72(%rbp)                 ## 4-byte Spill
	jmp	LBB0_2
	.p2align	4, 0x90
LBB0_11:                                ##   in Loop: Header=BB0_2 Depth=1
	movq	-56(%rbp), %rdx                 ## 8-byte Reload
	leal	1(%rdx), %eax
	cmpl	-68(%rbp), %edx                 ## 4-byte Folded Reload
                                        ## kill: def $eax killed $eax def $rax
	movq	%rax, -56(%rbp)                 ## 8-byte Spill
	movl	-64(%rbp), %ebx                 ## 4-byte Reload
	je	LBB0_12
LBB0_2:                                 ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_4 Depth 2
	cmpl	-80(%rbp), %ebx                 ## 4-byte Folded Reload
	jg	LBB0_11
## %bb.3:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	movl	%eax, %r15d
	imull	-60(%rbp), %r15d                ## 4-byte Folded Reload
	movl	%ebx, %r13d
	jmp	LBB0_4
	.p2align	4, 0x90
LBB0_10:                                ##   in Loop: Header=BB0_4 Depth=2
	incl	%r13d
	cmpl	%r13d, %edi
	je	LBB0_11
LBB0_4:                                 ##   Parent Loop BB0_2 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movl	%r15d, %eax
	cltd
	idivl	%r13d
	cmpl	(%rcx), %eax
	jl	LBB0_10
## %bb.5:                               ##   in Loop: Header=BB0_4 Depth=2
	movl	%eax, %r14d
	cmpl	4(%rcx), %eax
	jg	LBB0_10
## %bb.6:                               ##   in Loop: Header=BB0_4 Depth=2
	cmpl	%r12d, %r14d
	je	LBB0_7
## %bb.8:                               ##   in Loop: Header=BB0_4 Depth=2
	movl	%r12d, %edi
	subl	%r14d, %edi
	callq	_abs
	movq	%rax, %rbx
	movl	%r12d, %edi
	subl	-44(%rbp), %edi                 ## 4-byte Folded Reload
	callq	_abs
	movl	-72(%rbp), %edi                 ## 4-byte Reload
	movq	-104(%rbp), %rcx                ## 8-byte Reload
	cmpq	%rax, %rbx
	jge	LBB0_10
## %bb.9:                               ##   in Loop: Header=BB0_4 Depth=2
	movq	-88(%rbp), %rax                 ## 8-byte Reload
	movq	-56(%rbp), %rdx                 ## 8-byte Reload
	movl	%edx, (%rax)
	movq	-96(%rbp), %rax                 ## 8-byte Reload
	movl	%r13d, (%rax)
	movl	%r14d, -44(%rbp)                ## 4-byte Spill
	jmp	LBB0_10
LBB0_7:
	movq	-88(%rbp), %rax                 ## 8-byte Reload
	movq	-56(%rbp), %rcx                 ## 8-byte Reload
	movl	%ecx, (%rax)
	movq	-96(%rbp), %rax                 ## 8-byte Reload
	movl	%r13d, (%rax)
	movl	%r12d, -44(%rbp)                ## 4-byte Spill
LBB0_12:
	movl	-44(%rbp), %eax                 ## 4-byte Reload
	addq	$72, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.no_dead_strip	_aw_clk_frac_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_frac_find_best
_aw_clk_frac_find_best:                 ; @aw_clk_frac_find_best
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #128
	.cfi_def_cfa_offset 128
	stp	x28, x27, [sp, #32]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #48]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #64]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #80]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #96]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #112]            ; 16-byte Folded Spill
	add	x29, sp, #112
	.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	x21, x3
	mov	x20, x2
	mov	x22, x1
	mov	x23, x0
	str	x4, [sp, #24]                   ; 8-byte Folded Spill
	str	wzr, [x4]
	str	wzr, [x3]
	add	x26, x0, #8
	mov	x0, x26
	bl	_aw_clk_factor_get_max
	str	w0, [sp, #20]                   ; 4-byte Folded Spill
	add	x0, x23, #12
	bl	_aw_clk_factor_get_max
	mov	x24, x0
	mov	x0, x26
	bl	_aw_clk_factor_get_min
	mov	w19, #0
	ldr	w8, [x23]
	str	w22, [sp, #8]                   ; 4-byte Folded Spill
	sdiv	w22, w8, w22
	str	w24, [sp, #16]                  ; 4-byte Folded Spill
	cmp	w22, w24
	b.gt	LBB0_12
; %bb.1:
	mov	x26, x0
	mov	w19, #0
	ldr	w8, [sp, #20]                   ; 4-byte Folded Reload
	add	w24, w8, #1
	str	w0, [sp, #12]                   ; 4-byte Folded Spill
	b	LBB0_3
LBB0_2:                                 ;   in Loop: Header=BB0_3 Depth=1
	add	w8, w22, #1
	ldp	w26, w9, [sp, #12]              ; 8-byte Folded Reload
	cmp	w22, w9
	mov	x22, x8
	b.eq	LBB0_12
LBB0_3:                                 ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_6 Depth 2
	ldr	w8, [sp, #20]                   ; 4-byte Folded Reload
	cmp	w26, w8
	b.gt	LBB0_2
; %bb.4:                                ;   in Loop: Header=BB0_3 Depth=1
	ldr	w8, [sp, #8]                    ; 4-byte Folded Reload
	mul	w25, w22, w8
	b	LBB0_6
LBB0_5:                                 ;   in Loop: Header=BB0_6 Depth=2
	add	w26, w26, #1
	cmp	w24, w26
	b.eq	LBB0_2
LBB0_6:                                 ;   Parent Loop BB0_3 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	sdiv	w27, w25, w26
	ldr	w8, [x23]
	cmp	w27, w8
	b.lt	LBB0_5
; %bb.7:                                ;   in Loop: Header=BB0_6 Depth=2
	ldr	w8, [x23, #4]
	cmp	w27, w8
	b.gt	LBB0_5
; %bb.8:                                ;   in Loop: Header=BB0_6 Depth=2
	cmp	w27, w20
	b.eq	LBB0_11
; %bb.9:                                ;   in Loop: Header=BB0_6 Depth=2
	sub	w0, w20, w27
	bl	_abs
	mov	x28, x0
	sub	w0, w20, w19
	bl	_abs
	cmp	x28, x0
	b.ge	LBB0_5
; %bb.10:                               ;   in Loop: Header=BB0_6 Depth=2
	str	w22, [x21]
	ldr	x8, [sp, #24]                   ; 8-byte Folded Reload
	str	w26, [x8]
	mov	x19, x27
	b	LBB0_5
LBB0_11:
	str	w22, [x21]
	ldr	x8, [sp, #24]                   ; 8-byte Folded Reload
	str	w26, [x8]
	mov	x19, x20
LBB0_12:
	mov	x0, x19
	ldp	x29, x30, [sp, #112]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #96]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #80]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #64]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #48]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #128
	ret
	.cfi_endproc
                                        ; -- End function
	.no_dead_strip	_aw_clk_frac_find_best
.subsections_via_symbols
