	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_gf100_ram_ctor                 ## -- Begin function gf100_ram_ctor
	.p2align	4, 0x90
_gf100_ram_ctor:                        ## @gf100_ram_ctor
	.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	%rdx, -88(%rbp)                 ## 8-byte Spill
	movq	%rsi, %r14
	movq	%rdi, -72(%rbp)                 ## 8-byte Spill
	movq	(%rsi), %rbx
	movq	(%rbx), %rdi
	callq	_nvkm_fb_bios_memtype
	movl	%eax, -76(%rbp)                 ## 4-byte Spill
	movq	%rbx, -56(%rbp)                 ## 8-byte Spill
	movq	%rbx, %rdi
	movl	$140344, %esi                   ## imm = 0x22438
	callq	_nvkm_rd32
	movl	%eax, %ebx
	leaq	L_.str(%rip), %rsi
	movq	%r14, -64(%rbp)                 ## 8-byte Spill
	movq	%r14, %rdi
	movl	%eax, %edx
	xorl	%eax, %eax
	callq	_nvkm_debug
	movl	%ebx, -80(%rbp)                 ## 4-byte Spill
	testl	%ebx, %ebx
	jle	LBB0_1
## %bb.2:
	movl	$-1, %r15d
	xorl	%r14d, %r14d
	xorl	%r12d, %r12d
	xorl	%r13d, %r13d
	jmp	LBB0_3
	.p2align	4, 0x90
LBB0_4:                                 ##   in Loop: Header=BB0_3 Depth=1
	movl	%eax, %ebx
	movl	-44(%rbp), %r8d
	movq	-64(%rbp), %rdi                 ## 8-byte Reload
	leaq	L_.str.1(%rip), %rsi
	movl	%r12d, %edx
	movl	%eax, %ecx
	xorl	%eax, %eax
	callq	_nvkm_debug
	movl	%ebx, %eax
	cltd
	idivl	-44(%rbp)
	shll	$20, %eax
	movl	%r15d, %edi
	movl	%eax, %esi
	callq	_min
	movl	%eax, %r15d
	shll	$20, %ebx
	addl	%ebx, %r13d
	addl	-44(%rbp), %r14d
LBB0_6:                                 ##   in Loop: Header=BB0_3 Depth=1
	incl	%r12d
	cmpl	%r12d, -80(%rbp)                ## 4-byte Folded Reload
	je	LBB0_7
LBB0_3:                                 ## =>This Inner Loop Header: Depth=1
	movq	-72(%rbp), %rdi                 ## 8-byte Reload
	movq	-56(%rbp), %rsi                 ## 8-byte Reload
	movl	%r12d, %edx
	leaq	-44(%rbp), %rcx
	callq	*(%rdi)
	testl	%eax, %eax
	jne	LBB0_4
## %bb.5:                               ##   in Loop: Header=BB0_3 Depth=1
	movq	-64(%rbp), %rdi                 ## 8-byte Reload
	leaq	L_.str.2(%rip), %rsi
	movl	%r12d, %edx
	xorl	%eax, %eax
	callq	_nvkm_debug
	jmp	LBB0_6
LBB0_1:
	xorl	%r13d, %r13d
	movl	$-1, %r15d
	xorl	%r14d, %r14d
LBB0_7:
	imull	%r15d, %r14d
	movq	-72(%rbp), %rax                 ## 8-byte Reload
	addl	8(%rax), %r15d
	movl	%r13d, %r12d
	subl	%r14d, %r13d
	movl	%r14d, %edx
	sarl	$20, %edx
	leaq	L_.str.3(%rip), %rsi
	movq	-64(%rbp), %rbx                 ## 8-byte Reload
	movq	%rbx, %rdi
	xorl	%ecx, %ecx
	xorl	%eax, %eax
	callq	_nvkm_debug
	movl	%r13d, -56(%rbp)                ## 4-byte Spill
	movl	%r13d, %edx
	movl	%r15d, %r13d
	sarl	$20, %edx
	leaq	L_.str.4(%rip), %rsi
	movq	%rbx, %rdi
	movl	%r15d, %ecx
	xorl	%eax, %eax
	callq	_nvkm_debug
	movl	%r12d, %edx
	sarl	$20, %edx
	leaq	L_.str.5(%rip), %rsi
	movq	%rbx, %rdi
	xorl	%eax, %eax
	callq	_nvkm_debug
	movq	-72(%rbp), %rdi                 ## 8-byte Reload
	movq	%rbx, %rsi
	movl	-76(%rbp), %edx                 ## 4-byte Reload
	movl	%r12d, %ecx
	movq	-88(%rbp), %rbx                 ## 8-byte Reload
	movq	%rbx, %r8
	callq	_nvkm_ram_ctor
	testl	%eax, %eax
	jne	LBB0_14
