	.file	"extr_l2cap.c_l2cap_connect_req.c"
	.intel_syntax noprefix
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"psm 0x%2.2x scid 0x%4.4x"
.LC1:
	.string	"backlog full %d"
	.text
	.p2align 4
	.type	l2cap_connect_req, @function
l2cap_connect_req:
.LFB0:
	.cfi_startproc
	endbr64
	push	r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	push	r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	push	r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	push	r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	push	rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	mov	rbp, rdi
	push	rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	mov	rbx, rdx
	sub	rsp, 136
	.cfi_def_cfa_offset 192
	mov	edi, DWORD PTR 8[rdx]
	mov	QWORD PTR 16[rsp], rsi
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR 120[rsp], rax
	xor	eax, eax
	mov	eax, DWORD PTR L2CAP_CS_NO_INFO[rip]
	mov	DWORD PTR [rsp], eax
	call	__le16_to_cpu@PLT
	mov	rbx, QWORD PTR [rbx]
	lea	rdi, .LC0[rip]
	mov	edx, eax
	mov	r13d, eax
	xor	eax, eax
	mov	rsi, rbx
	call	BT_DBG@PLT
	mov	edx, DWORD PTR 20[rbp]
	mov	edi, DWORD PTR BT_LISTEN[rip]
	mov	rsi, rbx
	call	l2cap_get_sock_by_psm@PLT
	test	rax, rax
	je	.L18
	mov	edi, 1
	mov	r12, rax
	call	cpu_to_le16@PLT
	cmp	rbx, rax
	je	.L4
	mov	edi, DWORD PTR 24[rbp]
	call	hci_conn_check_link_mode@PLT
	mov	DWORD PTR 12[rsp], eax
	test	eax, eax
	je	.L19
.L4:
	mov	rdi, r12
	mov	r15d, DWORD PTR L2CAP_CR_NO_MEM[rip]
	call	sk_acceptq_is_full@PLT
	test	rax, rax
	jne	.L20
	mov	ecx, DWORD PTR GFP_ATOMIC[rip]
	mov	r14d, DWORD PTR BTPROTO_L2CAP[rip]
	mov	rdi, r12
	mov	DWORD PTR 12[rsp], ecx
	call	sock_net@PLT
	mov	ecx, DWORD PTR 12[rsp]
	mov	edx, r14d
	xor	esi, esi
	mov	edi, eax
	call	l2cap_sock_alloc@PLT
	mov	DWORD PTR 12[rsp], 0
	mov	r14, rax
	test	rax, rax
	je	.L5
	lea	r8, 28[rbp]
	mov	rdi, r8
	mov	QWORD PTR 24[rsp], r8
	call	write_lock_bh@PLT
	mov	r8, QWORD PTR 24[rsp]
	mov	esi, r13d
	mov	rdi, r8
	call	__l2cap_get_chan_by_dcid@PLT
	mov	r8, QWORD PTR 24[rsp]
	test	rax, rax
	jne	.L21
	mov	edi, DWORD PTR 24[rbp]
	mov	QWORD PTR [rsp], r8
	call	hci_conn_hold@PLT
	mov	rsi, r12
	mov	rdi, r14
	call	l2cap_sock_init@PLT
	mov	r15d, DWORD PTR 20[rbp]
	mov	rdi, r14
	call	bt_sk@PLT
	lea	rdi, 12[rax]
	mov	esi, r15d
	call	bacpy@PLT
	mov	r15d, DWORD PTR 16[rbp]
	mov	rdi, r14
	call	bt_sk@PLT
	lea	rdi, 8[rax]
	mov	esi, r15d
	call	bacpy@PLT
	mov	rdi, r14
	call	l2cap_pi@PLT
	mov	rdi, r14
	mov	QWORD PTR 16[rax], rbx
	call	l2cap_pi@PLT
	mov	rdx, r12
	mov	rsi, r14
	mov	rdi, rbp
	mov	DWORD PTR [rax], r13d
	call	__l2cap_chan_add@PLT
	mov	rdi, r14
	call	l2cap_pi@PLT
	mov	esi, DWORD PTR 16[r14]
	mov	rdi, r14
	mov	eax, DWORD PTR 4[rax]
	mov	DWORD PTR 12[rsp], eax
	call	l2cap_sock_set_timer@PLT
	mov	rdi, r14
	call	l2cap_pi@PLT
	mov	rcx, QWORD PTR 16[rsp]
	mov	r8, QWORD PTR [rsp]
	mov	edx, DWORD PTR [rcx]
	mov	DWORD PTR 8[rax], edx
	mov	eax, DWORD PTR 4[rbp]
	test	DWORD PTR L2CAP_INFO_FEAT_MASK_REQ_DONE[rip], eax
	jne	.L22
	mov	rax, QWORD PTR BT_CONNECT2[rip]
	mov	r15d, DWORD PTR L2CAP_CR_PEND[rip]
	mov	QWORD PTR [r14], rax
	mov	eax, DWORD PTR L2CAP_CS_NO_INFO[rip]
	mov	DWORD PTR [rsp], eax
