	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function vlv_find_best_dpll
_vlv_find_best_dpll:                    ## @vlv_find_best_dpll
	.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	$56, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%r9, %r13
	movl	%ecx, %r15d
                                        ## kill: def $edx killed $edx def $rdx
	movq	%rdx, -80(%rbp)                 ## 8-byte Spill
	movq	%rdi, %rbx
	movl	(%rsi), %edi
	callq	_to_intel_crtc
	movq	(%rax), %r12
	movl	28(%rbx), %edi
	movslq	%r15d, %rax
	imulq	$458129845, %rax, %rsi          ## imm = 0x1B4E81B5
	movq	%rsi, %rax
	shrq	$63, %rax
	sarq	$43, %rsi
	addl	%eax, %esi
                                        ## kill: def $esi killed $esi killed $rsi
	callq	_min
	movl	%eax, %r14d
	movl	$0, -44(%rbp)                   ## 4-byte Folded Spill
	movq	%r13, -96(%rbp)                 ## 8-byte Spill
	movq	%r13, %rdi
	xorl	%esi, %esi
	movl	$24, %edx
	callq	_memset
	movl	24(%rbx), %eax
	movl	%eax, -72(%rbp)
	movl	%r14d, -84(%rbp)                ## 4-byte Spill
	cmpl	%r14d, %eax
	jle	LBB0_1
LBB0_18:
	movl	-44(%rbp), %eax                 ## 4-byte Reload
	addq	$56, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_1:
	movq	-80(%rbp), %rcx                 ## 8-byte Reload
	leal	(%rcx,%rcx,4), %r13d
	movl	20(%rbx), %ecx
	movl	$1000000, -80(%rbp)             ## 4-byte Folded Spill
                                        ## imm = 0xF4240
	movl	$0, -44(%rbp)                   ## 4-byte Folded Spill
	leaq	-72(%rbp), %r14
	jmp	LBB0_2
	.p2align	4, 0x90
LBB0_16:                                ##   in Loop: Header=BB0_2 Depth=1
	movl	-72(%rbp), %eax
LBB0_17:                                ##   in Loop: Header=BB0_2 Depth=1
	leal	1(%rax), %edx
	movl	%edx, -72(%rbp)
	cmpl	-84(%rbp), %eax                 ## 4-byte Folded Reload
	movl	%edx, %eax
	jge	LBB0_18
LBB0_2:                                 ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_4 Depth 2
                                        ##       Child Loop BB0_6 Depth 3
                                        ##         Child Loop BB0_7 Depth 4
	movl	16(%rbx), %edi
	movl	%edi, -68(%rbp)
	cmpl	%ecx, %edi
	jl	LBB0_17
## %bb.3:                               ##   in Loop: Header=BB0_2 Depth=1
	movl	12(%rbx), %eax
	jmp	LBB0_4
	.p2align	4, 0x90
LBB0_14:                                ##   in Loop: Header=BB0_4 Depth=2
	movl	20(%rbx), %ecx
LBB0_15:                                ##   in Loop: Header=BB0_4 Depth=2
	leal	-1(%rdi), %edx
	movl	%edx, -68(%rbp)
	cmpl	%ecx, %edi
	movl	%edx, %edi
	jle	LBB0_16
LBB0_4:                                 ##   Parent Loop BB0_2 Depth=1
                                        ## =>  This Loop Header: Depth=2
                                        ##       Child Loop BB0_6 Depth 3
                                        ##         Child Loop BB0_7 Depth 4
	movl	8(%rbx), %edx
	movl	%edx, -64(%rbp)
	cmpl	%eax, %edx
	jl	LBB0_15
## %bb.5:                               ##   in Loop: Header=BB0_4 Depth=2
	movl	4(%rbx), %ecx
	jmp	LBB0_6
	.p2align	4, 0x90
LBB0_12:                                ##   in Loop: Header=BB0_6 Depth=3
	movl	-64(%rbp), %edx
	movl	12(%rbx), %eax
LBB0_13:                                ##   in Loop: Header=BB0_6 Depth=3
	xorl	%esi, %esi
	cmpl	$11, %edx
	setge	%sil
	notl	%esi
	addl	%esi, %edx
	movl	%edx, -64(%rbp)
	movl	-68(%rbp), %edi
	cmpl	%eax, %edx
	jl	LBB0_14
