	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function mrst_sdvo_find_best_pll
_mrst_sdvo_find_best_pll:               ## @mrst_sdvo_find_best_pll
	.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
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%r8, %r12
	movl	%ecx, %r14d
	movl	%edx, %r13d
	movq	%rdi, %rbx
	movq	%r8, %rdi
	xorl	%esi, %esi
	movl	$16, %edx
	callq	_memset
	movl	28(%rbx), %r8d
	cmpl	32(%rbx), %r8d
	jle	LBB0_2
LBB0_1:
	xorl	%eax, %eax
LBB0_19:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_2:
	imull	$10000, %r13d, %r9d             ## imm = 0x2710
	movl	24(%rbx), %eax
	movl	$100000, %r11d                  ## imm = 0x186A0
	movl	%r14d, -44(%rbp)                ## 4-byte Spill
	jmp	LBB0_5
	.p2align	4, 0x90
LBB0_3:                                 ##   in Loop: Header=BB0_5 Depth=1
	testl	%r11d, %r11d
	movl	-44(%rbp), %r14d                ## 4-byte Reload
	je	LBB0_18
LBB0_4:                                 ##   in Loop: Header=BB0_5 Depth=1
	leal	1(%r8), %ecx
	cmpl	32(%rbx), %r8d
	movl	%ecx, %r8d
	jge	LBB0_1
LBB0_5:                                 ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_9 Depth 2
                                        ##       Child Loop BB0_10 Depth 3
	movl	20(%rbx), %esi
	cmpl	%eax, %esi
	jg	LBB0_4
## %bb.6:                               ##   in Loop: Header=BB0_5 Depth=1
	movl	%r8d, %r10d
	imull	%r14d, %r10d
	movl	16(%rbx), %ecx
	jmp	LBB0_9
	.p2align	4, 0x90
LBB0_7:                                 ##   in Loop: Header=BB0_9 Depth=2
	movl	24(%rbx), %eax
LBB0_8:                                 ##   in Loop: Header=BB0_9 Depth=2
	leal	1(%rsi), %edx
	cmpl	%eax, %esi
	movl	%edx, %esi
	jge	LBB0_3
LBB0_9:                                 ##   Parent Loop BB0_5 Depth=1
                                        ## =>  This Loop Header: Depth=2
                                        ##       Child Loop BB0_10 Depth 3
	movl	12(%rbx), %r14d
	cmpl	%ecx, %r14d
	jg	LBB0_8
	.p2align	4, 0x90
LBB0_10:                                ##   Parent Loop BB0_5 Depth=1
                                        ##     Parent Loop BB0_9 Depth=2
                                        ## =>    This Inner Loop Header: Depth=3
	movl	8(%rbx), %r15d
	imull	%r14d, %r15d
	movl	%r15d, %eax
	imull	%r13d, %eax
	cmpl	(%rbx), %eax
	jg	LBB0_7
## %bb.11:                              ##   in Loop: Header=BB0_10 Depth=3
	cmpl	4(%rbx), %eax
	jl	LBB0_15
## %bb.12:                              ##   in Loop: Header=BB0_10 Depth=3
	movl	%r15d, %edi
	imull	%esi, %edi
	movl	%r10d, %eax
	cltd
	idivl	%edi
	movl	%eax, %edi
	movl	%r9d, %eax
	cltd
	idivl	%edi
                                        ## kill: def $eax killed $eax def $rax
	movl	$10000, %edx                    ## imm = 0x2710
	subl	%eax, %edx
	movl	%r11d, %edi
	negl	%edi
	cmpl	%edi, %edx
	jl	LBB0_7
## %bb.13:                              ##   in Loop: Header=BB0_10 Depth=3
	leal	-10000(%rax), %edi
	cmpl	$10001, %eax                    ## imm = 0x2711
	cmovgel	%edi, %edx
	cmpl	%r11d, %edx
	jge	LBB0_15
## %bb.14:                              ##   in Loop: Header=BB0_10 Depth=3
	movl	%r8d, (%r12)
	movl	%esi, 4(%r12)
	movl	%r14d, 8(%r12)
	movl	%r15d, 12(%r12)
	movl	16(%rbx), %ecx
	movl	%edx, %r11d
LBB0_15:                                ##   in Loop: Header=BB0_10 Depth=3
	cmpl	%ecx, %r14d
	jge	LBB0_7
