	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function _citrus_MSKanji_mbrtowc_priv
__citrus_MSKanji_mbrtowc_priv:          ## @_citrus_MSKanji_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_4
## %bb.1:
	movq	%rcx, %rbx
	movl	(%r13), %eax
	testl	%eax, %eax
	je	LBB0_5
## %bb.2:
	movq	%r15, -64(%rbp)                 ## 8-byte Spill
	cmpl	$1, %eax
	jne	LBB0_14
## %bb.3:
	movq	%rdx, -56(%rbp)                 ## 8-byte Spill
	movl	%eax, -44(%rbp)                 ## 4-byte Spill
	movq	%rsi, -72(%rbp)                 ## 8-byte Spill
	movq	8(%r13), %r15
	jmp	LBB0_7
LBB0_4:
	movq	%r13, %rsi
	callq	__citrus_MSKanji_init_state
	movq	$0, (%r15)
	jmp	LBB0_22
LBB0_5:
	testq	%rbx, %rbx
	je	LBB0_21
## %bb.6:
	movq	%rdx, -56(%rbp)                 ## 8-byte Spill
	movl	%eax, -44(%rbp)                 ## 4-byte Spill
	movq	%rsi, -72(%rbp)                 ## 8-byte Spill
	movq	%r15, -64(%rbp)                 ## 8-byte Spill
	movsbl	(%r14), %eax
	incq	%r14
	movq	8(%r13), %r15
	movl	%eax, (%r15)
	movl	$1, (%r13)
	decq	%rbx
LBB0_7:
	movzbl	(%r15), %edi
	callq	__mskanji1
	xorl	%ecx, %ecx
	testq	%rax, %rax
	sete	%cl
	movl	$2, %r12d
	subl	%ecx, %r12d
	testq	%rax, %rax
	je	LBB0_15
## %bb.8:
	movl	$1, %ecx
	.p2align	4, 0x90
LBB0_9:                                 ## =>This Inner Loop Header: Depth=1
	subq	$1, %rbx
	jb	LBB0_20
## %bb.10:                              ##   in Loop: Header=BB0_9 Depth=1
	movsbl	(%r14), %edx
	incq	%r14
	movslq	%ecx, %rcx
	movl	%edx, (%r15,%rcx,4)
	movl	(%r13), %ecx
	incl	%ecx
	movl	%ecx, (%r13)
	cmpl	%r12d, %ecx
	jl	LBB0_9
## %bb.11:
	movq	-56(%rbp), %rcx                 ## 8-byte Reload
	movq	%r14, (%rcx)
	testq	%rax, %rax
	je	LBB0_16
## %bb.12:
	movzbl	4(%r15), %edi
	callq	__mskanji2
	testl	%eax, %eax
	movq	-72(%rbp), %rdx                 ## 8-byte Reload
	je	LBB0_14
## %bb.13:
	movl	(%r15), %eax
	shll	$8, %eax
	movzwl	%ax, %ecx
	movzbl	4(%r15), %eax
	orl	%ecx, %eax
	jmp	LBB0_17
LBB0_14:
	movl	$0, (%r13)
	movq	-64(%rbp), %rax                 ## 8-byte Reload
	movq	$-1, (%rax)
	movq	_EILSEQ@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	jmp	LBB0_23
LBB0_15:
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	movq	%r14, (%rax)
LBB0_16:
	movzbl	(%r15), %eax
	movq	-72(%rbp), %rdx                 ## 8-byte Reload
LBB0_17:
	movl	$0, (%r13)
	testq	%rdx, %rdx
	movq	-64(%rbp), %rcx                 ## 8-byte Reload
	je	LBB0_19
## %bb.18:
	movl	%eax, (%rdx)
LBB0_19:
	subl	-44(%rbp), %r12d                ## 4-byte Folded Reload
	testl	%eax, %eax
	cmovel	%eax, %r12d
	movslq	%r12d, %rax
	movq	%rax, (%rcx)
	jmp	LBB0_22
LBB0_20:
	movq	-64(%rbp), %r15                 ## 8-byte Reload
	movq	-56(%rbp), %rdx                 ## 8-byte Reload
LBB0_21:
	movq	$-2, (%r15)
	movq	%r14, (%rdx)
LBB0_22:
	xorl	%eax, %eax
LBB0_23:
	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_MSKanji_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_MSKanji_mbrtowc_priv
__citrus_MSKanji_mbrtowc_priv:          ; @_citrus_MSKanji_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	x25, [x2]
	cbz	x25, LBB0_4
; %bb.1:
	mov	x23, x3
	mov	x22, x2
	mov	x21, x1
	ldr	w24, [x20]
	cbz	w24, LBB0_5
; %bb.2:
	cmp	w24, #1
	b.ne	LBB0_14
; %bb.3:
	ldr	x26, [x20, #8]
	b	LBB0_7
LBB0_4:
	mov	x1, x20
	bl	__citrus_MSKanji_init_state
	mov	w0, #0
	str	xzr, [x19]
	b	LBB0_20
LBB0_5:
	cbz	x23, LBB0_15
; %bb.6:
	ldrsb	w8, [x25], #1
	ldr	x26, [x20, #8]
	str	w8, [x26]
	mov	w8, #1
	str	w8, [x20]
	sub	x23, x23, #1
LBB0_7:
	ldrb	w0, [x26]
	bl	__mskanji1
	cmp	x0, #0
	mov	w8, #1
	cinc	w27, w8, ne
	cbz	x0, LBB0_16
; %bb.8:
	mov	w8, #1
LBB0_9:                                 ; =>This Inner Loop Header: Depth=1
	cbz	x23, LBB0_15
; %bb.10:                               ;   in Loop: Header=BB0_9 Depth=1
	ldrsb	w9, [x25], #1
	str	w9, [x26, w8, sxtw #2]
	ldr	w8, [x20]
	add	w8, w8, #1
	str	w8, [x20]
	sub	x23, x23, #1
	cmp	w8, w27
	b.lt	LBB0_9
; %bb.11:
	str	x25, [x22]
	cbz	x0, LBB0_17
; %bb.12:
	ldrb	w0, [x26, #4]
	bl	__mskanji2
	cbz	w0, LBB0_14
; %bb.13:
	ldr	w9, [x26]
	ldrb	w8, [x26, #4]
	bfi	w8, w9, #8, #8
	str	wzr, [x20]
	cbnz	x21, LBB0_18
	b	LBB0_19
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_20
LBB0_15:
	mov	w0, #0
	mov	x8, #-2
	str	x8, [x19]
	str	x25, [x22]
	b	LBB0_20
LBB0_16:
	str	x25, [x22]
LBB0_17:
	ldrb	w8, [x26]
	str	wzr, [x20]
	cbz	x21, LBB0_19
LBB0_18:
	str	w8, [x21]
LBB0_19:
	mov	w0, #0
	sub	w9, w27, w24
	cmp	w8, #0
	csel	w8, wzr, w9, eq
	sxtw	x8, w8
	str	x8, [x19]
LBB0_20:
	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_MSKanji_mbrtowc_priv
.subsections_via_symbols
