	.file	"extr_commands.c_esp_console_cmd_register.c"
	.intel_syntax noprefix
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	" %s"
	.text
	.p2align 4
	.globl	esp_console_cmd_register
	.type	esp_console_cmd_register, @function
esp_console_cmd_register:
.LFB0:
	.cfi_startproc
	endbr64
	push	r12
	.cfi_def_cfa_offset 16
	.cfi_offset 12, -16
	mov	esi, 40
	push	rbp
	.cfi_def_cfa_offset 24
	.cfi_offset 6, -24
	push	rbx
	.cfi_def_cfa_offset 32
	.cfi_offset 3, -32
	mov	rbx, rdi
	mov	edi, 1
	sub	rsp, 32
	.cfi_def_cfa_offset 64
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR 24[rsp], rax
	xor	eax, eax
	call	calloc@PLT
	test	rax, rax
	je	.L23
	mov	rdi, QWORD PTR 24[rbx]
	mov	rbp, rax
	test	rdi, rdi
	je	.L21
	mov	esi, 32
	call	strchr@PLT
	test	rax, rax
	jne	.L21
	mov	rax, QWORD PTR 24[rbx]
	mov	edx, DWORD PTR 16[rbx]
	mov	QWORD PTR 32[rbp], rax
	mov	eax, DWORD PTR 20[rbx]
	mov	DWORD PTR 24[rbp], eax
	test	edx, edx
	jne	.L24
	mov	rax, QWORD PTR 8[rbx]
	test	rax, rax
	jne	.L25
.L7:
	mov	QWORD PTR 16[rbp], rax
	mov	eax, DWORD PTR [rbx]
	lea	rdi, s_cmd_list[rip]
	mov	DWORD PTR 8[rbp], eax
	call	SLIST_FIRST@PLT
	test	rax, rax
	je	.L26
	.p2align 4,,10
	.p2align 3
.L9:
	mov	esi, DWORD PTR next[rip]
	mov	rdi, rax
	mov	r12, rax
	call	SLIST_NEXT@PLT
	test	rax, rax
	jne	.L9
	mov	edx, DWORD PTR next[rip]
	mov	rsi, rbp
	mov	rdi, r12
	call	SLIST_INSERT_AFTER@PLT
.L10:
	mov	eax, DWORD PTR ESP_OK[rip]
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L21:
	mov	rdi, rbp
	call	free@PLT
	mov	eax, DWORD PTR ESP_ERR_INVALID_ARG[rip]
.L1:
	mov	rcx, QWORD PTR 24[rsp]
	xor	rcx, QWORD PTR fs:40
	jne	.L27
	add	rsp, 32
	.cfi_remember_state
	.cfi_def_cfa_offset 32
	pop	rbx
	.cfi_def_cfa_offset 24
	pop	rbp
	.cfi_def_cfa_offset 16
	pop	r12
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L23:
	.cfi_restore_state
	mov	eax, DWORD PTR ESP_ERR_NO_MEM[rip]
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L25:
	lea	rsi, 16[rsp]
	lea	rdi, 8[rsp]
	mov	QWORD PTR 8[rsp], 0
	mov	QWORD PTR 16[rsp], 0
	call	open_memstream@PLT
	mov	r12, rax
	test	rax, rax
	je	.L8
	mov	rsi, QWORD PTR 8[rbx]
	mov	rdi, rax
	xor	edx, edx
	call	arg_print_syntax@PLT
	mov	rdi, r12
	call	fclose@PLT
.L8:
	mov	rax, QWORD PTR 8[rsp]
	mov	QWORD PTR 0[rbp], rax
	mov	rax, QWORD PTR 8[rbx]
	jmp	.L7
	.p2align 4,,10
	.p2align 3
.L24:
	lea	rsi, .LC0[rip]
	mov	rdi, rbp
	call	asprintf@PLT
	mov	rax, QWORD PTR 8[rbx]
	jmp	.L7
	.p2align 4,,10
	.p2align 3
.L26:
	mov	edx, DWORD PTR next[rip]
	mov	rsi, rbp
	lea	rdi, s_cmd_list[rip]
	call	SLIST_INSERT_HEAD@PLT
	jmp	.L10
