	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function gk104_ram_calc_sddr3
_gk104_ram_calc_sddr3:                  ## @gk104_ram_calc_sddr3
	.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	%rdi, %rbx
	leaq	48(%rdi), %r14
	movl	(%rdi), %eax
	movl	4(%rdi), %r15d
	shll	$16, %eax
	shll	$8, %r15d
	orl	%eax, %r15d
	orl	8(%rdi), %r15d
	movl	12(%rdi), %eax
	movl	%eax, -52(%rbp)                 ## 4-byte Spill
	movq	40(%rdi), %r12
	movl	136(%r12), %eax
	movl	%eax, -56(%rbp)                 ## 4-byte Spill
	movl	140(%r12), %r13d
	movq	%r14, %rdi
	movl	$1112072, %esi                  ## imm = 0x10F808
	movl	$1073741824, %edx               ## imm = 0x40000000
	movl	$1073741824, %ecx               ## imm = 0x40000000
	callq	_ram_mask
	movq	%r14, %rdi
	callq	_ram_block
	movq	%rbx, -48(%rbp)                 ## 8-byte Spill
	movq	32(%rbx), %rax
	movl	(%rax), %edi
	movq	_NVKM_ENGINE_DISP@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_nvkm_device_engine
	testq	%rax, %rax
	je	LBB0_2
## %bb.1:
	movq	%r14, %rdi
	movl	$6471680, %esi                  ## imm = 0x62C000
	movl	$252641280, %edx                ## imm = 0xF0F0000
	callq	_ram_wr32
LBB0_2:
	testl	%r13d, %r13d
	je	LBB0_3
LBB0_6:
	movq	%r14, %rdi
	movl	$1110528, %esi                  ## imm = 0x10F200
	movl	$2048, %edx                     ## imm = 0x800
	xorl	%ecx, %ecx
	callq	_ram_mask
	cmpq	$0, 72(%r12)
	je	LBB0_8
## %bb.7:
	movq	%r14, %rdi
	movl	$1112072, %esi                  ## imm = 0x10F808
	movl	$67108864, %edx                 ## imm = 0x4000000
	movl	$67108864, %ecx                 ## imm = 0x4000000
	callq	_ram_mask
LBB0_8:
	movq	%r14, %rdi
	movl	$1110804, %esi                  ## imm = 0x10F314
	movl	$1, %edx
	callq	_ram_wr32
	cmpq	$0, 48(%r12)
	je	LBB0_10
## %bb.9:
	movq	%r14, %rdi
	callq	_nvkm_sddr3_dll_disable
LBB0_10:
	movq	%r14, %rdi
	movl	$1110544, %esi                  ## imm = 0x10F210
	xorl	%edx, %edx
	callq	_ram_wr32
	movq	%r14, %rdi
	movl	$1110800, %esi                  ## imm = 0x10F310
	movl	$1, %edx
	callq	_ram_wr32
	movq	%r14, %rdi
	movl	$1110528, %esi                  ## imm = 0x10F200
	movl	$-2147483648, %edx              ## imm = 0x80000000
	movl	$-2147483648, %ecx              ## imm = 0x80000000
	callq	_ram_mask
	movq	%r14, %rdi
	movl	$1110800, %esi                  ## imm = 0x10F310
	movl	$1, %edx
	callq	_ram_wr32
	movq	%r14, %rdi
	movl	$1110528, %esi                  ## imm = 0x10F200
	movl	$-2147483648, %edx              ## imm = 0x80000000
	xorl	%ecx, %ecx
	callq	_ram_mask
	movq	%r14, %rdi
	movl	$1000, %esi                     ## imm = 0x3E8
	callq	_ram_nsec
	movq	%r14, %rdi
	movl	$1110160, %esi                  ## imm = 0x10F090
	movl	$96, %edx
	callq	_ram_wr32
	movq	%r14, %rdi
	movl	$1110160, %esi                  ## imm = 0x10F090
	movl	$-1073741698, %edx              ## imm = 0xC000007E
	callq	_ram_wr32
	movslq	(%r12), %rax
	movl	$-2146891808, %ecx              ## imm = 0x800907E0
	cmpq	$3, %rax
	ja	LBB0_12
## %bb.11:
	leaq	L_switch.table.gk104_ram_calc_sddr3(%rip), %rcx
	movl	(%rcx,%rax,4), %ecx
LBB0_12:
	movl	4(%r12), %eax
	cmpq	$3, %rax
	movl	%r13d, -60(%rbp)                ## 4-byte Spill
	ja	LBB0_18
## %bb.13:
	leaq	LJTI0_0(%rip), %rdx
	movslq	(%rdx,%rax,4), %rax
	addq	%rdx, %rax
	jmpq	*%rax
LBB0_17:
	andl	$-2146892320, %ecx              ## imm = 0x800905E0
	jmp	LBB0_18
LBB0_3:
	movq	_gpio2E@GOTPCREL(%rip), %rbx
	movl	(%rbx), %esi
	movq	%r14, %rdi
	callq	_ram_have
	testq	%rax, %rax
	je	LBB0_6
## %bb.4:
	movl	(%rbx), %esi
	movq	(%r14), %rax
	movl	4(%rax), %ecx
	movq	%r14, %rdi
	movl	$12288, %edx                    ## imm = 0x3000
	callq	_ram_mask
	movq	%rbx, %rcx
	movl	%r13d, %ebx
	movl	%eax, %r13d
	movl	(%rcx), %esi
	movq	%r14, %rdi
	callq	_ram_rd32
	cmpl	%eax, %r13d
	movl	%ebx, %r13d
	je	LBB0_6
## %bb.5:
	movq	_gpiotrig@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r14, %rdi
	movl	$1, %edx
	callq	_ram_wr32
	movq	%r14, %rdi
	movl	$20000, %esi                    ## imm = 0x4E20
	callq	_ram_nsec
	jmp	LBB0_6
LBB0_16:
	andl	$-2147416096, %ecx              ## imm = 0x800107E0
	jmp	LBB0_18
LBB0_15:
	andl	$-2146891936, %ecx              ## imm = 0x80090760
	jmp	LBB0_18
LBB0_14:
	andl	$-2146891840, %ecx              ## imm = 0x800907C0
