	.file	"extr_amdgpu_object.c_amdgpu_bo_fault_reserve_notify.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.globl	amdgpu_bo_fault_reserve_notify
	.type	amdgpu_bo_fault_reserve_notify, @function
amdgpu_bo_fault_reserve_notify:
.LFB0:
	.cfi_startproc
	endbr64
	push	r13
	.cfi_def_cfa_offset 16
	.cfi_offset 13, -16
	push	r12
	.cfi_def_cfa_offset 24
	.cfi_offset 12, -24
	push	rbp
	.cfi_def_cfa_offset 32
	.cfi_offset 6, -32
	push	rbx
	.cfi_def_cfa_offset 40
	.cfi_offset 3, -40
	mov	rbx, rdi
	sub	rsp, 24
	.cfi_def_cfa_offset 64
	mov	edi, DWORD PTR 24[rdi]
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR 8[rsp], rax
	xor	eax, eax
	call	amdgpu_ttm_adev@PLT
	mov	rdi, rbx
	mov	QWORD PTR [rsp], 0
	mov	rbp, rax
	call	amdgpu_bo_is_amdgpu_bo@PLT
	test	eax, eax
	jne	.L2
.L4:
	xor	r12d, r12d
.L1:
	mov	rax, QWORD PTR 8[rsp]
	xor	rax, QWORD PTR fs:40
	jne	.L10
	add	rsp, 24
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	mov	eax, r12d
	pop	rbx
	.cfi_def_cfa_offset 32
	pop	rbp
	.cfi_def_cfa_offset 24
	pop	r12
	.cfi_def_cfa_offset 16
	pop	r13
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L2:
	.cfi_restore_state
	mov	rdi, rbx
	call	ttm_to_amdgpu_bo@PLT
	mov	r12, rax
	mov	eax, DWORD PTR AMDGPU_GEM_CREATE_CPU_ACCESS_REQUIRED[rip]
	or	DWORD PTR 32[r12], eax
	mov	rax, QWORD PTR TTM_PL_VRAM[rip]
	cmp	QWORD PTR [rbx], rax
	jne	.L4
	mov	rcx, QWORD PTR PAGE_SHIFT[rip]
	mov	r13, QWORD PTR 8[rbx]
	mov	rax, QWORD PTR 16[rbx]
	sal	r13, cl
	sal	rax, cl
	add	rax, r13
	cmp	rax, QWORD PTR 0[rbp]
	jbe	.L4
	cmp	QWORD PTR [r12], 0
	jle	.L5
.L8:
	mov	r12d, DWORD PTR EINVAL[rip]
	neg	r12d
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L5:
	lea	rdi, 8[rbp]
	call	atomic64_inc@PLT
	mov	rdi, r12
	mov	esi, DWORD PTR AMDGPU_GEM_DOMAIN_VRAM[rip]
	or	esi, DWORD PTR AMDGPU_GEM_DOMAIN_GTT[rip]
	call	amdgpu_bo_placement_from_domain@PLT
	mov	rax, QWORD PTR 24[r12]
	mov	rdi, rbx
	mov	rdx, rsp
	mov	DWORD PTR 8[r12], 1
	lea	rsi, 8[r12]
	add	rax, 4
	mov	QWORD PTR 16[r12], rax
	call	ttm_bo_validate@PLT
	xor	edi, edi
	test	eax, eax
	mov	r12d, eax
	setne	dil
	call	unlikely@PLT
	test	rax, rax
	jne	.L1
	mov	rax, QWORD PTR TTM_PL_VRAM[rip]
	cmp	QWORD PTR [rbx], rax
	jne	.L4
	mov	rax, QWORD PTR 16[rbx]
	mov	rcx, QWORD PTR PAGE_SHIFT[rip]
	sal	rax, cl
	add	r13, rax
	cmp	r13, QWORD PTR 0[rbp]
	jbe	.L4
	jmp	.L8
.L10:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE0:
	.size	amdgpu_bo_fault_reserve_notify, .-amdgpu_bo_fault_reserve_notify
	.comm	TTM_PL_VRAM,8,8
	.comm	PAGE_SHIFT,8,8
	.comm	EINVAL,4,4
	.comm	AMDGPU_GEM_DOMAIN_VRAM,4,4
	.comm	AMDGPU_GEM_DOMAIN_GTT,4,4
	.comm	AMDGPU_GEM_CREATE_CPU_ACCESS_REQUIRED,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",@progbits
	.section	.note.gnu.property,"a"
	.align 8
	.long	 1f - 0f
	.long	 4f - 1f
	.long	 5
0:
	.string	 "GNU"
1:
	.align 8
	.long	 0xc0000002
	.long	 3f - 2f
2:
	.long	 0x3
