	.file	"165234.c"
	.intel_syntax noprefix
	.text
	.globl	new_input_buffer
	.type	new_input_buffer, @function
new_input_buffer:
.LFB6:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	sub	rsp, 16
	mov	edi, 24
	call	malloc@PLT
	mov	QWORD PTR -8[rbp], rax
	mov	rax, QWORD PTR -8[rbp]
	mov	QWORD PTR [rax], 0
	mov	rax, QWORD PTR -8[rbp]
	mov	QWORD PTR 8[rax], 0
	mov	rax, QWORD PTR -8[rbp]
	mov	QWORD PTR 16[rax], 0
	mov	rax, QWORD PTR -8[rbp]
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	new_input_buffer, .-new_input_buffer
	.section	.rodata
.LC0:
	.string	"db > "
	.text
	.globl	print_prompt
	.type	print_prompt, @function
print_prompt:
.LFB7:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	lea	rdi, .LC0[rip]
	mov	eax, 0
	call	printf@PLT
	nop
	pop	rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.size	print_prompt, .-print_prompt
	.section	.rodata
.LC1:
	.string	"Error reading input"
	.text
	.globl	read_input
	.type	read_input, @function
read_input:
.LFB8:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	sub	rsp, 32
	mov	QWORD PTR -24[rbp], rdi
	mov	rdx, QWORD PTR stdin[rip]
	mov	rax, QWORD PTR -24[rbp]
	lea	rcx, 8[rax]
	mov	rax, QWORD PTR -24[rbp]
	mov	rsi, rcx
	mov	rdi, rax
	call	getline@PLT
	mov	QWORD PTR -8[rbp], rax
	cmp	QWORD PTR -8[rbp], 0
	jg	.L5
	lea	rdi, .LC1[rip]
	call	puts@PLT
	mov	edi, 1
	call	exit@PLT
.L5:
	mov	rax, QWORD PTR -8[rbp]
	lea	rdx, -1[rax]
	mov	rax, QWORD PTR -24[rbp]
	mov	QWORD PTR 16[rax], rdx
	mov	rax, QWORD PTR -24[rbp]
	mov	rdx, QWORD PTR [rax]
	mov	rax, QWORD PTR -8[rbp]
	sub	rax, 1
	add	rax, rdx
	mov	BYTE PTR [rax], 0
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE8:
	.size	read_input, .-read_input
	.globl	close_input_buffer
	.type	close_input_buffer, @function
close_input_buffer:
.LFB9:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	sub	rsp, 16
	mov	QWORD PTR -8[rbp], rdi
	mov	rax, QWORD PTR -8[rbp]
	mov	rax, QWORD PTR [rax]
	mov	rdi, rax
	call	free@PLT
	mov	rax, QWORD PTR -8[rbp]
	mov	rdi, rax
	call	free@PLT
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE9:
	.size	close_input_buffer, .-close_input_buffer
	.section	.rodata
.LC2:
	.string	".exit"
.LC3:
	.string	"Unrecognized command '%s'.\n"
	.text
	.globl	main
	.type	main, @function
main:
.LFB10:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	sub	rsp, 32
	mov	DWORD PTR -20[rbp], edi
	mov	QWORD PTR -32[rbp], rsi
	mov	eax, 0
	call	new_input_buffer
	mov	QWORD PTR -8[rbp], rax
.L9:
	mov	eax, 0
	call	print_prompt
	mov	rax, QWORD PTR -8[rbp]
	mov	rdi, rax
	call	read_input
	mov	rax, QWORD PTR -8[rbp]
	mov	rax, QWORD PTR [rax]
	lea	rsi, .LC2[rip]
	mov	rdi, rax
	call	strcmp@PLT
	test	eax, eax
	jne	.L8
	mov	rax, QWORD PTR -8[rbp]
	mov	rdi, rax
	call	close_input_buffer
	mov	edi, 0
	call	exit@PLT
.L8:
	mov	rax, QWORD PTR -8[rbp]
	mov	rax, QWORD PTR [rax]
	mov	rsi, rax
	lea	rdi, .LC3[rip]
	mov	eax, 0
	call	printf@PLT
	jmp	.L9
	.cfi_endproc