LBB0_6:                                 ##   Parent Loop BB0_2 Depth=1
                                        ##     Parent Loop BB0_4 Depth=2
                                        ## =>    This Loop Header: Depth=3
                                        ##         Child Loop BB0_7 Depth 4
	imull	%edx, %edi
	movl	%edi, -60(%rbp)
	movl	(%rbx), %esi
	movl	%esi, -56(%rbp)
	cmpl	%ecx, %esi
	jg	LBB0_13
	.p2align	4, 0x90
LBB0_7:                                 ##   Parent Loop BB0_2 Depth=1
                                        ##     Parent Loop BB0_4 Depth=2
                                        ##       Parent Loop BB0_6 Depth=3
                                        ## =>      This Inner Loop Header: Depth=4
	imull	%r13d, %edi
	imull	-72(%rbp), %edi
	imull	%r15d, %esi
                                        ## kill: def $edi killed $edi killed $rdi
	callq	_DIV_ROUND_CLOSEST
	movl	%eax, -52(%rbp)
	movl	%r15d, %edi
	movq	%r14, %rsi
	callq	_vlv_calc_dpll_params
	movq	%r12, %rdi
	callq	_to_i915
	movl	%eax, %edi
	movq	%rbx, %rsi
	movq	%r14, %rdx
	callq	_intel_PLL_is_valid
	testl	%eax, %eax
	je	LBB0_10
## %bb.8:                               ##   in Loop: Header=BB0_7 Depth=4
	movq	%r12, %rdi
	movl	%r13d, %esi
	movq	%r14, %rdx
	movq	-96(%rbp), %rcx                 ## 8-byte Reload
	movl	-80(%rbp), %r8d                 ## 4-byte Reload
	leaq	-88(%rbp), %r9
	callq	_vlv_PLL_is_optimal
	testl	%eax, %eax
	je	LBB0_10
## %bb.9:                               ##   in Loop: Header=BB0_7 Depth=4
	movq	-56(%rbp), %rax
	movq	-96(%rbp), %rcx                 ## 8-byte Reload
	movq	%rax, 16(%rcx)
	movups	-72(%rbp), %xmm0
	movups	%xmm0, (%rcx)
	movl	$1, -44(%rbp)                   ## 4-byte Folded Spill
	movl	-88(%rbp), %eax
	movl	%eax, -80(%rbp)                 ## 4-byte Spill
LBB0_10:                                ##   in Loop: Header=BB0_7 Depth=4
	movl	-56(%rbp), %eax
	leal	1(%rax), %esi
	movl	%esi, -56(%rbp)
	movl	4(%rbx), %ecx
	cmpl	%ecx, %eax
	jge	LBB0_12
