	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_gk104_ram_calc                 ## -- Begin function gk104_ram_calc
	.p2align	4, 0x90
_gk104_ram_calc:                        ## @gk104_ram_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
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%esi, %r13d
	callq	_gk104_ram
	movq	%rax, %rbx
	movq	%rax, %r15
	leaq	32(%rax), %r14
	movq	(%rax), %rax
	testq	%rax, %rax
	je	LBB0_1
## %bb.6:
	xorl	%edi, %edi
	cmpq	%r14, %rax
	setne	%dil
	callq	_BUG_ON
	addq	$8, %rbx
	movq	%rbx, (%r15)
	movq	%rbx, %r14
LBB0_7:
	movq	%r15, %rdi
	movq	%r14, %rsi
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_gk104_ram_calc_xits            ## TAILCALL
LBB0_1:
	movq	80(%r15), %rax
	movq	(%rax), %rax
	movq	(%rax), %rdi
	movq	_nv_clk_src_mem@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_nvkm_clk_read
	leaq	56(%rbx), %r12
	movq	%r15, %rdi
	movl	%eax, %esi
	movq	%r12, %rdx
	callq	_gk104_ram_calc_data
	testl	%eax, %eax
	jne	LBB0_8
## %bb.2:
	addq	$8, %rbx
	movq	%r15, %rdi
	movl	%r13d, %esi
	movq	%rbx, %rdx
	callq	_gk104_ram_calc_data
	testl	%eax, %eax
	je	LBB0_3
LBB0_8:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_3:
	movq	8(%r15), %rax
	cmpq	56(%r15), %rax
	movq	%r12, %rax
	cmovlq	%rbx, %rax
	movq	%rbx, %rcx
	cmovlq	%r12, %rcx
	movq	16(%rax), %rdx
	movq	%rdx, 16(%r14)
	movups	(%rax), %xmm0
	movups	%xmm0, (%r14)
	movl	16(%rcx), %eax
	movl	%eax, 48(%r15)
	movl	12(%rcx), %eax
	movl	%eax, 44(%r15)
	movl	8(%rcx), %eax
	movl	%eax, 40(%r15)
	movq	%rbx, (%r15)
	movq	%r14, %rdi
	movq	%r12, %rsi
	movl	$12, %edx
	callq	_memcmp
	testq	%rax, %rax
	je	LBB0_4
## %bb.5:
	movq	%r14, (%r15)
	jmp	LBB0_7
LBB0_4:
	movq	(%r15), %r14
	jmp	LBB0_7
	.cfi_endproc
                                        ## -- End function
	.comm	_nv_clk_src_mem,4,2             ## @nv_clk_src_mem
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_gk104_ram_calc                 ; -- Begin function gk104_ram_calc
	.p2align	2
_gk104_ram_calc:                        ; @gk104_ram_calc
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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
	mov	x22, x1
	bl	_gk104_ram
	mov	x19, x0
	mov	x20, x0
	ldr	x8, [x20], #32
	cbz	x8, LBB0_4
; %bb.1:
	cmp	x8, x20
	cset	w0, ne
	bl	_BUG_ON
	add	x20, x19, #8
LBB0_2:
	str	x20, [x19]
LBB0_3:
	mov	x0, x19
	mov	x1, x20
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	b	_gk104_ram_calc_xits
LBB0_4:
	ldr	x8, [x19, #80]
	ldr	x8, [x8]
	ldr	x0, [x8]
Lloh0:
	adrp	x8, _nv_clk_src_mem@GOTPAGE
Lloh1:
	ldr	x8, [x8, _nv_clk_src_mem@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	bl	_nvkm_clk_read
	mov	x1, x0
	add	x21, x19, #56
	mov	x0, x19
	mov	x2, x21
	bl	_gk104_ram_calc_data
	cbnz	w0, LBB0_6
; %bb.5:
	add	x23, x19, #8
	mov	x0, x19
	mov	x1, x22
	mov	x2, x23
	bl	_gk104_ram_calc_data
	cbz	w0, LBB0_7
LBB0_6:
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
LBB0_7:
	ldr	x8, [x19, #8]
	ldr	x9, [x19, #56]
	cmp	x8, x9
	csel	x8, x23, x21, lt
	csel	x9, x21, x23, lt
	ldr	q0, [x8]
	str	q0, [x20]
	ldr	x8, [x8, #16]
	str	x8, [x20, #16]
	ldr	w8, [x9, #16]
	str	w8, [x19, #48]
	ldr	d0, [x9, #8]
	str	d0, [x19, #40]
	str	x23, [x19]
	mov	x0, x20
	mov	x1, x21
	mov	w2, #12
	bl	_memcmp
	cbnz	x0, LBB0_2
; %bb.8:
	ldr	x20, [x19]
	b	LBB0_3
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_nv_clk_src_mem,4,2             ; @nv_clk_src_mem
.subsections_via_symbols