## %bb.8:
	movq	%rbx, %rdi
	callq	_nvkm_mm_fini
	movq	_NVKM_RAM_MM_SHIFT@GOTPCREL(%rip), %r15
	movl	(%r15), %ecx
	movl	$262144, %edx                   ## imm = 0x40000
	shrl	%cl, %edx
	movq	_NVKM_RAM_MM_NORMAL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	cmpl	%r14d, %r12d
	jne	LBB0_9
## %bb.11:
	addl	$-1310720, %r12d                ## imm = 0xFFEC0000
                                        ## kill: def $cl killed $cl killed $ecx
	sarl	%cl, %r12d
	movq	%rbx, %rdi
	movl	%r12d, %ecx
	jmp	LBB0_12
LBB0_9:
	addl	$-262144, %r14d                 ## imm = 0xFFFC0000
                                        ## kill: def $cl killed $cl killed $ecx
	sarl	%cl, %r14d
	movq	%rbx, %rdi
	movl	%r14d, %ecx
	movl	$1, %r8d
	callq	_nvkm_mm_init
	testl	%eax, %eax
	jne	LBB0_14
## %bb.10:
	movq	_NVKM_RAM_MM_MIXED@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movb	(%r15), %cl
	sarl	%cl, %r13d
	movl	-56(%rbp), %eax                 ## 4-byte Reload
	addl	$-1048576, %eax                 ## imm = 0xFFF00000
	sarl	%cl, %eax
	movq	%rbx, %rdi
	movl	%r13d, %edx
	movl	%eax, %ecx
LBB0_12:
	movl	$1, %r8d
	callq	_nvkm_mm_init
	testl	%eax, %eax
	jne	LBB0_14
## %bb.13:
	xorl	%eax, %eax
LBB0_14:
	addq	$56, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"%d FBP(s)\n"

L_.str.1:                               ## @.str.1
	.asciz	"FBP %d: %4d MiB, %d LTC(s)\n"

L_.str.2:                               ## @.str.2
	.asciz	"FBP %d: disabled\n"

L_.str.3:                               ## @.str.3
	.asciz	"Lower: %4lld MiB @ %010llx\n"

L_.str.4:                               ## @.str.4
	.asciz	"Upper: %4lld MiB @ %010llx\n"

L_.str.5:                               ## @.str.5
	.asciz	"Total: %4lld MiB\n"

	.comm	_NVKM_RAM_MM_NORMAL,4,2         ## @NVKM_RAM_MM_NORMAL
	.comm	_NVKM_RAM_MM_SHIFT,4,2          ## @NVKM_RAM_MM_SHIFT
	.comm	_NVKM_RAM_MM_MIXED,4,2          ## @NVKM_RAM_MM_MIXED
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_gf100_ram_ctor                 ; -- Begin function gf100_ram_ctor
	.p2align	2
