	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function _citrus_DECHanyu_mbrtowc_priv
__citrus_DECHanyu_mbrtowc_priv:         ## @_citrus_DECHanyu_mbrtowc_priv
	.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	$56, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%r9, %rbx
	movq	%r8, %r13
	movq	(%rdx), %r14
	testq	%r14, %r14
	je	LBB0_9
## %bb.1:
	movq	%rdx, %r15
	movq	%rbx, -64(%rbp)                 ## 8-byte Spill
	movl	(%r13), %r12d
	leal	-2(%r12), %eax
	cmpl	$2, %eax
	movq	%rsi, -96(%rbp)                 ## 8-byte Spill
	jb	LBB0_10
## %bb.2:
	cmpl	$1, %r12d
	je	LBB0_16
## %bb.3:
	testl	%r12d, %r12d
	jne	LBB0_24
## %bb.4:
	subq	$1, %rcx
	jb	LBB0_29
## %bb.5:
	movq	%rcx, -56(%rbp)                 ## 8-byte Spill
	leaq	1(%r14), %rax
	movq	%rax, -88(%rbp)                 ## 8-byte Spill
	movzbl	(%r14), %r12d
	movl	%r12d, %edi
	callq	_is_singlebyte
	testl	%eax, %eax
	je	LBB0_30
## %bb.6:
	movq	-96(%rbp), %rax                 ## 8-byte Reload
	testq	%rax, %rax
	movq	-64(%rbp), %rbx                 ## 8-byte Reload
	je	LBB0_8
## %bb.7:
	movl	%r12d, (%rax)
LBB0_8:
	xorl	%eax, %eax
	testl	%r12d, %r12d
	setne	%al
	movq	%rax, (%rbx)
	movq	-88(%rbp), %rax                 ## 8-byte Reload
	movq	%rax, (%r15)
	jmp	LBB0_45
LBB0_9:
	movq	%r13, %rsi
	callq	__citrus_DECHanyu_init_state
	movq	__ENCODING_IS_STATE_DEPENDENT@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, (%rbx)
	jmp	LBB0_45
LBB0_10:
	movq	%r15, %rbx
	movq	%rcx, -56(%rbp)                 ## 8-byte Spill
	movq	8(%r13), %r15
	movzbl	(%r15), %edi
	callq	_is_hanyu1
	testl	%eax, %eax
	je	LBB0_24
## %bb.11:
	movzbl	4(%r15), %edi
	movl	%edi, -44(%rbp)                 ## 4-byte Spill
	callq	_is_hanyu2
	testl	%eax, %eax
	je	LBB0_24
## %bb.12:
	movq	%r15, -80(%rbp)                 ## 8-byte Spill
	movq	_HANYUBIT@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movq	%r14, %rcx
	movq	%rbx, %r15
LBB0_13:
	cmpl	$3, %r12d
	movl	%eax, -68(%rbp)                 ## 4-byte Spill
	je	LBB0_23
## %bb.14:
	cmpl	$2, %r12d
	je	LBB0_26
## %bb.15:
	cmpl	$1, %r12d
	movq	-64(%rbp), %rsi                 ## 8-byte Reload
	movl	-44(%rbp), %r12d                ## 4-byte Reload
	je	LBB0_17
	jmp	LBB0_37
LBB0_16:
	movq	%rcx, -56(%rbp)                 ## 8-byte Spill
	movq	8(%r13), %rax
	movq	%rax, -80(%rbp)                 ## 8-byte Spill
	movzbl	(%rax), %r12d
	movl	%r12d, %edi
	callq	_is_leadbyte
	movl	$0, -68(%rbp)                   ## 4-byte Folded Spill
	movq	%r14, %rcx
	testl	%eax, %eax
	je	LBB0_24
LBB0_17:
	movq	%rcx, %rbx
	movl	%r12d, %edi
	callq	_is_hanyu1
	testl	%eax, %eax
	je	LBB0_22
## %bb.18:
	cmpq	$0, -56(%rbp)                   ## 8-byte Folded Reload
	je	LBB0_28
## %bb.19:
	movzbl	(%rbx), %r12d
	movl	%r12d, %edi
	callq	_is_hanyu2
	testl	%eax, %eax
	movq	-64(%rbp), %rsi                 ## 8-byte Reload
	je	LBB0_42
