	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function gm20b_pllg_program_mnp
_gm20b_pllg_program_mnp:                ## @gm20b_pllg_program_mnp
	.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
	movq	%rsi, %rbx
	movq	%rdi, %r14
	movq	(%rdi), %rax
	movq	%rax, -80(%rbp)                 ## 8-byte Spill
	movq	(%rsi), %rsi
	leaq	-96(%rbp), %rdx
	leaq	-88(%rbp), %rcx
	callq	_gm20b_dvfs_calc_ndiv
	leaq	-128(%rbp), %rsi
	movq	%r14, %rdi
	callq	_gm20b_pllg_read_mnp
	movq	-120(%rbp), %rax
	movb	$1, %cl
	cmpq	-96(%rbp), %rax
	jne	LBB0_3
## %bb.1:
	movq	-128(%rbp), %rax
	cmpq	-88(%rbp), %rax
	jne	LBB0_3
## %bb.2:
	movq	-112(%rbp), %rax
	cmpq	8(%rbx), %rax
	setne	%cl
LBB0_3:
	movb	%cl, -41(%rbp)                  ## 1-byte Spill
	movq	%rbx, -72(%rbp)                 ## 8-byte Spill
	movq	%r14, -56(%rbp)                 ## 8-byte Spill
	movq	%r14, %rdi
	callq	_gk20a_pllg_is_enabled
	movl	%eax, -60(%rbp)                 ## 4-byte Spill
	movq	_GPC2CLK_OUT@GOTPCREL(%rip), %r15
	movl	(%r15), %esi
	movq	_GPC2CLK_OUT_VCODIV_MASK@GOTPCREL(%rip), %r13
	movl	(%r13), %edx
	movq	_GPC2CLK_OUT_VCODIV2@GOTPCREL(%rip), %rbx
	movl	(%rbx), %eax
	movq	_GPC2CLK_OUT_VCODIV_SHIFT@GOTPCREL(%rip), %r14
	movb	(%r14), %cl
	shll	%cl, %eax
	movq	-80(%rbp), %r12                 ## 8-byte Reload
	movq	%r12, %rdi
	movl	%eax, %ecx
	callq	_nvkm_mask
	movl	(%r15), %esi
	movl	(%r13), %edx
	movl	(%rbx), %eax
	movb	(%r14), %cl
	shll	%cl, %eax
	movq	%r12, %rdi
	movl	%eax, %ecx
	callq	_nvkm_mask
	movl	(%r15), %esi
	movq	%r12, %rdi
	callq	_nvkm_rd32
	movl	$2, %edi
	callq	_udelay
	cmpl	$0, -60(%rbp)                   ## 4-byte Folded Reload
	je	LBB0_8
## %bb.4:
	cmpb	$0, -41(%rbp)                   ## 1-byte Folded Reload
	jne	LBB0_8
## %bb.5:
	movq	-104(%rbp), %r13
	movq	-72(%rbp), %rax                 ## 8-byte Reload
	movq	16(%rax), %r12
	testq	%r13, %r12
	leaq	-120(%rbp), %r14
	jne	LBB0_7
## %bb.6:
	movq	%r12, %rdi
	callq	_ffs
	leaq	-1(%rax), %rdi
	callq	_BIT
	movq	%rax, %r15
	orq	%r13, %r15
	movq	%r13, %rdi
	callq	_ffs
	leaq	-1(%rax), %rdi
	callq	_BIT
	orq	%r12, %rax
	movq	%r15, %rdi
	movq	_GPC2CLK_OUT@GOTPCREL(%rip), %r15
	movq	%rax, %rsi
	callq	_min
	movq	%rax, -104(%rbp)
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	movq	%r14, %rsi
	callq	_gk20a_pllg_write_mnp
LBB0_7:
	movq	%r12, -104(%rbp)
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	movq	%r14, %rsi
	callq	_gk20a_pllg_write_mnp
	jmp	LBB0_9
