	.file	"extr_hvc_vio.c_filtered_get_chars.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.type	filtered_get_chars, @function
filtered_get_chars:
.LFB0:
	.cfi_startproc
	endbr64
	cmp	DWORD PTR SIZE_VIO_GET_CHARS[rip], edx
	jle	.L2
	mov	eax, DWORD PTR EAGAIN[rip]
	neg	eax
	ret
	.p2align 4,,10
	.p2align 3
.L2:
	push	r12
	.cfi_def_cfa_offset 16
	.cfi_offset 12, -16
	push	rbp
	.cfi_def_cfa_offset 24
	.cfi_offset 6, -24
	push	rbx
	.cfi_def_cfa_offset 32
	.cfi_offset 3, -32
	mov	rbx, rsi
	call	hvc_get_chars@PLT
	mov	rbp, rax
	cmp	rax, 1
	jbe	.L4
	lea	rdi, 1[rbx]
	mov	ebx, 1
	jmp	.L6
	.p2align 4,,10
	.p2align 3
.L5:
	add	rbx, 1
	mov	rdi, r12
	cmp	rbp, rbx
	jbe	.L4
.L6:
	cmp	BYTE PTR [rdi], 0
	lea	r12, 1[rdi]
	jne	.L5
	cmp	BYTE PTR -1[rdi], 13
	jne	.L5
	sub	rbp, 1
	cmp	rbp, rbx
	jbe	.L5
	mov	rdx, rbp
	mov	rsi, r12
	sub	rdx, rbx
	add	rbx, 1
	call	memmove@PLT
	mov	rdi, r12
	cmp	rbp, rbx
	ja	.L6
.L4:
	mov	eax, ebp
	pop	rbx
	.cfi_def_cfa_offset 24
	pop	rbp
	.cfi_def_cfa_offset 16
	pop	r12
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE0:
	.size	filtered_get_chars, .-filtered_get_chars
	.comm	SIZE_VIO_GET_CHARS,4,4
	.comm	EAGAIN,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_hvc_vio.c_filtered_get_chars.c"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	filtered_get_chars, %function
filtered_get_chars:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	ldr	r3, .L12
	ldr	r3, [r3]
	cmp	r3, r2
	ble	.L2
	ldr	r3, .L12+4
	ldr	r0, [r3]
	rsb	r0, r0, #0
	bx	lr
.L2:
	push	{r4, r5, r6, lr}
	mov	r4, r1
	bl	hvc_get_chars
	cmp	r0, #1
	mov	r6, r0
	bls	.L4
	mov	r5, #1
	add	r4, r4, r5
	b	.L6
.L5:
	add	r5, r5, #1
	cmp	r6, r5
	bls	.L4
.L6:
	ldrb	r3, [r4]	@ zero_extendqisi2
	mov	r0, r4
	cmp	r3, #0
	add	r4, r4, #1
	bne	.L5
	ldrb	r3, [r4, #-2]	@ zero_extendqisi2
	cmp	r3, #13
	bne	.L5
	sub	r6, r6, #1
	cmp	r6, r5
	bls	.L5
	sub	r2, r6, r5
	mov	r1, r4
	add	r5, r5, #1
	bl	memmove
	cmp	r6, r5
	bhi	.L6
.L4:
	mov	r0, r6
	pop	{r4, r5, r6, pc}
.L13:
	.align	2
.L12:
	.word	SIZE_VIO_GET_CHARS
	.word	EAGAIN
	.size	filtered_get_chars, .-filtered_get_chars
	.comm	SIZE_VIO_GET_CHARS,4,4
	.comm	EAGAIN,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
