	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function _citrus_EUCTW_mbrtowc_priv
__citrus_EUCTW_mbrtowc_priv:            ## @_citrus_EUCTW_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	$40, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%r9, %r15
	movq	%r8, %r13
	movq	(%rdx), %r14
	testq	%r14, %r14
	je	LBB0_1
## %bb.2:
	movq	%rcx, %rbx
	movq	%rdx, -64(%rbp)                 ## 8-byte Spill
	movq	%rsi, -80(%rbp)                 ## 8-byte Spill
	movq	%r15, -48(%rbp)                 ## 8-byte Spill
	movl	(%r13), %ecx
	leal	-1(%rcx), %eax
	cmpl	$2, %eax
	movq	%rcx, -72(%rbp)                 ## 8-byte Spill
	jae	LBB0_4
## %bb.3:
	movl	%ecx, %r15d
	jmp	LBB0_7
LBB0_1:
	movq	%r13, %rsi
	callq	__citrus_EUCTW_init_state
	movq	$0, (%r15)
LBB0_27:
	xorl	%ecx, %ecx
	jmp	LBB0_28
LBB0_4:
	testl	%ecx, %ecx
	jne	LBB0_15
## %bb.5:
	testq	%rbx, %rbx
	je	LBB0_26
## %bb.6:
	movsbl	(%r14), %eax
	incq	%r14
	movq	8(%r13), %rcx
	movl	%eax, (%rcx)
	movl	$1, (%r13)
	decq	%rbx
	movl	$1, %r15d
LBB0_7:
	movq	8(%r13), %r12
	movzbl	(%r12), %edi
	callq	__citrus_EUCTW_cs
	movl	%eax, -52(%rbp)                 ## 4-byte Spill
	movl	%eax, %edi
	callq	__citrus_EUCTW_count
	testl	%eax, %eax
	je	LBB0_15
	.p2align	4, 0x90
## %bb.8:
	cmpl	%eax, %r15d
	jge	LBB0_11
LBB0_9:                                 ## =>This Inner Loop Header: Depth=1
	subq	$1, %rbx
	jb	LBB0_15
## %bb.10:                              ##   in Loop: Header=BB0_9 Depth=1
	movsbl	(%r14), %ecx
	incq	%r14
	movslq	%r15d, %rdx
	movl	%ecx, (%r12,%rdx,4)
	movl	(%r13), %r15d
	incl	%r15d
	movl	%r15d, (%r13)
	cmpl	%eax, %r15d
	jl	LBB0_9
LBB0_11:
	movl	-52(%rbp), %ecx                 ## 4-byte Reload
	cmpl	$2, %ecx
	je	LBB0_19
## %bb.12:
	cmpl	$1, %ecx
	je	LBB0_16
## %bb.13:
	testl	%ecx, %ecx
	jne	LBB0_15
## %bb.14:
	movl	(%r12), %ecx
	testb	$-128, %cl
	jne	LBB0_15
	jmp	LBB0_22
LBB0_26:
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	movq	$-1, (%rax)
	jmp	LBB0_27
LBB0_16:
	testb	$-128, (%r12)
	je	LBB0_15
## %bb.17:
	movl	4(%r12), %ecx
	testb	$-128, %cl
	je	LBB0_15
## %bb.18:
	movsbl	%cl, %edx
	orl	$1191182336, %edx               ## imm = 0x47000000
	jmp	LBB0_23
LBB0_19:
	movzbl	4(%r12), %ecx
	addl	$-168, %ecx
	cmpl	$-7, %ecx
	jb	LBB0_15
## %bb.20:
	testb	$-128, 8(%r12)
	je	LBB0_15
## %bb.21:
	movl	12(%r12), %ecx
	testb	$-128, %cl
	jne	LBB0_22
LBB0_15:
	movl	$0, (%r13)
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	movq	$-1, (%rax)
	movq	_EILSEQ@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
LBB0_28:
	movl	%ecx, %eax
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_22:
	movzbl	%cl, %edx
LBB0_23:
	movq	-64(%rbp), %rcx                 ## 8-byte Reload
	movq	%r14, (%rcx)
	movl	$0, (%r13)
	movq	-80(%rbp), %rcx                 ## 8-byte Reload
	testq	%rcx, %rcx
	movq	-48(%rbp), %rsi                 ## 8-byte Reload
	je	LBB0_25
## %bb.24:
	movb	%dl, (%rcx)
