	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function nv40_clk_calc
_nv40_clk_calc:                         ## @nv40_clk_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
	movq	%rsi, %rbx
	callq	_nv40_clk
	movq	%rax, %r12
	movq	(%rbx), %rax
	movq	_nv_clk_src_core@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	movl	(%rax,%rcx,4), %r15d
	movq	_nv_clk_src_shader@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	movl	(%rax,%rcx,4), %r14d
	leaq	-52(%rbp), %r13
	leaq	-56(%rbp), %rax
	leaq	-48(%rbp), %rcx
	leaq	-44(%rbp), %r8
	leaq	-60(%rbp), %r9
	movq	%r12, %rdi
	movl	$16384, %esi                    ## imm = 0x4000
	movl	%r15d, %edx
	pushq	%r13
	pushq	%rax
	callq	_nv40_clk_calc_pll
	addq	$16, %rsp
	testl	%eax, %eax
	js	LBB0_11
## %bb.1:
	movl	-60(%rbp), %ecx
	movl	-52(%rbp), %eax
	shll	$16, %eax
	cmpl	-56(%rbp), %ecx
	jne	LBB0_4
## %bb.2:
	orl	$-2147483392, %eax              ## imm = 0x80000100
	movl	%eax, (%r12)
	movl	-48(%rbp), %eax
	shll	$8, %eax
	jmp	LBB0_5
LBB0_4:
	orl	$-1073741824, %eax              ## imm = 0xC0000000
	movl	%eax, (%r12)
	movl	-60(%rbp), %eax
	shll	$24, %eax
	movl	-56(%rbp), %ecx
	shll	$16, %ecx
	orl	%eax, %ecx
	movl	-48(%rbp), %eax
	shll	$8, %eax
	orl	%ecx, %eax
LBB0_5:
	orl	-44(%rbp), %eax
	movl	%eax, 4(%r12)
	xorl	%ebx, %ebx
	movl	$819, %ecx                      ## imm = 0x333
	testl	%r14d, %r14d
	je	LBB0_9
## %bb.6:
	movl	$0, %eax
	cmpl	%r15d, %r14d
	je	LBB0_10
## %bb.7:
	leaq	-48(%rbp), %rcx
	leaq	-44(%rbp), %r8
	movq	%r12, %rdi
	movl	$16392, %esi                    ## imm = 0x4008
	movl	%r14d, %edx
	xorl	%r9d, %r9d
	pushq	%r13
	pushq	$0
	callq	_nv40_clk_calc_pll
	addq	$16, %rsp
	testl	%eax, %eax
	js	LBB0_11
## %bb.8:
	movl	-52(%rbp), %ecx
	shll	$16, %ecx
	movl	-48(%rbp), %eax
	shll	$8, %eax
	orl	%ecx, %eax
	orl	-44(%rbp), %eax
	orl	$-1073741824, %eax              ## imm = 0xC0000000
	movl	$547, %ecx                      ## imm = 0x223
	jmp	LBB0_10
LBB0_11:
	movl	%eax, %ebx
	jmp	LBB0_12
LBB0_9:
	xorl	%eax, %eax
LBB0_10:
	movl	%eax, 8(%r12)
	movl	%ecx, 12(%r12)
LBB0_12:
	movl	%ebx, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_nv_clk_src_core,8,3            ## @nv_clk_src_core
	.comm	_nv_clk_src_shader,8,3          ## @nv_clk_src_shader
	.no_dead_strip	_nv40_clk_calc
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.section	__TEXT,__literal8,8byte_literals
	.p2align	3                               ; -- Begin function nv40_clk_calc
lCPI0_0:
	.long	0                               ; 0x0
	.long	819                             ; 0x333
	.section	__TEXT,__text,regular,pure_instructions
	.p2align	2
_nv40_clk_calc:                         ; @nv40_clk_calc
	.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	x20, x1
	bl	_nv40_clk
	mov	x19, x0
	ldr	x8, [x20]
Lloh0:
	adrp	x9, _nv_clk_src_core@GOTPAGE
Lloh1:
	ldr	x9, [x9, _nv_clk_src_core@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x9]
	ldr	w21, [x8, x9, lsl #2]
Lloh3:
	adrp	x9, _nv_clk_src_shader@GOTPAGE
Lloh4:
	ldr	x9, [x9, _nv_clk_src_shader@GOTPAGEOFF]
Lloh5:
	ldr	x9, [x9]
	ldr	w20, [x8, x9, lsl #2]
	add	x3, sp, #28
	add	x4, sp, #24
	add	x5, sp, #20
	add	x6, sp, #16
	add	x7, sp, #12
	mov	x2, x21
	mov	w1, #16384
	bl	_nv40_clk_calc_pll
	tbnz	w0, #31, LBB0_9
; %bb.1:
	ldp	w10, w9, [sp, #16]
	ldr	w8, [sp, #12]
	lsl	w8, w8, #16
	cmp	w9, w10
	b.ne	LBB0_3
; %bb.2:
	mov	w9, #256
	movk	w9, #32768, lsl #16
	orr	w8, w8, w9
	str	w8, [x19]
	ldp	w9, w8, [sp, #24]
	orr	w8, w9, w8, lsl #8
	b	LBB0_4
LBB0_3:
	orr	w8, w8, #0xc0000000
	str	w8, [x19]
	ldp	w9, w8, [sp, #16]
	lsl	w9, w9, #16
	orr	w8, w9, w8, lsl #24
	ldr	w9, [sp, #28]
	orr	w8, w8, w9, lsl #8
	ldr	w9, [sp, #24]
	orr	w8, w8, w9
LBB0_4:
	str	w8, [x19, #4]
	cmp	w20, #0
	ccmp	w20, w21, #4, ne
	b.ne	LBB0_6
; %bb.5:
Lloh6:
	adrp	x8, lCPI0_0@PAGE
Lloh7:
	ldr	d0, [x8, lCPI0_0@PAGEOFF]
	b	LBB0_8
LBB0_6:
	add	x3, sp, #28
	add	x4, sp, #24
	add	x7, sp, #12
	mov	x0, x19
	mov	w1, #16392
	mov	x2, x20
	mov	x5, #0
	mov	x6, #0
	bl	_nv40_clk_calc_pll
	tbnz	w0, #31, LBB0_9
; %bb.7:
	ldr	w8, [sp, #12]
	lsl	w8, w8, #16
	ldp	w10, w9, [sp, #24]
	orr	w8, w8, w9, lsl #8
	orr	w8, w8, w10
	orr	w8, w8, #0xc0000000
	mov	w9, #547
	dup.2s	v0, w9
	mov.s	v0[0], w8
LBB0_8:
	mov	w0, #0
	str	d0, [x19, #8]
LBB0_9:
	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
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdr	Lloh6, Lloh7
	.cfi_endproc
                                        ; -- End function
	.comm	_nv_clk_src_core,8,3            ; @nv_clk_src_core
	.comm	_nv_clk_src_shader,8,3          ; @nv_clk_src_shader
	.no_dead_strip	_nv40_clk_calc
.subsections_via_symbols
