	.file	"extr_l2c_utils.c_l2cu_check_channel_congestion.c"
	.intel_syntax noprefix
	.text
	.section	.rodata.str1.8,"aMS",@progbits,1
	.align 8
.LC0:
	.string	"L2CAP - Calling CongestionStatus_Cb (FALSE), CID: 0x%04x  xmit_hold_q.count: %u  buff_quota: %u"
	.align 8
.LC1:
	.string	"L2CAP - Calling UCD CongestionStatus_Cb (FALSE), SecPendingQ:%u,XmitQ:%u,Quota:%u"
	.align 8
.LC2:
	.string	"L2CAP - Calling CongestionStatus_Cb (TRUE),CID:0x%04x,XmitQ:%u,Quota:%u"
	.align 8
.LC3:
	.string	"L2CAP - Calling UCD CongestionStatus_Cb (TRUE), SecPendingQ:%u,XmitQ:%u,Quota:%u"
	.text
	.p2align 4
	.globl	l2cu_check_channel_congestion
	.type	l2cu_check_channel_congestion, @function
l2cu_check_channel_congestion:
.LFB0:
	.cfi_startproc
	endbr64
	push	r12
	.cfi_def_cfa_offset 16
	.cfi_offset 12, -16
	push	rbx
	.cfi_def_cfa_offset 24
	.cfi_offset 3, -24
	mov	rbx, rdi
	sub	rsp, 24
	.cfi_def_cfa_offset 48
	mov	edi, DWORD PTR 32[rdi]
	call	fixed_queue_length@PLT
	mov	r12, rax
	mov	rax, QWORD PTR L2CAP_CONNECTIONLESS_CID[rip]
	cmp	QWORD PTR [rbx], rax
	je	.L18
.L2:
	mov	ecx, DWORD PTR 8[rbx]
	test	ecx, ecx
	je	.L1
	cmp	QWORD PTR 40[rbx], 0
	je	.L5
	mov	eax, ecx
	shr	eax, 31
	add	eax, ecx
	sar	eax
	cdqe
	cmp	rax, r12
	jb	.L1
	mov	rax, QWORD PTR FALSE[rip]
	mov	QWORD PTR 40[rbx], rax
	mov	rax, QWORD PTR 24[rbx]
	test	rax, rax
	je	.L1
	cmp	QWORD PTR 8[rax], 0
	mov	rsi, QWORD PTR [rbx]
	je	.L7
	mov	rdx, r12
	lea	rdi, .LC0[rip]
	call	L2CAP_TRACE_DEBUG@PLT
	mov	rax, QWORD PTR TRUE[rip]
	mov	rsi, QWORD PTR FALSE[rip]
	mov	rdi, QWORD PTR [rbx]
	mov	QWORD PTR l2cb[rip+8], rax
	mov	rax, QWORD PTR 24[rbx]
	call	[QWORD PTR 8[rax]]
	mov	rax, QWORD PTR FALSE[rip]
	mov	QWORD PTR l2cb[rip+8], rax
.L1:
	add	rsp, 24
	.cfi_remember_state
	.cfi_def_cfa_offset 24
	pop	rbx
	.cfi_def_cfa_offset 16
	pop	r12
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L18:
	.cfi_restore_state
	mov	rax, QWORD PTR 16[rbx]
	mov	edi, DWORD PTR 16[rax]
	call	fixed_queue_length@PLT
	add	r12, rax
	jmp	.L2
	.p2align 4,,10
	.p2align 3
.L5:
	movsx	rax, ecx
	cmp	rax, r12
	jnb	.L1
	mov	rax, QWORD PTR TRUE[rip]
	mov	QWORD PTR 40[rbx], rax
	mov	rax, QWORD PTR 24[rbx]
	test	rax, rax
	je	.L1
	cmp	QWORD PTR 8[rax], 0
	mov	rsi, QWORD PTR [rbx]
	je	.L8
	mov	rdx, r12
	lea	rdi, .LC2[rip]
	call	L2CAP_TRACE_DEBUG@PLT
	mov	rax, QWORD PTR 24[rbx]
	mov	rdi, QWORD PTR [rbx]
	mov	rsi, QWORD PTR TRUE[rip]
	mov	rax, QWORD PTR 8[rax]
	add	rsp, 24
	.cfi_remember_state
	.cfi_def_cfa_offset 24
	pop	rbx
	.cfi_def_cfa_offset 16
	pop	r12
	.cfi_def_cfa_offset 8
	jmp	rax
	.p2align 4,,10
	.p2align 3
