	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function nouveau_ttm_fault_reserve_notify
_nouveau_ttm_fault_reserve_notify:      ## @nouveau_ttm_fault_reserve_notify
	.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
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %rbx
	movl	24(%rdi), %edi
	callq	_nouveau_bdev
	movq	%rax, %r12
	movq	%rbx, %rdi
	callq	_nouveau_bo
	movq	%rax, %r14
	movl	(%r12), %edi
	callq	_nv_device
	movl	8(%rax), %edi
	movl	$1, %esi
	callq	_pci_resource_len
	movq	%rax, %r15
	movq	_PAGE_SHIFT@GOTPCREL(%rip), %rax
	movb	(%rax), %cl
	sarq	%cl, %r15
	movq	(%rbx), %rax
	movq	_TTM_PL_VRAM@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	je	LBB0_3
## %bb.1:
	movl	(%r12), %edi
	callq	_nv_device
	movq	(%rax), %rax
	movq	_NV_50@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jl	LBB0_4
## %bb.2:
	movq	%r14, %rdi
	callq	_nouveau_bo_tile_layout
	testl	%eax, %eax
	je	LBB0_4
LBB0_3:
	movq	16(%rbx), %rax
	addq	8(%rbx), %rax
	cmpq	%r15, %rax
	jge	LBB0_5
LBB0_4:
	xorl	%eax, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_5:
	movq	$0, 8(%r14)
	movq	%r15, (%r14)
	movq	_TTM_PL_FLAG_VRAM@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r14, %rdi
	xorl	%edx, %edx
	callq	_nouveau_bo_placement_set
	movq	%r14, %rdi
	xorl	%esi, %esi
	xorl	%edx, %edx
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_nouveau_bo_validate            ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_PAGE_SHIFT,8,3                 ## @PAGE_SHIFT
	.comm	_TTM_PL_VRAM,8,3                ## @TTM_PL_VRAM
	.comm	_NV_50,8,3                      ## @NV_50
	.comm	_TTM_PL_FLAG_VRAM,4,2           ## @TTM_PL_FLAG_VRAM
	.no_dead_strip	_nouveau_ttm_fault_reserve_notify
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function nouveau_ttm_fault_reserve_notify
_nouveau_ttm_fault_reserve_notify:      ; @nouveau_ttm_fault_reserve_notify
	.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, x0
	ldr	w0, [x0, #24]
	bl	_nouveau_bdev
	mov	x22, x0
	mov	x0, x20
	bl	_nouveau_bo
	mov	x19, x0
	ldr	w0, [x22]
	bl	_nv_device
	ldr	w0, [x0, #8]
	mov	w1, #1
	bl	_pci_resource_len
	mov	x21, x0
Lloh0:
	adrp	x8, _PAGE_SHIFT@GOTPAGE
Lloh1:
	ldr	x8, [x8, _PAGE_SHIFT@GOTPAGEOFF]
Lloh2:
	ldr	x23, [x8]
	ldr	x8, [x20]
Lloh3:
	adrp	x9, _TTM_PL_VRAM@GOTPAGE
Lloh4:
	ldr	x9, [x9, _TTM_PL_VRAM@GOTPAGEOFF]
Lloh5:
	ldr	x9, [x9]
	cmp	x8, x9
	b.eq	LBB0_3
; %bb.1:
	ldr	w0, [x22]
	bl	_nv_device
	ldr	x8, [x0]
Lloh6:
	adrp	x9, _NV_50@GOTPAGE
Lloh7:
	ldr	x9, [x9, _NV_50@GOTPAGEOFF]
Lloh8:
	ldr	x9, [x9]
	cmp	x8, x9
	b.lt	LBB0_4
; %bb.2:
	mov	x0, x19
	bl	_nouveau_bo_tile_layout
	cbz	w0, LBB0_4
LBB0_3:
	asr	x8, x21, x23
	ldp	x9, x10, [x20, #8]
	add	x9, x10, x9
	cmp	x9, x8
	b.ge	LBB0_5
LBB0_4:
	mov	w0, #0
	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
LBB0_5:
	stp	x8, xzr, [x19]
Lloh9:
	adrp	x8, _TTM_PL_FLAG_VRAM@GOTPAGE
Lloh10:
	ldr	x8, [x8, _TTM_PL_FLAG_VRAM@GOTPAGEOFF]
Lloh11:
	ldr	w1, [x8]
	mov	x0, x19
	mov	w2, #0
	bl	_nouveau_bo_placement_set
	mov	x0, x19
	mov	w1, #0
	mov	w2, #0
	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
	b	_nouveau_bo_validate
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.cfi_endproc
                                        ; -- End function
	.comm	_PAGE_SHIFT,8,3                 ; @PAGE_SHIFT
	.comm	_TTM_PL_VRAM,8,3                ; @TTM_PL_VRAM
	.comm	_NV_50,8,3                      ; @NV_50
	.comm	_TTM_PL_FLAG_VRAM,4,2           ; @TTM_PL_FLAG_VRAM
	.no_dead_strip	_nouveau_ttm_fault_reserve_notify
.subsections_via_symbols
