	.file	"extr_gatt_utils.c_gatt_end_operation.c"
	.intel_syntax noprefix
	.text
	.section	.rodata.str1.8,"aMS",@progbits,1
	.align 8
.LC0:
	.string	"gatt_end_operation status=%d op=%d subtype=%d"
	.align 8
.LC1:
	.string	"Rcv Prepare write rsp but no data"
	.align 8
.LC2:
	.string	"gatt_end_operation not sent out op=%d p_disc_cmpl_cb:%p p_cmpl_cb:%p"
	.text
	.p2align 4
	.globl	gatt_end_operation
	.type	gatt_end_operation, @function
gatt_end_operation:
.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
	push	r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	mov	r13d, esi
	push	r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	push	rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	mov	rbp, rdi
	push	rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	sub	rsp, 72
	.cfi_def_cfa_offset 128
	mov	r12, QWORD PTR 56[rdi]
	mov	rcx, QWORD PTR 8[rdi]
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR 56[rsp], rax
	xor	eax, eax
	mov	rax, QWORD PTR GATT_DISC_MAX[rip]
	mov	r15, QWORD PTR [rdi]
	mov	QWORD PTR [rsp], rax
	test	r12, r12
	je	.L2
	lea	rdi, .LC0[rip]
	xor	eax, eax
	mov	rbx, rdx
	mov	rdx, r15
	mov	r14, QWORD PTR 8[r12]
	mov	r12, QWORD PTR [r12]
	call	GATT_TRACE_DEBUG@PLT
	lea	r9, 24[rsp]
	xor	esi, esi
	mov	edx, 24
	mov	rdi, r9
	mov	QWORD PTR 8[rsp], r9
	call	memset@PLT
	test	r14, r14
	je	.L3
	mov	rax, QWORD PTR 0[rbp]
	test	rax, rax
	je	.L3
	cmp	rax, QWORD PTR GATTC_OPTYPE_READ[rip]
	mov	r9, QWORD PTR 8[rsp]
	je	.L43
.L4:
	cmp	QWORD PTR GATTC_OPTYPE_WRITE[rip], rax
	je	.L44
.L5:
	cmp	QWORD PTR GATTC_OPTYPE_CONFIG[rip], rax
	jne	.L8
	mov	rdx, QWORD PTR 32[rbp]
	mov	edx, DWORD PTR [rdx]
	mov	DWORD PTR 16[rsp], edx
.L8:
	cmp	QWORD PTR GATTC_OPTYPE_DISCOVERY[rip], rax
	je	.L45
.L3:
	mov	rdi, QWORD PTR 24[rbp]
	test	rdi, rdi
	jne	.L13
.L9:
	mov	rax, QWORD PTR 0[rbp]
	lea	rdi, 16[rbp]
	mov	ebx, DWORD PTR 20[rbp]
	mov	QWORD PTR 8[rsp], rax
	call	btu_stop_timer@PLT
	mov	rdi, rbp
	call	gatt_clcb_dealloc@PLT
	test	r12, r12
	je	.L10
	cmp	QWORD PTR GATTC_OPTYPE_DISCOVERY[rip], r15
	je	.L46
.L10:
	test	r14, r14
	je	.L12
	test	r15, r15
	je	.L12
	lea	rcx, 16[rsp]
	mov	edx, r13d
	mov	rsi, r15
	mov	edi, ebx
	call	[QWORD PTR [r14]]
.L1:
	mov	rax, QWORD PTR 56[rsp]
	xor	rax, QWORD PTR fs:40
	jne	.L47
	add	rsp, 72
	.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
.L46:
	.cfi_restore_state
	mov	rsi, QWORD PTR [rsp]
	mov	edx, r13d
	mov	edi, ebx
	call	[QWORD PTR [r12]]
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L15:
	xor	r14d, r14d
.L13:
	call	osi_free@PLT
	jmp	.L9
	.p2align 4,,10
	.p2align 3
.L2:
	mov	rdx, r15
	lea	rdi, .LC0[rip]
	xor	eax, eax
	call	GATT_TRACE_DEBUG@PLT
	lea	rdi, 24[rsp]
	mov	edx, 24
	xor	esi, esi
	call	memset@PLT
	mov	rdi, QWORD PTR 24[rbp]
	test	rdi, rdi
	jne	.L15
	mov	rax, QWORD PTR 0[rbp]
	lea	rdi, 16[rbp]
	xor	r14d, r14d
	mov	QWORD PTR 8[rsp], rax
	call	btu_stop_timer@PLT
	mov	rdi, rbp
	call	gatt_clcb_dealloc@PLT
