	.file	"extr_l2cap_core.c_l2cap_connect_req.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.type	l2cap_connect_req, @function
l2cap_connect_req:
.LFB0:
	.cfi_startproc
	endbr64
	cmp	edx, 3
	ja	.L2
	mov	eax, DWORD PTR EPROTO[rip]
	neg	eax
	ret
	.p2align 4,,10
	.p2align 3
.L2:
	push	r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	push	r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	mov	r14, rsi
	push	r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	mov	r13, rcx
	push	r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	push	rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	mov	r15, QWORD PTR [rdi]
	mov	rbp, rdi
	mov	r12, QWORD PTR 8[r15]
	mov	rdi, r12
	call	hci_dev_lock@PLT
	mov	esi, DWORD PTR HCI_MGMT[rip]
	mov	rdi, r12
	call	hci_dev_test_flag@PLT
	test	rax, rax
	jne	.L11
.L5:
	mov	rdi, r12
	call	hci_dev_unlock@PLT
	mov	rdx, r13
	mov	rsi, r14
	mov	rdi, rbp
	mov	ecx, DWORD PTR L2CAP_CONN_RSP[rip]
	xor	r8d, r8d
	call	l2cap_connect@PLT
	pop	rbp
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	xor	eax, eax
	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
.L11:
	.cfi_restore_state
	mov	edi, DWORD PTR HCI_CONN_MGMT_CONNECTED[rip]
	mov	rsi, r15
	call	test_and_set_bit@PLT
	test	eax, eax
	jne	.L5
	xor	r8d, r8d
	xor	ecx, ecx
	xor	edx, edx
	mov	rsi, r15
	mov	rdi, r12
	call	mgmt_device_connected@PLT
	jmp	.L5
	.cfi_endproc
.LFE0:
	.size	l2cap_connect_req, .-l2cap_connect_req
	.comm	L2CAP_CONN_RSP,4,4
	.comm	HCI_MGMT,4,4
	.comm	HCI_CONN_MGMT_CONNECTED,4,4
	.comm	EPROTO,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_l2cap_core.c_l2cap_connect_req.c"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	l2cap_connect_req, %function
l2cap_connect_req:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	cmp	r2, #3
	bhi	.L2
	ldr	r3, .L12
	ldr	r0, [r3]
	rsb	r0, r0, #0
	bx	lr
.L2:
	push	{r4, r5, r6, r7, r8, lr}
	ldr	r4, [r0]
	sub	sp, sp, #8
	ldr	r5, [r4, #4]
	mov	r8, r0
	mov	r0, r5
	mov	r7, r1
	mov	r6, r3
	bl	hci_dev_lock
	ldr	r3, .L12+4
	mov	r0, r5
	ldr	r1, [r3]
	bl	hci_dev_test_flag
	cmp	r0, #0
	bne	.L11
.L5:
	mov	r4, #0
	mov	r0, r5
	bl	hci_dev_unlock
	ldr	r3, .L12+8
	str	r4, [sp]
	mov	r2, r6
	mov	r1, r7
	mov	r0, r8
	ldr	r3, [r3]
	bl	l2cap_connect
	mov	r0, r4
	add	sp, sp, #8
	@ sp needed
	pop	{r4, r5, r6, r7, r8, pc}
.L11:
	ldr	r3, .L12+12
	mov	r1, r4
	ldr	r0, [r3]
	bl	test_and_set_bit
	subs	r3, r0, #0
	bne	.L5
	mov	r1, r4
	mov	r2, r3
	mov	r0, r5
	str	r3, [sp]
	bl	mgmt_device_connected
	b	.L5
.L13:
	.align	2
.L12:
	.word	EPROTO
	.word	HCI_MGMT
	.word	L2CAP_CONN_RSP
	.word	HCI_CONN_MGMT_CONNECTED
	.size	l2cap_connect_req, .-l2cap_connect_req
	.comm	L2CAP_CONN_RSP,4,4
	.comm	HCI_MGMT,4,4
	.comm	HCI_CONN_MGMT_CONNECTED,4,4
	.comm	EPROTO,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
