	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_nouveau_vma_new                ## -- Begin function nouveau_vma_new
	.p2align	4, 0x90
_nouveau_vma_new:                       ## @nouveau_vma_new
	.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	%rdx, %r15
	movq	%rsi, %r13
	movq	%rdi, %rbx
	addq	$8, %rdi
	callq	_nouveau_mem
	movq	%rax, %r14
	movq	%rbx, %rdi
	movq	%r13, %rsi
	callq	_nouveau_vma_find
	movq	%rax, (%r15)
	testq	%rax, %rax
	je	LBB0_2
## %bb.1:
	incl	(%rax)
LBB0_11:
	xorl	%ebx, %ebx
LBB0_12:
	movl	%ebx, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_2:
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	$48, %edi
	callq	_kmalloc
	movq	%rax, (%r15)
	testq	%rax, %rax
	je	LBB0_10
## %bb.3:
	movq	%rax, %r12
	movq	%r13, 40(%rax)
	movl	$1, (%rax)
	movq	$-1, 8(%rax)
	movq	%rax, %rdi
	addq	$16, %rdi
	leaq	16(%rbx), %rsi
	xorps	%xmm0, %xmm0
	movups	%xmm0, 24(%rax)
	callq	_list_add_tail
	movq	8(%rbx), %rax
	movq	_TTM_PL_SYSTEM@GOTPCREL(%rip), %rdx
	movq	(%r14), %rcx
	cmpq	(%rdx), %rax
	je	LBB0_7
## %bb.4:
	cmpq	(%rbx), %rcx
	jne	LBB0_7
## %bb.5:
	movq	_LAZY@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	8(%r14), %r9d
	leaq	-48(%rbp), %rax
	movq	%rax, (%rsp)
	movq	%r13, %rdi
	xorl	%edx, %edx
	xorl	%r8d, %r8d
	callq	_nvif_vmm_get
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_9
## %bb.6:
	movq	-48(%rbp), %rax
	movq	%rax, 8(%r12)
	movq	%r12, %rdi
	movq	%r14, %rsi
	callq	_nouveau_vma_map
	movl	%eax, %ebx
	jmp	LBB0_8
LBB0_7:
	movq	_PTES@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	8(%r14), %r9d
	leaq	-48(%rbp), %rax
	movq	%rax, (%rsp)
	movq	%r13, %rdi
	xorl	%edx, %edx
	xorl	%r8d, %r8d
	callq	_nvif_vmm_get
	movl	%eax, %ebx
	movq	-48(%rbp), %rax
	movq	%rax, 8(%r12)
LBB0_8:
	testl	%ebx, %ebx
	je	LBB0_11
LBB0_9:
	movq	%r15, %rdi
	callq	_nouveau_vma_del
	jmp	LBB0_12
LBB0_10:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
	jmp	LBB0_12
	.cfi_endproc
                                        ## -- End function
	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_TTM_PL_SYSTEM,8,3              ## @TTM_PL_SYSTEM
	.comm	_LAZY,4,2                       ## @LAZY
	.comm	_PTES,4,2                       ## @PTES
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_nouveau_vma_new                ; -- Begin function nouveau_vma_new
	.p2align	2
_nouveau_vma_new:                       ; @nouveau_vma_new
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.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
	mov	x19, x2
	mov	x20, x1
	mov	x23, x0
	add	x0, x0, #8
	bl	_nouveau_mem
	mov	x21, x0
	mov	x0, x23
	mov	x1, x20
	bl	_nouveau_vma_find
	str	x0, [x19]
	cbz	x0, LBB0_2
; %bb.1:
	mov	w20, #0
	ldr	w8, [x0]
	add	w8, w8, #1
	str	w8, [x0]
	b	LBB0_11
LBB0_2:
Lloh0:
	adrp	x8, _GFP_KERNEL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _GFP_KERNEL@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	mov	w0, #48
	bl	_kmalloc
	str	x0, [x19]
	cbz	x0, LBB0_10
; %bb.3:
	mov	x22, x0
	str	x20, [x0, #40]
	mov	w8, #1
	str	w8, [x0]
	mov	x8, #-1
	str	x8, [x0, #8]
	add	x0, x0, #16
	add	x1, x23, #16
	stp	xzr, xzr, [x22, #24]
	bl	_list_add_tail
	ldr	x8, [x23, #8]
Lloh3:
	adrp	x9, _TTM_PL_SYSTEM@GOTPAGE
Lloh4:
	ldr	x9, [x9, _TTM_PL_SYSTEM@GOTPAGEOFF]
Lloh5:
	ldr	x9, [x9]
	ldr	x3, [x21]
	cmp	x8, x9
	b.eq	LBB0_7
; %bb.4:
	ldr	x8, [x23]
	cmp	x3, x8
	b.ne	LBB0_7
; %bb.5:
Lloh6:
	adrp	x8, _LAZY@GOTPAGE
Lloh7:
	ldr	x8, [x8, _LAZY@GOTPAGEOFF]
Lloh8:
	ldr	w1, [x8]
	ldr	w5, [x21, #8]
	add	x6, sp, #8
	mov	x0, x20
	mov	w2, #0
	mov	w4, #0
	bl	_nvif_vmm_get
	mov	x20, x0
	cbnz	w0, LBB0_9
; %bb.6:
	ldr	x8, [sp, #8]
	str	x8, [x22, #8]
	mov	x0, x22
	mov	x1, x21
	bl	_nouveau_vma_map
	mov	x20, x0
	b	LBB0_8
LBB0_7:
Lloh9:
	adrp	x8, _PTES@GOTPAGE
Lloh10:
	ldr	x8, [x8, _PTES@GOTPAGEOFF]
Lloh11:
	ldr	w1, [x8]
	ldr	w5, [x21, #8]
	add	x6, sp, #8
	mov	x0, x20
	mov	w2, #0
	mov	w4, #0
	bl	_nvif_vmm_get
	mov	x20, x0
	ldr	x8, [sp, #8]
	str	x8, [x22, #8]
LBB0_8:
	cbz	w20, LBB0_11
LBB0_9:
	mov	x0, x19
	bl	_nouveau_vma_del
	b	LBB0_11
LBB0_10:
Lloh12:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh13:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh14:
	ldr	w8, [x8]
	neg	w20, w8
LBB0_11:
	mov	x0, x20
	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
	add	sp, sp, #80
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.cfi_endproc
                                        ; -- End function
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_TTM_PL_SYSTEM,8,3              ; @TTM_PL_SYSTEM
	.comm	_LAZY,4,2                       ; @LAZY
	.comm	_PTES,4,2                       ; @PTES
.subsections_via_symbols
