	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_gma_find_best_pll              ## -- Begin function gma_find_best_pll
	.p2align	4, 0x90
_gma_find_best_pll:                     ## @gma_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
	subq	$72, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%r8, -56(%rbp)                  ## 8-byte Spill
	movl	%ecx, -48(%rbp)                 ## 4-byte Spill
	movl	%edx, %r12d
	movq	%rsi, %r13
	movq	%rdi, %rbx
	movq	%rsi, %rdi
	callq	_to_gma_crtc
	movq	(%rax), %r15
	movq	_INTEL_OUTPUT_LVDS@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r13, %rdi
	callq	_gma_pipe_has_type
	testq	%rax, %rax
	je	LBB0_4
## %bb.1:
	movq	_LVDS@GOTPCREL(%rip), %r14
	movl	(%r14), %edi
	callq	_REG_READ
	movq	_LVDS_PORT_EN@GOTPCREL(%rip), %rcx
	testl	%eax, (%rcx)
	je	LBB0_4
## %bb.2:
	movl	(%r14), %edi
	callq	_REG_READ
	movq	_LVDS_CLKB_POWER_MASK@GOTPCREL(%rip), %rcx
	andl	(%rcx), %eax
	movq	_LVDS_CLKB_POWER_UP@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %eax
	je	LBB0_6
LBB0_3:
	leaq	72(%rbx), %rax
	jmp	LBB0_7
LBB0_4:
	cmpl	%r12d, 64(%rbx)
	jg	LBB0_3
LBB0_6:
	leaq	68(%rbx), %rax
LBB0_7:
	movl	(%rax), %eax
	movl	%eax, -64(%rbp)
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	xorl	%esi, %esi
	movl	$48, %edx
	callq	_memset
	movq	48(%rbx), %rax
	movq	%rax, -104(%rbp)
	movq	56(%rbx), %rdx
	movl	%r12d, -44(%rbp)                ## 4-byte Spill
	cmpq	%rdx, %rax
	jle	LBB0_9
LBB0_8:
	xorl	%eax, %eax
	cmpl	-44(%rbp), %r12d                ## 4-byte Folded Reload
	setne	%al
	addq	$72, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_9:
	movl	-44(%rbp), %r12d                ## 4-byte Reload
	movslq	%r12d, %rcx
	movq	%rcx, -112(%rbp)                ## 8-byte Spill
	leaq	-104(%rbp), %r14
	jmp	LBB0_12
	.p2align	4, 0x90
LBB0_10:                                ##   in Loop: Header=BB0_12 Depth=1
	movq	56(%rbx), %rdx
LBB0_11:                                ##   in Loop: Header=BB0_12 Depth=1
	leaq	1(%rax), %rcx
	movq	%rcx, -104(%rbp)
	cmpq	%rdx, %rax
	movq	%rcx, %rax
	jge	LBB0_8
LBB0_12:                                ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_14 Depth 2
                                        ##       Child Loop BB0_19 Depth 3
                                        ##         Child Loop BB0_21 Depth 4
	movq	32(%rbx), %rcx
	movq	%rcx, -96(%rbp)
	cmpq	%rax, %rcx
	jl	LBB0_14
## %bb.13:                              ##   in Loop: Header=BB0_12 Depth=1
	testq	%rax, %rax
	jne	LBB0_11
	.p2align	4, 0x90
LBB0_14:                                ##   Parent Loop BB0_12 Depth=1
                                        ## =>  This Loop Header: Depth=2
                                        ##       Child Loop BB0_19 Depth 3
                                        ##         Child Loop BB0_21 Depth 4
	cmpq	40(%rbx), %rcx
	jg	LBB0_10
## %bb.15:                              ##   in Loop: Header=BB0_14 Depth=2
	movq	16(%rbx), %rdx
	movq	%rdx, -88(%rbp)
	movq	24(%rbx), %rsi
	cmpq	%rsi, %rdx
	jg	LBB0_25
## %bb.16:                              ##   in Loop: Header=BB0_14 Depth=2
	movq	8(%rbx), %rax
	jmp	LBB0_19
	.p2align	4, 0x90
LBB0_17:                                ##   in Loop: Header=BB0_19 Depth=3
	movq	-88(%rbp), %rdx
	movq	24(%rbx), %rsi
LBB0_18:                                ##   in Loop: Header=BB0_19 Depth=3
	leaq	1(%rdx), %rcx
	movq	%rcx, -88(%rbp)
	cmpq	%rsi, %rdx
	movq	%rcx, %rdx
	jge	LBB0_24
LBB0_19:                                ##   Parent Loop BB0_12 Depth=1
                                        ##     Parent Loop BB0_14 Depth=2
                                        ## =>    This Loop Header: Depth=3
                                        ##         Child Loop BB0_21 Depth 4
	movq	(%rbx), %rcx
	movq	%rcx, -80(%rbp)
	cmpq	%rax, %rcx
	jle	LBB0_21
	jmp	LBB0_18
	.p2align	4, 0x90
