	.file	"extr_l2c_utils.c_l2cu_find_completed_packets.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.globl	l2cu_find_completed_packets
	.type	l2cu_find_completed_packets, @function
l2cu_find_completed_packets:
.LFB0:
	.cfi_startproc
	endbr64
	mov	edx, DWORD PTR MAX_L2CAP_LINKS[rip]
	mov	rax, QWORD PTR l2cb[rip]
	xor	r8d, r8d
	test	edx, edx
	jle	.L1
	xor	edx, edx
	.p2align 4,,10
	.p2align 3
.L4:
	cmp	QWORD PTR 16[rax], 0
	je	.L3
	mov	rcx, QWORD PTR [rax]
	test	rcx, rcx
	jle	.L3
	mov	r9d, DWORD PTR 8[rax]
	add	r8, 1
	add	rsi, 4
	add	rdi, 4
	mov	DWORD PTR -4[rdi], r9d
	mov	DWORD PTR -4[rsi], ecx
	mov	QWORD PTR [rax], 0
.L3:
	add	edx, 1
	add	rax, 24
	cmp	DWORD PTR MAX_L2CAP_LINKS[rip], edx
	jg	.L4
.L1:
	mov	rax, r8
	ret
	.cfi_endproc
.LFE0:
	.size	l2cu_find_completed_packets, .-l2cu_find_completed_packets
	.comm	l2cb,8,8
	.comm	MAX_L2CAP_LINKS,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_l2c_utils.c_l2cu_find_completed_packets.c"
	.text
	.align	2
	.global	l2cu_find_completed_packets
	.syntax unified
	.arm
	.fpu softvfp
	.type	l2cu_find_completed_packets, %function
l2cu_find_completed_packets:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, lr}
	ldr	r4, .L13
	ldr	r3, .L13+4
	ldr	r2, [r4]
	ldr	r3, [r3]
	cmp	r2, #0
	ble	.L5
	mov	lr, r0
	mov	r0, #0
	mov	r2, r0
	mov	r6, r0
	add	r3, r3, #12
.L4:
	ldr	ip, [r3, #-4]
	add	r2, r2, #1
	cmp	ip, #0
	beq	.L3
	ldr	ip, [r3, #-12]
	cmp	ip, #0
	ldrgt	r5, [r3, #-8]
	addgt	r0, r0, #1
	strgt	r5, [lr], #4
	strgt	ip, [r1], #4
	strgt	r6, [r3, #-12]
.L3:
	ldr	ip, [r4]
	add	r3, r3, #12
	cmp	ip, r2
	bgt	.L4
	pop	{r4, r5, r6, pc}
.L5:
	mov	r0, #0
	pop	{r4, r5, r6, pc}
.L14:
	.align	2
.L13:
	.word	MAX_L2CAP_LINKS
	.word	l2cb
	.size	l2cu_find_completed_packets, .-l2cu_find_completed_packets
	.comm	l2cb,4,4
	.comm	MAX_L2CAP_LINKS,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
