	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function g4x_find_best_dpll
_g4x_find_best_dpll:                    ## @g4x_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	$72, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%ecx, %r15d
	movl	%edx, %r13d
	movq	%rsi, %r14
	movq	%rdi, %rbx
	movq	(%rsi), %rax
	movq	(%rax), %r12
	movl	$0, -44(%rbp)                   ## 4-byte Folded Spill
	movq	%r9, -104(%rbp)                 ## 8-byte Spill
	movq	%r9, %rdi
	xorl	%esi, %esi
	movl	$48, %edx
	callq	_memset
	movq	%rbx, %rdi
	movq	%r14, %rsi
	movl	%r13d, %edx
	callq	_i9xx_select_p2_div
	movl	%eax, -56(%rbp)
	movl	48(%rbx), %esi
	movl	52(%rbx), %ecx
	movl	%ecx, -96(%rbp)
	cmpl	%esi, %ecx
	jle	LBB0_1
LBB0_17:
	movl	-44(%rbp), %eax                 ## 4-byte Reload
	addq	$72, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_1:
	movl	%r13d, %eax
	sarl	$8, %eax
	movslq	%r13d, %rdx
	movq	%rdx, -112(%rbp)                ## 8-byte Spill
	sarl	$9, %r13d
	addl	%eax, %r13d
	movq	40(%rbx), %rax
	movl	$0, -44(%rbp)                   ## 4-byte Folded Spill
	leaq	-96(%rbp), %r14
	jmp	LBB0_2
	.p2align	4, 0x90
LBB0_15:                                ##   in Loop: Header=BB0_2 Depth=1
	movl	-96(%rbp), %ecx
	movl	-48(%rbp), %esi                 ## 4-byte Reload
LBB0_16:                                ##   in Loop: Header=BB0_2 Depth=1
	leal	1(%rcx), %edx
	movl	%edx, -96(%rbp)
	cmpl	%esi, %ecx
	movl	%edx, %ecx
	jge	LBB0_17
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
	movq	32(%rbx), %rdx
	movq	%rdx, -88(%rbp)
	cmpq	%rax, %rdx
	jl	LBB0_16
## %bb.3:                               ##   in Loop: Header=BB0_2 Depth=1
	movl	%esi, -48(%rbp)                 ## 4-byte Spill
	movq	24(%rbx), %rcx
	jmp	LBB0_4
	.p2align	4, 0x90
LBB0_13:                                ##   in Loop: Header=BB0_4 Depth=2
	movq	-88(%rbp), %rdx
	movq	40(%rbx), %rax
LBB0_14:                                ##   in Loop: Header=BB0_4 Depth=2
	leaq	-1(%rdx), %rsi
	movq	%rsi, -88(%rbp)
	cmpq	%rax, %rdx
	movq	%rsi, %rdx
	jle	LBB0_15
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
	movq	16(%rbx), %rsi
	movq	%rsi, -80(%rbp)
	cmpq	%rcx, %rsi
	jl	LBB0_14
## %bb.5:                               ##   in Loop: Header=BB0_4 Depth=2
	movq	8(%rbx), %rax
	jmp	LBB0_6
	.p2align	4, 0x90
LBB0_11:                                ##   in Loop: Header=BB0_6 Depth=3
	movq	-80(%rbp), %rsi
	movq	24(%rbx), %rcx
LBB0_12:                                ##   in Loop: Header=BB0_6 Depth=3
	leaq	-1(%rsi), %rdx
	movq	%rdx, -80(%rbp)
	cmpq	%rcx, %rsi
	movq	%rdx, %rsi
	jle	LBB0_13
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
	movq	(%rbx), %rdx
	movq	%rdx, -72(%rbp)
	cmpq	%rax, %rdx
	jge	LBB0_7
	jmp	LBB0_12
	.p2align	4, 0x90
LBB0_10:                                ##   in Loop: Header=BB0_7 Depth=4
	movq	-72(%rbp), %rcx
	leaq	-1(%rcx), %rax
	movq	%rax, -72(%rbp)
	movq	8(%rbx), %rax
	cmpq	%rax, %rcx
	jle	LBB0_11
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
	movl	%r15d, %edi
	movq	%r14, %rsi
	callq	_i9xx_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	-64(%rbp), %rdi
	subq	-112(%rbp), %rdi                ## 8-byte Folded Reload
	callq	_abs
	cmpl	%r13d, %eax
	jge	LBB0_10
## %bb.9:                               ##   in Loop: Header=BB0_7 Depth=4
	movups	-96(%rbp), %xmm0
	movups	-80(%rbp), %xmm1
	movups	-64(%rbp), %xmm2
	movq	-104(%rbp), %rcx                ## 8-byte Reload
	movups	%xmm2, 32(%rcx)
	movups	%xmm1, 16(%rcx)
	movups	%xmm0, (%rcx)
	movl	$1, -44(%rbp)                   ## 4-byte Folded Spill
	movl	-96(%rbp), %ecx
	movl	%ecx, -48(%rbp)                 ## 4-byte Spill
	movl	%eax, %r13d
	jmp	LBB0_10
	.cfi_endproc
                                        ## -- End function
	.no_dead_strip	_g4x_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 g4x_find_best_dpll