_gf100_ram_ctor:                        ; @gf100_ram_ctor
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #144
	.cfi_def_cfa_offset 144
	stp	x28, x27, [sp, #48]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #64]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #80]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #96]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #112]            ; 16-byte Folded Spill
	stp	x29, x30, [sp, #128]            ; 16-byte Folded Spill
	add	x29, sp, #128
	.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
	str	x2, [sp, #32]                   ; 8-byte Folded Spill
	mov	x21, x1
	mov	x22, x0
	ldr	x24, [x1]
	ldr	x0, [x24]
	bl	_nvkm_fb_bios_memtype
	str	w0, [sp, #28]                   ; 4-byte Folded Spill
	mov	x0, x24
	mov	w1, #9272
	movk	w1, #2, lsl #16
	bl	_nvkm_rd32
	mov	x25, x0
Lloh0:
	adrp	x1, l_.str@PAGE
Lloh1:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x21
	mov	x2, x25
	bl	_nvkm_debug
	cmp	w25, #1
	b.lt	LBB0_6
; %bb.1:
	mov	w28, #0
	mov	w27, #0
	mov	w20, #0
	mov	w26, #-1
Lloh2:
	adrp	x23, l_.str.1@PAGE
Lloh3:
	add	x23, x23, l_.str.1@PAGEOFF
	b	LBB0_4
LBB0_2:                                 ;   in Loop: Header=BB0_4 Depth=1
	mov	x19, x0
	ldr	w8, [sp, #44]
	stp	x19, x8, [sp]
	mov	x0, x21
	mov	x1, x23
	mov	x2, x27
	bl	_nvkm_debug
	ldr	w8, [sp, #44]
	sdiv	w8, w19, w8
	lsl	w1, w8, #20
	mov	x0, x26
	bl	_min
	mov	x26, x0
	add	w20, w20, w19, lsl #20
	ldr	w8, [sp, #44]
	add	w28, w8, w28
LBB0_3:                                 ;   in Loop: Header=BB0_4 Depth=1
	add	w27, w27, #1
	cmp	w25, w27
	b.eq	LBB0_7
LBB0_4:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x22]
	add	x3, sp, #44
	mov	x0, x22
	mov	x1, x24
	mov	x2, x27
	blr	x8
	cbnz	w0, LBB0_2
; %bb.5:                                ;   in Loop: Header=BB0_4 Depth=1
	mov	x0, x21
Lloh4:
	adrp	x1, l_.str.2@PAGE
Lloh5:
	add	x1, x1, l_.str.2@PAGEOFF
	mov	x2, x27
	bl	_nvkm_debug
	b	LBB0_3
LBB0_6:
	mov	w20, #0
	mov	w28, #0
	mov	w26, #-1
LBB0_7:
	mul	w24, w28, w26
	ldr	w8, [x22, #8]
	add	w23, w8, w26
	sub	w19, w20, w24
	asr	w2, w24, #20
	str	xzr, [sp]
Lloh6:
	adrp	x1, l_.str.3@PAGE
Lloh7:
	add	x1, x1, l_.str.3@PAGEOFF
	mov	x0, x21
	bl	_nvkm_debug
	asr	w2, w19, #20
	str	x23, [sp]
Lloh8:
	adrp	x1, l_.str.4@PAGE
Lloh9:
	add	x1, x1, l_.str.4@PAGEOFF
	mov	x0, x21
	bl	_nvkm_debug
	asr	w2, w20, #20
Lloh10:
	adrp	x1, l_.str.5@PAGE
Lloh11:
	add	x1, x1, l_.str.5@PAGEOFF
	mov	x0, x21
	bl	_nvkm_debug
	mov	x0, x22
	mov	x1, x21
	ldr	w2, [sp, #28]                   ; 4-byte Folded Reload
	mov	x3, x20
	ldr	x22, [sp, #32]                  ; 8-byte Folded Reload
	mov	x4, x22
	bl	_nvkm_ram_ctor
	cbnz	w0, LBB0_14
; %bb.8:
	mov	x0, x22
	bl	_nvkm_mm_fini
Lloh12:
	adrp	x8, _NVKM_RAM_MM_NORMAL@GOTPAGE
Lloh13:
	ldr	x8, [x8, _NVKM_RAM_MM_NORMAL@GOTPAGEOFF]
Lloh14:
	ldr	w1, [x8]
Lloh15:
	adrp	x21, _NVKM_RAM_MM_SHIFT@GOTPAGE
Lloh16:
	ldr	x21, [x21, _NVKM_RAM_MM_SHIFT@GOTPAGEOFF]
	ldr	w8, [x21]
	mov	w9, #262144
	lsr	w2, w9, w8
	cmp	w20, w24
	b.ne	LBB0_10
; %bb.9:
	sub	w9, w20, #320, lsl #12          ; =1310720
	b	LBB0_12
LBB0_10:
	sub	w9, w24, #64, lsl #12           ; =262144
	asr	w3, w9, w8
	mov	x0, x22
	mov	w4, #1
	bl	_nvkm_mm_init
	cbnz	w0, LBB0_14
; %bb.11:
Lloh17:
	adrp	x8, _NVKM_RAM_MM_MIXED@GOTPAGE
Lloh18:
	ldr	x8, [x8, _NVKM_RAM_MM_MIXED@GOTPAGEOFF]
Lloh19:
	ldr	w1, [x8]
	ldr	w8, [x21]
	asr	w2, w23, w8
	sub	w9, w19, #256, lsl #12          ; =1048576
LBB0_12:
	asr	w3, w9, w8
	mov	x0, x22
	mov	w4, #1
	bl	_nvkm_mm_init
	cbnz	w0, LBB0_14
; %bb.13:
	mov	w0, #0
LBB0_14:
	ldp	x29, x30, [sp, #128]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #112]            ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #96]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #80]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #64]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #48]             ; 16-byte Folded Reload
	add	sp, sp, #144
	ret
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpAdd	Lloh4, Lloh5
	.loh AdrpAdd	Lloh10, Lloh11
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"%d FBP(s)\n"

l_.str.1:                               ; @.str.1
	.asciz	"FBP %d: %4d MiB, %d LTC(s)\n"

l_.str.2:                               ; @.str.2
	.asciz	"FBP %d: disabled\n"

l_.str.3:                               ; @.str.3
	.asciz	"Lower: %4lld MiB @ %010llx\n"

l_.str.4:                               ; @.str.4
	.asciz	"Upper: %4lld MiB @ %010llx\n"

l_.str.5:                               ; @.str.5
	.asciz	"Total: %4lld MiB\n"

	.comm	_NVKM_RAM_MM_NORMAL,4,2         ; @NVKM_RAM_MM_NORMAL
	.comm	_NVKM_RAM_MM_SHIFT,4,2          ; @NVKM_RAM_MM_SHIFT
	.comm	_NVKM_RAM_MM_MIXED,4,2          ; @NVKM_RAM_MM_MIXED
.subsections_via_symbols
