	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function nouveau_vram_manager_new
_nouveau_vram_manager_new:              ## @nouveau_vram_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	%r12
	pushq	%rbx
	subq	$16, %rsp
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rcx, %r14
	movq	%rsi, %rbx
	movl	(%rdi), %edi
	callq	_nouveau_bdev
	movl	(%rax), %edi
	callq	_nouveau_fb
	movq	%rax, %r12
	movq	%rbx, %rdi
	callq	_nouveau_bo
	movq	%rax, %r15
	movl	(%rax), %r8d
	movq	_NOUVEAU_GEM_TILE_NONCONTIG@GOTPCREL(%rip), %rax
	testl	%r8d, (%rax)
	je	LBB0_1
## %bb.2:
	movb	4(%r15), %cl
	movl	$1, %eax
	shll	%cl, %eax
	jmp	LBB0_3
LBB0_1:
	xorl	%eax, %eax
LBB0_3:
	movq	_PAGE_SHIFT@GOTPCREL(%rip), %rbx
	movb	(%rbx), %cl
	movl	(%r14), %esi
	shll	%cl, %esi
	movl	4(%r14), %edx
	shll	%cl, %edx
	shrl	$8, %r8d
	andl	$1023, %r8d                     ## imm = 0x3FF
	leaq	-40(%rbp), %r9
	movq	%r12, %rdi
	movl	%eax, %ecx
	callq	*(%r12)
	testl	%eax, %eax
	je	LBB0_5
## %bb.4:
	movq	_ENOSPC@GOTPCREL(%rip), %rcx
	xorl	%edx, %edx
	movl	(%rcx), %ecx
	addl	%eax, %ecx
	cmovel	%edx, %eax
	jmp	LBB0_6
LBB0_5:
	movl	4(%r15), %eax
	movq	-40(%rbp), %rdx
	movl	%eax, (%rdx)
	movl	4(%rdx), %eax
	movb	(%rbx), %cl
	sarl	%cl, %eax
	movl	%eax, 8(%r14)
	xorl	%eax, %eax
LBB0_6:
	movq	%rdx, 16(%r14)
	addq	$16, %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_NOUVEAU_GEM_TILE_NONCONTIG,4,2 ## @NOUVEAU_GEM_TILE_NONCONTIG
	.comm	_PAGE_SHIFT,4,2                 ## @PAGE_SHIFT
	.comm	_ENOSPC,4,2                     ## @ENOSPC
	.no_dead_strip	_nouveau_vram_manager_new
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function nouveau_vram_manager_new
_nouveau_vram_manager_new:              ; @nouveau_vram_manager_new
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.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
	mov	x19, x3
	mov	x20, x1
	ldr	w0, [x0]
	bl	_nouveau_bdev
	ldr	w0, [x0]
	bl	_nouveau_fb
	mov	x21, x0
	mov	x0, x20
	bl	_nouveau_bo
	mov	x20, x0
	ldr	w8, [x0]
Lloh0:
	adrp	x9, _NOUVEAU_GEM_TILE_NONCONTIG@GOTPAGE
Lloh1:
	ldr	x9, [x9, _NOUVEAU_GEM_TILE_NONCONTIG@GOTPAGEOFF]
Lloh2:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_2
; %bb.1:
	ldr	w9, [x20, #4]
	mov	w10, #1
	lsl	w3, w10, w9
	b	LBB0_3
LBB0_2:
	mov	w3, #0
LBB0_3:
Lloh3:
	adrp	x22, _PAGE_SHIFT@GOTPAGE
Lloh4:
	ldr	x22, [x22, _PAGE_SHIFT@GOTPAGEOFF]
	ldr	w9, [x22]
	ldp	w10, w11, [x19]
	lsl	w1, w10, w9
	ldr	x10, [x21]
	lsl	w2, w11, w9
	ubfx	w4, w8, #8, #10
	add	x5, sp, #8
	mov	x0, x21
	blr	x10
	cbz	w0, LBB0_5
; %bb.4:
	mov	x8, #0
Lloh5:
	adrp	x9, _ENOSPC@GOTPAGE
Lloh6:
	ldr	x9, [x9, _ENOSPC@GOTPAGEOFF]
Lloh7:
	ldr	w9, [x9]
	cmn	w0, w9
	csel	w0, wzr, w0, eq
	b	LBB0_6
LBB0_5:
	ldr	w9, [x20, #4]
	ldr	x8, [sp, #8]
	str	w9, [x8]
	ldr	w9, [x8, #4]
	ldr	w10, [x22]
	asr	w9, w9, w10
	str	w9, [x19, #8]
LBB0_6:
	str	x8, [x19, #16]
	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
	add	sp, sp, #64
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.cfi_endproc
                                        ; -- End function
	.comm	_NOUVEAU_GEM_TILE_NONCONTIG,4,2 ; @NOUVEAU_GEM_TILE_NONCONTIG
	.comm	_PAGE_SHIFT,4,2                 ; @PAGE_SHIFT
	.comm	_ENOSPC,4,2                     ; @ENOSPC
	.no_dead_strip	_nouveau_vram_manager_new
.subsections_via_symbols
