	.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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %rbx
	movl	24(%rdi), %edi
	callq	_nouveau_bdev
	movq	%rax, %r15
	movq	%rbx, %rdi
	callq	_nouveau_bo
	movq	%rax, %r14
	movq	%r15, %rdi
	callq	_nvxx_device
	movq	(%rax), %rcx
	movq	%rax, %rdi
	movl	$1, %esi
	callq	*(%rcx)
	movq	_PAGE_SHIFT@GOTPCREL(%rip), %rcx
	movb	(%rcx), %cl
	sarq	%cl, %rax
	movq	(%rbx), %rdx
	movq	_TTM_PL_VRAM@GOTPCREL(%rip), %rcx
	movq	(%r15), %rsi
	movq	_NV_DEVICE_INFO_V0_TESLA@GOTPCREL(%rip), %rdi
	movq	(%rdi), %rdi
	cmpq	(%rcx), %rdx
	jne	LBB0_1
## %bb.7:
	xorl	%ecx, %ecx
	cmpq	%rdi, %rsi
	jge	LBB0_6
## %bb.8:
	movq	16(%rbx), %rdx
	addq	8(%rbx), %rdx
	cmpq	%rax, %rdx
	jl	LBB0_6
## %bb.9:
	movl	8(%r14), %ecx
	testl	%ecx, %ecx
	jle	LBB0_14
## %bb.10:
	movq	16(%r14), %rdx
	cmpl	$1, %ecx
	jne	LBB0_17
## %bb.11:
	xorl	%esi, %esi
	jmp	LBB0_12
LBB0_1:
	xorl	%ecx, %ecx
	cmpq	%rdi, %rsi
	jl	LBB0_6
## %bb.2:
	cmpl	$0, 24(%r14)
	je	LBB0_6
## %bb.3:
	movq	_TTM_PL_SYSTEM@GOTPCREL(%rip), %rax
	cmpq	(%rax), %rdx
	jne	LBB0_5
## %bb.4:
	movq	_TTM_PL_TT@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
	callq	_nouveau_bo_validate
	movl	%eax, %ecx
	testl	%eax, %eax
	jne	LBB0_6
LBB0_5:
	xorl	%ecx, %ecx
LBB0_6:
	movl	%ecx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_17:
	movl	%ecx, %edi
	andl	$-2, %edi
	leaq	24(%rdx), %rbx
	xorl	%esi, %esi
	.p2align	4, 0x90
LBB0_18:                                ## =>This Inner Loop Header: Depth=1
	movq	$0, -16(%rbx)
	movq	%rax, -24(%rbx)
	movq	$0, (%rbx)
	movq	%rax, -8(%rbx)
	addq	$2, %rsi
	addq	$32, %rbx
	cmpq	%rsi, %rdi
	jne	LBB0_18
LBB0_12:
	testb	$1, %cl
	je	LBB0_14
## %bb.13:
	shlq	$4, %rsi
	movq	$0, 8(%rdx,%rsi)
	movq	%rax, (%rdx,%rsi)
LBB0_14:
	movl	12(%r14), %ecx
	testl	%ecx, %ecx
	jle	LBB0_23
## %bb.15:
	movq	(%r14), %rdx
	cmpl	$1, %ecx
	jne	LBB0_19
## %bb.16:
	xorl	%esi, %esi
	jmp	LBB0_21
LBB0_19:
	movl	%ecx, %edi
	andl	$-2, %edi
	leaq	24(%rdx), %rbx
	xorl	%esi, %esi
	.p2align	4, 0x90
LBB0_20:                                ## =>This Inner Loop Header: Depth=1
	movq	$0, -16(%rbx)
	movq	%rax, -24(%rbx)
	movq	$0, (%rbx)
	movq	%rax, -8(%rbx)
	addq	$2, %rsi
	addq	$32, %rbx
	cmpq	%rsi, %rdi
	jne	LBB0_20
LBB0_21:
	testb	$1, %cl
	je	LBB0_23
## %bb.22:
	shlq	$4, %rsi
	movq	$0, 8(%rdx,%rsi)
	movq	%rax, (%rdx,%rsi)