.LFE10:
	.size	main, .-main
	.ident	"GCC: (Ubuntu 10.5.0-1ubuntu1~20.04) 10.5.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, 6
	.eabi_attribute 34, 0
	.eabi_attribute 18, 4
	.file	"165234.c"
	.text
	.align	2
	.global	new_input_buffer
	.syntax unified
	.arm
	.fpu softvfp
	.type	new_input_buffer, %function
new_input_buffer:
	@ args = 0, pretend = 0, frame = 8
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #8
	mov	r0, #12
	bl	malloc
	mov	r3, r0
	str	r3, [fp, #-8]
	ldr	r3, [fp, #-8]
	mov	r2, #0
	str	r2, [r3]
	ldr	r3, [fp, #-8]
	mov	r2, #0
	str	r2, [r3, #4]
	ldr	r3, [fp, #-8]
	mov	r2, #0
	str	r2, [r3, #8]
	ldr	r3, [fp, #-8]
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
	.size	new_input_buffer, .-new_input_buffer
	.section	.rodata
	.align	2
.LC0:
	.ascii	"db > \000"
	.text
	.align	2
	.global	print_prompt
	.syntax unified
	.arm
	.fpu softvfp
	.type	print_prompt, %function
print_prompt:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	ldr	r0, .L4
	bl	printf
	nop
	pop	{fp, pc}
.L5:
	.align	2
.L4:
	.word	.LC0
	.size	print_prompt, .-print_prompt
	.section	.rodata
	.align	2
.LC1:
	.ascii	"Error reading input\000"
	.text
	.align	2
	.global	read_input
	.syntax unified
	.arm
	.fpu softvfp
	.type	read_input, %function
read_input:
	@ args = 0, pretend = 0, frame = 16
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #16
	str	r0, [fp, #-16]
	ldr	r0, [fp, #-16]
	ldr	r3, [fp, #-16]
	add	r3, r3, #4
	ldr	r2, .L8
	ldr	r2, [r2]
	mov	r1, r3
	bl	getline
	str	r0, [fp, #-8]
	ldr	r3, [fp, #-8]
	cmp	r3, #0
	bgt	.L7
	ldr	r0, .L8+4
	bl	puts
	mov	r0, #1
	bl	exit
.L7:
	ldr	r3, [fp, #-8]
	sub	r2, r3, #1
	ldr	r3, [fp, #-16]
	str	r2, [r3, #8]
	ldr	r3, [fp, #-16]
	ldr	r2, [r3]
	ldr	r3, [fp, #-8]
	sub	r3, r3, #1
	add	r3, r2, r3
	mov	r2, #0
	strb	r2, [r3]
	nop
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L9:
	.align	2
.L8:
	.word	stdin
	.word	.LC1
	.size	read_input, .-read_input
	.align	2
	.global	close_input_buffer
	.syntax unified
	.arm
	.fpu softvfp
	.type	close_input_buffer, %function
close_input_buffer:
	@ args = 0, pretend = 0, frame = 8
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #8
	str	r0, [fp, #-8]
	ldr	r3, [fp, #-8]
	ldr	r3, [r3]
	mov	r0, r3
	bl	free
	ldr	r0, [fp, #-8]
	bl	free
	nop
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
	.size	close_input_buffer, .-close_input_buffer
	.section	.rodata
	.align	2
.LC2:
	.ascii	".exit\000"
	.align	2
.LC3:
	.ascii	"Unrecognized command '%s'.\012\000"
	.text
	.align	2
	.global	main
	.syntax unified
	.arm
	.fpu softvfp
	.type	main, %function
main:
	@ args = 0, pretend = 0, frame = 16
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #16
	str	r0, [fp, #-16]
	str	r1, [fp, #-20]
	bl	new_input_buffer
	str	r0, [fp, #-8]
.L13:
	bl	print_prompt
	ldr	r0, [fp, #-8]
	bl	read_input
	ldr	r3, [fp, #-8]
	ldr	r3, [r3]
	ldr	r1, .L14
	mov	r0, r3
	bl	strcmp
	mov	r3, r0
	cmp	r3, #0
	bne	.L12
	ldr	r0, [fp, #-8]
	bl	close_input_buffer
	mov	r0, #0
	bl	exit
.L12:
	ldr	r3, [fp, #-8]
	ldr	r3, [r3]
	mov	r1, r3
	ldr	r0, .L14+4
	bl	printf
	b	.L13
.L15:
	.align	2
.L14:
	.word	.LC2
	.word	.LC3
	.size	main, .-main
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
