	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function calc_pll
_calc_pll:                              ## @calc_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	$40, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rcx, %r14
	movl	%edx, %r15d
	movl	%esi, %ebx
	movq	%rdi, %r13
	movq	(%rdi), %rax
	movq	(%rax), %rdi
	shll	$5, %esi
	addl	$1273856, %esi                  ## imm = 0x137000
	leaq	-48(%rbp), %rdx
	callq	_nvbios_pll_parse
	xorl	%r12d, %r12d
	testl	%eax, %eax
	jne	LBB0_4
## %bb.1:
	movq	%r13, %rdi
	movl	%ebx, %esi
	movl	$1274144, %edx                  ## imm = 0x137120
	movl	$1274176, %ecx                  ## imm = 0x137140
	callq	_read_div
	movl	%eax, -48(%rbp)
	testl	%eax, %eax
	je	LBB0_4
## %bb.2:
	leaq	-52(%rbp), %rax
	movq	%rax, (%rsp)
	xorl	%r12d, %r12d
	leaq	-48(%rbp), %rsi
	leaq	-60(%rbp), %rcx
	leaq	-56(%rbp), %r9
	movq	%r13, %rdi
	movl	%r15d, %edx
	xorl	%r8d, %r8d
	callq	_gt215_pll_calc
	testl	%eax, %eax
	jle	LBB0_4
## %bb.3:
	movl	-52(%rbp), %ecx
	shll	$16, %ecx
	movl	-60(%rbp), %edx
	shll	$8, %edx
	orl	%ecx, %edx
	orl	-56(%rbp), %edx
	movl	%edx, (%r14)
	movl	%eax, %r12d
LBB0_4:
	movl	%r12d, %eax
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.no_dead_strip	_calc_pll
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function calc_pll
_calc_pll:                              ; @calc_pll
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.cfi_def_cfa_offset 80
	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
	mov	x19, x3
	mov	x20, x2
	mov	x22, x1
	mov	x21, x0
	ldr	x8, [x0]
	ldr	x0, [x8]
	lsl	w8, w1, #5
	add	w1, w8, #311, lsl #12           ; =1273856
	add	x2, sp, #24
	bl	_nvbios_pll_parse
	cbz	w0, LBB0_3
LBB0_1:
	mov	w0, #0
LBB0_2:
	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
	add	sp, sp, #80
	ret
LBB0_3:
	mov	w8, #28672
	movk	w8, #19, lsl #16
	add	w2, w8, #288
	add	w3, w8, #320
	mov	x0, x21
	mov	x1, x22
	bl	_read_div
	str	w0, [sp, #24]
	cbz	w0, LBB0_2
; %bb.4:
	add	x1, sp, #24
	add	x3, sp, #20
	add	x5, sp, #16
	add	x6, sp, #12
	mov	x0, x21
	mov	x2, x20
	mov	x4, #0
	bl	_gt215_pll_calc
	cmp	w0, #1
	b.lt	LBB0_1
; %bb.5:
	ldr	w8, [sp, #12]
	ldr	w9, [sp, #20]
	lsl	w9, w9, #8
	orr	w8, w9, w8, lsl #16
	ldr	w9, [sp, #16]
	orr	w8, w8, w9
	str	w8, [x19]
	b	LBB0_2
	.cfi_endproc
                                        ; -- End function
	.no_dead_strip	_calc_pll
.subsections_via_symbols
