	.file	"extr_i915_gem.c_i915_gem_object_get_fence.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.globl	i915_gem_object_get_fence
	.type	i915_gem_object_get_fence, @function
i915_gem_object_get_fence:
.LFB0:
	.cfi_startproc
	endbr64
	push	r14
	.cfi_def_cfa_offset 16
	.cfi_offset 14, -16
	push	r13
	.cfi_def_cfa_offset 24
	.cfi_offset 13, -24
	push	r12
	.cfi_def_cfa_offset 32
	.cfi_offset 12, -32
	push	rbp
	.cfi_def_cfa_offset 40
	.cfi_offset 6, -40
	push	rbx
	.cfi_def_cfa_offset 48
	.cfi_offset 3, -48
	mov	rbx, rdi
	sub	rsp, 16
	.cfi_def_cfa_offset 64
	mov	rbp, QWORD PTR 24[rdi]
	mov	edx, DWORD PTR 8[rdi]
	mov	r12, QWORD PTR [rdi]
	mov	r13, QWORD PTR I915_TILING_NONE[rip]
	mov	r14, QWORD PTR 0[rbp]
	test	edx, edx
	jne	.L15
	mov	rsi, QWORD PTR 16[rdi]
	cmp	rsi, QWORD PTR I915_FENCE_REG_NONE[rip]
	jne	.L16
.L4:
	xor	eax, eax
	cmp	r12, r13
	je	.L1
	mov	rdi, rbp
	call	i915_find_fence_reg@PLT
	mov	rsi, rax
	mov	eax, DWORD PTR EDEADLK[rip]
	neg	eax
	test	rsi, rsi
	je	.L1
	mov	rbp, QWORD PTR [rsi]
	test	rbp, rbp
	je	.L5
	mov	rdi, rbp
	mov	QWORD PTR 8[rsp], rsi
	call	i915_gem_object_wait_fence@PLT
	test	eax, eax
	je	.L17
.L1:
	add	rsp, 16
	.cfi_remember_state
	.cfi_def_cfa_offset 48
	pop	rbx
	.cfi_def_cfa_offset 40
	pop	rbp
	.cfi_def_cfa_offset 32
	pop	r12
	.cfi_def_cfa_offset 24
	pop	r13
	.cfi_def_cfa_offset 16
	pop	r14
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L15:
	.cfi_restore_state
	call	i915_gem_object_wait_fence@PLT
	test	eax, eax
	jne	.L1
	mov	rsi, QWORD PTR 16[rbx]
	cmp	rsi, QWORD PTR I915_FENCE_REG_NONE[rip]
	je	.L4
	mov	eax, DWORD PTR 8[rbx]
	sal	rsi, 4
	add	rsi, QWORD PTR 8[r14]
	test	eax, eax
	je	.L7
.L5:
	xor	edx, edx
	cmp	r12, r13
	mov	rdi, rbx
	setne	dl
	call	i915_gem_object_update_fence@PLT
	mov	DWORD PTR 8[rbx], 0
	add	rsp, 16
	.cfi_remember_state
	.cfi_def_cfa_offset 48
	xor	eax, eax
	pop	rbx
	.cfi_def_cfa_offset 40
	pop	rbp
	.cfi_def_cfa_offset 32
	pop	r12
	.cfi_def_cfa_offset 24
	pop	r13
	.cfi_def_cfa_offset 16
	pop	r14
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L16:
	.cfi_restore_state
	sal	rsi, 4
	add	rsi, QWORD PTR 8[r14]
.L7:
	lea	rdi, 8[rsi]
	mov	rsi, r14
	call	list_move_tail@PLT
	add	rsp, 16
	.cfi_remember_state
	.cfi_def_cfa_offset 48
	xor	eax, eax
	pop	rbx
	.cfi_def_cfa_offset 40
	pop	rbp
	.cfi_def_cfa_offset 32
	pop	r12
	.cfi_def_cfa_offset 24
	pop	r13
	.cfi_def_cfa_offset 16
	pop	r14
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L17:
	.cfi_restore_state
	mov	rdi, rbp
	call	i915_gem_object_fence_lost@PLT
	mov	rsi, QWORD PTR 8[rsp]
	jmp	.L5
	.cfi_endproc
.LFE0:
	.size	i915_gem_object_get_fence, .-i915_gem_object_get_fence
	.comm	I915_TILING_NONE,8,8
	.comm	I915_FENCE_REG_NONE,8,8
	.comm	EDEADLK,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_i915_gem.c_i915_gem_object_get_fence.c"
	.text
	.align	2
	.global	i915_gem_object_get_fence
	.syntax unified
	.arm
	.fpu softvfp
	.type	i915_gem_object_get_fence, %function
i915_gem_object_get_fence:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	ldr	r2, [r0, #4]
	push	{r4, r5, r6, r7, r8, r9, r10, lr}
	ldr	r3, .L18
	ldr	r6, [r0, #12]
	cmp	r2, #0
	mov	r4, r0
	ldr	r9, [r6]
	ldr	r7, [r0]
	ldr	r8, [r3]
	bne	.L15
	ldr	r3, .L18+4
	ldr	r0, [r0, #8]
	ldr	r3, [r3]
	cmp	r0, r3
	bne	.L16
.L4:
	cmp	r7, r8
	beq	.L9
	mov	r0, r6
	bl	i915_find_fence_reg
	subs	r5, r0, #0
	beq	.L17
	ldr	r6, [r5]
	cmp	r6, #0
	beq	.L5
	mov	r0, r6
	bl	i915_gem_object_wait_fence
	cmp	r0, #0
	popne	{r4, r5, r6, r7, r8, r9, r10, pc}
	mov	r0, r6
	bl	i915_gem_object_fence_lost
	b	.L5
.L15:
	bl	i915_gem_object_wait_fence
	cmp	r0, #0
	popne	{r4, r5, r6, r7, r8, r9, r10, pc}
	ldr	r3, .L18+4
	ldr	r0, [r4, #8]
	ldr	r3, [r3]
	cmp	r0, r3
	beq	.L4
	ldr	r3, [r4, #4]
	ldr	r5, [r9, #4]
	cmp	r3, #0
	add	r5, r5, r0, lsl #3
	beq	.L7
.L5:
	subs	r2, r7, r8
	movne	r2, #1
	mov	r1, r5
	mov	r0, r4
	bl	i915_gem_object_update_fence
	mov	r0, #0
	str	r0, [r4, #4]
	pop	{r4, r5, r6, r7, r8, r9, r10, pc}
.L9:
	mov	r0, #0
	pop	{r4, r5, r6, r7, r8, r9, r10, pc}
.L16:
	ldr	r5, [r9, #4]
	add	r5, r5, r0, lsl #3
.L7:
	mov	r1, r9
	add	r0, r5, #4
	bl	list_move_tail
	mov	r0, #0
	pop	{r4, r5, r6, r7, r8, r9, r10, pc}
.L17:
	ldr	r3, .L18+8
	ldr	r0, [r3]
	rsb	r0, r0, #0
	pop	{r4, r5, r6, r7, r8, r9, r10, pc}
.L19:
	.align	2
.L18:
	.word	I915_TILING_NONE
	.word	I915_FENCE_REG_NONE
	.word	EDEADLK
	.size	i915_gem_object_get_fence, .-i915_gem_object_get_fence
	.comm	I915_TILING_NONE,4,4
	.comm	I915_FENCE_REG_NONE,4,4
	.comm	EDEADLK,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
