	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function teken_subr_regular_character
_teken_subr_regular_character:          ## @teken_subr_regular_character
	.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
	subq	$16, %rsp
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %rbx
	movl	(%rdi), %eax
	movq	_TS_8BIT@GOTPCREL(%rip), %rcx
	testl	%eax, (%rcx)
	je	LBB0_5
## %bb.1:
	movq	_TS_CONS25@GOTPCREL(%rip), %rcx
	testl	%eax, (%rcx)
	jne	LBB0_4
## %bb.2:
	cmpl	$28, %esi
	jl	LBB0_28
## %bb.3:
	cmpl	$127, %esi
	je	LBB0_28
LBB0_4:
	movq	%rbx, %rdi
	callq	_teken_scs_process
	movl	%eax, %r15d
	movl	$1, %r14d
	jmp	LBB0_7
LBB0_5:
	movq	%rbx, %rdi
	callq	_teken_scs_process
	movl	%eax, %r15d
	movl	%eax, %edi
	callq	_teken_wcwidth
	testl	%eax, %eax
	jle	LBB0_28
## %bb.6:
	movl	%eax, %r14d
LBB0_7:
	movl	(%rbx), %ecx
	movq	_TS_CONS25@GOTPCREL(%rip), %rax
	testl	%ecx, (%rax)
	je	LBB0_14
## %bb.8:
	leaq	12(%rbx), %r12
	movq	%rbx, %rdi
	movq	%r12, %rsi
	movl	%r15d, %edx
	movl	%r14d, %ecx
	callq	_teken_subr_do_putchar
	addl	12(%rbx), %r14d
	movl	%r14d, 12(%rbx)
	cmpl	4(%rbx), %r14d
	jl	LBB0_27
## %bb.9:
	movl	16(%rbx), %eax
	movl	20(%rbx), %ecx
	decl	%ecx
	cmpl	%ecx, %eax
	jne	LBB0_11
## %bb.10:
	movq	%rbx, %rdi
	movl	$1, %esi
	callq	_teken_subr_do_scroll
	movl	$0, (%r12)
	jmp	LBB0_27
LBB0_14:
	movq	_TS_AUTOWRAP@GOTPCREL(%rip), %rax
	testl	%ecx, (%rax)
	je	LBB0_24
## %bb.15:
	movq	_TS_WRAPPED@GOTPCREL(%rip), %r12
	movl	12(%rbx), %eax
	testl	%ecx, (%r12)
	je	LBB0_16
## %bb.17:
	leal	1(%rax), %edx
	movl	4(%rbx), %ecx
	cmpl	%ecx, %edx
	jne	LBB0_18
	jmp	LBB0_19
LBB0_11:
	movl	8(%rbx), %ecx
	decl	%ecx
	cmpl	%ecx, %eax
	jge	LBB0_13
## %bb.12:
	incl	%eax
	movl	%eax, 16(%rbx)
LBB0_13:
	movl	$0, (%r12)
	jmp	LBB0_27
LBB0_16:
	movl	4(%rbx), %ecx
LBB0_18:
	addl	%r14d, %eax
	cmpl	%ecx, %eax
	jle	LBB0_24
LBB0_19:
	movl	16(%rbx), %eax
	movl	20(%rbx), %ecx
	decl	%ecx
	cmpl	%ecx, %eax
	jne	LBB0_22
## %bb.20:
	movq	%rbx, %rdi
	movl	$1, %esi
	callq	_teken_subr_do_scroll
	movl	20(%rbx), %eax
	decl	%eax
	movl	%eax, -36(%rbp)
	jmp	LBB0_21
LBB0_24:
	leaq	12(%rbx), %rsi
	movq	%rbx, %rdi
	movl	%r15d, %edx
	movl	%r14d, %ecx
	callq	_teken_subr_do_putchar
	addl	12(%rbx), %r14d
	movl	%r14d, 12(%rbx)
	movl	4(%rbx), %eax
	movq	_TS_WRAPPED@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	cmpl	%eax, %r14d
	jge	LBB0_25