_g4x_find_best_dpll:                    ; @g4x_find_best_dpll
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #128
	.cfi_def_cfa_offset 128
	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
	mov	x19, x5
	mov	x20, x3
	mov	x24, x2
	mov	x23, x1
	mov	x21, x0
	ldr	x8, [x1]
	ldr	x22, [x8]
	mov	x0, x5
	mov	w1, #0
	mov	w2, #48
	bl	_memset
	mov	x0, x21
	mov	x1, x23
	mov	x2, x24
	bl	_i9xx_select_p2_div
	mov	w23, #0
	ldp	w25, w9, [x21, #48]
	str	w0, [sp, #40]
	str	w9, [sp]
	cmp	w9, w25
	b.le	LBB0_2
LBB0_1:
	mov	x0, x23
	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
	add	sp, sp, #128
	ret
LBB0_2:
	mov	w23, #0
	asr	w8, w24, #8
	add	w26, w8, w24, asr #9
	sxtw	x24, w24
	ldr	x8, [x21, #40]
	b	LBB0_5
LBB0_3:                                 ;   in Loop: Header=BB0_5 Depth=1
	ldr	w9, [sp]
LBB0_4:                                 ;   in Loop: Header=BB0_5 Depth=1
	add	w10, w9, #1
	str	w10, [sp]
	cmp	w9, w25
	mov	x9, 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_15 Depth 4
	ldr	x10, [x21, #32]
	str	x10, [sp, #8]
	cmp	x10, x8
	b.lt	LBB0_4
; %bb.6:                                ;   in Loop: Header=BB0_5 Depth=1
	ldr	x9, [x21, #24]
	b	LBB0_9
LBB0_7:                                 ;   in Loop: Header=BB0_9 Depth=2
	ldr	x10, [sp, #8]
	ldr	x8, [x21, #40]
LBB0_8:                                 ;   in Loop: Header=BB0_9 Depth=2
	sub	x11, x10, #1
	str	x11, [sp, #8]
	cmp	x10, x8
	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_15 Depth 4
	ldr	x11, [x21, #16]
	str	x11, [sp, #16]
	cmp	x11, x9
	b.lt	LBB0_8
; %bb.10:                               ;   in Loop: Header=BB0_9 Depth=2
	ldr	x8, [x21, #8]
	b	LBB0_13
LBB0_11:                                ;   in Loop: Header=BB0_13 Depth=3
	ldr	x11, [sp, #16]
	ldr	x9, [x21, #24]
LBB0_12:                                ;   in Loop: Header=BB0_13 Depth=3
	sub	x10, x11, #1
	str	x10, [sp, #16]
	cmp	x11, x9
	mov	x11, x10
	b.le	LBB0_7
LBB0_13:                                ;   Parent Loop BB0_5 Depth=1
                                        ;     Parent Loop BB0_9 Depth=2
                                        ; =>    This Loop Header: Depth=3
                                        ;         Child Loop BB0_15 Depth 4
	ldr	x10, [x21]
	str	x10, [sp, #24]
	cmp	x10, x8
	b.ge	LBB0_15
	b	LBB0_12
LBB0_14:                                ;   in Loop: Header=BB0_15 Depth=4
	ldr	x9, [sp, #24]
	sub	x8, x9, #1
	str	x8, [sp, #24]
	ldr	x8, [x21, #8]
	cmp	x9, x8
	b.le	LBB0_11
LBB0_15:                                ;   Parent Loop BB0_5 Depth=1
                                        ;     Parent Loop BB0_9 Depth=2
                                        ;       Parent Loop BB0_13 Depth=3
                                        ; =>      This Inner Loop Header: Depth=4
	mov	x1, sp
	mov	x0, x20
	bl	_i9xx_calc_dpll_params
	mov	x0, x22
	bl	_to_i915
	mov	x2, sp
	mov	x1, x21
	bl	_intel_PLL_is_valid
	cbz	w0, LBB0_14
; %bb.16:                               ;   in Loop: Header=BB0_15 Depth=4
	ldr	x8, [sp, #32]
	sub	x0, x8, x24
	bl	_abs
	cmp	w0, w26
	b.ge	LBB0_14
; %bb.17:                               ;   in Loop: Header=BB0_15 Depth=4
	ldp	q0, q1, [sp]
	ldr	q2, [sp, #32]
	stp	q0, q1, [x19]
	str	q2, [x19, #32]
	mov	w23, #1
	ldr	w25, [sp]
	mov	x26, x0
	b	LBB0_14
	.cfi_endproc
                                        ; -- End function
	.no_dead_strip	_g4x_find_best_dpll
.subsections_via_symbols
