	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function gk104_ram_calc_gddr5
_gk104_ram_calc_gddr5:                  ## @gk104_ram_calc_gddr5
	.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
	movq	%rdi, %r14
	leaq	88(%rdi), %r12
	movq	32(%rdi), %r13
	movl	264(%r13), %eax
	movl	%eax, -44(%rbp)                 ## 4-byte Spill
	movl	268(%r13), %ebx
	movq	%r12, %rdi
	movl	$1112072, %esi                  ## imm = 0x10F808
	movl	$1073741824, %edx               ## imm = 0x40000000
	movl	$1073741824, %ecx               ## imm = 0x40000000
	callq	_ram_mask
	movq	%r12, %rdi
	callq	_ram_block
	movq	24(%r14), %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	%r12, %rdi
	movl	$6471680, %esi                  ## imm = 0x62C000
	movl	$252641280, %edx                ## imm = 0xF0F0000
	callq	_ram_wr32
LBB0_2:
	movq	8(%r14), %rax
	movl	4(%rax), %ecx
	andl	$60, %ecx
	cmpl	$48, %ecx
	je	LBB0_4
## %bb.3:
	movq	_mr@GOTPCREL(%rip), %r15
	movq	(%r15), %rax
	movl	4(%rax), %esi
	movq	%r12, %rdi
	movl	$60, %edx
	callq	_ram_mask
	movq	(%r15), %rax
	movl	4(%rax), %esi
	movl	16(%r14), %ecx
	andl	$60, %ecx
	movq	%r14, %rdi
	movl	$60, %edx
	xorl	%r8d, %r8d
	callq	_ram_nuts
LBB0_4:
	movl	%ebx, -48(%rbp)                 ## 4-byte Spill
	testl	%ebx, %ebx
	je	LBB0_5
LBB0_8:
	movq	%r12, %rdi
	movl	$1110528, %esi                  ## imm = 0x10F200
	movl	$2048, %edx                     ## imm = 0x800
	xorl	%ecx, %ecx
	callq	_ram_mask
	movq	%r12, %rdi
	movl	$16908288, %esi                 ## imm = 0x1020000
	movl	$786432, %edx                   ## imm = 0xC0000
	callq	_gk104_ram_train
	movq	%r12, %rdi
	movl	$1110544, %esi                  ## imm = 0x10F210
	xorl	%edx, %edx
	callq	_ram_wr32
	movq	%r12, %rdi
	movl	$1000, %esi                     ## imm = 0x3E8
	callq	_ram_nsec
	movq	%r12, %rdi
	movl	$1110800, %esi                  ## imm = 0x10F310
	movl	$1, %edx
	callq	_ram_wr32
	movq	%r12, %rdi
	movl	$1000, %esi                     ## imm = 0x3E8
	callq	_ram_nsec
	movq	%r12, %rdi
	movl	$1110528, %esi                  ## imm = 0x10F200
	movl	$-2147483648, %edx              ## imm = 0x80000000
	movl	$-2147483648, %ecx              ## imm = 0x80000000
	callq	_ram_mask
	movq	%r12, %rdi
	movl	$1110804, %esi                  ## imm = 0x10F314
	movl	$1, %edx
	callq	_ram_wr32
	movq	%r12, %rdi
	movl	$1110528, %esi                  ## imm = 0x10F200
	movl	$-2147483648, %edx              ## imm = 0x80000000
	xorl	%ecx, %ecx
	callq	_ram_mask
	movq	%r12, %rdi
	movl	$1110160, %esi                  ## imm = 0x10F090
	movl	$97, %edx
	callq	_ram_wr32
	movq	%r12, %rdi
	movl	$1110160, %esi                  ## imm = 0x10F090
	movl	$-1073741697, %edx              ## imm = 0xC000007F
	callq	_ram_wr32
	movq	%r12, %rdi
	movl	$1000, %esi                     ## imm = 0x3E8
	callq	_ram_nsec
	movq	%r12, %rdi
	movl	$1111704, %esi                  ## imm = 0x10F698
	xorl	%edx, %edx
	callq	_ram_wr32
	movq	%r12, %rdi
	movl	$1111708, %esi                  ## imm = 0x10F69C
	xorl	%edx, %edx
	callq	_ram_wr32
	movq	%r12, %rdi
	movl	$1112440, %esi                  ## imm = 0x10F978
	callq	_ram_rd32
	movl	%eax, %r15d
	andl	$8388608, %r15d                 ## imm = 0x800000
	shrl	$5, %r15d
	orl	$-2146760736, %r15d             ## imm = 0x800B07E0
	movl	(%r13), %eax
	cmpq	$3, %rax
	ja	LBB0_14
## %bb.9:
	leaq	LJTI0_0(%rip), %rcx
	movslq	(%rcx,%rax,4), %rax
	addq	%rcx, %rax
	jmpq	*%rax
LBB0_13:
	andl	$-2146499616, %r15d             ## imm = 0x800F03E0
	jmp	LBB0_14
LBB0_5:
	movq	_gpio2E@GOTPCREL(%rip), %r15
	movl	(%r15), %esi
	movq	%r12, %rdi
	callq	_ram_have
	testq	%rax, %rax
	je	LBB0_8
## %bb.6:
	movl	(%r15), %esi
	movq	(%r12), %rax
	movl	4(%rax), %ecx
	movq	%r12, %rdi
	movl	$12288, %edx                    ## imm = 0x3000
	callq	_ram_mask
	movl	%eax, %ebx
	movl	(%r15), %esi
	movq	%r12, %rdi
	callq	_ram_rd32
	cmpl	%eax, %ebx
	je	LBB0_8
## %bb.7:
	movq	_gpiotrig@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r12, %rdi
	movl	$1, %edx
	callq	_ram_wr32
	movq	%r12, %rdi
	movl	$20000, %esi                    ## imm = 0x4E20
	callq	_ram_nsec
	jmp	LBB0_8
LBB0_12:
	andl	$985056, %r15d                  ## imm = 0xF07E0
	jmp	LBB0_14
LBB0_11:
	andl	$-2146498848, %r15d             ## imm = 0x800F06E0
	jmp	LBB0_14
LBB0_10:
	andl	$-2146498656, %r15d             ## imm = 0x800F07A0
LBB0_14:
	movl	4(%r13), %eax
	cmpq	$3, %rax
	ja	LBB0_20
## %bb.15:
	leaq	LJTI0_1(%rip), %rcx
	movslq	(%rcx,%rax,4), %rax
	addq	%rcx, %rax
	jmpq	*%rax
LBB0_19:
	andl	$-2146499104, %r15d             ## imm = 0x800F05E0
	jmp	LBB0_20
LBB0_18:
	andl	$-2147022880, %r15d             ## imm = 0x800707E0
	jmp	LBB0_20
LBB0_17:
	andl	$-2146498720, %r15d             ## imm = 0x800F0760
	jmp	LBB0_20
LBB0_16:
	andl	$-2146498624, %r15d             ## imm = 0x800F07C0
LBB0_20:
	cmpq	$0, 248(%r13)
	movl	$-2146498592, %eax              ## imm = 0x800F07E0
	movl	$-2096166944, %ecx              ## imm = 0x830F07E0
	cmovel	%eax, %ecx
	leal	8192(%rcx), %eax
	cmpq	$0, 240(%r13)
	cmovel	%ecx, %eax
	leal	16384(%rax), %ebx
	cmpq	$0, 232(%r13)
	cmovel	%eax, %ebx
	cmpq	$0, 112(%r13)
	je	LBB0_22
## %bb.21:
	orl	$3, %ebx
	jmp	LBB0_23
LBB0_22:
	movq	%r12, %rdi
	movl	$1112440, %esi                  ## imm = 0x10F978
	callq	_ram_rd32
	andl	$8388608, %eax                  ## imm = 0x800000
	shll	$7, %eax
	orl	%ebx, %eax
	orl	$872415232, %eax                ## imm = 0x34000000
	movl	%eax, %ebx
LBB0_23:
	movq	%r12, %rdi
	movl	$1112100, %esi                  ## imm = 0x10F824
	movl	%ebx, %edx
	movl	%r15d, %ecx
	callq	_ram_mask
	movq	%r12, %rdi
	movl	$1253440, %esi                  ## imm = 0x132040
	movl	$65536, %edx                    ## imm = 0x10000
	xorl	%ecx, %ecx
	callq	_ram_mask
	movl	4(%r14), %eax
	cmpl	$2, (%r14)
	jne	LBB0_26
## %bb.24:
	cmpl	$2, %eax
	je	LBB0_28
## %bb.25:
	movq	%r12, %rdi
	movl	$1112072, %esi                  ## imm = 0x10F808
	movl	$524288, %edx                   ## imm = 0x80000
	xorl	%ecx, %ecx
	callq	_ram_mask
	movq	%r12, %rdi
	movl	$1110528, %esi                  ## imm = 0x10F200
	movl	$402685952, %edx                ## imm = 0x18008000
	movl	$32768, %ecx                    ## imm = 0x8000
	callq	_ram_mask
	movq	%r12, %rdi
	movl	$1112064, %esi                  ## imm = 0x10F800
	xorl	%edx, %edx
	movl	$4, %ecx
	callq	_ram_mask
	movq	%r12, %rdi
	movl	$1112112, %esi                  ## imm = 0x10F830
	movl	$32768, %edx                    ## imm = 0x8000
	movl	$17039376, %ecx                 ## imm = 0x1040010
	callq	_ram_mask
	movq	%r12, %rdi
	movl	$1112112, %esi                  ## imm = 0x10F830
	movl	$16777216, %edx                 ## imm = 0x1000000
	xorl	%ecx, %ecx
	callq	_ram_mask
	movq	%r12, %rdi
	callq	_r1373f4_init
	movq	%r12, %rdi
	movl	$1274864, %esi                  ## imm = 0x1373F0
	movl	$2, %edx
	movl	$1, %ecx
	callq	_ram_mask
	movq	%r12, %rdi
	callq	_r1373f4_fini
	movq	%r12, %rdi
	movl	$1112112, %esi                  ## imm = 0x10F830
	movl	$12582912, %edx                 ## imm = 0xC00000
	movl	$2359297, %ecx                  ## imm = 0x240001
	callq	_ram_mask
	jmp	LBB0_28
