	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function nvkm_mmu_vram
_nvkm_mmu_vram:                         ## @nvkm_mmu_vram
	.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	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r14
	movq	8(%rdi), %rax
	movq	%rax, -56(%rbp)                 ## 8-byte Spill
	movq	8(%rax), %rax
	movq	(%rax), %rbx
	movq	_NVKM_RAM_MM_NORMAL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	callq	_nvkm_mm_heap_size
	movl	%eax, %r12d
	movq	_NVKM_RAM_MM_NOMAP@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	callq	_nvkm_mm_heap_size
	movl	%eax, %r13d
	movq	_NVKM_RAM_MM_MIXED@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	callq	_nvkm_mm_heap_size
	movq	(%r14), %rcx
	movl	(%rcx), %ebx
	testl	%ebx, %ebx
	je	LBB0_2
## %bb.1:
	movq	_NVKM_MEM_KIND@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ebx
LBB0_2:
	movq	_NVKM_MEM_VRAM@GOTPCREL(%rip), %rcx
	movl	(%rcx), %r15d
	movq	_NVKM_RAM_MM_SHIFT@GOTPCREL(%rip), %rcx
	movb	(%rcx), %cl
	shll	%cl, %eax
	movq	%r14, %rdi
	movl	%r15d, %esi
	movl	%eax, %edx
	callq	_nvkm_mmu_heap
	movq	_NVKM_MEM_COMP@GOTPCREL(%rip), %rcx
	orl	(%rcx), %r15d
	movl	%eax, -44(%rbp)                 ## 4-byte Spill
	movq	_NVKM_MEM_DISP@GOTPCREL(%rip), %rax
	orl	(%rax), %r15d
	movq	_NVKM_RAM_MM_SHIFT@GOTPCREL(%rip), %rax
	movb	(%rax), %cl
	shll	%cl, %r12d
	movq	%r14, %rdi
	movl	%r15d, %esi
	movl	%r12d, %edx
	callq	_nvkm_mmu_heap
	movl	%eax, %r12d
	movq	_NVKM_RAM_MM_SHIFT@GOTPCREL(%rip), %rax
	movb	(%rax), %cl
	shll	%cl, %r13d
	movq	%r14, %rdi
	movl	%r15d, %esi
	movl	-44(%rbp), %r15d                ## 4-byte Reload
	movl	%r13d, %edx
	callq	_nvkm_mmu_heap
	movq	%r14, %rdi
	movl	%eax, %esi
	movl	%ebx, %edx
	callq	_nvkm_mmu_type
	movq	%r14, %rdi
	movl	%r12d, %esi
	movl	%ebx, %edx
	callq	_nvkm_mmu_type
	movq	%r14, %rdi
	movl	%r15d, %esi
	movl	%ebx, %edx
	callq	_nvkm_mmu_type
	movq	%r14, %rdi
	callq	_nvkm_mmu_host
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	movq	(%rax), %rax
	testq	%rax, %rax
	je	LBB0_6
## %bb.3:
	movq	_NVKM_MEM_MAPPABLE@GOTPCREL(%rip), %rcx
	orl	(%rcx), %ebx
	cmpl	$0, (%rax)
	jne	LBB0_5
## %bb.4:
	movq	%r14, %rdi
	movl	%r12d, %esi
	movl	%ebx, %edx
	callq	_nvkm_mmu_type
	movq	%r14, %rdi
	movl	%r15d, %esi
	movl	%ebx, %edx
	callq	_nvkm_mmu_type
