	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_nva3_pll_calc                  ## -- Begin function nva3_pll_calc
	.p2align	4, 0x90
_nva3_pll_calc:                         ## @nva3_pll_calc
	.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
	movl	%edx, %r14d
	movq	%rsi, %r13
	movl	16(%rsi), %eax
	cltd
	idivl	%r14d
	movq	16(%rbp), %rsi
	movl	%eax, (%rsi)
	movl	(%r13), %edx
	cmpl	%edx, %eax
	cmovll	%eax, %edx
	movl	%edx, (%rsi)
	movl	4(%r13), %eax
	cmpl	%eax, %edx
	cmovlel	%eax, %edx
	movq	%r9, -56(%rbp)                  ## 8-byte Spill
	movq	%r8, %r12
	movq	%rcx, -48(%rbp)                 ## 8-byte Spill
	movq	%rdi, -64(%rbp)                 ## 8-byte Spill
	movl	%edx, (%rsi)
	movl	20(%r13), %ecx
	movl	48(%r13), %esi
	movl	8(%r13), %eax
	addl	%ecx, %eax
	cltd
	idivl	%ecx
	movl	%eax, %edi
	callq	_max
	movl	%eax, %r15d
	movl	24(%r13), %ecx
	movl	40(%r13), %esi
	movl	8(%r13), %eax
	addl	%ecx, %eax
	cltd
	idivl	%ecx
	movl	%eax, %edi
	callq	_min
	cmpl	%eax, %r15d
	jle	LBB0_1
LBB0_7:
	movl	$1, %edi
	callq	_unlikely
	testq	%rax, %rax
	je	LBB0_9
## %bb.8:
	leaq	L_.str(%rip), %rsi
	movq	-64(%rbp), %rdi                 ## 8-byte Reload
	callq	_nv_error
	movq	_EINVAL@GOTPCREL(%rip), %rax
	xorl	%r14d, %r14d
	subl	(%rax), %r14d
	jmp	LBB0_10
LBB0_1:
	movl	%eax, %ecx
	movq	16(%rbp), %rax
	movl	(%rax), %esi
	movl	8(%r13), %r9d
	movl	28(%r13), %r8d
	movl	%r9d, %edi
	shrl	$31, %edi
	addl	%r9d, %edi
	sarl	%edi
	subl	%r15d, %ecx
	incl	%ecx
	imull	%esi, %r15d
	imull	%r14d, %r15d
	imull	%r14d, %esi
	jmp	LBB0_2
	.p2align	4, 0x90
LBB0_6:                                 ##   in Loop: Header=BB0_2 Depth=1
	addl	%esi, %r15d
	decl	%ecx
	je	LBB0_7
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	testq	%r12, %r12
	sete	%r10b
	movl	%r15d, %eax
	cltd
	idivl	%r9d
	cmpl	%edi, %edx
	setge	%bl
	andb	%r10b, %bl
	movzbl	%bl, %ebx
	addl	%eax, %ebx
	cmpl	%r8d, %ebx
	jl	LBB0_6
## %bb.3:                               ##   in Loop: Header=BB0_2 Depth=1
	cmpl	32(%r13), %ebx
	jg	LBB0_7
## %bb.4:                               ##   in Loop: Header=BB0_2 Depth=1
	testq	%r12, %r12
	je	LBB0_6
## %bb.5:
	shll	$13, %edx
	movl	%edx, %eax
	cltd
	idivl	8(%r13)
	addl	$61440, %eax                    ## imm = 0xF000
	movzwl	%ax, %eax
	movl	%eax, (%r12)
	jmp	LBB0_10
LBB0_9:
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	movl	(%rax), %eax
	imull	8(%r13), %eax
	cltd
	movq	-56(%rbp), %rcx                 ## 8-byte Reload
	idivl	(%rcx)
	cltd
	movq	16(%rbp), %rcx
	idivl	(%rcx)
	movl	%eax, %r14d
