	.file	"extr_gatt_utils.c_gatt_get_num_apps_for_bg_dev.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.globl	gatt_get_num_apps_for_bg_dev
	.type	gatt_get_num_apps_for_bg_dev, @function
gatt_get_num_apps_for_bg_dev:
.LFB0:
	.cfi_startproc
	endbr64
	sub	rsp, 8
	.cfi_def_cfa_offset 16
	call	gatt_find_bg_dev@PLT
	xor	r8d, r8d
	test	rax, rax
	je	.L1
	mov	r8, QWORD PTR GATT_MAX_APPS[rip]
	test	r8, r8
	je	.L1
	mov	rax, QWORD PTR [rax]
	lea	rdx, [rax+r8*8]
	xor	r8d, r8d
	.p2align 4,,10
	.p2align 3
.L4:
	cmp	QWORD PTR [rax], 1
	sbb	r8, -1
	add	rax, 8
	cmp	rax, rdx
	jne	.L4
.L1:
	mov	rax, r8
	add	rsp, 8
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE0:
	.size	gatt_get_num_apps_for_bg_dev, .-gatt_get_num_apps_for_bg_dev
	.comm	GATT_MAX_APPS,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_gatt_utils.c_gatt_get_num_apps_for_bg_dev.c"
	.text
	.align	2
	.global	gatt_get_num_apps_for_bg_dev
	.syntax unified
	.arm
	.fpu softvfp
	.type	gatt_get_num_apps_for_bg_dev, %function
gatt_get_num_apps_for_bg_dev:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, lr}
	bl	gatt_find_bg_dev
	subs	r3, r0, #0
	beq	.L5
	ldr	r2, .L16
	ldr	r0, [r2]
	cmp	r0, #0
	popeq	{r4, pc}
	ldr	r3, [r3]
	add	r1, r3, r0, lsl #2
	mov	r0, #0
	sub	r1, r1, #4
	sub	r3, r3, #4
.L4:
	ldr	r2, [r3, #4]!
	cmp	r2, #0
	addne	r0, r0, #1
	cmp	r3, r1
	bne	.L4
	pop	{r4, pc}
.L5:
	mov	r0, r3
	pop	{r4, pc}
.L17:
	.align	2
.L16:
	.word	GATT_MAX_APPS
	.size	gatt_get_num_apps_for_bg_dev, .-gatt_get_num_apps_for_bg_dev
	.comm	GATT_MAX_APPS,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
