	.file	"extr_com.c_AT91F_ReadLine.c"
	.intel_syntax noprefix
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"\n"
	.text
	.p2align 4
	.globl	AT91F_ReadLine
	.type	AT91F_ReadLine, @function
AT91F_ReadLine:
.LFB0:
	.cfi_startproc
	endbr64
	push	r13
	.cfi_def_cfa_offset 16
	.cfi_offset 13, -16
	push	r12
	.cfi_def_cfa_offset 24
	.cfi_offset 12, -24
	mov	r12, rsi
	push	rbp
	.cfi_def_cfa_offset 32
	.cfi_offset 6, -32
	mov	rbp, rdi
	push	rbx
	.cfi_def_cfa_offset 40
	.cfi_offset 3, -40
	sub	rsp, 8
	.cfi_def_cfa_offset 48
	call	strlen@PLT
	test	rbp, rbp
	je	.L2
	mov	rdi, rbp
	call	printf@PLT
.L2:
	mov	rbp, r12
	xor	r13d, r13d
.L3:
	xor	eax, eax
	call	getc@PLT
	mov	ebx, eax
	cmp	al, 10
	je	.L4
.L33:
	jg	.L5
	cmp	al, 3
	jne	.L32
	mov	BYTE PTR [r12], 0
	add	rsp, 8
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	mov	eax, -1
	pop	rbx
	.cfi_def_cfa_offset 32
	pop	rbp
	.cfi_def_cfa_offset 24
	pop	r12
	.cfi_def_cfa_offset 16
	pop	r13
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L32:
	.cfi_restore_state
	cmp	al, 8
	jne	.L8
.L7:
	test	r13d, r13d
	je	.L3
	mov	rdi, QWORD PTR erase_seq[rip]
	sub	rbp, 1
	sub	r13d, 1
	call	printf@PLT
	xor	eax, eax
	call	getc@PLT
	mov	ebx, eax
	cmp	al, 10
	jne	.L33
.L4:
	mov	BYTE PTR 0[rbp], 0
	lea	rdi, .LC0[rip]
	call	puts@PLT
	add	rsp, 8
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	mov	eax, ebp
	pop	rbx
	.cfi_def_cfa_offset 32
	sub	eax, r12d
	pop	rbp
	.cfi_def_cfa_offset 24
	pop	r12
	.cfi_def_cfa_offset 16
	pop	r13
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L5:
	.cfi_restore_state
	cmp	al, 13
	je	.L4
	cmp	al, 127
	je	.L7
.L8:
	mov	eax, DWORD PTR AT91C_CB_SIZE[rip]
	sub	eax, 2
	cmp	eax, r13d
	jle	.L11
	movsx	edi, bl
	add	r13d, 1
	add	rbp, 1
	call	putc@PLT
	mov	BYTE PTR -1[rbp], bl
	jmp	.L3
	.p2align 4,,10
	.p2align 3
.L11:
	mov	edi, 7
	call	putc@PLT
	jmp	.L3
	.cfi_endproc
.LFE0:
	.size	AT91F_ReadLine, .-AT91F_ReadLine
	.comm	erase_seq,8,8
	.comm	AT91C_CB_SIZE,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_com.c_AT91F_ReadLine.c"
	.text
	.section	.rodata.str1.4,"aMS",%progbits,1
	.align	2
.LC0:
	.ascii	"\012\000"
	.text
	.align	2
	.global	AT91F_ReadLine
	.syntax unified
	.arm
	.fpu softvfp
	.type	AT91F_ReadLine, %function
AT91F_ReadLine:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, r9, r10, lr}
	mov	r6, r1
	mov	r7, #0
	bl	printf
	mov	r5, r6
	ldr	r8, .L20
	ldr	r9, .L20+4
.L2:
	bl	getc
	cmp	r0, #13
	mov	r4, r0
	sub	r3, r0, #3
	bhi	.L3
	cmp	r0, #2
	bls	.L4
	cmp	r3, #10
	ldrls	pc, [pc, r3, asl #2]
	b	.L4
.L6:
	.word	.L8
	.word	.L4
	.word	.L4
	.word	.L4
	.word	.L4
	.word	.L7
	.word	.L4
	.word	.L5
	.word	.L4
	.word	.L4
	.word	.L5
.L3:
	cmp	r0, #127
	beq	.L7
.L4:
	ldr	r3, [r8]
	sub	r3, r3, #2
	cmp	r3, r7
	ble	.L11
	mov	r0, r4
	bl	putc
	add	r7, r7, #1
	strb	r4, [r5], #1
	b	.L2
.L5:
	mov	r3, #0
	ldr	r0, .L20+8
	strb	r3, [r5]
	bl	puts
	sub	r0, r5, r6
	pop	{r4, r5, r6, r7, r8, r9, r10, pc}
.L7:
	cmp	r7, #0
	beq	.L2
	ldr	r0, [r9]
	sub	r5, r5, #1
	sub	r7, r7, #1
	bl	printf
	b	.L2
.L8:
	mov	r3, #0
	mvn	r0, #0
	strb	r3, [r6]
	pop	{r4, r5, r6, r7, r8, r9, r10, pc}
.L11:
	mov	r0, #7
	bl	putc
	b	.L2
.L21:
	.align	2
.L20:
	.word	AT91C_CB_SIZE
	.word	erase_seq
	.word	.LC0
	.size	AT91F_ReadLine, .-AT91F_ReadLine
	.comm	erase_seq,4,4
	.comm	AT91C_CB_SIZE,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