.L27:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE0:
	.size	esp_console_cmd_register, .-esp_console_cmd_register
	.comm	s_cmd_list,4,4
	.comm	next,4,4
	.comm	ESP_OK,4,4
	.comm	ESP_ERR_NO_MEM,4,4
	.comm	ESP_ERR_INVALID_ARG,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_commands.c_esp_console_cmd_register.c"
	.text
	.section	.rodata.str1.4,"aMS",%progbits,1
	.align	2
.LC0:
	.ascii	" %s\000"
	.section	.rodata.cst4,"aM",%progbits,4
	.align	2
.LC1:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	esp_console_cmd_register
	.syntax unified
	.arm
	.fpu softvfp
	.type	esp_console_cmd_register, %function
esp_console_cmd_register:
	@ args = 0, pretend = 0, frame = 16
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, lr}
	ldr	r3, .L28
	sub	sp, sp, #20
	mov	r5, r0
	mov	r1, #20
	mov	r0, #1
	ldr	r3, [r3]
	str	r3, [sp, #12]
	mov	r3,#0
	bl	calloc
	subs	r4, r0, #0
	ldreq	r3, .L28+4
	ldreq	r0, [r3]
	beq	.L1
	ldr	r3, [r5, #16]
	cmp	r3, #0
	beq	.L22
	mov	r0, r3
	mov	r1, #32
	bl	strchr
	cmp	r0, #0
	bne	.L24
	ldr	r6, [r5, #8]
	ldr	r2, [r5, #16]
	ldr	r3, [r5, #12]
	cmp	r6, #0
	str	r2, [r4, #16]
	str	r3, [r4, #12]
	bne	.L25
	ldr	r3, [r5, #4]
	cmp	r3, #0
	bne	.L26
.L7:
	ldr	r2, [r5]
	ldr	r0, .L28+8
	stmib	r4, {r2, r3}
	bl	SLIST_FIRST
	cmp	r0, #0
	beq	.L20
	ldr	r5, .L28+12
.L9:
	ldr	r1, [r5]
	mov	r6, r0
	bl	SLIST_NEXT
	cmp	r0, #0
	bne	.L9
	mov	r1, r4
	mov	r0, r6
	ldr	r2, [r5]
	bl	SLIST_INSERT_AFTER
.L10:
	ldr	r3, .L28+16
	ldr	r0, [r3]
.L1:
	ldr	r3, .L28
	ldr	r2, [r3]
	ldr	r3, [sp, #12]
	eors	r2, r3, r2
	mov	r3, #0
	bne	.L27
	add	sp, sp, #20
	@ sp needed
	pop	{r4, r5, r6, r7, pc}
.L24:
	mov	r0, r4
.L22:
	bl	free
	ldr	r3, .L28+20
	ldr	r0, [r3]
	b	.L1
.L25:
	mov	r2, r6
	mov	r0, r4
	ldr	r1, .L28+24
	bl	asprintf
	ldr	r3, [r5, #4]
	b	.L7
.L26:
	add	r1, sp, #8
	add	r0, sp, #4
	str	r6, [sp, #4]
	str	r6, [sp, #8]
	bl	open_memstream
	subs	r7, r0, #0
	beq	.L8
	mov	r2, r6
	ldr	r1, [r5, #4]
	bl	arg_print_syntax
	mov	r0, r7
	bl	fclose
.L8:
	ldr	r2, [sp, #4]
	ldr	r3, [r5, #4]
	str	r2, [r4]
	b	.L7
.L20:
	ldr	r3, .L28+12
	mov	r1, r4
	ldr	r2, [r3]
	ldr	r0, .L28+8
	bl	SLIST_INSERT_HEAD
	b	.L10
.L27:
	bl	__stack_chk_fail
.L29:
	.align	2
.L28:
	.word	.LC1
	.word	ESP_ERR_NO_MEM
	.word	s_cmd_list
	.word	next
	.word	ESP_OK
	.word	ESP_ERR_INVALID_ARG
	.word	.LC0
	.size	esp_console_cmd_register, .-esp_console_cmd_register
	.comm	s_cmd_list,4,4
	.comm	next,4,4
	.comm	ESP_OK,4,4
	.comm	ESP_ERR_NO_MEM,4,4
	.comm	ESP_ERR_INVALID_ARG,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