LBB0_26:
	cmpl	$2, %eax
	je	LBB0_28
## %bb.27:
	movq	%r12, %rdi
	callq	_r1373f4_init
	movq	%r12, %rdi
	callq	_r1373f4_fini
LBB0_28:
	movq	_gpioMV@GOTPCREL(%rip), %r15
	movl	(%r15), %esi
	movq	%r12, %rdi
	callq	_ram_have
	testq	%rax, %rax
	je	LBB0_31
## %bb.29:
	xorl	%eax, %eax
	cmpl	$0, -44(%rbp)                   ## 4-byte Folded Reload
	sete	%al
	movl	(%r15), %esi
	movq	96(%r14), %rcx
	movl	(%rcx,%rax,4), %ecx
	movq	%r12, %rdi
	movl	$12288, %edx                    ## imm = 0x3000
	callq	_ram_mask
	movl	%eax, %ebx
	movl	(%r15), %esi
	movq	%r12, %rdi
	callq	_ram_rd32
	cmpl	%eax, %ebx
	je	LBB0_31
## %bb.30:
	movq	_gpiotrig@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r12, %rdi
	movl	$1, %edx
	callq	_ram_wr32
	movq	%r12, %rdi
	movl	$64000, %esi                    ## imm = 0xFA00
	callq	_ram_nsec
LBB0_31:
	cmpq	$0, 240(%r13)
	jne	LBB0_33
## %bb.32:
	cmpq	$0, 232(%r13)
	je	LBB0_34
LBB0_33:
	movq	%r12, %rdi
	movl	$1253440, %esi                  ## imm = 0x132040
	movl	$65536, %edx                    ## imm = 0x10000
	movl	$65536, %ecx                    ## imm = 0x10000
	callq	_ram_mask
	movq	%r12, %rdi
	movl	$20000, %esi                    ## imm = 0x4E20
	callq	_ram_nsec
LBB0_34:
	movl	4(%r14), %eax
	cmpl	$2, (%r14)
	jne	LBB0_35
## %bb.37:
	cmpl	$2, %eax
	jne	LBB0_39
## %bb.38:
	movq	%r12, %rdi
	movl	$1112064, %esi                  ## imm = 0x10F800
	movl	$4, %edx
	xorl	%ecx, %ecx
	callq	_ram_mask
	movq	%r12, %rdi
	callq	_r1373f4_init
	movq	%r12, %rdi
	callq	_r1373f4_fini
	jmp	LBB0_39
LBB0_35:
	cmpl	$2, %eax
	jne	LBB0_39
## %bb.36:
	movq	%r12, %rdi
	movl	$1112064, %esi                  ## imm = 0x10F800
	movl	$4, %edx
	xorl	%ecx, %ecx
	callq	_ram_mask
	movq	%r12, %rdi
	movl	$1274864, %esi                  ## imm = 0x1373F0
	xorl	%edx, %edx
	movl	$2, %ecx
	callq	_ram_mask
	movq	%r12, %rdi
	movl	$1112112, %esi                  ## imm = 0x10F830
	movl	$8388609, %edx                  ## imm = 0x800001
	movl	$4227088, %ecx                  ## imm = 0x408010
	callq	_ram_mask
	movq	%r12, %rdi
	callq	_r1373f4_init
	movq	%r12, %rdi
	callq	_r1373f4_fini
	movq	%r12, %rdi
	movl	$1112072, %esi                  ## imm = 0x10F808
	xorl	%edx, %edx
	movl	$524288, %ecx                   ## imm = 0x80000
	callq	_ram_mask
	movq	%r12, %rdi
	movl	$1110528, %esi                  ## imm = 0x10F200
	movl	$8421376, %edx                  ## imm = 0x808000
	movl	$8388608, %ecx                  ## imm = 0x800000
	callq	_ram_mask
LBB0_39:
	cmpl	$2, 4(%r14)
	je	LBB0_42
## %bb.40:
	cmpq	$0, 256(%r13)
	je	LBB0_42
## %bb.41:
	movq	%r12, %rdi
	movl	$1111664, %esi                  ## imm = 0x10F670
	movl	$-2147483648, %edx              ## imm = 0x80000000
	movl	$-2147483648, %ecx              ## imm = 0x80000000
	callq	_ram_mask
LBB0_42:
	movl	8(%r13), %eax
	movl	%eax, %edx
	shll	$4, %edx
	addl	%eax, %edx
	movq	%r12, %rdi
	movl	$1111644, %esi                  ## imm = 0x10F65C
	callq	_ram_wr32
	imull	$16843009, 12(%r13), %edx       ## imm = 0x1010101
	movq	%r12, %rdi
	movl	$1111736, %esi                  ## imm = 0x10F6B8
	callq	_ram_wr32
	imull	$16843009, 12(%r13), %edx       ## imm = 0x1010101
	movq	%r12, %rdi
	movl	$1111740, %esi                  ## imm = 0x10F6BC
	callq	_ram_wr32
	cmpq	$0, 112(%r13)
	je	LBB0_43
## %bb.47:
	cmpl	$2, 4(%r14)
	jne	LBB0_48
	jmp	LBB0_49
LBB0_43:
	cmpq	$0, 104(%r13)
	je	LBB0_44
## %bb.45:
	xorl	%ebx, %ebx
	movq	%r12, %rdi
	movl	$1111704, %esi                  ## imm = 0x10F698
	xorl	%edx, %edx
	callq	_ram_wr32
	jmp	LBB0_46
LBB0_44:
	imull	$16843009, 16(%r13), %edx       ## imm = 0x1010101
	movq	%r12, %rdi
	movl	$1111704, %esi                  ## imm = 0x10F698
	callq	_ram_wr32
	imull	$16843009, 16(%r13), %ebx       ## imm = 0x1010101
LBB0_46:
	movq	%r12, %rdi
	movl	$1111708, %esi                  ## imm = 0x10F69C
	movl	%ebx, %edx
	callq	_ram_wr32
	cmpl	$2, 4(%r14)
	je	LBB0_49
LBB0_48:
	imull	$16777472, 16(%r13), %ebx       ## imm = 0x1000100
	movq	%r12, %rdi
	movl	$1111700, %esi                  ## imm = 0x10F694
	callq	_ram_nuke
	movq	%r12, %rdi
	movl	$1111700, %esi                  ## imm = 0x10F694
	movl	$-16711936, %edx                ## imm = 0xFF00FF00
	movl	%ebx, %ecx
	callq	_ram_mask
	cmpl	$2, 4(%r14)
	jne	LBB0_50
LBB0_49:
	movl	$128, %ecx
	cmpq	$0, 120(%r13)
	jne	LBB0_51
LBB0_50:
	xorl	%ecx, %ecx
LBB0_51:
	movq	%r12, %rdi
	movl	$1111564, %esi                  ## imm = 0x10F60C
	movl	$128, %edx
	callq	_ram_mask
	xorl	%r15d, %r15d
	cmpq	$0, 248(%r13)
	movl	$50331648, %eax                 ## imm = 0x3000000
	cmovnel	%r15d, %eax
	cmpq	$0, 240(%r13)
	leal	8192(%rax), %ecx
	cmovnel	%eax, %ecx
	leal	16384(%rcx), %eax
	cmpq	$0, 232(%r13)
	cmovnel	%ecx, %eax
	cmpq	$0, 112(%r13)
	movl	$3, %edx
	movl	$1946157056, %ecx               ## imm = 0x74000000
	cmovel	%edx, %ecx
	orl	%eax, %ecx
	movq	%r12, %rdi
	movl	$1112100, %esi                  ## imm = 0x10F824
	movl	$458752, %edx                   ## imm = 0x70000
	callq	_ram_mask
	xorl	%ecx, %ecx
	cmpq	$0, 224(%r13)
	sete	%cl
	shll	$12, %ecx
	movq	%r12, %rdi
	movl	$1110528, %esi                  ## imm = 0x10F200
	movl	$4096, %edx                     ## imm = 0x1000
	callq	_ram_mask
	movq	%r12, %rdi
	movl	$1111664, %esi                  ## imm = 0x10F670
	callq	_ram_rd32
	testl	%eax, %eax
	jns	LBB0_53
## %bb.52:
	movq	%r12, %rdi
	movl	$10000, %esi                    ## imm = 0x2710
	callq	_ram_nsec
	movq	%r12, %rdi
	movl	$1111664, %esi                  ## imm = 0x10F670
	movl	$-2147483648, %edx              ## imm = 0x80000000
	xorl	%ecx, %ecx
	callq	_ram_mask
