	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_nouveau_hw_get_pllvals         ## -- Begin function nouveau_hw_get_pllvals
	.p2align	4, 0x90
_nouveau_hw_get_pllvals:                ## @nouveau_hw_get_pllvals
	.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	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdx, -56(%rbp)                 ## 8-byte Spill
	movl	%esi, %ebx
	movq	%rdi, %r15
	callq	_nouveau_drm
	movq	%rax, %r12
	movl	(%rax), %edi
	callq	_nv_device
	movq	%rax, %r14
	movq	%rax, %rdi
	callq	_nouveau_bios
	leaq	-64(%rbp), %rdx
	movq	%rax, %rdi
	movl	%ebx, %esi
	callq	_nvbios_pll_parse
	testl	%eax, %eax
	je	LBB0_1
LBB0_2:
	movq	_ENOENT@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
	jmp	LBB0_16
LBB0_1:
	movl	-64(%rbp), %r13d
	testl	%r13d, %r13d
	je	LBB0_2
## %bb.3:
	movq	%r14, %rdi
	movl	%r13d, %esi
	callq	_nv_rd32
	movl	%eax, -44(%rbp)                 ## 4-byte Spill
	cmpl	$16476, %r13d                   ## imm = 0x405C
	jg	LBB0_5
## %bb.4:
	leal	4(%r13), %esi
	jmp	LBB0_8
LBB0_5:
	movq	%r15, %rdi
	callq	_nv_two_reg_pll
	testq	%rax, %rax
	je	LBB0_6
## %bb.7:
	movq	_NV_RAMDAC_VPLL2@GOTPCREL(%rip), %rax
	leal	112(%r13), %ecx
	leal	92(%r13), %esi
	cmpl	(%rax), %r13d
	cmovnel	%ecx, %esi
LBB0_8:
	movq	%r14, %rdi
	callq	_nv_rd32
	movl	%eax, %r14d
	jmp	LBB0_9
LBB0_6:
	xorl	%r14d, %r14d
LBB0_9:
	movl	(%r12), %edi
	callq	_nv_device
	cmpl	$64, (%rax)
	jne	LBB0_15
## %bb.10:
	movq	_NV_PRAMDAC_VPLL_COEFF@GOTPCREL(%rip), %r12
	cmpl	(%r12), %r13d
	jl	LBB0_15
## %bb.11:
	movq	_NV_PRAMDAC_580@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	xorl	%ebx, %ebx
	movq	%r15, %rdi
	xorl	%esi, %esi
	callq	_NVReadRAMDAC
	cmpl	(%r12), %r13d
	jne	LBB0_13
## %bb.12:
	movq	_NV_RAMDAC_580_VPLL1_ACTIVE@GOTPCREL(%rip), %rcx
	jmp	LBB0_14
LBB0_13:
	movq	_NV_RAMDAC_580_VPLL2_ACTIVE@GOTPCREL(%rip), %rcx
LBB0_14:
	testl	%eax, (%rcx)
	cmovnel	%ebx, %r14d
LBB0_15:
	movq	-56(%rbp), %rbx                 ## 8-byte Reload
	movl	-44(%rbp), %edx                 ## 4-byte Reload
	movq	%r15, %rdi
	movl	%r13d, %esi
	movl	%r14d, %ecx
	movq	%rbx, %r8
	callq	_nouveau_hw_decode_pll
	movl	-60(%rbp), %eax
	movl	%eax, (%rbx)
	xorl	%eax, %eax
LBB0_16:
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_ENOENT,4,2                     ## @ENOENT
	.comm	_NV_RAMDAC_VPLL2,4,2            ## @NV_RAMDAC_VPLL2
	.comm	_NV_PRAMDAC_VPLL_COEFF,4,2      ## @NV_PRAMDAC_VPLL_COEFF
	.comm	_NV_PRAMDAC_580,4,2             ## @NV_PRAMDAC_580
	.comm	_NV_RAMDAC_580_VPLL1_ACTIVE,4,2 ## @NV_RAMDAC_580_VPLL1_ACTIVE
	.comm	_NV_RAMDAC_580_VPLL2_ACTIVE,4,2 ## @NV_RAMDAC_580_VPLL2_ACTIVE
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_nouveau_hw_get_pllvals         ; -- Begin function nouveau_hw_get_pllvals
	.p2align	2
