	.file	"extr_vmwgfx_fence.c_vmw_fence_obj_add_action.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.type	vmw_fence_obj_add_action, @function
vmw_fence_obj_add_action:
.LFB0:
	.cfi_startproc
	endbr64
	push	r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	push	r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	push	r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	mov	r13, rsi
	push	r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	mov	r12, rdi
	add	r13, 8
	push	rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	push	rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	sub	rsp, 24
	.cfi_def_cfa_offset 80
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR 8[rsp], rax
	xor	eax, eax
	call	fman_from_fence@PLT
	mov	rbp, rax
	lea	r14, 4[rax]
	mov	rdi, r14
	lea	r15, 12[rbp]
	call	mutex_lock@PLT
	mov	rdi, r15
	call	spin_lock@PLT
	mov	rdx, QWORD PTR -8[r13]
	mov	rax, QWORD PTR 16[rbp]
	lea	rdi, 4[r12]
	add	DWORD PTR [rax+rdx*4], 1
	call	dma_fence_is_signaled_locked@PLT
	test	rax, rax
	je	.L2
	lea	r12, 4[rsp]
	mov	rdi, r12
	call	INIT_LIST_HEAD@PLT
	mov	rsi, r12
	mov	rdi, r13
	call	list_add_tail@PLT
	mov	rdi, rbp
	mov	rsi, r12
	call	vmw_fences_perform_actions@PLT
	mov	rdi, r15
	call	spin_unlock@PLT
.L3:
	mov	rdi, r14
	call	mutex_unlock@PLT
	mov	rax, QWORD PTR 8[rsp]
	xor	rax, QWORD PTR fs:40
	jne	.L11
	add	rsp, 24
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	pop	rbx
	.cfi_def_cfa_offset 48
	pop	rbp
	.cfi_def_cfa_offset 40
	pop	r12
	.cfi_def_cfa_offset 32
	pop	r13
	.cfi_def_cfa_offset 24
	pop	r14
	.cfi_def_cfa_offset 16
	pop	r15
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L2:
	.cfi_restore_state
	mov	rsi, r12
	mov	rdi, r13
	call	list_add_tail@PLT
	mov	rdi, r12
	call	vmw_fence_goal_check_locked@PLT
	mov	rdi, r15
	mov	ebx, eax
	call	spin_unlock@PLT
	test	ebx, ebx
	je	.L3
	mov	eax, DWORD PTR 0[rbp]
	test	eax, eax
	je	.L12
	mov	rdi, rbp
	call	vmw_fences_update@PLT
	jmp	.L3
	.p2align 4,,10
	.p2align 3
.L12:
	mov	DWORD PTR 0[rbp], 1
	mov	edi, DWORD PTR 8[rbp]
	call	vmw_goal_waiter_add@PLT
	mov	rdi, rbp
	call	vmw_fences_update@PLT
	jmp	.L3
.L11:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE0:
	.size	vmw_fence_obj_add_action, .-vmw_fence_obj_add_action
	.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_vmwgfx_fence.c_vmw_fence_obj_add_action.c"
	.text
	.section	.rodata.cst4,"aM",%progbits,4
	.align	2
.LC0:
	.word	__stack_chk_guard
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	vmw_fence_obj_add_action, %function
vmw_fence_obj_add_action:
	@ args = 0, pretend = 0, frame = 8
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, lr}
	ldr	r3, .L13
	sub	sp, sp, #8
	mov	r4, r1
	ldr	r3, [r3]
	str	r3, [sp, #4]
	mov	r3,#0
	mov	r6, r0
	bl	fman_from_fence
	mov	r5, r0
	add	r7, r0, #4
	mov	r0, r7
	add	r8, r5, #12
	bl	mutex_lock
	mov	r0, r8
	bl	spin_lock
	ldr	r1, [r4], #4
	ldr	r2, [r5, #16]
	add	r0, r6, #4
	ldr	r3, [r2, r1, lsl #2]
	add	r3, r3, #1
	str	r3, [r2, r1, lsl #2]
	bl	dma_fence_is_signaled_locked
	cmp	r0, #0
	beq	.L2
	mov	r0, sp
	bl	INIT_LIST_HEAD
	mov	r1, sp
	mov	r0, r4
	bl	list_add_tail
	mov	r1, sp
	mov	r0, r5
	bl	vmw_fences_perform_actions
	mov	r0, r8
	bl	spin_unlock
.L3:
	mov	r0, r7
	bl	mutex_unlock
	ldr	r3, .L13
	ldr	r2, [r3]
	ldr	r3, [sp, #4]
	eors	r2, r3, r2
	mov	r3, #0
	bne	.L11
	add	sp, sp, #8
	@ sp needed
	pop	{r4, r5, r6, r7, r8, pc}
.L2:
	mov	r1, r6
	mov	r0, r4
	bl	list_add_tail
	mov	r0, r6
	bl	vmw_fence_goal_check_locked
	mov	r4, r0
	mov	r0, r8
	bl	spin_unlock
	cmp	r4, #0
	beq	.L3
	ldr	r3, [r5]
	cmp	r3, #0
	beq	.L12
	mov	r0, r5
	bl	vmw_fences_update
	b	.L3
.L12:
	mov	r3, #1
	ldr	r0, [r5, #8]
	str	r3, [r5]
	bl	vmw_goal_waiter_add
	mov	r0, r5
	bl	vmw_fences_update
	b	.L3
.L11:
	bl	__stack_chk_fail
.L14:
	.align	2
.L13:
	.word	.LC0
	.size	vmw_fence_obj_add_action, .-vmw_fence_obj_add_action
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