.L11:
	mov	rdi, r8
	call	write_unlock_bh@PLT
.L5:
	mov	rdi, r12
	call	bh_unlock_sock@PLT
.L3:
	mov	edi, r13d
	call	cpu_to_le16@PLT
	mov	edi, DWORD PTR 12[rsp]
	mov	QWORD PTR 64[rsp], rax
	call	cpu_to_le16@PLT
	mov	edi, r15d
	mov	QWORD PTR 56[rsp], rax
	call	cpu_to_le16@PLT
	mov	edi, DWORD PTR [rsp]
	mov	QWORD PTR 48[rsp], rax
	call	cpu_to_le16@PLT
	mov	edx, DWORD PTR L2CAP_CONN_RSP[rip]
	lea	r8, 32[rsp]
	mov	rdi, rbp
	mov	QWORD PTR 40[rsp], rax
	mov	rax, QWORD PTR 16[rsp]
	mov	ecx, 40
	mov	esi, DWORD PTR [rax]
	call	l2cap_send_cmd@PLT
	cmp	DWORD PTR L2CAP_CR_PEND[rip], r15d
	je	.L23
.L12:
	mov	rax, QWORD PTR 120[rsp]
	xor	rax, QWORD PTR fs:40
	jne	.L24
	add	rsp, 136
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	xor	eax, eax
	pop	rbx
	.cfi_def_cfa_offset 48
	pop	rbp
	.cfi_def_cfa_offset 40
	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
.L23:
	.cfi_restore_state
	mov	eax, DWORD PTR [rsp]
	cmp	DWORD PTR L2CAP_CS_NO_INFO[rip], eax
	jne	.L12
	mov	edi, DWORD PTR L2CAP_IT_FEAT_MASK[rip]
	call	cpu_to_le16@PLT
	mov	rdi, rbp
	mov	QWORD PTR 80[rsp], rax
	mov	eax, DWORD PTR L2CAP_INFO_FEAT_MASK_REQ_SENT[rip]
	or	DWORD PTR 4[rbp], eax
	call	l2cap_get_ident@PLT
	mov	edi, DWORD PTR L2CAP_INFO_TIMEOUT[rip]
	mov	DWORD PTR 8[rbp], eax
	call	msecs_to_jiffies@PLT
	add	rax, QWORD PTR jiffies[rip]
	lea	rdi, 12[rbp]
	mov	rsi, rax
	call	mod_timer@PLT
	mov	esi, DWORD PTR 8[rbp]
	lea	r8, 80[rsp]
	mov	rdi, rbp
	mov	edx, DWORD PTR L2CAP_INFO_REQ[rip]
	mov	ecx, 40
	call	l2cap_send_cmd@PLT
	jmp	.L12
	.p2align 4,,10
	.p2align 3
