	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function _citrus_GBK2K_mbrtowc_priv
__citrus_GBK2K_mbrtowc_priv:            ## @_citrus_GBK2K_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	%rdi, -72(%rbp)                 ## 8-byte Spill
	movq	(%rdx), %r14
	testq	%r14, %r14
	je	LBB0_21
## %bb.1:
	movq	%rsi, -56(%rbp)                 ## 8-byte Spill
	movq	%r9, -48(%rbp)                  ## 8-byte Spill
	movq	%r8, -64(%rbp)                  ## 8-byte Spill
	movl	(%r8), %r12d
	cmpq	$3, %r12
	ja	LBB0_19
## %bb.2:
	movq	%rcx, %rbx
	movq	%rdx, %r13
	leaq	LJTI0_0(%rip), %rax
	movslq	(%rax,%r12,4), %rcx
	addq	%rax, %rcx
	jmpq	*%rcx
LBB0_3:
	movq	__PSENC@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	__mb_leadbyte
	testl	%eax, %eax
	je	LBB0_19
LBB0_4:
	movq	__PSENC@GOTPCREL(%rip), %r15
	movl	(%r15), %edi
	callq	__mb_surrogate
	testl	%eax, %eax
	je	LBB0_19
## %bb.5:
	movl	(%r15), %edi
	callq	__mb_trailbyte
	testl	%eax, %eax
	jne	LBB0_19
LBB0_6:
	movq	__PSENC@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	__mb_leadbyte
	testl	%eax, %eax
	je	LBB0_19
LBB0_7:
	testq	%rbx, %rbx
	je	LBB0_18
## %bb.8:
	movq	__PSENC@GOTPCREL(%rip), %r15
	jmp	LBB0_10
	.p2align	4, 0x90
LBB0_9:                                 ##   in Loop: Header=BB0_10 Depth=1
	movl	(%r15), %edi
	callq	__mb_leadbyte
	testl	%eax, %eax
	je	LBB0_24
LBB0_17:                                ##   in Loop: Header=BB0_10 Depth=1
	decq	%rbx
	incq	%r14
	testq	%rbx, %rbx
	je	LBB0_18
LBB0_10:                                ## =>This Inner Loop Header: Depth=1
	movsbl	(%r14), %edi
	callq	__PUSH_PSENC
	cmpl	$3, %r12d
	je	LBB0_9
## %bb.11:                              ##   in Loop: Header=BB0_10 Depth=1
	cmpl	$2, %r12d
	je	LBB0_14
## %bb.12:                              ##   in Loop: Header=BB0_10 Depth=1
	cmpl	$1, %r12d
	jne	LBB0_17
## %bb.13:                              ##   in Loop: Header=BB0_10 Depth=1
	movl	(%r15), %edi
	callq	__mb_singlebyte
	testl	%eax, %eax
	je	LBB0_9
	jmp	LBB0_25
	.p2align	4, 0x90
LBB0_14:                                ##   in Loop: Header=BB0_10 Depth=1
	movl	(%r15), %edi
	callq	__mb_trailbyte
	testl	%eax, %eax
	jne	LBB0_25
## %bb.15:                              ##   in Loop: Header=BB0_10 Depth=1
	movq	-72(%rbp), %rax                 ## 8-byte Reload
	cmpl	$4, (%rax)
	jne	LBB0_24
## %bb.16:                              ##   in Loop: Header=BB0_10 Depth=1
	movl	(%r15), %edi
	callq	__mb_surrogate
	testl	%eax, %eax
	jne	LBB0_17
LBB0_24:
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	movq	$-1, (%rax)
	movq	_EILSEQ@GOTPCREL(%rip), %rax
	jmp	LBB0_20
LBB0_19:
	movq	_EINVAL@GOTPCREL(%rip), %rax
LBB0_20:
	movl	(%rax), %eax
	jmp	LBB0_23
LBB0_21:
	movl	$0, (%r8)
	movq	$0, (%r9)
	jmp	LBB0_22
LBB0_18:
	movq	%r14, (%r13)
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	movq	$-2, (%rax)
LBB0_22:
	xorl	%eax, %eax
LBB0_23:
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_25:
	movq	-64(%rbp), %rsi                 ## 8-byte Reload
	movq	8(%rsi), %rax
	incl	%r12d
	incq	%r14
	xorl	%ecx, %ecx
	.p2align	4, 0x90
LBB0_26:                                ## =>This Inner Loop Header: Depth=1
	movl	%ecx, %edx
	shll	$8, %edx
	movzbl	(%rax), %ecx
	incq	%rax
	orl	%edx, %ecx
	decl	%r12d
	cmpl	$1, %r12d
	ja	LBB0_26
## %bb.27:
	movq	-56(%rbp), %rdx                 ## 8-byte Reload
	testq	%rdx, %rdx
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	je	LBB0_29
## %bb.28:
	movl	%ecx, (%rdx)
LBB0_29:
	movq	%r14, (%r13)
	movq	$0, (%rax)
	movl	$0, (%rsi)
	jmp	LBB0_22
	.cfi_endproc
	.p2align	2, 0x90
	.data_region jt32
.set L0_0_set_7, LBB0_7-LJTI0_0
.set L0_0_set_6, LBB0_6-LJTI0_0
.set L0_0_set_4, LBB0_4-LJTI0_0
.set L0_0_set_3, LBB0_3-LJTI0_0
LJTI0_0:
	.long	L0_0_set_7
	.long	L0_0_set_6
	.long	L0_0_set_4
	.long	L0_0_set_3
	.end_data_region
                                        ## -- End function
	.comm	__PSENC,4,2                     ## @_PSENC
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_EILSEQ,4,2                     ## @EILSEQ
	.no_dead_strip	__citrus_GBK2K_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_GBK2K_mbrtowc_priv