## %bb.20:
	leaq	1(%rbx), %rax
	movl	$2, (%r13)
	movq	-80(%rbp), %rcx                 ## 8-byte Reload
	movl	%r12d, 4(%rcx)
	cmpq	$1, -56(%rbp)                   ## 8-byte Folded Reload
	jne	LBB0_34
## %bb.21:
	movq	%rax, %r14
	jmp	LBB0_44
LBB0_22:
	movq	%rbx, %rcx
	movq	-64(%rbp), %rsi                 ## 8-byte Reload
	jmp	LBB0_37
LBB0_23:
	movq	-80(%rbp), %rax                 ## 8-byte Reload
	movzbl	8(%rax), %r12d
	movl	%r12d, %edi
	movq	%rcx, -88(%rbp)                 ## 8-byte Spill
	callq	_is_leadbyte
	movq	-88(%rbp), %rcx                 ## 8-byte Reload
	testl	%eax, %eax
	movq	-64(%rbp), %rsi                 ## 8-byte Reload
	jne	LBB0_37
LBB0_24:
	movq	_EINVAL@GOTPCREL(%rip), %rax
LBB0_25:
	movl	(%rax), %eax
	jmp	LBB0_46
LBB0_26:
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	subq	$1, %rax
	movq	-64(%rbp), %rsi                 ## 8-byte Reload
	jb	LBB0_43
## %bb.32:
	movq	%rax, -56(%rbp)                 ## 8-byte Spill
	movzbl	(%rcx), %edi
	movl	%edi, -44(%rbp)                 ## 4-byte Spill
	movq	%rcx, %rbx
	movq	%rsi, %r12
	callq	_is_leadbyte
	movq	%r12, %rsi
	testl	%eax, %eax
	je	LBB0_42
## %bb.33:
	incq	%rbx
	movl	$3, (%r13)
	movl	-44(%rbp), %r12d                ## 4-byte Reload
	movq	-80(%rbp), %rax                 ## 8-byte Reload
	movl	%r12d, 8(%rax)
	jmp	LBB0_36
LBB0_28:
	movq	%rbx, %r14
LBB0_29:
	movq	-64(%rbp), %rsi                 ## 8-byte Reload
	jmp	LBB0_44
LBB0_30:
	movl	%r12d, -44(%rbp)                ## 4-byte Spill
	movl	%r12d, %edi
	callq	_is_leadbyte
	testl	%eax, %eax
	movq	-64(%rbp), %rsi                 ## 8-byte Reload
	movq	-88(%rbp), %rcx                 ## 8-byte Reload
	je	LBB0_42
## %bb.31:
	movq	8(%r13), %rdx
	movl	$1, (%r13)
	movl	-44(%rbp), %eax                 ## 4-byte Reload
	movq	%rdx, -80(%rbp)                 ## 8-byte Spill
	movl	%eax, (%rdx)
	movl	(%r13), %r12d
	xorl	%eax, %eax
	jmp	LBB0_13
LBB0_34:
	movq	_HANYUBIT@GOTPCREL(%rip), %rcx
	movl	-68(%rbp), %edx                 ## 4-byte Reload
	orl	(%rcx), %edx
	movl	%edx, -68(%rbp)                 ## 4-byte Spill
	movzbl	(%rax), %edi
	movl	%edi, %r12d
	callq	_is_leadbyte
	movq	-64(%rbp), %rsi                 ## 8-byte Reload
	testl	%eax, %eax
	je	LBB0_42
## %bb.35:
	addq	$-2, -56(%rbp)                  ## 8-byte Folded Spill
	addq	$2, %rbx
	movslq	(%r13), %rax
	leal	1(%rax), %ecx
	movl	%ecx, (%r13)
	movq	-80(%rbp), %rcx                 ## 8-byte Reload
	movl	%r12d, (%rcx,%rax,4)
LBB0_36:
	movq	%rbx, %rcx
LBB0_37:
	cmpq	$0, -56(%rbp)                   ## 8-byte Folded Reload
	je	LBB0_43
## %bb.38:
	movl	%r12d, -44(%rbp)                ## 4-byte Spill
	movzbl	(%rcx), %edi
	movl	%edi, -56(%rbp)                 ## 4-byte Spill
	movq	%rcx, %r12
	movq	%rsi, %rbx
	callq	_is_trailbyte
	movq	%rbx, %rsi
	testl	%eax, %eax
	je	LBB0_42