LBB0_20:                                ##   in Loop: Header=BB0_21 Depth=4
	movq	-80(%rbp), %rcx
	leaq	1(%rcx), %rax
	movq	%rax, -80(%rbp)
	movq	8(%rbx), %rax
	cmpq	%rax, %rcx
	jge	LBB0_17
LBB0_21:                                ##   Parent Loop BB0_12 Depth=1
                                        ##     Parent Loop BB0_14 Depth=2
                                        ##       Parent Loop BB0_19 Depth=3
                                        ## =>      This Inner Loop Header: Depth=4
	movl	-48(%rbp), %edi                 ## 4-byte Reload
	movq	%r14, %rsi
	callq	*8(%r15)
	movq	%r13, %rdi
	movq	%rbx, %rsi
	movq	%r14, %rdx
	callq	*(%r15)
	testl	%eax, %eax
	je	LBB0_20
## %bb.22:                              ##   in Loop: Header=BB0_21 Depth=4
	movq	-72(%rbp), %rdi
	subq	-112(%rbp), %rdi                ## 8-byte Folded Reload
	callq	_abs
	cmpl	%r12d, %eax
	jge	LBB0_20
## %bb.23:                              ##   in Loop: Header=BB0_21 Depth=4
	movups	-104(%rbp), %xmm0
	movups	-88(%rbp), %xmm1
	movups	-72(%rbp), %xmm2
	movq	-56(%rbp), %rcx                 ## 8-byte Reload
	movups	%xmm2, 32(%rcx)
	movups	%xmm1, 16(%rcx)
	movups	%xmm0, (%rcx)
	movl	%eax, %r12d
	jmp	LBB0_20
	.p2align	4, 0x90
LBB0_24:                                ##   in Loop: Header=BB0_14 Depth=2
	movq	-104(%rbp), %rax
	movq	-96(%rbp), %rcx
LBB0_25:                                ##   in Loop: Header=BB0_14 Depth=2
	incq	%rcx
	movq	%rcx, -96(%rbp)
	cmpq	%rax, %rcx
	jl	LBB0_14
## %bb.26:                              ##   in Loop: Header=BB0_14 Depth=2
	testq	%rax, %rax
	je	LBB0_14
	jmp	LBB0_10
	.cfi_endproc
                                        ## -- End function
	.comm	_INTEL_OUTPUT_LVDS,4,2          ## @INTEL_OUTPUT_LVDS
	.comm	_LVDS,4,2                       ## @LVDS
	.comm	_LVDS_PORT_EN,4,2               ## @LVDS_PORT_EN
	.comm	_LVDS_CLKB_POWER_MASK,4,2       ## @LVDS_CLKB_POWER_MASK
	.comm	_LVDS_CLKB_POWER_UP,4,2         ## @LVDS_CLKB_POWER_UP
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_gma_find_best_pll              ; -- Begin function gma_find_best_pll
	.p2align	2
_gma_find_best_pll:                     ; @gma_find_best_pll
	.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	x20, x4
	mov	x21, x3
	mov	x19, x2
	mov	x22, x1
	mov	x23, x0
	mov	x0, x1
	bl	_to_gma_crtc
	ldr	x24, [x0]
Lloh0:
	adrp	x8, _INTEL_OUTPUT_LVDS@GOTPAGE