LBB0_18:
	cmpq	$0, 120(%r12)
	movl	$-2146891808, %eax              ## imm = 0x800907E0
	movl	$-2096560160, %edx              ## imm = 0x830907E0
	cmovel	%eax, %edx
	cmpq	$0, 112(%r12)
	leal	8192(%rdx), %eax
	cmovel	%edx, %eax
	leal	16384(%rax), %esi
	cmpq	$0, 104(%r12)
	cmovel	%eax, %esi
	cmpq	$0, 96(%r12)
	movl	$335544320, %edx                ## imm = 0x14000000
	movl	$3, %eax
	cmovnel	%eax, %edx
	orl	%esi, %edx
	movq	%r14, %rdi
	movl	$1112100, %esi                  ## imm = 0x10F824
	callq	_ram_mask
	movq	%r14, %rdi
	movl	$1253440, %esi                  ## imm = 0x132040
	movl	$65536, %edx                    ## imm = 0x10000
	xorl	%ecx, %ecx
	callq	_ram_mask
	movq	%r14, %rdi
	movl	$1274868, %esi                  ## imm = 0x1373F4
	xorl	%edx, %edx
	movl	$65552, %ecx                    ## imm = 0x10010
	callq	_ram_mask
	movq	%r14, %rdi
	movl	$1274860, %esi                  ## imm = 0x1373EC
	callq	_ram_rd32
	andl	$-196609, %eax                  ## imm = 0xFFFCFFFF
	movl	4(%r12), %edx
	shll	$16, %edx
	orl	%eax, %edx
	movq	%r14, %rdi
	movl	$1274860, %esi                  ## imm = 0x1373EC
	callq	_ram_wr32
	movq	%r14, %rdi
	movl	$1274868, %esi                  ## imm = 0x1373F4
	movl	$3, %edx
	xorl	%ecx, %ecx
	callq	_ram_mask
	movq	%r14, %rdi
	movl	$1274868, %esi                  ## imm = 0x1373F4
	movl	$16, %edx
	xorl	%ecx, %ecx
	callq	_ram_mask
	movq	%r14, %rdi
	movl	$1253412, %esi                  ## imm = 0x132024
	callq	_ram_rd32
	cmpl	%r15d, %eax
	jne	LBB0_20
## %bb.19:
	movq	%r14, %rdi
	movl	$1253428, %esi                  ## imm = 0x132034
	callq	_ram_rd32
	movzwl	%ax, %eax
	cmpl	-52(%rbp), %eax                 ## 4-byte Folded Reload
	je	LBB0_21
LBB0_20:
	movl	-52(%rbp), %ebx                 ## 4-byte Reload
	movl	%ebx, %r13d
	shll	$16, %r13d
	movq	%r14, %rdi
	movl	$1253376, %esi                  ## imm = 0x132000
	movl	$1, %edx
	xorl	%ecx, %ecx
	callq	_ram_mask
	movq	%r14, %rdi
	movl	$1253408, %esi                  ## imm = 0x132020
	movl	$1, %edx
	xorl	%ecx, %ecx
	callq	_ram_mask
	movq	%r14, %rdi
	movl	$1274656, %esi                  ## imm = 0x137320
	xorl	%edx, %edx
	callq	_ram_wr32
	movq	%r14, %rdi
	movl	$1253424, %esi                  ## imm = 0x132030
	movl	$-65536, %edx                   ## imm = 0xFFFF0000
	movl	%r13d, %ecx
	callq	_ram_mask
	movq	%r14, %rdi
	movl	$1253428, %esi                  ## imm = 0x132034
	movl	$65535, %edx                    ## imm = 0xFFFF
	movl	%ebx, %ecx
	callq	_ram_mask
	movq	%r14, %rdi
	movl	$1253412, %esi                  ## imm = 0x132024
	movl	%r15d, %edx
	callq	_ram_wr32
	movq	%r14, %rdi
	movl	$1253416, %esi                  ## imm = 0x132028
	movl	$524288, %edx                   ## imm = 0x80000
	movl	$524288, %ecx                   ## imm = 0x80000
	callq	_ram_mask
	movq	%r14, %rdi
	movl	$1253408, %esi                  ## imm = 0x132020
	movl	$1, %edx
	movl	$1, %ecx
	callq	_ram_mask
	movq	%r14, %rdi
	movl	$1274768, %esi                  ## imm = 0x137390
	movl	$131072, %edx                   ## imm = 0x20000
	movl	$131072, %ecx                   ## imm = 0x20000
	movl	$64000, %r8d                    ## imm = 0xFA00
	callq	_ram_wait
	movq	%r14, %rdi
	movl	$1253416, %esi                  ## imm = 0x132028
	movl	$524288, %edx                   ## imm = 0x80000
	xorl	%ecx, %ecx
	callq	_ram_mask
LBB0_21:
	movq	%r14, %rdi
	movl	$1274868, %esi                  ## imm = 0x1373F4
	movl	$16, %edx
	movl	$16, %ecx
	callq	_ram_mask
	movq	%r14, %rdi
	movl	$1274868, %esi                  ## imm = 0x1373F4
	movl	$3, %edx
	movl	$1, %ecx
	callq	_ram_mask
	movq	%r14, %rdi
	movl	$1274868, %esi                  ## imm = 0x1373F4
	movl	$65536, %edx                    ## imm = 0x10000
	xorl	%ecx, %ecx
	callq	_ram_mask
	movq	_gpioMV@GOTPCREL(%rip), %r13
	movl	(%r13), %esi
	movq	%r14, %rdi
	callq	_ram_have
	testq	%rax, %rax
	je	LBB0_24
## %bb.22:
	xorl	%eax, %eax
	cmpl	$0, -56(%rbp)                   ## 4-byte Folded Reload
	sete	%al
	movl	(%r13), %esi
	movq	-48(%rbp), %rcx                 ## 8-byte Reload
	movq	56(%rcx), %rcx
	movl	(%rcx,%rax,4), %ecx
	movq	%r14, %rdi
	movl	$12288, %edx                    ## imm = 0x3000
	callq	_ram_mask
	movl	%eax, %r15d
	movl	(%r13), %esi
	movq	%r14, %rdi
	callq	_ram_rd32
	cmpl	%eax, %r15d
	je	LBB0_24
## %bb.23:
	movq	_gpiotrig@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r14, %rdi
	movl	$1, %edx
	callq	_ram_wr32
	movq	%r14, %rdi
	movl	$64000, %esi                    ## imm = 0xFA00
	callq	_ram_nsec
LBB0_24:
	cmpq	$0, 112(%r12)
	jne	LBB0_26
## %bb.25:
	cmpq	$0, 104(%r12)
	je	LBB0_27
LBB0_26:
	movq	%r14, %rdi
	movl	$1253440, %esi                  ## imm = 0x132040
	movl	$65536, %edx                    ## imm = 0x10000
	movl	$65536, %ecx                    ## imm = 0x10000
	callq	_ram_mask
	movq	%r14, %rdi
	movl	$20000, %esi                    ## imm = 0x4E20
	callq	_ram_nsec
