	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function _citrus_EUC_mbrtowc_priv
__citrus_EUC_mbrtowc_priv:              ## @_citrus_EUC_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, %r12
	movq	%r8, %rbx
	movq	(%rdx), %r14
	testq	%r14, %r14
	je	LBB0_1
## %bb.2:
	movq	%rcx, %r15
	movq	%rdx, %r13
	movq	%rsi, -72(%rbp)                 ## 8-byte Spill
	movl	(%rbx), %ecx
	leal	-1(%rcx), %eax
	cmpl	$2, %eax
	movq	%rcx, -64(%rbp)                 ## 8-byte Spill
	jae	LBB0_4
## %bb.3:
	movq	%r12, -56(%rbp)                 ## 8-byte Spill
	jmp	LBB0_7
LBB0_1:
	movq	%rbx, %rsi
	callq	__citrus_EUC_init_state
	movq	$0, (%r12)
	jmp	LBB0_31
LBB0_4:
	testl	%ecx, %ecx
	jne	LBB0_29
## %bb.5:
	testq	%r15, %r15
	je	LBB0_30
## %bb.6:
	movq	%r12, -56(%rbp)                 ## 8-byte Spill
	movsbl	(%r14), %eax
	incq	%r14
	movq	8(%rbx), %rcx
	movl	%eax, (%rcx)
	movl	$1, (%rbx)
	decq	%r15
LBB0_7:
	movq	%rdi, -48(%rbp)                 ## 8-byte Spill
	movq	(%rdi), %r12
	movq	8(%rbx), %rax
	movzbl	(%rax), %edi
	callq	__citrus_EUC_cs
	movslq	%eax, %r8
	movl	(%r12,%r8,4), %r9d
	testl	%r9d, %r9d
	movq	-56(%rbp), %r12                 ## 8-byte Reload
	je	LBB0_29
## %bb.8:
	movl	(%rbx), %esi
	cmpl	%r9d, %esi
	jge	LBB0_12
	.p2align	4, 0x90
LBB0_10:                                ## =>This Inner Loop Header: Depth=1
	subq	$1, %r15
	jb	LBB0_30
## %bb.11:                              ##   in Loop: Header=BB0_10 Depth=1
	movsbl	(%r14), %edx
	incq	%r14
	movq	8(%rbx), %rdi
	movslq	%esi, %rsi
	movl	%edx, (%rdi,%rsi,4)
	movl	(%rbx), %esi
	incl	%esi
	movl	%esi, (%rbx)
	cmpl	%r9d, %esi
	jl	LBB0_10
LBB0_12:
	movq	%r14, (%r13)
	cmpl	$2, %eax
	jb	LBB0_15
## %bb.13:
	addl	$-2, %eax
	cmpl	$1, %eax
	ja	LBB0_29
## %bb.14:
	leal	-1(%r9), %esi
	movq	8(%rbx), %rax
	addq	$4, %rax
	jmp	LBB0_16
LBB0_29:
	movl	$0, (%rbx)
	movq	$-1, (%r12)
	movq	_EILSEQ@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	jmp	LBB0_32
LBB0_30:
	movq	$-2, (%r12)
	movq	%r14, (%r13)
	jmp	LBB0_31
LBB0_15:
	movq	8(%rbx), %rax
	movl	%r9d, %esi
LBB0_16:
	movq	-48(%rbp), %r10                 ## 8-byte Reload
	testl	%esi, %esi
	jle	LBB0_17
## %bb.18:
	leal	-1(%rsi), %edx
	cmpl	$3, %edx
	jae	LBB0_20
## %bb.19:
	xorl	%edi, %edi
	jmp	LBB0_23
LBB0_17:
	xorl	%edi, %edi
	jmp	LBB0_26
LBB0_20:
	movl	%esi, %edx
	andl	$-4, %edx
	.p2align	4, 0x90
LBB0_21:                                ## =>This Inner Loop Header: Depth=1
	addq	$4, %rax
	addl	$-4, %edx
	jne	LBB0_21
## %bb.22:
	movl	-4(%rax), %edi
	bswapl	%edi
LBB0_23:
	testb	$3, %sil
	je	LBB0_26
## %bb.24:
	andl	$3, %esi
	xorl	%edx, %edx
	.p2align	4, 0x90
LBB0_25:                                ## =>This Inner Loop Header: Depth=1
	shll	$8, %edi
	movzbl	(%rax,%rdx), %ecx
	orl	%ecx, %edi
	incq	%rdx
	cmpl	%edx, %esi
	jne	LBB0_25
LBB0_26:
	movl	8(%r10), %eax
	notl	%eax
	andl	%edi, %eax
	movq	16(%r10), %rcx
	orl	(%rcx,%r8,4), %eax
	movl	$0, (%rbx)
	movq	-72(%rbp), %rcx                 ## 8-byte Reload
	testq	%rcx, %rcx
	je	LBB0_28
