	.file	"extr_..ff_ffmsg_queue.h_msg_queue_remove.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.type	msg_queue_remove, @function
msg_queue_remove:
.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
	mov	r12d, esi
	push	rbp
	.cfi_def_cfa_offset 40
	.cfi_offset 6, -40
	mov	rbp, rdi
	push	rbx
	.cfi_def_cfa_offset 48
	.cfi_offset 3, -48
	mov	edi, DWORD PTR [rdi]
	call	SDL_LockMutex@PLT
	mov	eax, DWORD PTR 40[rbp]
	mov	rbx, QWORD PTR 16[rbp]
	test	eax, eax
	jne	.L2
	test	rbx, rbx
	je	.L2
	lea	r13, 16[rbp]
	mov	r14, rbx
	jmp	.L5
	.p2align 4,,10
	.p2align 3
.L3:
	lea	r13, 8[rbx]
	mov	r14, rbx
	mov	rbx, rax
	test	rbx, rbx
	je	.L16
.L5:
	mov	rax, QWORD PTR 8[rbx]
	cmp	DWORD PTR [rbx], r12d
	jne	.L3
	mov	QWORD PTR 0[r13], rax
	mov	rdi, rbx
	call	msg_free_res@PLT
	mov	rax, QWORD PTR 32[rbp]
	mov	QWORD PTR 8[rbx], rax
	mov	QWORD PTR 32[rbp], rbx
	mov	rbx, QWORD PTR 0[r13]
	sub	DWORD PTR 24[rbp], 1
	test	rbx, rbx
	jne	.L5
.L16:
	cmp	QWORD PTR 16[rbp], 0
	cmovne	rbx, r14
	mov	QWORD PTR 8[rbp], rbx
.L2:
	mov	edi, DWORD PTR 0[rbp]
	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
	jmp	SDL_UnlockMutex@PLT
	.cfi_endproc
.LFE0:
	.size	msg_queue_remove, .-msg_queue_remove
	.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_..ff_ffmsg_queue.h_msg_queue_remove.c"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	msg_queue_remove, %function
msg_queue_remove:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, lr}
	mov	r5, r0
	ldr	r0, [r0]
	mov	r6, r1
	bl	SDL_LockMutex
	ldr	r4, [r5, #8]
	ldr	r2, [r5, #20]
	subs	r3, r4, #0
	movne	r3, #1
	cmp	r2, #0
	movne	r3, #0
	cmp	r3, #0
	bne	.L13
	ldr	r0, [r5]
	pop	{r4, r5, r6, r7, r8, lr}
	b	SDL_UnlockMutex
.L13:
	mov	r8, r4
	add	r7, r5, #8
	b	.L5
.L4:
	cmp	r4, #0
	beq	.L14
.L5:
	ldr	r3, [r4]
	ldr	r2, [r4, #4]
	cmp	r3, r6
	movne	r8, r4
	addne	r7, r4, #4
	movne	r4, r2
	bne	.L4
	mov	r0, r4
	str	r2, [r7]
	bl	msg_free_res
	ldr	r2, [r5, #16]
	ldr	r3, [r5, #12]
	str	r2, [r4, #4]
	str	r4, [r5, #16]
	ldr	r4, [r7]
	sub	r3, r3, #1
	cmp	r4, #0
	str	r3, [r5, #12]
	bne	.L5
.L14:
	ldr	r3, [r5, #8]
	ldr	r0, [r5]
	cmp	r3, #0
	movne	r4, r8
	str	r4, [r5, #4]
	pop	{r4, r5, r6, r7, r8, lr}
	b	SDL_UnlockMutex
	.size	msg_queue_remove, .-msg_queue_remove
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