LBB0_27:
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	cmpl	$2, 16(%rax)
	movl	-60(%rbp), %r13d                ## 4-byte Reload
	je	LBB0_30
## %bb.28:
	cmpq	$0, 128(%r12)
	je	LBB0_30
## %bb.29:
	movq	%r14, %rdi
	movl	$1111664, %esi                  ## imm = 0x10F670
	movl	$-2147483648, %edx              ## imm = 0x80000000
	movl	$-2147483648, %ecx              ## imm = 0x80000000
	callq	_ram_mask
LBB0_30:
	movl	8(%r12), %eax
	movl	%eax, %edx
	shll	$4, %edx
	addl	%eax, %edx
	movq	%r14, %rdi
	movl	$1111644, %esi                  ## imm = 0x10F65C
	callq	_ram_wr32
	imull	$16843009, 12(%r12), %edx       ## imm = 0x1010101
	movq	%r14, %rdi
	movl	$1111736, %esi                  ## imm = 0x10F6B8
	callq	_ram_wr32
	imull	$16843009, 12(%r12), %edx       ## imm = 0x1010101
	movq	%r14, %rdi
	movl	$1111740, %esi                  ## imm = 0x10F6BC
	callq	_ram_wr32
	xorl	%r15d, %r15d
	cmpq	$0, 120(%r12)
	movl	$50331648, %eax                 ## imm = 0x3000000
	cmovnel	%r15d, %eax
	cmpq	$0, 112(%r12)
	leal	8192(%rax), %ecx
	cmovnel	%eax, %ecx
	leal	16384(%rcx), %eax
	cmpq	$0, 104(%r12)
	cmovnel	%ecx, %eax
	cmpq	$0, 96(%r12)
	movl	$3, %edx
	movl	$335544320, %ecx                ## imm = 0x14000000
	cmovel	%edx, %ecx
	orl	%eax, %ecx
	movq	%r14, %rdi
	movl	$1112100, %esi                  ## imm = 0x10F824
	movl	$65536, %edx                    ## imm = 0x10000
	callq	_ram_mask
	movq	%r14, %rdi
	movl	$1000, %esi                     ## imm = 0x3E8
	callq	_ram_nsec
	xorl	%ecx, %ecx
	cmpq	$0, 88(%r12)
	setne	%cl
	shll	$20, %ecx
	movq	%r14, %rdi
	movl	$1112108, %esi                  ## imm = 0x10F82C
	movl	$1048576, %edx                  ## imm = 0x100000
	callq	_ram_mask
	movq	16(%r12), %rax
	movl	40(%rax), %ecx
	movq	%r14, %rdi
	movl	$1110600, %esi                  ## imm = 0x10F248
	movl	$-1, %edx
	callq	_ram_mask
	movq	16(%r12), %rax
	movl	(%rax), %ecx
	movq	%r14, %rdi
	movl	$1110672, %esi                  ## imm = 0x10F290
	movl	$-1, %edx
	callq	_ram_mask
	movq	16(%r12), %rax
	movl	4(%rax), %ecx
	movq	%r14, %rdi
	movl	$1110676, %esi                  ## imm = 0x10F294
	movl	$-1, %edx
	callq	_ram_mask
	movq	16(%r12), %rax
	movl	8(%rax), %ecx
	movq	%r14, %rdi
	movl	$1110680, %esi                  ## imm = 0x10F298
	movl	$-1, %edx
	callq	_ram_mask
	movq	16(%r12), %rax
	movl	12(%rax), %ecx
	movq	%r14, %rdi
	movl	$1110684, %esi                  ## imm = 0x10F29C
	movl	$-1, %edx
	callq	_ram_mask
	movq	16(%r12), %rax
	movl	16(%rax), %ecx
	movq	%r14, %rdi
	movl	$1110688, %esi                  ## imm = 0x10F2A0
	movl	$-1, %edx
	callq	_ram_mask
	movq	16(%r12), %rax
	movl	20(%rax), %ecx
	movq	%r14, %rdi
	movl	$1110692, %esi                  ## imm = 0x10F2A4
	movl	$-1, %edx
	callq	_ram_mask
	movq	16(%r12), %rax
	movl	24(%rax), %ecx
	movq	%r14, %rdi
	movl	$1110696, %esi                  ## imm = 0x10F2A8
	movl	$-1, %edx
	callq	_ram_mask
	movq	16(%r12), %rax
	movl	28(%rax), %ecx
	movq	%r14, %rdi
	movl	$1110700, %esi                  ## imm = 0x10F2AC
	movl	$-1, %edx
	callq	_ram_mask
	movq	16(%r12), %rax
	movl	32(%rax), %ecx
	movq	%r14, %rdi
	movl	$1110732, %esi                  ## imm = 0x10F2CC
	movl	$-1, %edx
	callq	_ram_mask
	movq	16(%r12), %rax
	movl	36(%rax), %ecx
	movq	%r14, %rdi
	movl	$1110760, %esi                  ## imm = 0x10F2E8
	movl	$-1, %edx
	callq	_ram_mask
	cmpl	$0, 80(%r12)
	movl	$538968064, %ecx                ## imm = 0x20200000
	cmovnel	%r15d, %ecx
	movl	56(%r12), %esi
	leal	310378496(%rcx), %edx
	testl	%esi, %esi
	movl	%ecx, %eax
	cmovel	%edx, %eax
	cmpq	$0, 72(%r12)
	je	LBB0_32
## %bb.31:
	orl	$32, %ecx
	xorl	%edi, %edi
	testl	%esi, %esi
	sete	%dil
	cmovel	%edx, %ecx
	shll	$5, %edi
	orl	$1005584388, %edi               ## imm = 0x3BF00004
	cmpq	$0, 64(%r12)
	cmovel	%eax, %ecx
	movl	$871366656, %edx                ## imm = 0x33F00000
	cmovnel	%edi, %edx
	orl	$67108864, %ecx                 ## imm = 0x4000000
	jmp	LBB0_33
LBB0_32:
	orl	$134217732, %eax                ## imm = 0x8000004
	movl	$2012217376, %edx               ## imm = 0x77F00020
	movl	%eax, %ecx