LBB0_5:
	movq	_NVKM_MEM_COHERENT@GOTPCREL(%rip), %rax
	orl	(%rax), %ebx
	movq	_NVKM_MEM_UNCACHED@GOTPCREL(%rip), %rax
	orl	(%rax), %ebx
	movq	%r14, %rdi
	movl	%r12d, %esi
	movl	%ebx, %edx
	callq	_nvkm_mmu_type
	movq	%r14, %rdi
	movl	%r15d, %esi
	movl	%ebx, %edx
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_nvkm_mmu_type                  ## TAILCALL
LBB0_6:
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_NVKM_RAM_MM_NORMAL,4,2         ## @NVKM_RAM_MM_NORMAL
	.comm	_NVKM_RAM_MM_NOMAP,4,2          ## @NVKM_RAM_MM_NOMAP
	.comm	_NVKM_RAM_MM_MIXED,4,2          ## @NVKM_RAM_MM_MIXED
	.comm	_NVKM_MEM_KIND,4,2              ## @NVKM_MEM_KIND
	.comm	_NVKM_MEM_VRAM,4,2              ## @NVKM_MEM_VRAM
	.comm	_NVKM_RAM_MM_SHIFT,4,2          ## @NVKM_RAM_MM_SHIFT
	.comm	_NVKM_MEM_COMP,4,2              ## @NVKM_MEM_COMP
	.comm	_NVKM_MEM_DISP,4,2              ## @NVKM_MEM_DISP
	.comm	_NVKM_MEM_MAPPABLE,4,2          ## @NVKM_MEM_MAPPABLE
	.comm	_NVKM_MEM_COHERENT,4,2          ## @NVKM_MEM_COHERENT
	.comm	_NVKM_MEM_UNCACHED,4,2          ## @NVKM_MEM_UNCACHED
	.no_dead_strip	_nvkm_mmu_vram
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function nvkm_mmu_vram
_nvkm_mmu_vram:                         ; @nvkm_mmu_vram
	.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	x19, x0
	ldr	x25, [x0, #8]
	ldr	x8, [x25, #8]
	ldr	x20, [x8]
Lloh0:
	adrp	x8, _NVKM_RAM_MM_NORMAL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _NVKM_RAM_MM_NORMAL@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	mov	x0, x20
	bl	_nvkm_mm_heap_size
	mov	x22, x0
Lloh3:
	adrp	x8, _NVKM_RAM_MM_NOMAP@GOTPAGE
Lloh4:
	ldr	x8, [x8, _NVKM_RAM_MM_NOMAP@GOTPAGEOFF]
Lloh5:
	ldr	w1, [x8]
	mov	x0, x20
	bl	_nvkm_mm_heap_size
	mov	x23, x0
Lloh6:
	adrp	x8, _NVKM_RAM_MM_MIXED@GOTPAGE
Lloh7:
	ldr	x8, [x8, _NVKM_RAM_MM_MIXED@GOTPAGEOFF]
Lloh8:
	ldr	w1, [x8]
	mov	x0, x20
	bl	_nvkm_mm_heap_size
Lloh9:
	adrp	x8, _NVKM_MEM_KIND@GOTPAGE
Lloh10:
	ldr	x8, [x8, _NVKM_MEM_KIND@GOTPAGEOFF]
Lloh11:
	ldr	w8, [x8]
	ldr	x9, [x19]
	ldr	w9, [x9]
Lloh12:
	adrp	x10, _NVKM_MEM_VRAM@GOTPAGE
Lloh13:
	ldr	x10, [x10, _NVKM_MEM_VRAM@GOTPAGEOFF]
	cmp	w9, #0
	csel	w21, wzr, w8, eq
Lloh14:
	ldr	w24, [x10]
Lloh15:
	adrp	x26, _NVKM_RAM_MM_SHIFT@GOTPAGE
Lloh16:
	ldr	x26, [x26, _NVKM_RAM_MM_SHIFT@GOTPAGEOFF]
	ldr	w8, [x26]
	lsl	w2, w0, w8
	mov	x0, x19
	mov	x1, x24
	bl	_nvkm_mmu_heap
	mov	x20, x0
Lloh17:
	adrp	x8, _NVKM_MEM_COMP@GOTPAGE
Lloh18:
	ldr	x8, [x8, _NVKM_MEM_COMP@GOTPAGEOFF]
Lloh19:
	ldr	w8, [x8]
	orr	w8, w8, w24
Lloh20:
	adrp	x9, _NVKM_MEM_DISP@GOTPAGE
Lloh21:
	ldr	x9, [x9, _NVKM_MEM_DISP@GOTPAGEOFF]
Lloh22:
	ldr	w9, [x9]
	orr	w24, w8, w9
	ldr	w8, [x26]
	lsl	w2, w22, w8
	mov	x0, x19
	mov	x1, x24
	bl	_nvkm_mmu_heap
	mov	x22, x0
	ldr	w8, [x26]
	lsl	w2, w23, w8
	mov	x0, x19
	mov	x1, x24
	bl	_nvkm_mmu_heap
	mov	x1, x0
	mov	x0, x19
	mov	x2, x21
	bl	_nvkm_mmu_type
	mov	x0, x19
	mov	x1, x22
	mov	x2, x21
	bl	_nvkm_mmu_type
	mov	x0, x19
	mov	x1, x20
	mov	x2, x21
	bl	_nvkm_mmu_type
	mov	x0, x19
	bl	_nvkm_mmu_host
	ldr	x8, [x25]
	cbz	x8, LBB0_4
; %bb.1:
Lloh23:
	adrp	x9, _NVKM_MEM_MAPPABLE@GOTPAGE
Lloh24:
	ldr	x9, [x9, _NVKM_MEM_MAPPABLE@GOTPAGEOFF]
Lloh25:
	ldr	w9, [x9]
	orr	w21, w9, w21
	ldr	w8, [x8]
	cbnz	w8, LBB0_3
; %bb.2:
	mov	x0, x19
	mov	x1, x22
	mov	x2, x21
	bl	_nvkm_mmu_type
	mov	x0, x19
	mov	x1, x20
	mov	x2, x21
	bl	_nvkm_mmu_type
LBB0_3:
Lloh26:
	adrp	x8, _NVKM_MEM_COHERENT@GOTPAGE
Lloh27:
	ldr	x8, [x8, _NVKM_MEM_COHERENT@GOTPAGEOFF]
Lloh28:
	ldr	w8, [x8]
	orr	w8, w8, w21
Lloh29:
	adrp	x9, _NVKM_MEM_UNCACHED@GOTPAGE
Lloh30:
	ldr	x9, [x9, _NVKM_MEM_UNCACHED@GOTPAGEOFF]
Lloh31:
	ldr	w9, [x9]
	orr	w21, w8, w9
	mov	x0, x19
	mov	x1, x22
	mov	x2, x21
	bl	_nvkm_mmu_type
	mov	x0, x19
	mov	x1, x20
	mov	x2, 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	_nvkm_mmu_type
LBB0_4:
	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
	ret
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGot	Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.loh AdrpLdrGotLdr	Lloh29, Lloh30, Lloh31
	.loh AdrpLdrGotLdr	Lloh26, Lloh27, Lloh28
	.cfi_endproc
                                        ; -- End function
	.comm	_NVKM_RAM_MM_NORMAL,4,2         ; @NVKM_RAM_MM_NORMAL
	.comm	_NVKM_RAM_MM_NOMAP,4,2          ; @NVKM_RAM_MM_NOMAP
	.comm	_NVKM_RAM_MM_MIXED,4,2          ; @NVKM_RAM_MM_MIXED
	.comm	_NVKM_MEM_KIND,4,2              ; @NVKM_MEM_KIND
	.comm	_NVKM_MEM_VRAM,4,2              ; @NVKM_MEM_VRAM
	.comm	_NVKM_RAM_MM_SHIFT,4,2          ; @NVKM_RAM_MM_SHIFT
	.comm	_NVKM_MEM_COMP,4,2              ; @NVKM_MEM_COMP
	.comm	_NVKM_MEM_DISP,4,2              ; @NVKM_MEM_DISP
	.comm	_NVKM_MEM_MAPPABLE,4,2          ; @NVKM_MEM_MAPPABLE
	.comm	_NVKM_MEM_COHERENT,4,2          ; @NVKM_MEM_COHERENT
	.comm	_NVKM_MEM_UNCACHED,4,2          ; @NVKM_MEM_UNCACHED
	.no_dead_strip	_nvkm_mmu_vram
.subsections_via_symbols