## %bb.26:
	notl	%ecx
	andl	%ecx, (%rbx)
	jmp	LBB0_27
LBB0_25:
	orl	%ecx, (%rbx)
	decl	%eax
	movl	%eax, 12(%rbx)
	jmp	LBB0_27
LBB0_22:
	incl	%eax
	movl	%eax, -36(%rbp)
	cmpl	8(%rbx), %eax
	jne	LBB0_21
## %bb.23:
	leaq	12(%rbx), %rsi
	movq	%rbx, %rdi
	movl	%r15d, %edx
	movl	%r14d, %ecx
	callq	_teken_subr_do_putchar
	jmp	LBB0_28
LBB0_21:
	movl	$0, -40(%rbp)
	leaq	-40(%rbp), %rsi
	movq	%rbx, %rdi
	movl	%r15d, %edx
	movl	%r14d, %ecx
	callq	_teken_subr_do_putchar
	movl	-36(%rbp), %eax
	movl	%eax, 16(%rbx)
	movl	%r14d, 12(%rbx)
	movl	(%r12), %eax
	notl	%eax
	andl	%eax, (%rbx)
LBB0_27:
	movq	%rbx, %rdi
	callq	_teken_funcs_cursor
LBB0_28:
	addq	$16, %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_TS_8BIT,4,2                    ## @TS_8BIT
	.comm	_TS_CONS25,4,2                  ## @TS_CONS25
	.comm	_TS_AUTOWRAP,4,2                ## @TS_AUTOWRAP
	.comm	_TS_WRAPPED,4,2                 ## @TS_WRAPPED
	.no_dead_strip	_teken_subr_regular_character
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function teken_subr_regular_character
_teken_subr_regular_character:          ; @teken_subr_regular_character
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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
	mov	x19, x0
	ldr	w8, [x0]
Lloh0:
	adrp	x9, _TS_8BIT@GOTPAGE
Lloh1:
	ldr	x9, [x9, _TS_8BIT@GOTPAGEOFF]
Lloh2:
	ldr	w9, [x9]
Lloh3:
	adrp	x22, _TS_CONS25@GOTPAGE
Lloh4:
	ldr	x22, [x22, _TS_CONS25@GOTPAGEOFF]
	tst	w9, w8
	b.eq	LBB0_5
; %bb.1:
	ldr	w9, [x22]
	tst	w9, w8
	b.ne	LBB0_4
; %bb.2:
	cmp	w1, #28
	b.lt	LBB0_29
; %bb.3:
	cmp	w1, #127
	b.eq	LBB0_29
LBB0_4:
	mov	x0, x19
	bl	_teken_scs_process
	mov	x21, x0
	mov	w20, #1
	b	LBB0_7
LBB0_5:
	mov	x0, x19
	bl	_teken_scs_process
	mov	x21, x0
	bl	_teken_wcwidth
	cmp	w0, #1
	b.lt	LBB0_29
; %bb.6:
	mov	x20, x0
LBB0_7:
	ldr	w9, [x19]
	ldr	w8, [x22]
	tst	w8, w9
	b.eq	LBB0_11