Lloh1:
	ldr	x8, [x8, _INTEL_OUTPUT_LVDS@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	mov	x0, x22
	bl	_gma_pipe_has_type
	cbz	x0, LBB0_3
; %bb.1:
Lloh3:
	adrp	x25, _LVDS@GOTPAGE
Lloh4:
	ldr	x25, [x25, _LVDS@GOTPAGEOFF]
	ldr	w0, [x25]
	bl	_REG_READ
Lloh5:
	adrp	x8, _LVDS_PORT_EN@GOTPAGE
Lloh6:
	ldr	x8, [x8, _LVDS_PORT_EN@GOTPAGEOFF]
Lloh7:
	ldr	w8, [x8]
	tst	w8, w0
	b.eq	LBB0_3
; %bb.2:
	ldr	w0, [x25]
	bl	_REG_READ
Lloh8:
	adrp	x8, _LVDS_CLKB_POWER_MASK@GOTPAGE
Lloh9:
	ldr	x8, [x8, _LVDS_CLKB_POWER_MASK@GOTPAGEOFF]
Lloh10:
	ldr	w8, [x8]
Lloh11:
	adrp	x9, _LVDS_CLKB_POWER_UP@GOTPAGE
Lloh12:
	ldr	x9, [x9, _LVDS_CLKB_POWER_UP@GOTPAGEOFF]
	and	w8, w8, w0
Lloh13:
	ldr	w9, [x9]
	cmp	w8, w9
	add	x8, x23, #72
	add	x9, x23, #68
	csel	x8, x8, x9, ne
	b	LBB0_4
LBB0_3:
	ldr	w8, [x23, #64]
	cmp	w8, w19
	add	x8, x23, #68
	add	x9, x23, #72
	csel	x8, x8, x9, le
LBB0_4:
	ldr	w8, [x8]
	str	w8, [sp, #40]
	mov	x0, x20
	mov	w1, #0
	mov	w2, #48
	bl	_memset
	ldp	x8, x10, [x23, #48]
	str	x8, [sp]
	mov	x26, x19
	cmp	x8, x10
	b.le	LBB0_6
LBB0_5:
	cmp	w26, w19
	cset	w0, ne
	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_6:
	sxtw	x25, w19
	mov	x26, x19
	b	LBB0_9
LBB0_7:                                 ;   in Loop: Header=BB0_9 Depth=1
	ldr	x10, [x23, #56]
LBB0_8:                                 ;   in Loop: Header=BB0_9 Depth=1
	add	x9, x8, #1
	str	x9, [sp]
	cmp	x8, x10
	mov	x8, x9
	b.ge	LBB0_5
LBB0_9:                                 ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_10 Depth 2
                                        ;       Child Loop BB0_15 Depth 3
                                        ;         Child Loop BB0_17 Depth 4
	ldr	x9, [x23, #32]
	str	x9, [sp, #8]
	cmp	x9, x8
	ccmp	x8, #0, #4, ge
	b.ne	LBB0_8
LBB0_10:                                ;   Parent Loop BB0_9 Depth=1
                                        ; =>  This Loop Header: Depth=2
                                        ;       Child Loop BB0_15 Depth 3
                                        ;         Child Loop BB0_17 Depth 4
	ldr	x10, [x23, #40]
	cmp	x9, x10
	b.gt	LBB0_7
; %bb.11:                               ;   in Loop: Header=BB0_10 Depth=2
	ldp	x10, x11, [x23, #16]
	str	x10, [sp, #16]
	cmp	x10, x11
	b.gt	LBB0_21
; %bb.12:                               ;   in Loop: Header=BB0_10 Depth=2
	ldr	x8, [x23, #8]
	b	LBB0_15
LBB0_13:                                ;   in Loop: Header=BB0_15 Depth=3
	ldr	x10, [sp, #16]
	ldr	x11, [x23, #24]
LBB0_14:                                ;   in Loop: Header=BB0_15 Depth=3
	add	x9, x10, #1
	str	x9, [sp, #16]
	cmp	x10, x11
	mov	x10, x9
	b.ge	LBB0_20
LBB0_15:                                ;   Parent Loop BB0_9 Depth=1
                                        ;     Parent Loop BB0_10 Depth=2
                                        ; =>    This Loop Header: Depth=3
                                        ;         Child Loop BB0_17 Depth 4
	ldr	x9, [x23]
	str	x9, [sp, #24]
	cmp	x9, x8
	b.le	LBB0_17
	b	LBB0_14
LBB0_16:                                ;   in Loop: Header=BB0_17 Depth=4
	ldr	x9, [sp, #24]
	add	x8, x9, #1
	str	x8, [sp, #24]
	ldr	x8, [x23, #8]
	cmp	x9, x8
	b.ge	LBB0_13
LBB0_17:                                ;   Parent Loop BB0_9 Depth=1
                                        ;     Parent Loop BB0_10 Depth=2
                                        ;       Parent Loop BB0_15 Depth=3
                                        ; =>      This Inner Loop Header: Depth=4
	ldr	x8, [x24, #8]
	mov	x1, sp
	mov	x0, x21
	blr	x8
	ldr	x8, [x24]
	mov	x2, sp
	mov	x0, x22
	mov	x1, x23
	blr	x8
	cbz	w0, LBB0_16
; %bb.18:                               ;   in Loop: Header=BB0_17 Depth=4
	ldr	x8, [sp, #32]
	sub	x0, x8, x25
	bl	_abs
	cmp	w0, w26
	b.ge	LBB0_16
; %bb.19:                               ;   in Loop: Header=BB0_17 Depth=4
	ldp	q0, q1, [sp]
	stp	q0, q1, [x20]
	ldr	q0, [sp, #32]
	str	q0, [x20, #32]
	mov	x26, x0
	b	LBB0_16
LBB0_20:                                ;   in Loop: Header=BB0_10 Depth=2
	ldp	x8, x9, [sp]
LBB0_21:                                ;   in Loop: Header=BB0_10 Depth=2
	add	x9, x9, #1
	str	x9, [sp, #8]
	cmp	x9, x8
	b.lt	LBB0_10
; %bb.22:                               ;   in Loop: Header=BB0_10 Depth=2
	cbz	x8, LBB0_10
	b	LBB0_7
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.cfi_endproc
                                        ; -- End function
	.comm	_INTEL_OUTPUT_LVDS,4,2          ; @INTEL_OUTPUT_LVDS
	.comm	_LVDS,4,2                       ; @LVDS
	.comm	_LVDS_PORT_EN,4,2               ; @LVDS_PORT_EN
	.comm	_LVDS_CLKB_POWER_MASK,4,2       ; @LVDS_CLKB_POWER_MASK
	.comm	_LVDS_CLKB_POWER_UP,4,2         ; @LVDS_CLKB_POWER_UP
.subsections_via_symbols
