	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function _citrus_HZ_wcrtomb_priv
__citrus_HZ_wcrtomb_priv:               ## @_citrus_HZ_wcrtomb_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	$72, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	cmpq	$0, (%r8)
	je	LBB0_4
LBB0_1:
	movq	_EINVAL@GOTPCREL(%rip), %rax
LBB0_2:
	movl	(%rax), %eax
LBB0_3:
	addq	$72, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_4:
	movq	%r8, %r13
	movq	16(%r8), %rax
	movq	%rax, -56(%rbp)                 ## 8-byte Spill
	testq	%rax, %rax
	je	LBB0_1
## %bb.5:
	movl	%ecx, %ebx
	movq	%rdx, %r12
	movl	%ecx, %r10d
	andl	$128, %r10d
	movl	%ecx, %r8d
	andl	$-129, %r8d
	cmpl	$31, %r8d
	movq	%r9, -88(%rbp)                  ## 8-byte Spill
	movq	%rsi, -104(%rbp)                ## 8-byte Spill
	jg	LBB0_8
## %bb.6:
	xorl	%ebx, %ebx
	testl	%r10d, %r10d
	sete	%bl
	movl	%r10d, %r15d
	movl	%r8d, %r14d
	movq	%r13, -64(%rbp)                 ## 8-byte Spill
	movq	%rdi, %r13
	callq	_INIT0
	movq	%r13, %rdi
	movq	-64(%rbp), %r13                 ## 8-byte Reload
	cmpq	$0, (%rax,%rbx,8)
	je	LBB0_38
## %bb.7:
	movl	%r14d, %r8d
	movl	%r15d, %r10d
	movq	%rax, %r14
	movq	%r12, -48(%rbp)                 ## 8-byte Spill
	movq	_ranges@GOTPCREL(%rip), %rax
	movq	_CTRL@GOTPCREL(%rip), %rcx
	movq	(%rcx), %r12
	shlq	$3, %r12
	addq	(%rax), %r12
	movl	$1, %r15d
	jmp	LBB0_17
LBB0_8:
	cmpl	$127, %r8d
	ja	LBB0_10
## %bb.9:
	movq	8(%rdi), %rax
	testq	%rax, %rax
	jne	LBB0_12
	jmp	LBB0_38
LBB0_10:
	cmpl	$32639, %r8d                    ## imm = 0x7F7F
	ja	LBB0_13
## %bb.11:
	movq	(%rdi), %rax
	testq	%rax, %rax
	je	LBB0_38
LBB0_12:
	movq	%r12, -48(%rbp)                 ## 8-byte Spill
	movq	16(%rax), %r14
	movq	_ranges@GOTPCREL(%rip), %rcx
	movq	(%rax), %r15
	movq	8(%rax), %r12
	shlq	$3, %r12
	addq	(%rcx), %r12
	jmp	LBB0_17
LBB0_13:
	movl	%ebx, %r14d
	shrl	$24, %r14d
	movl	%r10d, -64(%rbp)                ## 4-byte Spill
	movq	%rdi, %r15
	callq	_E0SET
	movl	%eax, %edi
	movl	%r14d, -48(%rbp)                ## 4-byte Spill
	movl	%r14d, %esi
	callq	_find_escape
	movq	%r15, %rdi
	movl	-64(%rbp), %r10d                ## 4-byte Reload
	movq	%rax, %r14
	testq	%rax, %rax
	jne	LBB0_15
## %bb.14:
	callq	_E1SET
	movl	%eax, %edi
	movl	-48(%rbp), %esi                 ## 4-byte Reload
	callq	_find_escape
	movq	%r15, %rdi
	movl	-64(%rbp), %r10d                ## 4-byte Reload
	movq	%rax, %r14
	testq	%rax, %rax
	je	LBB0_38
LBB0_15:
	xorl	%eax, %eax
	testl	%r10d, %r10d
	sete	%al
	movq	(%r14,%rax,8), %rax
	testq	%rax, %rax
	je	LBB0_38
## %bb.16:
	movq	%r12, -48(%rbp)                 ## 8-byte Spill
	andl	$16777087, %ebx                 ## imm = 0xFFFF7F
	movq	_ranges@GOTPCREL(%rip), %rcx
	movq	(%rax), %r15
	movq	8(%rax), %r12
	shlq	$3, %r12
	addq	(%rcx), %r12
	movl	%ebx, %r8d
LBB0_17:
	movq	-56(%rbp), %rbx                 ## 8-byte Reload
	cmpq	%r14, %rbx
	je	LBB0_21