.L12:
	mov	rsi, QWORD PTR 8[rsp]
	mov	rcx, r14
	mov	rdx, r12
	lea	rdi, .LC2[rip]
	call	GATT_TRACE_WARNING@PLT
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L45:
	mov	rax, QWORD PTR 8[rbp]
	mov	rdi, QWORD PTR 24[rbp]
	mov	QWORD PTR [rsp], rax
	test	rdi, rdi
	je	.L9
	jmp	.L13
	.p2align 4,,10
	.p2align 3
.L43:
	mov	edx, DWORD PTR 40[rbp]
	mov	DWORD PTR 24[rsp], edx
	mov	rdx, QWORD PTR 48[rbp]
	mov	QWORD PTR 32[rsp], rdx
	test	rbx, rbx
	je	.L4
	test	rdx, rdx
	je	.L4
	mov	edi, DWORD PTR 40[rsp]
	mov	rsi, rbx
	call	memcpy@PLT
	mov	rax, QWORD PTR 0[rbp]
	mov	r9, QWORD PTR 8[rsp]
	jmp	.L4
	.p2align 4,,10
	.p2align 3
.L44:
	mov	edx, 24
	xor	esi, esi
	mov	rdi, r9
	call	memset@PLT
	mov	eax, DWORD PTR 40[rbp]
	mov	DWORD PTR 24[rsp], eax
	mov	DWORD PTR 48[rsp], eax
	mov	rax, QWORD PTR GATT_WRITE_PREPARE[rip]
	cmp	QWORD PTR 8[rbp], rax
	je	.L6
.L41:
	mov	rax, QWORD PTR 0[rbp]
	jmp	.L5
	.p2align 4,,10
	.p2align 3
.L6:
	test	rbx, rbx
	je	.L7
	mov	rax, QWORD PTR 16[rbx]
	movdqu	xmm0, XMMWORD PTR [rbx]
	mov	QWORD PTR 40[rsp], rax
	mov	rax, QWORD PTR 0[rbp]
	movups	XMMWORD PTR 24[rsp], xmm0
	jmp	.L5
.L7:
	lea	rdi, .LC1[rip]
	xor	eax, eax
	call	GATT_TRACE_DEBUG@PLT
	jmp	.L41
.L47:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE0:
	.size	gatt_end_operation, .-gatt_end_operation
	.comm	GATT_WRITE_PREPARE,8,8
	.comm	GATT_DISC_MAX,8,8
	.comm	GATTC_OPTYPE_WRITE,8,8
	.comm	GATTC_OPTYPE_READ,8,8
	.comm	GATTC_OPTYPE_DISCOVERY,8,8
	.comm	GATTC_OPTYPE_CONFIG,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_end_operation.c"
	.text
	.section	.rodata.str1.4,"aMS",%progbits,1
	.align	2
.LC0:
	.ascii	"gatt_end_operation status=%d op=%d subtype=%d\000"
	.align	2
.LC1:
	.ascii	"Rcv Prepare write rsp but no data\000"
	.align	2
.LC2:
	.ascii	"gatt_end_operation not sent out op=%d p_disc_cmpl_c"
	.ascii	"b:%p p_cmpl_cb:%p\000"
	.section	.rodata.cst4,"aM",%progbits,4
	.align	2
.LC3:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	gatt_end_operation
	.syntax unified
	.arm
	.fpu softvfp
	.type	gatt_end_operation, %function