LBB0_25:
	subl	-72(%rbp), %eax                 ## 4-byte Folded Reload
	xorl	%ecx, %ecx
	testb	%dl, %dl
	cmovel	%ecx, %eax
	cltq
	movq	%rax, (%rsi)
	jmp	LBB0_28
	.cfi_endproc
                                        ## -- End function
	.comm	_EILSEQ,4,2                     ## @EILSEQ
	.no_dead_strip	__citrus_EUCTW_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_EUCTW_mbrtowc_priv
__citrus_EUCTW_mbrtowc_priv:            ; @_citrus_EUCTW_mbrtowc_priv
	.cfi_startproc
; %bb.0:
	stp	x28, x27, [sp, #-96]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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	x20, x4
	ldr	x26, [x2]
	cbz	x26, LBB0_3
; %bb.1:
	mov	x23, x3
	mov	x22, x2
	mov	x21, x1
	ldr	w25, [x20]
	sub	w8, w25, #1
	cmp	w8, #2
	b.hs	LBB0_4
; %bb.2:
	mov	x28, x25
	b	LBB0_7
LBB0_3:
	mov	x1, x20
	bl	__citrus_EUCTW_init_state
	mov	w8, #0
	str	xzr, [x19]
	b	LBB0_23
LBB0_4:
	cbnz	w25, LBB0_22
; %bb.5:
	cbz	x23, LBB0_15
; %bb.6:
	ldrsb	w8, [x26], #1
	ldr	x9, [x20, #8]
	str	w8, [x9]
	mov	w28, #1
	str	w28, [x20]
	sub	x23, x23, #1
LBB0_7:
	ldr	x27, [x20, #8]
	ldrb	w0, [x27]
	bl	__citrus_EUCTW_cs
	mov	x24, x0
	bl	__citrus_EUCTW_count
	cbz	w0, LBB0_22
; %bb.8:
	cmp	w28, w0
	b.ge	LBB0_11
LBB0_9:                                 ; =>This Inner Loop Header: Depth=1
	cbz	x23, LBB0_22
; %bb.10:                               ;   in Loop: Header=BB0_9 Depth=1
	ldrsb	w8, [x26], #1
	str	w8, [x27, w28, sxtw #2]
	ldr	w8, [x20]
	add	w28, w8, #1
	str	w28, [x20]
	sub	x23, x23, #1
	cmp	w28, w0
	b.lt	LBB0_9
LBB0_11:
	cmp	w24, #2
	b.eq	LBB0_19
; %bb.12:
	cmp	w24, #1
	b.eq	LBB0_16
; %bb.13:
	cbnz	w24, LBB0_22
; %bb.14:
	ldr	w8, [x27]
	tbnz	w8, #7, LBB0_22
	b	LBB0_24
LBB0_15:
	mov	w8, #0
	mov	x9, #-1
	b	LBB0_28
LBB0_16:
	ldrb	w8, [x27]
	tbz	w8, #7, LBB0_22
; %bb.17:
	ldr	w8, [x27, #4]
	tbz	w8, #7, LBB0_22
; %bb.18:
	sxtb	w8, w8
	mov	w9, #1191182336
	orr	w9, w8, w9
	b	LBB0_25
LBB0_19:
	ldrb	w8, [x27, #4]
	sub	w8, w8, #168
	cmn	w8, #7
	b.lo	LBB0_22
; %bb.20:
	ldrb	w8, [x27, #8]
	tbz	w8, #7, LBB0_22
; %bb.21:
	ldr	w8, [x27, #12]
	tbnz	w8, #7, LBB0_24
LBB0_22:
	str	wzr, [x20]
	mov	x8, #-1
	str	x8, [x19]
Lloh0:
	adrp	x8, _EILSEQ@GOTPAGE
Lloh1:
	ldr	x8, [x8, _EILSEQ@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
LBB0_23:
	mov	x0, x8
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp], #96             ; 16-byte Folded Reload
	ret
LBB0_24:
	and	w9, w8, #0xff
LBB0_25:
	str	x26, [x22]
	str	wzr, [x20]
	cbz	x21, LBB0_27
; %bb.26:
	strb	w9, [x21]
LBB0_27:
	mov	w8, #0
	sub	w10, w0, w25
	tst	w9, #0xff
	csel	w9, wzr, w10, eq
	sxtw	x9, w9
LBB0_28:
	str	x9, [x19]
	b	LBB0_23
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_EILSEQ,4,2                     ; @EILSEQ
	.no_dead_strip	__citrus_EUCTW_mbrtowc_priv
.subsections_via_symbols
