	.file	"extr_btm_dev.c_btm_find_dev.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.globl	btm_find_dev
	.type	btm_find_dev, @function
btm_find_dev:
.LFB0:
	.cfi_startproc
	endbr64
	push	r12
	.cfi_def_cfa_offset 16
	.cfi_offset 12, -16
	push	rbp
	.cfi_def_cfa_offset 24
	.cfi_offset 6, -24
	push	rbx
	.cfi_def_cfa_offset 32
	.cfi_offset 3, -32
	test	edi, edi
	je	.L2
	cmp	QWORD PTR BTM_SEC_MAX_DEVICE_RECORDS[rip], 0
	jle	.L2
	mov	r12, QWORD PTR btm_cb[rip]
	mov	ebp, edi
	xor	ebx, ebx
	jmp	.L4
	.p2align 4,,10
	.p2align 3
.L6:
	add	rbx, 1
	add	r12, 12
	cmp	QWORD PTR BTM_SEC_MAX_DEVICE_RECORDS[rip], rbx
	jle	.L2
.L4:
	mov	eax, DWORD PTR [r12]
	test	DWORD PTR BTM_SEC_IN_USE[rip], eax
	je	.L6
	mov	edi, DWORD PTR 8[r12]
	mov	edx, DWORD PTR BD_ADDR_LEN[rip]
	mov	esi, ebp
	call	memcmp@PLT
	test	eax, eax
	je	.L1
	mov	edi, DWORD PTR 4[r12]
	mov	edx, DWORD PTR BD_ADDR_LEN[rip]
	mov	esi, ebp
	call	memcmp@PLT
	test	eax, eax
	je	.L1
	mov	rsi, r12
	mov	edi, ebp
	call	btm_ble_addr_resolvable@PLT
	test	rax, rax
	je	.L6
.L1:
	mov	rax, r12
	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
.L2:
	.cfi_restore_state
	xor	r12d, r12d
	pop	rbx
	.cfi_def_cfa_offset 24
	pop	rbp
	.cfi_def_cfa_offset 16
	mov	rax, r12
	pop	r12
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE0:
	.size	btm_find_dev, .-btm_find_dev
	.comm	btm_cb,8,8
	.comm	BTM_SEC_MAX_DEVICE_RECORDS,8,8
	.comm	BTM_SEC_IN_USE,4,4
	.comm	BD_ADDR_LEN,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_dev.c_btm_find_dev.c"
	.text
	.align	2
	.global	btm_find_dev
	.syntax unified
	.arm
	.fpu softvfp
	.type	btm_find_dev, %function
btm_find_dev:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, r9, r10, lr}
	subs	r6, r0, #0
	beq	.L2
	ldr	r7, .L19
	ldr	r3, [r7]
	cmp	r3, #0
	ble	.L2
	ldr	r3, .L19+4
	mov	r5, #0
	ldr	r9, .L19+8
	ldr	r4, [r3]
	ldr	r8, .L19+12
	b	.L4
.L6:
	ldr	r3, [r7]
	add	r4, r4, #12
	cmp	r3, r5
	ble	.L2
.L4:
	ldr	r2, [r4]
	ldr	r3, [r9]
	add	r5, r5, #1
	tst	r2, r3
	beq	.L6
	mov	r1, r6
	ldr	r2, [r8]
	ldr	r0, [r4, #8]
	bl	memcmp
	cmp	r0, #0
	beq	.L1
	mov	r1, r6
	ldr	r2, [r8]
	ldr	r0, [r4, #4]
	bl	memcmp
	cmp	r0, #0
	beq	.L1
	mov	r1, r4
	mov	r0, r6
	bl	btm_ble_addr_resolvable
	cmp	r0, #0
	beq	.L6
.L1:
	mov	r0, r4
	pop	{r4, r5, r6, r7, r8, r9, r10, pc}
.L2:
	mov	r4, #0
	mov	r0, r4
	pop	{r4, r5, r6, r7, r8, r9, r10, pc}
.L20:
	.align	2
.L19:
	.word	BTM_SEC_MAX_DEVICE_RECORDS
	.word	btm_cb
	.word	BTM_SEC_IN_USE
	.word	BD_ADDR_LEN
	.size	btm_find_dev, .-btm_find_dev
	.comm	btm_cb,4,4
	.comm	BTM_SEC_MAX_DEVICE_RECORDS,4,4
	.comm	BTM_SEC_IN_USE,4,4
	.comm	BD_ADDR_LEN,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