## %bb.27:
	movl	%eax, (%rcx)
LBB0_28:
	subl	-64(%rbp), %r9d                 ## 4-byte Folded Reload
	testl	%eax, %eax
	cmovel	%eax, %r9d
	movslq	%r9d, %rax
	movq	%rax, (%r12)
LBB0_31:
	xorl	%eax, %eax
LBB0_32:
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_EILSEQ,4,2                     ## @EILSEQ
	.no_dead_strip	__citrus_EUC_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_EUC_mbrtowc_priv
__citrus_EUC_mbrtowc_priv:              ; @_citrus_EUC_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
	mov	x22, x0
	ldr	x26, [x2]
	cbz	x26, LBB0_13
; %bb.1:
	mov	x24, x3
	mov	x23, x2
	mov	x21, x1
	ldr	w25, [x20]
	sub	w8, w25, #1
	cmp	w8, #2
	b.lo	LBB0_5
; %bb.2:
	cbnz	w25, LBB0_14
; %bb.3:
	cbz	x24, LBB0_15
; %bb.4:
	ldrsb	w8, [x26], #1
	ldr	x9, [x20, #8]
	str	w8, [x9]
	mov	w8, #1
	str	w8, [x20]
	sub	x24, x24, #1
LBB0_5:
	ldr	x27, [x22]
	ldr	x8, [x20, #8]
	ldrb	w0, [x8]
	bl	__citrus_EUC_cs
                                        ; kill: def $w0 killed $w0 def $x0
	ldr	w8, [x27, w0, sxtw #2]
	cbz	w8, LBB0_14
; %bb.6:
	ldr	w9, [x20]
	cmp	w9, w8
	b.ge	LBB0_9
LBB0_7:                                 ; =>This Inner Loop Header: Depth=1
	cbz	x24, LBB0_15
; %bb.8:                                ;   in Loop: Header=BB0_7 Depth=1
	ldrsb	w10, [x26], #1
	ldr	x11, [x20, #8]
	str	w10, [x11, w9, sxtw #2]
	ldr	w9, [x20]
	add	w9, w9, #1
	str	w9, [x20]
	sub	x24, x24, #1
	cmp	w9, w8
	b.lt	LBB0_7
LBB0_9:
	sxtw	x9, w0
	str	x26, [x23]
	subs	w10, w9, #2
	b.lo	LBB0_16
; %bb.10:
	cmp	w10, #1
	b.hi	LBB0_14
; %bb.11:
	sub	w11, w8, #1
	ldr	x10, [x20, #8]
	add	x10, x10, #4
	cmp	w11, #1
	b.ge	LBB0_17
LBB0_12:
	mov	w13, #0
	b	LBB0_19
LBB0_13:
	mov	x0, x22
	mov	x1, x20
	bl	__citrus_EUC_init_state
	mov	w0, #0
	str	xzr, [x19]
	b	LBB0_22
LBB0_14:
	str	wzr, [x20]
	mov	x8, #-1
	str	x8, [x19]
Lloh0:
	adrp	x8, _EILSEQ@GOTPAGE
Lloh1:
	ldr	x8, [x8, _EILSEQ@GOTPAGEOFF]
Lloh2:
	ldr	w0, [x8]
	b	LBB0_22
LBB0_15:
	mov	w0, #0
	mov	x8, #-2
	str	x8, [x19]
	str	x26, [x23]
	b	LBB0_22
LBB0_16:
	ldr	x10, [x20, #8]
	mov	x11, x8
	cmp	w11, #1
	b.lt	LBB0_12
LBB0_17:
	mov	w12, #0
	add	w11, w11, #1
LBB0_18:                                ; =>This Inner Loop Header: Depth=1
	ldrb	w13, [x10], #1
	bfi	w13, w12, #8, #24
	sub	w11, w11, #1
	mov	x12, x13
	cmp	w11, #1
	b.hi	LBB0_18
LBB0_19:
	ldr	w10, [x22, #8]
	bic	w10, w13, w10
	ldr	x11, [x22, #16]
	ldr	w9, [x11, x9, lsl #2]
	orr	w9, w9, w10
	str	wzr, [x20]
	cbz	x21, LBB0_21
; %bb.20:
	str	w9, [x21]
LBB0_21:
	mov	w0, #0
	sub	w8, w8, w25
	cmp	w9, #0
	csel	w8, wzr, w8, eq
	sxtw	x8, w8
	str	x8, [x19]
LBB0_22:
	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
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_EILSEQ,4,2                     ; @EILSEQ
	.no_dead_strip	__citrus_EUC_mbrtowc_priv
.subsections_via_symbols