## %bb.11:                              ##   in Loop: Header=BB0_7 Depth=4
	movl	-60(%rbp), %edi
	jmp	LBB0_7
	.cfi_endproc
                                        ## -- End function
	.no_dead_strip	_vlv_find_best_dpll
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function vlv_find_best_dpll
_vlv_find_best_dpll:                    ; @vlv_find_best_dpll
	.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	x19, x5
	mov	x20, x3
	mov	x25, x2
	mov	x21, x0
	ldr	w0, [x1]
	bl	_to_intel_crtc
	ldr	x22, [x0]
	ldr	w0, [x21, #28]
	mov	w8, #33205
	movk	w8, #6990, lsl #16
	smull	x8, w20, w8
	lsr	x9, x8, #63
	asr	x8, x8, #43
	add	w1, w8, w9
	bl	_min
	mov	x23, x0
	mov	x0, x19
	mov	w1, #0
	mov	w2, #24
	bl	_memset
	mov	w24, #0
	ldr	w8, [x21, #24]
	str	w8, [sp, #8]
	cmp	w8, w23
	b.le	LBB0_2
LBB0_1:
	mov	x0, x24
	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
LBB0_2:
	mov	w24, #0
	ldr	w9, [x21, #20]
	mov	w26, #16960
	movk	w26, #15, lsl #16
	mov	w27, #-2
	add	w25, w25, w25, lsl #2
	b	LBB0_5
LBB0_3:                                 ;   in Loop: Header=BB0_5 Depth=1
	ldr	w8, [sp, #8]
LBB0_4:                                 ;   in Loop: Header=BB0_5 Depth=1
	add	w10, w8, #1
	str	w10, [sp, #8]
	cmp	w8, w23
	mov	x8, x10
	b.ge	LBB0_1
LBB0_5:                                 ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_9 Depth 2
                                        ;       Child Loop BB0_13 Depth 3
                                        ;         Child Loop BB0_14 Depth 4
	ldr	w10, [x21, #16]
	str	w10, [sp, #12]
	cmp	w10, w9
	b.lt	LBB0_4
; %bb.6:                                ;   in Loop: Header=BB0_5 Depth=1
	ldr	w8, [x21, #12]
	b	LBB0_9
LBB0_7:                                 ;   in Loop: Header=BB0_9 Depth=2
	ldr	w9, [x21, #20]
LBB0_8:                                 ;   in Loop: Header=BB0_9 Depth=2
	sub	w11, w10, #1
	str	w11, [sp, #12]
	cmp	w10, w9
	mov	x10, x11
	b.le	LBB0_3
LBB0_9:                                 ;   Parent Loop BB0_5 Depth=1
                                        ; =>  This Loop Header: Depth=2
                                        ;       Child Loop BB0_13 Depth 3
                                        ;         Child Loop BB0_14 Depth 4
	ldr	w11, [x21, #8]
	str	w11, [sp, #16]
	cmp	w11, w8
	b.lt	LBB0_8
; %bb.10:                               ;   in Loop: Header=BB0_9 Depth=2
	ldr	w9, [x21, #4]
	b	LBB0_13
LBB0_11:                                ;   in Loop: Header=BB0_13 Depth=3
	ldr	w11, [sp, #16]
	ldr	w8, [x21, #12]
LBB0_12:                                ;   in Loop: Header=BB0_13 Depth=3
	cmp	w11, #10
	cinc	w10, w27, le
	add	w11, w10, w11
	cmp	w11, w8
	str	w11, [sp, #16]
	ldr	w10, [sp, #12]
	b.lt	LBB0_7
LBB0_13:                                ;   Parent Loop BB0_5 Depth=1
                                        ;     Parent Loop BB0_9 Depth=2
                                        ; =>    This Loop Header: Depth=3
                                        ;         Child Loop BB0_14 Depth 4
	ldr	w12, [x21]
	mul	w10, w10, w11
	stp	w10, w12, [sp, #20]
	cmp	w12, w9
	b.gt	LBB0_12
LBB0_14:                                ;   Parent Loop BB0_5 Depth=1
                                        ;     Parent Loop BB0_9 Depth=2
                                        ;       Parent Loop BB0_13 Depth=3
                                        ; =>      This Inner Loop Header: Depth=4
	mul	w8, w10, w25
	ldr	w9, [sp, #8]
	mul	w0, w8, w9
	mul	w1, w12, w20
	bl	_DIV_ROUND_CLOSEST
	str	w0, [sp, #28]
	add	x1, sp, #8
	mov	x0, x20
	bl	_vlv_calc_dpll_params
	mov	x0, x22
	bl	_to_i915
	add	x2, sp, #8
	mov	x1, x21
	bl	_intel_PLL_is_valid
	cbz	w0, LBB0_17
; %bb.15:                               ;   in Loop: Header=BB0_14 Depth=4
	add	x2, sp, #8
	add	x5, sp, #4
	mov	x0, x22
	mov	x1, x25
	mov	x3, x19
	mov	x4, x26
	bl	_vlv_PLL_is_optimal
	cbz	w0, LBB0_17
; %bb.16:                               ;   in Loop: Header=BB0_14 Depth=4
	ldur	q0, [sp, #8]
	str	q0, [x19]
	ldr	x8, [sp, #24]
	str	x8, [x19, #16]
	mov	w24, #1
	ldr	w26, [sp, #4]
LBB0_17:                                ;   in Loop: Header=BB0_14 Depth=4
	ldr	w8, [sp, #24]
	add	w12, w8, #1
	str	w12, [sp, #24]
	ldr	w9, [x21, #4]
	cmp	w8, w9
	b.ge	LBB0_11
; %bb.18:                               ;   in Loop: Header=BB0_14 Depth=4
	ldr	w10, [sp, #20]
	b	LBB0_14
	.cfi_endproc
                                        ; -- End function
	.no_dead_strip	_vlv_find_best_dpll
.subsections_via_symbols
