	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function gk104_ram_train_type
_gk104_ram_train_type:                  ## @gk104_ram_train_type
	.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	$56, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rcx, %r15
	movl	%edx, %r13d
	movl	%esi, %r14d
	movq	(%rdi), %rax
	movq	(%rax), %rax
	movq	(%rax), %r12
	leaq	-56(%rbp), %rax
	movq	%rax, (%rsp)
	leaq	-48(%rbp), %rdx
	leaq	-44(%rbp), %rcx
	leaq	-72(%rbp), %r8
	leaq	-68(%rbp), %r9
	movq	%r12, %rdi
	callq	_nvbios_M0205Ep
	testl	%eax, %eax
	je	LBB0_4
## %bb.1:
	movl	-56(%rbp), %eax
	xorl	%ebx, %ebx
	cmpq	$9, %rax
	ja	LBB0_24
## %bb.2:
	leaq	LJTI0_0(%rip), %rcx
	movslq	(%rcx,%rax,4), %rax
	addq	%rcx, %rax
	movq	%r15, -80(%rbp)                 ## 8-byte Spill
	jmpq	*%rax
LBB0_3:
	addq	$56, %r15
	jmp	LBB0_11
LBB0_4:
	movq	_ENOENT@GOTPCREL(%rip), %rax
	jmp	LBB0_22
LBB0_5:
	addq	$48, %r15
	jmp	LBB0_11
LBB0_6:
	addq	$40, %r15
	jmp	LBB0_11
LBB0_7:
	addq	$32, %r15
	jmp	LBB0_11
LBB0_8:
	addq	$24, %r15
	jmp	LBB0_11
LBB0_9:
	addq	$16, %r15
	jmp	LBB0_11
LBB0_10:
	addq	$8, %r15
LBB0_11:
	leaq	-48(%rbp), %rcx
	leaq	-44(%rbp), %r8
	leaq	-64(%rbp), %r9
	movq	%r12, %rdi
	movl	%r14d, %esi
	movl	%r13d, %edx
	callq	_nvbios_M0205Sp
	testl	%eax, %eax
	je	LBB0_21
## %bb.12:
	movl	-64(%rbp), %r14d
	leaq	-88(%rbp), %rax
	movq	%rax, (%rsp)
	leaq	-48(%rbp), %rdx
	leaq	-44(%rbp), %rcx
	leaq	-72(%rbp), %r8
	leaq	-68(%rbp), %r9
	movq	%r12, %rdi
	movl	%r14d, %esi
	callq	_nvbios_M0209Ep
	testl	%eax, %eax
	je	LBB0_21
## %bb.13:
	xorl	%ebx, %ebx
	leaq	-48(%rbp), %rcx
	leaq	-44(%rbp), %r8
	movq	%r12, %rdi
	movl	%r14d, %esi
	xorl	%edx, %edx
	movq	%r15, %r9
	callq	_nvbios_M0209Sp
	testl	%eax, %eax
	je	LBB0_25
## %bb.14:
	movl	-88(%rbp), %eax
	cmpl	$1, %eax
	je	LBB0_20
## %bb.15:
	cmpl	$2, %eax
	jne	LBB0_21
## %bb.16:
	movq	-80(%rbp), %rax                 ## 8-byte Reload
	leaq	64(%rax), %r14
	movl	-84(%rbp), %esi
	xorl	%ebx, %ebx
	leaq	-48(%rbp), %rcx
	leaq	-44(%rbp), %r8
	movq	%r12, %rdi
	xorl	%edx, %edx
	movq	%r14, %r9
	callq	_nvbios_M0209Sp
	testl	%eax, %eax
	je	LBB0_25
## %bb.17:
	movq	(%r15), %rdi
	callq	_ARRAY_SIZE
	testl	%eax, %eax
	jle	LBB0_20
## %bb.18:
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_19:                                ## =>This Inner Loop Header: Depth=1
	movq	(%r14), %rax
	movq	(%r15), %rdi
	movq	(%rdi,%rbx,8), %rcx
	movq	(%rax,%rcx,8), %rax
	movq	%rax, (%rdi,%rbx,8)
	incq	%rbx
	callq	_ARRAY_SIZE
	cltq
	cmpq	%rax, %rbx
	jl	LBB0_19
LBB0_20:
	movb	-56(%rbp), %cl
	movl	$1, %eax
	shll	%cl, %eax
	movq	-80(%rbp), %rcx                 ## 8-byte Reload
	orl	%eax, (%rcx)
	xorl	%ebx, %ebx
	jmp	LBB0_24
LBB0_21:
	movq	_EINVAL@GOTPCREL(%rip), %rax
LBB0_22:
	xorl	%ebx, %ebx
LBB0_23:
	subl	(%rax), %ebx
LBB0_24:
	movl	%ebx, %eax
	addq	$56, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_25:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	jmp	LBB0_23
	.cfi_endproc
	.p2align	2, 0x90
	.data_region jt32