## %bb.18:
	movl	%r8d, -76(%rbp)                 ## 4-byte Spill
	movl	%r10d, -64(%rbp)                ## 4-byte Spill
	callq	_INIT0
	movq	%rax, -96(%rbp)                 ## 8-byte Spill
	movq	%rbx, %rdi
	callq	_SET
	movq	%rax, %rbx
	movq	%r14, %rdi
	callq	_SET
	cmpq	%rax, %rbx
	movq	%r14, -72(%rbp)                 ## 8-byte Spill
	jne	LBB0_22
## %bb.19:
	movq	-56(%rbp), %rbx                 ## 8-byte Reload
	movq	%rbx, %rdi
	callq	_INIT
	movq	-96(%rbp), %rdi                 ## 8-byte Reload
	cmpq	%rdi, %rax
	jne	LBB0_29
## %bb.26:
	movq	%rbx, %rax
	xorl	%ebx, %ebx
	cmpq	%rdi, %rax
	je	LBB0_30
## %bb.27:
	cmpq	%rdi, -72(%rbp)                 ## 8-byte Folded Reload
	jne	LBB0_23
	jmp	LBB0_30
LBB0_21:
	xorl	%ebx, %ebx
	movq	-48(%rbp), %r14                 ## 8-byte Reload
	cmpq	%r15, %r14
	jb	LBB0_32
	jmp	LBB0_33
LBB0_22:
	movq	%r14, %rdi
	callq	_INIT
	movq	%rax, %rdi
	cmpq	%rax, %r14
	je	LBB0_29
LBB0_23:
	testq	%rdi, %rdi
	je	LBB0_29
## %bb.24:
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	cmpq	$1, %rax
	jbe	LBB0_32
## %bb.25:
	addq	$-2, %rax
	movq	%rax, -48(%rbp)                 ## 8-byte Spill
	movq	_ESCAPE_CHAR@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movq	8(%r13), %rbx
	movl	%eax, (%rbx)
	callq	_ESC
	movq	$2, (%r13)
	movl	%eax, 4(%rbx)
	movl	$2, %ebx
	jmp	LBB0_30
LBB0_29:
	xorl	%ebx, %ebx
LBB0_30:
	movq	-48(%rbp), %r14                 ## 8-byte Reload
	cmpq	$1, %r14
	jbe	LBB0_32
## %bb.31:
	addq	$-2, %r14
	movq	_ESCAPE_CHAR@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movq	8(%r13), %rcx
	movq	%rcx, -56(%rbp)                 ## 8-byte Spill
	leaq	(,%rbx,4), %rdx
	movq	%rdx, -48(%rbp)                 ## 8-byte Spill
	movl	%eax, (%rcx,%rbx,4)
	movq	-72(%rbp), %rdi                 ## 8-byte Reload
	callq	_ESC
	addq	$2, %rbx
	movq	%rbx, (%r13)
	movq	-48(%rbp), %rcx                 ## 8-byte Reload
	orq	$4, %rcx
	movq	-56(%rbp), %rdx                 ## 8-byte Reload
	movl	%eax, (%rdx,%rcx)
	movq	-72(%rbp), %rax                 ## 8-byte Reload
	movq	%rax, 16(%r13)
	movl	-64(%rbp), %r10d                ## 4-byte Reload
	movl	-76(%rbp), %r8d                 ## 4-byte Reload
	cmpq	%r15, %r14
	jae	LBB0_33
LBB0_32:
	movq	_E2BIG@GOTPCREL(%rip), %rax
	jmp	LBB0_2
LBB0_33:
	testq	%r15, %r15
	je	LBB0_39
## %bb.34:
	leal	-8(,%r15,8), %ecx
	movq	%rbx, %rax
	.p2align	4, 0x90
LBB0_35:                                ## =>This Inner Loop Header: Depth=1
	movl	%r8d, %edx
	sarl	%cl, %edx
	movzbl	%dl, %edx
	cmpl	%edx, (%r12)
	jg	LBB0_38
## %bb.36:                              ##   in Loop: Header=BB0_35 Depth=1
	cmpl	%edx, 4(%r12)
	jl	LBB0_38
## %bb.37:                              ##   in Loop: Header=BB0_35 Depth=1
	decq	%r15
	orl	%r10d, %edx
	movq	8(%r13), %rsi
	leaq	1(%rax), %rbx
	movq	%rbx, (%r13)
	movl	%edx, (%rsi,%rax,4)
	addl	$-8, %ecx
	movq	%rbx, %rax
	testq	%r15, %r15
	jne	LBB0_35
	jmp	LBB0_40
LBB0_38:
	movq	-88(%rbp), %rax                 ## 8-byte Reload
	movq	$-1, (%rax)
	movq	_EILSEQ@GOTPCREL(%rip), %rax
	jmp	LBB0_2