__citrus_GBK2K_mbrtowc_priv:            ; @_citrus_GBK2K_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_21
; %bb.1:
	ldr	w25, [x20]
	cmp	w25, #3
	b.hi	LBB0_19
; %bb.2:
	mov	x23, x3
	mov	x21, x2
	mov	x22, x1
	mov	x24, x0
Lloh0:
	adrp	x8, lJTI0_0@PAGE
Lloh1:
	add	x8, x8, lJTI0_0@PAGEOFF
	adr	x9, LBB0_3
	ldrb	w10, [x8, x25]
	add	x9, x9, x10, lsl #2
	br	x9
LBB0_3:
Lloh2:
	adrp	x8, __PSENC@GOTPAGE
Lloh3:
	ldr	x8, [x8, __PSENC@GOTPAGEOFF]
Lloh4:
	ldr	w0, [x8]
	bl	__mb_leadbyte
	cbz	w0, LBB0_19
LBB0_4:
Lloh5:
	adrp	x27, __PSENC@GOTPAGE
Lloh6:
	ldr	x27, [x27, __PSENC@GOTPAGEOFF]
	ldr	w0, [x27]
	bl	__mb_surrogate
	cbz	w0, LBB0_19
; %bb.5:
	ldr	w0, [x27]
	bl	__mb_trailbyte
	cbnz	w0, LBB0_19
LBB0_6:
Lloh7:
	adrp	x8, __PSENC@GOTPAGE
Lloh8:
	ldr	x8, [x8, __PSENC@GOTPAGEOFF]
Lloh9:
	ldr	w0, [x8]
	bl	__mb_leadbyte
	cbz	w0, LBB0_19
LBB0_7:
	cbz	x23, LBB0_22
; %bb.8:
Lloh10:
	adrp	x28, __PSENC@GOTPAGE
Lloh11:
	ldr	x28, [x28, __PSENC@GOTPAGEOFF]
	mov	x27, x26
	b	LBB0_11
LBB0_9:                                 ;   in Loop: Header=BB0_11 Depth=1
	ldr	w0, [x28]
	bl	__mb_leadbyte
	cbz	w0, LBB0_18
LBB0_10:                                ;   in Loop: Header=BB0_11 Depth=1
	mov	x26, x27
	sub	x23, x23, #1
	cbz	x23, LBB0_23
LBB0_11:                                ; =>This Inner Loop Header: Depth=1
	ldrsb	w0, [x27], #1
	bl	__PUSH_PSENC
	cmp	w25, #3
	b.eq	LBB0_9
; %bb.12:                               ;   in Loop: Header=BB0_11 Depth=1
	cmp	w25, #2
	b.eq	LBB0_15
; %bb.13:                               ;   in Loop: Header=BB0_11 Depth=1
	cmp	w25, #1
	b.ne	LBB0_10
; %bb.14:                               ;   in Loop: Header=BB0_11 Depth=1
	ldr	w0, [x28]
	bl	__mb_singlebyte
	cbz	w0, LBB0_9
	b	LBB0_25
LBB0_15:                                ;   in Loop: Header=BB0_11 Depth=1
	ldr	w0, [x28]
	bl	__mb_trailbyte
	cbnz	w0, LBB0_25
; %bb.16:                               ;   in Loop: Header=BB0_11 Depth=1
	ldr	w8, [x24]
	cmp	w8, #4
	b.ne	LBB0_18
; %bb.17:                               ;   in Loop: Header=BB0_11 Depth=1
	ldr	w0, [x28]
	bl	__mb_surrogate
	cbnz	w0, LBB0_10
LBB0_18:
	mov	x8, #-1
	str	x8, [x19]
Lloh12:
	adrp	x8, _EILSEQ@GOTPAGE
Lloh13:
	ldr	x8, [x8, _EILSEQ@GOTPAGEOFF]
	b	LBB0_20
LBB0_19:
Lloh14:
	adrp	x8, _EINVAL@GOTPAGE
Lloh15:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
LBB0_20:
	ldr	w0, [x8]
	b	LBB0_24
LBB0_21:
	mov	w0, #0
	str	wzr, [x20]
	str	xzr, [x19]
	b	LBB0_24
LBB0_22:
	mov	x27, x26
LBB0_23:
	mov	w0, #0
	str	x27, [x21]
	mov	x8, #-2
	str	x8, [x19]
LBB0_24:
	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_25:
	mov	w9, #0
	ldr	x10, [x20, #8]
	add	w11, w25, #1
	add	x8, x26, #1
LBB0_26:                                ; =>This Inner Loop Header: Depth=1
	mov	x12, x9
	ldrb	w9, [x10], #1
	bfi	w9, w12, #8, #24
	sub	w11, w11, #1
	cmp	w11, #1
	b.hi	LBB0_26
; %bb.27:
	cbz	x22, LBB0_29
; %bb.28:
	str	w9, [x22]
LBB0_29:
	mov	w0, #0
	str	x8, [x21]
	str	xzr, [x19]
	str	wzr, [x20]
	b	LBB0_24
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh12, Lloh13
	.loh AdrpLdrGot	Lloh14, Lloh15
	.cfi_endproc
	.section	__TEXT,__const
lJTI0_0:
	.byte	(LBB0_7-LBB0_3)>>2
	.byte	(LBB0_6-LBB0_3)>>2
	.byte	(LBB0_4-LBB0_3)>>2
	.byte	(LBB0_3-LBB0_3)>>2
                                        ; -- End function
	.comm	__PSENC,4,2                     ; @_PSENC
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_EILSEQ,4,2                     ; @EILSEQ
	.no_dead_strip	__citrus_GBK2K_mbrtowc_priv
.subsections_via_symbols
