	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function nouveau_hw_fix_bad_vpll
_nouveau_hw_fix_bad_vpll:               ## @nouveau_hw_fix_bad_vpll
	.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	$88, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%esi, %r12d
	movq	%rdi, %r13
	callq	_nouveau_drm
	movq	%rax, %r15
	movl	(%rax), %edi
	callq	_nv_device
	movq	%rax, %rbx
	movq	%rax, %rdi
	callq	_nouveau_clock
	movq	%rax, %r14
	movq	%rbx, %rdi
	callq	_nouveau_bios
	testl	%r12d, %r12d
	jne	LBB0_1
## %bb.2:
	movq	_PLL_VPLL0@GOTPCREL(%rip), %rcx
	jmp	LBB0_3
LBB0_1:
	movq	_PLL_VPLL1@GOTPCREL(%rip), %rcx
LBB0_3:
	movl	(%rcx), %ebx
	leaq	-120(%rbp), %rdx
	movq	%rax, %rdi
	movl	%ebx, %esi
	callq	_nvbios_pll_parse
	testq	%rax, %rax
	jne	LBB0_10
## %bb.4:
	leaq	-64(%rbp), %rdx
	movq	%r13, %rdi
	movl	%ebx, %esi
	callq	_nouveau_hw_get_pllvals
	movq	-64(%rbp), %rax
	cmpq	-96(%rbp), %rax
	jl	LBB0_9
## %bb.5:
	cmpq	-88(%rbp), %rax
	jg	LBB0_9
## %bb.6:
	movq	-56(%rbp), %rax
	cmpq	-80(%rbp), %rax
	jl	LBB0_9
## %bb.7:
	cmpq	-72(%rbp), %rax
	jg	LBB0_9
## %bb.8:
	movq	-48(%rbp), %rax
	cmpq	-120(%rbp), %rax
	jle	LBB0_10
LBB0_9:
	incl	%r12d
	leaq	L_.str(%rip), %rsi
	movq	%r15, %rdi
	movl	%r12d, %edx
	callq	_NV_WARN
	movups	-88(%rbp), %xmm0
	movaps	%xmm0, -64(%rbp)
	movq	-112(%rbp), %rax
	movq	%rax, -48(%rbp)
	movl	-104(%rbp), %esi
	leaq	-64(%rbp), %rdx
	movq	%r14, %rdi
	callq	*(%r14)
LBB0_10:
	addq	$88, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_PLL_VPLL1,4,2                  ## @PLL_VPLL1
	.comm	_PLL_VPLL0,4,2                  ## @PLL_VPLL0
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"VPLL %d outwith limits, attempting to fix\n"

	.no_dead_strip	_nouveau_hw_fix_bad_vpll
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function nouveau_hw_fix_bad_vpll
_nouveau_hw_fix_bad_vpll:               ; @nouveau_hw_fix_bad_vpll
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #144
	.cfi_def_cfa_offset 144
	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
	mov	x20, x1
	mov	x22, x0
	bl	_nouveau_drm
	mov	x21, x0
	ldr	w0, [x0]
	bl	_nv_device
	mov	x23, x0
	bl	_nouveau_clock
	mov	x19, x0
	mov	x0, x23
	bl	_nouveau_bios
Lloh0:
	adrp	x8, _PLL_VPLL1@GOTPAGE
Lloh1:
	ldr	x8, [x8, _PLL_VPLL1@GOTPAGEOFF]
Lloh2:
	adrp	x9, _PLL_VPLL0@GOTPAGE
Lloh3:
	ldr	x9, [x9, _PLL_VPLL0@GOTPAGEOFF]
	cmp	w20, #0
	csel	x8, x9, x8, eq
	ldr	w23, [x8]
	add	x2, sp, #24
	mov	x1, x23
	bl	_nvbios_pll_parse
	cbnz	x0, LBB0_7
; %bb.1:
	mov	x2, sp
	mov	x0, x22
	mov	x1, x23
	bl	_nouveau_hw_get_pllvals
	ldr	x8, [sp]
	ldr	x9, [sp, #48]
	cmp	x8, x9
	b.lt	LBB0_6
; %bb.2:
	ldr	x9, [sp, #56]
	cmp	x8, x9
	b.gt	LBB0_6
; %bb.3:
	ldr	x8, [sp, #8]
	ldr	x9, [sp, #64]
	cmp	x8, x9
	b.lt	LBB0_6
; %bb.4:
	ldr	x9, [sp, #72]
	cmp	x8, x9
	b.gt	LBB0_6
; %bb.5:
	ldp	x8, x9, [sp, #16]
	cmp	x8, x9
	b.le	LBB0_7
LBB0_6:
	add	w2, w20, #1
Lloh4:
	adrp	x1, l_.str@PAGE
Lloh5:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x21
	bl	_NV_WARN
	ldur	q0, [sp, #56]
	str	q0, [sp]
	ldr	x8, [sp, #32]
	str	x8, [sp, #16]
	ldr	x8, [x19]
	ldr	w1, [sp, #40]
	mov	x2, sp
	mov	x0, x19
	blr	x8
LBB0_7:
	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
	add	sp, sp, #144
	ret
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh4, Lloh5
	.cfi_endproc
                                        ; -- End function
	.comm	_PLL_VPLL1,4,2                  ; @PLL_VPLL1
	.comm	_PLL_VPLL0,4,2                  ; @PLL_VPLL0
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"VPLL %d outwith limits, attempting to fix\n"

	.no_dead_strip	_nouveau_hw_fix_bad_vpll
.subsections_via_symbols
