	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function gp100_ram_init
_gp100_ram_init:                        ## @gp100_ram_init
	.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	(%rdi), %rax
	movq	%rax, -72(%rbp)                 ## 8-byte Spill
	movq	(%rax), %r14
	movq	(%r14), %r12
	leaq	-76(%rbp), %rax
	movq	%rax, (%rsp)
	leaq	-88(%rbp), %rsi
	leaq	-52(%rbp), %rdx
	leaq	-44(%rbp), %rcx
	leaq	-84(%rbp), %r8
	leaq	-80(%rbp), %r9
	movq	%r12, %rdi
	callq	_nvbios_rammapTe
	testl	%eax, %eax
	je	LBB0_2
## %bb.1:
	cmpl	$20, -52(%rbp)
	jle	LBB0_2
## %bb.3:
	movl	%eax, %ebx
	leal	20(%rbx), %esi
	movq	%r12, %rdi
	callq	_nvbios_rd08
	movl	%eax, -44(%rbp)
	addl	$16, %ebx
	movq	%r12, %rdi
	movl	%ebx, %esi
	callq	_nvbios_rd32
	cmpl	$0, -44(%rbp)
	je	LBB0_10
## %bb.4:
	movl	%eax, %ebx
	movq	%r14, -64(%rbp)                 ## 8-byte Spill
	movq	%r14, %rdi
	movl	$10094172, %esi                 ## imm = 0x9A065C
	callq	_nvkm_rd32
	andl	$240, %eax
	movl	%eax, -48(%rbp)                 ## 4-byte Spill
	movl	-44(%rbp), %eax
	testl	%eax, %eax
	jle	LBB0_9
## %bb.5:
	movl	-48(%rbp), %r14d                ## 4-byte Reload
	shrl	$4, %r14d
	xorl	%r13d, %r13d
	xorl	%r15d, %r15d
	jmp	LBB0_6
	.p2align	4, 0x90
LBB0_8:                                 ##   in Loop: Header=BB0_6 Depth=1
	incl	%r15d
	addl	$4, %ebx
	addl	$16, %r13d
	cmpl	%eax, %r15d
	jge	LBB0_9
LBB0_6:                                 ## =>This Inner Loop Header: Depth=1
	cmpl	%r15d, %r14d
	je	LBB0_8
## %bb.7:                               ##   in Loop: Header=BB0_6 Depth=1
	movq	-64(%rbp), %rdi                 ## 8-byte Reload
	movl	$10094172, %esi                 ## imm = 0x9A065C
	movl	$240, %edx
	movl	%r13d, %ecx
	callq	_nvkm_mask
	movq	%r12, %rdi
	movl	%ebx, %esi
	callq	_nvbios_rd32
	movq	-72(%rbp), %rdi                 ## 8-byte Reload
	movl	%eax, %esi
	callq	_nvbios_init
	movl	-44(%rbp), %eax
	jmp	LBB0_8
LBB0_2:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
	jmp	LBB0_11
LBB0_9:
	movq	-64(%rbp), %r14                 ## 8-byte Reload
	movq	%r14, %rdi
	movl	$10094172, %esi                 ## imm = 0x9A065C
	movl	$240, %edx
	movl	-48(%rbp), %ecx                 ## 4-byte Reload
	callq	_nvkm_mask
LBB0_10:
	xorl	%ebx, %ebx
	movq	%r14, %rdi
	movl	$10093956, %esi                 ## imm = 0x9A0584
	movl	$285212672, %edx                ## imm = 0x11000000
	xorl	%ecx, %ecx
	callq	_nvkm_mask
	movq	%r14, %rdi
	movl	$1109184, %esi                  ## imm = 0x10ECC0
	movl	$-1, %edx
	callq	_nvkm_wr32
	movq	%r14, %rdi
	movl	$10092896, %esi                 ## imm = 0x9A0160
	movl	$16, %edx
	movl	$16, %ecx
	callq	_nvkm_mask
LBB0_11:
	movl	%ebx, %eax
	addq	$56, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_EINVAL,4,2                     ## @EINVAL
	.no_dead_strip	_gp100_ram_init
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function gp100_ram_init
_gp100_ram_init:                        ; @gp100_ram_init
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #128
	.cfi_def_cfa_offset 128
	stp	x28, x27, [sp, #32]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #48]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #64]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #80]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #96]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #112]            ; 16-byte Folded Spill
	add	x29, sp, #112
	.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
	ldr	x20, [x0]
	ldr	x19, [x20]
	ldr	x21, [x19]
	add	x1, sp, #28
	add	x2, sp, #24
	add	x3, sp, #20
	add	x4, sp, #16
	add	x5, sp, #12
	add	x6, sp, #8
	mov	x0, x21
	bl	_nvbios_rammapTe
	ldr	w8, [sp, #24]
	cmp	w0, #0
	ccmp	w8, #20, #4, ne
	b.gt	LBB0_2
; %bb.1:
Lloh0:
	adrp	x8, _EINVAL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_10
LBB0_2:
	mov	x22, x0
	mov	w25, #1628
	movk	w25, #154, lsl #16
	add	w1, w0, #20
	mov	x0, x21
	bl	_nvbios_rd08
	str	w0, [sp, #20]
	add	w1, w22, #16
	mov	x0, x21
	bl	_nvbios_rd32
	ldr	w8, [sp, #20]
	cbz	w8, LBB0_9
; %bb.3:
	mov	x22, x0
	mov	x0, x19
	mov	w1, #1628
	movk	w1, #154, lsl #16
	bl	_nvkm_rd32
	and	w23, w0, #0xf0
	ldr	w8, [sp, #20]
	cmp	w8, #1
	b.lt	LBB0_8
; %bb.4:
	mov	w24, #0
	mov	w26, #0
	lsr	w27, w23, #4
	b	LBB0_6
LBB0_5:                                 ;   in Loop: Header=BB0_6 Depth=1
	add	w26, w26, #1
	add	w22, w22, #4
	add	w24, w24, #16
	cmp	w26, w8
	b.ge	LBB0_8
LBB0_6:                                 ; =>This Inner Loop Header: Depth=1
	cmp	w27, w26
	b.eq	LBB0_5
; %bb.7:                                ;   in Loop: Header=BB0_6 Depth=1
	mov	x0, x19
	mov	w1, #1628
	movk	w1, #154, lsl #16
	mov	w2, #240
	mov	x3, x24
	bl	_nvkm_mask
	mov	x0, x21
	mov	x1, x22
	bl	_nvbios_rd32
	mov	x1, x0
	mov	x0, x20
	bl	_nvbios_init
	ldr	w8, [sp, #20]
	b	LBB0_5
LBB0_8:
	mov	x0, x19
	mov	w1, #1628
	movk	w1, #154, lsl #16
	mov	w2, #240
	mov	x3, x23
	bl	_nvkm_mask
LBB0_9:
	sub	w1, w25, #216
	mov	x0, x19
	mov	w2, #285212672
	mov	w3, #0
	bl	_nvkm_mask
	mov	x0, x19
	mov	w1, #60608
	movk	w1, #16, lsl #16
	mov	w2, #-1
	bl	_nvkm_wr32
	sub	w1, w25, #1276
	mov	x0, x19
	mov	w2, #16
	mov	w3, #16
	bl	_nvkm_mask
	mov	w0, #0
LBB0_10:
	ldp	x29, x30, [sp, #112]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #96]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #80]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #64]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #48]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #128
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_EINVAL,4,2                     ; @EINVAL
	.no_dead_strip	_gp100_ram_init
.subsections_via_symbols
