	.file	"extr_uart.c_uart_driver_delete.c"
	.intel_syntax noprefix
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"uart_num error"
.LC1:
	.string	"ALREADY NULL"
	.text
	.p2align 4
	.globl	uart_driver_delete
	.type	uart_driver_delete, @function
uart_driver_delete:
.LFB0:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	edx, DWORD PTR ESP_FAIL[rip]
	mov	rbp, rdi
	lea	rsi, .LC0[rip]
	cmp	QWORD PTR UART_NUM_MAX[rip], rdi
	seta	dil
	movzx	edi, dil
	call	UART_CHECK@PLT
	mov	rax, QWORD PTR p_uart_obj[rip]
	mov	rax, QWORD PTR [rax+rbp*8]
	test	rax, rax
	je	.L39
	mov	edi, DWORD PTR 64[rax]
	call	esp_intr_free@PLT
	mov	rdi, rbp
	call	uart_disable_rx_intr@PLT
	mov	rdi, rbp
	call	uart_disable_tx_intr@PLT
	mov	rdi, rbp
	call	uart_pattern_link_free@PLT
	mov	rax, QWORD PTR p_uart_obj[rip]
	mov	rdi, QWORD PTR [rax+rbp*8]
	mov	r8, QWORD PTR 56[rdi]
	test	r8, r8
	je	.L4
	mov	rdi, r8
	call	vSemaphoreDelete@PLT
	mov	rax, QWORD PTR p_uart_obj[rip]
	mov	rdi, QWORD PTR [rax+rbp*8]
	mov	QWORD PTR 56[rdi], 0
.L4:
	mov	r8, QWORD PTR 48[rdi]
	test	r8, r8
	je	.L5
	mov	rdi, r8
	call	vSemaphoreDelete@PLT
	mov	rax, QWORD PTR p_uart_obj[rip]
	mov	rdi, QWORD PTR [rax+rbp*8]
	mov	QWORD PTR 48[rdi], 0
.L5:
	mov	r8, QWORD PTR 40[rdi]
	test	r8, r8
	je	.L6
	mov	rdi, r8
	call	vSemaphoreDelete@PLT
	mov	rax, QWORD PTR p_uart_obj[rip]
	mov	rdi, QWORD PTR [rax+rbp*8]
	mov	QWORD PTR 40[rdi], 0
.L6:
	mov	r8, QWORD PTR 32[rdi]
	test	r8, r8
	je	.L7
	mov	rdi, r8
	call	vSemaphoreDelete@PLT
	mov	rax, QWORD PTR p_uart_obj[rip]
	mov	rdi, QWORD PTR [rax+rbp*8]
	mov	QWORD PTR 32[rdi], 0
.L7:
	mov	r8, QWORD PTR 24[rdi]
	test	r8, r8
	je	.L8
	mov	rdi, r8
	call	vSemaphoreDelete@PLT
	mov	rax, QWORD PTR p_uart_obj[rip]
	mov	rdi, QWORD PTR [rax+rbp*8]
	mov	QWORD PTR 24[rdi], 0
.L8:
	mov	r8, QWORD PTR 16[rdi]
	test	r8, r8
	je	.L9
	mov	rdi, r8
	call	vQueueDelete@PLT
	mov	rax, QWORD PTR p_uart_obj[rip]
	mov	rdi, QWORD PTR [rax+rbp*8]
	mov	QWORD PTR 16[rdi], 0
.L9:
	mov	r8, QWORD PTR 8[rdi]
	test	r8, r8
	je	.L10
	mov	rdi, r8
	call	vRingbufferDelete@PLT
	mov	rax, QWORD PTR p_uart_obj[rip]
	mov	rdi, QWORD PTR [rax+rbp*8]
	mov	QWORD PTR 8[rdi], 0
.L10:
	mov	r8, QWORD PTR [rdi]
	test	r8, r8
	je	.L11
	mov	rdi, r8
	call	vRingbufferDelete@PLT
	mov	rax, QWORD PTR p_uart_obj[rip]
	mov	rdi, QWORD PTR [rax+rbp*8]
	mov	QWORD PTR [rdi], 0
.L11:
	call	free@PLT
	mov	rax, QWORD PTR p_uart_obj[rip]
	cmp	QWORD PTR CONFIG_ESP_CONSOLE_UART_NUM[rip], rbp
	mov	QWORD PTR [rax+rbp*8], 0
	jne	.L40
	mov	eax, DWORD PTR ESP_OK[rip]
.L1:
	pop	rbp
	.cfi_remember_state
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L40:
	.cfi_restore_state
	mov	rdi, rbp
	call	get_periph_module@PLT
	mov	edi, eax
	call	periph_module_disable@PLT
	mov	eax, DWORD PTR ESP_OK[rip]
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L39:
	mov	edi, DWORD PTR UART_TAG[rip]
	lea	rsi, .LC1[rip]
	call	ESP_LOGI@PLT
	mov	eax, DWORD PTR ESP_OK[rip]
	pop	rbp
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE0:
	.size	uart_driver_delete, .-uart_driver_delete
	.comm	p_uart_obj,8,8
	.comm	UART_TAG,4,4
	.comm	UART_NUM_MAX,8,8
	.comm	ESP_OK,4,4
	.comm	ESP_FAIL,4,4
	.comm	CONFIG_ESP_CONSOLE_UART_NUM,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_uart.c_uart_driver_delete.c"
	.text
	.section	.rodata.str1.4,"aMS",%progbits,1
	.align	2
