	.file	"extr_intel_context.c_intel_context_unpin.c"
	.intel_syntax noprefix
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%s context:%llx retire\n"
	.text
	.p2align 4
	.globl	intel_context_unpin
	.type	intel_context_unpin, @function
intel_context_unpin:
.LFB0:
	.cfi_startproc
	endbr64
	push	r12
	.cfi_def_cfa_offset 16
	.cfi_offset 12, -16
	lea	r12, 32[rdi]
	mov	edx, 1
	mov	esi, -1
	push	rbp
	.cfi_def_cfa_offset 24
	.cfi_offset 6, -24
	mov	rbp, rdi
	mov	rdi, r12
	sub	rsp, 8
	.cfi_def_cfa_offset 32
	call	atomic_add_unless@PLT
	mov	edi, eax
	call	likely@PLT
	test	rax, rax
	je	.L9
	add	rsp, 8
	.cfi_remember_state
	.cfi_def_cfa_offset 24
	pop	rbp
	.cfi_def_cfa_offset 16
	pop	r12
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L9:
	.cfi_restore_state
	mov	rdi, rbp
	call	intel_context_get@PLT
	mov	esi, DWORD PTR SINGLE_DEPTH_NESTING[rip]
	mov	rdi, rbp
	call	mutex_lock_nested@PLT
	mov	rdi, r12
	call	atomic_dec_and_test@PLT
	mov	edi, eax
	call	likely@PLT
	test	rax, rax
	jne	.L10
.L3:
	mov	rdi, rbp
	call	mutex_unlock@PLT
	add	rsp, 8
	.cfi_remember_state
	.cfi_def_cfa_offset 24
	mov	rdi, rbp
	pop	rbp
	.cfi_def_cfa_offset 16
	pop	r12
	.cfi_def_cfa_offset 8
	jmp	intel_context_put@PLT
	.p2align 4,,10
	.p2align 3
.L10:
	.cfi_restore_state
	mov	rdx, QWORD PTR 16[rbp]
	mov	rax, QWORD PTR 24[rbp]
	lea	rdi, .LC0[rip]
	mov	edx, DWORD PTR [rdx]
	mov	esi, DWORD PTR [rax]
	call	GEM_TRACE@PLT
	mov	rax, QWORD PTR 8[rbp]
	mov	rdi, rbp
	call	[QWORD PTR [rax]]
	mov	edi, DWORD PTR 4[rbp]
	call	i915_gem_context_put@PLT
	mov	rdi, rbp
	call	intel_context_active_release@PLT
	jmp	.L3
	.cfi_endproc
.LFE0:
	.size	intel_context_unpin, .-intel_context_unpin
	.comm	SINGLE_DEPTH_NESTING,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_intel_context.c_intel_context_unpin.c"
	.text
	.section	.rodata.str1.4,"aMS",%progbits,1
	.align	2
.LC0:
	.ascii	"%s context:%llx retire\012\000"
	.text
	.align	2
	.global	intel_context_unpin
	.syntax unified
	.arm
	.fpu softvfp
	.type	intel_context_unpin, %function
intel_context_unpin:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, lr}
	add	r5, r0, #20
	mov	r2, #1
	mvn	r1, #0
	mov	r4, r0
	mov	r0, r5
	bl	atomic_add_unless
	bl	likely
	cmp	r0, #0
	popne	{r4, r5, r6, pc}
	mov	r0, r4
	bl	intel_context_get
	ldr	r3, .L10
	mov	r0, r4
	ldr	r1, [r3]
	bl	mutex_lock_nested
	mov	r0, r5
	bl	atomic_dec_and_test
	bl	likely
	cmp	r0, #0
	bne	.L9
.L3:
	mov	r0, r4
	bl	mutex_unlock
	mov	r0, r4
	pop	{r4, r5, r6, lr}
	b	intel_context_put
.L9:
	ldr	r3, [r4, #16]
	ldr	r2, [r4, #12]
	ldr	r1, [r3]
	ldr	r2, [r2]
	ldr	r0, .L10+4
	bl	GEM_TRACE
	ldr	r3, [r4, #8]
	mov	r0, r4
	ldr	r3, [r3]
	blx	r3
	ldr	r0, [r4, #4]
	bl	i915_gem_context_put
	mov	r0, r4
	bl	intel_context_active_release
	b	.L3
.L11:
	.align	2
.L10:
	.word	SINGLE_DEPTH_NESTING
	.word	.LC0
	.size	intel_context_unpin, .-intel_context_unpin
	.comm	SINGLE_DEPTH_NESTING,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
