	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function hvc_beat_get_chars
_hvc_beat_get_chars:                    ## @hvc_beat_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	%r13
	pushq	%r12
	pushq	%rbx
	subq	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%edx, %r15d
	movq	%rsi, -56(%rbp)                 ## 8-byte Spill
	movl	_hvc_beat_get_chars.qlen(%rip), %edx
	testl	%edx, %edx
	jne	LBB0_5
## %bb.1:
	movl	%edi, %ebx
	leaq	_hvc_beat_get_chars.q(%rip), %r12
	leaq	_hvc_beat_get_chars.q+4(%rip), %r13
	leaq	-44(%rbp), %r14
	.p2align	4, 0x90
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	movl	%ebx, %edi
	movq	%r14, %rsi
	movq	%r12, %rdx
	movq	%r13, %rcx
	callq	_beat_get_term_char
	testq	%rax, %rax
	jne	LBB0_3
## %bb.4:                               ##   in Loop: Header=BB0_2 Depth=1
	movl	-44(%rbp), %edx
	movl	%edx, _hvc_beat_get_chars.qlen(%rip)
	testl	%edx, %edx
	je	LBB0_2
LBB0_5:
	cmpl	%r15d, %edx
	jle	LBB0_7
## %bb.6:
	leaq	_hvc_beat_get_chars.q(%rip), %rbx
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	movq	%rbx, %rsi
	movl	%r15d, %edx
	callq	_memcpy
	movl	_hvc_beat_get_chars.qlen(%rip), %edx
	subl	%r15d, %edx
	movl	%edx, _hvc_beat_get_chars.qlen(%rip)
	movslq	%r15d, %rdi
	addq	%rbx, %rdi
	movq	%rbx, %rsi
	callq	_memmove
	jmp	LBB0_8
LBB0_7:
	leaq	_hvc_beat_get_chars.q(%rip), %rsi
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	callq	_memcpy
	movl	_hvc_beat_get_chars.qlen(%rip), %r15d
	movl	$0, _hvc_beat_get_chars.qlen(%rip)
	jmp	LBB0_8
LBB0_3:
	xorl	%r15d, %r15d
LBB0_8:
	movl	%r15d, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
.zerofill __DATA,__bss,_hvc_beat_get_chars.q,16,3 ## @hvc_beat_get_chars.q
.zerofill __DATA,__bss,_hvc_beat_get_chars.qlen,4,2 ## @hvc_beat_get_chars.qlen
	.no_dead_strip	_hvc_beat_get_chars
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function hvc_beat_get_chars
_hvc_beat_get_chars:                    ; @hvc_beat_get_chars
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	mov	x19, x2
	mov	x20, x1
	adrp	x23, _hvc_beat_get_chars.qlen@PAGE
	ldr	w2, [x23, _hvc_beat_get_chars.qlen@PAGEOFF]
	cbnz	w2, LBB0_4
; %bb.1:
	mov	x21, x0
Lloh0:
	adrp	x22, _hvc_beat_get_chars.q@PAGE
Lloh1:
	add	x22, x22, _hvc_beat_get_chars.q@PAGEOFF
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	add	x3, x22, #4
	add	x1, sp, #12
	mov	x0, x21
	mov	x2, x22
	bl	_beat_get_term_char
	cbnz	x0, LBB0_7
; %bb.3:                                ;   in Loop: Header=BB0_2 Depth=1
	ldr	w2, [sp, #12]
	str	w2, [x23, _hvc_beat_get_chars.qlen@PAGEOFF]
	cbz	w2, LBB0_2
LBB0_4:
	cmp	w2, w19
	b.le	LBB0_6
; %bb.5:
Lloh2:
	adrp	x21, _hvc_beat_get_chars.q@PAGE
Lloh3:
	add	x21, x21, _hvc_beat_get_chars.q@PAGEOFF
	mov	x0, x20
	mov	x1, x21
	mov	x2, x19
	bl	_memcpy
	ldr	w8, [x23, _hvc_beat_get_chars.qlen@PAGEOFF]
	sub	w2, w8, w19
	str	w2, [x23, _hvc_beat_get_chars.qlen@PAGEOFF]
	add	x0, x21, w19, sxtw
	mov	x1, x21
	bl	_memmove
	b	LBB0_8
LBB0_6:
Lloh4:
	adrp	x1, _hvc_beat_get_chars.q@PAGE
Lloh5:
	add	x1, x1, _hvc_beat_get_chars.q@PAGEOFF
	mov	x0, x20
	bl	_memcpy
	ldr	w19, [x23, _hvc_beat_get_chars.qlen@PAGEOFF]
	str	wzr, [x23, _hvc_beat_get_chars.qlen@PAGEOFF]
	b	LBB0_8
LBB0_7:
	mov	w19, #0
LBB0_8:
	mov	x0, x19
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #80
	ret
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpAdd	Lloh4, Lloh5
	.cfi_endproc
                                        ; -- End function
.zerofill __DATA,__bss,_hvc_beat_get_chars.q,16,3 ; @hvc_beat_get_chars.q
.zerofill __DATA,__bss,_hvc_beat_get_chars.qlen,4,2 ; @hvc_beat_get_chars.qlen
	.no_dead_strip	_hvc_beat_get_chars
.subsections_via_symbols
