	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function filtered_get_chars
_filtered_get_chars:                    ## @filtered_get_chars
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r15
	pushq	%r14
	pushq	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	_SIZE_VIO_GET_CHARS@GOTPCREL(%rip), %rax
	cmpl	%edx, (%rax)
	jle	LBB0_2
## %bb.1:
	movq	_EAGAIN@GOTPCREL(%rip), %rax
	xorl	%r15d, %r15d
	subl	(%rax), %r15d
	jmp	LBB0_12
LBB0_2:
	movq	%rsi, %r14
	callq	_hvc_get_chars
	movq	%rax, %rdx
	cmpq	$2, %rax
	jb	LBB0_11
## %bb.3:
	movl	$1, %ebx
	movq	$-2, %r12
	jmp	LBB0_6
	.p2align	4, 0x90
LBB0_4:                                 ##   in Loop: Header=BB0_6 Depth=1
	movq	%rdx, %r15
LBB0_5:                                 ##   in Loop: Header=BB0_6 Depth=1
	incq	%rbx
	decq	%r12
	movq	%r15, %rdx
	cmpq	%rbx, %r15
	jbe	LBB0_12
LBB0_6:                                 ## =>This Inner Loop Header: Depth=1
	cmpb	$0, (%r14,%rbx)
	jne	LBB0_4
## %bb.7:                               ##   in Loop: Header=BB0_6 Depth=1
	cmpb	$13, -1(%r14,%rbx)
	jne	LBB0_4
## %bb.8:                               ##   in Loop: Header=BB0_6 Depth=1
	leaq	-1(%rdx), %r15
	cmpq	%rbx, %r15
	jbe	LBB0_5
## %bb.9:                               ##   in Loop: Header=BB0_6 Depth=1
	leaq	(%r14,%rbx), %rdi
	leal	1(%rbx), %esi
	addq	%r14, %rsi
	addq	%r12, %rdx
	callq	_memmove
	jmp	LBB0_5
LBB0_11:
	movq	%rdx, %r15
LBB0_12:
	movl	%r15d, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_SIZE_VIO_GET_CHARS,4,2         ## @SIZE_VIO_GET_CHARS
	.comm	_EAGAIN,4,2                     ## @EAGAIN
	.no_dead_strip	_filtered_get_chars
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function filtered_get_chars
_filtered_get_chars:                    ; @filtered_get_chars
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	.cfi_offset w21, -40
	.cfi_offset w22, -48
Lloh0:
	adrp	x8, _SIZE_VIO_GET_CHARS@GOTPAGE
Lloh1:
	ldr	x8, [x8, _SIZE_VIO_GET_CHARS@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	cmp	w8, w2
	b.le	LBB0_2
; %bb.1:
Lloh3:
	adrp	x8, _EAGAIN@GOTPAGE
Lloh4:
	ldr	x8, [x8, _EAGAIN@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	neg	w20, w8
	b	LBB0_11
LBB0_2:
	mov	x19, x1
	bl	_hvc_get_chars
	cmp	x0, #2
	b.lo	LBB0_10
; %bb.3:
	mov	x21, #-2
	mov	w22, #1
	b	LBB0_6
LBB0_4:                                 ;   in Loop: Header=BB0_6 Depth=1
	mov	x20, x0
LBB0_5:                                 ;   in Loop: Header=BB0_6 Depth=1
	add	x22, x22, #1
	sub	x21, x21, #1
	mov	x0, x20
	cmp	x20, x22
	b.ls	LBB0_11
LBB0_6:                                 ; =>This Inner Loop Header: Depth=1
	add	x8, x19, x22
	ldrb	w9, [x8]
	cbnz	w9, LBB0_4
; %bb.7:                                ;   in Loop: Header=BB0_6 Depth=1
	ldurb	w9, [x8, #-1]
	cmp	w9, #13
	b.ne	LBB0_4
; %bb.8:                                ;   in Loop: Header=BB0_6 Depth=1
	sub	x20, x0, #1
	cmp	x20, x22
	b.ls	LBB0_5
; %bb.9:                                ;   in Loop: Header=BB0_6 Depth=1
	add	w9, w22, #1
	add	x1, x19, x9
	add	x2, x0, x21
	mov	x0, x8
	bl	_memmove
	b	LBB0_5
LBB0_10:
	mov	x20, x0
LBB0_11:
	mov	x0, x20
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.cfi_endproc
                                        ; -- End function
	.comm	_SIZE_VIO_GET_CHARS,4,2         ; @SIZE_VIO_GET_CHARS
	.comm	_EAGAIN,4,2                     ; @EAGAIN
	.no_dead_strip	_filtered_get_chars
.subsections_via_symbols
