	.file	"extr_bta_dm_act.c_bta_dm_rm_cback.c"
	.intel_syntax noprefix
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"bta_dm_rm_cback:%d, status:%d"
	.text
	.p2align 4
	.type	bta_dm_rm_cback, @function
bta_dm_rm_cback:
.LFB0:
	.cfi_startproc
	endbr64
	push	r12
	.cfi_def_cfa_offset 16
	.cfi_offset 12, -16
	mov	r12, rdx
	push	rbp
	.cfi_def_cfa_offset 24
	.cfi_offset 6, -24
	mov	rbp, rsi
	push	rbx
	.cfi_def_cfa_offset 32
	.cfi_offset 3, -32
	mov	rbx, rdi
	mov	edi, ecx
	call	bta_dm_find_peer_device@PLT
	cmp	QWORD PTR BTA_SYS_CONN_OPEN[rip], rbx
	jne	.L4
	test	rax, rax
	jne	.L38
.L4:
	mov	rdx, QWORD PTR BTA_ID_AV[rip]
	cmp	rdx, rbp
	je	.L10
	cmp	QWORD PTR BTA_ID_AVK[rip], rbp
	je	.L10
.L11:
	cmp	QWORD PTR BTA_SYS_CONN_BUSY[rip], rbx
	je	.L1
	cmp	QWORD PTR BTA_SYS_CONN_IDLE[rip], rbx
	jne	.L39
.L1:
	pop	rbx
	.cfi_remember_state
	.cfi_def_cfa_offset 24
	pop	rbp
	.cfi_def_cfa_offset 16
	pop	r12
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L10:
	.cfi_restore_state
	cmp	QWORD PTR BTA_SYS_CONN_BUSY[rip], rbx
	je	.L40
	cmp	QWORD PTR BTA_SYS_CONN_IDLE[rip], rbx
	je	.L16
.L35:
	mov	rsi, QWORD PTR bta_dm_cb[rip]
.L15:
	mov	rdx, rbx
	lea	rdi, .LC0[rip]
	call	APPL_TRACE_EVENT@PLT
	jmp	.L11
	.p2align 4,,10
	.p2align 3
.L39:
	mov	edi, DWORD PTR FALSE[rip]
	pop	rbx
	.cfi_remember_state
	.cfi_def_cfa_offset 24
	pop	rbp
	.cfi_def_cfa_offset 16
	pop	r12
	.cfi_def_cfa_offset 8
	jmp	bta_dm_adjust_roles@PLT
	.p2align 4,,10
	.p2align 3
.L38:
	.cfi_restore_state
	mov	rsi, QWORD PTR BTA_DM_UNPAIRING[rip]
	cmp	QWORD PTR [rax], rsi
	je	.L5
	mov	rdx, QWORD PTR BTA_DM_CONNECTED[rip]
	mov	QWORD PTR [rax], rdx
.L5:
	mov	rcx, QWORD PTR p_bta_dm_rm_cfg[rip]
	mov	rdx, QWORD PTR [rcx]
	test	rdx, rdx
	je	.L4
	mov	rsi, QWORD PTR BTA_ALL_APP_ID[rip]
	add	rcx, 24
	mov	edi, 1
	jmp	.L9
	.p2align 4,,10
	.p2align 3
.L41:
	cmp	r8, rsi
	je	.L7
.L8:
	add	rdi, 1
	add	rcx, 24
	cmp	rdi, rdx
	ja	.L4
.L9:
	mov	r8, QWORD PTR [rcx]
	cmp	r8, r12
	jne	.L41
.L7:
	cmp	QWORD PTR 8[rcx], rbp
	jne	.L8
	mov	rdx, QWORD PTR 16[rcx]
	cmp	QWORD PTR 8[rax], rdx
	jge	.L4
	mov	QWORD PTR 8[rax], rdx
	jmp	.L4
	.p2align 4,,10
	.p2align 3
.L40:
	test	rax, rax
	je	.L17
	mov	ecx, DWORD PTR BTA_DM_DI_AV_ACTIVE[rip]
	or	DWORD PTR 16[rax], ecx
.L17:
	cmp	rdx, rbp
	jne	.L35
	xor	eax, eax
	call	bta_dm_get_av_count@PLT
	mov	QWORD PTR bta_dm_cb[rip], rax
	mov	rsi, rax
	jmp	.L15
	.p2align 4,,10
	.p2align 3
.L16:
	test	rax, rax
	je	.L17
	mov	ecx, DWORD PTR BTA_DM_DI_AV_ACTIVE[rip]
	not	ecx
	and	DWORD PTR 16[rax], ecx
	jmp	.L17
	.cfi_endproc
.LFE0:
	.size	bta_dm_rm_cback, .-bta_dm_rm_cback
	.comm	p_bta_dm_rm_cfg,8,8
	.comm	bta_dm_cb,8,8
	.comm	FALSE,4,4
	.comm	BTA_SYS_CONN_OPEN,8,8
	.comm	BTA_SYS_CONN_IDLE,8,8
	.comm	BTA_SYS_CONN_BUSY,8,8
	.comm	BTA_ID_AVK,8,8
	.comm	BTA_ID_AV,8,8
	.comm	BTA_DM_UNPAIRING,8,8
	.comm	BTA_DM_DI_AV_ACTIVE,4,4
	.comm	BTA_DM_CONNECTED,8,8
	.comm	BTA_ALL_APP_ID,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_bta_dm_act.c_bta_dm_rm_cback.c"
	.text
	.section	.rodata.str1.4,"aMS",%progbits,1
	.align	2