## %bb.16:                              ##   in Loop: Header=BB0_10 Depth=3
	incl	%r14d
	jmp	LBB0_10
LBB0_18:
	movl	$1, %eax
	jmp	LBB0_19
	.cfi_endproc
                                        ## -- End function
	.no_dead_strip	_mrst_sdvo_find_best_pll
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function mrst_sdvo_find_best_pll
_mrst_sdvo_find_best_pll:               ; @mrst_sdvo_find_best_pll
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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
	mov	x19, x4
	mov	x20, x3
	mov	x21, x2
	mov	x22, x0
	mov	x0, x4
	mov	w1, #0
	mov	w2, #16
	bl	_memset
	mov	w0, #0
	ldp	w8, w9, [x22, #28]
	cmp	w8, w9
	b.gt	LBB0_18
; %bb.1:
	mov	w9, #10000
	mul	w10, w21, w9
	ldr	w17, [x22, #24]
	mov	w12, #34464
	movk	w12, #1, lsl #16
	mov	w11, #-10000
	b	LBB0_4
LBB0_2:                                 ;   in Loop: Header=BB0_4 Depth=1
	cbz	w12, LBB0_17
LBB0_3:                                 ;   in Loop: Header=BB0_4 Depth=1
	add	w13, w8, #1
	ldr	w14, [x22, #32]
	cmp	w8, w14
	mov	x8, x13
	b.ge	LBB0_16
LBB0_4:                                 ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_8 Depth 2
                                        ;       Child Loop BB0_9 Depth 3
	ldr	w14, [x22, #20]
	cmp	w14, w17
	b.gt	LBB0_3
; %bb.5:                                ;   in Loop: Header=BB0_4 Depth=1
	mul	w13, w8, w20
	ldr	w15, [x22, #16]
	b	LBB0_8
LBB0_6:                                 ;   in Loop: Header=BB0_8 Depth=2
	ldr	w17, [x22, #24]
LBB0_7:                                 ;   in Loop: Header=BB0_8 Depth=2
	add	w16, w14, #1
	cmp	w14, w17
	mov	x14, x16
	b.ge	LBB0_2
LBB0_8:                                 ;   Parent Loop BB0_4 Depth=1
                                        ; =>  This Loop Header: Depth=2
                                        ;       Child Loop BB0_9 Depth 3
	ldr	w16, [x22, #12]
	cmp	w16, w15
	b.gt	LBB0_7
LBB0_9:                                 ;   Parent Loop BB0_4 Depth=1
                                        ;     Parent Loop BB0_8 Depth=2
                                        ; =>    This Inner Loop Header: Depth=3
	ldr	w17, [x22, #8]
	mul	w17, w17, w16
	mul	w0, w17, w21
	ldr	w1, [x22]
	cmp	w0, w1
	b.gt	LBB0_6
; %bb.10:                               ;   in Loop: Header=BB0_9 Depth=3
	ldr	w1, [x22, #4]
	cmp	w0, w1
	b.lt	LBB0_14
; %bb.11:                               ;   in Loop: Header=BB0_9 Depth=3
	mul	w0, w17, w14
	sdiv	w0, w13, w0
	sdiv	w0, w10, w0
	sub	w1, w9, w0
	neg	w2, w12
	cmp	w1, w2
	b.lt	LBB0_6
; %bb.12:                               ;   in Loop: Header=BB0_9 Depth=3
	add	w2, w0, w11
	cmp	w0, w9
	csel	w0, w2, w1, gt
	cmp	w0, w12
	b.ge	LBB0_14
; %bb.13:                               ;   in Loop: Header=BB0_9 Depth=3
	stp	w8, w14, [x19]
	stp	w16, w17, [x19, #8]
	mov	x12, x0
	ldr	w15, [x22, #16]
LBB0_14:                                ;   in Loop: Header=BB0_9 Depth=3
	cmp	w16, w15
	b.ge	LBB0_6
; %bb.15:                               ;   in Loop: Header=BB0_9 Depth=3
	add	w16, w16, #1
	b	LBB0_9
LBB0_16:
	mov	w0, #0
	b	LBB0_18
LBB0_17:
	mov	w0, #1
LBB0_18:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
	.cfi_endproc
                                        ; -- End function
	.no_dead_strip	_mrst_sdvo_find_best_pll
.subsections_via_symbols
