	.file	"extr_esp_gatts_api.c_esp_ble_gatts_add_char.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.globl	esp_ble_gatts_add_char
	.type	esp_ble_gatts_add_char, @function
esp_ble_gatts_add_char:
.LFB0:
	.cfi_startproc
	endbr64
	push	r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	mov	r15d, edi
	push	r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	mov	r14d, edx
	push	r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	mov	r13d, ecx
	push	r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	mov	r12, rsi
	push	rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	mov	rbp, r9
	push	rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	mov	rbx, r8
	sub	rsp, 88
	.cfi_def_cfa_offset 144
	mov	edi, DWORD PTR ESP_BLUEDROID_STATUS_ENABLED[rip]
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR 72[rsp], rax
	xor	eax, eax
	call	ESP_BLUEDROID_STATUS_CHECK@PLT
	mov	rsi, rbp
	mov	rdi, rbx
	call	esp_ble_gatts_add_char_desc_param_check@PLT
	cmp	QWORD PTR ESP_OK[rip], rax
	je	.L15
.L1:
	mov	rbx, QWORD PTR 72[rsp]
	xor	rbx, QWORD PTR fs:40
	jne	.L16
	add	rsp, 88
	.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
.L15:
	.cfi_restore_state
	lea	r8, 32[rsp]
	xor	esi, esi
	mov	edx, 32
	mov	rdi, r8
	mov	QWORD PTR 8[rsp], r8
	call	memset@PLT
	mov	eax, DWORD PTR BTC_SIG_API_CALL[rip]
	test	rbx, rbx
	mov	DWORD PTR 60[rsp], r15d
	mov	DWORD PTR 56[rsp], r14d
	mov	r8, QWORD PTR 8[rsp]
	mov	DWORD PTR 28[rsp], eax
	mov	eax, DWORD PTR BTC_PID_GATTS[rip]
	mov	DWORD PTR 52[rsp], r13d
	mov	DWORD PTR 24[rsp], eax
	mov	eax, DWORD PTR BTC_GATTS_ACT_ADD_CHAR[rip]
	mov	DWORD PTR 20[rsp], eax
	je	.L3
	mov	eax, DWORD PTR 8[rbx]
	mov	rdx, QWORD PTR [rbx]
	mov	DWORD PTR 48[rsp], eax
	mov	QWORD PTR 40[rsp], rdx
.L3:
	test	rbp, rbp
	je	.L4
	mov	eax, DWORD PTR 0[rbp]
	mov	DWORD PTR 36[rsp], eax
.L4:
	mov	rdi, r8
	mov	edx, 4
	mov	rsi, r12
	mov	QWORD PTR 8[rsp], r8
	call	memcpy@PLT
	mov	r8, QWORD PTR 8[rsp]
	mov	ecx, DWORD PTR btc_gatts_arg_deep_copy[rip]
	lea	rdi, 20[rsp]
	mov	edx, 32
	mov	rsi, r8
	call	btc_transfer_context@PLT
	mov	r8, rax
	cmp	r8, QWORD PTR BT_STATUS_SUCCESS[rip]
	mov	rax, QWORD PTR ESP_FAIL[rip]
	jne	.L1
	mov	rax, QWORD PTR ESP_OK[rip]
	jmp	.L1
.L16:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE0:
	.size	esp_ble_gatts_add_char, .-esp_ble_gatts_add_char
	.comm	btc_gatts_arg_deep_copy,4,4
	.comm	ESP_OK,8,8
	.comm	ESP_FAIL,8,8
	.comm	ESP_BLUEDROID_STATUS_ENABLED,4,4
	.comm	BT_STATUS_SUCCESS,8,8
	.comm	BTC_SIG_API_CALL,4,4
	.comm	BTC_PID_GATTS,4,4
	.comm	BTC_GATTS_ACT_ADD_CHAR,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_esp_gatts_api.c_esp_ble_gatts_add_char.c"
	.text
	.section	.rodata.cst4,"aM",%progbits,4
	.align	2