LBB0_8:
	movq	-56(%rbp), %r14                 ## 8-byte Reload
	movq	%r14, %rdi
	callq	_gm20b_pllg_disable
	movq	-72(%rbp), %rbx                 ## 8-byte Reload
	movq	16(%rbx), %rax
	leaq	-120(%rbp), %rcx
	movq	%rax, 16(%rcx)
	movups	(%rbx), %xmm0
	movups	%xmm0, (%rcx)
	movq	-96(%rbp), %rax
	movq	%rax, -120(%rbp)
	movq	-88(%rbp), %rax
	movq	%rax, -128(%rbp)
	leaq	-128(%rbp), %rsi
	movq	%r14, %rdi
	callq	_gm20b_pllg_write_mnp
	movq	%r14, %rdi
	callq	_gm20b_pllg_enable
	testl	%eax, %eax
	jne	LBB0_10
LBB0_9:
	movl	$2, %edi
	callq	_udelay
	movl	(%r15), %esi
	movq	_GPC2CLK_OUT_VCODIV_MASK@GOTPCREL(%rip), %r12
	movl	(%r12), %edx
	movq	_GPC2CLK_OUT_VCODIV1@GOTPCREL(%rip), %r14
	movl	(%r14), %eax
	movq	_GPC2CLK_OUT_VCODIV_SHIFT@GOTPCREL(%rip), %r13
	movb	(%r13), %cl
	shll	%cl, %eax
	movq	-80(%rbp), %rbx                 ## 8-byte Reload
	movq	%rbx, %rdi
	movl	%eax, %ecx
	callq	_nvkm_mask
	movl	(%r15), %esi
	movl	(%r12), %edx
	movl	(%r14), %eax
	movb	(%r13), %cl
	shll	%cl, %eax
	movq	%rbx, %rdi
	movl	%eax, %ecx
	callq	_nvkm_mask
	movl	(%r15), %esi
	movq	%rbx, %rdi
	callq	_nvkm_rd32
	xorl	%eax, %eax
