	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function aw_clk_nmm_find_best
_aw_clk_nmm_find_best:                  ## @aw_clk_nmm_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	$104, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdx, -136(%rbp)                ## 8-byte Spill
	movl	%esi, -48(%rbp)                 ## 4-byte Spill
	movq	%rdi, %r15
	movq	%r9, -128(%rbp)                 ## 8-byte Spill
	movl	$0, (%r9)
	movq	%r8, -120(%rbp)                 ## 8-byte Spill
	movl	$0, (%r8)
	movq	%rcx, -112(%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, -104(%rbp)                ## 8-byte Spill
	movq	%r14, %rdi
	callq	_aw_clk_factor_get_min
	movl	%eax, %r13d
	leaq	4(%r15), %r14
	movq	%r14, %rdi
	callq	_aw_clk_factor_get_max
	movl	%eax, %r12d
	movq	%r14, %rdi
	callq	_aw_clk_factor_get_min
	movl	%eax, %r14d
	movq	%r15, %rdi
	callq	_aw_clk_factor_get_max
	movl	%eax, -44(%rbp)                 ## 4-byte Spill
	movq	%r15, %rdi
	callq	_aw_clk_factor_get_min
	movl	%eax, %ecx
                                        ## implicit-def: $eax
                                        ## kill: killed $eax
	movl	%r12d, -80(%rbp)                ## 4-byte Spill
	movq	%r14, -64(%rbp)                 ## 8-byte Spill
	cmpl	%r12d, %r14d
	jle	LBB0_1
LBB0_11:
	movl	-52(%rbp), %eax                 ## 4-byte Reload
	addq	$104, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_1:
	movq	-104(%rbp), %rax                ## 8-byte Reload
	incl	%eax
	movl	%eax, -92(%rbp)                 ## 4-byte Spill
	movl	%r13d, %eax
	imull	-48(%rbp), %eax                 ## 4-byte Folded Reload
	movl	%eax, -84(%rbp)                 ## 4-byte Spill
                                        ## implicit-def: $eax
                                        ## kill: killed $eax
	movl	%r13d, -88(%rbp)                ## 4-byte Spill
	movl	%ecx, -76(%rbp)                 ## 4-byte Spill
	movq	-136(%rbp), %rbx                ## 8-byte Reload
	jmp	LBB0_2
	.p2align	4, 0x90
LBB0_10:                                ##   in Loop: Header=BB0_2 Depth=1
	movq	-64(%rbp), %rcx                 ## 8-byte Reload
	leal	1(%rcx), %eax
	cmpl	-80(%rbp), %ecx                 ## 4-byte Folded Reload
                                        ## kill: def $eax killed $eax def $rax
	movq	%rax, -64(%rbp)                 ## 8-byte Spill
	movl	-76(%rbp), %ecx                 ## 4-byte Reload
	je	LBB0_11
LBB0_2:                                 ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_4 Depth 2
                                        ##       Child Loop BB0_6 Depth 3
	cmpl	-44(%rbp), %ecx                 ## 4-byte Folded Reload
	jg	LBB0_10
## %bb.3:                               ##   in Loop: Header=BB0_2 Depth=1
	movl	%ecx, %eax
	movq	%rax, -72(%rbp)                 ## 8-byte Spill
	jmp	LBB0_4
	.p2align	4, 0x90
LBB0_9:                                 ##   in Loop: Header=BB0_4 Depth=2
	movq	-72(%rbp), %rcx                 ## 8-byte Reload
	leal	1(%rcx), %eax
	cmpl	-44(%rbp), %ecx                 ## 4-byte Folded Reload
                                        ## kill: def $eax killed $eax def $rax
	movq	%rax, -72(%rbp)                 ## 8-byte Spill
	movl	-88(%rbp), %r13d                ## 4-byte Reload
	je	LBB0_10
LBB0_4:                                 ##   Parent Loop BB0_2 Depth=1
                                        ## =>  This Loop Header: Depth=2
                                        ##       Child Loop BB0_6 Depth 3
	cmpl	-104(%rbp), %r13d               ## 4-byte Folded Reload
	jg	LBB0_9
## %bb.5:                               ##   in Loop: Header=BB0_4 Depth=2
	movl	-84(%rbp), %r12d                ## 4-byte Reload
	jmp	LBB0_6
	.p2align	4, 0x90
LBB0_8:                                 ##   in Loop: Header=BB0_6 Depth=3
	incl	%r13d
	addl	-48(%rbp), %r12d                ## 4-byte Folded Reload
	cmpl	%r13d, -92(%rbp)                ## 4-byte Folded Reload
	je	LBB0_9
LBB0_6:                                 ##   Parent Loop BB0_2 Depth=1
                                        ##     Parent Loop BB0_4 Depth=2
                                        ## =>    This Inner Loop Header: Depth=3
	movl	%r12d, %eax
	cltd
	idivl	-64(%rbp)                       ## 4-byte Folded Reload
	cltd
	idivl	-72(%rbp)                       ## 4-byte Folded Reload
	movl	%eax, %r15d
	movl	(%rbx), %edi
	subl	%eax, %edi
	callq	_abs
	movq	%rax, %r14
	movl	(%rbx), %edi
	subl	-52(%rbp), %edi                 ## 4-byte Folded Reload
	callq	_abs
	cmpq	%rax, %r14
	jge	LBB0_8
## %bb.7:                               ##   in Loop: Header=BB0_6 Depth=3
	movq	-112(%rbp), %rax                ## 8-byte Reload
	movl	%r13d, (%rax)
	movq	-120(%rbp), %rax                ## 8-byte Reload
	movq	-64(%rbp), %rcx                 ## 8-byte Reload
	movl	%ecx, (%rax)
	movq	-128(%rbp), %rax                ## 8-byte Reload
	movq	-72(%rbp), %rcx                 ## 8-byte Reload
	movl	%ecx, (%rax)
	movl	%r15d, -52(%rbp)                ## 4-byte Spill
	jmp	LBB0_8
	.cfi_endproc
                                        ## -- End function
	.no_dead_strip	_aw_clk_nmm_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_nmm_find_best
_aw_clk_nmm_find_best:                  ; @aw_clk_nmm_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	x22, x2
	mov	x23, x1
	mov	x26, x0
	stp	x4, x5, [sp, #32]               ; 16-byte Folded Spill
	str	wzr, [x5]
	str	wzr, [x4]
	str	x3, [sp, #24]                   ; 8-byte Folded Spill
	str	wzr, [x3]
	add	x25, x0, #8
	mov	x0, x25
	bl	_aw_clk_factor_get_max
	str	w0, [sp, #16]                   ; 4-byte Folded Spill
	mov	x0, x25
	bl	_aw_clk_factor_get_min
	mov	x20, x0
	add	x27, x26, #4
	mov	x0, x27
	bl	_aw_clk_factor_get_max
	mov	x19, x0
	mov	x0, x27
	bl	_aw_clk_factor_get_min
	mov	x27, x0
	mov	x0, x26
	bl	_aw_clk_factor_get_max
	str	w0, [sp, #20]                   ; 4-byte Folded Spill
	mov	x0, x26
	bl	_aw_clk_factor_get_min
                                        ; implicit-def: $w21
	str	w19, [sp, #4]                   ; 4-byte Folded Spill
	cmp	w27, w19
	b.le	LBB0_2
LBB0_1:
	mov	x0, x21
	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	x25, x0
	ldr	w8, [sp, #16]                   ; 4-byte Folded Reload
	add	w28, w8, #1
	mul	w8, w20, w23
	stp	w8, w20, [sp, #8]               ; 8-byte Folded Spill
                                        ; implicit-def: $w21
	str	w0, [sp]                        ; 4-byte Folded Spill
	b	LBB0_4
LBB0_3:                                 ;   in Loop: Header=BB0_4 Depth=1
	add	w8, w27, #1
	ldp	w25, w9, [sp]                   ; 8-byte Folded Reload
	cmp	w27, w9
	mov	x27, x8
	b.eq	LBB0_1
LBB0_4:                                 ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_6 Depth 2
                                        ;       Child Loop BB0_9 Depth 3
	ldr	w8, [sp, #20]                   ; 4-byte Folded Reload
	cmp	w25, w8
	b.le	LBB0_6
	b	LBB0_3
LBB0_5:                                 ;   in Loop: Header=BB0_6 Depth=2
	add	w8, w25, #1
	ldr	w9, [sp, #20]                   ; 4-byte Folded Reload
	cmp	w25, w9
	mov	x25, x8
	ldr	w20, [sp, #12]                  ; 4-byte Folded Reload
	b.eq	LBB0_3
LBB0_6:                                 ;   Parent Loop BB0_4 Depth=1
                                        ; =>  This Loop Header: Depth=2
                                        ;       Child Loop BB0_9 Depth 3
	ldr	w8, [sp, #16]                   ; 4-byte Folded Reload
	cmp	w20, w8
	b.gt	LBB0_5
; %bb.7:                                ;   in Loop: Header=BB0_6 Depth=2
	ldr	w19, [sp, #8]                   ; 4-byte Folded Reload
	b	LBB0_9
LBB0_8:                                 ;   in Loop: Header=BB0_9 Depth=3
	add	w20, w20, #1
	add	w19, w19, w23
	cmp	w28, w20
	b.eq	LBB0_5
LBB0_9:                                 ;   Parent Loop BB0_4 Depth=1
                                        ;     Parent Loop BB0_6 Depth=2
                                        ; =>    This Inner Loop Header: Depth=3
	sdiv	w8, w19, w27
	sdiv	w26, w8, w25
	ldr	w8, [x22]
	sub	w0, w8, w26
	bl	_abs
	mov	x24, x0
	ldr	w8, [x22]
	sub	w0, w8, w21
	bl	_abs
	cmp	x24, x0
	b.ge	LBB0_8
; %bb.10:                               ;   in Loop: Header=BB0_9 Depth=3
	ldr	x8, [sp, #24]                   ; 8-byte Folded Reload
	str	w20, [x8]
	ldr	x8, [sp, #32]                   ; 8-byte Folded Reload
	str	w27, [x8]
	mov	x21, x26
	ldr	x8, [sp, #40]                   ; 8-byte Folded Reload
	str	w25, [x8]
	b	LBB0_8
	.cfi_endproc
                                        ; -- End function
	.no_dead_strip	_aw_clk_nmm_find_best
.subsections_via_symbols