.L7:
	.cfi_restore_state
	cmp	QWORD PTR L2CAP_CONNECTIONLESS_CID[rip], rsi
	jne	.L1
	cmp	QWORD PTR [rax], 0
	mov	DWORD PTR 12[rsp], ecx
	je	.L1
	mov	edi, DWORD PTR 32[rbx]
	call	fixed_queue_length@PLT
	mov	r12, rax
	mov	rax, QWORD PTR 16[rbx]
	mov	edi, DWORD PTR 16[rax]
	call	fixed_queue_length@PLT
	mov	ecx, DWORD PTR 12[rsp]
	mov	rdx, r12
	lea	rdi, .LC1[rip]
	mov	rsi, rax
	call	L2CAP_TRACE_DEBUG@PLT
	mov	rax, QWORD PTR 24[rbx]
	mov	rdx, QWORD PTR 16[rbx]
	mov	rsi, QWORD PTR FALSE[rip]
	mov	rax, QWORD PTR [rax]
.L16:
	mov	edi, DWORD PTR [rdx]
	add	rsp, 24
	.cfi_remember_state
	.cfi_def_cfa_offset 24
	pop	rbx
	.cfi_def_cfa_offset 16
	pop	r12
	.cfi_def_cfa_offset 8
	jmp	rax
	.p2align 4,,10
	.p2align 3
.L8:
	.cfi_restore_state
	cmp	QWORD PTR L2CAP_CONNECTIONLESS_CID[rip], rsi
	jne	.L1
	cmp	QWORD PTR [rax], 0
	mov	DWORD PTR 12[rsp], ecx
	je	.L1
	mov	edi, DWORD PTR 32[rbx]
	call	fixed_queue_length@PLT
	mov	r12, rax
	mov	rax, QWORD PTR 16[rbx]
	mov	edi, DWORD PTR 16[rax]
	call	fixed_queue_length@PLT
	mov	ecx, DWORD PTR 12[rsp]
	mov	rdx, r12
	lea	rdi, .LC3[rip]
	mov	rsi, rax
	call	L2CAP_TRACE_DEBUG@PLT
	mov	rax, QWORD PTR 24[rbx]
	mov	rdx, QWORD PTR 16[rbx]
	mov	rsi, QWORD PTR TRUE[rip]
	mov	rax, QWORD PTR [rax]
	jmp	.L16
	.cfi_endproc
.LFE0:
	.size	l2cu_check_channel_congestion, .-l2cu_check_channel_congestion
	.comm	l2cb,16,16
	.comm	TRUE,8,8
	.comm	L2CAP_NUM_FIXED_CHNLS,8,8
	.comm	L2CAP_CONNECTIONLESS_CID,8,8
	.comm	FALSE,8,8
	.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_check_channel_congestion.c"
	.text
	.section	.rodata.str1.4,"aMS",%progbits,1
	.align	2
.LC0:
	.ascii	"L2CAP - Calling CongestionStatus_Cb (FALSE), CID: 0"
	.ascii	"x%04x  xmit_hold_q.count: %u  buff_quota: %u\000"
	.align	2
.LC1:
	.ascii	"L2CAP - Calling UCD CongestionStatus_Cb (FALSE), Se"
	.ascii	"cPendingQ:%u,XmitQ:%u,Quota:%u\000"
	.align	2
.LC2:
	.ascii	"L2CAP - Calling CongestionStatus_Cb (TRUE),CID:0x%0"
	.ascii	"4x,XmitQ:%u,Quota:%u\000"
	.align	2
.LC3:
	.ascii	"L2CAP - Calling UCD CongestionStatus_Cb (TRUE), Sec"
	.ascii	"PendingQ:%u,XmitQ:%u,Quota:%u\000"
	.text
	.align	2
	.global	l2cu_check_channel_congestion
	.syntax unified
	.arm
	.fpu softvfp
	.type	l2cu_check_channel_congestion, %function
