	.file	"extr_l2cap_core.c_l2cap_disconnect_rsp.c"
	.intel_syntax noprefix
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"dcid 0x%4.4x scid 0x%4.4x"
	.text
	.p2align 4
	.type	l2cap_disconnect_rsp, @function
l2cap_disconnect_rsp:
.LFB0:
	.cfi_startproc
	endbr64
	cmp	edx, 8
	je	.L2
	mov	eax, DWORD PTR EPROTO[rip]
	neg	eax
	ret
	.p2align 4,,10
	.p2align 3
.L2:
	push	r12
	.cfi_def_cfa_offset 16
	.cfi_offset 12, -16
	mov	r12, rdi
	mov	edi, DWORD PTR 4[rcx]
	push	rbp
	.cfi_def_cfa_offset 24
	.cfi_offset 6, -24
	push	rbx
	.cfi_def_cfa_offset 32
	.cfi_offset 3, -32
	mov	rbx, rcx
	call	__le16_to_cpu@PLT
	mov	edi, DWORD PTR [rbx]
	mov	ebp, eax
	call	__le16_to_cpu@PLT
	mov	edx, ebp
	lea	rdi, .LC0[rip]
	mov	esi, eax
	call	BT_DBG@PLT
	mov	rdi, r12
	call	mutex_lock@PLT
	mov	esi, ebp
	mov	rdi, r12
	call	__l2cap_get_chan_by_scid@PLT
	mov	rbp, rax
	test	rax, rax
	je	.L9
	mov	rdi, rax
	call	l2cap_chan_lock@PLT
	mov	rax, QWORD PTR BT_DISCONN[rip]
	mov	rdi, rbp
	cmp	QWORD PTR 0[rbp], rax
	jne	.L11
	call	l2cap_chan_hold@PLT
	xor	esi, esi
	mov	rdi, rbp
	call	l2cap_chan_del@PLT
	mov	rdi, rbp
	call	l2cap_chan_unlock@PLT
	mov	rax, QWORD PTR 8[rbp]
	mov	rdi, rbp
	call	[QWORD PTR [rax]]
	mov	rdi, rbp
	call	l2cap_chan_put@PLT
.L9:
	mov	rdi, r12
	call	mutex_unlock@PLT
	pop	rbx
	.cfi_remember_state
	.cfi_def_cfa_offset 24
	xor	eax, eax
	pop	rbp
	.cfi_def_cfa_offset 16
	pop	r12
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L11:
	.cfi_restore_state
	call	l2cap_chan_unlock@PLT
	mov	rdi, r12
	call	mutex_unlock@PLT
	pop	rbx
	.cfi_def_cfa_offset 24
	xor	eax, eax
	pop	rbp
	.cfi_def_cfa_offset 16
	pop	r12
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE0:
	.size	l2cap_disconnect_rsp, .-l2cap_disconnect_rsp
	.comm	EPROTO,4,4
	.comm	BT_DISCONN,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_l2cap_core.c_l2cap_disconnect_rsp.c"
	.text
	.section	.rodata.str1.4,"aMS",%progbits,1
	.align	2
.LC0:
	.ascii	"dcid 0x%4.4x scid 0x%4.4x\000"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	l2cap_disconnect_rsp, %function
l2cap_disconnect_rsp:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	cmp	r2, #8
	beq	.L2
	ldr	r3, .L12
	ldr	r0, [r3]
	rsb	r0, r0, #0
	bx	lr
.L2:
	push	{r4, r5, r6, lr}
	mov	r5, r0
	ldr	r0, [r3, #4]
	mov	r4, r3
	bl	__le16_to_cpu
	mov	r2, r0
	ldr	r0, [r4]
	mov	r4, r2
	bl	__le16_to_cpu
	mov	r2, r4
	mov	r1, r0
	ldr	r0, .L12+4
	bl	BT_DBG
	mov	r0, r5
	bl	mutex_lock
	mov	r1, r4
	mov	r0, r5
	bl	__l2cap_get_chan_by_scid
	subs	r4, r0, #0
	beq	.L9
	bl	l2cap_chan_lock
	ldr	r3, .L12+8
	ldr	r2, [r4]
	ldr	r3, [r3]
	mov	r0, r4
	cmp	r2, r3
	bne	.L11
	bl	l2cap_chan_hold
	mov	r1, #0
	mov	r0, r4
	bl	l2cap_chan_del
	mov	r0, r4
	bl	l2cap_chan_unlock
	ldr	r3, [r4, #4]
	mov	r0, r4
	ldr	r3, [r3]
	blx	r3
	mov	r0, r4
	bl	l2cap_chan_put
.L9:
	mov	r0, r5
	bl	mutex_unlock
	mov	r0, #0
	pop	{r4, r5, r6, pc}
.L11:
	bl	l2cap_chan_unlock
	mov	r0, r5
	bl	mutex_unlock
	mov	r0, #0
	pop	{r4, r5, r6, pc}
.L13:
	.align	2
.L12:
	.word	EPROTO
	.word	.LC0
	.word	BT_DISCONN
	.size	l2cap_disconnect_rsp, .-l2cap_disconnect_rsp
	.comm	EPROTO,4,4
	.comm	BT_DISCONN,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