.LC0:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	esp_ble_gatts_add_char
	.syntax unified
	.arm
	.fpu softvfp
	.type	esp_ble_gatts_add_char, %function
esp_ble_gatts_add_char:
	@ args = 8, pretend = 0, frame = 48
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, r9, r10, lr}
	mov	r7, r0
	sub	sp, sp, #48
	ldr	r0, .L17
	ldr	r8, [sp, #80]
	ldr	r9, [sp, #84]
	mov	r5, r3
	ldr	r3, .L17+4
	ldr	r0, [r0]
	ldr	r3, [r3]
	str	r3, [sp, #44]
	mov	r3,#0
	mov	r4, r1
	mov	r6, r2
	bl	ESP_BLUEDROID_STATUS_CHECK
	mov	r1, r9
	mov	r0, r8
	bl	esp_ble_gatts_add_char_desc_param_check
	ldr	r10, .L17+8
	ldr	r3, [r10]
	cmp	r3, r0
	beq	.L15
.L1:
	ldr	r3, .L17+4
	ldr	r2, [r3]
	ldr	r3, [sp, #44]
	eors	r2, r3, r2
	mov	r3, #0
	bne	.L16
	add	sp, sp, #48
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, r10, pc}
.L15:
	mov	r3, #0
	ldr	r1, .L17+12
	ldr	r2, .L17+16
	ldr	r0, [r1]
	ldr	r1, [r2]
	ldr	r2, .L17+20
	cmp	r8, r3
	ldr	r2, [r2]
	str	r7, [sp, #40]
	str	r6, [sp, #36]
	str	r5, [sp, #32]
	str	r0, [sp, #8]
	str	r1, [sp, #4]
	str	r2, [sp]
	str	r3, [sp, #12]
	str	r3, [sp, #16]
	str	r3, [sp, #20]
	str	r3, [sp, #24]
	str	r3, [sp, #28]
	beq	.L3
	ldr	r1, [r8, #8]
	ldr	r2, [r8, #4]
	ldr	r3, [r8]
	str	r1, [sp, #28]
	str	r2, [sp, #24]
	str	r3, [sp, #20]
.L3:
	cmp	r9, #0
	ldrne	r3, [r9]
	mov	r1, r4
	mov	r2, #4
	add	r0, sp, #12
	strne	r3, [sp, #16]
	bl	memcpy
	ldr	r3, .L17+24
	mov	r2, #32
	ldr	r3, [r3]
	mov	r0, sp
	add	r1, sp, #12
	bl	btc_transfer_context
	ldr	r3, .L17+28
	ldr	r3, [r3]
	cmp	r0, r3
	ldrne	r3, .L17+32
	ldreq	r0, [r10]
	ldrne	r0, [r3]
	b	.L1
.L16:
	bl	__stack_chk_fail
.L18:
	.align	2
.L17:
	.word	ESP_BLUEDROID_STATUS_ENABLED
	.word	.LC0
	.word	ESP_OK
	.word	BTC_SIG_API_CALL
	.word	BTC_PID_GATTS
	.word	BTC_GATTS_ACT_ADD_CHAR
	.word	btc_gatts_arg_deep_copy
	.word	BT_STATUS_SUCCESS
	.word	ESP_FAIL
	.size	esp_ble_gatts_add_char, .-esp_ble_gatts_add_char
	.comm	btc_gatts_arg_deep_copy,4,4
	.comm	ESP_OK,4,4
	.comm	ESP_FAIL,4,4
	.comm	ESP_BLUEDROID_STATUS_ENABLED,4,4
	.comm	BT_STATUS_SUCCESS,4,4
	.comm	BTC_SIG_API_CALL,4,4
	.comm	BTC_PID_GATTS,4,4
	.comm	BTC_GATTS_ACT_ADD_CHAR,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