.L18:
	mov	DWORD PTR 12[rsp], 0
	mov	r15d, DWORD PTR L2CAP_CR_BAD_PSM[rip]
	jmp	.L3
	.p2align 4,,10
	.p2align 3
.L20:
	movsx	rsi, DWORD PTR 20[r12]
	lea	rdi, .LC1[rip]
	xor	eax, eax
	call	BT_DBG@PLT
	mov	DWORD PTR 12[rsp], 0
	jmp	.L5
	.p2align 4,,10
	.p2align 3
.L19:
	mov	DWORD PTR 0[rbp], 5
	mov	r15d, DWORD PTR L2CAP_CR_SEC_BLOCK[rip]
	jmp	.L5
	.p2align 4,,10
	.p2align 3
.L21:
	mov	rdi, r8
	call	write_unlock_bh@PLT
	mov	esi, DWORD PTR SOCK_ZAPPED[rip]
	mov	rdi, r14
	call	sock_set_flag@PLT
	mov	rdi, r14
	call	l2cap_sock_kill@PLT
	jmp	.L5
	.p2align 4,,10
	.p2align 3
.L22:
	mov	rdi, r14
	call	l2cap_check_security@PLT
	mov	r8, QWORD PTR [rsp]
	test	rax, rax
	jne	.L25
	mov	rax, QWORD PTR BT_CONNECT2[rip]
	mov	r15d, DWORD PTR L2CAP_CR_PEND[rip]
	mov	QWORD PTR [r14], rax
	mov	eax, DWORD PTR L2CAP_CS_AUTHEN_PEND[rip]
	mov	DWORD PTR [rsp], eax
	jmp	.L11
	.p2align 4,,10
	.p2align 3
.L25:
	mov	rdi, r14
	call	bt_sk@PLT
	mov	r8, QWORD PTR [rsp]
	cmp	QWORD PTR [rax], 0
	je	.L10
	mov	rax, QWORD PTR BT_CONNECT2[rip]
	mov	QWORD PTR 24[rsp], r8
	xor	esi, esi
	mov	rdi, r12
	mov	r15d, DWORD PTR L2CAP_CR_PEND[rip]
	mov	QWORD PTR [r14], rax
	mov	eax, DWORD PTR L2CAP_CS_AUTHOR_PEND[rip]
	mov	DWORD PTR [rsp], eax
	call	[QWORD PTR 8[r12]]
	mov	r8, QWORD PTR 24[rsp]
	jmp	.L11
.L10:
	mov	rax, QWORD PTR BT_CONFIG[rip]
	mov	r15d, DWORD PTR L2CAP_CR_SUCCESS[rip]
	mov	QWORD PTR [r14], rax
	mov	eax, DWORD PTR L2CAP_CS_NO_INFO[rip]
	mov	DWORD PTR [rsp], eax
	jmp	.L11
.L24:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE0:
	.size	l2cap_connect_req, .-l2cap_connect_req
	.comm	jiffies,8,8
	.comm	SOCK_ZAPPED,4,4
	.comm	L2CAP_IT_FEAT_MASK,4,4
	.comm	L2CAP_INFO_TIMEOUT,4,4
	.comm	L2CAP_INFO_REQ,4,4
	.comm	L2CAP_INFO_FEAT_MASK_REQ_SENT,4,4
	.comm	L2CAP_INFO_FEAT_MASK_REQ_DONE,4,4
	.comm	L2CAP_CS_NO_INFO,4,4
	.comm	L2CAP_CS_AUTHOR_PEND,4,4
	.comm	L2CAP_CS_AUTHEN_PEND,4,4
	.comm	L2CAP_CR_SUCCESS,4,4
	.comm	L2CAP_CR_SEC_BLOCK,4,4
	.comm	L2CAP_CR_PEND,4,4
	.comm	L2CAP_CR_NO_MEM,4,4
	.comm	L2CAP_CR_BAD_PSM,4,4
	.comm	L2CAP_CONN_RSP,4,4
	.comm	GFP_ATOMIC,4,4
	.comm	BT_LISTEN,4,4
	.comm	BT_CONNECT2,8,8
	.comm	BT_CONFIG,8,8
	.comm	BTPROTO_L2CAP,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.c_l2cap_connect_req.c"
	.text
	.section	.rodata.str1.4,"aMS",%progbits,1
	.align	2