gatt_end_operation:
	@ args = 0, pretend = 0, frame = 24
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, r9, r10, fp, lr}
	mov	r4, r0
	ldr	r5, [r0, #32]
	ldr	r3, .L37
	ldr	r0, .L37+4
	sub	sp, sp, #28
	cmp	r5, #0
	ldr	r3, [r3]
	str	r3, [sp, #20]
	mov	r3,#0
	mov	r7, r1
	ldr	r3, [r4, #4]
	ldr	r6, [r4]
	ldr	r10, [r0]
	beq	.L2
	ldm	r5, {r5, r9}
	mov	r8, r2
	ldr	r0, .L37+8
	mov	r2, r6
	bl	GATT_TRACE_DEBUG
	mov	r0, #0
	add	fp, sp, #4
	cmp	r9, r0
	str	r0, [sp, #4]
	str	r0, [fp, #4]
	str	r0, [fp, #8]
	beq	.L3
	ldr	r3, [r4]
	cmp	r3, r0
	beq	.L3
	ldr	r2, .L37+12
	ldr	r2, [r2]
	cmp	r3, r2
	beq	.L33
.L4:
	ldr	r2, .L37+16
	ldr	r2, [r2]
	cmp	r2, r3
	beq	.L34
.L5:
	ldr	r2, .L37+20
	ldr	r2, [r2]
	cmp	r2, r3
	ldreq	r2, [r4, #20]
	ldreq	r2, [r2]
	streq	r2, [sp]
	ldr	r2, .L37+24
	ldr	r2, [r2]
	cmp	r2, r3
	ldreq	r10, [r4, #4]
.L3:
	ldr	r0, [r4, #16]
	cmp	r0, #0
	bne	.L12
.L8:
	add	r0, r4, #8
	ldr	fp, [r4]
	ldr	r8, [r4, #12]
	bl	btu_stop_timer
	mov	r0, r4
	bl	gatt_clcb_dealloc
	cmp	r5, #0
	beq	.L9
	ldr	r3, .L37+24
	ldr	r3, [r3]
	cmp	r3, r6
	beq	.L35
.L9:
	cmp	r9, #0
	cmpne	r6, #0
	beq	.L14
	mov	r2, r7
	mov	r1, r6
	mov	r0, r8
	mov	r3, sp
	ldr	r4, [r9]
	blx	r4
.L1:
	ldr	r3, .L37
	ldr	r2, [r3]
	ldr	r3, [sp, #20]
	eors	r2, r3, r2
	mov	r3, #0
	bne	.L36
	add	sp, sp, #28
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, r10, fp, pc}
.L35:
	mov	r2, r7
	mov	r1, r10
	mov	r0, r8
	ldr	r3, [r5]
	blx	r3
	b	.L1
.L15:
	mov	r9, r5
.L12:
	bl	osi_free
	b	.L8
.L2:
	mov	r2, r6
	ldr	r0, .L37+8
	bl	GATT_TRACE_DEBUG
	ldr	r0, [r4, #16]
	str	r5, [sp, #4]
	cmp	r0, #0
	str	r5, [sp, #8]
	str	r5, [sp, #12]
	bne	.L15
	mov	r0, r4
	ldr	fp, [r0], #8
	bl	btu_stop_timer
	mov	r0, r4
	bl	gatt_clcb_dealloc
	mov	r2, r5
.L11:
	mov	r3, r5
	mov	r1, fp
	ldr	r0, .L37+28
	bl	GATT_TRACE_WARNING
	b	.L1
.L33:
	ldr	r2, [r4, #28]
	ldr	r1, [r4, #24]
	cmp	r8, r0
	cmpne	r2, r0
	stmib	sp, {r1, r2}
	beq	.L4
	mov	r1, r8
	bl	memcpy
	ldr	r3, [r4]
	b	.L4
.L34:
	mov	r1, #0
	ldr	r2, .L37+32
	ldr	r0, [r4, #4]
	ldr	r2, [r2]
	str	r1, [sp, #8]
	cmp	r0, r2
	ldr	r2, [r4, #24]
	str	r1, [sp, #12]
	str	r2, [sp, #4]
	str	r2, [sp, #16]
	bne	.L5
	cmp	r8, r1
	beq	.L6
	ldm	r8, {r0, r1, r2}
	stm	fp, {r0, r1, r2}
	b	.L5
.L14:
	mov	r2, r5
	mov	r5, r9
	b	.L11
.L6:
	ldr	r0, .L37+36
	bl	GATT_TRACE_DEBUG
	ldr	r3, [r4]
	b	.L5
.L36:
	bl	__stack_chk_fail
.L38:
	.align	2
.L37:
	.word	.LC3
	.word	GATT_DISC_MAX
	.word	.LC0
	.word	GATTC_OPTYPE_READ
	.word	GATTC_OPTYPE_WRITE
	.word	GATTC_OPTYPE_CONFIG
	.word	GATTC_OPTYPE_DISCOVERY
	.word	.LC2
	.word	GATT_WRITE_PREPARE
	.word	.LC1
	.size	gatt_end_operation, .-gatt_end_operation
	.comm	GATT_WRITE_PREPARE,4,4
	.comm	GATT_DISC_MAX,4,4
	.comm	GATTC_OPTYPE_WRITE,4,4
	.comm	GATTC_OPTYPE_READ,4,4
	.comm	GATTC_OPTYPE_DISCOVERY,4,4
	.comm	GATTC_OPTYPE_CONFIG,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