LBB0_53:
	xorl	%ecx, %ecx
	cmpq	$0, 216(%r13)
	setne	%cl
	shll	$20, %ecx
	movq	%r12, %rdi
	movl	$1112108, %esi                  ## imm = 0x10F82C
	movl	$1048576, %edx                  ## imm = 0x100000
	callq	_ram_mask
	xorl	%eax, %eax
	cmpq	$0, 208(%r13)
	setne	%al
	shll	$13, %eax
	cmpq	$0, 200(%r13)
	leal	4096(%rax), %edx
	cmovel	%eax, %edx
	leal	16384(%rdx), %ecx
	cmpq	$0, 192(%r13)
	cmovel	%edx, %ecx
	movq	%r12, %rdi
	movl	$1112112, %esi                  ## imm = 0x10F830
	movl	$28672, %edx                    ## imm = 0x7000
	callq	_ram_mask
	movq	24(%r13), %rax
	movl	40(%rax), %ecx
	movq	%r12, %rdi
	movl	$1110600, %esi                  ## imm = 0x10F248
	movl	$-1, %edx
	callq	_ram_mask
	movq	24(%r13), %rax
	movl	(%rax), %ecx
	movq	%r12, %rdi
	movl	$1110672, %esi                  ## imm = 0x10F290
	movl	$-1, %edx
	callq	_ram_mask
	movq	24(%r13), %rax
	movl	4(%rax), %ecx
	movq	%r12, %rdi
	movl	$1110676, %esi                  ## imm = 0x10F294
	movl	$-1, %edx
	callq	_ram_mask
	movq	24(%r13), %rax
	movl	8(%rax), %ecx
	movq	%r12, %rdi
	movl	$1110680, %esi                  ## imm = 0x10F298
	movl	$-1, %edx
	callq	_ram_mask
	movq	24(%r13), %rax
	movl	12(%rax), %ecx
	movq	%r12, %rdi
	movl	$1110684, %esi                  ## imm = 0x10F29C
	movl	$-1, %edx
	callq	_ram_mask
	movq	24(%r13), %rax
	movl	16(%rax), %ecx
	movq	%r12, %rdi
	movl	$1110688, %esi                  ## imm = 0x10F2A0
	movl	$-1, %edx
	callq	_ram_mask
	movq	24(%r13), %rax
	movl	20(%rax), %ecx
	movq	%r12, %rdi
	movl	$1110692, %esi                  ## imm = 0x10F2A4
	movl	$-1, %edx
	callq	_ram_mask
	movq	24(%r13), %rax
	movl	24(%rax), %ecx
	movq	%r12, %rdi
	movl	$1110696, %esi                  ## imm = 0x10F2A8
	movl	$-1, %edx
	callq	_ram_mask
	movq	24(%r13), %rax
	movl	28(%rax), %ecx
	movq	%r12, %rdi
	movl	$1110700, %esi                  ## imm = 0x10F2AC
	movl	$-1, %edx
	callq	_ram_mask
	movq	24(%r13), %rax
	movl	32(%rax), %ecx
	movq	%r12, %rdi
	movl	$1110732, %esi                  ## imm = 0x10F2CC
	movl	$-1, %edx
	callq	_ram_mask
	movq	24(%r13), %rax
	movl	36(%rax), %ecx
	movq	%r12, %rdi
	movl	$1110760, %esi                  ## imm = 0x10F2E8
	movl	$-1, %edx
	callq	_ram_mask
	cmpq	$0, 80(%r14)
	movl	$0, %edx
	je	LBB0_55
## %bb.54:
	xorl	%r15d, %r15d
	cmpq	$0, 184(%r13)
	setne	%r15b
	shll	$24, %r15d
	movl	$16777216, %edx                 ## imm = 0x1000000
LBB0_55:
	movq	%r12, %rdi
	movl	$1110528, %esi                  ## imm = 0x10F200
	movl	%r15d, %ecx
	callq	_ram_mask
	cmpq	$0, 48(%r14)
	je	LBB0_56
## %bb.57:
	movl	32(%r13), %ecx
	shll	$8, %ecx
	movl	$768, %edx                      ## imm = 0x300
	cmpq	$0, 40(%r14)
	je	LBB0_60
LBB0_59:
	movl	%ecx, %eax
	orl	$1879048192, %eax               ## imm = 0x70000000
	cmpq	$0, 136(%r13)
	cmovnel	%eax, %ecx
	orl	$1879048192, %edx               ## imm = 0x70000000
LBB0_60:
	movq	%r12, %rdi
	movl	$1111556, %esi                  ## imm = 0x10F604
	callq	_ram_mask
	cmpq	$0, 64(%r14)
	je	LBB0_61
## %bb.62:
	movl	36(%r13), %ecx
	shll	$28, %ecx
	movl	$1879048192, %edx               ## imm = 0x70000000
	cmpq	$0, 72(%r14)
	je	LBB0_65
LBB0_64:
	movl	%ecx, %eax
	orl	$256, %eax                      ## imm = 0x100
	cmpq	$0, 128(%r13)
	cmovnel	%eax, %ecx
	orl	$256, %edx                      ## imm = 0x100
LBB0_65:
	movq	%r12, %rdi
	movl	$1111572, %esi                  ## imm = 0x10F614
	callq	_ram_mask
	cmpq	$0, 64(%r14)
	je	LBB0_66
## %bb.67:
	movl	36(%r13), %ecx
	shll	$28, %ecx
	movl	$1879048192, %edx               ## imm = 0x70000000
	cmpq	$0, 56(%r14)
	je	LBB0_70
LBB0_69:
	movl	%ecx, %eax
	orl	$256, %eax                      ## imm = 0x100
	cmpq	$0, 176(%r13)
	cmovnel	%eax, %ecx
	orl	$256, %edx                      ## imm = 0x100
LBB0_70:
	movq	%r12, %rdi
	movl	$1111568, %esi                  ## imm = 0x10F610
	callq	_ram_mask
	xorl	%ecx, %ecx
	cmpl	$0, 168(%r13)
	movl	$538968064, %eax                ## imm = 0x20200000
	cmovnel	%ecx, %eax
	movl	144(%r13), %edi
	leal	310378496(%rax), %esi
	testl	%edi, %edi
	movl	%eax, %ecx
	cmovel	%esi, %ecx
	cmpq	$0, 160(%r13)
	je	LBB0_74
## %bb.71:
	cmpq	$0, 152(%r13)
	je	LBB0_72
## %bb.73:
	orl	$32, %eax
	xorl	%edx, %edx
	testl	%edi, %edi
	sete	%dl
	cmovel	%esi, %eax
	shll	$5, %edx
	orl	$871366660, %edx                ## imm = 0x33F00004
	movl	%eax, %ecx
	jmp	LBB0_75
LBB0_56:
	xorl	%ecx, %ecx
	xorl	%edx, %edx
	cmpq	$0, 40(%r14)
	jne	LBB0_59
	jmp	LBB0_60
LBB0_61:
	xorl	%ecx, %ecx
	xorl	%edx, %edx
	cmpq	$0, 72(%r14)
	jne	LBB0_64
	jmp	LBB0_65
LBB0_66:
	xorl	%ecx, %ecx
	xorl	%edx, %edx
	cmpq	$0, 56(%r14)
	jne	LBB0_69
	jmp	LBB0_70
LBB0_74:
	orl	$4, %ecx
	movl	$1945108512, %edx               ## imm = 0x73F00020
	jmp	LBB0_75
LBB0_72:
	movl	$871366656, %edx                ## imm = 0x33F00000
LBB0_75:
	movq	%r12, %rdi
	movl	$1112072, %esi                  ## imm = 0x10F808
	callq	_ram_mask
	imull	$286331153, 40(%r13), %edx      ## imm = 0x11111111
	movq	%r12, %rdi
	movl	$1112176, %esi                  ## imm = 0x10F870
	callq	_ram_wr32
	cmpq	$0, 48(%r14)
	je	LBB0_76
## %bb.77:
	movl	32(%r13), %ebx
	movl	$3, %r15d
	cmpq	$0, 40(%r14)
	je	LBB0_80
LBB0_79:
	movl	%ebx, %eax
	orl	$4, %eax
	cmpq	$0, 136(%r13)
	cmovnel	%eax, %ebx
	orl	$4, %r15d
LBB0_80:
	movq	%r12, %rdi
	movl	$1050480, %esi                  ## imm = 0x100770
	movl	%r15d, %edx
	movl	%ebx, %ecx
	callq	_ram_mask
	andl	%r15d, %eax
	xorl	%ebx, %eax
	testb	$4, %al
	je	LBB0_82
## %bb.81:
	movq	%r12, %rdi
	movl	$1050448, %esi                  ## imm = 0x100750
	movl	$8, %edx
	movl	$8, %ecx
	callq	_ram_mask
	movq	%r12, %rdi
	movl	$1050384, %esi                  ## imm = 0x100710
	xorl	%edx, %edx
	callq	_ram_wr32
	movq	%r12, %rdi
	movl	$1050384, %esi                  ## imm = 0x100710
	movl	$-2147483648, %edx              ## imm = 0x80000000
	movl	$-2147483648, %ecx              ## imm = 0x80000000
	movl	$200000, %r8d                   ## imm = 0x30D40
	callq	_ram_wait
LBB0_82:
	movl	36(%r13), %eax
	shll	$8, %eax
	movl	%eax, %ecx
	orl	$-2147483648, %ecx              ## imm = 0x80000000
	cmpq	$0, 128(%r13)
	cmovel	%eax, %ecx
	movq	%r12, %rdi
	movl	$1050488, %esi                  ## imm = 0x100778
	movl	$1792, %edx                     ## imm = 0x700
	callq	_ram_mask
	movl	44(%r13), %ecx
	shll	$4, %ecx
	movq	%r12, %rdi
	movl	$1110608, %esi                  ## imm = 0x10F250
	movl	$1008, %edx                     ## imm = 0x3F0
	callq	_ram_mask
	movq	24(%r13), %rax
	movzbl	43(%rax), %ecx
	andl	$127, %ecx
	movl	48(%r13), %eax
	cmpl	%eax, %ecx
	cmovlel	%eax, %ecx
	shll	$24, %ecx
	movq	%r12, %rdi
	movl	$1110604, %esi                  ## imm = 0x10F24C
	movl	$2130706432, %edx               ## imm = 0x7F000000
	callq	_ram_mask
	movl	52(%r13), %ecx
	shll	$16, %ecx
	movq	%r12, %rdi
	movl	$1110564, %esi                  ## imm = 0x10F224
	movl	$2031616, %edx                  ## imm = 0x1F0000
	callq	_ram_mask
	movl	56(%r13), %eax
	movl	60(%r13), %edx
	shll	$26, %eax
	shll	$17, %edx
	orl	%eax, %edx
	movl	64(%r13), %ecx
	shll	$8, %ecx
	orl	%edx, %ecx
	orl	68(%r13), %ecx
	movq	%r12, %rdi
	movl	$1113796, %esi                  ## imm = 0x10FEC4
	movl	$69078791, %edx                 ## imm = 0x41E0F07
	callq	_ram_mask
	movl	72(%r13), %ecx
	shll	$5, %ecx
	orl	76(%r13), %ecx
	movq	%r12, %rdi
	movl	$1113800, %esi                  ## imm = 0x10FEC8
	movl	$39, %edx
	callq	_ram_mask
	movq	%r12, %rdi
	movl	$1110160, %esi                  ## imm = 0x10F090
	movl	$1073741950, %edx               ## imm = 0x4000007E
	callq	_ram_wr32
	movq	%r12, %rdi
	movl	$2000, %esi                     ## imm = 0x7D0
	callq	_ram_nsec
	movq	%r12, %rdi
	movl	$1110804, %esi                  ## imm = 0x10F314
	movl	$1, %edx
	callq	_ram_wr32
	movq	%r12, %rdi
	movl	$1110800, %esi                  ## imm = 0x10F310
	movl	$1, %edx
	callq	_ram_wr32
	movq	%r12, %rdi
	movl	$1110544, %esi                  ## imm = 0x10F210
	movl	$-2147483648, %edx              ## imm = 0x80000000
	callq	_ram_wr32
	cmpq	$0, 120(%r13)
	movl	-48(%rbp), %r15d                ## 4-byte Reload
	je	LBB0_85