l2cu_check_channel_congestion:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, lr}
	mov	r4, r0
	ldr	r0, [r0, #16]
	bl	fixed_queue_length
	ldr	r5, .L25
	ldr	r1, [r4]
	ldr	r3, [r5]
	mov	r6, r0
	cmp	r1, r3
	beq	.L24
.L2:
	ldr	r3, [r4, #4]
	cmp	r3, #0
	popeq	{r4, r5, r6, r7, r8, pc}
	ldr	r2, [r4, #20]
	cmp	r2, #0
	beq	.L5
	add	r2, r3, r3, lsr #31
	cmp	r6, r2, asr #1
	pophi	{r4, r5, r6, r7, r8, pc}
	ldr	r7, .L25+4
	ldr	r2, [r4, #12]
	ldr	r1, [r7]
	cmp	r2, #0
	str	r1, [r4, #20]
	popeq	{r4, r5, r6, r7, r8, pc}
	ldr	r0, [r2, #4]
	ldr	r1, [r4]
	cmp	r0, #0
	beq	.L7
	mov	r2, r6
	ldr	r0, .L25+8
	bl	L2CAP_TRACE_DEBUG
	ldr	r3, .L25+12
	ldr	r5, .L25+16
	ldr	r2, [r3]
	ldr	r3, [r4, #12]
	ldr	r0, [r4]
	ldr	r3, [r3, #4]
	ldr	r1, [r7]
	str	r2, [r5, #4]
	blx	r3
	ldr	r3, [r7]
	str	r3, [r5, #4]
	pop	{r4, r5, r6, r7, r8, pc}
.L24:
	ldr	r3, [r4, #8]
	ldr	r0, [r3, #8]
	bl	fixed_queue_length
	add	r6, r6, r0
	b	.L2
.L5:
	cmp	r3, r6
	popcs	{r4, r5, r6, r7, r8, pc}
	ldr	r7, .L25+12
	ldr	r2, [r4, #12]
	ldr	r1, [r7]
	cmp	r2, #0
	str	r1, [r4, #20]
	popeq	{r4, r5, r6, r7, r8, pc}
	ldr	r0, [r2, #4]
	ldr	r1, [r4]
	cmp	r0, #0
	beq	.L8
	mov	r2, r6
	ldr	r0, .L25+20
	bl	L2CAP_TRACE_DEBUG
	ldr	r3, [r4, #12]
	ldr	r1, [r7]
	ldr	r0, [r4]
	ldr	r3, [r3, #4]
	pop	{r4, r5, r6, r7, r8, lr}
	bx	r3
.L7:
	ldr	r3, [r5]
	cmp	r3, r1
	popne	{r4, r5, r6, r7, r8, pc}
	ldr	r3, [r2]
	cmp	r3, #0
	popeq	{r4, r5, r6, r7, r8, pc}
	ldr	r3, [r4, #8]
	ldr	r0, [r3, #8]
	bl	fixed_queue_length
	mov	r5, r0
	ldr	r0, [r4, #16]
	bl	fixed_queue_length
	mov	r1, r5
	mov	r2, r0
	ldr	r3, [r4, #4]
	ldr	r0, .L25+24
.L22:
	bl	L2CAP_TRACE_DEBUG
	ldr	r2, [r4, #8]
	ldr	r3, [r4, #12]
	ldr	r1, [r7]
	ldr	r0, [r2]
	ldr	r3, [r3]
	pop	{r4, r5, r6, r7, r8, lr}
	bx	r3
.L8:
	ldr	r3, [r5]
	cmp	r3, r1
	popne	{r4, r5, r6, r7, r8, pc}
	ldr	r3, [r2]
	cmp	r3, #0
	popeq	{r4, r5, r6, r7, r8, pc}
	ldr	r3, [r4, #8]
	ldr	r0, [r3, #8]
	bl	fixed_queue_length
	mov	r5, r0
	ldr	r0, [r4, #16]
	bl	fixed_queue_length
	mov	r1, r5
	mov	r2, r0
	ldr	r3, [r4, #4]
	ldr	r0, .L25+28
	b	.L22
.L26:
	.align	2
.L25:
	.word	L2CAP_CONNECTIONLESS_CID
	.word	FALSE
	.word	.LC0
	.word	TRUE
	.word	l2cb
	.word	.LC2
	.word	.LC1
	.word	.LC3
	.size	l2cu_check_channel_congestion, .-l2cu_check_channel_congestion
	.comm	l2cb,8,4
	.comm	TRUE,4,4
	.comm	L2CAP_NUM_FIXED_CHNLS,4,4
	.comm	L2CAP_CONNECTIONLESS_CID,4,4
	.comm	FALSE,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
