	.file	"extr_gap_conn.c_gap_allocate_ccb.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.type	gap_allocate_ccb, @function
gap_allocate_ccb:
.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
	sub	rsp, 8
	.cfi_def_cfa_offset 32
	mov	rax, QWORD PTR GAP_MAX_CONNECTIONS[rip]
	mov	r12, QWORD PTR gap_cb[rip]
	test	rax, rax
	jle	.L5
	mov	rdx, QWORD PTR GAP_CCB_STATE_IDLE[rip]
	xor	ebx, ebx
	jmp	.L4
	.p2align 4,,10
	.p2align 3
.L3:
	add	rbx, 1
	add	r12, 40
	cmp	rbx, rax
	je	.L5
.L4:
	cmp	QWORD PTR [r12], rdx
	jne	.L3
	mov	edx, 40
	xor	esi, esi
	mov	rdi, r12
	call	memset@PLT
	mov	edi, DWORD PTR QUEUE_SIZE_MAX[rip]
	call	fixed_queue_new@PLT
	mov	edi, DWORD PTR QUEUE_SIZE_MAX[rip]
	mov	QWORD PTR 32[r12], rax
	call	fixed_queue_new@PLT
	mov	QWORD PTR 16[r12], rbx
	mov	QWORD PTR 24[r12], rax
	mov	eax, DWORD PTR L2CAP_MTU_SIZE[rip]
	mov	DWORD PTR 8[r12], eax
	add	rsp, 8
	.cfi_remember_state
	.cfi_def_cfa_offset 24
	mov	rax, r12
	pop	rbx
	.cfi_def_cfa_offset 16
	pop	r12
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L5:
	.cfi_restore_state
	xor	r12d, r12d
	add	rsp, 8
	.cfi_def_cfa_offset 24
	mov	rax, r12
	pop	rbx
	.cfi_def_cfa_offset 16
	pop	r12
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE0:
	.size	gap_allocate_ccb, .-gap_allocate_ccb
	.comm	gap_cb,8,8
	.comm	QUEUE_SIZE_MAX,4,4
	.comm	L2CAP_MTU_SIZE,4,4
	.comm	GAP_MAX_CONNECTIONS,8,8
	.comm	GAP_CCB_STATE_IDLE,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_gap_conn.c_gap_allocate_ccb.c"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	gap_allocate_ccb, %function
gap_allocate_ccb:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	ldr	r2, .L9
	ldr	r3, .L9+4
	ldr	r2, [r2]
	push	{r4, r5, r6, lr}
	cmp	r2, #0
	ldr	r4, [r3]
	ble	.L5
	ldr	r3, .L9+8
	mov	r5, #0
	ldr	r1, [r3]
	b	.L4
.L3:
	add	r5, r5, #1
	cmp	r5, r2
	add	r4, r4, #20
	beq	.L5
.L4:
	ldr	r3, [r4]
	cmp	r3, r1
	bne	.L3
	ldr	r6, .L9+12
	mov	r2, #20
	mov	r1, #0
	mov	r0, r4
	bl	memset
	ldr	r0, [r6]
	bl	fixed_queue_new
	mov	r3, r0
	ldr	r0, [r6]
	str	r3, [r4, #16]
	bl	fixed_queue_new
	ldr	r3, .L9+16
	str	r0, [r4, #12]
	ldr	r3, [r3]
	mov	r0, r4
	stmib	r4, {r3, r5}
	pop	{r4, r5, r6, pc}
.L5:
	mov	r4, #0
	mov	r0, r4
	pop	{r4, r5, r6, pc}
.L10:
	.align	2
.L9:
	.word	GAP_MAX_CONNECTIONS
	.word	gap_cb
	.word	GAP_CCB_STATE_IDLE
	.word	QUEUE_SIZE_MAX
	.word	L2CAP_MTU_SIZE
	.size	gap_allocate_ccb, .-gap_allocate_ccb
	.comm	gap_cb,4,4
	.comm	QUEUE_SIZE_MAX,4,4
	.comm	L2CAP_MTU_SIZE,4,4
	.comm	GAP_MAX_CONNECTIONS,4,4
	.comm	GAP_CCB_STATE_IDLE,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
