	.file	"extr_gatt_sr.c_gatt_build_find_info_rsp.c"
	.intel_syntax noprefix
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"format mismatch"
	.text
	.p2align 4
	.type	gatt_build_find_info_rsp, @function
gatt_build_find_info_rsp:
.LFB0:
	.cfi_startproc
	endbr64
	push	r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	push	r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	mov	r14, rcx
	movabs	rcx, 77309411332
	push	r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	push	r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	push	rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	push	rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	sub	rsp, 40
	.cfi_def_cfa_offset 96
	mov	r13, QWORD PTR [rdx]
	mov	QWORD PTR 8[rsp], rdx
	mov	rdx, QWORD PTR [rdi]
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR 24[rsp], rax
	xor	eax, eax
	mov	QWORD PTR 16[rsp], rcx
	mov	eax, DWORD PTR GATT_NOT_FOUND[rip]
	test	rdx, rdx
	je	.L1
	mov	rbx, QWORD PTR [rdx]
	test	rbx, rbx
	je	.L1
	movsx	rdx, DWORD PTR L2CAP_MIN_OFFSET[rip]
	movsx	rcx, DWORD PTR [rsi]
	mov	r12, rsi
	mov	r15, r8
	add	rdx, rcx
	lea	rbp, 8[rsi+rdx*4]
	.p2align 4,,10
	.p2align 3
.L13:
	mov	rsi, QWORD PTR [rbx]
	cmp	rsi, r15
	jg	.L3
	cmp	rsi, r14
	jl	.L4
	mov	eax, DWORD PTR 4[r12]
	test	eax, eax
	jne	.L5
	mov	eax, DWORD PTR GATT_INFO_TYPE_PAIR_128[rip]
	mov	rcx, QWORD PTR GATT_ATTR_UUID_TYPE_16[rip]
	cmp	QWORD PTR 8[rbx], rcx
	jne	.L7
	mov	eax, DWORD PTR GATT_INFO_TYPE_PAIR_16[rip]
.L7:
	mov	DWORD PTR 4[r12], eax
.L5:
	lea	edx, -1[rax]
	movsx	rdx, edx
	movsx	rdx, DWORD PTR 16[rsp+rdx*4]
	cmp	rdx, r13
	jg	.L8
	cmp	DWORD PTR GATT_INFO_TYPE_PAIR_16[rip], eax
	je	.L24
.L9:
	cmp	DWORD PTR GATT_INFO_TYPE_PAIR_128[rip], eax
	je	.L25
.L11:
	lea	rdi, .LC0[rip]
	call	GATT_TRACE_ERROR@PLT
	mov	eax, DWORD PTR GATT_NO_RESOURCES[rip]
.L3:
	mov	rdi, QWORD PTR 8[rsp]
	mov	QWORD PTR [rdi], r13
.L1:
	mov	rdi, QWORD PTR 24[rsp]
	xor	rdi, QWORD PTR fs:40
	jne	.L26
	add	rsp, 40
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	pop	rbx
	.cfi_def_cfa_offset 48
	pop	rbp
	.cfi_def_cfa_offset 40
	pop	r12
	.cfi_def_cfa_offset 32
	pop	r13
	.cfi_def_cfa_offset 24
	pop	r14
	.cfi_def_cfa_offset 16
	pop	r15
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L25:
	.cfi_restore_state
	mov	rax, QWORD PTR 8[rbx]
	cmp	rax, QWORD PTR GATT_ATTR_UUID_TYPE_128[rip]
	je	.L27
	cmp	rax, QWORD PTR GATT_ATTR_UUID_TYPE_32[rip]
	jne	.L11
	mov	rdi, rbp
	call	UINT16_TO_STREAM@PLT
	mov	esi, DWORD PTR [rbx]
	mov	rdi, rbp
	call	gatt_convert_uuid32_to_uuid128@PLT
	movsx	rax, DWORD PTR LEN_UUID_128[rip]
	lea	rbp, 0[rbp+rax*4]
