	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function nv50_clock_pll_set
_nv50_clock_pll_set:                    ## @nv50_clock_pll_set
	.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	%r12
	pushq	%rbx
	subq	$48, %rsp
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%edx, %r12d
	movl	%esi, %ebx
	movq	%rdi, %r15
	callq	_nouveau_bios
	leaq	-64(%rbp), %rdx
	movq	%rax, %rdi
	movl	%ebx, %esi
	callq	_nvbios_pll_parse
	movl	%eax, %r14d
	testl	%eax, %eax
	je	LBB0_2
## %bb.1:
	leaq	L_.str(%rip), %rsi
	movq	%r15, %rdi
	movl	%r14d, %edx
	xorl	%eax, %eax
	callq	_nv_error
LBB0_9:
	movl	%r14d, %eax
	addq	$48, %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_2:
	leaq	-36(%rbp), %rax
	leaq	-68(%rbp), %rbx
	leaq	-64(%rbp), %rsi
	leaq	-44(%rbp), %rcx
	leaq	-40(%rbp), %r8
	leaq	-72(%rbp), %r9
	movq	%r15, %rdi
	movl	%r12d, %edx
	pushq	%rax
	pushq	%rbx
	callq	_nv04_pll_calc
	addq	$16, %rsp
	testl	%eax, %eax
	je	LBB0_3
## %bb.4:
	movl	-64(%rbp), %eax
	leal	-128(%rax), %ecx
	cmpl	$2, %ecx
	jae	LBB0_5
## %bb.10:
	movq	-56(%rbp), %rsi
	movq	%r15, %rdi
	movl	$268437009, %edx                ## imm = 0x10000611
	callq	_nv_wr32
	movq	-56(%rbp), %rsi
	addq	$4, %rsi
	movl	-40(%rbp), %ecx
	shll	$16, %ecx
	orl	-44(%rbp), %ecx
	movq	%r15, %rdi
	movl	$16711935, %edx                 ## imm = 0xFF00FF
	callq	_nv_mask
	movq	-56(%rbp), %rsi
	addq	$8, %rsi
	movl	-36(%rbp), %eax
	shll	$28, %eax
	movl	-68(%rbp), %ecx
	shll	$16, %ecx
	orl	%eax, %ecx
	orl	-72(%rbp), %ecx
	movq	%r15, %rdi
	movl	$2147418367, %edx               ## imm = 0x7FFF00FF
	callq	_nv_mask
	jmp	LBB0_9
LBB0_3:
	leaq	L_.str.1(%rip), %rsi
	movq	%r15, %rdi
	xorl	%eax, %eax
	callq	_nv_error
	jmp	LBB0_9
LBB0_5:
	cmpl	$130, %eax
	jne	LBB0_7
## %bb.6:
	movq	-56(%rbp), %rsi
	movl	-36(%rbp), %ecx
	movl	%ecx, %eax
	shll	$22, %eax
	movl	-60(%rbp), %edx
	shll	$19, %edx
	shll	$16, %ecx
	orl	%eax, %ecx
	orl	%edx, %ecx
	movq	%r15, %rdi
	movl	$33488896, %edx                 ## imm = 0x1FF0000
	jmp	LBB0_8
LBB0_7:
	movq	-56(%rbp), %rsi
	movl	-36(%rbp), %ecx
	shll	$16, %ecx
	movq	%r15, %rdi
	movl	$458752, %edx                   ## imm = 0x70000
LBB0_8:
	callq	_nv_mask
	movq	-56(%rbp), %rsi
	addq	$4, %rsi
	movl	-44(%rbp), %edx
	shll	$8, %edx
	orl	-40(%rbp), %edx
	movq	%r15, %rdi
	callq	_nv_wr32
	jmp	LBB0_9
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"failed to retrieve pll data, %d\n"

L_.str.1:                               ## @.str.1
	.asciz	"failed pll calculation\n"

	.no_dead_strip	_nv50_clock_pll_set
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function nv50_clock_pll_set
_nv50_clock_pll_set:                    ; @nv50_clock_pll_set
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #96
	.cfi_def_cfa_offset 96
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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
	mov	x21, x2
	mov	x19, x1
	mov	x20, x0
	bl	_nouveau_bios
	add	x2, sp, #32
	mov	x1, x19
	bl	_nvbios_pll_parse
	mov	x19, x0
	cbz	w0, LBB0_4
; %bb.1:
	str	x19, [sp]
Lloh0:
	adrp	x1, l_.str@PAGE
Lloh1:
	add	x1, x1, l_.str@PAGEOFF
LBB0_2:
	mov	x0, x20
	bl	_nv_error
LBB0_3:
	mov	x0, x19
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	add	sp, sp, #96
	ret
LBB0_4:
	add	x1, sp, #32
	add	x3, sp, #28
	add	x4, sp, #24
	add	x5, sp, #20
	add	x6, sp, #16
	add	x7, sp, #12
	mov	x0, x20
	mov	x2, x21
	bl	_nv04_pll_calc
	cbz	w0, LBB0_7
; %bb.5:
	ldr	w8, [sp, #32]
	sub	w9, w8, #128
	cmp	w9, #2
	b.hs	LBB0_8
; %bb.6:
	ldr	x1, [sp, #40]
	mov	x0, x20
	mov	w2, #1553
	movk	w2, #4096, lsl #16
	bl	_nv_wr32
	ldr	x8, [sp, #40]
	add	x1, x8, #4
	ldp	w8, w9, [sp, #24]
	orr	w3, w9, w8, lsl #16
	mov	x0, x20
	mov	w2, #16711935
	bl	_nv_mask
	ldr	x8, [sp, #40]
	add	x1, x8, #8
	ldp	w8, w9, [sp, #12]
	lsl	w9, w9, #16
	orr	w8, w9, w8, lsl #28
	ldr	w9, [sp, #20]
	orr	w3, w8, w9
	mov	x0, x20
	mov	w2, #255
	movk	w2, #32767, lsl #16
	bl	_nv_mask
	b	LBB0_3
LBB0_7:
Lloh2:
	adrp	x1, l_.str.1@PAGE
Lloh3:
	add	x1, x1, l_.str.1@PAGEOFF
	b	LBB0_2
LBB0_8:
	cmp	w8, #130
	b.ne	LBB0_10
; %bb.9:
	ldr	x1, [sp, #40]
	ldr	w8, [sp, #12]
	ldr	w9, [sp, #36]
	lsl	w10, w8, #16
	orr	w8, w10, w8, lsl #22
	orr	w3, w8, w9, lsl #19
	mov	x0, x20
	mov	w2, #33488896
	b	LBB0_11
LBB0_10:
	ldr	x1, [sp, #40]
	ldr	w8, [sp, #12]
	lsl	w3, w8, #16
	mov	x0, x20
	mov	w2, #458752
LBB0_11:
	bl	_nv_mask
	ldr	x8, [sp, #40]
	add	x1, x8, #4
	ldp	w9, w8, [sp, #24]
	orr	w2, w9, w8, lsl #8
	mov	x0, x20
	bl	_nv_wr32
	b	LBB0_3
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpAdd	Lloh2, Lloh3
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"failed to retrieve pll data, %d\n"

l_.str.1:                               ; @.str.1
	.asciz	"failed pll calculation\n"

	.no_dead_strip	_nv50_clock_pll_set
.subsections_via_symbols