LBB0_33:
	movq	%r14, %rdi
	movl	$1112072, %esi                  ## imm = 0x10F808
                                        ## kill: def $ecx killed $ecx killed $rcx
	callq	_ram_mask
	imull	$286331153, 24(%r12), %edx      ## imm = 0x11111111
	movq	%r14, %rdi
	movl	$1112176, %esi                  ## imm = 0x10F870
	callq	_ram_wr32
	movl	28(%r12), %ecx
	shll	$4, %ecx
	movq	%r14, %rdi
	movl	$1110608, %esi                  ## imm = 0x10F250
	movl	$1008, %edx                     ## imm = 0x3F0
	callq	_ram_mask
	movq	16(%r12), %rax
	movzbl	43(%rax), %ecx
	andl	$127, %ecx
	movl	32(%r12), %eax
	cmpl	%eax, %ecx
	cmovlel	%eax, %ecx
	shll	$24, %ecx
	movq	%r14, %rdi
	movl	$1110604, %esi                  ## imm = 0x10F24C
	movl	$2130706432, %edx               ## imm = 0x7F000000
	callq	_ram_mask
	movl	36(%r12), %ecx
	shll	$16, %ecx
	movq	%r14, %rdi
	movl	$1110564, %esi                  ## imm = 0x10F224
	movl	$2031616, %edx                  ## imm = 0x1F0000
	callq	_ram_mask
	movq	%r14, %rdi
	movl	$1110160, %esi                  ## imm = 0x10F090
	movl	$1073741951, %edx               ## imm = 0x4000007F
	callq	_ram_wr32
	movq	%r14, %rdi
	movl	$1000, %esi                     ## imm = 0x3E8
	callq	_ram_nsec
	movq	%r14, %rdi
	movl	$1110804, %esi                  ## imm = 0x10F314
	movl	$1, %edx
	callq	_ram_wr32
	movq	%r14, %rdi
	movl	$1110800, %esi                  ## imm = 0x10F310
	movl	$1, %edx
	callq	_ram_wr32
	movq	%r14, %rdi
	movl	$1110544, %esi                  ## imm = 0x10F210
	movl	$-2147483648, %edx              ## imm = 0x80000000
	callq	_ram_wr32
	movq	%r14, %rdi
	movl	$1000, %esi                     ## imm = 0x3E8
	callq	_ram_nsec
	cmpq	$0, 48(%r12)
	jne	LBB0_35
## %bb.34:
	movq	_mr@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movl	4(%rax), %esi
	movq	%r14, %rdi
	movl	$1, %edx
	xorl	%ecx, %ecx
	callq	_ram_mask
	movq	%r14, %rdi
	callq	_nvkm_sddr3_dll_reset
LBB0_35:
	movq	_mr@GOTPCREL(%rip), %r15
	movq	(%r15), %rax
	movl	8(%rax), %esi
	movq	-48(%rbp), %rbx                 ## 8-byte Reload
	movq	24(%rbx), %rax
	movl	8(%rax), %ecx
	movq	%r14, %rdi
	movl	$4095, %edx                     ## imm = 0xFFF
	callq	_ram_mask
	movq	(%r15), %rax
	movl	4(%rax), %esi
	movq	24(%rbx), %rax
	movl	4(%rax), %ecx
	movq	%r14, %rdi
	movl	$-1, %edx
	callq	_ram_mask
	movq	(%r15), %rax
	movl	(%rax), %esi
	movq	24(%rbx), %rax
	movl	(%rax), %edx
	movq	%r14, %rdi
	callq	_ram_wr32
	movq	%r14, %rdi
	movl	$1000, %esi                     ## imm = 0x3E8
	callq	_ram_nsec
	cmpq	$0, 48(%r12)
	jne	LBB0_37
## %bb.36:
	movq	%r14, %rdi
	callq	_nvkm_sddr3_dll_reset
	movq	%r14, %rdi
	movl	$1000, %esi                     ## imm = 0x3E8
	callq	_ram_nsec
LBB0_37:
	testl	%r13d, %r13d
	je	LBB0_41
## %bb.38:
	movq	_gpio2E@GOTPCREL(%rip), %r13
	movl	(%r13), %esi
	movq	%r14, %rdi
	callq	_ram_have
	testq	%rax, %rax
	je	LBB0_41
## %bb.39:
	movl	(%r13), %esi
	movq	(%r14), %rax
	movl	(%rax), %ecx
	movq	%r14, %rdi
	movl	$12288, %edx                    ## imm = 0x3000
	callq	_ram_mask
	movl	%eax, %r15d
	movl	(%r13), %esi
	movq	%r14, %rdi
	callq	_ram_rd32
	cmpl	%eax, %r15d
	je	LBB0_41
## %bb.40:
	movq	_gpiotrig@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r14, %rdi
	movl	$1, %edx
	callq	_ram_wr32
	movq	%r14, %rdi
	movl	$20000, %esi                    ## imm = 0x4E20
	callq	_ram_nsec
LBB0_41:
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	cmpl	$2, 16(%rax)
	je	LBB0_43
## %bb.42:
	movq	%r14, %rdi
	movl	$1112112, %esi                  ## imm = 0x10F830
	movl	$16777216, %edx                 ## imm = 0x1000000
	movl	$16777216, %ecx                 ## imm = 0x1000000
	callq	_ram_mask
	movq	%r14, %rdi
	movl	$1112112, %esi                  ## imm = 0x10F830
	movl	$16777216, %edx                 ## imm = 0x1000000
	xorl	%ecx, %ecx
	callq	_ram_mask
LBB0_43:
	movq	%r14, %rdi
	movl	$1110528, %esi                  ## imm = 0x10F200
	movl	$-2147483648, %edx              ## imm = 0x80000000
	movl	$-2147483648, %ecx              ## imm = 0x80000000
	callq	_ram_mask
	movq	%r14, %rdi
	movl	$1110808, %esi                  ## imm = 0x10F318
	movl	$1, %edx
	callq	_ram_wr32
	movq	%r14, %rdi
	movl	$1110528, %esi                  ## imm = 0x10F200
	movl	$-2147483648, %edx              ## imm = 0x80000000
	xorl	%ecx, %ecx
	callq	_ram_mask
	movq	%r14, %rdi
	movl	$1000, %esi                     ## imm = 0x3E8
	callq	_ram_nsec
	movq	%r14, %rdi
	callq	_ram_unblock
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	movq	32(%rax), %rax
	movl	(%rax), %edi
	movq	_NVKM_ENGINE_DISP@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_nvkm_device_engine
	testq	%rax, %rax
	je	LBB0_45
## %bb.44:
	movq	%r14, %rdi
	movl	$6471680, %esi                  ## imm = 0x62C000
	movl	$252645120, %edx                ## imm = 0xF0F0F00
	callq	_ram_wr32