.LC0:
	.ascii	"uart_num error\000"
	.align	2
.LC1:
	.ascii	"ALREADY NULL\000"
	.text
	.align	2
	.global	uart_driver_delete
	.syntax unified
	.arm
	.fpu softvfp
	.type	uart_driver_delete, %function
uart_driver_delete:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, lr}
	mov	r4, r0
	ldr	r2, .L41
	ldr	r3, .L41+4
	ldr	r0, [r2]
	ldr	r5, .L41+8
	cmp	r0, r4
	movls	r0, #0
	movhi	r0, #1
	ldr	r2, [r3]
	ldr	r1, .L41+12
	bl	UART_CHECK
	ldr	r3, [r5]
	ldr	r3, [r3, r4, lsl #2]
	cmp	r3, #0
	beq	.L39
	ldr	r0, [r3, #32]
	bl	esp_intr_free
	mov	r0, r4
	bl	uart_disable_rx_intr
	mov	r0, r4
	bl	uart_disable_tx_intr
	mov	r0, r4
	bl	uart_pattern_link_free
	ldr	r3, [r5]
	ldr	r3, [r3, r4, lsl #2]
	ldr	r0, [r3, #28]
	cmp	r0, #0
	beq	.L4
	bl	vSemaphoreDelete
	mov	r2, #0
	ldr	r3, [r5]
	ldr	r3, [r3, r4, lsl #2]
	str	r2, [r3, #28]
.L4:
	ldr	r0, [r3, #24]
	cmp	r0, #0
	beq	.L5
	bl	vSemaphoreDelete
	mov	r2, #0
	ldr	r3, [r5]
	ldr	r3, [r3, r4, lsl #2]
	str	r2, [r3, #24]
.L5:
	ldr	r0, [r3, #20]
	cmp	r0, #0
	beq	.L6
	bl	vSemaphoreDelete
	mov	r2, #0
	ldr	r3, [r5]
	ldr	r3, [r3, r4, lsl #2]
	str	r2, [r3, #20]
.L6:
	ldr	r0, [r3, #16]
	cmp	r0, #0
	beq	.L7
	bl	vSemaphoreDelete
	mov	r2, #0
	ldr	r3, [r5]
	ldr	r3, [r3, r4, lsl #2]
	str	r2, [r3, #16]
.L7:
	ldr	r0, [r3, #12]
	cmp	r0, #0
	beq	.L8
	bl	vSemaphoreDelete
	mov	r2, #0
	ldr	r3, [r5]
	ldr	r3, [r3, r4, lsl #2]
	str	r2, [r3, #12]
.L8:
	ldr	r0, [r3, #8]
	cmp	r0, #0
	beq	.L9
	bl	vQueueDelete
	mov	r2, #0
	ldr	r3, [r5]
	ldr	r3, [r3, r4, lsl #2]
	str	r2, [r3, #8]
.L9:
	ldr	r0, [r3, #4]
	cmp	r0, #0
	beq	.L10
	bl	vRingbufferDelete
	mov	r2, #0
	ldr	r3, [r5]
	ldr	r3, [r3, r4, lsl #2]
	str	r2, [r3, #4]
.L10:
	ldr	r0, [r3]
	cmp	r0, #0
	beq	.L11
	bl	vRingbufferDelete
	mov	r2, #0
	ldr	r3, [r5]
	ldr	r3, [r3, r4, lsl #2]
	str	r2, [r3]
.L11:
	mov	r0, r3
	bl	free
	mov	r1, #0
	ldr	r3, .L41+16
	ldr	r2, [r5]
	ldr	r3, [r3]
	str	r1, [r2, r4, lsl #2]
	cmp	r3, r4
	bne	.L40
.L12:
	ldr	r3, .L41+20
	ldr	r0, [r3]
	pop	{r4, r5, r6, pc}
.L40:
	mov	r0, r4
	bl	get_periph_module
	bl	periph_module_disable
	b	.L12
.L39:
	ldr	r3, .L41+24
	ldr	r1, .L41+28
	ldr	r0, [r3]
	bl	ESP_LOGI
	ldr	r3, .L41+20
	ldr	r0, [r3]
	pop	{r4, r5, r6, pc}
.L42:
	.align	2
.L41:
	.word	UART_NUM_MAX
	.word	ESP_FAIL
	.word	p_uart_obj
	.word	.LC0
	.word	CONFIG_ESP_CONSOLE_UART_NUM
	.word	ESP_OK
	.word	UART_TAG
	.word	.LC1
	.size	uart_driver_delete, .-uart_driver_delete
	.comm	p_uart_obj,4,4
	.comm	UART_TAG,4,4
	.comm	UART_NUM_MAX,4,4
	.comm	ESP_OK,4,4
	.comm	ESP_FAIL,4,4
	.comm	CONFIG_ESP_CONSOLE_UART_NUM,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