LBB0_10:
	movl	%r14d, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"unable to find matching pll values\n"

	.comm	_EINVAL,4,2                     ## @EINVAL
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_nva3_pll_calc                  ; -- Begin function nva3_pll_calc
	.p2align	2
_nva3_pll_calc:                         ; @nva3_pll_calc
	.cfi_startproc
; %bb.0:
	stp	x26, x25, [sp, #-80]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	mov	x19, x6
	mov	x21, x5
	mov	x25, x4
	mov	x22, x3
	mov	x20, x2
	mov	x23, x1
	mov	x24, x0
	ldr	w8, [x1, #16]
	sdiv	w8, w8, w2
	str	w8, [x6]
	ldr	w9, [x1]
	cmp	w8, w9
	csel	w8, w8, w9, lt
	str	w8, [x6]
	ldr	w9, [x1, #4]
	cmp	w8, w9
	csel	w8, w8, w9, gt
	str	w8, [x6]
	ldr	w8, [x1, #8]
	ldr	w9, [x1, #20]
	add	w8, w9, w8
	sdiv	w0, w8, w9
	ldr	w1, [x1, #48]
	bl	_max
	mov	x26, x0
	ldr	w8, [x23, #8]
	ldr	w9, [x23, #24]
	add	w8, w9, w8
	ldr	w1, [x23, #40]
	sdiv	w0, w8, w9
	bl	_min
	cmp	w26, w0
	b.le	LBB0_3
LBB0_1:
	mov	w0, #1
	bl	_unlikely
	cbz	x0, LBB0_9
; %bb.2:
Lloh0:
	adrp	x1, l_.str@PAGE
Lloh1:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x24
	bl	_nv_error
Lloh2:
	adrp	x8, _EINVAL@GOTPAGE
Lloh3:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh4:
	ldr	w8, [x8]
	neg	w20, w8
	b	LBB0_10
LBB0_3:
	ldr	w13, [x19]
	ldr	w8, [x23, #8]
	cmp	w8, #0
	cinc	w9, w8, lt
	asr	w9, w9, #1
	ldr	w10, [x23, #28]
	sub	w11, w0, w26
	add	w11, w11, #1
	mul	w12, w26, w13
	mul	w12, w12, w20
	mul	w13, w13, w20
	b	LBB0_5
LBB0_4:                                 ;   in Loop: Header=BB0_5 Depth=1
	add	w12, w12, w13
	subs	w11, w11, #1
	b.eq	LBB0_1
LBB0_5:                                 ; =>This Inner Loop Header: Depth=1
	sdiv	w15, w12, w8
	msub	w14, w15, w8, w12
	cmp	x25, #0
	ccmp	w14, w9, #8, eq
	cinc	w15, w15, ge
	cmp	w15, w10
	b.lt	LBB0_4
; %bb.6:                                ;   in Loop: Header=BB0_5 Depth=1
	ldr	w16, [x23, #32]
	cmp	w15, w16
	b.gt	LBB0_1
; %bb.7:                                ;   in Loop: Header=BB0_5 Depth=1
	cbz	x25, LBB0_4
; %bb.8:
	lsl	w8, w14, #13
	ldr	w9, [x23, #8]
	sdiv	w8, w8, w9
	add	w8, w8, #15, lsl #12            ; =61440
	and	w8, w8, #0xffff
	str	w8, [x25]
	b	LBB0_10
LBB0_9:
	ldr	w8, [x23, #8]
	ldr	w9, [x22]
	mul	w8, w9, w8
	ldr	w9, [x21]
	sdiv	w8, w8, w9
	ldr	w9, [x19]
	sdiv	w20, w8, w9
LBB0_10:
	mov	x0, x20
	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
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpAdd	Lloh0, Lloh1
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"unable to find matching pll values\n"

	.comm	_EINVAL,4,2                     ; @EINVAL
.subsections_via_symbols
