	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function _citrus_JOHAB_mbrtowc_priv
__citrus_JOHAB_mbrtowc_priv:            ## @_citrus_JOHAB_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	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%r9, %r14
	movq	%r8, %rbx
	movq	(%rdx), %r13
	testq	%r13, %r13
	je	LBB0_1
## %bb.2:
	movq	%rdx, %r15
	movq	%rsi, %r12
	movl	(%rbx), %eax
	cmpl	$1, %eax
	je	LBB0_9
## %bb.3:
	testl	%eax, %eax
	jne	LBB0_10
## %bb.4:
	subq	$1, %rcx
	jb	LBB0_14
## %bb.5:
	leaq	1(%r13), %rdx
	movzbl	(%r13), %edi
	testb	%dil, %dil
	js	LBB0_11
## %bb.6:
	testq	%r12, %r12
	je	LBB0_8
## %bb.7:
	movq	%rdi, (%r12)
LBB0_8:
	xorl	%eax, %eax
	testq	%rdi, %rdi
	setne	%al
	movq	%rax, (%r14)
	movq	%rdx, (%r15)
	jmp	LBB0_22
LBB0_1:
	movq	%rbx, %rsi
	callq	__citrus_JOHAB_init_state
	movq	__ENCODING_IS_STATE_DEPENDENT@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, (%r14)
	jmp	LBB0_22
LBB0_9:
	movq	8(%rbx), %rax
	movzbl	(%rax), %edi
	movq	%r13, %rdx
	testq	%rcx, %rcx
	je	LBB0_13
LBB0_15:
	movq	%rdx, -64(%rbp)                 ## 8-byte Spill
	movzbl	(%rdx), %esi
	movq	%rdi, -48(%rbp)                 ## 8-byte Spill
                                        ## kill: def $edi killed $edi killed $rdi
	movq	%rsi, -56(%rbp)                 ## 8-byte Spill
                                        ## kill: def $esi killed $esi killed $rsi
	callq	_ishangul
	testl	%eax, %eax
	jne	LBB0_19
## %bb.16:
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
                                        ## kill: def $edi killed $edi killed $rdi
	movq	-56(%rbp), %rsi                 ## 8-byte Reload
                                        ## kill: def $esi killed $esi killed $rsi
	callq	_isuda
	testl	%eax, %eax
	jne	LBB0_19
## %bb.17:
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
                                        ## kill: def $edi killed $edi killed $rdi
	movq	-56(%rbp), %rsi                 ## 8-byte Reload
                                        ## kill: def $esi killed $esi killed $rsi
	callq	_ishanja
	testl	%eax, %eax
	je	LBB0_18
LBB0_19:
	movq	-56(%rbp), %rdx                 ## 8-byte Reload
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	movq	-64(%rbp), %rcx                 ## 8-byte Reload
	incq	%rcx
	testq	%r12, %r12
	je	LBB0_21
## %bb.20:
	movl	%eax, %eax
	shlq	$8, %rax
	orq	%rdx, %rax
	movq	%rax, (%r12)
LBB0_21:
	movq	%rcx, %rax
	subq	%r13, %rax
	movq	%rax, (%r14)
	movq	%rcx, (%r15)
	movl	$0, (%rbx)
	jmp	LBB0_22
LBB0_10:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	jmp	LBB0_23
LBB0_11:
	movq	8(%rbx), %rax
	movl	$1, (%rbx)
	movl	%edi, (%rax)
	testq	%rcx, %rcx
	jne	LBB0_15
LBB0_13:
	movq	%rdx, %r13
LBB0_14:
	movq	$-2, (%r14)
	movq	%r13, (%r15)
LBB0_22:
	xorl	%eax, %eax
LBB0_23:
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_18:
	movq	$-1, (%r14)
	movq	_EILSEQ@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	jmp	LBB0_23
	.cfi_endproc
                                        ## -- End function
	.comm	__ENCODING_IS_STATE_DEPENDENT,8,3 ## @_ENCODING_IS_STATE_DEPENDENT
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_EILSEQ,4,2                     ## @EILSEQ
	.no_dead_strip	__citrus_JOHAB_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_JOHAB_mbrtowc_priv
__citrus_JOHAB_mbrtowc_priv:            ; @_citrus_JOHAB_mbrtowc_priv
	.cfi_startproc
; %bb.0:
	stp	x26, x25, [sp, #-80]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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
	mov	x19, x5
	mov	x21, x4
	ldr	x25, [x2]
	cbz	x25, LBB0_8
; %bb.1:
	mov	x20, x2
	mov	x22, x1
	ldr	w8, [x21]
	cmp	w8, #1
	b.eq	LBB0_9
; %bb.2:
	cbnz	w8, LBB0_16
; %bb.3:
	cbz	x3, LBB0_19
; %bb.4:
	mov	x26, x25
	ldrsb	w8, [x26], #1
	tbnz	w8, #31, LBB0_17
; %bb.5:
	and	x8, x8, #0xff
	cbz	x22, LBB0_7
; %bb.6:
	str	x8, [x22]
LBB0_7:
	mov	w0, #0
	cmp	w8, #0
	cset	w8, ne
	str	x8, [x19]
	str	x26, [x20]
	b	LBB0_20
LBB0_8:
	mov	x1, x21
	bl	__citrus_JOHAB_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_20
LBB0_9:
	ldr	x8, [x21, #8]
	ldrb	w23, [x8]
	mov	x26, x25
	cbz	x3, LBB0_18
LBB0_10:
	ldrb	w24, [x26], #1
	mov	x0, x23
	mov	x1, x24
	bl	_ishangul
	cbnz	w0, LBB0_13
; %bb.11:
	mov	x0, x23
	mov	x1, x24
	bl	_isuda
	cbnz	w0, LBB0_13
; %bb.12:
	mov	x0, x23
	mov	x1, x24
	bl	_ishanja
	cbz	w0, LBB0_21
LBB0_13:
	cbz	x22, LBB0_15
; %bb.14:
	mov	w8, w23
	bfi	x24, x8, #8, #8
	str	x24, [x22]
LBB0_15:
	mov	w0, #0
	sub	x8, x26, x25
	str	x8, [x19]
	str	x26, [x20]
	str	wzr, [x21]
	b	LBB0_20
LBB0_16:
Lloh3:
	adrp	x8, _EINVAL@GOTPAGE
Lloh4:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh5:
	ldr	w0, [x8]
	b	LBB0_20
LBB0_17:
	sub	x3, x3, #1
	and	w23, w8, #0xff
	ldr	x8, [x21, #8]
	mov	w9, #1
	str	w9, [x21]
	str	w23, [x8]
	cbnz	x3, LBB0_10
LBB0_18:
	mov	x25, x26
LBB0_19:
	mov	w0, #0
	mov	x8, #-2
	str	x8, [x19]
	str	x25, [x20]
LBB0_20:
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	ret
LBB0_21:
	mov	x8, #-1
	str	x8, [x19]
Lloh6:
	adrp	x8, _EILSEQ@GOTPAGE
Lloh7:
	ldr	x8, [x8, _EILSEQ@GOTPAGEOFF]
Lloh8:
	ldr	w0, [x8]
	b	LBB0_20
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.cfi_endproc
                                        ; -- End function
	.comm	__ENCODING_IS_STATE_DEPENDENT,8,3 ; @_ENCODING_IS_STATE_DEPENDENT
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_EILSEQ,4,2                     ; @EILSEQ
	.no_dead_strip	__citrus_JOHAB_mbrtowc_priv
.subsections_via_symbols