LBB0_10:
	addq	$88, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_GPC2CLK_OUT,4,2                ## @GPC2CLK_OUT
	.comm	_GPC2CLK_OUT_VCODIV_MASK,4,2    ## @GPC2CLK_OUT_VCODIV_MASK
	.comm	_GPC2CLK_OUT_VCODIV2,4,2        ## @GPC2CLK_OUT_VCODIV2
	.comm	_GPC2CLK_OUT_VCODIV_SHIFT,4,2   ## @GPC2CLK_OUT_VCODIV_SHIFT
	.comm	_GPC2CLK_OUT_VCODIV1,4,2        ## @GPC2CLK_OUT_VCODIV1
	.no_dead_strip	_gm20b_pllg_program_mnp
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function gm20b_pllg_program_mnp
_gm20b_pllg_program_mnp:                ; @gm20b_pllg_program_mnp
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #144
	.cfi_def_cfa_offset 144
	stp	x28, x27, [sp, #48]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #64]             ; 16-byte Folded Spill
	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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	mov	x21, x1
	mov	x20, x0
	ldr	x19, [x0]
	ldr	x1, [x1]
	add	x2, sp, #8
	mov	x3, sp
	bl	_gm20b_dvfs_calc_ndiv
	add	x22, sp, #16
	add	x1, sp, #16
	mov	x0, x20
	bl	_gm20b_pllg_read_mnp
	ldr	x8, [sp, #24]
	ldr	x9, [sp, #8]
	cmp	x8, x9
	b.ne	LBB0_3
; %bb.1:
	ldr	x8, [sp, #16]
	ldr	x9, [sp]
	cmp	x8, x9
	b.ne	LBB0_3
; %bb.2:
	ldr	x8, [sp, #32]
	ldr	x9, [x21, #8]
	cmp	x8, x9
	cset	w24, ne
	b	LBB0_4
LBB0_3:
	mov	w24, #1
LBB0_4:
	add	x22, x22, #8
	mov	x0, x20
	bl	_gk20a_pllg_is_enabled
	mov	x23, x0
Lloh0:
	adrp	x25, _GPC2CLK_OUT@GOTPAGE
Lloh1:
	ldr	x25, [x25, _GPC2CLK_OUT@GOTPAGEOFF]
	ldr	w1, [x25]
Lloh2:
	adrp	x26, _GPC2CLK_OUT_VCODIV_MASK@GOTPAGE
Lloh3:
	ldr	x26, [x26, _GPC2CLK_OUT_VCODIV_MASK@GOTPAGEOFF]
Lloh4:
	adrp	x28, _GPC2CLK_OUT_VCODIV2@GOTPAGE
Lloh5:
	ldr	x28, [x28, _GPC2CLK_OUT_VCODIV2@GOTPAGEOFF]
	ldr	w2, [x26]
	ldr	w8, [x28]
Lloh6:
	adrp	x27, _GPC2CLK_OUT_VCODIV_SHIFT@GOTPAGE
Lloh7:
	ldr	x27, [x27, _GPC2CLK_OUT_VCODIV_SHIFT@GOTPAGEOFF]
	ldr	w9, [x27]
	lsl	w3, w8, w9
	mov	x0, x19
	bl	_nvkm_mask
	ldr	w1, [x25]
	ldr	w2, [x26]
	ldr	w8, [x28]
	ldr	w9, [x27]
	lsl	w3, w8, w9
	mov	x0, x19
	bl	_nvkm_mask
	ldr	w1, [x25]
	mov	x0, x19
	bl	_nvkm_rd32
	mov	w0, #2
	bl	_udelay
	cbz	w23, LBB0_9
; %bb.5:
	tbnz	w24, #0, LBB0_9
; %bb.6:
	ldr	x23, [sp, #40]
	ldr	x21, [x21, #16]
	tst	x21, x23
	b.ne	LBB0_8
; %bb.7:
	mov	x0, x21
	bl	_ffs
	sub	x0, x0, #1
	bl	_BIT
	orr	x24, x0, x23
	mov	x0, x23
	bl	_ffs
	sub	x0, x0, #1
	bl	_BIT
	orr	x1, x0, x21
	mov	x0, x24
	bl	_min
	str	x0, [sp, #40]
	mov	x0, x20
	mov	x1, x22
	bl	_gk20a_pllg_write_mnp
LBB0_8:
	str	x21, [sp, #40]
	mov	x0, x20
	mov	x1, x22
	bl	_gk20a_pllg_write_mnp
	b	LBB0_10
LBB0_9:
	mov	x0, x20
	bl	_gm20b_pllg_disable
	ldr	q0, [x21]
	str	q0, [x22]
	ldr	x8, [x21, #16]
	str	x8, [x22, #16]
	ldp	x9, x8, [sp]
	stp	x9, x8, [sp, #16]
	add	x1, sp, #16
	mov	x0, x20
	bl	_gm20b_pllg_write_mnp
	mov	x0, x20
	bl	_gm20b_pllg_enable
	cbnz	w0, LBB0_11
LBB0_10:
	mov	w0, #2
	bl	_udelay
	ldr	w1, [x25]
	ldr	w2, [x26]
Lloh8:
	adrp	x20, _GPC2CLK_OUT_VCODIV1@GOTPAGE
Lloh9:
	ldr	x20, [x20, _GPC2CLK_OUT_VCODIV1@GOTPAGEOFF]
	ldr	w8, [x20]
	ldr	w9, [x27]
	lsl	w3, w8, w9
	mov	x0, x19
	bl	_nvkm_mask
	ldr	w1, [x25]
	ldr	w2, [x26]
	ldr	w8, [x20]
	ldr	w9, [x27]
	lsl	w3, w8, w9
	mov	x0, x19
	bl	_nvkm_mask
	ldr	w1, [x25]
	mov	x0, x19
	bl	_nvkm_rd32
	mov	w0, #0
LBB0_11:
	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
	ldp	x26, x25, [sp, #64]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #48]             ; 16-byte Folded Reload
	add	sp, sp, #144
	ret
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh8, Lloh9
	.cfi_endproc
                                        ; -- End function
	.comm	_GPC2CLK_OUT,4,2                ; @GPC2CLK_OUT
	.comm	_GPC2CLK_OUT_VCODIV_MASK,4,2    ; @GPC2CLK_OUT_VCODIV_MASK
	.comm	_GPC2CLK_OUT_VCODIV2,4,2        ; @GPC2CLK_OUT_VCODIV2
	.comm	_GPC2CLK_OUT_VCODIV_SHIFT,4,2   ; @GPC2CLK_OUT_VCODIV_SHIFT
	.comm	_GPC2CLK_OUT_VCODIV1,4,2        ; @GPC2CLK_OUT_VCODIV1
	.no_dead_strip	_gm20b_pllg_program_mnp
.subsections_via_symbols
