	.file	"extr_esp_hidd_prf_api.c_esp_hidd_profile_deinit.c"
	.intel_syntax noprefix
	.text
	.section	.rodata.str1.8,"aMS",@progbits,1
	.align 8
.LC0:
	.string	"HID device profile already initialized"
	.text
	.p2align 4
	.globl	esp_hidd_profile_deinit
	.type	esp_hidd_profile_deinit, @function
esp_hidd_profile_deinit:
.LFB0:
	.cfi_startproc
	endbr64
	mov	rdx, QWORD PTR HIDD_LE_IDX_SVC[rip]
	mov	rax, QWORD PTR hidd_le_env[rip+8]
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	lea	rax, [rax+rdx*8]
	mov	edx, DWORD PTR hidd_le_env[rip+4]
	test	edx, edx
	je	.L8
	mov	rbp, QWORD PTR [rax]
	mov	eax, DWORD PTR ESP_FAIL[rip]
	test	rbp, rbp
	jne	.L9
	pop	rbp
	.cfi_remember_state
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L9:
	.cfi_restore_state
	mov	rdi, rbp
	call	esp_ble_gatts_stop_service@PLT
	mov	rdi, rbp
	call	esp_ble_gatts_delete_service@PLT
	mov	edi, DWORD PTR hidd_le_env[rip]
	call	esp_ble_gatts_app_unregister@PLT
	mov	eax, DWORD PTR ESP_OK[rip]
	pop	rbp
	.cfi_remember_state
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L8:
	.cfi_restore_state
	mov	edi, DWORD PTR HID_LE_PRF_TAG[rip]
	lea	rsi, .LC0[rip]
	call	ESP_LOGE@PLT
	mov	eax, DWORD PTR ESP_OK[rip]
	pop	rbp
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE0:
	.size	esp_hidd_profile_deinit, .-esp_hidd_profile_deinit
	.comm	hidd_le_env,16,16
	.comm	HID_LE_PRF_TAG,4,4
	.comm	HIDD_LE_IDX_SVC,8,8
	.comm	ESP_OK,4,4
	.comm	ESP_FAIL,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_hidd_prf_api.c_esp_hidd_profile_deinit.c"
	.text
	.section	.rodata.str1.4,"aMS",%progbits,1
	.align	2
.LC0:
	.ascii	"HID device profile already initialized\000"
	.text
	.align	2
	.global	esp_hidd_profile_deinit
	.syntax unified
	.arm
	.fpu softvfp
	.type	esp_hidd_profile_deinit, %function
esp_hidd_profile_deinit:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, lr}
	ldr	r4, .L9
	ldr	r3, .L9+4
	ldr	r2, [r4, #4]
	ldr	r1, [r4, #8]
	cmp	r2, #0
	ldr	r3, [r3]
	beq	.L7
	ldr	r5, [r1, r3, lsl #2]
	cmp	r5, #0
	bne	.L8
	ldr	r3, .L9+8
	ldr	r0, [r3]
	pop	{r4, r5, r6, pc}
.L8:
	mov	r0, r5
	bl	esp_ble_gatts_stop_service
	mov	r0, r5
	bl	esp_ble_gatts_delete_service
	ldr	r0, [r4]
	bl	esp_ble_gatts_app_unregister
	ldr	r3, .L9+12
	ldr	r0, [r3]
	pop	{r4, r5, r6, pc}
.L7:
	ldr	r3, .L9+16
	ldr	r1, .L9+20
	ldr	r0, [r3]
	bl	ESP_LOGE
	ldr	r3, .L9+12
	ldr	r0, [r3]
	pop	{r4, r5, r6, pc}
.L10:
	.align	2
.L9:
	.word	hidd_le_env
	.word	HIDD_LE_IDX_SVC
	.word	ESP_FAIL
	.word	ESP_OK
	.word	HID_LE_PRF_TAG
	.word	.LC0
	.size	esp_hidd_profile_deinit, .-esp_hidd_profile_deinit
	.comm	hidd_le_env,12,4
	.comm	HID_LE_PRF_TAG,4,4
	.comm	HIDD_LE_IDX_SVC,4,4
	.comm	ESP_OK,4,4
	.comm	ESP_FAIL,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
