	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_wind_ucs2utf8                  ## -- Begin function wind_ucs2utf8
	.p2align	4, 0x90
_wind_ucs2utf8:                         ## @wind_ucs2utf8
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r14
	pushq	%rbx
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	xorl	%r10d, %r10d
	testq	%rsi, %rsi
	je	LBB0_14
## %bb.1:
	movl	$1, %r8d
	movq	_first_char@GOTPCREL(%rip), %r9
	xorl	%r11d, %r11d
	jmp	LBB0_2
	.p2align	4, 0x90
LBB0_3:                                 ##   in Loop: Header=BB0_2 Depth=1
	xorl	%edx, %edx
LBB0_13:                                ##   in Loop: Header=BB0_2 Depth=1
	incq	%r11
	cmpq	%r11, %rsi
	je	LBB0_14
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	movl	(%rdi,%r11,4), %r14d
	xorl	%eax, %eax
	cmpl	$2048, %r14d                    ## imm = 0x800
	setl	%al
	xorq	$3, %rax
	cmpl	$128, %r14d
	cmovlq	%r8, %rax
	addq	%rax, %r10
	testq	%rdx, %rdx
	je	LBB0_3
## %bb.4:                               ##   in Loop: Header=BB0_2 Depth=1
	cmpq	(%rcx), %r10
	jae	LBB0_5
## %bb.6:                               ##   in Loop: Header=BB0_2 Depth=1
	cmpl	$1, %eax
	je	LBB0_11
## %bb.7:                               ##   in Loop: Header=BB0_2 Depth=1
	cmpl	$2, %eax
	je	LBB0_10
## %bb.8:                               ##   in Loop: Header=BB0_2 Depth=1
	cmpl	$3, %eax
	jne	LBB0_12
## %bb.9:                               ##   in Loop: Header=BB0_2 Depth=1
	movl	%r14d, %ebx
	andb	$63, %bl
	orb	$-128, %bl
	movb	%bl, 2(%rdx)
	sarl	$6, %r14d
LBB0_10:                                ##   in Loop: Header=BB0_2 Depth=1
	movl	%r14d, %ebx
	andb	$63, %bl
	orb	$-128, %bl
	movb	%bl, 1(%rdx)
	sarl	$6, %r14d
LBB0_11:                                ##   in Loop: Header=BB0_2 Depth=1
	movq	(%r9), %rbx
	orl	-4(%rbx,%rax,4), %r14d
	movb	%r14b, (%rdx)
LBB0_12:                                ##   in Loop: Header=BB0_2 Depth=1
	addq	%rax, %rdx
	jmp	LBB0_13
LBB0_14:
	testq	%rdx, %rdx
	je	LBB0_17
## %bb.15:
	cmpq	(%rcx), %r10
	jae	LBB0_5
## %bb.16:
	movb	$0, (%rdx)
LBB0_17:
	movq	%r10, (%rcx)
	xorl	%eax, %eax
	jmp	LBB0_18
LBB0_5:
	movq	_WIND_ERR_OVERRUN@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
LBB0_18:
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_WIND_ERR_OVERRUN,4,2           ## @WIND_ERR_OVERRUN
	.comm	_first_char,8,3                 ## @first_char
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_wind_ucs2utf8                  ; -- Begin function wind_ucs2utf8
	.p2align	2
_wind_ucs2utf8:                         ; @wind_ucs2utf8
	.cfi_startproc
; %bb.0:
	mov	x8, #0
	cbz	x1, LBB0_12
; %bb.1:
	mov	w9, #2
Lloh0:
	adrp	x10, _first_char@GOTPAGE
Lloh1:
	ldr	x10, [x10, _first_char@GOTPAGEOFF]
	b	LBB0_6
LBB0_2:                                 ;   in Loop: Header=BB0_6 Depth=1
	mov	w13, #128
	bfxil	w13, w11, #0, #6
	strb	w13, [x2, #1]
	asr	w11, w11, #6
LBB0_3:                                 ;   in Loop: Header=BB0_6 Depth=1
	ldr	x13, [x10]
	add	x13, x13, x12, lsl #2
	ldur	w13, [x13, #-4]
	orr	w11, w13, w11
	strb	w11, [x2]
LBB0_4:                                 ;   in Loop: Header=BB0_6 Depth=1
	add	x2, x2, x12
LBB0_5:                                 ;   in Loop: Header=BB0_6 Depth=1
	add	x0, x0, #4
	subs	x1, x1, #1
	b.eq	LBB0_12
LBB0_6:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w11, [x0]
	cmp	w11, #2048
	cinc	x12, x9, ge
	cmp	w11, #128
	csinc	x12, x12, xzr, ge
	add	x8, x12, x8
	cbz	x2, LBB0_5
; %bb.7:                                ;   in Loop: Header=BB0_6 Depth=1
	ldr	x13, [x3]
	cmp	x8, x13
	b.hs	LBB0_16
; %bb.8:                                ;   in Loop: Header=BB0_6 Depth=1
	cmp	x12, #1
	b.eq	LBB0_3
; %bb.9:                                ;   in Loop: Header=BB0_6 Depth=1
	cmp	x12, #2
	b.eq	LBB0_2
; %bb.10:                               ;   in Loop: Header=BB0_6 Depth=1
	cmp	x12, #3
	b.ne	LBB0_4
; %bb.11:                               ;   in Loop: Header=BB0_6 Depth=1
	mov	w13, #128
	bfxil	w13, w11, #0, #6
	strb	w13, [x2, #2]
	asr	w11, w11, #6
	b	LBB0_2
LBB0_12:
	cbz	x2, LBB0_15
; %bb.13:
	ldr	x9, [x3]
	cmp	x8, x9
	b.hs	LBB0_16
; %bb.14:
	strb	wzr, [x2]
LBB0_15:
	mov	w0, #0
	str	x8, [x3]
	ret
LBB0_16:
Lloh2:
	adrp	x8, _WIND_ERR_OVERRUN@GOTPAGE
Lloh3:
	ldr	x8, [x8, _WIND_ERR_OVERRUN@GOTPAGEOFF]
Lloh4:
	ldr	w0, [x8]
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.cfi_endproc
                                        ; -- End function
	.comm	_WIND_ERR_OVERRUN,4,2           ; @WIND_ERR_OVERRUN
	.comm	_first_char,8,3                 ; @first_char
.subsections_via_symbols