LBB0_45:
	xorl	%ecx, %ecx
	cmpq	$0, 40(%r12)
	setne	%cl
	shll	$11, %ecx
	movq	%r14, %rdi
	movl	$1110528, %esi                  ## imm = 0x10F200
	movl	$2048, %edx                     ## imm = 0x800
	callq	_ram_mask
	xorl	%eax, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
	.p2align	2, 0x90
	.data_region jt32
.set L0_0_set_17, LBB0_17-LJTI0_0
.set L0_0_set_16, LBB0_16-LJTI0_0
.set L0_0_set_15, LBB0_15-LJTI0_0
.set L0_0_set_14, LBB0_14-LJTI0_0
LJTI0_0:
	.long	L0_0_set_17
	.long	L0_0_set_16
	.long	L0_0_set_15
	.long	L0_0_set_14
	.end_data_region
                                        ## -- End function
	.comm	_NVKM_ENGINE_DISP,4,2           ## @NVKM_ENGINE_DISP
	.comm	_gpio2E,4,2                     ## @gpio2E
	.comm	_gpiotrig,4,2                   ## @gpiotrig
	.comm	_gpioMV,4,2                     ## @gpioMV
	.comm	_mr,8,3                         ## @mr
	.no_dead_strip	_gk104_ram_calc_sddr3
	.section	__TEXT,__literal16,16byte_literals
	.p2align	2                               ## @switch.table.gk104_ram_calc_sddr3