_nouveau_hw_get_pllvals:                ; @nouveau_hw_get_pllvals
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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	x19, x2
	mov	x21, x1
	mov	x20, x0
	bl	_nouveau_drm
	mov	x23, x0
	ldr	w0, [x0]
	bl	_nv_device
	mov	x24, x0
	bl	_nouveau_bios
	add	x2, sp, #8
	mov	x1, x21
	bl	_nvbios_pll_parse
	cbz	w0, LBB0_2
LBB0_1:
Lloh0:
	adrp	x8, _ENOENT@GOTPAGE
Lloh1:
	ldr	x8, [x8, _ENOENT@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_15
LBB0_2:
	ldr	w21, [sp, #8]
	cbz	w21, LBB0_1
; %bb.3:
	mov	x0, x24
	mov	x1, x21
	bl	_nv_rd32
	mov	x22, x0
	mov	w8, #16476
	cmp	w21, w8
	b.gt	LBB0_5
; %bb.4:
	add	w1, w21, #4
	b	LBB0_7
LBB0_5:
	mov	x0, x20
	bl	_nv_two_reg_pll
	cbz	x0, LBB0_8
; %bb.6:
Lloh3:
	adrp	x8, _NV_RAMDAC_VPLL2@GOTPAGE
Lloh4:
	ldr	x8, [x8, _NV_RAMDAC_VPLL2@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	mov	w9, #112
	mov	w10, #92
	cmp	w21, w8
	csel	w8, w10, w9, eq
	add	w1, w8, w21
LBB0_7:
	mov	x0, x24
	bl	_nv_rd32
	mov	x24, x0
	b	LBB0_9
LBB0_8:
	mov	w24, #0
LBB0_9:
	ldr	w0, [x23]
	bl	_nv_device
	ldr	w8, [x0]
Lloh6:
	adrp	x23, _NV_PRAMDAC_VPLL_COEFF@GOTPAGE
Lloh7:
	ldr	x23, [x23, _NV_PRAMDAC_VPLL_COEFF@GOTPAGEOFF]
	ldr	w9, [x23]
	cmp	w8, #64
	ccmp	w21, w9, #8, eq
	b.lt	LBB0_14
; %bb.10:
Lloh8:
	adrp	x8, _NV_PRAMDAC_580@GOTPAGE
Lloh9:
	ldr	x8, [x8, _NV_PRAMDAC_580@GOTPAGEOFF]
Lloh10:
	ldr	w2, [x8]
	mov	x0, x20
	mov	w1, #0
	bl	_NVReadRAMDAC
	ldr	w8, [x23]
	cmp	w21, w8
	b.ne	LBB0_12
; %bb.11:
Lloh11:
	adrp	x8, _NV_RAMDAC_580_VPLL1_ACTIVE@GOTPAGE
Lloh12:
	ldr	x8, [x8, _NV_RAMDAC_580_VPLL1_ACTIVE@GOTPAGEOFF]
	b	LBB0_13
LBB0_12:
Lloh13:
	adrp	x8, _NV_RAMDAC_580_VPLL2_ACTIVE@GOTPAGE
Lloh14:
	ldr	x8, [x8, _NV_RAMDAC_580_VPLL2_ACTIVE@GOTPAGEOFF]
LBB0_13:
	ldr	w8, [x8]
	tst	w8, w0
	csel	w24, w24, wzr, eq
LBB0_14:
	mov	x0, x20
	mov	x1, x21
	mov	x2, x22
	mov	x3, x24
	mov	x4, x19
	bl	_nouveau_hw_decode_pll
	mov	w0, #0
	ldr	w8, [sp, #12]
	str	w8, [x19]
LBB0_15:
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #80
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpLdrGot	Lloh13, Lloh14
	.cfi_endproc
                                        ; -- End function
	.comm	_ENOENT,4,2                     ; @ENOENT
	.comm	_NV_RAMDAC_VPLL2,4,2            ; @NV_RAMDAC_VPLL2
	.comm	_NV_PRAMDAC_VPLL_COEFF,4,2      ; @NV_PRAMDAC_VPLL_COEFF
	.comm	_NV_PRAMDAC_580,4,2             ; @NV_PRAMDAC_580
	.comm	_NV_RAMDAC_580_VPLL1_ACTIVE,4,2 ; @NV_RAMDAC_580_VPLL1_ACTIVE
	.comm	_NV_RAMDAC_580_VPLL2_ACTIVE,4,2 ; @NV_RAMDAC_580_VPLL2_ACTIVE
.subsections_via_symbols
