	.file	"extr_gatt_utils.c_gatt_add_a_srv_to_list.c"
	.intel_syntax noprefix
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"p_new==NULL"
	.text
	.p2align 4
	.globl	gatt_add_a_srv_to_list
	.type	gatt_add_a_srv_to_list, @function
gatt_add_a_srv_to_list:
.LFB0:
	.cfi_startproc
	endbr64
	sub	rsp, 8
	.cfi_def_cfa_offset 16
	test	rsi, rsi
	je	.L13
	mov	rax, QWORD PTR 8[rdi]
	test	rax, rax
	je	.L14
	mov	rdx, QWORD PTR [rsi]
	.p2align 4,,10
	.p2align 3
.L10:
	cmp	rdx, QWORD PTR [rax]
	jl	.L15
	mov	rax, QWORD PTR 8[rax]
	test	rax, rax
	jne	.L10
	mov	rax, QWORD PTR 16[rdi]
	mov	QWORD PTR 8[rax], rsi
	mov	QWORD PTR 16[rsi], rax
	mov	QWORD PTR 8[rsi], 0
	mov	QWORD PTR 16[rdi], rsi
.L5:
	add	DWORD PTR [rdi], 1
	call	gatt_update_last_pri_srv_info@PLT
	mov	eax, DWORD PTR TRUE[rip]
.L1:
	add	rsp, 8
	.cfi_remember_state
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L15:
	.cfi_restore_state
	mov	rdx, QWORD PTR 16[rax]
	test	rdx, rdx
	je	.L7
	mov	QWORD PTR 8[rdx], rsi
.L8:
	mov	QWORD PTR 16[rsi], rdx
	mov	QWORD PTR 8[rsi], rax
	mov	QWORD PTR 16[rax], rsi
	jmp	.L5
	.p2align 4,,10
	.p2align 3
.L14:
	mov	QWORD PTR 16[rdi], rsi
	mov	QWORD PTR 8[rdi], rsi
	mov	QWORD PTR 16[rsi], 0
	mov	QWORD PTR 8[rsi], 0
	jmp	.L5
	.p2align 4,,10
	.p2align 3
.L13:
	lea	rdi, .LC0[rip]
	call	GATT_TRACE_DEBUG@PLT
	mov	eax, DWORD PTR FALSE[rip]
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L7:
	mov	QWORD PTR 8[rdi], rsi
	jmp	.L8
	.cfi_endproc
.LFE0:
	.size	gatt_add_a_srv_to_list, .-gatt_add_a_srv_to_list
	.comm	TRUE,4,4
	.comm	FALSE,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_gatt_utils.c_gatt_add_a_srv_to_list.c"
	.text
	.section	.rodata.str1.4,"aMS",%progbits,1
	.align	2
.LC0:
	.ascii	"p_new==NULL\000"
	.text
	.align	2
	.global	gatt_add_a_srv_to_list
	.syntax unified
	.arm
	.fpu softvfp
	.type	gatt_add_a_srv_to_list, %function
gatt_add_a_srv_to_list:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	cmp	r1, #0
	push	{r4, lr}
	beq	.L13
	ldr	r3, [r0, #4]
	cmp	r3, #0
	ldrne	ip, [r1]
	beq	.L14
.L10:
	ldr	r2, [r3]
	cmp	ip, r2
	blt	.L15
	ldr	r3, [r3, #4]
	cmp	r3, #0
	bne	.L10
	ldr	r2, [r0, #8]
	str	r1, [r2, #4]
	str	r2, [r1, #8]
	str	r3, [r1, #4]
	str	r1, [r0, #8]
.L5:
	ldr	r3, [r0]
	add	r3, r3, #1
	str	r3, [r0]
	bl	gatt_update_last_pri_srv_info
	ldr	r3, .L16
	ldr	r0, [r3]
	pop	{r4, pc}
.L15:
	ldr	r2, [r3, #8]
	cmp	r2, #0
	strne	r1, [r2, #4]
	streq	r1, [r0, #4]
	str	r2, [r1, #8]
	str	r3, [r1, #4]
	str	r1, [r3, #8]
	b	.L5
.L14:
	str	r1, [r0, #8]
	str	r1, [r0, #4]
	str	r3, [r1, #8]
	str	r3, [r1, #4]
	b	.L5
.L13:
	ldr	r0, .L16+4
	bl	GATT_TRACE_DEBUG
	ldr	r3, .L16+8
	ldr	r0, [r3]
	pop	{r4, pc}
.L17:
	.align	2
.L16:
	.word	TRUE
	.word	.LC0
	.word	FALSE
	.size	gatt_add_a_srv_to_list, .-gatt_add_a_srv_to_list
	.comm	TRUE,4,4
	.comm	FALSE,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