3:
	.align 8
4:

	.arch armv5t
	.eabi_attribute 20, 1
	.eabi_attribute 21, 1
	.eabi_attribute 23, 3
	.eabi_attribute 24, 1
	.eabi_attribute 25, 1
	.eabi_attribute 26, 2
	.eabi_attribute 30, 2
	.eabi_attribute 34, 0
	.eabi_attribute 18, 4
	.file	"extr_amdgpu_object.c_amdgpu_bo_fault_reserve_notify.c"
	.text
	.section	.rodata.cst4,"aM",%progbits,4
	.align	2
.LC0:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	amdgpu_bo_fault_reserve_notify
	.syntax unified
	.arm
	.fpu softvfp
	.type	amdgpu_bo_fault_reserve_notify, %function
amdgpu_bo_fault_reserve_notify:
	@ args = 0, pretend = 0, frame = 16
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, r9, lr}
	ldr	r3, .L11
	sub	sp, sp, #20
	mov	r4, r0
	ldr	r0, [r0, #12]
	ldr	r3, [r3]
	str	r3, [sp, #12]
	mov	r3,#0
	bl	amdgpu_ttm_adev
	mov	r3, #0
	mov	r6, r0
	mov	r0, r4
	str	r3, [sp, #4]
	str	r3, [sp, #8]
	bl	amdgpu_bo_is_amdgpu_bo
	cmp	r0, #0
	bne	.L2
.L4:
	mov	r5, #0
.L1:
	ldr	r3, .L11
	ldr	r2, [r3]
	ldr	r3, [sp, #12]
	eors	r2, r3, r2
	mov	r3, #0
	bne	.L10
	mov	r0, r5
	add	sp, sp, #20
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, pc}
.L2:
	mov	r0, r4
	bl	ttm_to_amdgpu_bo
	ldr	r2, .L11+4
	ldr	r3, [r0, #16]
	ldr	r1, [r2]
	ldr	r8, .L11+8
	orr	r3, r3, r1
	ldr	r2, [r8]
	ldr	r1, [r4]
	mov	r5, r0
	cmp	r1, r2
	str	r3, [r0, #16]
	bne	.L4
	ldr	r9, .L11+12
	ldr	r7, [r4, #4]
	ldr	r2, [r9]
	ldr	r3, [r4, #8]
	ldr	r1, [r6]
	lsl	r7, r7, r2
	add	r3, r7, r3, lsl r2
	cmp	r3, r1
	bls	.L4
	ldr	r3, [r0]
	cmp	r3, #0
	ble	.L5
.L8:
	ldr	r3, .L11+16
	ldr	r5, [r3]
	rsb	r5, r5, #0
	b	.L1
.L5:
	add	r0, r6, #4
	bl	atomic64_inc
	ldr	r2, .L11+20
	ldr	r3, .L11+24
	ldr	r1, [r2]
	ldr	r3, [r3]
	mov	r0, r5
	orr	r1, r1, r3
	bl	amdgpu_bo_placement_from_domain
	mov	r2, #1
	ldr	r3, [r5, #12]
	str	r2, [r5, #4]
	add	r3, r3, #4
	str	r3, [r5, #8]
	add	r1, r5, #4
	add	r2, sp, #4
	mov	r0, r4
	bl	ttm_bo_validate
	mov	r5, r0
	subs	r0, r0, #0
	movne	r0, #1
	bl	unlikely
	cmp	r0, #0
	bne	.L1
	ldr	r3, [r8]
	ldr	r2, [r4]
	cmp	r2, r3
	bne	.L4
	ldr	r1, [r4, #8]
	ldr	r2, [r9]
	ldr	r3, [r6]
	add	r7, r7, r1, lsl r2
	cmp	r7, r3
	bls	.L4
	b	.L8
.L10:
	bl	__stack_chk_fail
.L12:
	.align	2
.L11:
	.word	.LC0
	.word	AMDGPU_GEM_CREATE_CPU_ACCESS_REQUIRED
	.word	TTM_PL_VRAM
	.word	PAGE_SHIFT
	.word	EINVAL
	.word	AMDGPU_GEM_DOMAIN_VRAM
	.word	AMDGPU_GEM_DOMAIN_GTT
	.size	amdgpu_bo_fault_reserve_notify, .-amdgpu_bo_fault_reserve_notify
	.comm	TTM_PL_VRAM,4,4
	.comm	PAGE_SHIFT,4,4
	.comm	EINVAL,4,4
	.comm	AMDGPU_GEM_DOMAIN_VRAM,4,4
	.comm	AMDGPU_GEM_DOMAIN_GTT,4,4
	.comm	AMDGPU_GEM_CREATE_CPU_ACCESS_REQUIRED,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