L_switch.table.gk104_ram_calc_sddr3:
	.long	2148074464                      ## 0x800903e0
	.long	591840                          ## 0x907e0
	.long	2148075232                      ## 0x800906e0
	.long	2148075424                      ## 0x800907a0

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function gk104_ram_calc_sddr3
_gk104_ram_calc_sddr3:                  ; @gk104_ram_calc_sddr3
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	stp	x28, x27, [sp, #16]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #32]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #48]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #64]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #80]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #96]             ; 16-byte Folded Spill
	add	x29, sp, #96
	.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
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	mov	x20, x0
	mov	w27, #61952
	movk	w27, #16, lsl #16
	add	x19, x0, #48
	ldp	w24, w26, [x0]
	ldp	w23, w22, [x0, #8]
	ldr	x25, [x0, #40]
	ldp	w8, w21, [x25, #136]
	str	w8, [sp, #8]                    ; 4-byte Folded Spill
	add	w1, w27, #1544
	mov	x0, x19
	mov	w2, #1073741824
	mov	w3, #1073741824
	bl	_ram_mask
	mov	x0, x19
	bl	_ram_block
	ldr	x8, [x20, #32]
	ldr	w0, [x8]
Lloh0:
	adrp	x8, _NVKM_ENGINE_DISP@GOTPAGE
Lloh1:
	ldr	x8, [x8, _NVKM_ENGINE_DISP@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	bl	_nvkm_device_engine
	cbz	x0, LBB0_2
; %bb.1:
	mov	x0, x19
	mov	w1, #49152
	movk	w1, #98, lsl #16
	mov	w2, #252641280
	bl	_ram_wr32
LBB0_2:
	str	w21, [sp, #12]                  ; 4-byte Folded Spill
	cbz	w21, LBB0_12
LBB0_3:
	mov	x0, x19
	mov	w1, #61952
	movk	w1, #16, lsl #16
	mov	w2, #2048
	mov	w3, #0
	bl	_ram_mask
	ldr	x8, [x25, #72]
	cbz	x8, LBB0_5
; %bb.4:
	add	w1, w27, #1544
	mov	x0, x19
	mov	w2, #67108864
	mov	w3, #67108864
	bl	_ram_mask
LBB0_5:
	lsl	w21, w26, #8
	add	w1, w27, #276
	mov	x0, x19
	mov	w2, #1
	bl	_ram_wr32
	ldr	x8, [x25, #48]
	cbz	x8, LBB0_7
; %bb.6:
	mov	x0, x19
	bl	_nvkm_sddr3_dll_disable
LBB0_7:
	orr	w26, w21, w24, lsl #16
	mov	w24, #2016
	movk	w24, #32777, lsl #16
	add	w1, w27, #16
	mov	x0, x19
	mov	w2, #0
	bl	_ram_wr32
	add	w21, w27, #272
	mov	x0, x19
	mov	x1, x21
	mov	w2, #1
	bl	_ram_wr32
	mov	x0, x19
	mov	w1, #61952
	movk	w1, #16, lsl #16
	mov	w2, #-2147483648
	mov	w3, #-2147483648
	bl	_ram_mask
	mov	x0, x19
	mov	x1, x21
	mov	w2, #1
	bl	_ram_wr32
	mov	x0, x19
	mov	w1, #61952
	movk	w1, #16, lsl #16
	mov	w2, #-2147483648
	mov	w3, #0
	bl	_ram_mask
	mov	x0, x19
	mov	w1, #1000
	bl	_ram_nsec
	sub	w21, w27, #368
	mov	x0, x19
	mov	x1, x21
	mov	w2, #96
	bl	_ram_wr32
	mov	x0, x19
	mov	x1, x21
	mov	w2, #126
	movk	w2, #49152, lsl #16
	bl	_ram_wr32
	ldrsw	x8, [x25]
	mov	w3, #2016
	movk	w3, #32777, lsl #16
	cmp	w8, #3
	b.hi	LBB0_9
; %bb.8:
Lloh3:
	adrp	x9, l_switch.table.gk104_ram_calc_sddr3@PAGE
Lloh4:
	add	x9, x9, l_switch.table.gk104_ram_calc_sddr3@PAGEOFF
	ldr	w3, [x9, x8, lsl #2]
LBB0_9:
	orr	w23, w26, w23
	ldr	w8, [x25, #4]
	cmp	w8, #3
	b.hi	LBB0_19
; %bb.10:
Lloh5:
	adrp	x9, lJTI0_0@PAGE
Lloh6:
	add	x9, x9, lJTI0_0@PAGEOFF
	adr	x10, LBB0_11
	ldrb	w11, [x9, x8]
	add	x10, x10, x11, lsl #2
	br	x10
LBB0_11:
	sub	w8, w24, #512
	b	LBB0_18
LBB0_12:
Lloh7:
	adrp	x28, _gpio2E@GOTPAGE
Lloh8:
	ldr	x28, [x28, _gpio2E@GOTPAGEOFF]
	ldr	w1, [x28]
	mov	x0, x19
	bl	_ram_have
	cbz	x0, LBB0_3
; %bb.13:
	ldr	w1, [x28]
	ldr	x8, [x19]
	ldr	w3, [x8, #4]
	mov	x0, x19
	mov	w2, #12288
	bl	_ram_mask
	mov	x21, x0
	ldr	w1, [x28]
	mov	x0, x19
	bl	_ram_rd32
	cmp	w21, w0
	b.eq	LBB0_3
; %bb.14:
Lloh9:
	adrp	x8, _gpiotrig@GOTPAGE
Lloh10:
	ldr	x8, [x8, _gpiotrig@GOTPAGEOFF]
Lloh11:
	ldr	w1, [x8]
	mov	x0, x19
	mov	w2, #1
	bl	_ram_wr32
	mov	x0, x19
	mov	w1, #20000
	bl	_ram_nsec
	b	LBB0_3
LBB0_15:
	mov	w8, #2016
	movk	w8, #32769, lsl #16
	b	LBB0_18
LBB0_16:
	sub	w8, w24, #128
	b	LBB0_18
LBB0_17:
	sub	w8, w24, #32
LBB0_18:
	and	w3, w3, w8
LBB0_19:
	mov	w26, #29684
	movk	w26, #19, lsl #16
	mov	w28, #8224
	movk	w28, #19, lsl #16
	ldp	x9, x8, [x25, #112]
	cmp	x8, #0
	mov	w8, #2016
	movk	w8, #33545, lsl #16
	csel	w8, w24, w8, eq
	orr	w10, w8, #0x2000
	cmp	x9, #0
	csel	w8, w8, w10, eq
	ldp	x10, x9, [x25, #96]
	cmp	x9, #0
	orr	w9, w8, #0x4000
	csel	w8, w8, w9, eq
	cmp	x10, #0
	mov	w9, #3
	mov	w10, #335544320
	csel	w9, w10, w9, eq
	orr	w2, w8, w9
	add	w1, w27, #1572
	mov	x0, x19
	bl	_ram_mask
	add	w1, w28, #32
	mov	x0, x19
	mov	w2, #65536
	mov	w3, #0
	bl	_ram_mask
	mov	x0, x19
	mov	w1, #29684
	movk	w1, #19, lsl #16
	mov	w2, #0
	mov	w3, #16
	movk	w3, #1, lsl #16
	bl	_ram_mask
	sub	w24, w26, #8
	mov	x0, x19
	mov	x1, x24
	bl	_ram_rd32
	and	w8, w0, #0xfffcffff
	ldr	w9, [x25, #4]
	orr	w2, w8, w9, lsl #16
	mov	x0, x19
	mov	x1, x24
	bl	_ram_wr32
	mov	x0, x19
	mov	w1, #29684
	movk	w1, #19, lsl #16
	mov	w2, #3
	mov	w3, #0
	bl	_ram_mask
	mov	x0, x19
	mov	w1, #29684
	movk	w1, #19, lsl #16
	mov	w2, #16
	mov	w3, #0
	bl	_ram_mask
	orr	w1, w28, #0x4
	mov	x0, x19
	bl	_ram_rd32
	cmp	w0, w23
	b.ne	LBB0_21
; %bb.20:
	add	w1, w28, #20
	mov	x0, x19
	bl	_ram_rd32
	cmp	w22, w0, uxth
	b.eq	LBB0_22
LBB0_21:
	lsl	w24, w22, #16
	sub	w1, w28, #32
	mov	x0, x19
	mov	w2, #1
	mov	w3, #0
	bl	_ram_mask
	mov	x0, x19
	mov	w1, #8224
	movk	w1, #19, lsl #16
	mov	w2, #1
	mov	w3, #0
	bl	_ram_mask
	sub	w1, w26, #212
	mov	x0, x19
	mov	w2, #0
	bl	_ram_wr32
	add	w1, w28, #16
	mov	x0, x19
	mov	w2, #-65536
	mov	x3, x24
	bl	_ram_mask
	add	w1, w28, #20
	mov	x0, x19
	mov	w2, #65535
	mov	x3, x22
	bl	_ram_mask
	add	w1, w28, #4
	mov	x0, x19
	mov	x2, x23
	bl	_ram_wr32
	add	w22, w28, #8
	mov	x0, x19
	mov	x1, x22
	mov	w2, #524288
	mov	w3, #524288
	bl	_ram_mask
	mov	x0, x19
	mov	w1, #8224
	movk	w1, #19, lsl #16
	mov	w2, #1
	mov	w3, #1
	bl	_ram_mask
	sub	w1, w26, #100
	mov	x0, x19
	mov	w2, #131072
	mov	w3, #131072
	mov	w4, #64000
	bl	_ram_wait
	mov	x0, x19
	mov	x1, x22
	mov	w2, #524288
	mov	w3, #0
	bl	_ram_mask
LBB0_22:
	mov	x0, x19
	mov	w1, #29684
	movk	w1, #19, lsl #16
	mov	w2, #16
	mov	w3, #16
	bl	_ram_mask
	mov	x0, x19
	mov	w1, #29684
	movk	w1, #19, lsl #16
	mov	w2, #3
	mov	w3, #1
	bl	_ram_mask
	mov	x0, x19
	mov	w1, #29684
	movk	w1, #19, lsl #16
	mov	w2, #65536
	mov	w3, #0
	bl	_ram_mask
Lloh12:
	adrp	x23, _gpioMV@GOTPAGE
Lloh13:
	ldr	x23, [x23, _gpioMV@GOTPAGEOFF]
	ldr	w1, [x23]
	mov	x0, x19
	bl	_ram_have
	cbz	x0, LBB0_25
; %bb.23:
	ldr	w8, [sp, #8]                    ; 4-byte Folded Reload
	cmp	w8, #0
	cset	w8, eq
	ldr	w1, [x23]
	ldr	x9, [x20, #56]
	ldr	w3, [x9, w8, uxtw #2]
	mov	x0, x19
	mov	w2, #12288
	bl	_ram_mask
	mov	x22, x0
	ldr	w1, [x23]
	mov	x0, x19
	bl	_ram_rd32
	cmp	w22, w0
	b.eq	LBB0_25
; %bb.24:
Lloh14:
	adrp	x8, _gpiotrig@GOTPAGE
Lloh15:
	ldr	x8, [x8, _gpiotrig@GOTPAGEOFF]
Lloh16:
	ldr	w1, [x8]
	mov	x0, x19
	mov	w2, #1
	bl	_ram_wr32
	mov	x0, x19
	mov	w1, #64000
	bl	_ram_nsec
LBB0_25:
	ldr	x8, [x25, #112]
	cbnz	x8, LBB0_27
; %bb.26:
	ldr	x8, [x25, #104]
	cbz	x8, LBB0_28
LBB0_27:
	add	w1, w28, #32
	mov	x0, x19
	mov	w2, #65536
	mov	w3, #65536
	bl	_ram_mask
	mov	x0, x19
	mov	w1, #20000
	bl	_ram_nsec
LBB0_28:
	ldr	w8, [x20, #16]
	cmp	w8, #2
	b.eq	LBB0_31
; %bb.29:
	ldr	x8, [x25, #128]
	cbz	x8, LBB0_31
; %bb.30:
	add	w1, w27, #1136
	mov	x0, x19
	mov	w2, #-2147483648
	mov	w3, #-2147483648
	bl	_ram_mask
LBB0_31:
	ldr	w8, [x25, #8]
	add	w2, w8, w8, lsl #4
	add	w1, w27, #1116
	mov	x0, x19
	bl	_ram_wr32
	ldr	w8, [x25, #12]
	mov	w22, #16843009
	mul	w2, w8, w22
	add	w1, w27, #1208
	mov	x0, x19
	bl	_ram_wr32
	ldr	w8, [x25, #12]
	mul	w2, w8, w22
	add	w1, w27, #1212
	mov	x0, x19
	bl	_ram_wr32
	ldp	x9, x8, [x25, #112]
	cmp	x8, #0
	mov	w8, #50331648
	csel	w8, w8, wzr, eq
	orr	w10, w8, #0x2000
	cmp	x9, #0
	csel	w8, w10, w8, eq
	ldp	x10, x9, [x25, #96]
	cmp	x9, #0
	orr	w9, w8, #0x4000
	csel	w8, w9, w8, eq
	cmp	x10, #0
	mov	w9, #335544320
	mov	w10, #3
	csel	w9, w10, w9, eq
	orr	w3, w8, w9
	add	w1, w27, #1572
	mov	x0, x19
	mov	w2, #65536
	bl	_ram_mask
	mov	x0, x19
	mov	w1, #1000
	bl	_ram_nsec
	ldr	x8, [x25, #88]
	cmp	x8, #0
	cset	w8, ne
	lsl	w3, w8, #20
	add	w1, w27, #1580
	mov	x0, x19
	mov	w2, #1048576
	bl	_ram_mask
	ldr	x8, [x25, #16]
	ldr	w3, [x8, #40]
	add	w1, w27, #72
	mov	x0, x19
	mov	w2, #-1
	bl	_ram_mask
	ldr	x8, [x25, #16]
	ldr	w3, [x8]
	add	w1, w27, #144
	mov	x0, x19
	mov	w2, #-1
	bl	_ram_mask
	ldr	x8, [x25, #16]
	ldr	w3, [x8, #4]
	add	w1, w27, #148
	mov	x0, x19
	mov	w2, #-1
	bl	_ram_mask
	ldr	x8, [x25, #16]
	ldr	w3, [x8, #8]
	add	w1, w27, #152
	mov	x0, x19
	mov	w2, #-1
	bl	_ram_mask
	ldr	x8, [x25, #16]
	ldr	w3, [x8, #12]
	add	w1, w27, #156
	mov	x0, x19
	mov	w2, #-1
	bl	_ram_mask
	ldr	x8, [x25, #16]
	ldr	w3, [x8, #16]
	add	w1, w27, #160
	mov	x0, x19
	mov	w2, #-1
	bl	_ram_mask
	ldr	x8, [x25, #16]
	ldr	w3, [x8, #20]
	add	w1, w27, #164
	mov	x0, x19
	mov	w2, #-1
	bl	_ram_mask
	ldr	x8, [x25, #16]
	ldr	w3, [x8, #24]
	add	w1, w27, #168
	mov	x0, x19
	mov	w2, #-1
	bl	_ram_mask
	ldr	x8, [x25, #16]
	ldr	w3, [x8, #28]
	add	w1, w27, #172
	mov	x0, x19
	mov	w2, #-1
	bl	_ram_mask
	ldr	x8, [x25, #16]
	ldr	w3, [x8, #32]
	add	w1, w27, #204
	mov	x0, x19
	mov	w2, #-1
	bl	_ram_mask
	ldr	x8, [x25, #16]
	ldr	w3, [x8, #36]
	add	w1, w27, #232
	mov	x0, x19
	mov	w2, #-1
	bl	_ram_mask
	ldr	w8, [x25, #80]
	mov	w9, #538968064
	cmp	w8, #0
	csel	w9, w9, wzr, eq
	ldr	w10, [x25, #56]
	mov	w8, #310378496
	orr	w11, w9, w8
	cmp	w10, #0
	csel	w8, w11, w9, eq
	ldr	x12, [x25, #72]
	ldr	w22, [sp, #12]                  ; 4-byte Folded Reload
	cbz	x12, LBB0_33
; %bb.32:
	ldr	x12, [x25, #64]
	orr	w9, w9, #0x20
	cmp	w10, #0
	csel	w9, w11, w9, eq
	mov	w10, #4
	movk	w10, #15344, lsl #16
	orr	w11, w10, #0x20
	csel	w10, w11, w10, eq
	cmp	x12, #0
	csel	w8, w8, w9, eq
	mov	w9, #871366656
	csel	w2, w9, w10, eq
	orr	w3, w8, #0x4000000
	b	LBB0_34
LBB0_33:
	mov	w9, #4
	movk	w9, #2048, lsl #16
	orr	w3, w8, w9
	mov	w2, #32
	movk	w2, #30704, lsl #16
LBB0_34:
	add	w1, w27, #1544
	mov	x0, x19
	bl	_ram_mask
	ldr	w8, [x25, #24]
	mov	w9, #286331153
	mul	w2, w8, w9
	add	w1, w27, #1648
	mov	x0, x19
	bl	_ram_wr32
	ldr	w8, [x25, #28]
	lsl	w3, w8, #4
	add	w1, w27, #80
	mov	x0, x19
	mov	w2, #1008
	bl	_ram_mask
	ldr	x8, [x25, #16]
	ldrb	w8, [x8, #43]
	and	w8, w8, #0x7f
	ldr	w9, [x25, #32]
	cmp	w8, w9
	csel	w8, w8, w9, gt
	lsl	w3, w8, #24
	add	w1, w27, #76
	mov	x0, x19
	mov	w2, #2130706432
	bl	_ram_mask
	ldr	w8, [x25, #36]
	lsl	w3, w8, #16
	add	w1, w27, #36
	mov	x0, x19
	mov	w2, #2031616
	bl	_ram_mask
	mov	x0, x19
	mov	x1, x21
	mov	w2, #127
	movk	w2, #16384, lsl #16
	bl	_ram_wr32
	mov	x0, x19
	mov	w1, #1000
	bl	_ram_nsec
	add	w1, w27, #276
	mov	x0, x19
	mov	w2, #1
	bl	_ram_wr32
	add	w1, w27, #272
	mov	x0, x19
	mov	w2, #1
	bl	_ram_wr32
	add	w1, w27, #16
	mov	x0, x19
	mov	w2, #-2147483648
	bl	_ram_wr32
	mov	x0, x19
	mov	w1, #1000
	bl	_ram_nsec
	ldr	x8, [x25, #48]
Lloh17:
	adrp	x21, _mr@GOTPAGE
Lloh18:
	ldr	x21, [x21, _mr@GOTPAGEOFF]
	cbnz	x8, LBB0_36
; %bb.35:
	ldr	x8, [x21]
	ldr	w1, [x8, #4]
	mov	x0, x19
	mov	w2, #1
	mov	w3, #0
	bl	_ram_mask
	mov	x0, x19
	bl	_nvkm_sddr3_dll_reset
LBB0_36:
	ldr	x8, [x21]
	ldr	w1, [x8, #8]
	ldr	x8, [x20, #24]
	ldr	w3, [x8, #8]
	mov	x0, x19
	mov	w2, #4095
	bl	_ram_mask
	ldr	x8, [x21]
	ldr	w1, [x8, #4]
	ldr	x8, [x20, #24]
	ldr	w3, [x8, #4]
	mov	x0, x19
	mov	w2, #-1
	bl	_ram_mask
	ldr	x8, [x21]
	ldr	w1, [x8]
	ldr	x8, [x20, #24]
	ldr	w2, [x8]
	mov	x0, x19
	bl	_ram_wr32
	mov	x0, x19
	mov	w1, #1000
	bl	_ram_nsec
	ldr	x8, [x25, #48]
	cbnz	x8, LBB0_38
; %bb.37:
	mov	x0, x19
	bl	_nvkm_sddr3_dll_reset
	mov	x0, x19
	mov	w1, #1000
	bl	_ram_nsec
LBB0_38:
	cbz	w22, LBB0_42
; %bb.39:
Lloh19:
	adrp	x22, _gpio2E@GOTPAGE
Lloh20:
	ldr	x22, [x22, _gpio2E@GOTPAGEOFF]
	ldr	w1, [x22]
	mov	x0, x19
	bl	_ram_have
	cbz	x0, LBB0_42
; %bb.40:
	ldr	w1, [x22]
	ldr	x8, [x19]
	ldr	w3, [x8]
	mov	x0, x19
	mov	w2, #12288
	bl	_ram_mask
	mov	x21, x0
	ldr	w1, [x22]
	mov	x0, x19
	bl	_ram_rd32
	cmp	w21, w0
	b.eq	LBB0_42
; %bb.41:
Lloh21:
	adrp	x8, _gpiotrig@GOTPAGE
Lloh22:
	ldr	x8, [x8, _gpiotrig@GOTPAGEOFF]
Lloh23:
	ldr	w1, [x8]
	mov	x0, x19
	mov	w2, #1
	bl	_ram_wr32
	mov	x0, x19
	mov	w1, #20000
	bl	_ram_nsec
LBB0_42:
	ldr	w8, [x20, #16]
	cmp	w8, #2
	b.eq	LBB0_44
; %bb.43:
	add	w21, w27, #1584
	mov	x0, x19
	mov	x1, x21
	mov	w2, #16777216
	mov	w3, #16777216
	bl	_ram_mask
	mov	x0, x19
	mov	x1, x21
	mov	w2, #16777216
	mov	w3, #0
	bl	_ram_mask
LBB0_44:
	mov	x0, x19
	mov	w1, #61952
	movk	w1, #16, lsl #16
	mov	w2, #-2147483648
	mov	w3, #-2147483648
	bl	_ram_mask
	add	w1, w27, #280
	mov	x0, x19
	mov	w2, #1
	bl	_ram_wr32
	mov	x0, x19
	mov	w1, #61952
	movk	w1, #16, lsl #16
	mov	w2, #-2147483648
	mov	w3, #0
	bl	_ram_mask
	mov	x0, x19
	mov	w1, #1000
	bl	_ram_nsec
	mov	x0, x19
	bl	_ram_unblock
	ldr	x8, [x20, #32]
	ldr	w0, [x8]
Lloh24:
	adrp	x8, _NVKM_ENGINE_DISP@GOTPAGE
Lloh25:
	ldr	x8, [x8, _NVKM_ENGINE_DISP@GOTPAGEOFF]
Lloh26:
	ldr	w1, [x8]
	bl	_nvkm_device_engine
	cbz	x0, LBB0_46
; %bb.45:
	mov	x0, x19
	mov	w1, #49152
	movk	w1, #98, lsl #16
	mov	w2, #3840
	movk	w2, #3855, lsl #16
	bl	_ram_wr32
LBB0_46:
	ldr	x8, [x25, #40]
	cmp	x8, #0
	cset	w8, ne
	lsl	w3, w8, #11
	mov	x0, x19
	mov	w1, #61952
	movk	w1, #16, lsl #16
	mov	w2, #2048
	bl	_ram_mask
	mov	w0, #0
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #48]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #32]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #112
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGot	Lloh17, Lloh18
	.loh AdrpLdrGot	Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh26
	.cfi_endproc
	.section	__TEXT,__const
lJTI0_0:
	.byte	(LBB0_11-LBB0_11)>>2
	.byte	(LBB0_15-LBB0_11)>>2
	.byte	(LBB0_16-LBB0_11)>>2
	.byte	(LBB0_17-LBB0_11)>>2
                                        ; -- End function
	.comm	_NVKM_ENGINE_DISP,4,2           ; @NVKM_ENGINE_DISP
	.comm	_gpio2E,4,2                     ; @gpio2E
	.comm	_gpiotrig,4,2                   ; @gpiotrig
	.comm	_gpioMV,4,2                     ; @gpioMV
	.comm	_mr,8,3                         ; @mr
	.no_dead_strip	_gk104_ram_calc_sddr3
	.section	__TEXT,__literal16,16byte_literals
	.p2align	2                               ; @switch.table.gk104_ram_calc_sddr3
l_switch.table.gk104_ram_calc_sddr3:
	.long	2148074464                      ; 0x800903e0
	.long	591840                          ; 0x907e0
	.long	2148075232                      ; 0x800906e0
	.long	2148075424                      ; 0x800907a0

.subsections_via_symbols
