	.file	"extr_utf8.c_wind_ucs2utf8.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.globl	wind_ucs2utf8
	.type	wind_ucs2utf8, @function
wind_ucs2utf8:
.LFB0:
	.cfi_startproc
	endbr64
	push	rbx
	.cfi_def_cfa_offset 16
	.cfi_offset 3, -16
	xor	r9d, r9d
	mov	rbx, rcx
	test	rsi, rsi
	je	.L2
	xor	r8d, r8d
	jmp	.L11
	.p2align 4,,10
	.p2align 3
.L33:
	add	r9, 1
	test	rdx, rdx
	je	.L4
	cmp	r9, QWORD PTR [rbx]
	jnb	.L31
	xor	ecx, ecx
	mov	r11d, 1
.L6:
	mov	r10, QWORD PTR first_char[rip]
	or	al, BYTE PTR [r10+rcx]
	mov	BYTE PTR [rdx], al
	add	rdx, r11
.L4:
	add	r8, 1
	cmp	rsi, r8
	je	.L2
.L11:
	mov	eax, DWORD PTR [rdi+r8*4]
	cmp	eax, 127
	jle	.L33
	cmp	eax, 2047
	jle	.L7
	add	r9, 3
	test	rdx, rdx
	je	.L4
	cmp	r9, QWORD PTR [rbx]
	jnb	.L31
	mov	ecx, eax
	mov	r11d, 3
	sar	eax, 6
	and	ecx, 63
	or	ecx, -128
	mov	BYTE PTR 2[rdx], cl
	mov	ecx, 8
.L9:
	mov	r10d, eax
	sar	eax, 6
	and	r10d, 63
	or	r10d, -128
	mov	BYTE PTR 1[rdx], r10b
	jmp	.L6
	.p2align 4,,10
	.p2align 3
.L7:
	add	r9, 2
	test	rdx, rdx
	je	.L4
	cmp	r9, QWORD PTR [rbx]
	jnb	.L31
	mov	ecx, 4
	mov	r11d, 2
	jmp	.L9
	.p2align 4,,10
	.p2align 3
.L2:
	test	rdx, rdx
	je	.L12
	cmp	QWORD PTR [rbx], r9
	jbe	.L31
	mov	BYTE PTR [rdx], 0
.L12:
	mov	QWORD PTR [rbx], r9
	xor	eax, eax
	pop	rbx
	.cfi_remember_state
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L31:
	.cfi_restore_state
	mov	eax, DWORD PTR WIND_ERR_OVERRUN[rip]
	pop	rbx
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE0:
	.size	wind_ucs2utf8, .-wind_ucs2utf8
	.comm	first_char,8,8
	.comm	WIND_ERR_OVERRUN,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",@progbits
	.section	.note.gnu.property,"a"
	.align 8
	.long	 1f - 0f
	.long	 4f - 1f
	.long	 5
0:
	.string	 "GNU"
1:
	.align 8
	.long	 0xc0000002
	.long	 3f - 2f
2:
	.long	 0x3
3:
	.align 8
4:

	.arch armv5t
	.eabi_attribute 20, 1
	.eabi_attribute 21, 1
	.eabi_attribute 23, 3
	.eabi_attribute 24, 1
	.eabi_attribute 25, 1
	.eabi_attribute 26, 2
	.eabi_attribute 30, 2
	.eabi_attribute 34, 0
	.eabi_attribute 18, 4
	.file	"extr_utf8.c_wind_ucs2utf8.c"
	.text
	.align	2
	.global	wind_ucs2utf8
	.syntax unified
	.arm
	.fpu softvfp
	.type	wind_ucs2utf8, %function
wind_ucs2utf8:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	cmp	r1, #0
	push	{r4, r5, r6, r7, r8, r9, lr}
	beq	.L14
	mov	lr, #0
	mvn	r7, #127
	mov	ip, lr
	ldr	r6, .L34
	sub	r5, r0, #4
	b	.L11
.L33:
	cmp	r2, #0
	add	lr, lr, #1
	beq	.L4
	ldr	r4, [r3]
	cmp	lr, r4
	bcs	.L31
	mov	r9, #0
	mov	r8, #1
.L6:
	ldr	r4, [r6]
	ldr	r4, [r4, r9]
	orr	r0, r4, r0
	strb	r0, [r2], r8
.L4:
	add	ip, ip, #1
	cmp	r1, ip
	beq	.L2
.L11:
	ldr	r0, [r5, #4]!
	cmp	r0, #127
	ble	.L33
	cmp	r0, #2048
	blt	.L7
	cmp	r2, #0
	add	lr, lr, #3
	beq	.L4
	ldr	r4, [r3]
	cmp	lr, r4
	bcs	.L31
	mov	r9, #8
	mov	r8, #3
	and	r4, r0, #63
	orr	r4, r7, r4
	strb	r4, [r2, #2]
	asr	r0, r0, #6
.L9:
	and	r4, r0, #63
	orr	r4, r7, r4
	strb	r4, [r2, #1]
	asr	r0, r0, #6
	b	.L6
.L7:
	cmp	r2, #0
	add	lr, lr, #2
	beq	.L4
	ldr	r4, [r3]
	cmp	lr, r4
	bcs	.L31
	mov	r9, #4
	mov	r8, #2
	b	.L9
.L14:
	mov	lr, r1
.L2:
	cmp	r2, #0
	beq	.L12
	ldr	r1, [r3]
	cmp	r1, lr
	movhi	r1, #0
	strbhi	r1, [r2]
	bls	.L31
.L12:
	mov	r0, #0
	str	lr, [r3]
	pop	{r4, r5, r6, r7, r8, r9, pc}
.L31:
	ldr	r3, .L34+4
	ldr	r0, [r3]
	pop	{r4, r5, r6, r7, r8, r9, pc}
.L35:
	.align	2
.L34:
	.word	first_char
	.word	WIND_ERR_OVERRUN
	.size	wind_ucs2utf8, .-wind_ucs2utf8
	.comm	first_char,4,4
	.comm	WIND_ERR_OVERRUN,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