## %bb.39:
	incq	%r12
	movq	-96(%rbp), %rax                 ## 8-byte Reload
	testq	%rax, %rax
	je	LBB0_41
## %bb.40:
	movl	-44(%rbp), %edx                 ## 4-byte Reload
	shll	$8, %edx
	orl	-68(%rbp), %edx                 ## 4-byte Folded Reload
	orl	-56(%rbp), %edx                 ## 4-byte Folded Reload
	movl	%edx, (%rax)
LBB0_41:
	movq	%r12, %rax
	subq	%r14, %rax
	movq	%rax, (%rsi)
	movq	%r12, (%r15)
	movl	$0, (%r13)
	jmp	LBB0_45
LBB0_42:
	movq	$-1, (%rsi)
	movq	_EILSEQ@GOTPCREL(%rip), %rax
	jmp	LBB0_25
LBB0_43:
	movq	%rcx, %r14
LBB0_44:
	movq	$-2, (%rsi)
	movq	%r14, (%r15)
LBB0_45:
	xorl	%eax, %eax
LBB0_46:
	addq	$56, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	__ENCODING_IS_STATE_DEPENDENT,8,3 ## @_ENCODING_IS_STATE_DEPENDENT
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_HANYUBIT,8,3                   ## @HANYUBIT
	.comm	_EILSEQ,4,2                     ## @EILSEQ
	.no_dead_strip	__citrus_DECHanyu_mbrtowc_priv
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function _citrus_DECHanyu_mbrtowc_priv
__citrus_DECHanyu_mbrtowc_priv:         ; @_citrus_DECHanyu_mbrtowc_priv
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	stp	x28, x27, [sp, #16]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #32]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #48]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #64]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #80]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #96]             ; 16-byte Folded Spill
	add	x29, sp, #96
	.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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	mov	x19, x5
	mov	x21, x4
	ldr	x25, [x2]
	cbz	x25, LBB0_9
; %bb.1:
	mov	x23, x3
	mov	x20, x2
	mov	x22, x1
	ldr	w27, [x21]
	sub	w8, w27, #2
	cmp	w8, #2
	b.lo	LBB0_10
; %bb.2:
	cmp	w27, #1
	b.eq	LBB0_15
; %bb.3:
	cbnz	w27, LBB0_25
; %bb.4:
	cbz	x23, LBB0_38
; %bb.5:
	mov	x26, x25
	ldrb	w24, [x26], #1
	mov	x0, x24
	bl	_is_singlebyte
	cbz	w0, LBB0_22
; %bb.6:
	cbz	x22, LBB0_8
; %bb.7:
	str	w24, [x22]
LBB0_8:
	mov	w0, #0
	cmp	w24, #0
	cset	w8, ne
	str	x8, [x19]
	str	x26, [x20]
	b	LBB0_39
LBB0_9:
	mov	x1, x21
	bl	__citrus_DECHanyu_init_state
	mov	w0, #0
Lloh0:
	adrp	x8, __ENCODING_IS_STATE_DEPENDENT@GOTPAGE
Lloh1:
	ldr	x8, [x8, __ENCODING_IS_STATE_DEPENDENT@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	str	x8, [x19]
	b	LBB0_39
LBB0_10:
	ldr	x28, [x21, #8]
	ldrb	w0, [x28]
	bl	_is_hanyu1
	cbz	w0, LBB0_25
; %bb.11:
	ldrb	w24, [x28, #4]
	mov	x0, x24
	bl	_is_hanyu2
	cbz	w0, LBB0_25
; %bb.12:
Lloh3:
	adrp	x8, _HANYUBIT@GOTPAGE
Lloh4:
	ldr	x8, [x8, _HANYUBIT@GOTPAGEOFF]
Lloh5:
	ldr	w9, [x8]
	mov	x26, x25
	cmp	w27, #3
	b.eq	LBB0_24
LBB0_13:
	cmp	w27, #2
	b.eq	LBB0_27
; %bb.14:
	str	w9, [sp, #12]                   ; 4-byte Folded Spill
	cmp	w27, #1
	b.eq	LBB0_17
	b	LBB0_32
LBB0_15:
	ldr	x28, [x21, #8]
	ldrb	w24, [x28]
	mov	x0, x24
	bl	_is_leadbyte
	cbz	w0, LBB0_25
; %bb.16:
	str	wzr, [sp, #12]                  ; 4-byte Folded Spill
	mov	x26, x25
LBB0_17:
	mov	x0, x24
	bl	_is_hanyu1
	cbz	w0, LBB0_32
; %bb.18:
	cbz	x23, LBB0_37
; %bb.19:
	mov	x27, x26
	ldrb	w24, [x27], #1
	mov	x0, x24
	bl	_is_hanyu2
	cbz	w0, LBB0_40
; %bb.20:
	mov	w8, #2
	str	w8, [x21]
	str	w24, [x28, #4]
	cmp	x23, #1
	b.ne	LBB0_30
; %bb.21:
	mov	x25, x27
	b	LBB0_38
LBB0_22:
	mov	x0, x24
	bl	_is_leadbyte
	cbz	w0, LBB0_40
; %bb.23:
	mov	w9, #0
	sub	x23, x23, #1
	ldr	x28, [x21, #8]
	mov	w8, #1
	str	w8, [x21]
	str	w24, [x28]
	ldr	w27, [x21]
	cmp	w27, #3
	b.ne	LBB0_13
LBB0_24:
	str	w9, [sp, #12]                   ; 4-byte Folded Spill
	ldrb	w24, [x28, #8]
	mov	x0, x24
	bl	_is_leadbyte
	cbnz	w0, LBB0_32
LBB0_25:
Lloh6:
	adrp	x8, _EINVAL@GOTPAGE
Lloh7:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
LBB0_26:
	ldr	w0, [x8]
	b	LBB0_39
LBB0_27:
	cbz	x23, LBB0_37
; %bb.28:
	str	w9, [sp, #12]                   ; 4-byte Folded Spill
	ldrb	w24, [x26]
	mov	x0, x24
	bl	_is_leadbyte
	cbz	w0, LBB0_40
; %bb.29:
	sub	x23, x23, #1
	add	x26, x26, #1
	mov	w8, #3
	str	w8, [x21]
	str	w24, [x28, #8]
	b	LBB0_32
LBB0_30:
Lloh8:
	adrp	x8, _HANYUBIT@GOTPAGE
Lloh9:
	ldr	x8, [x8, _HANYUBIT@GOTPAGEOFF]
Lloh10:
	ldr	w8, [x8]
	str	w8, [sp, #8]                    ; 4-byte Folded Spill
	ldrb	w24, [x27]
	mov	x0, x24
	bl	_is_leadbyte
	cbz	w0, LBB0_40
; %bb.31:
	ldp	w9, w8, [sp, #8]                ; 8-byte Folded Reload
	orr	w8, w8, w9
	str	w8, [sp, #12]                   ; 4-byte Folded Spill
	sub	x23, x23, #2
	add	x26, x26, #2
	ldrsw	x8, [x21]
	add	w9, w8, #1
	str	w9, [x21]
	str	w24, [x28, x8, lsl #2]
LBB0_32:
	cbz	x23, LBB0_37
; %bb.33:
	ldrb	w23, [x26], #1
	mov	x0, x23
	bl	_is_trailbyte
	cbz	w0, LBB0_40
; %bb.34:
	cbz	x22, LBB0_36
; %bb.35:
	ldr	w8, [sp, #12]                   ; 4-byte Folded Reload
	orr	w8, w8, w24, lsl #8
	orr	w8, w8, w23
	str	w8, [x22]
LBB0_36:
	mov	w0, #0
	sub	x8, x26, x25
	str	x8, [x19]
	str	x26, [x20]
	str	wzr, [x21]
	b	LBB0_39
LBB0_37:
	mov	x25, x26
LBB0_38:
	mov	w0, #0
	mov	x8, #-2
	str	x8, [x19]
	str	x25, [x20]
LBB0_39:
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #48]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #32]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #112
	ret
LBB0_40:
	mov	x8, #-1
	str	x8, [x19]
Lloh11:
	adrp	x8, _EILSEQ@GOTPAGE
Lloh12:
	ldr	x8, [x8, _EILSEQ@GOTPAGEOFF]
	b	LBB0_26
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh11, Lloh12
	.cfi_endproc
                                        ; -- End function
	.comm	__ENCODING_IS_STATE_DEPENDENT,8,3 ; @_ENCODING_IS_STATE_DEPENDENT
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_HANYUBIT,8,3                   ; @HANYUBIT
	.comm	_EILSEQ,4,2                     ; @EILSEQ
	.no_dead_strip	__citrus_DECHanyu_mbrtowc_priv
.subsections_via_symbols