.L10:
	mov	eax, DWORD PTR 4[r12]
	sub	eax, 1
	cdqe
	movsx	rax, DWORD PTR 16[rsp+rax*4]
	add	DWORD PTR [r12], eax
	sub	r13, rax
	mov	eax, DWORD PTR GATT_SUCCESS[rip]
.L4:
	mov	rbx, QWORD PTR 24[rbx]
	test	rbx, rbx
	jne	.L13
	jmp	.L3
	.p2align 4,,10
	.p2align 3
.L24:
	mov	rcx, QWORD PTR GATT_ATTR_UUID_TYPE_16[rip]
	cmp	QWORD PTR 8[rbx], rcx
	jne	.L9
	mov	rdi, rbp
	call	UINT16_TO_STREAM@PLT
	mov	rsi, QWORD PTR 16[rbx]
	mov	rdi, rbp
	call	UINT16_TO_STREAM@PLT
	jmp	.L10
	.p2align 4,,10
	.p2align 3
.L27:
	mov	rdi, rbp
	call	UINT16_TO_STREAM@PLT
	mov	edx, DWORD PTR LEN_UUID_128[rip]
	mov	esi, DWORD PTR [rbx]
	mov	rdi, rbp
	call	ARRAY_TO_STREAM@PLT
	jmp	.L10
	.p2align 4,,10
	.p2align 3
.L8:
	mov	eax, DWORD PTR GATT_NO_RESOURCES[rip]
	jmp	.L3
.L26:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE0:
	.size	gatt_build_find_info_rsp, .-gatt_build_find_info_rsp
	.comm	LEN_UUID_128,4,4
	.comm	L2CAP_MIN_OFFSET,4,4
	.comm	GATT_SUCCESS,4,4
	.comm	GATT_NO_RESOURCES,4,4
	.comm	GATT_NOT_FOUND,4,4
	.comm	GATT_INFO_TYPE_PAIR_16,4,4
	.comm	GATT_INFO_TYPE_PAIR_128,4,4
	.comm	GATT_ATTR_UUID_TYPE_32,8,8
	.comm	GATT_ATTR_UUID_TYPE_16,8,8
	.comm	GATT_ATTR_UUID_TYPE_128,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_sr.c_gatt_build_find_info_rsp.c"
	.text
	.section	.rodata.str1.4,"aMS",%progbits,1
	.align	2
.LC1:
	.ascii	"format mismatch\000"
	.section	.rodata.cst4,"aM",%progbits,4
	.align	2
