	.file	"extr_esp_gap_bt_api.c_esp_bt_gap_remove_bond_device.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.globl	esp_bt_gap_remove_bond_device
	.type	esp_bt_gap_remove_bond_device, @function
esp_bt_gap_remove_bond_device:
.LFB0:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	ebp, edi
	sub	rsp, 32
	.cfi_def_cfa_offset 48
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR 24[rsp], rax
	xor	eax, eax
	call	esp_bluedroid_get_status@PLT
	cmp	rax, QWORD PTR ESP_BLUEDROID_STATUS_ENABLED[rip]
	je	.L2
	mov	eax, DWORD PTR ESP_ERR_INVALID_STATE[rip]
.L1:
	mov	rcx, QWORD PTR 24[rsp]
	xor	rcx, QWORD PTR fs:40
	jne	.L8
	add	rsp, 32
	.cfi_remember_state
	.cfi_def_cfa_offset 16
	pop	rbp
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L2:
	.cfi_restore_state
	mov	eax, DWORD PTR BTC_SIG_API_CALL[rip]
	mov	edi, DWORD PTR 8[rsp]
	mov	edx, 4
	mov	esi, ebp
	mov	DWORD PTR 20[rsp], eax
	mov	eax, DWORD PTR BTC_PID_GAP_BT[rip]
	mov	DWORD PTR 16[rsp], eax
	mov	eax, DWORD PTR BTC_GAP_BT_ACT_REMOVE_BOND_DEVICE[rip]
	mov	DWORD PTR 12[rsp], eax
	call	memcpy@PLT
	xor	ecx, ecx
	lea	rsi, 8[rsp]
	lea	rdi, 12[rsp]
	mov	edx, 4
	call	btc_transfer_context@PLT
	mov	r8, rax
	cmp	r8, QWORD PTR BT_STATUS_SUCCESS[rip]
	mov	eax, DWORD PTR ESP_FAIL[rip]
	jne	.L1
	mov	eax, DWORD PTR ESP_OK[rip]
	jmp	.L1
.L8:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE0:
	.size	esp_bt_gap_remove_bond_device, .-esp_bt_gap_remove_bond_device
	.comm	ESP_OK,4,4
	.comm	ESP_FAIL,4,4
	.comm	ESP_ERR_INVALID_STATE,4,4
	.comm	ESP_BLUEDROID_STATUS_ENABLED,8,8
	.comm	BT_STATUS_SUCCESS,8,8
	.comm	BTC_SIG_API_CALL,4,4
	.comm	BTC_PID_GAP_BT,4,4
	.comm	BTC_GAP_BT_ACT_REMOVE_BOND_DEVICE,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_gap_bt_api.c_esp_bt_gap_remove_bond_device.c"
	.text
	.section	.rodata.cst4,"aM",%progbits,4
	.align	2
.LC0:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	esp_bt_gap_remove_bond_device
	.syntax unified
	.arm
	.fpu softvfp
	.type	esp_bt_gap_remove_bond_device, %function
esp_bt_gap_remove_bond_device:
	@ args = 0, pretend = 0, frame = 24
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, lr}
	ldr	r3, .L9
	sub	sp, sp, #24
	ldr	r3, [r3]
	str	r3, [sp, #20]
	mov	r3,#0
	mov	r4, r0
	bl	esp_bluedroid_get_status
	ldr	r3, .L9+4
	ldr	r3, [r3]
	cmp	r0, r3
	beq	.L2
	ldr	r3, .L9+8
	ldr	r0, [r3]
.L1:
	ldr	r3, .L9
	ldr	r2, [r3]
	ldr	r3, [sp, #20]
	eors	r2, r3, r2
	mov	r3, #0
	bne	.L8
	add	sp, sp, #24
	@ sp needed
	pop	{r4, pc}
.L2:
	ldr	r1, .L9+12
	ldr	r2, .L9+16
	ldr	r3, .L9+20
	ldr	lr, [r1]
	ldr	ip, [r2]
	ldr	r3, [r3]
	mov	r1, r4
	mov	r2, #4
	ldr	r0, [sp, #4]
	str	lr, [sp, #16]
	str	ip, [sp, #12]
	str	r3, [sp, #8]
	bl	memcpy
	mov	r2, #4
	mov	r3, #0
	add	r1, sp, r2
	add	r0, sp, #8
	bl	btc_transfer_context
	ldr	r3, .L9+24
	ldr	r3, [r3]
	cmp	r0, r3
	ldreq	r3, .L9+28
	ldrne	r3, .L9+32
	ldr	r0, [r3]
	b	.L1
.L8:
	bl	__stack_chk_fail
.L10:
	.align	2
.L9:
	.word	.LC0
	.word	ESP_BLUEDROID_STATUS_ENABLED
	.word	ESP_ERR_INVALID_STATE
	.word	BTC_SIG_API_CALL
	.word	BTC_PID_GAP_BT
	.word	BTC_GAP_BT_ACT_REMOVE_BOND_DEVICE
	.word	BT_STATUS_SUCCESS
	.word	ESP_OK
	.word	ESP_FAIL
	.size	esp_bt_gap_remove_bond_device, .-esp_bt_gap_remove_bond_device
	.comm	ESP_OK,4,4
	.comm	ESP_FAIL,4,4
	.comm	ESP_ERR_INVALID_STATE,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_GAP_BT,4,4
	.comm	BTC_GAP_BT_ACT_REMOVE_BOND_DEVICE,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
