	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_wind_ucs2write                 ## -- Begin function wind_ucs2write
	.p2align	4, 0x90
_wind_ucs2write:                        ## @wind_ucs2write
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%rbx
	.cfi_offset %rbx, -24
	movq	(%r8), %r9
	testb	$1, %r9b
	jne	LBB0_1
## %bb.2:
	testq	%rsi, %rsi
	je	LBB0_3
## %bb.4:
	movl	(%rdx), %r10d
	movq	_WIND_RW_BOM@GOTPCREL(%rip), %rax
	testl	%r10d, (%rax)
	je	LBB0_11
## %bb.5:
	cmpq	$1, %r9
	ja	LBB0_7
LBB0_6:
	movq	_WIND_ERR_OVERRUN@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	jmp	LBB0_19
LBB0_1:
	movq	_WIND_ERR_LENGTH_NOT_MOD2@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	jmp	LBB0_19
LBB0_3:
	movq	$0, (%r8)
	jmp	LBB0_18
LBB0_7:
	movq	_WIND_RW_LE@GOTPCREL(%rip), %rax
	testl	%r10d, (%rax)
	je	LBB0_9
## %bb.8:
	movb	$-2, (%rcx)
	leaq	1(%rcx), %rax
	jmp	LBB0_10
LBB0_9:
	movb	$-2, 1(%rcx)
	movq	%rcx, %rax
LBB0_10:
	movb	$-1, (%rax)
	addq	$-2, %r9
LBB0_11:
	xorl	%eax, %eax
	movq	_WIND_RW_LE@GOTPCREL(%rip), %r10
	jmp	LBB0_12
	.p2align	4, 0x90
LBB0_15:                                ##   in Loop: Header=BB0_12 Depth=1
	movb	%r11b, 1(%rcx,%rax,2)
	movzbl	1(%rdi,%rax,4), %ebx
	movb	%bl, (%rcx,%rax,2)
LBB0_16:                                ##   in Loop: Header=BB0_12 Depth=1
	incq	%rax
	cmpq	%rax, %rsi
	je	LBB0_17
LBB0_12:                                ## =>This Inner Loop Header: Depth=1
	subq	$2, %r9
	jb	LBB0_6
## %bb.13:                              ##   in Loop: Header=BB0_12 Depth=1
	movl	(%r10), %ebx
	movzbl	(%rdi,%rax,4), %r11d
	testl	%ebx, (%rdx)
	je	LBB0_15
## %bb.14:                              ##   in Loop: Header=BB0_12 Depth=1
	movb	%r11b, (%rcx,%rax,2)
	movzbl	1(%rdi,%rax,4), %ebx
	movb	%bl, 1(%rcx,%rax,2)
	jmp	LBB0_16
LBB0_17:
	subq	%r9, (%r8)
LBB0_18:
	xorl	%eax, %eax
LBB0_19:
	popq	%rbx
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_WIND_ERR_LENGTH_NOT_MOD2,4,2   ## @WIND_ERR_LENGTH_NOT_MOD2
	.comm	_WIND_RW_BOM,4,2                ## @WIND_RW_BOM
	.comm	_WIND_ERR_OVERRUN,4,2           ## @WIND_ERR_OVERRUN
	.comm	_WIND_RW_LE,4,2                 ## @WIND_RW_LE
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_wind_ucs2write                 ; -- Begin function wind_ucs2write
	.p2align	2
_wind_ucs2write:                        ; @wind_ucs2write
	.cfi_startproc
; %bb.0:
	ldr	x8, [x4]
	tbnz	w8, #0, LBB0_5
; %bb.1:
	cbz	x1, LBB0_6
; %bb.2:
	ldr	w9, [x2]
Lloh0:
	adrp	x10, _WIND_RW_BOM@GOTPAGE
Lloh1:
	ldr	x10, [x10, _WIND_RW_BOM@GOTPAGEOFF]
Lloh2:
	ldr	w10, [x10]
	tst	w10, w9
	b.eq	LBB0_11
; %bb.3:
	cmp	x8, #1
	b.hi	LBB0_7
LBB0_4:
Lloh3:
	adrp	x8, _WIND_ERR_OVERRUN@GOTPAGE
Lloh4:
	ldr	x8, [x8, _WIND_ERR_OVERRUN@GOTPAGEOFF]
Lloh5:
	ldr	w0, [x8]
	ret
LBB0_5:
Lloh6:
	adrp	x8, _WIND_ERR_LENGTH_NOT_MOD2@GOTPAGE
Lloh7:
	ldr	x8, [x8, _WIND_ERR_LENGTH_NOT_MOD2@GOTPAGEOFF]
Lloh8:
	ldr	w0, [x8]
	ret
LBB0_6:
	mov	w0, #0
	str	xzr, [x4]
	ret
LBB0_7:
Lloh9:
	adrp	x10, _WIND_RW_LE@GOTPAGE
Lloh10:
	ldr	x10, [x10, _WIND_RW_LE@GOTPAGEOFF]
Lloh11:
	ldr	w10, [x10]
	tst	w10, w9
	b.eq	LBB0_9
; %bb.8:
	mov	w10, #254
	mov	x9, x3
	strb	w10, [x9], #1
	b	LBB0_10
LBB0_9:
	mov	w9, #254
	strb	w9, [x3, #1]
	mov	x9, x3
LBB0_10:
	mov	w10, #255
	strb	w10, [x9]
	sub	x8, x8, #2
LBB0_11:
	add	x9, x3, #1
Lloh12:
	adrp	x10, _WIND_RW_LE@GOTPAGE
Lloh13:
	ldr	x10, [x10, _WIND_RW_LE@GOTPAGEOFF]
	b	LBB0_14
LBB0_12:                                ;   in Loop: Header=BB0_14 Depth=1
	strb	w11, [x9]
	ldr	w11, [x0]
	lsr	w11, w11, #8
	sturb	w11, [x9, #-1]
LBB0_13:                                ;   in Loop: Header=BB0_14 Depth=1
	sub	x8, x8, #2
	add	x0, x0, #4
	add	x9, x9, #2
	subs	x1, x1, #1
	b.eq	LBB0_17
LBB0_14:                                ; =>This Inner Loop Header: Depth=1
	cmp	x8, #1
	b.ls	LBB0_4
; %bb.15:                               ;   in Loop: Header=BB0_14 Depth=1
	ldr	w12, [x2]
	ldr	w13, [x10]
	ldr	w11, [x0]
	tst	w13, w12
	b.eq	LBB0_12
; %bb.16:                               ;   in Loop: Header=BB0_14 Depth=1
	sturb	w11, [x9, #-1]
	ldr	w11, [x0]
	lsr	w11, w11, #8
	strb	w11, [x9]
	b	LBB0_13
LBB0_17:
	mov	w0, #0
	ldr	x9, [x4]
	sub	x8, x9, x8
	str	x8, [x4]
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh12, Lloh13
	.cfi_endproc
                                        ; -- End function
	.comm	_WIND_ERR_LENGTH_NOT_MOD2,4,2   ; @WIND_ERR_LENGTH_NOT_MOD2
	.comm	_WIND_RW_BOM,4,2                ; @WIND_RW_BOM
	.comm	_WIND_ERR_OVERRUN,4,2           ; @WIND_ERR_OVERRUN
	.comm	_WIND_RW_LE,4,2                 ; @WIND_RW_LE
.subsections_via_symbols