.set L0_0_set_3, LBB0_3-LJTI0_0
.set L0_0_set_5, LBB0_5-LJTI0_0
.set L0_0_set_24, LBB0_24-LJTI0_0
.set L0_0_set_6, LBB0_6-LJTI0_0
.set L0_0_set_7, LBB0_7-LJTI0_0
.set L0_0_set_8, LBB0_8-LJTI0_0
.set L0_0_set_9, LBB0_9-LJTI0_0
.set L0_0_set_10, LBB0_10-LJTI0_0
LJTI0_0:
	.long	L0_0_set_3
	.long	L0_0_set_5
	.long	L0_0_set_24
	.long	L0_0_set_24
	.long	L0_0_set_6
	.long	L0_0_set_24
	.long	L0_0_set_7
	.long	L0_0_set_8
	.long	L0_0_set_9
	.long	L0_0_set_10
	.end_data_region
                                        ## -- End function
	.comm	_ENOENT,4,2                     ## @ENOENT
	.comm	_EINVAL,4,2                     ## @EINVAL
	.no_dead_strip	_gk104_ram_train_type
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function gk104_ram_train_type
_gk104_ram_train_type:                  ; @gk104_ram_train_type
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	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
	mov	x19, x3
	mov	x22, x2
	mov	x23, x1
	ldr	x8, [x0]
	ldr	x8, [x8]
	ldr	x21, [x8]
	add	x2, sp, #20
	add	x3, sp, #16
	add	x4, sp, #12
	add	x5, sp, #8
	add	x6, sp, #40
	mov	x0, x21
	bl	_nvbios_M0205Ep
	cbz	w0, LBB0_4
; %bb.1:
	mov	w0, #0
	ldr	w8, [sp, #40]
	cmp	w8, #9
	b.hi	LBB0_23
; %bb.2:
Lloh0:
	adrp	x9, lJTI0_0@PAGE
Lloh1:
	add	x9, x9, lJTI0_0@PAGEOFF
	adr	x10, LBB0_3
	ldrb	w11, [x9, x8]
	add	x10, x10, x11, lsl #2
	br	x10
LBB0_3:
	add	x20, x19, #56
	b	LBB0_11
LBB0_4:
Lloh2:
	adrp	x8, _ENOENT@GOTPAGE
Lloh3:
	ldr	x8, [x8, _ENOENT@GOTPAGEOFF]
	b	LBB0_22
LBB0_5:
	add	x20, x19, #48
	b	LBB0_11
LBB0_6:
	add	x20, x19, #40
	b	LBB0_11
LBB0_7:
	add	x20, x19, #32
	b	LBB0_11
LBB0_8:
	add	x20, x19, #24
	b	LBB0_11
LBB0_9:
	add	x20, x19, #16
	b	LBB0_11
LBB0_10:
	add	x20, x19, #8
LBB0_11:
	add	x3, sp, #20
	add	x4, sp, #16
	add	x5, sp, #32
	mov	x0, x21
	mov	x1, x23
	mov	x2, x22
	bl	_nvbios_M0205Sp
	cbz	w0, LBB0_21
; %bb.12:
	ldr	w22, [sp, #32]
	add	x2, sp, #20
	add	x3, sp, #16
	add	x4, sp, #12
	add	x5, sp, #8
	add	x6, sp, #24
	mov	x0, x21
	mov	x1, x22
	bl	_nvbios_M0209Ep
	cbz	w0, LBB0_21
; %bb.13:
	add	x3, sp, #20
	add	x4, sp, #16
	mov	x0, x21
	mov	x1, x22
	mov	w2, #0
	mov	x5, x20
	bl	_nvbios_M0209Sp
	cbz	w0, LBB0_21
; %bb.14:
	ldr	w8, [sp, #24]
	cmp	w8, #1
	b.eq	LBB0_20
; %bb.15:
	cmp	w8, #2
	b.ne	LBB0_21
; %bb.16:
	add	x22, x19, #64
	ldr	w1, [sp, #28]
	add	x3, sp, #20
	add	x4, sp, #16
	mov	x0, x21
	mov	w2, #0
	mov	x5, x22
	bl	_nvbios_M0209Sp
	cbz	w0, LBB0_21
; %bb.17:
	ldr	x0, [x20]
	bl	_ARRAY_SIZE
	cmp	w0, #1
	b.lt	LBB0_20
; %bb.18:
	mov	x21, #0
LBB0_19:                                ; =>This Inner Loop Header: Depth=1
	ldr	x0, [x20]
	lsl	x8, x21, #3
	ldr	x9, [x0, x8]
	ldr	x10, [x22]
	ldr	x9, [x10, x9, lsl #3]
	str	x9, [x0, x8]
	add	x21, x21, #1
	bl	_ARRAY_SIZE
	cmp	x21, w0, sxtw
	b.lt	LBB0_19
LBB0_20:
	mov	w0, #0
	ldr	w8, [sp, #40]
	mov	w9, #1
	lsl	w8, w9, w8
	ldr	w9, [x19]
	orr	w8, w9, w8
	str	w8, [x19]
	b	LBB0_23
LBB0_21:
Lloh4:
	adrp	x8, _EINVAL@GOTPAGE
Lloh5:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
LBB0_22:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_23:
	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
	add	sp, sp, #112
	ret
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh4, Lloh5
	.cfi_endproc
	.section	__TEXT,__const
lJTI0_0:
	.byte	(LBB0_3-LBB0_3)>>2
	.byte	(LBB0_5-LBB0_3)>>2
	.byte	(LBB0_23-LBB0_3)>>2
	.byte	(LBB0_23-LBB0_3)>>2
	.byte	(LBB0_6-LBB0_3)>>2
	.byte	(LBB0_23-LBB0_3)>>2
	.byte	(LBB0_7-LBB0_3)>>2
	.byte	(LBB0_8-LBB0_3)>>2
	.byte	(LBB0_9-LBB0_3)>>2
	.byte	(LBB0_10-LBB0_3)>>2
                                        ; -- End function
	.comm	_ENOENT,4,2                     ; @ENOENT
	.comm	_EINVAL,4,2                     ; @EINVAL
	.no_dead_strip	_gk104_ram_train_type
.subsections_via_symbols
