	.file	"extr_l2c_link.c_l2c_link_timeout.c"
	.intel_syntax noprefix
	.text
	.section	.rodata.str1.8,"aMS",@progbits,1
	.align 8
.LC0:
	.string	"L2CAP - l2c_link_timeout() link state %d first CCB %p is_bonding:%d"
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC1:
	.string	"L2CAP - ping timeout"
	.text
	.p2align 4
	.globl	l2c_link_timeout
	.type	l2c_link_timeout, @function
l2c_link_timeout:
.LFB0:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rdi
	push	rbx
	.cfi_def_cfa_offset 24
	.cfi_offset 3, -24
	sub	rsp, 8
	.cfi_def_cfa_offset 32
	mov	rcx, QWORD PTR 16[rdi]
	mov	rdx, QWORD PTR 24[rdi]
	mov	rsi, QWORD PTR [rdi]
	lea	rdi, .LC0[rip]
	call	L2CAP_TRACE_EVENT@PLT
	mov	rax, QWORD PTR 0[rbp]
	cmp	rax, QWORD PTR LST_CONNECTING_WAIT_SWITCH[rip]
	je	.L2
	cmp	rax, QWORD PTR LST_CONNECTING[rip]
	je	.L3
	cmp	rax, QWORD PTR LST_CONNECT_HOLDING[rip]
	je	.L4
	cmp	rax, QWORD PTR LST_DISCONNECTING[rip]
	jne	.L5
.L4:
	mov	rbx, QWORD PTR 24[rbp]
	mov	QWORD PTR 40[rbp], 0
	test	rbx, rbx
	je	.L9
	.p2align 4,,10
	.p2align 3
.L7:
	mov	rdi, rbx
	mov	esi, DWORD PTR L2CEVT_LP_DISCONNECT_IND[rip]
	mov	rbx, QWORD PTR [rbx]
	xor	edx, edx
	call	l2c_csm_execute@PLT
	test	rbx, rbx
	jne	.L7
	mov	rax, QWORD PTR 0[rbp]
.L6:
	cmp	QWORD PTR LST_CONNECTING[rip], rax
	je	.L8
.L9:
	mov	rdi, rbp
	call	l2cu_release_lcb@PLT
	mov	rax, QWORD PTR 0[rbp]
.L5:
	cmp	QWORD PTR LST_CONNECTED[rip], rax
	je	.L42
.L1:
	add	rsp, 8
	.cfi_remember_state
	.cfi_def_cfa_offset 24
	pop	rbx
	.cfi_def_cfa_offset 16
	pop	rbp
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L3:
	.cfi_restore_state
	mov	rbx, QWORD PTR 24[rbp]
	mov	QWORD PTR 40[rbp], 0
	test	rbx, rbx
	jne	.L7
	.p2align 4,,10
	.p2align 3
.L8:
	mov	rax, QWORD PTR TRUE[rip]
	cmp	QWORD PTR l2cb[rip], rax
	jne	.L9
	mov	edi, DWORD PTR l2cb[rip+8]
	call	L2CA_CancelBleConnectReq@PLT
	jmp	.L9
	.p2align 4,,10
	.p2align 3
.L42:
	mov	rax, QWORD PTR 32[rbp]
	test	rax, rax
	je	.L19
	mov	edi, DWORD PTR L2CAP_PING_RESULT_NO_RESP[rip]
	mov	QWORD PTR 32[rbp], 0
	call	[QWORD PTR [rax]]
	lea	rdi, .LC1[rip]
	call	L2CAP_TRACE_WARNING@PLT
	mov	rbx, QWORD PTR 24[rbp]
	test	rbx, rbx
	je	.L14
	.p2align 4,,10
	.p2align 3
.L16:
	mov	rdi, rbx
	mov	esi, DWORD PTR L2CEVT_LP_DISCONNECT_IND[rip]
	mov	rbx, QWORD PTR [rbx]
	xor	edx, edx
	call	l2c_csm_execute@PLT
	test	rbx, rbx
	jne	.L16
