	.file	"extr_btm_sec.c_btm_sec_send_hci_disconnect.c"
	.intel_syntax noprefix
	.text
	.section	.rodata.str1.8,"aMS",@progbits,1
	.align 8
.LC0:
	.string	"btm_sec_send_hci_disconnect:  handle:0x%x, reason=0x%x\n"
	.align 8
.LC1:
	.string	"RS in progress - Set DISC Pending flag in btm_sec_send_hci_disconnect to delay disconnect\n"
	.text
	.p2align 4
	.type	btm_sec_send_hci_disconnect, @function
btm_sec_send_hci_disconnect:
.LFB0:
	.cfi_startproc
	endbr64
	push	r14
	.cfi_def_cfa_offset 16
	.cfi_offset 14, -16
	mov	r14d, DWORD PTR BTM_CMD_STARTED[rip]
	push	r13
	.cfi_def_cfa_offset 24
	.cfi_offset 13, -24
	push	r12
	.cfi_def_cfa_offset 32
	.cfi_offset 12, -32
	mov	r12d, esi
	push	rbp
	.cfi_def_cfa_offset 40
	.cfi_offset 6, -40
	mov	rbp, rdx
	mov	edx, esi
	push	rbx
	.cfi_def_cfa_offset 48
	.cfi_offset 3, -48
	mov	r13d, DWORD PTR [rdi]
	mov	rbx, rdi
	mov	rsi, rbp
	lea	rdi, .LC0[rip]
	call	BTM_TRACE_EVENT@PLT
	cmp	r13d, 129
	je	.L2
	cmp	r13d, 130
	je	.L3
	cmp	r13d, 128
	je	.L1
	xor	eax, eax
	cmp	QWORD PTR 8[rbx], rbp
	sete	al
	add	eax, 129
	mov	DWORD PTR [rbx], eax
.L7:
	mov	rax, QWORD PTR BTM_SEC_RS_PENDING[rip]
	cmp	QWORD PTR 24[rbx], rax
	jne	.L6
	cmp	QWORD PTR 8[rbx], rbp
	je	.L16
.L6:
	mov	esi, r12d
	mov	rdi, rbp
	call	btsnd_hcic_disconnect@PLT
	test	eax, eax
	jne	.L1
	mov	DWORD PTR [rbx], r13d
	mov	r14d, DWORD PTR BTM_NO_RESOURCES[rip]
.L1:
	pop	rbx
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	mov	eax, r14d
	pop	rbp
	.cfi_def_cfa_offset 32
	pop	r12
	.cfi_def_cfa_offset 24
	pop	r13
	.cfi_def_cfa_offset 16
	pop	r14
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L3:
	.cfi_restore_state
	cmp	QWORD PTR 8[rbx], rbp
	je	.L1
	mov	DWORD PTR [rbx], 128
	jmp	.L6
	.p2align 4,,10
	.p2align 3
.L2:
	cmp	QWORD PTR 16[rbx], rbp
	je	.L1
	mov	DWORD PTR [rbx], 128
	jmp	.L7
	.p2align 4,,10
	.p2align 3
.L16:
	lea	rdi, .LC1[rip]
	call	BTM_TRACE_DEBUG@PLT
	mov	rax, QWORD PTR BTM_SEC_DISC_PENDING[rip]
	mov	r14d, DWORD PTR BTM_SUCCESS[rip]
	mov	QWORD PTR 24[rbx], rax
	jmp	.L1
	.cfi_endproc
.LFE0:
	.size	btm_sec_send_hci_disconnect, .-btm_sec_send_hci_disconnect
	.comm	BTM_SUCCESS,4,4
	.comm	BTM_SEC_RS_PENDING,8,8
	.comm	BTM_SEC_DISC_PENDING,8,8
	.comm	BTM_NO_RESOURCES,4,4
	.comm	BTM_CMD_STARTED,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_btm_sec.c_btm_sec_send_hci_disconnect.c"
	.text
	.section	.rodata.str1.4,"aMS",%progbits,1
	.align	2
.LC0:
	.ascii	"btm_sec_send_hci_disconnect:  handle:0x%x, reason=0"
	.ascii	"x%x\012\000"
	.align	2
.LC1:
	.ascii	"RS in progress - Set DISC Pending flag in btm_sec_s"
	.ascii	"end_hci_disconnect to delay disconnect\012\000"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	btm_sec_send_hci_disconnect, %function
btm_sec_send_hci_disconnect:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, lr}
	mov	r5, r2
	ldr	r7, [r0]
	ldr	r3, .L17
	mov	r2, r1
	mov	r4, r0
	mov	r6, r1
	ldr	r0, .L17+4
	mov	r1, r5
	ldr	r8, [r3]
	bl	BTM_TRACE_EVENT
	cmp	r7, #129
	beq	.L2
	cmp	r7, #130
	beq	.L3
	cmp	r7, #128
	beq	.L1
	ldr	r3, [r4, #4]
	cmp	r3, r5
	moveq	r3, #130
	movne	r3, #129
	str	r3, [r4]
.L7:
	ldr	r3, .L17+8
	ldr	r2, [r4, #12]
	ldr	r3, [r3]
	cmp	r2, r3
	bne	.L6
	ldr	r3, [r4, #4]
	cmp	r3, r5
	beq	.L16
.L6:
	mov	r1, r6
	mov	r0, r5
	bl	btsnd_hcic_disconnect
	cmp	r0, #0
	ldreq	r3, .L17+12
	streq	r7, [r4]
	ldreq	r8, [r3]
.L1:
	mov	r0, r8
	pop	{r4, r5, r6, r7, r8, pc}
.L3:
	ldr	r3, [r4, #4]
	cmp	r3, r5
	beq	.L1
	mov	r3, #128
	str	r3, [r4]
	b	.L6
.L2:
	ldr	r3, [r4, #8]
	cmp	r3, r5
	beq	.L1
	mov	r3, #128
	str	r3, [r4]
	b	.L7
.L16:
	ldr	r0, .L17+16
	bl	BTM_TRACE_DEBUG
	ldr	r3, .L17+20
	ldr	r2, .L17+24
	ldr	r3, [r3]
	ldr	r8, [r2]
	str	r3, [r4, #12]
	b	.L1
.L18:
	.align	2
.L17:
	.word	BTM_CMD_STARTED
	.word	.LC0
	.word	BTM_SEC_RS_PENDING
	.word	BTM_NO_RESOURCES
	.word	.LC1
	.word	BTM_SEC_DISC_PENDING
	.word	BTM_SUCCESS
	.size	btm_sec_send_hci_disconnect, .-btm_sec_send_hci_disconnect
	.comm	BTM_SUCCESS,4,4
	.comm	BTM_SEC_RS_PENDING,4,4
	.comm	BTM_SEC_DISC_PENDING,4,4
	.comm	BTM_NO_RESOURCES,4,4
	.comm	BTM_CMD_STARTED,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