## %bb.83:
	cmpl	$2, 4(%r14)
	jne	LBB0_85
## %bb.84:
	movq	%r12, %rdi
	movl	$1110676, %esi                  ## imm = 0x10F294
	movl	$-16777216, %edx                ## imm = 0xFF000000
	movl	$603979776, %ecx                ## imm = 0x24000000
	callq	_ram_mask
	movl	%eax, %ebx
	movq	%r12, %rdi
	movl	$-1139933184, %esi              ## imm = 0xBC0E0000
	movl	$-1543438336, %edx              ## imm = 0xA4010000
	callq	_gk104_ram_train
	movq	%r12, %rdi
	movl	$1000, %esi                     ## imm = 0x3E8
	callq	_ram_nsec
	movq	%r12, %rdi
	movl	$1110676, %esi                  ## imm = 0x10F294
	movl	%ebx, %edx
	callq	_ram_wr32
LBB0_85:
	movq	_mr@GOTPCREL(%rip), %rbx
	movq	(%rbx), %rax
	movl	12(%rax), %esi
	movq	8(%r14), %rax
	movl	12(%rax), %ecx
	movq	%r12, %rdi
	movl	$4095, %edx                     ## imm = 0xFFF
	callq	_ram_mask
	movq	(%rbx), %rax
	movl	(%rax), %esi
	movq	8(%r14), %rax
	movl	(%rax), %edx
	movq	%r12, %rdi
	callq	_ram_wr32
	movq	(%rbx), %rax
	movl	32(%rax), %esi
	movq	8(%r14), %rax
	movl	32(%rax), %ecx
	movq	%r12, %rdi
	movl	$4095, %edx                     ## imm = 0xFFF
	callq	_ram_mask
	movq	%r12, %rdi
	movl	$1000, %esi                     ## imm = 0x3E8
	callq	_ram_nsec
	movq	(%rbx), %rax
	movl	4(%rax), %esi
	movq	8(%r14), %rax
	movl	4(%rax), %ecx
	movq	%r12, %rdi
	movl	$4095, %edx                     ## imm = 0xFFF
	callq	_ram_mask
	movq	(%rbx), %rax
	movl	20(%rax), %esi
	movq	8(%r14), %rax
	movl	20(%rax), %ecx
	andl	$-5, %ecx
	movq	%r12, %rdi
	movl	$4095, %edx                     ## imm = 0xFFF
	callq	_ram_mask
	movq	(%rbx), %rax
	movl	24(%rax), %esi
	movq	8(%r14), %rax
	movl	24(%rax), %ecx
	movq	%r12, %rdi
	movl	$4095, %edx                     ## imm = 0xFFF
	callq	_ram_mask
	movq	(%rbx), %rax
	movl	28(%rax), %esi
	movq	8(%r14), %rax
	movl	28(%rax), %ecx
	movq	%r12, %rdi
	movl	$4095, %edx                     ## imm = 0xFFF
	callq	_ram_mask
	testl	%r15d, %r15d
	je	LBB0_89
## %bb.86:
	movq	_gpio2E@GOTPCREL(%rip), %r15
	movl	(%r15), %esi
	movq	%r12, %rdi
	callq	_ram_have
	testq	%rax, %rax
	je	LBB0_89
## %bb.87:
	movl	(%r15), %esi
	movq	(%r12), %rax
	movl	(%rax), %ecx
	movq	%r12, %rdi
	movl	$12288, %edx                    ## imm = 0x3000
	callq	_ram_mask
	movl	%eax, %ebx
	movl	(%r15), %esi
	movq	%r12, %rdi
	callq	_ram_rd32
	cmpl	%eax, %ebx
	je	LBB0_89
## %bb.88:
	movq	_gpiotrig@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r12, %rdi
	movl	$1, %edx
	callq	_ram_wr32
	movq	%r12, %rdi
	movl	$20000, %esi                    ## imm = 0x4E20
	callq	_ram_nsec
LBB0_89:
	movq	%r12, %rdi
	movl	$1110528, %esi                  ## imm = 0x10F200
	movl	$-2147483648, %edx              ## imm = 0x80000000
	movl	$-2147483648, %ecx              ## imm = 0x80000000
	callq	_ram_mask
	movq	%r12, %rdi
	movl	$1110808, %esi                  ## imm = 0x10F318
	movl	$1, %edx
	callq	_ram_wr32
	movq	%r12, %rdi
	movl	$1110528, %esi                  ## imm = 0x10F200
	movl	$-2147483648, %edx              ## imm = 0x80000000
	xorl	%ecx, %ecx
	callq	_ram_mask
	movq	%r12, %rdi
	movl	$1000, %esi                     ## imm = 0x3E8
	callq	_ram_nsec
	movq	%r14, %rdi
	movl	$1110528, %esi                  ## imm = 0x10F200
	movl	$411076608, %edx                ## imm = 0x18808800
	xorl	%ecx, %ecx
	movl	$411076608, %r8d                ## imm = 0x18808800
	callq	_ram_nuts
	movq	%r12, %rdi
	movl	$1112440, %esi                  ## imm = 0x10F978
	callq	_ram_rd32
	andl	$-287056, %eax                  ## imm = 0xFFFB9EB0
	cmpq	$0, 112(%r13)
	je	LBB0_90
## %bb.91:
	orl	$262223, %eax                   ## imm = 0x4004F
	movl	%eax, %edx
	jmp	LBB0_92
LBB0_76:
	xorl	%ebx, %ebx
	xorl	%r15d, %r15d
	cmpq	$0, 40(%r14)
	jne	LBB0_79
	jmp	LBB0_80
LBB0_90:
	cmpq	$0, 104(%r13)
	movl	$8207, %ecx                     ## imm = 0x200F
	movl	$11, %edx
	cmovel	%ecx, %edx
	orl	%eax, %edx
LBB0_92:
	movq	_NVKM_ENGINE_DISP@GOTPCREL(%rip), %r15
	movq	_mr@GOTPCREL(%rip), %rbx
	movq	%r12, %rdi
	movl	$1112440, %esi                  ## imm = 0x10F978
	callq	_ram_wr32
	cmpl	$1, 4(%r14)
	jne	LBB0_94
## %bb.93:
	movq	%r12, %rdi
	movl	$1112112, %esi                  ## imm = 0x10F830
	callq	_ram_rd32
	orl	$1, %eax
	movq	%r12, %rdi
	movl	$1112112, %esi                  ## imm = 0x10F830
	movl	%eax, %edx
	callq	_ram_wr32
LBB0_94:
	movl	$-1542586368, %edx              ## imm = 0xA40E0000
	cmpq	$0, 112(%r13)
	jne	LBB0_96
## %bb.95:
	xorl	%eax, %eax
	cmpq	$0, 104(%r13)
	setne	%al
	shll	$28, %eax
	xorl	%ecx, %ecx
	cmpl	$0, 96(%r13)
	sete	%cl
	shll	$19, %ecx
	leal	(%rcx,%rax), %edx
	addl	$-2013134848, %edx              ## imm = 0x88020000
LBB0_96:
	movq	%r12, %rdi
	movl	$-1139867648, %esi              ## imm = 0xBC0F0000
	callq	_gk104_ram_train
	movq	%r12, %rdi
	movl	$1000, %esi                     ## imm = 0x3E8
	callq	_ram_nsec
	cmpl	$2, 4(%r14)
	jne	LBB0_98
## %bb.97:
	movq	%r12, %rdi
	movl	$1112064, %esi                  ## imm = 0x10F800
	movl	$4, %edx
	movl	$4, %ecx
	callq	_ram_mask
LBB0_98:
	movq	(%rbx), %rax
	movl	20(%rax), %esi
	movq	8(%r14), %rax
	movl	20(%rax), %ecx
	movq	%r12, %rdi
	movl	$4, %edx
	callq	_ram_mask
	movq	8(%r14), %rcx
	cmpl	20(%rcx), %eax
	jne	LBB0_99
## %bb.100:
	cmpl	$2, 4(%r14)
	jne	LBB0_101
LBB0_102:
	cmpq	$0, 88(%r13)
	je	LBB0_104
LBB0_103:
	movq	%r12, %rdi
	movl	$-2147352576, %esi              ## imm = 0x80020000
	movl	$16777216, %edx                 ## imm = 0x1000000
	callq	_gk104_ram_train
LBB0_104:
	movq	%r12, %rdi
	callq	_ram_unblock
	movq	24(%r14), %rax
	movl	(%rax), %edi
	movl	(%r15), %esi
	callq	_nvkm_device_engine
	testq	%rax, %rax
	je	LBB0_106
## %bb.105:
	movq	%r12, %rdi
	movl	$6471680, %esi                  ## imm = 0x62C000
	movl	$252645120, %edx                ## imm = 0xF0F0F00
	callq	_ram_wr32
