	.file	"extr_amdgpu_object.c_amdgpu_bo_unpin.c"
	.intel_syntax noprefix
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%p unpin not necessary\n"
.LC1:
	.string	"%p validate failed for unpin\n"
	.text
	.p2align 4
	.globl	amdgpu_bo_unpin
	.type	amdgpu_bo_unpin, @function
amdgpu_bo_unpin:
.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
	mov	r12, rdi
	push	rbx
	.cfi_def_cfa_offset 32
	.cfi_offset 3, -32
	sub	rsp, 16
	.cfi_def_cfa_offset 48
	mov	edi, DWORD PTR 4[rdi]
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR 8[rsp], rax
	xor	eax, eax
	call	amdgpu_ttm_adev@PLT
	xor	edi, edi
	cmp	QWORD PTR 16[r12], 0
	mov	QWORD PTR [rsp], 0
	sete	dil
	mov	rbx, rax
	call	WARN_ON_ONCE@PLT
	test	rax, rax
	jne	.L14
	sub	QWORD PTR 16[r12], 1
	mov	r13d, 0
	je	.L15
.L1:
	mov	rax, QWORD PTR 8[rsp]
	xor	rax, QWORD PTR fs:40
	jne	.L16
	add	rsp, 16
	.cfi_remember_state
	.cfi_def_cfa_offset 32
	mov	eax, r13d
	pop	rbx
	.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
.L15:
	.cfi_restore_state
	mov	rdi, r12
	call	amdgpu_bo_subtract_pin_size@PLT
	mov	edx, DWORD PTR [r12]
	test	edx, edx
	jle	.L4
	mov	rax, QWORD PTR 8[r12]
	lea	ecx, -1[rdx]
	mov	esi, DWORD PTR TTM_PL_FLAG_NO_EVICT[rip]
	sal	rcx, 4
	lea	rdx, 16[rax]
	not	esi
	add	rcx, rdx
	jmp	.L5
	.p2align 4,,10
	.p2align 3
.L17:
	add	rdx, 16
.L5:
	and	DWORD PTR [rax], esi
	mov	QWORD PTR 8[rax], 0
	mov	rax, rdx
	cmp	rdx, rcx
	jne	.L17
.L4:
	lea	rdi, 4[r12]
	mov	rdx, rsp
	mov	rsi, r12
	call	ttm_bo_validate@PLT
	mov	edi, eax
	mov	r13d, eax
	call	unlikely@PLT
	test	rax, rax
	je	.L1
	mov	edi, DWORD PTR [rbx]
	mov	rdx, r12
	lea	rsi, .LC1[rip]
	call	dev_err@PLT
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L14:
	mov	edi, DWORD PTR [rbx]
	mov	rdx, r12
	lea	rsi, .LC0[rip]
	xor	r13d, r13d
	call	dev_warn@PLT
	jmp	.L1
.L16:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE0:
	.size	amdgpu_bo_unpin, .-amdgpu_bo_unpin
	.comm	TTM_PL_FLAG_NO_EVICT,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_unpin.c"
	.text
	.section	.rodata.str1.4,"aMS",%progbits,1
	.align	2
.LC0:
	.ascii	"%p unpin not necessary\012\000"
	.align	2
.LC1:
	.ascii	"%p validate failed for unpin\012\000"
	.section	.rodata.cst4,"aM",%progbits,4
	.align	2
.LC2:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	amdgpu_bo_unpin
	.syntax unified
	.arm
	.fpu softvfp
	.type	amdgpu_bo_unpin, %function
amdgpu_bo_unpin:
	@ args = 0, pretend = 0, frame = 16
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, lr}
	ldr	r3, .L16
	sub	sp, sp, #20
	mov	r4, r0
	ldr	r0, [r0, #4]
	ldr	r3, [r3]
	str	r3, [sp, #12]
	mov	r3,#0
	bl	amdgpu_ttm_adev
	mov	r6, r0
	ldr	r0, [r4, #12]
	mov	r5, #0
	clz	r0, r0
	lsr	r0, r0, #5
	str	r5, [sp, #4]
	str	r5, [sp, #8]
	bl	WARN_ON_ONCE
	subs	r7, r0, #0
	bne	.L13
	ldr	r1, [r4, #12]
	sub	r5, r1, #1
	cmp	r5, #0
	str	r5, [r4, #12]
	beq	.L14
.L1:
	ldr	r3, .L16
	ldr	r2, [r3]
	ldr	r3, [sp, #12]
	eors	r2, r3, r2
	mov	r3, #0
	bne	.L15
	mov	r0, r7
	add	sp, sp, #20
	@ sp needed
	pop	{r4, r5, r6, r7, pc}
.L14:
	mov	r0, r4
	bl	amdgpu_bo_subtract_pin_size
	ldr	r0, [r4]
	cmp	r0, #0
	ble	.L4
	ldr	r3, .L16+4
	mov	r1, r5
	ldr	ip, [r3]
	ldr	r3, [r4, #8]
	mvn	ip, ip
	add	r3, r3, #4
	add	r0, r3, r0, lsl #3
.L5:
	ldr	r2, [r3, #-4]
	str	r1, [r3]
	and	r2, r2, ip
	str	r2, [r3, #-4]
	add	r3, r3, #8
	cmp	r3, r0
	bne	.L5
.L4:
	mov	r1, r4
	add	r2, sp, #4
	add	r0, r4, #4
	bl	ttm_bo_validate
	mov	r7, r0
	bl	unlikely
	cmp	r0, #0
	beq	.L1
	mov	r2, r4
	ldr	r0, [r6]
	ldr	r1, .L16+8
	bl	dev_err
	b	.L1
.L13:
	mov	r2, r4
	ldr	r0, [r6]
	ldr	r1, .L16+12
	mov	r7, r5
	bl	dev_warn
	b	.L1
.L15:
	bl	__stack_chk_fail
.L17:
	.align	2
.L16:
	.word	.LC2
	.word	TTM_PL_FLAG_NO_EVICT
	.word	.LC1
	.word	.LC0
	.size	amdgpu_bo_unpin, .-amdgpu_bo_unpin
	.comm	TTM_PL_FLAG_NO_EVICT,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
