	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function nv04_gart_manager_new
_nv04_gart_manager_new:                 ## @nv04_gart_manager_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
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rcx, %r14
	movq	%rsi, %rbx
	movq	%rsi, %rdi
	callq	_nouveau_bo
	movq	%rax, %r15
	movl	(%rbx), %edi
	callq	_nouveau_bdev
	movl	(%r15), %edx
	movl	4(%r15), %esi
	movq	%rax, %rdi
	movq	%r14, %rcx
	callq	_nouveau_mem_new
	movl	%eax, %ebx
	movq	%r14, %rdi
	callq	_nouveau_mem
	testl	%ebx, %ebx
	je	LBB0_1
LBB0_5:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_1:
	movq	%rax, %r15
	movq	(%rax), %rax
	movq	8(%r15), %rdi
	movq	_PTES@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	movl	(%r14), %r9d
	movq	_PAGE_SHIFT@GOTPCREL(%rip), %r13
	movb	(%r13), %cl
	shll	%cl, %r9d
	movq	%rax, (%rsp)
	xorl	%ebx, %ebx
	xorl	%edx, %edx
	movl	$12, %ecx
	xorl	%r8d, %r8d
	callq	_nvif_vmm_get
	testl	%eax, %eax
	je	LBB0_4
## %bb.2:
	movl	%eax, %r12d
	movq	%r14, %rdi
	callq	_nouveau_mem_del
	movq	_ENOSPC@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%r12d, %ebx
	addl	%r12d, %eax
	jne	LBB0_5
## %bb.3:
	movq	$0, 8(%r14)
	xorl	%ebx, %ebx
	jmp	LBB0_5
LBB0_4:
	movq	(%r15), %rax
	movl	(%rax), %eax
	movb	(%r13), %cl
	sarl	%cl, %eax
	movl	%eax, 4(%r14)
	jmp	LBB0_5
	.cfi_endproc
                                        ## -- End function
	.comm	_PTES,4,2                       ## @PTES
	.comm	_PAGE_SHIFT,4,2                 ## @PAGE_SHIFT
	.comm	_ENOSPC,4,2                     ## @ENOSPC
	.no_dead_strip	_nv04_gart_manager_new
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function nv04_gart_manager_new
_nv04_gart_manager_new:                 ; @nv04_gart_manager_new
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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
	mov	x19, x3
	mov	x20, x1
	mov	x0, x1
	bl	_nouveau_bo
	mov	x21, x0
	ldr	w0, [x20]
	bl	_nouveau_bdev
	ldp	w2, w1, [x21]
	mov	x3, x19
	bl	_nouveau_mem_new
	mov	x20, x0
	mov	x0, x19
	bl	_nouveau_mem
	cbz	w20, LBB0_2
LBB0_1:
	mov	x0, x20
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
LBB0_2:
	mov	x21, x0
Lloh0:
	adrp	x8, _PTES@GOTPAGE
Lloh1:
	ldr	x8, [x8, _PTES@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	ldr	w8, [x19]
Lloh3:
	adrp	x22, _PAGE_SHIFT@GOTPAGE
Lloh4:
	ldr	x22, [x22, _PAGE_SHIFT@GOTPAGEOFF]
	ldr	w9, [x22]
	lsl	w5, w8, w9
	ldr	x0, [x0, #8]
	ldr	x6, [x21]
	mov	w2, #0
	mov	w3, #12
	mov	w4, #0
	bl	_nvif_vmm_get
	mov	x20, x0
	cbz	w0, LBB0_5
; %bb.3:
	mov	x0, x19
	bl	_nouveau_mem_del
Lloh5:
	adrp	x8, _ENOSPC@GOTPAGE
Lloh6:
	ldr	x8, [x8, _ENOSPC@GOTPAGEOFF]
Lloh7:
	ldr	w8, [x8]
	cmn	w20, w8
	b.ne	LBB0_1
; %bb.4:
	mov	w20, #0
	str	xzr, [x19, #8]
	b	LBB0_1
LBB0_5:
	ldr	x8, [x21]
	ldr	w8, [x8]
	ldr	w9, [x22]
	asr	w8, w8, w9
	str	w8, [x19, #4]
	b	LBB0_1
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.cfi_endproc
                                        ; -- End function
	.comm	_PTES,4,2                       ; @PTES
	.comm	_PAGE_SHIFT,4,2                 ; @PAGE_SHIFT
	.comm	_ENOSPC,4,2                     ; @ENOSPC
	.no_dead_strip	_nv04_gart_manager_new
.subsections_via_symbols