; %bb.8:
	add	x22, x19, #12
	mov	x0, x19
	mov	x1, x22
	mov	x2, x21
	mov	x3, x20
	bl	_teken_subr_do_putchar
	ldr	w8, [x19, #12]
	ldr	w9, [x19, #4]
	add	w8, w8, w20
	cmp	w8, w9
	str	w8, [x19, #12]
	b.lt	LBB0_28
; %bb.9:
	ldp	w8, w9, [x19, #16]
	sub	w9, w9, #1
	cmp	w8, w9
	b.ne	LBB0_14
; %bb.10:
	mov	x0, x19
	mov	w1, #1
	bl	_teken_subr_do_scroll
	str	wzr, [x22]
	b	LBB0_28
LBB0_11:
Lloh5:
	adrp	x8, _TS_AUTOWRAP@GOTPAGE
Lloh6:
	ldr	x8, [x8, _TS_AUTOWRAP@GOTPAGEOFF]
Lloh7:
	ldr	w8, [x8]
Lloh8:
	adrp	x22, _TS_WRAPPED@GOTPAGE
Lloh9:
	ldr	x22, [x22, _TS_WRAPPED@GOTPAGEOFF]
	tst	w8, w9
	b.eq	LBB0_21
; %bb.12:
	ldr	w10, [x22]
	ldr	w8, [x19, #12]
	tst	w10, w9
	b.eq	LBB0_17
; %bb.13:
	add	w10, w8, #1
	ldr	w9, [x19, #4]
	cmp	w10, w9
	b.ne	LBB0_18
	b	LBB0_19
LBB0_14:
	ldr	w9, [x19, #8]
	sub	w9, w9, #1
	cmp	w8, w9
	b.ge	LBB0_16
; %bb.15:
	add	w8, w8, #1
	str	w8, [x19, #16]
LBB0_16:
	str	wzr, [x22]
	b	LBB0_28
LBB0_17:
	ldr	w9, [x19, #4]
LBB0_18:
	add	w8, w8, w20
	cmp	w8, w9
	b.le	LBB0_21
LBB0_19:
	ldp	w8, w9, [x19, #16]
	sub	w9, w9, #1
	cmp	w8, w9
	b.ne	LBB0_24
; %bb.20:
	mov	x0, x19
	mov	w1, #1
	bl	_teken_subr_do_scroll
	ldr	w8, [x19, #20]
	sub	w8, w8, #1
	str	w8, [sp, #12]
	b	LBB0_26
LBB0_21:
	add	x1, x19, #12
	mov	x0, x19
	mov	x2, x21
	mov	x3, x20
	bl	_teken_subr_do_putchar
	ldr	w9, [x19, #12]
	ldr	w8, [x19, #4]
	add	w9, w9, w20
	cmp	w9, w8
	str	w9, [x19, #12]
	ldr	w9, [x22]
	b.ge	LBB0_23
; %bb.22:
	ldr	w8, [x19]
	bic	w8, w8, w9
	b	LBB0_27
LBB0_23:
	ldr	w10, [x19]
	orr	w9, w10, w9
	str	w9, [x19]
	sub	w8, w8, #1
	str	w8, [x19, #12]
	b	LBB0_28
LBB0_24:
	add	w8, w8, #1
	str	w8, [sp, #12]
	ldr	w9, [x19, #8]
	cmp	w8, w9
	b.ne	LBB0_26
; %bb.25:
	add	x1, x19, #12
	mov	x0, x19
	mov	x2, x21
	mov	x3, x20
	bl	_teken_subr_do_putchar
	b	LBB0_29
LBB0_26:
	str	wzr, [sp, #8]
	add	x1, sp, #8
	mov	x0, x19
	mov	x2, x21
	mov	x3, x20
	bl	_teken_subr_do_putchar
	ldr	w8, [sp, #12]
	stp	w20, w8, [x19, #12]
	ldr	w8, [x22]
	ldr	w9, [x19]
	bic	w8, w9, w8
LBB0_27:
	str	w8, [x19]
LBB0_28:
	mov	x0, x19
	bl	_teken_funcs_cursor
LBB0_29:
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #64
	ret
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.cfi_endproc
                                        ; -- End function
	.comm	_TS_8BIT,4,2                    ; @TS_8BIT
	.comm	_TS_CONS25,4,2                  ; @TS_CONS25
	.comm	_TS_AUTOWRAP,4,2                ; @TS_AUTOWRAP
	.comm	_TS_WRAPPED,4,2                 ; @TS_WRAPPED
	.no_dead_strip	_teken_subr_regular_character
.subsections_via_symbols
