	.file	"extr_find-font-windows.c_convert_utf16_be_to_utf8.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.type	convert_utf16_be_to_utf8, @function
convert_utf16_be_to_utf8:
.LFB0:
	.cfi_startproc
	endbr64
	push	r13
	.cfi_def_cfa_offset 16
	.cfi_offset 13, -16
	push	r12
	.cfi_def_cfa_offset 24
	.cfi_offset 12, -24
	push	rbp
	.cfi_def_cfa_offset 32
	.cfi_offset 6, -32
	push	rbx
	.cfi_def_cfa_offset 40
	.cfi_offset 3, -40
	mov	rbx, rdi
	sub	rsp, 8
	.cfi_def_cfa_offset 48
	mov	esi, DWORD PTR [rdi]
	mov	ebp, esi
	shr	ebp, 31
	add	ebp, esi
	sar	ebp
	movsx	rbp, ebp
	lea	r13, 4[0+rbp*4]
	mov	rdi, r13
	call	malloc@PLT
	mov	DWORD PTR -4[rax+r13], 0
	mov	r12, rax
	test	rbp, rbp
	je	.L2
	mov	rcx, QWORD PTR 8[rbx]
	xor	edx, edx
	.p2align 4,,10
	.p2align 3
.L3:
	movzx	eax, WORD PTR [rcx+rdx*8]
	rol	ax, 8
	movzx	eax, ax
	mov	DWORD PTR [r12+rdx*4], eax
	add	rdx, 1
	cmp	rbp, rdx
	jne	.L3
.L2:
	mov	rsi, rbp
	mov	rdi, r12
	call	wide_to_utf8@PLT
	mov	rdi, r12
	mov	r13, rax
	call	free@PLT
	add	rsp, 8
	.cfi_def_cfa_offset 40
	mov	rax, r13
	pop	rbx
	.cfi_def_cfa_offset 32
	pop	rbp
	.cfi_def_cfa_offset 24
	pop	r12
	.cfi_def_cfa_offset 16
	pop	r13
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE0:
	.size	convert_utf16_be_to_utf8, .-convert_utf16_be_to_utf8
	.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_find-font-windows.c_convert_utf16_be_to_utf8.c"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	convert_utf16_be_to_utf8, %function
convert_utf16_be_to_utf8:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, lr}
	ldr	r5, [r0]
	mov	r7, r0
	add	r5, r5, r5, lsr #31
	asr	r5, r5, #1
	add	r4, r5, #1
	lsl	r4, r4, #2
	mov	r0, r4
	bl	malloc
	mov	r2, #0
	add	r3, r0, r4
	cmp	r5, r2
	mov	r6, r0
	str	r2, [r3, #-4]
	beq	.L2
	sub	r4, r4, #8
	ldr	lr, [r7, #4]
	add	r4, r0, r4
	sub	r2, r0, #4
.L3:
	ldrh	ip, [lr], #8
	lsr	r3, ip, #8
	orr	r3, r3, ip, lsl #8
	lsl	r3, r3, #16
	lsr	r3, r3, #16
	str	r3, [r2, #4]!
	cmp	r2, r4
	bne	.L3
.L2:
	mov	r1, r5
	mov	r0, r6
	bl	wide_to_utf8
	mov	r4, r0
	mov	r0, r6
	bl	free
	mov	r0, r4
	pop	{r4, r5, r6, r7, r8, pc}
	.size	convert_utf16_be_to_utf8, .-convert_utf16_be_to_utf8
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
