	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function nv04_fb_vram_init
_nv04_fb_vram_init:                     ## @nv04_fb_vram_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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -24
	movq	%rdi, %rbx
	movq	_NV04_PFB_BOOT_0@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_nv_rd32
	testl	$256, %eax                      ## imm = 0x100
	jne	LBB0_1
## %bb.2:
	movq	_NV04_PFB_BOOT_0_RAM_AMOUNT@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	andl	%eax, %ecx
	addl	$-128, %ecx
	cmpl	$3, %ecx
	ja	LBB0_8
## %bb.3:
	leaq	LJTI0_0(%rip), %rdx
	movslq	(%rdx,%rcx,4), %rcx
	addq	%rdx, %rcx
	jmpq	*%rcx
LBB0_6:
	movl	$8388608, (%rbx)                ## imm = 0x800000
	jmp	LBB0_8
LBB0_1:
	movl	%eax, %ecx
	shll	$9, %ecx
	andl	$31457280, %ecx                 ## imm = 0x1E00000
	addl	$2097152, %ecx                  ## imm = 0x200000
	movl	%ecx, (%rbx)
LBB0_8:
	andl	$56, %eax
	cmpl	$17, %eax
	jae	LBB0_9
## %bb.10:
	movq	_NV_MEM_TYPE_SGRAM@GOTPCREL(%rip), %rax
	jmp	LBB0_11
LBB0_9:
	movq	_NV_MEM_TYPE_SDRAM@GOTPCREL(%rip), %rax
LBB0_11:
	movl	(%rax), %eax
	movl	%eax, 4(%rbx)
	xorl	%eax, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%rbp
	retq
LBB0_7:
	movl	$4194304, (%rbx)                ## imm = 0x400000
	jmp	LBB0_8
LBB0_4:
	movl	$33554432, (%rbx)               ## imm = 0x2000000
	jmp	LBB0_8
LBB0_5:
	movl	$16777216, (%rbx)               ## imm = 0x1000000
	jmp	LBB0_8
	.cfi_endproc
	.p2align	2, 0x90
	.data_region jt32
.set L0_0_set_6, LBB0_6-LJTI0_0
.set L0_0_set_7, LBB0_7-LJTI0_0
.set L0_0_set_4, LBB0_4-LJTI0_0
.set L0_0_set_5, LBB0_5-LJTI0_0
LJTI0_0:
	.long	L0_0_set_6
	.long	L0_0_set_7
	.long	L0_0_set_4
	.long	L0_0_set_5
	.end_data_region
                                        ## -- End function
	.comm	_NV04_PFB_BOOT_0,4,2            ## @NV04_PFB_BOOT_0
	.comm	_NV04_PFB_BOOT_0_RAM_AMOUNT,4,2 ## @NV04_PFB_BOOT_0_RAM_AMOUNT
	.comm	_NV_MEM_TYPE_SGRAM,4,2          ## @NV_MEM_TYPE_SGRAM
	.comm	_NV_MEM_TYPE_SDRAM,4,2          ## @NV_MEM_TYPE_SDRAM
	.no_dead_strip	_nv04_fb_vram_init
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function nv04_fb_vram_init
_nv04_fb_vram_init:                     ; @nv04_fb_vram_init
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	mov	x19, x0
Lloh0:
	adrp	x8, _NV04_PFB_BOOT_0@GOTPAGE
Lloh1:
	ldr	x8, [x8, _NV04_PFB_BOOT_0@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	bl	_nv_rd32
	tbnz	w0, #8, LBB0_4
; %bb.1:
Lloh3:
	adrp	x8, _NV04_PFB_BOOT_0_RAM_AMOUNT@GOTPAGE
Lloh4:
	ldr	x8, [x8, _NV04_PFB_BOOT_0_RAM_AMOUNT@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	and	w8, w8, w0
	sub	w8, w8, #128
	cmp	w8, #3
	b.hi	LBB0_6
; %bb.2:
Lloh6:
	adrp	x9, lJTI0_0@PAGE
Lloh7:
	add	x9, x9, lJTI0_0@PAGEOFF
	adr	x10, LBB0_3
	ldrb	w11, [x9, x8]
	add	x10, x10, x11, lsl #2
	br	x10
LBB0_3:
	mov	w8, #8388608
	b	LBB0_5
LBB0_4:
	lsl	w8, w0, #9
	and	w8, w8, #0x1e00000
	add	w8, w8, #512, lsl #12           ; =2097152
LBB0_5:
	str	w8, [x19]
LBB0_6:
Lloh8:
	adrp	x8, _NV_MEM_TYPE_SGRAM@GOTPAGE
Lloh9:
	ldr	x8, [x8, _NV_MEM_TYPE_SGRAM@GOTPAGEOFF]
Lloh10:
	adrp	x9, _NV_MEM_TYPE_SDRAM@GOTPAGE
Lloh11:
	ldr	x9, [x9, _NV_MEM_TYPE_SDRAM@GOTPAGEOFF]
	and	w10, w0, #0x38
	cmp	w10, #17
	csel	x8, x8, x9, lo
	ldr	w8, [x8]
	str	w8, [x19, #4]
	mov	w0, #0
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
LBB0_7:
	mov	w8, #4194304
	b	LBB0_5
LBB0_8:
	mov	w8, #33554432
	b	LBB0_5
LBB0_9:
	mov	w8, #16777216
	b	LBB0_5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh8, Lloh9
	.cfi_endproc
	.section	__TEXT,__const
lJTI0_0:
	.byte	(LBB0_3-LBB0_3)>>2
	.byte	(LBB0_7-LBB0_3)>>2
	.byte	(LBB0_8-LBB0_3)>>2
	.byte	(LBB0_9-LBB0_3)>>2
                                        ; -- End function
	.comm	_NV04_PFB_BOOT_0,4,2            ; @NV04_PFB_BOOT_0
	.comm	_NV04_PFB_BOOT_0_RAM_AMOUNT,4,2 ; @NV04_PFB_BOOT_0_RAM_AMOUNT
	.comm	_NV_MEM_TYPE_SGRAM,4,2          ; @NV_MEM_TYPE_SGRAM
	.comm	_NV_MEM_TYPE_SDRAM,4,2          ; @NV_MEM_TYPE_SDRAM
	.no_dead_strip	_nv04_fb_vram_init
.subsections_via_symbols
