	.file	"extr_ramgk104.c_gk104_ram_calc.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.globl	gk104_ram_calc
	.type	gk104_ram_calc, @function
gk104_ram_calc:
.LFB0:
	.cfi_startproc
	endbr64
	push	r14
	.cfi_def_cfa_offset 16
	.cfi_offset 14, -16
	push	r13
	.cfi_def_cfa_offset 24
	.cfi_offset 13, -24
	mov	r13d, esi
	push	r12
	.cfi_def_cfa_offset 32
	.cfi_offset 12, -32
	push	rbp
	.cfi_def_cfa_offset 40
	.cfi_offset 6, -40
	push	rbx
	.cfi_def_cfa_offset 48
	.cfi_offset 3, -48
	call	gk104_ram@PLT
	mov	rbp, rax
	lea	r12, 32[rax]
	mov	rax, QWORD PTR [rax]
	test	rax, rax
	je	.L11
	xor	edi, edi
	cmp	rax, r12
	lea	r12, 8[rbp]
	setne	dil
	call	BUG_ON@PLT
.L9:
	mov	QWORD PTR 0[rbp], r12
.L7:
	pop	rbx
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	mov	rsi, r12
	mov	rdi, rbp
	pop	rbp
	.cfi_def_cfa_offset 32
	pop	r12
	.cfi_def_cfa_offset 24
	pop	r13
	.cfi_def_cfa_offset 16
	pop	r14
	.cfi_def_cfa_offset 8
	jmp	gk104_ram_calc_xits@PLT
	.p2align 4,,10
	.p2align 3
.L11:
	.cfi_restore_state
	mov	rax, QWORD PTR 80[rbp]
	mov	esi, DWORD PTR nv_clk_src_mem[rip]
	lea	r14, 56[rbp]
	mov	rax, QWORD PTR [rax]
	mov	rdi, QWORD PTR [rax]
	call	nvkm_clk_read@PLT
	mov	rdx, r14
	mov	rdi, rbp
	mov	esi, eax
	call	gk104_ram_calc_data@PLT
	test	eax, eax
	je	.L12
.L1:
	pop	rbx
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	pop	rbp
	.cfi_def_cfa_offset 32
	pop	r12
	.cfi_def_cfa_offset 24
	pop	r13
	.cfi_def_cfa_offset 16
	pop	r14
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L12:
	.cfi_restore_state
	lea	rbx, 8[rbp]
	mov	esi, r13d
	mov	rdi, rbp
	mov	rdx, rbx
	call	gk104_ram_calc_data@PLT
	test	eax, eax
	jne	.L1
	mov	rax, QWORD PTR 56[rbp]
	cmp	QWORD PTR 8[rbp], rax
	jl	.L13
	mov	rax, QWORD PTR 72[rbp]
	movdqu	xmm1, XMMWORD PTR 56[rbp]
	mov	QWORD PTR 48[rbp], rax
	mov	rax, rbx
	movups	XMMWORD PTR 32[rbp], xmm1
.L5:
	mov	edx, DWORD PTR 16[rax]
	mov	rsi, r14
	mov	rdi, r12
	mov	DWORD PTR 48[rbp], edx
	mov	edx, DWORD PTR 12[rax]
	mov	eax, DWORD PTR 8[rax]
	mov	QWORD PTR 0[rbp], rbx
	mov	DWORD PTR 44[rbp], edx
	mov	edx, 12
	mov	DWORD PTR 40[rbp], eax
	call	memcmp@PLT
	test	rax, rax
	jne	.L9
	mov	r12, QWORD PTR 0[rbp]
	jmp	.L7
	.p2align 4,,10
	.p2align 3
.L13:
	mov	rax, QWORD PTR 24[rbp]
	movdqu	xmm0, XMMWORD PTR 8[rbp]
	mov	QWORD PTR 48[rbp], rax
	mov	rax, r14
	movups	XMMWORD PTR 32[rbp], xmm0
	jmp	.L5
	.cfi_endproc
.LFE0:
	.size	gk104_ram_calc, .-gk104_ram_calc
	.comm	nv_clk_src_mem,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",@progbits
	.section	.note.gnu.property,"a"
	.align 8
	.long	 1f - 0f
	.long	 4f - 1f
	.long	 5
0:
	.string	 "GNU"
1:
	.align 8
	.long	 0xc0000002
	.long	 3f - 2f
2:
	.long	 0x3
3:
	.align 8
4:

	.arch armv5t
	.eabi_attribute 20, 1
	.eabi_attribute 21, 1
	.eabi_attribute 23, 3
	.eabi_attribute 24, 1
	.eabi_attribute 25, 1
	.eabi_attribute 26, 2
	.eabi_attribute 30, 2
	.eabi_attribute 34, 0
	.eabi_attribute 18, 4
	.file	"extr_ramgk104.c_gk104_ram_calc.c"
	.text
	.align	2
	.global	gk104_ram_calc
	.syntax unified
	.arm
	.fpu softvfp
	.type	gk104_ram_calc, %function
gk104_ram_calc:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, lr}
	mov	r7, r1
	bl	gk104_ram
	mov	r6, r0
	mov	r4, r0
	ldr	r0, [r6], #20
	cmp	r0, #0
	beq	.L12
	subs	r0, r0, r6
	movne	r0, #1
	add	r5, r4, #4
	bl	BUG_ON
	str	r5, [r4]
.L6:
	mov	r1, r5
	mov	r0, r4
	pop	{r4, r5, r6, r7, r8, lr}
	b	gk104_ram_calc_xits
.L12:
	ldr	r3, [r4, #52]
	ldr	r2, .L13
	ldr	r3, [r3]
	ldr	r1, [r2]
	ldr	r0, [r3]
	bl	nvkm_clk_read
	add	r8, r4, #36
	mov	r1, r0
	mov	r2, r8
	mov	r0, r4
	bl	gk104_ram_calc_data
	cmp	r0, #0
	popne	{r4, r5, r6, r7, r8, pc}
	add	r5, r4, #4
	mov	r1, r7
	mov	r2, r5
	mov	r0, r4
	bl	gk104_ram_calc_data
	cmp	r0, #0
	popne	{r4, r5, r6, r7, r8, pc}
	ldr	r2, [r4, #4]
	ldr	r3, [r4, #36]
	cmp	r2, r3
	movge	ip, r5
	ldmlt	r5, {r0, r1, r2, r3}
	ldmge	r8, {r0, r1, r2, r3}
	movlt	ip, r8
	stmlt	r6, {r0, r1, r2, r3}
	stmge	r6, {r0, r1, r2, r3}
	ldr	r0, [ip, #12]
	ldr	r2, [ip, #8]
	ldr	r3, [ip, #4]
	mov	r1, r8
	str	r0, [r4, #32]
	str	r2, [r4, #28]
	str	r5, [r4]
	mov	r2, #12
	mov	r0, r6
	str	r3, [r4, #24]
	bl	memcmp
	cmp	r0, #0
	movne	r5, r6
	strne	r6, [r4]
	b	.L6
.L14:
	.align	2
.L13:
	.word	nv_clk_src_mem
	.size	gk104_ram_calc, .-gk104_ram_calc
	.comm	nv_clk_src_mem,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