LBB0_106:
	xorl	%ebx, %ebx
	cmpq	$0, 80(%r13)
	setne	%bl
	shll	$11, %ebx
	movq	%r12, %rdi
	movl	$1110528, %esi                  ## imm = 0x10F200
	movl	$2048, %edx                     ## imm = 0x800
	movl	%ebx, %ecx
	callq	_ram_mask
	movq	%r14, %rdi
	movl	$1110528, %esi                  ## imm = 0x10F200
	movl	$411076608, %edx                ## imm = 0x18808800
	movl	%ebx, %ecx
	movl	$411076608, %r8d                ## imm = 0x18808800
	callq	_ram_nuts
	xorl	%eax, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_99:
	movq	%r12, %rdi
	movl	$1000, %esi                     ## imm = 0x3E8
	callq	_ram_nsec
	cmpl	$2, 4(%r14)
	je	LBB0_102
LBB0_101:
	movq	%r12, %rdi
	movl	$1112112, %esi                  ## imm = 0x10F830
	movl	$16777216, %edx                 ## imm = 0x1000000
	movl	$16777216, %ecx                 ## imm = 0x1000000
	callq	_ram_mask
	movq	%r12, %rdi
	movl	$1112112, %esi                  ## imm = 0x10F830
	movl	$16777216, %edx                 ## imm = 0x1000000
	xorl	%ecx, %ecx
	callq	_ram_mask
	cmpq	$0, 88(%r13)
	jne	LBB0_103
	jmp	LBB0_104
	.cfi_endproc
	.p2align	2, 0x90
	.data_region jt32
.set L0_0_set_13, LBB0_13-LJTI0_0
.set L0_0_set_12, LBB0_12-LJTI0_0
.set L0_0_set_11, LBB0_11-LJTI0_0
.set L0_0_set_10, LBB0_10-LJTI0_0
LJTI0_0:
	.long	L0_0_set_13
	.long	L0_0_set_12
	.long	L0_0_set_11
	.long	L0_0_set_10
.set L0_1_set_19, LBB0_19-LJTI0_1
.set L0_1_set_18, LBB0_18-LJTI0_1
.set L0_1_set_17, LBB0_17-LJTI0_1
.set L0_1_set_16, LBB0_16-LJTI0_1
LJTI0_1:
	.long	L0_1_set_19
	.long	L0_1_set_18
	.long	L0_1_set_17
	.long	L0_1_set_16
	.end_data_region
                                        ## -- End function
	.comm	_NVKM_ENGINE_DISP,4,2           ## @NVKM_ENGINE_DISP
	.comm	_mr,8,3                         ## @mr
	.comm	_gpio2E,4,2                     ## @gpio2E
	.comm	_gpiotrig,4,2                   ## @gpiotrig
	.comm	_gpioMV,4,2                     ## @gpioMV
	.no_dead_strip	_gk104_ram_calc_gddr5