.LC0:
	.ascii	"bta_dm_rm_cback:%d, status:%d\000"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	bta_dm_rm_cback, %function
bta_dm_rm_cback:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, lr}
	mov	r4, r0
	mov	r0, r3
	mov	r5, r1
	mov	r6, r2
	bl	bta_dm_find_peer_device
	ldr	r3, .L38
	cmp	r0, #0
	ldr	r3, [r3]
	sub	r3, r3, r4
	clz	r3, r3
	lsr	r3, r3, #5
	moveq	r3, #0
	cmp	r3, #0
	bne	.L35
.L3:
	ldr	r3, .L38+4
	ldr	r6, .L38+8
	ldr	r3, [r3]
	cmp	r3, r5
	beq	.L9
	ldr	r2, .L38+12
	ldr	r2, [r2]
	cmp	r2, r5
	beq	.L9
.L10:
	ldr	r3, [r6]
	cmp	r3, r4
	popeq	{r4, r5, r6, r7, r8, pc}
	ldr	r3, .L38+16
	ldr	r3, [r3]
	cmp	r3, r4
	popeq	{r4, r5, r6, r7, r8, pc}
	ldr	r3, .L38+20
	pop	{r4, r5, r6, r7, r8, lr}
	ldr	r0, [r3]
	b	bta_dm_adjust_roles
.L9:
	ldr	r2, [r6]
	cmp	r2, r4
	beq	.L36
	ldr	r2, .L38+16
	ldr	r2, [r2]
	cmp	r2, r4
	beq	.L15
.L32:
	ldr	r3, .L38+24
	ldr	r1, [r3]
.L14:
	mov	r2, r4
	ldr	r0, .L38+28
	bl	APPL_TRACE_EVENT
	b	.L10
.L35:
	ldr	r3, .L38+32
	ldr	r2, [r0]
	ldr	r3, [r3]
	cmp	r2, r3
	ldrne	r3, .L38+36
	ldrne	r3, [r3]
	strne	r3, [r0]
	ldr	r3, .L38+40
	ldr	r3, [r3]
	ldr	r2, [r3]
	cmp	r2, #0
	beq	.L3
	ldr	r1, .L38+44
	mov	ip, #1
	ldr	r7, [r1]
	add	r3, r3, #12
	b	.L8
.L37:
	cmp	lr, r7
	beq	.L6
.L7:
	cmp	ip, r2
	add	r3, r3, #12
	bhi	.L3
.L8:
	ldr	lr, [r3]
	add	ip, ip, #1
	cmp	lr, r6
	bne	.L37
.L6:
	ldr	r1, [r3, #4]
	cmp	r1, r5
	bne	.L7
	ldr	r3, [r3, #8]
	ldr	r2, [r0, #4]
	cmp	r2, r3
	strlt	r3, [r0, #4]
	b	.L3
.L36:
	cmp	r0, #0
	beq	.L16
	ldr	r1, .L38+48
	ldr	r2, [r0, #8]
	ldr	r1, [r1]
	orr	r2, r2, r1
	str	r2, [r0, #8]
.L16:
	cmp	r3, r5
	bne	.L32
	bl	bta_dm_get_av_count
	ldr	r3, .L38+24
	mov	r1, r0
	str	r0, [r3]
	b	.L14
.L15:
	cmp	r0, #0
	ldrne	r1, .L38+48
	ldrne	r2, [r0, #8]
	ldrne	r1, [r1]
	bicne	r2, r2, r1
	strne	r2, [r0, #8]
	b	.L16
.L39:
	.align	2
.L38:
	.word	BTA_SYS_CONN_OPEN
	.word	BTA_ID_AV
	.word	BTA_SYS_CONN_BUSY
	.word	BTA_ID_AVK
	.word	BTA_SYS_CONN_IDLE
	.word	FALSE
	.word	bta_dm_cb
	.word	.LC0
	.word	BTA_DM_UNPAIRING
	.word	BTA_DM_CONNECTED
	.word	p_bta_dm_rm_cfg
	.word	BTA_ALL_APP_ID
	.word	BTA_DM_DI_AV_ACTIVE
	.size	bta_dm_rm_cback, .-bta_dm_rm_cback
	.comm	p_bta_dm_rm_cfg,4,4
	.comm	bta_dm_cb,4,4
	.comm	FALSE,4,4
	.comm	BTA_SYS_CONN_OPEN,4,4
	.comm	BTA_SYS_CONN_IDLE,4,4
	.comm	BTA_SYS_CONN_BUSY,4,4
	.comm	BTA_ID_AVK,4,4
	.comm	BTA_ID_AV,4,4
	.comm	BTA_DM_UNPAIRING,4,4
	.comm	BTA_DM_DI_AV_ACTIVE,4,4
	.comm	BTA_DM_CONNECTED,4,4
	.comm	BTA_ALL_APP_ID,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
