	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function nouveau_vma_getmap
_nouveau_vma_getmap:                    ## @nouveau_vma_getmap
	.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	%rcx, %r15
	movq	%rdx, %rbx
	movq	16(%rdx), %r14
	movl	(%rdi), %edi
	callq	_nv_client
	movl	(%rbx), %esi
	movq	_PAGE_SHIFT@GOTPCREL(%rip), %r13
	movb	(%r13), %cl
	shll	%cl, %esi
	movl	(%rax), %edi
	movl	(%r14), %edx
	movq	_NV_MEM_ACCESS_RW@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movq	%r15, %r8
	callq	_nouveau_vm_get
	movl	%eax, %r12d
	testl	%eax, %eax
	jne	LBB0_4
## %bb.1:
	movq	8(%rbx), %rax
	movq	_TTM_PL_VRAM@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_3
## %bb.2:
	movq	%r15, %rdi
	movq	%r14, %rsi
	callq	_nouveau_vm_map
	jmp	LBB0_4
LBB0_3:
	movl	(%rbx), %edx
	movb	(%r13), %cl
	shll	%cl, %edx
	movq	%r15, %rdi
	xorl	%esi, %esi
	movq	%r14, %rcx
	callq	_nouveau_vm_map_sg
LBB0_4:
	movl	%r12d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_PAGE_SHIFT,4,2                 ## @PAGE_SHIFT
	.comm	_NV_MEM_ACCESS_RW,4,2           ## @NV_MEM_ACCESS_RW
	.comm	_TTM_PL_VRAM,8,3                ## @TTM_PL_VRAM
	.no_dead_strip	_nouveau_vma_getmap
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function nouveau_vma_getmap
_nouveau_vma_getmap:                    ; @nouveau_vma_getmap
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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
	mov	x20, x3
	mov	x21, x2
	ldr	x19, [x2, #16]
	ldr	w0, [x0]
	bl	_nv_client
	ldr	w0, [x0]
	ldr	w8, [x21]
Lloh0:
	adrp	x23, _PAGE_SHIFT@GOTPAGE
Lloh1:
	ldr	x23, [x23, _PAGE_SHIFT@GOTPAGEOFF]
	ldr	w9, [x23]
	lsl	w1, w8, w9
	ldr	w2, [x19]
Lloh2:
	adrp	x8, _NV_MEM_ACCESS_RW@GOTPAGE
Lloh3:
	ldr	x8, [x8, _NV_MEM_ACCESS_RW@GOTPAGEOFF]
Lloh4:
	ldr	w3, [x8]
	mov	x4, x20
	bl	_nouveau_vm_get
	mov	x22, x0
	cbnz	w0, LBB0_4
; %bb.1:
	ldr	x8, [x21, #8]
Lloh5:
	adrp	x9, _TTM_PL_VRAM@GOTPAGE
Lloh6:
	ldr	x9, [x9, _TTM_PL_VRAM@GOTPAGEOFF]
Lloh7:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_3
; %bb.2:
	mov	x0, x20
	mov	x1, x19
	bl	_nouveau_vm_map
	b	LBB0_4
LBB0_3:
	ldr	w8, [x21]
	ldr	w9, [x23]
	lsl	w2, w8, w9
	mov	x0, x20
	mov	w1, #0
	mov	x3, x19
	bl	_nouveau_vm_map_sg
LBB0_4:
	mov	x0, x22
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.cfi_endproc
                                        ; -- End function
	.comm	_PAGE_SHIFT,4,2                 ; @PAGE_SHIFT
	.comm	_NV_MEM_ACCESS_RW,4,2           ; @NV_MEM_ACCESS_RW
	.comm	_TTM_PL_VRAM,8,3                ; @TTM_PL_VRAM
	.no_dead_strip	_nouveau_vma_getmap
.subsections_via_symbols