LBB0_23:
	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
	addq	$8, %rsp
	popq	%rbx
	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_DEVICE_INFO_V0_TESLA,8,3    ## @NV_DEVICE_INFO_V0_TESLA
	.comm	_TTM_PL_SYSTEM,8,3              ## @TTM_PL_SYSTEM
	.comm	_TTM_PL_TT,4,2                  ## @TTM_PL_TT
	.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	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	x20, x0
	ldr	w0, [x0, #24]
	bl	_nouveau_bdev
	mov	x21, x0
	mov	x0, x20
	bl	_nouveau_bo
	mov	x19, x0
	mov	x0, x21
	bl	_nvxx_device
	ldr	x8, [x0]
	ldr	x8, [x8]
	mov	w1, #1
	blr	x8
	ldr	x8, [x20]
Lloh0:
	adrp	x9, _TTM_PL_VRAM@GOTPAGE
Lloh1:
	ldr	x9, [x9, _TTM_PL_VRAM@GOTPAGEOFF]
Lloh2:
	ldr	x11, [x9]
	ldr	x9, [x21]
Lloh3:
	adrp	x10, _NV_DEVICE_INFO_V0_TESLA@GOTPAGE
Lloh4:
	ldr	x10, [x10, _NV_DEVICE_INFO_V0_TESLA@GOTPAGEOFF]
Lloh5:
	ldr	x10, [x10]
	cmp	x8, x11
	b.ne	LBB0_6
; %bb.1:
	cmp	x9, x10
	b.ge	LBB0_10
; %bb.2:
Lloh6:
	adrp	x8, _PAGE_SHIFT@GOTPAGE
Lloh7:
	ldr	x8, [x8, _PAGE_SHIFT@GOTPAGEOFF]
Lloh8:
	ldr	x8, [x8]
	asr	x8, x0, x8
	ldp	x9, x10, [x20, #8]
	add	x9, x10, x9
	cmp	x9, x8
	b.lt	LBB0_10
; %bb.3:
	ldr	w9, [x19, #8]
	cmp	w9, #1
	b.lt	LBB0_17
; %bb.4:
	ldr	x10, [x19, #16]
	cmp	w9, #8
	b.hs	LBB0_12
; %bb.5:
	mov	x11, #0
	b	LBB0_15
LBB0_6:
	cmp	x9, x10
	b.lt	LBB0_10
; %bb.7:
	ldr	w9, [x19, #24]
	cbz	w9, LBB0_10
; %bb.8:
Lloh9:
	adrp	x9, _TTM_PL_SYSTEM@GOTPAGE
Lloh10:
	ldr	x9, [x9, _TTM_PL_SYSTEM@GOTPAGEOFF]
Lloh11:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_10
; %bb.9:
Lloh12:
	adrp	x8, _TTM_PL_TT@GOTPAGE
Lloh13:
	ldr	x8, [x8, _TTM_PL_TT@GOTPAGEOFF]
Lloh14:
	ldr	w1, [x8]
	mov	x0, x19
	mov	w2, #0
	bl	_nouveau_bo_placement_set
	mov	x0, x19
	mov	w1, #0
	mov	w2, #0
	bl	_nouveau_bo_validate
	cbnz	w0, LBB0_11
LBB0_10:
	mov	w0, #0
LBB0_11:
	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_12:
	and	x11, x9, #0xfffffff8
	dup.2d	v0, x8
	add	x13, x10, #64
	movi.2d	v1, #0000000000000000
	mov	x12, x11
LBB0_13:                                ; =>This Inner Loop Header: Depth=1
	sub	x14, x13, #64
	st2.2d	{ v0, v1 }, [x14]
	sub	x14, x13, #32
	st2.2d	{ v0, v1 }, [x14]
	add	x14, x13, #128
	st2.2d	{ v0, v1 }, [x13], #32
	st2.2d	{ v0, v1 }, [x13]
	mov	x13, x14
	subs	x12, x12, #8
	b.ne	LBB0_13
; %bb.14:
	cmp	x11, x9
	b.eq	LBB0_17
LBB0_15:
	add	x10, x10, x11, lsl #4
	add	x10, x10, #8
	sub	x9, x9, x11
LBB0_16:                                ; =>This Inner Loop Header: Depth=1
	stp	x8, xzr, [x10, #-8]
	add	x10, x10, #16
	subs	x9, x9, #1
	b.ne	LBB0_16
LBB0_17:
	ldr	w9, [x19, #12]
	cmp	w9, #1
	b.lt	LBB0_25
; %bb.18:
	ldr	x10, [x19]
	cmp	w9, #8
	b.hs	LBB0_20
; %bb.19:
	mov	x11, #0
	b	LBB0_23
LBB0_20:
	and	x11, x9, #0xfffffff8
	dup.2d	v0, x8
	add	x13, x10, #64
	movi.2d	v1, #0000000000000000
	mov	x12, x11
LBB0_21:                                ; =>This Inner Loop Header: Depth=1
	sub	x14, x13, #64
	st2.2d	{ v0, v1 }, [x14]
	sub	x14, x13, #32
	st2.2d	{ v0, v1 }, [x14]
	add	x14, x13, #128
	st2.2d	{ v0, v1 }, [x13], #32
	st2.2d	{ v0, v1 }, [x13]
	mov	x13, x14
	subs	x12, x12, #8
	b.ne	LBB0_21
; %bb.22:
	cmp	x11, x9
	b.eq	LBB0_25
LBB0_23:
	add	x10, x10, x11, lsl #4
	add	x10, x10, #8
	sub	x9, x9, x11
LBB0_24:                                ; =>This Inner Loop Header: Depth=1
	stp	x8, xzr, [x10, #-8]
	add	x10, x10, #16
	subs	x9, x9, #1
	b.ne	LBB0_24
LBB0_25:
Lloh15:
	adrp	x8, _TTM_PL_FLAG_VRAM@GOTPAGE
Lloh16:
	ldr	x8, [x8, _TTM_PL_FLAG_VRAM@GOTPAGEOFF]
Lloh17:
	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, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 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
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.cfi_endproc
                                        ; -- End function
	.comm	_PAGE_SHIFT,8,3                 ; @PAGE_SHIFT
	.comm	_TTM_PL_VRAM,8,3                ; @TTM_PL_VRAM
	.comm	_NV_DEVICE_INFO_V0_TESLA,8,3    ; @NV_DEVICE_INFO_V0_TESLA
	.comm	_TTM_PL_SYSTEM,8,3              ; @TTM_PL_SYSTEM
	.comm	_TTM_PL_TT,4,2                  ; @TTM_PL_TT
	.comm	_TTM_PL_FLAG_VRAM,4,2           ; @TTM_PL_FLAG_VRAM
	.no_dead_strip	_nouveau_ttm_fault_reserve_notify
.subsections_via_symbols