.L19:
	cmp	QWORD PTR 24[rbp], 0
	je	.L14
	add	rsp, 8
	.cfi_remember_state
	.cfi_def_cfa_offset 24
	mov	rdi, rbp
	xor	edx, edx
	xor	esi, esi
	pop	rbx
	.cfi_def_cfa_offset 16
	pop	rbp
	.cfi_def_cfa_offset 8
	jmp	l2c_link_check_send_pkts@PLT
	.p2align 4,,10
	.p2align 3
.L2:
	.cfi_restore_state
	mov	rbx, QWORD PTR 24[rbp]
	mov	QWORD PTR 40[rbp], 0
	test	rbx, rbx
	jne	.L7
	jmp	.L6
	.p2align 4,,10
	.p2align 3
.L14:
	mov	edi, DWORD PTR 12[rbp]
	mov	esi, DWORD PTR HCI_ERR_PEER_USER[rip]
	call	btm_sec_disconnect@PLT
	cmp	QWORD PTR BTM_CMD_STORED[rip], rax
	je	.L1
	cmp	QWORD PTR BTM_CMD_STARTED[rip], rax
	je	.L40
	cmp	QWORD PTR BTM_SUCCESS[rip], rax
	je	.L43
	cmp	QWORD PTR BTM_BUSY[rip], rax
	je	.L1
	cmp	QWORD PTR 16[rbp], 0
	jne	.L44
.L23:
	mov	edx, DWORD PTR BT_1SEC_TIMEOUT[rip]
.L21:
	cmp	edx, 65535
	je	.L1
	mov	esi, DWORD PTR BTU_TTYPE_L2CAP_LINK[rip]
	add	rsp, 8
	.cfi_remember_state
	.cfi_def_cfa_offset 24
	lea	rdi, 8[rbp]
	pop	rbx
	.cfi_def_cfa_offset 16
	pop	rbp
	.cfi_def_cfa_offset 8
	jmp	btu_start_timer@PLT
.L44:
	.cfi_restore_state
	mov	edi, DWORD PTR 12[rbp]
	mov	esi, DWORD PTR HCI_ERR_PEER_USER[rip]
	call	btsnd_hcic_disconnect@PLT
	test	rax, rax
	je	.L23
	mov	rdi, rbp
	call	l2cu_process_fixed_disc_cback@PLT
.L40:
	mov	rax, QWORD PTR LST_DISCONNECTING[rip]
	mov	edx, DWORD PTR L2CAP_LINK_DISCONNECT_TOUT[rip]
	mov	QWORD PTR 0[rbp], rax
	jmp	.L21
.L43:
	mov	rdi, rbp
	call	l2cu_process_fixed_disc_cback@PLT
	mov	rax, QWORD PTR LST_DISCONNECTING[rip]
	mov	QWORD PTR 0[rbp], rax
	jmp	.L1
	.cfi_endproc
.LFE0:
	.size	l2c_link_timeout, .-l2c_link_timeout
	.comm	l2cb,16,16
	.comm	TRUE,8,8
	.comm	LST_DISCONNECTING,8,8
	.comm	LST_CONNECT_HOLDING,8,8
	.comm	LST_CONNECTING_WAIT_SWITCH,8,8
	.comm	LST_CONNECTING,8,8
	.comm	LST_CONNECTED,8,8
	.comm	L2CEVT_LP_DISCONNECT_IND,4,4
	.comm	L2CAP_PING_RESULT_NO_RESP,4,4
	.comm	L2CAP_LINK_DISCONNECT_TOUT,4,4
	.comm	HCI_ERR_PEER_USER,4,4
	.comm	BT_1SEC_TIMEOUT,4,4
	.comm	BTU_TTYPE_L2CAP_LINK,4,4
	.comm	BTM_SUCCESS,8,8
	.comm	BTM_CMD_STORED,8,8
	.comm	BTM_CMD_STARTED,8,8
	.comm	BTM_BUSY,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_link.c_l2c_link_timeout.c"
	.text
	.section	.rodata.str1.4,"aMS",%progbits,1
	.align	2