.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_gddr5
_gk104_ram_calc_gddr5:                  ; @gk104_ram_calc_gddr5
	.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	x19, x0
	mov	w26, #61952
	movk	w26, #16, lsl #16
	add	x20, x0, #88
	ldr	x24, [x0, #32]
	ldr	w21, [x24, #268]
	ldr	w23, [x24, #264]
	add	w1, w26, #1544
	mov	x0, x20
	mov	w2, #1073741824
	mov	w3, #1073741824
	bl	_ram_mask
	mov	x0, x20
	bl	_ram_block
	ldr	x8, [x19, #24]
	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, x20
	mov	w1, #49152
	movk	w1, #98, lsl #16
	mov	w2, #252641280
	bl	_ram_wr32
LBB0_2:
	ldr	x8, [x19, #8]
	ldr	w8, [x8, #4]
	and	w3, w8, #0x3c
Lloh3:
	adrp	x27, _mr@GOTPAGE
Lloh4:
	ldr	x27, [x27, _mr@GOTPAGEOFF]
	cmp	w3, #48
	b.eq	LBB0_4
; %bb.3:
	ldr	x8, [x27]
	ldr	w1, [x8, #4]
	mov	x0, x20
	mov	w2, #60
	bl	_ram_mask
	ldr	x8, [x27]
	ldr	w1, [x8, #4]
	ldr	w8, [x19, #16]
	and	w3, w8, #0x3c
	mov	x0, x19
	mov	w2, #60
	mov	w4, #0
	bl	_ram_nuts
LBB0_4:
	str	w21, [sp, #12]                  ; 4-byte Folded Spill
	cbz	w21, LBB0_8
LBB0_5:
	mov	w25, #2016
	movk	w25, #32783, lsl #16
	mov	w28, #2016
	movk	w28, #32775, lsl #16
	mov	x0, x20
	mov	w1, #61952
	movk	w1, #16, lsl #16
	mov	w2, #2048
	mov	w3, #0
	bl	_ram_mask
	mov	x0, x20
	mov	w1, #16908288
	mov	w2, #786432
	bl	_gk104_ram_train
	add	w1, w26, #16
	mov	x0, x20
	mov	w2, #0
	bl	_ram_wr32
	mov	x0, x20
	mov	w1, #1000
	bl	_ram_nsec
	add	w1, w26, #272
	mov	x0, x20
	mov	w2, #1
	bl	_ram_wr32
	mov	x0, x20
	mov	w1, #1000
	bl	_ram_nsec
	mov	x0, x20
	mov	w1, #61952
	movk	w1, #16, lsl #16
	mov	w2, #-2147483648
	mov	w3, #-2147483648
	bl	_ram_mask
	add	w1, w26, #276
	mov	x0, x20
	mov	w2, #1
	bl	_ram_wr32
	mov	x0, x20
	mov	w1, #61952
	movk	w1, #16, lsl #16
	mov	w2, #-2147483648
	mov	w3, #0
	bl	_ram_mask
	sub	w21, w26, #368
	mov	x0, x20
	mov	x1, x21
	mov	w2, #97
	bl	_ram_wr32
	mov	x0, x20
	mov	x1, x21
	mov	w2, #-1073741697
	bl	_ram_wr32
	mov	x0, x20
	mov	w1, #1000
	bl	_ram_nsec
	add	w1, w26, #1176
	mov	x0, x20
	mov	w2, #0
	bl	_ram_wr32
	add	w1, w26, #1180
	mov	x0, x20
	mov	w2, #0
	bl	_ram_wr32
	add	w1, w26, #1912
	mov	x0, x20
	bl	_ram_rd32
	add	w8, w28, #64, lsl #12           ; =262144
	tst	w0, #0x800000
	csel	w22, w8, w25, eq
	ldr	w8, [x24]
	cmp	w8, #3
	b.hi	LBB0_15
; %bb.6:
Lloh5:
	adrp	x9, lJTI0_0@PAGE
Lloh6:
	add	x9, x9, lJTI0_0@PAGEOFF
	adr	x10, LBB0_7
	ldrb	w11, [x9, x8]
	add	x10, x10, x11, lsl #2
	br	x10
LBB0_7:
	sub	w8, w25, #1024
	b	LBB0_14
LBB0_8:
Lloh7:
	adrp	x22, _gpio2E@GOTPAGE
Lloh8:
	ldr	x22, [x22, _gpio2E@GOTPAGEOFF]
	ldr	w1, [x22]
	mov	x0, x20
	bl	_ram_have
	cbz	x0, LBB0_5
; %bb.9:
	ldr	w1, [x22]
	ldr	x8, [x20]
	ldr	w3, [x8, #4]
	mov	x0, x20
	mov	w2, #12288
	bl	_ram_mask
	mov	x21, x0
	ldr	w1, [x22]
	mov	x0, x20
	bl	_ram_rd32
	cmp	w21, w0
	b.eq	LBB0_5
; %bb.10:
Lloh9:
	adrp	x8, _gpiotrig@GOTPAGE
Lloh10:
	ldr	x8, [x8, _gpiotrig@GOTPAGEOFF]
Lloh11:
	ldr	w1, [x8]
	mov	x0, x20
	mov	w2, #1
	bl	_ram_wr32
	mov	x0, x20
	mov	w1, #20000
	bl	_ram_nsec
	b	LBB0_5
LBB0_11:
	and	w8, w22, #0xfffe0
	and	w22, w8, #0xffff07ff
	b	LBB0_15
LBB0_12:
	sub	w8, w25, #256
	b	LBB0_14
LBB0_13:
	sub	w8, w25, #64
LBB0_14:
	and	w22, w22, w8
LBB0_15:
	ldr	w8, [x24, #4]
	cmp	w8, #3
	b.hi	LBB0_22
; %bb.16:
Lloh12:
	adrp	x9, lJTI0_1@PAGE
Lloh13:
	add	x9, x9, lJTI0_1@PAGEOFF
	adr	x10, LBB0_17
	ldrb	w11, [x9, x8]
	add	x10, x10, x11, lsl #2
	br	x10
LBB0_17:
	sub	w8, w25, #512
	b	LBB0_21
LBB0_18:
	and	w22, w22, w28
	b	LBB0_22
LBB0_19:
	sub	w8, w25, #128
	b	LBB0_21
LBB0_20:
	sub	w8, w25, #32
LBB0_21:
	and	w22, w22, w8
LBB0_22:
	ldp	x10, x8, [x24, #240]
	cmp	x8, #0
	mov	w8, #2016
	movk	w8, #33551, lsl #16
	csel	w8, w25, w8, eq
	orr	w9, w8, #0x2000
	ldr	x11, [x24, #232]
	cmp	x10, #0
	csel	w8, w8, w9, eq
	orr	w9, w8, #0x4000
	cmp	x11, #0
	csel	w25, w8, w9, eq
	ldr	x8, [x24, #112]
	cbz	x8, LBB0_24
; %bb.23:
	orr	w2, w25, #0x3
	b	LBB0_25
LBB0_24:
	add	w1, w26, #1912
	mov	x0, x20
	bl	_ram_rd32
	tst	w0, #0x800000
	mov	w8, #1946157056
	mov	w9, #872415232
	csel	w8, w9, w8, eq
	orr	w2, w8, w25
LBB0_25:
	add	w1, w26, #1572
	mov	x0, x20
	mov	x3, x22
	bl	_ram_mask
	mov	x0, x20
	mov	w1, #8256
	movk	w1, #19, lsl #16
	mov	w2, #65536
	mov	w3, #0
	bl	_ram_mask
	ldp	w9, w8, [x19]
	cmp	w9, #2
	b.ne	LBB0_28
; %bb.26:
	cmp	w8, #2
	b.eq	LBB0_30
; %bb.27:
	add	w1, w26, #1544
	mov	x0, x20
	mov	w2, #524288
	mov	w3, #0
	bl	_ram_mask
	mov	x0, x20
	mov	w1, #61952
	movk	w1, #16, lsl #16
	mov	w2, #32768
	movk	w2, #6144, lsl #16
	mov	w3, #32768
	bl	_ram_mask
	add	w1, w26, #1536
	mov	x0, x20
	mov	w2, #0
	mov	w3, #4
	bl	_ram_mask
	add	w22, w26, #1584
	mov	x0, x20
	mov	x1, x22
	mov	w2, #32768
	mov	w3, #16
	movk	w3, #260, lsl #16
	bl	_ram_mask
	mov	x0, x20
	mov	x1, x22
	mov	w2, #16777216
	mov	w3, #0
	bl	_ram_mask
	mov	x0, x20
	bl	_r1373f4_init
	mov	x0, x20
	mov	w1, #29680
	movk	w1, #19, lsl #16
	mov	w2, #2
	mov	w3, #1
	bl	_ram_mask
	mov	x0, x20
	bl	_r1373f4_fini
	mov	x0, x20
	mov	x1, x22
	mov	w2, #12582912
	mov	w3, #1
	movk	w3, #36, lsl #16
	bl	_ram_mask
	b	LBB0_30
LBB0_28:
	cmp	w8, #2
	b.eq	LBB0_30
; %bb.29:
	mov	x0, x20
	bl	_r1373f4_init
	mov	x0, x20
	bl	_r1373f4_fini
LBB0_30:
Lloh14:
	adrp	x25, _gpioMV@GOTPAGE
Lloh15:
	ldr	x25, [x25, _gpioMV@GOTPAGEOFF]
	ldr	w1, [x25]
	mov	x0, x20
	bl	_ram_have
	cbz	x0, LBB0_33
; %bb.31:
	cmp	w23, #0
	cset	w8, eq
	ldr	w1, [x25]
	ldr	x9, [x19, #96]
	ldr	w3, [x9, w8, uxtw #2]
	mov	x0, x20
	mov	w2, #12288
	bl	_ram_mask
	mov	x22, x0
	ldr	w1, [x25]
	mov	x0, x20
	bl	_ram_rd32
	cmp	w22, w0
	b.eq	LBB0_33
; %bb.32:
Lloh16:
	adrp	x8, _gpiotrig@GOTPAGE
Lloh17:
	ldr	x8, [x8, _gpiotrig@GOTPAGEOFF]
Lloh18:
	ldr	w1, [x8]
	mov	x0, x20
	mov	w2, #1
	bl	_ram_wr32
	mov	x0, x20
	mov	w1, #64000
	bl	_ram_nsec
LBB0_33:
	ldr	x8, [x24, #240]
	cbnz	x8, LBB0_35
; %bb.34:
	ldr	x8, [x24, #232]
	cbz	x8, LBB0_36
LBB0_35:
	mov	x0, x20
	mov	w1, #8256
	movk	w1, #19, lsl #16
	mov	w2, #65536
	mov	w3, #65536
	bl	_ram_mask
	mov	x0, x20
	mov	w1, #20000
	bl	_ram_nsec
LBB0_36:
	ldp	w9, w8, [x19]
	cmp	w9, #2
	b.ne	LBB0_39
; %bb.37:
	cmp	w8, #2
	b.ne	LBB0_41
; %bb.38:
	add	w1, w26, #1536
	mov	x0, x20
	mov	w2, #4
	mov	w3, #0
	bl	_ram_mask
	mov	x0, x20
	bl	_r1373f4_init
	mov	x0, x20
	bl	_r1373f4_fini
	b	LBB0_41
LBB0_39:
	cmp	w8, #2
	b.ne	LBB0_41
; %bb.40:
	add	w1, w26, #1536
	mov	x0, x20
	mov	w2, #4
	mov	w3, #0
	bl	_ram_mask
	mov	x0, x20
	mov	w1, #29680
	movk	w1, #19, lsl #16
	mov	w2, #0
	mov	w3, #2
	bl	_ram_mask
	add	w1, w26, #1584
	mov	x0, x20
	mov	w2, #1
	movk	w2, #128, lsl #16
	mov	w3, #32784
	movk	w3, #64, lsl #16
	bl	_ram_mask
	mov	x0, x20
	bl	_r1373f4_init
	mov	x0, x20
	bl	_r1373f4_fini
	add	w1, w26, #1544
	mov	x0, x20
	mov	w2, #0
	mov	w3, #524288
	bl	_ram_mask
	mov	x0, x20
	mov	w1, #61952
	movk	w1, #16, lsl #16
	mov	w2, #32768
	movk	w2, #128, lsl #16
	mov	w3, #8388608
	bl	_ram_mask
LBB0_41:
	ldr	w8, [x19, #4]
	cmp	w8, #2
	b.eq	LBB0_44
; %bb.42:
	ldr	x8, [x24, #256]
	cbz	x8, LBB0_44
; %bb.43:
	add	w1, w26, #1136
	mov	x0, x20
	mov	w2, #-2147483648
	mov	w3, #-2147483648
	bl	_ram_mask
LBB0_44:
	mov	w22, #16843009
	ldr	w8, [x24, #8]
	add	w2, w8, w8, lsl #4
	add	w1, w26, #1116
	mov	x0, x20
	bl	_ram_wr32
	ldr	w8, [x24, #12]
	mul	w2, w8, w22
	add	w1, w26, #1208
	mov	x0, x20
	bl	_ram_wr32
	ldr	w8, [x24, #12]
	mul	w2, w8, w22
	add	w1, w26, #1212
	mov	x0, x20
	bl	_ram_wr32
	ldr	x8, [x24, #112]
	cbnz	x8, LBB0_49
; %bb.45:
	ldr	x8, [x24, #104]
	cbz	x8, LBB0_47
; %bb.46:
	add	w1, w26, #1176
	mov	x0, x20
	mov	w2, #0
	bl	_ram_wr32
	mov	w2, #0
	b	LBB0_48
LBB0_47:
	ldr	w8, [x24, #16]
	mul	w2, w8, w22
	add	w1, w26, #1176
	mov	x0, x20
	bl	_ram_wr32
	ldr	w8, [x24, #16]
	mul	w2, w8, w22
LBB0_48:
	add	w1, w26, #1180
	mov	x0, x20
	bl	_ram_wr32
LBB0_49:
	ldr	w8, [x19, #4]
	cmp	w8, #2
	b.eq	LBB0_51
; %bb.50:
	ldr	w8, [x24, #16]
	add	w8, w8, w8, lsl #16
	lsl	w22, w8, #8
	add	w23, w26, #1172
	mov	x0, x20
	mov	x1, x23
	bl	_ram_nuke
	mov	x0, x20
	mov	x1, x23
	mov	w2, #-16711936
	mov	x3, x22
	bl	_ram_mask
	ldr	w8, [x19, #4]
	cmp	w8, #2
	b.ne	LBB0_53
LBB0_51:
	ldr	x8, [x24, #120]
	cbz	x8, LBB0_53
; %bb.52:
	mov	w3, #128
	b	LBB0_54
LBB0_53:
	mov	w3, #0
LBB0_54:
	add	w1, w26, #1036
	mov	x0, x20
	mov	w2, #128
	bl	_ram_mask
	ldp	x9, x8, [x24, #240]
	cmp	x8, #0
	mov	w8, #50331648
	csel	w8, w8, wzr, eq
	ldr	x10, [x24, #232]
	cmp	x9, #0
	orr	w9, w8, #0x2000
	csel	w8, w9, w8, eq
	orr	w9, w8, #0x4000
	cmp	x10, #0
	csel	w8, w9, w8, eq
	ldr	x9, [x24, #112]
	cmp	x9, #0
	mov	w9, #1946157056
	mov	w10, #3
	csel	w9, w10, w9, eq
	orr	w3, w8, w9
	add	w1, w26, #1572
	mov	x0, x20
	mov	w2, #458752
	bl	_ram_mask
	ldr	x8, [x24, #224]
	cmp	x8, #0
	cset	w8, eq
	lsl	w3, w8, #12
	mov	w23, #4096
	mov	x0, x20
	mov	w1, #61952
	movk	w1, #16, lsl #16
	mov	w2, #4096
	bl	_ram_mask
	add	w22, w26, #1136
	mov	x0, x20
	mov	x1, x22
	bl	_ram_rd32
	tbz	w0, #31, LBB0_56
; %bb.55:
	mov	x0, x20
	mov	w1, #10000
	bl	_ram_nsec
	mov	x0, x20
	mov	x1, x22
	mov	w2, #-2147483648
	mov	w3, #0
	bl	_ram_mask
LBB0_56:
	ldr	x8, [x24, #216]
	cmp	x8, #0
	cset	w8, ne
	lsl	w3, w8, #20
	add	w1, w26, #1580
	mov	x0, x20
	mov	w2, #1048576
	bl	_ram_mask
	ldr	x8, [x24, #208]
	cmp	x8, #0
	cset	w8, ne
	lsl	w9, w8, #13
	bfi	w23, w8, #13, #1
	ldp	x10, x8, [x24, #192]
	cmp	x8, #0
	csel	w8, w9, w23, eq
	orr	w9, w8, #0x4000
	cmp	x10, #0
	csel	w3, w8, w9, eq
	add	w1, w26, #1584
	mov	x0, x20
	mov	w2, #28672
	bl	_ram_mask
	ldr	x8, [x24, #24]
	ldr	w3, [x8, #40]
	add	w1, w26, #72
	mov	x0, x20
	mov	w2, #-1
	bl	_ram_mask
	ldr	x8, [x24, #24]
	ldr	w3, [x8]
	add	w1, w26, #144
	mov	x0, x20
	mov	w2, #-1
	bl	_ram_mask
	ldr	x8, [x24, #24]
	ldr	w3, [x8, #4]
	add	w1, w26, #148
	mov	x0, x20
	mov	w2, #-1
	bl	_ram_mask
	ldr	x8, [x24, #24]
	ldr	w3, [x8, #8]
	add	w1, w26, #152
	mov	x0, x20
	mov	w2, #-1
	bl	_ram_mask
	ldr	x8, [x24, #24]
	ldr	w3, [x8, #12]
	add	w1, w26, #156
	mov	x0, x20
	mov	w2, #-1
	bl	_ram_mask
	ldr	x8, [x24, #24]
	ldr	w3, [x8, #16]
	add	w1, w26, #160
	mov	x0, x20
	mov	w2, #-1
	bl	_ram_mask
	ldr	x8, [x24, #24]
	ldr	w3, [x8, #20]
	add	w1, w26, #164
	mov	x0, x20
	mov	w2, #-1
	bl	_ram_mask
	ldr	x8, [x24, #24]
	ldr	w3, [x8, #24]
	add	w1, w26, #168
	mov	x0, x20
	mov	w2, #-1
	bl	_ram_mask
	ldr	x8, [x24, #24]
	ldr	w3, [x8, #28]
	add	w1, w26, #172
	mov	x0, x20
	mov	w2, #-1
	bl	_ram_mask
	ldr	x8, [x24, #24]
	ldr	w3, [x8, #32]
	add	w1, w26, #204
	mov	x0, x20
	mov	w2, #-1
	bl	_ram_mask
	ldr	x8, [x24, #24]
	ldr	w3, [x8, #36]
	add	w1, w26, #232
	mov	x0, x20
	mov	w2, #-1
	bl	_ram_mask
	ldr	x8, [x19, #80]
	cbz	x8, LBB0_58
; %bb.57:
	ldr	x8, [x24, #184]
	cmp	x8, #0
	cset	w8, ne
	lsl	w3, w8, #24
	mov	w2, #16777216
	b	LBB0_59
LBB0_58:
	mov	w3, #0
	mov	w2, #0
LBB0_59:
	mov	x0, x20
	mov	w1, #61952
	movk	w1, #16, lsl #16
	bl	_ram_mask
	ldr	x8, [x19, #48]
	cbz	x8, LBB0_70
; %bb.60:
	ldr	w8, [x24, #32]
	lsl	w3, w8, #8
	mov	w2, #768
	ldr	x8, [x19, #40]
	cbz	x8, LBB0_62
LBB0_61:
	ldr	x8, [x24, #136]
	orr	w9, w3, #0x70000000
	cmp	x8, #0
	csel	w3, w3, w9, eq
	orr	w2, w2, #0x70000000
LBB0_62:
	add	w1, w26, #1028
	mov	x0, x20
	bl	_ram_mask
	ldr	x8, [x19, #64]
	cbz	x8, LBB0_71
; %bb.63:
	ldr	w8, [x24, #36]
	lsl	w3, w8, #28
	mov	w2, #1879048192
	ldr	x8, [x19, #72]
	cbz	x8, LBB0_65
LBB0_64:
	ldr	x8, [x24, #128]
	orr	w9, w3, #0x100
	cmp	x8, #0
	csel	w3, w3, w9, eq
	orr	w2, w2, #0x100
LBB0_65:
	add	w1, w26, #1044
	mov	x0, x20
	bl	_ram_mask
	ldr	x8, [x19, #64]
	cbz	x8, LBB0_72
; %bb.66:
	ldr	w8, [x24, #36]
	lsl	w3, w8, #28
	mov	w2, #1879048192
	ldr	x8, [x19, #56]
	cbz	x8, LBB0_68
LBB0_67:
	ldr	x8, [x24, #176]
	orr	w9, w3, #0x100
	cmp	x8, #0
	csel	w3, w3, w9, eq
	orr	w2, w2, #0x100
LBB0_68:
	add	w1, w26, #1040
	mov	x0, x20
	bl	_ram_mask
	ldr	w8, [x24, #168]
	mov	w9, #538968064
	cmp	w8, #0
	csel	w9, w9, wzr, eq
	ldr	w10, [x24, #144]
	mov	w8, #310378496
	orr	w11, w9, w8
	cmp	w10, #0
	csel	w8, w11, w9, eq
	ldr	x12, [x24, #160]
	cbz	x12, LBB0_73
; %bb.69:
	ldr	x12, [x24, #152]
	mov	w13, #871366656
	orr	w9, w9, #0x20
	cmp	w10, #0
	csel	w9, w11, w9, eq
	mov	w10, #4
	movk	w10, #13296, lsl #16
	orr	w11, w10, #0x20
	csel	w10, w11, w10, eq
	cmp	x12, #0
	csel	w3, w8, w9, eq
	csel	w2, w13, w10, eq
	b	LBB0_74
LBB0_70:
	mov	w3, #0
	mov	w2, #0
	ldr	x8, [x19, #40]
	cbnz	x8, LBB0_61
	b	LBB0_62
LBB0_71:
	mov	w3, #0
	mov	w2, #0
	ldr	x8, [x19, #72]
	cbnz	x8, LBB0_64
	b	LBB0_65
LBB0_72:
	mov	w3, #0
	mov	w2, #0
	ldr	x8, [x19, #56]
	cbnz	x8, LBB0_67
	b	LBB0_68
LBB0_73:
	orr	w3, w8, #0x4
	mov	w2, #32
	movk	w2, #29680, lsl #16
LBB0_74:
	add	w1, w26, #1544
	mov	x0, x20
	bl	_ram_mask
	ldr	w8, [x24, #40]
	mov	w9, #286331153
	mul	w2, w8, w9
	add	w1, w26, #1648
	mov	x0, x20
	bl	_ram_wr32
	ldr	x8, [x19, #48]
	cbz	x8, LBB0_88
; %bb.75:
	ldr	w22, [x24, #32]
	mov	w23, #3
	ldr	x8, [x19, #40]
	cbz	x8, LBB0_77
LBB0_76:
	ldr	x8, [x24, #136]
	orr	w9, w22, #0x4
	cmp	x8, #0
	csel	w22, w22, w9, eq
	orr	w23, w23, #0x4
LBB0_77:
	mov	w28, #1808
	movk	w28, #16, lsl #16
	orr	w1, w28, #0x60
	mov	x0, x20
	mov	x2, x23
	mov	x3, x22
	bl	_ram_mask
	and	w8, w0, w23
	eor	w8, w8, w22
	tbz	w8, #2, LBB0_79
; %bb.78:
	add	w1, w28, #64
	mov	x0, x20
	mov	w2, #8
	mov	w3, #8
	bl	_ram_mask
	mov	x0, x20
	mov	w1, #1808
	movk	w1, #16, lsl #16
	mov	w2, #0
	bl	_ram_wr32
	mov	x0, x20
	mov	w1, #1808
	movk	w1, #16, lsl #16
	mov	w2, #-2147483648
	mov	w3, #-2147483648
	mov	w4, #3392
	movk	w4, #3, lsl #16
	bl	_ram_wait
LBB0_79:
	mov	w23, #-1139933184
	mov	w25, #-1543438336
	ldr	w8, [x24, #36]
	lsl	w8, w8, #8
	ldr	x9, [x24, #128]
	orr	w10, w8, #0x80000000
	cmp	x9, #0
	csel	w3, w8, w10, eq
	add	w1, w28, #104
	mov	x0, x20
	mov	w2, #1792
	bl	_ram_mask
	ldr	w8, [x24, #44]
	lsl	w3, w8, #4
	add	w1, w26, #80
	mov	x0, x20
	mov	w2, #1008
	bl	_ram_mask
	ldr	x8, [x24, #24]
	ldrb	w8, [x8, #43]
	and	w8, w8, #0x7f
	ldr	w9, [x24, #48]
	cmp	w8, w9
	csel	w8, w8, w9, gt
	lsl	w3, w8, #24
	add	w1, w26, #76
	mov	x0, x20
	mov	w2, #2130706432
	bl	_ram_mask
	ldr	w8, [x24, #52]
	lsl	w3, w8, #16
	add	w1, w26, #36
	mov	x0, x20
	mov	w2, #2031616
	bl	_ram_mask
	ldp	w8, w9, [x24, #56]
	lsl	w9, w9, #17
	orr	w8, w9, w8, lsl #26
	ldp	w9, w10, [x24, #64]
	orr	w8, w8, w9, lsl #8
	orr	w3, w8, w10
	add	w1, w26, #3268
	mov	x0, x20
	mov	w2, #3847
	movk	w2, #1054, lsl #16
	bl	_ram_mask
	ldp	w8, w9, [x24, #72]
	orr	w3, w9, w8, lsl #5
	add	w1, w26, #3272
	mov	x0, x20
	mov	w2, #39
	bl	_ram_mask
	mov	x0, x20
	mov	x1, x21
	mov	w2, #126
	movk	w2, #16384, lsl #16
	bl	_ram_wr32
	mov	x0, x20
	mov	w1, #2000
	bl	_ram_nsec
	add	w1, w26, #276
	mov	x0, x20
	mov	w2, #1
	bl	_ram_wr32
	add	w1, w26, #272
	mov	x0, x20
	mov	w2, #1
	bl	_ram_wr32
	add	w1, w26, #16
	mov	x0, x20
	mov	w2, #-2147483648
	bl	_ram_wr32
	ldr	x8, [x24, #120]
	cbz	x8, LBB0_82
; %bb.80:
	ldr	w8, [x19, #4]
	cmp	w8, #2
	b.ne	LBB0_82
; %bb.81:
	add	w21, w26, #148
	mov	x0, x20
	mov	x1, x21
	mov	w2, #-16777216
	mov	w3, #603979776
	bl	_ram_mask
	mov	x22, x0
	mov	x0, x20
	mov	w1, #-1139933184
	mov	w2, #-1543438336
	bl	_gk104_ram_train
	mov	x0, x20
	mov	w1, #1000
	bl	_ram_nsec
	mov	x0, x20
	mov	x1, x21
	mov	x2, x22
	bl	_ram_wr32
LBB0_82:
	ldr	x8, [x27]
	ldr	w1, [x8, #12]
	ldr	x8, [x19, #8]
	ldr	w3, [x8, #12]
	mov	x0, x20
	mov	w2, #4095
	bl	_ram_mask
	ldr	x8, [x27]
	ldr	w1, [x8]
	ldr	x8, [x19, #8]
	ldr	w2, [x8]
	mov	x0, x20
	bl	_ram_wr32
	ldr	x8, [x27]
	ldr	w1, [x8, #32]
	ldr	x8, [x19, #8]
	ldr	w3, [x8, #32]
	mov	x0, x20
	mov	w2, #4095
	bl	_ram_mask
	mov	x0, x20
	mov	w1, #1000
	bl	_ram_nsec
	ldr	x8, [x27]
	ldr	w1, [x8, #4]
	ldr	x8, [x19, #8]
	ldr	w3, [x8, #4]
	mov	x0, x20
	mov	w2, #4095
	bl	_ram_mask
	ldr	x8, [x27]
	ldr	w1, [x8, #20]
	ldr	x8, [x19, #8]
	ldr	w8, [x8, #20]
	and	w3, w8, #0xfffffffb
	mov	x0, x20
	mov	w2, #4095
	bl	_ram_mask
	ldr	x8, [x27]
	ldr	w1, [x8, #24]
	ldr	x8, [x19, #8]
	ldr	w3, [x8, #24]
	mov	x0, x20
	mov	w2, #4095
	bl	_ram_mask
	ldr	x8, [x27]
	ldr	w1, [x8, #28]
	ldr	x8, [x19, #8]
	ldr	w3, [x8, #28]
	mov	x0, x20
	mov	w2, #4095
	bl	_ram_mask
	ldr	w8, [sp, #12]                   ; 4-byte Folded Reload
	cbz	w8, LBB0_86
; %bb.83:
Lloh19:
	adrp	x22, _gpio2E@GOTPAGE
Lloh20:
	ldr	x22, [x22, _gpio2E@GOTPAGEOFF]
	ldr	w1, [x22]
	mov	x0, x20
	bl	_ram_have
	cbz	x0, LBB0_86
; %bb.84:
	ldr	w1, [x22]
	ldr	x8, [x20]
	ldr	w3, [x8]
	mov	x0, x20
	mov	w2, #12288
	bl	_ram_mask
	mov	x21, x0
	ldr	w1, [x22]
	mov	x0, x20
	bl	_ram_rd32
	cmp	w21, w0
	b.eq	LBB0_86
; %bb.85:
Lloh21:
	adrp	x8, _gpiotrig@GOTPAGE
Lloh22:
	ldr	x8, [x8, _gpiotrig@GOTPAGEOFF]
Lloh23:
	ldr	w1, [x8]
	mov	x0, x20
	mov	w2, #1
	bl	_ram_wr32
	mov	x0, x20
	mov	w1, #20000
	bl	_ram_nsec
LBB0_86:
	mov	x0, x20
	mov	w1, #61952
	movk	w1, #16, lsl #16
	mov	w2, #-2147483648
	mov	w3, #-2147483648
	bl	_ram_mask
	add	w1, w26, #280
	mov	x0, x20
	mov	w2, #1
	bl	_ram_wr32
	mov	x0, x20
	mov	w1, #61952
	movk	w1, #16, lsl #16
	mov	w2, #-2147483648
	mov	w3, #0
	bl	_ram_mask
	mov	x0, x20
	mov	w1, #1000
	bl	_ram_nsec
	mov	x0, x19
	mov	w1, #61952
	movk	w1, #16, lsl #16
	mov	w2, #34816
	movk	w2, #6272, lsl #16
	mov	w3, #0
	mov	w4, #34816
	movk	w4, #6272, lsl #16
	bl	_ram_nuts
	add	w1, w26, #1912
	mov	x0, x20
	bl	_ram_rd32
	mov	w8, #40624
	movk	w8, #65531, lsl #16
	and	w8, w0, w8
	ldr	x9, [x24, #112]
	cbz	x9, LBB0_89
; %bb.87:
	mov	w9, #79
	movk	w9, #4, lsl #16
	orr	w2, w8, w9
	b	LBB0_90
LBB0_88:
	mov	w22, #0
	mov	w23, #0
	ldr	x8, [x19, #40]
	cbnz	x8, LBB0_76
	b	LBB0_77
LBB0_89:
	ldr	x9, [x24, #104]
	cmp	x9, #0
	mov	w9, #11
	mov	w10, #8207
	csel	w9, w10, w9, eq
	orr	w2, w9, w8
LBB0_90:
Lloh24:
	adrp	x22, _NVKM_ENGINE_DISP@GOTPAGE
Lloh25:
	ldr	x22, [x22, _NVKM_ENGINE_DISP@GOTPAGEOFF]
	add	w1, w26, #1912
	mov	x0, x20
	bl	_ram_wr32
	ldr	w8, [x19, #4]
	cmp	w8, #1
	b.ne	LBB0_92
; %bb.91:
	add	w21, w26, #1584
	mov	x0, x20
	mov	x1, x21
	bl	_ram_rd32
	orr	w2, w0, #0x1
	mov	x0, x20
	mov	x1, x21
	bl	_ram_wr32
LBB0_92:
	ldr	x8, [x24, #112]
	cbz	x8, LBB0_94
; %bb.93:
	add	w2, w25, #208, lsl #12          ; =851968
	b	LBB0_95
LBB0_94:
	ldr	x8, [x24, #104]
	cmp	x8, #0
	mov	w8, #-1744699392
	mov	w9, #-2013134848
	csel	w8, w9, w8, eq
	ldr	w9, [x24, #96]
	orr	w10, w8, #0x80000
	cmp	w9, #0
	csel	w2, w10, w8, eq
LBB0_95:
	add	w1, w23, #16, lsl #12           ; =65536
	mov	x0, x20
	bl	_gk104_ram_train
	mov	x0, x20
	mov	w1, #1000
	bl	_ram_nsec
	ldr	w8, [x19, #4]
	cmp	w8, #2
	b.ne	LBB0_97
; %bb.96:
	add	w1, w26, #1536
	mov	x0, x20
	mov	w2, #4
	mov	w3, #4
	bl	_ram_mask
LBB0_97:
	ldr	x8, [x27]
	ldr	w1, [x8, #20]
	ldr	x8, [x19, #8]
	ldr	w3, [x8, #20]
	mov	x0, x20
	mov	w2, #4
	bl	_ram_mask
	ldr	x8, [x19, #8]
	ldr	w8, [x8, #20]
	cmp	w0, w8
	b.eq	LBB0_99
; %bb.98:
	mov	x0, x20
	mov	w1, #1000
	bl	_ram_nsec
LBB0_99:
	ldr	w8, [x19, #4]
	cmp	w8, #2
	b.eq	LBB0_101
; %bb.100:
	add	w21, w26, #1584
	mov	x0, x20
	mov	x1, x21
	mov	w2, #16777216
	mov	w3, #16777216
	bl	_ram_mask
	mov	x0, x20
	mov	x1, x21
	mov	w2, #16777216
	mov	w3, #0
	bl	_ram_mask
LBB0_101:
	ldr	x8, [x24, #88]
	cbz	x8, LBB0_103
; %bb.102:
	mov	x0, x20
	mov	w1, #-2147352576
	mov	w2, #16777216
	bl	_gk104_ram_train
LBB0_103:
	mov	x0, x20
	bl	_ram_unblock
	ldr	x8, [x19, #24]
	ldr	w0, [x8]
	ldr	w1, [x22]
	bl	_nvkm_device_engine
	cbz	x0, LBB0_105
; %bb.104:
	mov	x0, x20
	mov	w1, #49152
	movk	w1, #98, lsl #16
	mov	w2, #3840
	movk	w2, #3855, lsl #16
	bl	_ram_wr32
LBB0_105:
	ldr	x8, [x24, #80]
	cmp	x8, #0
	cset	w8, ne
	lsl	w21, w8, #11
	mov	x0, x20
	mov	w1, #61952
	movk	w1, #16, lsl #16
	mov	w2, #2048
	mov	x3, x21
	bl	_ram_mask
	mov	x0, x19
	mov	w1, #61952
	movk	w1, #16, lsl #16
	mov	w2, #34816
	movk	w2, #6272, lsl #16
	mov	x3, x21
	mov	w4, #34816
	movk	w4, #6272, lsl #16
	bl	_ram_nuts
	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 AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpAdd	Lloh12, Lloh13
	.loh AdrpLdrGot	Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpLdrGot	Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpLdrGot	Lloh24, Lloh25
	.cfi_endproc
	.section	__TEXT,__const
lJTI0_0:
	.byte	(LBB0_7-LBB0_7)>>2
	.byte	(LBB0_11-LBB0_7)>>2
	.byte	(LBB0_12-LBB0_7)>>2
	.byte	(LBB0_13-LBB0_7)>>2
lJTI0_1:
	.byte	(LBB0_17-LBB0_17)>>2
	.byte	(LBB0_18-LBB0_17)>>2
	.byte	(LBB0_19-LBB0_17)>>2
	.byte	(LBB0_20-LBB0_17)>>2
                                        ; -- End function
	.comm	_NVKM_ENGINE_DISP,4,2           ; @NVKM_ENGINE_DISP
	.comm	_mr,8,3                         ; @mr
	.comm	_gpio2E,4,2                     ; @gpio2E
	.comm	_gpiotrig,4,2                   ; @gpiotrig
	.comm	_gpioMV,4,2                     ; @gpioMV
	.no_dead_strip	_gk104_ram_calc_gddr5
.subsections_via_symbols