.LC2:
	.word	__stack_chk_guard
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	gatt_build_find_info_rsp, %function
gatt_build_find_info_rsp:
	@ args = 4, pretend = 0, frame = 24
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, r9, r10, fp, lr}
	mov	ip, #18
	mov	r4, r2
	mov	lr, #4
	sub	sp, sp, #28
	str	r2, [sp, #4]
	ldr	r2, [r0]
	mov	r8, r3
	ldr	r0, .L29
	ldr	r3, .L29+4
	cmp	r2, #0
	ldr	r3, [r3]
	str	r3, [sp, #20]
	mov	r3,#0
	ldr	r7, [r4]
	ldr	r0, [r0]
	str	lr, [sp, #12]
	str	ip, [sp, #16]
	beq	.L1
	ldr	r4, [r2]
	cmp	r4, #0
	beq	.L1
	mov	r5, r1
	ldr	r3, .L29+8
	ldr	r6, [r1]
	ldr	r2, [r3]
	ldr	fp, .L29+12
	add	r6, r6, r2
	mov	r3, r8
	add	r6, r1, r6, lsl #2
	ldr	r9, .L29+16
	ldr	r10, .L29+20
	ldr	r8, [sp, #64]
	add	r6, r6, #8
.L13:
	ldr	r1, [r4]
	cmp	r1, r8
	bgt	.L3
	cmp	r1, r3
	blt	.L4
	ldr	r2, [r5, #4]
	cmp	r2, #0
	bne	.L5
	ldr	r2, .L29+24
	ldr	r0, [r4, #4]
	ldr	r2, [r2]
	cmp	r0, r2
	ldreq	r2, [fp]
	ldrne	r2, [r9]
	str	r2, [r5, #4]
.L5:
	add	r0, sp, #24
	add	r0, r0, r2, lsl #2
	ldr	r0, [r0, #-16]
	cmp	r0, r7
	bgt	.L8
	ldr	r0, [fp]
	cmp	r0, r2
	beq	.L25
.L9:
	ldr	r0, [r9]
	cmp	r0, r2
	beq	.L26
.L11:
	ldr	r0, .L29+28
	bl	GATT_TRACE_ERROR
	ldr	r3, .L29+32
	ldr	r0, [r3]
.L3:
	ldr	r3, [sp, #4]
	str	r7, [r3]
.L1:
	ldr	r3, .L29+4
	ldr	r2, [r3]
	ldr	r3, [sp, #20]
	eors	r2, r3, r2
	mov	r3, #0
	bne	.L27
	add	sp, sp, #28
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, r10, fp, pc}
.L26:
	ldr	r2, .L29+36
	ldr	r0, [r4, #4]
	ldr	r2, [r2]
	str	r3, [sp]
	cmp	r0, r2
	beq	.L28
	ldr	r3, .L29+40
	ldr	r2, [r3]
	cmp	r0, r2
	bne	.L11
	mov	r0, r6
	bl	UINT16_TO_STREAM
	mov	r0, r6
	ldr	r1, [r4]
	bl	gatt_convert_uuid32_to_uuid128
	ldr	r2, [r10]
	ldr	r3, [sp]
	add	r6, r6, r2, lsl #2
.L10:
	ldr	r1, [r5, #4]
	add	r0, sp, #24
	add	r1, r0, r1, lsl #2
	ldr	r2, [r5]
	ldr	r1, [r1, #-16]
	ldr	r0, .L29+44
	add	r2, r2, r1
	ldr	r0, [r0]
	sub	r7, r7, r1
	str	r2, [r5]
.L4:
	ldr	r4, [r4, #12]
	cmp	r4, #0
	bne	.L13
	b	.L3
.L25:
	ldr	r0, .L29+24
	ldr	ip, [r4, #4]
	ldr	r0, [r0]
	cmp	ip, r0
	bne	.L9
	mov	r0, r6
	str	r3, [sp]
	bl	UINT16_TO_STREAM
	mov	r0, r6
	ldr	r1, [r4, #8]
	bl	UINT16_TO_STREAM
	ldr	r3, [sp]
	b	.L10
.L28:
	mov	r0, r6
	bl	UINT16_TO_STREAM
	mov	r0, r6
	ldr	r2, [r10]
	ldr	r1, [r4]
	bl	ARRAY_TO_STREAM
	ldr	r3, [sp]
	b	.L10
.L8:
	ldr	r3, .L29+32
	ldr	r0, [r3]
	b	.L3
.L27:
	bl	__stack_chk_fail
.L30:
	.align	2
.L29:
	.word	GATT_NOT_FOUND
	.word	.LC2
	.word	L2CAP_MIN_OFFSET
	.word	GATT_INFO_TYPE_PAIR_16
	.word	GATT_INFO_TYPE_PAIR_128
	.word	LEN_UUID_128
	.word	GATT_ATTR_UUID_TYPE_16
	.word	.LC1
	.word	GATT_NO_RESOURCES
	.word	GATT_ATTR_UUID_TYPE_128
	.word	GATT_ATTR_UUID_TYPE_32
	.word	GATT_SUCCESS
	.size	gatt_build_find_info_rsp, .-gatt_build_find_info_rsp
	.comm	LEN_UUID_128,4,4
	.comm	L2CAP_MIN_OFFSET,4,4
	.comm	GATT_SUCCESS,4,4
	.comm	GATT_NO_RESOURCES,4,4
	.comm	GATT_NOT_FOUND,4,4
	.comm	GATT_INFO_TYPE_PAIR_16,4,4
	.comm	GATT_INFO_TYPE_PAIR_128,4,4
	.comm	GATT_ATTR_UUID_TYPE_32,4,4
	.comm	GATT_ATTR_UUID_TYPE_16,4,4
	.comm	GATT_ATTR_UUID_TYPE_128,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