.LC0:
	.ascii	"L2CAP - l2c_link_timeout() link state %d first CCB "
	.ascii	"%p is_bonding:%d\000"
	.align	2
.LC1:
	.ascii	"L2CAP - ping timeout\000"
	.text
	.align	2
	.global	l2c_link_timeout
	.syntax unified
	.arm
	.fpu softvfp
	.type	l2c_link_timeout, %function
l2c_link_timeout:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, lr}
	mov	r5, r0
	ldr	r0, .L48
	ldr	r3, [r5, #12]
	ldr	r2, [r5, #16]
	ldr	r1, [r5]
	bl	L2CAP_TRACE_EVENT
	ldr	r2, .L48+4
	ldr	r3, [r5]
	ldr	r2, [r2]
	cmp	r3, r2
	beq	.L2
	ldr	r7, .L48+8
	ldr	r2, [r7]
	cmp	r3, r2
	beq	.L3
	ldr	r2, .L48+12
	ldr	r2, [r2]
	cmp	r3, r2
	beq	.L4
	ldr	r2, .L48+16
	ldr	r2, [r2]
	cmp	r3, r2
	bne	.L5
.L4:
	mov	r3, #0
	ldr	r4, [r5, #16]
	str	r3, [r5, #24]
	cmp	r4, r3
	beq	.L9
.L24:
	ldr	r6, .L48+20
.L7:
	mov	r0, r4
	ldr	r4, [r4]
	mov	r2, #0
	ldr	r1, [r6]
	bl	l2c_csm_execute
	cmp	r4, #0
	bne	.L7
	ldr	r3, [r5]
.L6:
	ldr	r2, [r7]
	cmp	r2, r3
	beq	.L8
.L9:
	mov	r0, r5
	bl	l2cu_release_lcb
	ldr	r3, [r5]
.L5:
	ldr	r2, .L48+24
	ldr	r2, [r2]
	cmp	r2, r3
	popne	{r4, r5, r6, r7, r8, pc}
	ldr	r3, [r5, #20]
	cmp	r3, #0
	beq	.L19
	mov	r1, #0
	ldr	r2, .L48+28
	str	r1, [r5, #20]
	ldr	r3, [r3]
	ldr	r0, [r2]
	blx	r3
	ldr	r0, .L48+32
	bl	L2CAP_TRACE_WARNING
	ldr	r4, [r5, #16]
	cmp	r4, #0
	beq	.L14
	ldr	r6, .L48+20
.L16:
	mov	r0, r4
	ldr	r4, [r4]
	mov	r2, #0
	ldr	r1, [r6]
	bl	l2c_csm_execute
	cmp	r4, #0
	bne	.L16
.L19:
	ldr	r3, [r5, #16]
	cmp	r3, #0
	beq	.L14
	mov	r2, #0
	mov	r0, r5
	pop	{r4, r5, r6, r7, r8, lr}
	mov	r1, r2
	b	l2c_link_check_send_pkts
.L3:
	mov	r3, #0
	ldr	r4, [r5, #16]
	str	r3, [r5, #24]
	cmp	r4, r3
	bne	.L24
.L8:
	ldr	r3, .L48+36
	ldr	r2, .L48+40
	ldr	r1, [r3]
	ldr	r2, [r2]
	cmp	r1, r2
	bne	.L9
	ldr	r0, [r3, #4]
	bl	L2CA_CancelBleConnectReq
	b	.L9
.L2:
	mov	r2, #0
	ldr	r4, [r5, #16]
	ldr	r7, .L48+8
	cmp	r4, r2
	str	r2, [r5, #24]
	bne	.L24
	b	.L6
.L14:
	ldr	r4, .L48+44
	ldr	r0, [r5, #8]
	ldr	r1, [r4]
	bl	btm_sec_disconnect
	ldr	r3, .L48+48
	ldr	r3, [r3]
	cmp	r3, r0
	popeq	{r4, r5, r6, r7, r8, pc}
	ldr	r3, .L48+52
	ldr	r3, [r3]
	cmp	r3, r0
	beq	.L44
	ldr	r3, .L48+56
	ldr	r3, [r3]
	cmp	r3, r0
	beq	.L46
	ldr	r3, .L48+60
	ldr	r3, [r3]
	cmp	r3, r0
	popeq	{r4, r5, r6, r7, r8, pc}
	ldr	r3, [r5, #12]
	cmp	r3, #0
	bne	.L47
.L23:
	ldr	r3, .L48+64
	ldr	r2, [r3]
.L21:
	ldr	r3, .L48+68
	cmp	r2, r3
	popeq	{r4, r5, r6, r7, r8, pc}
	ldr	r3, .L48+72
	add	r0, r5, #4
	ldr	r1, [r3]
	pop	{r4, r5, r6, r7, r8, lr}
	b	btu_start_timer
.L47:
	ldr	r1, [r4]
	ldr	r0, [r5, #8]
	bl	btsnd_hcic_disconnect
	cmp	r0, #0
	beq	.L23
	mov	r0, r5
	bl	l2cu_process_fixed_disc_cback
.L44:
	ldr	r3, .L48+16
	ldr	r2, .L48+76
	ldr	r3, [r3]
	ldr	r2, [r2]
	str	r3, [r5]
	b	.L21
.L46:
	mov	r0, r5
	bl	l2cu_process_fixed_disc_cback
	ldr	r3, .L48+16
	ldr	r3, [r3]
	str	r3, [r5]
	pop	{r4, r5, r6, r7, r8, pc}
.L49:
	.align	2
.L48:
	.word	.LC0
	.word	LST_CONNECTING_WAIT_SWITCH
	.word	LST_CONNECTING
	.word	LST_CONNECT_HOLDING
	.word	LST_DISCONNECTING
	.word	L2CEVT_LP_DISCONNECT_IND
	.word	LST_CONNECTED
	.word	L2CAP_PING_RESULT_NO_RESP
	.word	.LC1
	.word	l2cb
	.word	TRUE
	.word	HCI_ERR_PEER_USER
	.word	BTM_CMD_STORED
	.word	BTM_CMD_STARTED
	.word	BTM_SUCCESS
	.word	BTM_BUSY
	.word	BT_1SEC_TIMEOUT
	.word	65535
	.word	BTU_TTYPE_L2CAP_LINK
	.word	L2CAP_LINK_DISCONNECT_TOUT
	.size	l2c_link_timeout, .-l2c_link_timeout
	.comm	l2cb,8,4
	.comm	TRUE,4,4
	.comm	LST_DISCONNECTING,4,4
	.comm	LST_CONNECT_HOLDING,4,4
	.comm	LST_CONNECTING_WAIT_SWITCH,4,4
	.comm	LST_CONNECTING,4,4
	.comm	LST_CONNECTED,4,4
	.comm	L2CEVT_LP_DISCONNECT_IND,4,4
	.comm	L2CAP_PING_RESULT_NO_RESP,4,4
	.comm	L2CAP_LINK_DISCONNECT_TOUT,4,4
	.comm	HCI_ERR_PEER_USER,4,4
	.comm	BT_1SEC_TIMEOUT,4,4
	.comm	BTU_TTYPE_L2CAP_LINK,4,4
	.comm	BTM_SUCCESS,4,4
	.comm	BTM_CMD_STORED,4,4
	.comm	BTM_CMD_STARTED,4,4
	.comm	BTM_BUSY,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