.LC0:
	.ascii	"psm 0x%2.2x scid 0x%4.4x\000"
	.align	2
.LC1:
	.ascii	"backlog full %d\000"
	.section	.rodata.cst4,"aM",%progbits,4
	.align	2
.LC2:
	.word	__stack_chk_guard
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	l2cap_connect_req, %function
l2cap_connect_req:
	@ args = 0, pretend = 0, frame = 64
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, r9, r10, fp, lr}
	ldr	r3, .L28
	sub	sp, sp, #76
	str	r1, [sp, #12]
	mov	r5, r2
	ldr	r3, [r3]
	str	r3, [sp, #68]
	mov	r3,#0
	ldr	r3, .L28+4
	mov	r4, r0
	ldr	r0, [r2, #4]
	ldr	fp, [r3]
	bl	__le16_to_cpu
	ldr	r8, [r5]
	mov	r2, r0
	mov	r1, r8
	mov	r7, r0
	ldr	r0, .L28+8
	bl	BT_DBG
	ldr	r3, .L28+12
	mov	r1, r8
	ldr	r2, [r4, #20]
	ldr	r0, [r3]
	bl	l2cap_get_sock_by_psm
	subs	r5, r0, #0
	beq	.L20
	mov	r0, #1
	bl	cpu_to_le16
	cmp	r8, r0
	beq	.L4
	ldr	r0, [r4, #24]
	bl	hci_conn_check_link_mode
	subs	r6, r0, #0
	beq	.L21
.L4:
	ldr	r3, .L28+16
	mov	r0, r5
	ldr	r10, [r3]
	bl	sk_acceptq_is_full
	subs	r6, r0, #0
	bne	.L22
	mov	r0, r5
	bl	sock_net
	ldr	r3, .L28+20
	ldr	r2, .L28+24
	mov	r1, r6
	ldr	r3, [r3]
	ldr	r2, [r2]
	bl	l2cap_sock_alloc
	subs	r9, r0, #0
	beq	.L18
	add	r3, r4, #28
	mov	r0, r3
	str	r3, [sp, #16]
	bl	write_lock_bh
	ldr	r3, [sp, #16]
	mov	r1, r7
	mov	r0, r3
	bl	__l2cap_get_chan_by_dcid
	subs	r3, r0, #0
	str	r3, [sp, #20]
	ldr	r3, [sp, #16]
	bne	.L23
	ldr	r0, [r4, #24]
	str	r3, [sp, #16]
	bl	hci_conn_hold
	mov	r1, r5
	mov	r0, r9
	bl	l2cap_sock_init
	mov	r0, r9
	bl	bt_sk
	ldr	r1, [r4, #20]
	add	r0, r0, #8
	bl	bacpy
	mov	r0, r9
	bl	bt_sk
	ldr	r1, [r4, #16]
	add	r0, r0, #4
	bl	bacpy
	mov	r0, r9
	bl	l2cap_pi
	mov	r2, r0
	mov	r0, r9
	str	r8, [r2, #12]
	bl	l2cap_pi
	mov	r2, r5
	mov	r1, r9
	str	r7, [r0]
	mov	r0, r4
	bl	__l2cap_chan_add
	mov	r0, r9
	bl	l2cap_pi
	mov	r2, r0
	ldr	r1, [r9, #8]
	mov	r0, r9
	ldr	r6, [r2, #4]
	bl	l2cap_sock_set_timer
	mov	r0, r9
	bl	l2cap_pi
	ldr	r2, .L28+28
	ldr	r3, [sp, #12]
	ldr	r1, [r4, #4]
	ldr	r2, [r2]
	ldr	ip, [r3]
	tst	r1, r2
	ldr	r3, [sp, #16]
	str	ip, [r0, #8]
	bne	.L24
	ldr	r2, .L28+32
	ldr	r8, .L28+36
	ldr	r2, [r2]
	ldr	r10, [r8]
	str	r2, [r9]
	ldr	r2, .L28+4
	ldr	fp, [r2]
.L11:
	mov	r0, r3
	bl	write_unlock_bh
	b	.L5
.L20:
	mov	r6, r5
	ldr	r3, .L28+40
	ldr	r8, .L28+36
	ldr	r10, [r3]
.L3:
	mov	r0, r7
	bl	cpu_to_le16
	mov	r3, r0
	mov	r0, r6
	str	r3, [sp, #44]
	bl	cpu_to_le16
	mov	r3, r0
	mov	r0, r10
	str	r3, [sp, #40]
	bl	cpu_to_le16
	mov	r3, r0
	mov	r0, fp
	str	r3, [sp, #36]
	bl	cpu_to_le16
	mov	ip, r0
	ldr	r1, [sp, #12]
	ldr	r2, .L28+44
	add	r3, sp, #28
	ldr	r1, [r1]
	ldr	r2, [r2]
	mov	r0, r4
	str	r3, [sp]
	mov	r3, #20
	str	ip, [sp, #32]
	bl	l2cap_send_cmd
	ldr	r3, [r8]
	cmp	r3, r10
	beq	.L25
.L12:
	ldr	r3, .L28
	ldr	r2, [r3]
	ldr	r3, [sp, #68]
	eors	r2, r3, r2
	mov	r3, #0
	bne	.L26
	mov	r0, #0
	add	sp, sp, #76
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, r10, fp, pc}
.L25:
	ldr	r3, .L28+4
	ldr	r3, [r3]
	cmp	r3, fp
	bne	.L12
	ldr	r3, .L28+48
	ldr	r0, [r3]
	bl	cpu_to_le16
	mov	r2, r0
	ldr	r1, .L28+52
	ldr	r3, [r4, #4]
	ldr	r1, [r1]
	mov	r0, r4
	orr	r3, r3, r1
	str	r3, [r4, #4]
	str	r2, [sp, #48]
	bl	l2cap_get_ident
	ldr	r3, .L28+56
	str	r0, [r4, #8]
	ldr	r0, [r3]
	bl	msecs_to_jiffies
	mov	r1, r0
	ldr	r3, .L28+60
	add	r0, r4, #12
	ldr	r3, [r3]
	add	r1, r1, r3
	bl	mod_timer
	ldr	r2, .L28+64
	add	r3, sp, #48
	ldr	r2, [r2]
	str	r3, [sp]
	mov	r0, r4
	mov	r3, #20
	ldr	r1, [r4, #8]
	bl	l2cap_send_cmd
	b	.L12
.L22:
	ldr	r1, [r5, #12]
	ldr	r0, .L28+68
	bl	BT_DBG
	mov	r6, #0
	ldr	r8, .L28+36
.L5:
	mov	r0, r5
	bl	bh_unlock_sock
	b	.L3
.L21:
	mov	r2, #5
	ldr	r3, .L28+72
	ldr	r8, .L28+36
	ldr	r10, [r3]
	str	r2, [r4]
	b	.L5
.L23:
	mov	r0, r3
	bl	write_unlock_bh
	ldr	r3, .L28+76
	mov	r0, r9
	ldr	r1, [r3]
	bl	sock_set_flag
	mov	r0, r9
	bl	l2cap_sock_kill
.L18:
	ldr	r8, .L28+36
	b	.L5
.L24:
	mov	r0, r9
	bl	l2cap_check_security
	cmp	r0, #0
	ldr	r3, [sp, #16]
	bne	.L27
	ldr	r2, .L28+32
	ldr	r8, .L28+36
	ldr	r1, [r2]
	ldr	r2, .L28+80
	ldr	r10, [r8]
	ldr	fp, [r2]
	str	r1, [r9]
	b	.L11
.L27:
	mov	r0, r9
	bl	bt_sk
	ldr	r2, [r0]
	ldr	r3, [sp, #16]
	cmp	r2, #0
	beq	.L10
	ldr	r2, .L28+32
	ldr	ip, .L28+84
	ldr	r2, [r2]
	ldr	r8, .L28+36
	str	r2, [r9]
	mov	r0, r5
	ldr	r1, [sp, #20]
	ldr	r2, [r5, #4]
	ldr	r10, [r8]
	ldr	fp, [ip]
	blx	r2
	ldr	r3, [sp, #16]
	b	.L11
.L10:
	ldr	r2, .L28+88
	ldr	r1, .L28+92
	ldr	r2, [r2]
	ldr	r10, [r1]
	str	r2, [r9]
	ldr	r2, .L28+4
	ldr	r8, .L28+36
	ldr	fp, [r2]
	b	.L11
.L26:
	bl	__stack_chk_fail
.L29:
	.align	2
.L28:
	.word	.LC2
	.word	L2CAP_CS_NO_INFO
	.word	.LC0
	.word	BT_LISTEN
	.word	L2CAP_CR_NO_MEM
	.word	GFP_ATOMIC
	.word	BTPROTO_L2CAP
	.word	L2CAP_INFO_FEAT_MASK_REQ_DONE
	.word	BT_CONNECT2
	.word	L2CAP_CR_PEND
	.word	L2CAP_CR_BAD_PSM
	.word	L2CAP_CONN_RSP
	.word	L2CAP_IT_FEAT_MASK
	.word	L2CAP_INFO_FEAT_MASK_REQ_SENT
	.word	L2CAP_INFO_TIMEOUT
	.word	jiffies
	.word	L2CAP_INFO_REQ
	.word	.LC1
	.word	L2CAP_CR_SEC_BLOCK
	.word	SOCK_ZAPPED
	.word	L2CAP_CS_AUTHEN_PEND
	.word	L2CAP_CS_AUTHOR_PEND
	.word	BT_CONFIG
	.word	L2CAP_CR_SUCCESS
	.size	l2cap_connect_req, .-l2cap_connect_req
	.comm	jiffies,4,4
	.comm	SOCK_ZAPPED,4,4
	.comm	L2CAP_IT_FEAT_MASK,4,4
	.comm	L2CAP_INFO_TIMEOUT,4,4
	.comm	L2CAP_INFO_REQ,4,4
	.comm	L2CAP_INFO_FEAT_MASK_REQ_SENT,4,4
	.comm	L2CAP_INFO_FEAT_MASK_REQ_DONE,4,4
	.comm	L2CAP_CS_NO_INFO,4,4
	.comm	L2CAP_CS_AUTHOR_PEND,4,4
	.comm	L2CAP_CS_AUTHEN_PEND,4,4
	.comm	L2CAP_CR_SUCCESS,4,4
	.comm	L2CAP_CR_SEC_BLOCK,4,4
	.comm	L2CAP_CR_PEND,4,4
	.comm	L2CAP_CR_NO_MEM,4,4
	.comm	L2CAP_CR_BAD_PSM,4,4
	.comm	L2CAP_CONN_RSP,4,4
	.comm	GFP_ATOMIC,4,4
	.comm	BT_LISTEN,4,4
	.comm	BT_CONNECT2,4,4
	.comm	BT_CONFIG,4,4
	.comm	BTPROTO_L2CAP,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