LBB0_39:
	movq	8(%r13), %rsi
LBB0_40:
	movq	-104(%rbp), %rdi                ## 8-byte Reload
	movq	%rbx, %rdx
	callq	_memcpy
	movq	-88(%rbp), %rax                 ## 8-byte Reload
	movq	%rbx, (%rax)
	movq	$0, (%r13)
	xorl	%eax, %eax
	jmp	LBB0_3
	.cfi_endproc
                                        ## -- End function
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_ranges,8,3                     ## @ranges
	.comm	_CTRL,8,3                       ## @CTRL
	.comm	_E2BIG,4,2                      ## @E2BIG
	.comm	_ESCAPE_CHAR,8,3                ## @ESCAPE_CHAR
	.comm	_EILSEQ,4,2                     ## @EILSEQ
	.no_dead_strip	__citrus_HZ_wcrtomb_priv
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function _citrus_HZ_wcrtomb_priv
__citrus_HZ_wcrtomb_priv:               ; @_citrus_HZ_wcrtomb_priv
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	stp	x28, x27, [sp, #16]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #32]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #48]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #64]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #80]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #96]             ; 16-byte Folded Spill
	add	x29, sp, #96
	.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
	ldr	x8, [x4]
	cbz	x8, LBB0_4
LBB0_1:
Lloh0:
	adrp	x8, _EINVAL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
LBB0_2:
	ldr	w0, [x8]
LBB0_3:
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #48]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #32]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #112
	ret
LBB0_4:
	mov	x20, x4
	ldr	x24, [x4, #16]
	cbz	x24, LBB0_1
; %bb.5:
	mov	x19, x5
	mov	x26, x3
	mov	x22, x2
	mov	x25, x0
	and	w11, w3, #0x80
	and	w27, w3, #0xffffff7f
	cmp	w27, #31
	str	x1, [sp, #8]                    ; 8-byte Folded Spill
	b.gt	LBB0_9
; %bb.6:
	cmp	w11, #0
	cset	w21, eq
	mov	x0, x25
	mov	x23, x11
	bl	_INIT0
	ldr	x8, [x0, w21, uxtw #3]
	cbz	x8, LBB0_37
; %bb.7:
	mov	x11, x23
	mov	x23, x0
Lloh2:
	adrp	x8, _ranges@GOTPAGE
Lloh3:
	ldr	x8, [x8, _ranges@GOTPAGEOFF]
Lloh4:
	ldr	x8, [x8]
Lloh5:
	adrp	x9, _CTRL@GOTPAGE
Lloh6:
	ldr	x9, [x9, _CTRL@GOTPAGEOFF]
Lloh7:
	ldr	x9, [x9]
	add	x21, x8, x9, lsl #3
	mov	w28, #1
	cmp	x24, x23
	b.ne	LBB0_19
LBB0_8:
	mov	x24, #0
	cmp	x22, x28
	b.lo	LBB0_30
	b	LBB0_31
LBB0_9:
	cmp	w27, #127
	b.hi	LBB0_11
; %bb.10:
	ldr	x8, [x25, #8]
	cbnz	x8, LBB0_13
	b	LBB0_37
LBB0_11:
	lsr	w8, w27, #7
	cmp	w8, #254
	b.hi	LBB0_14
; %bb.12:
	ldr	x8, [x25]
	cbz	x8, LBB0_37
LBB0_13:
	ldr	x23, [x8, #16]
	b	LBB0_18
LBB0_14:
	lsr	w27, w26, #24
	mov	x0, x25
	mov	x21, x11
	bl	_E0SET
	mov	x1, x27
	bl	_find_escape
	mov	x11, x21
	mov	x23, x0
	cbnz	x0, LBB0_16
; %bb.15:
	mov	x0, x25
	bl	_E1SET
	mov	x1, x27
	bl	_find_escape
	mov	x11, x21
	mov	x23, x0
	cbz	x0, LBB0_37
LBB0_16:
	cmp	w11, #0
	cset	w8, eq
	ldr	x8, [x23, w8, uxtw #3]
	cbz	x8, LBB0_37
; %bb.17:
	and	w9, w26, #0xffffff
	and	w27, w9, #0xffffff7f
LBB0_18:
Lloh8:
	adrp	x9, _ranges@GOTPAGE
Lloh9:
	ldr	x9, [x9, _ranges@GOTPAGEOFF]
Lloh10:
	ldr	x9, [x9]
	ldp	x28, x10, [x8]
	add	x21, x9, x10, lsl #3
	cmp	x24, x23
	b.eq	LBB0_8
LBB0_19:
	str	w11, [sp, #4]                   ; 4-byte Folded Spill
	mov	x0, x25
	bl	_INIT0
	mov	x25, x0
	mov	x0, x24
	bl	_SET
	mov	x26, x0
	mov	x0, x23
	bl	_SET
	cmp	x26, x0
	b.ne	LBB0_23
; %bb.20:
	mov	x0, x24
	bl	_INIT
	cmp	x0, x25
	b.ne	LBB0_27
; %bb.21:
	mov	x9, #0
	cmp	x24, x25
	b.eq	LBB0_28
; %bb.22:
	cmp	x23, x25
	b.ne	LBB0_24
	b	LBB0_28
LBB0_23:
	mov	x0, x23
	bl	_INIT
	mov	x25, x0
	cmp	x23, x0
	b.eq	LBB0_27
LBB0_24:
	cbz	x25, LBB0_27
; %bb.25:
	cmp	x22, #1
	b.ls	LBB0_30
; %bb.26:
	sub	x22, x22, #2
Lloh11:
	adrp	x8, _ESCAPE_CHAR@GOTPAGE
Lloh12:
	ldr	x8, [x8, _ESCAPE_CHAR@GOTPAGEOFF]
Lloh13:
	ldr	x8, [x8]
	ldr	x24, [x20, #8]
	str	w8, [x24]
	mov	x0, x25
	bl	_ESC
	mov	w9, #2
	str	x9, [x20]
	str	w0, [x24, #4]
	b	LBB0_28
LBB0_27:
	mov	x9, #0
LBB0_28:
	cmp	x22, #1
	b.ls	LBB0_30
; %bb.29:
Lloh14:
	adrp	x8, _ESCAPE_CHAR@GOTPAGE
Lloh15:
	ldr	x8, [x8, _ESCAPE_CHAR@GOTPAGEOFF]
	sub	x22, x22, #2
Lloh16:
	ldr	x8, [x8]
	ldr	x25, [x20, #8]
	lsl	x26, x9, #2
	str	w8, [x25, x26]
	mov	x0, x23
	mov	x24, x9
	bl	_ESC
	add	x24, x24, #2
	str	x24, [x20]
	orr	x8, x26, #0x4
	str	w0, [x25, x8]
	str	x23, [x20, #16]
	ldr	w11, [sp, #4]                   ; 4-byte Folded Reload
	cmp	x22, x28
	b.hs	LBB0_31
LBB0_30:
Lloh17:
	adrp	x8, _E2BIG@GOTPAGE
Lloh18:
	ldr	x8, [x8, _E2BIG@GOTPAGEOFF]
	b	LBB0_2
LBB0_31:
	cbz	x28, LBB0_38
; %bb.32:
	lsl	w8, w28, #3
	sub	w8, w8, #8
LBB0_33:                                ; =>This Inner Loop Header: Depth=1
	asr	w9, w27, w8
	and	w9, w9, #0xff
	ldr	w10, [x21]
	cmp	w10, w9
	b.gt	LBB0_37
; %bb.34:                               ;   in Loop: Header=BB0_33 Depth=1
	ldr	w10, [x21, #4]
	cmp	w10, w9
	b.lt	LBB0_37
; %bb.35:                               ;   in Loop: Header=BB0_33 Depth=1
	orr	w10, w9, w11
	ldr	x1, [x20, #8]
	add	x9, x24, #1
	str	x9, [x20]
	str	w10, [x1, x24, lsl #2]
	sub	w8, w8, #8
	mov	x24, x9
	sub	x28, x28, #1
	cbnz	x28, LBB0_33
; %bb.36:
	mov	x24, x9
	b	LBB0_39
LBB0_37:
	mov	x8, #-1
	str	x8, [x19]
Lloh19:
	adrp	x8, _EILSEQ@GOTPAGE
Lloh20:
	ldr	x8, [x8, _EILSEQ@GOTPAGEOFF]
	b	LBB0_2
LBB0_38:
	ldr	x1, [x20, #8]
LBB0_39:
	ldr	x0, [sp, #8]                    ; 8-byte Folded Reload
	mov	x2, x24
	bl	_memcpy
	mov	w0, #0
	str	x24, [x19]
	str	xzr, [x20]
	b	LBB0_3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGot	Lloh17, Lloh18
	.loh AdrpLdrGot	Lloh19, Lloh20
	.cfi_endproc
                                        ; -- End function
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_ranges,8,3                     ; @ranges
	.comm	_CTRL,8,3                       ; @CTRL
	.comm	_E2BIG,4,2                      ; @E2BIG
	.comm	_ESCAPE_CHAR,8,3                ; @ESCAPE_CHAR
	.comm	_EILSEQ,4,2                     ; @EILSEQ
	.no_dead_strip	__citrus_HZ_wcrtomb_priv
.subsections_via_symbols
