	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function nv20_devinit_meminit
_nv20_devinit_meminit:                  ## @nv20_devinit_meminit
	.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, %r12
	movq	(%rdi), %r15
	cmpl	$37, (%r15)
	movl	$768, %eax                      ## imm = 0x300
	movl	$2304, %r14d                    ## imm = 0x900
	cmovgel	%eax, %r14d
	movq	%r15, %rdi
	callq	_fbmem_init
	testq	%rax, %rax
	je	LBB0_7
## %bb.1:
	movq	%rax, %r13
	movq	_NV10_PFB_REFCTRL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_NV10_PFB_REFCTRL_VALID_1@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r15, %rdi
	callq	_nvkm_wr32
	movq	_NV04_PFB_CFG0@GOTPCREL(%rip), %r12
	movl	(%r12), %esi
	movq	%r15, %rdi
	xorl	%edx, %edx
	movl	%r14d, %ecx
	callq	_nvkm_mask
	movq	%r15, %rdi
	movl	$1049100, %esi                  ## imm = 0x10020C
	callq	_nvkm_rd32
	cmpl	$33554433, %eax                 ## imm = 0x2000001
	jl	LBB0_4
## %bb.2:
	movl	%eax, %esi
	addl	$33554432, %esi                 ## imm = 0x2000000
	.p2align	4, 0x90
LBB0_3:                                 ## =>This Inner Loop Header: Depth=1
	leal	-33554432(%rsi), %ebx
	addl	$-33554436, %esi                ## imm = 0xFDFFFFFC
	movq	%r13, %rdi
                                        ## kill: def $esi killed $esi killed $rsi
	movl	%ebx, %edx
	callq	_fbmem_poke
	movl	%ebx, %esi
	cmpl	$67108864, %ebx                 ## imm = 0x4000000
	ja	LBB0_3
LBB0_4:
	movq	%r15, %rdi
	movl	$1049100, %esi                  ## imm = 0x10020C
	callq	_nvkm_rd32
	movl	%eax, %ebx
	leal	-4(%rbx), %esi
	movq	%r13, %rdi
	callq	_fbmem_peek
	cmpl	%eax, %ebx
	je	LBB0_6
## %bb.5:
	movl	(%r12), %esi
	movq	%r15, %rdi
	movl	%r14d, %edx
	xorl	%ecx, %ecx
	callq	_nvkm_mask
LBB0_6:
	movq	%r13, %rdi
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_fbmem_fini                     ## TAILCALL
LBB0_7:
	leaq	L_.str(%rip), %rsi
	movq	%r12, %rdi
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_nvkm_error                     ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"failed to map fb\n"

	.comm	_NV10_PFB_REFCTRL,4,2           ## @NV10_PFB_REFCTRL
	.comm	_NV10_PFB_REFCTRL_VALID_1,4,2   ## @NV10_PFB_REFCTRL_VALID_1
	.comm	_NV04_PFB_CFG0,4,2              ## @NV04_PFB_CFG0
	.no_dead_strip	_nv20_devinit_meminit
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function nv20_devinit_meminit
_nv20_devinit_meminit:                  ; @nv20_devinit_meminit
	.cfi_startproc
; %bb.0:
	stp	x26, x25, [sp, #-80]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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
	mov	x22, x0
	ldr	x19, [x0]
	ldr	w8, [x19]
	mov	w9, #2304
	mov	w10, #768
	cmp	w8, #36
	csel	w20, w10, w9, gt
	mov	x0, x19
	bl	_fbmem_init
	cbz	x0, LBB0_7
; %bb.1:
	mov	x21, x0
Lloh0:
	adrp	x8, _NV10_PFB_REFCTRL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _NV10_PFB_REFCTRL@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
Lloh3:
	adrp	x8, _NV10_PFB_REFCTRL_VALID_1@GOTPAGE
Lloh4:
	ldr	x8, [x8, _NV10_PFB_REFCTRL_VALID_1@GOTPAGEOFF]
Lloh5:
	ldr	w2, [x8]
	mov	x0, x19
	bl	_nvkm_wr32
Lloh6:
	adrp	x24, _NV04_PFB_CFG0@GOTPAGE
Lloh7:
	ldr	x24, [x24, _NV04_PFB_CFG0@GOTPAGEOFF]
	ldr	w1, [x24]
	mov	x0, x19
	mov	w2, #0
	mov	x3, x20
	bl	_nvkm_mask
	mov	x0, x19
	mov	w1, #524
	movk	w1, #16, lsl #16
	bl	_nvkm_rd32
	mov	w8, #1
	movk	w8, #512, lsl #16
	cmp	w0, w8
	b.lt	LBB0_4
; %bb.2:
	sub	w22, w0, #4
	mov	w25, #-33554432
	mov	w26, #67108864
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	add	w23, w22, #4
	mov	x0, x21
	mov	x1, x22
	mov	x2, x23
	bl	_fbmem_poke
	add	w22, w22, w25
	cmp	w23, w26
	b.hi	LBB0_3
LBB0_4:
	mov	x0, x19
	mov	w1, #524
	movk	w1, #16, lsl #16
	bl	_nvkm_rd32
	mov	x22, x0
	sub	w1, w0, #4
	mov	x0, x21
	bl	_fbmem_peek
	cmp	w22, w0
	b.eq	LBB0_6
; %bb.5:
	ldr	w1, [x24]
	mov	x0, x19
	mov	x2, x20
	mov	w3, #0
	bl	_nvkm_mask
LBB0_6:
	mov	x0, x21
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	b	_fbmem_fini
LBB0_7:
Lloh8:
	adrp	x1, l_.str@PAGE
Lloh9:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x22
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	b	_nvkm_error
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh8, Lloh9
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"failed to map fb\n"

	.comm	_NV10_PFB_REFCTRL,4,2           ; @NV10_PFB_REFCTRL
	.comm	_NV10_PFB_REFCTRL_VALID_1,4,2   ; @NV10_PFB_REFCTRL_VALID_1
	.comm	_NV04_PFB_CFG0,4,2              ; @NV04_PFB_CFG0
	.no_dead_strip	_nv20_devinit_meminit
.subsections_via_symbols
