	.file	"662302.c"
	.intel_syntax noprefix
	.text
	.local	conversion_descriptor
	.comm	conversion_descriptor,8,8
	.local	conversion_descriptor2
	.comm	conversion_descriptor2,8,8
	.section	.rodata
.LC0:
	.string	"malloc() failed\n"
.LC1:
	.string	"UCS-2BE"
.LC2:
	.string	"UTF-8"
	.align 8
.LC3:
	.string	"error opening the conversion context\n"
.LC4:
	.string	"Converting to UCS-2 failed"
	.text
	.globl	convert_ucs_to_utf8
	.type	convert_ucs_to_utf8, @function
convert_ucs_to_utf8:
.LFB6:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	sub	rsp, 64
	mov	QWORD PTR -56[rbp], rdi
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	mov	QWORD PTR -40[rbp], 2
	mov	DWORD PTR -48[rbp], 8
	mov	eax, DWORD PTR -48[rbp]
	cdqe
	mov	esi, 1
	mov	rdi, rax
	call	calloc@PLT
	mov	QWORD PTR -16[rbp], rax
	cmp	QWORD PTR -16[rbp], 0
	jne	.L2
	lea	rsi, .LC0[rip]
	mov	edi, 1
	mov	eax, 0
	call	err@PLT
.L2:
	mov	eax, DWORD PTR -48[rbp]
	cdqe
	mov	QWORD PTR -32[rbp], rax
	mov	rax, QWORD PTR -16[rbp]
	mov	QWORD PTR -24[rbp], rax
	mov	rax, QWORD PTR conversion_descriptor[rip]
	test	rax, rax
	jne	.L3
	lea	rsi, .LC1[rip]
	lea	rdi, .LC2[rip]
	call	iconv_open@PLT
	mov	QWORD PTR conversion_descriptor[rip], rax
	mov	rax, QWORD PTR conversion_descriptor[rip]
	test	rax, rax
	jne	.L3
	mov	rax, QWORD PTR stderr[rip]
	mov	rcx, rax
	mov	edx, 37
	mov	esi, 1
	lea	rdi, .LC3[rip]
	call	fwrite@PLT
	mov	edi, 1
	call	exit@PLT
.L3:
	mov	rax, QWORD PTR conversion_descriptor[rip]
	mov	r8d, 0
	mov	ecx, 0
	mov	edx, 0
	mov	esi, 0
	mov	rdi, rax
	call	iconv@PLT
	mov	rax, QWORD PTR conversion_descriptor[rip]
	lea	rdi, -32[rbp]
	lea	rcx, -24[rbp]
	lea	rdx, -40[rbp]
	lea	rsi, -56[rbp]
	mov	r8, rdi
	mov	rdi, rax
	call	iconv@PLT
	mov	DWORD PTR -44[rbp], eax
	cmp	DWORD PTR -44[rbp], -1
	jne	.L4
	lea	rdi, .LC4[rip]
	call	perror@PLT
	mov	eax, 0
	jmp	.L6
.L4:
	mov	rax, QWORD PTR -16[rbp]
.L6:
	mov	rdx, QWORD PTR -8[rbp]
	sub	rdx, QWORD PTR fs:40
	je	.L7
	call	__stack_chk_fail@PLT
.L7:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	convert_ucs_to_utf8, .-convert_ucs_to_utf8
	.globl	convert_utf8_to_ucs2
	.type	convert_utf8_to_ucs2, @function
convert_utf8_to_ucs2:
.LFB7:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	sub	rsp, 64
	mov	QWORD PTR -56[rbp], rdi
	mov	QWORD PTR -64[rbp], rsi
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	mov	rax, QWORD PTR -56[rbp]
	mov	rdi, rax
	call	strlen@PLT
	add	rax, 1
	mov	QWORD PTR -40[rbp], rax
	mov	rax, QWORD PTR -40[rbp]
	add	eax, eax
	mov	DWORD PTR -48[rbp], eax
	mov	eax, DWORD PTR -48[rbp]
	cdqe
	mov	rdi, rax
	call	malloc@PLT
	mov	QWORD PTR -16[rbp], rax
	cmp	QWORD PTR -16[rbp], 0
	jne	.L9
	lea	rsi, .LC0[rip]
	mov	edi, 1
	mov	eax, 0
	call	err@PLT
.L9:
	mov	eax, DWORD PTR -48[rbp]
	cdqe
	mov	QWORD PTR -32[rbp], rax
	mov	rax, QWORD PTR -16[rbp]
	mov	QWORD PTR -24[rbp], rax
	mov	rax, QWORD PTR conversion_descriptor2[rip]
	test	rax, rax
	jne	.L10
	lea	rsi, .LC2[rip]
	lea	rdi, .LC1[rip]
	call	iconv_open@PLT
	mov	QWORD PTR conversion_descriptor2[rip], rax
	mov	rax, QWORD PTR conversion_descriptor2[rip]
	test	rax, rax
	jne	.L10
	mov	rax, QWORD PTR stderr[rip]
	mov	rcx, rax
	mov	edx, 37
	mov	esi, 1
	lea	rdi, .LC3[rip]
	call	fwrite@PLT
	mov	edi, 1
	call	exit@PLT
.L10:
	mov	rax, QWORD PTR conversion_descriptor2[rip]
	mov	r8d, 0
	mov	ecx, 0
	mov	edx, 0
	mov	esi, 0
	mov	rdi, rax
	call	iconv@PLT
	mov	rax, QWORD PTR conversion_descriptor2[rip]
	lea	rdi, -32[rbp]
	lea	rcx, -24[rbp]
	lea	rdx, -40[rbp]
	lea	rsi, -56[rbp]
	mov	r8, rdi
	mov	rdi, rax
	call	iconv@PLT
	mov	DWORD PTR -44[rbp], eax
	cmp	DWORD PTR -44[rbp], -1
	jne	.L11
	lea	rdi, .LC4[rip]
	call	perror@PLT
	cmp	QWORD PTR -64[rbp], 0
	je	.L12
	mov	rax, QWORD PTR -64[rbp]
	mov	DWORD PTR [rax], 0
.L12:
	mov	eax, 0
	jmp	.L15
.L11:
	cmp	QWORD PTR -64[rbp], 0
	je	.L14
	mov	eax, DWORD PTR -48[rbp]
	cdqe
	mov	rdx, QWORD PTR -32[rbp]
	sub	rax, rdx
	shr	rax
	sub	eax, 1
	mov	edx, eax
	mov	rax, QWORD PTR -64[rbp]
	mov	DWORD PTR [rax], edx
.L14:
	mov	rax, QWORD PTR -16[rbp]
.L15:
	mov	rcx, QWORD PTR -8[rbp]
	sub	rcx, QWORD PTR fs:40
	je	.L16
	call	__stack_chk_fail@PLT
.L16:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.size	convert_utf8_to_ucs2, .-convert_utf8_to_ucs2
	.ident	"GCC: (Ubuntu 10.5.0-1ubuntu1~20.04) 10.5.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, 6
	.eabi_attribute 34, 0
	.eabi_attribute 18, 4
	.file	"662302.c"
	.text
	.local	conversion_descriptor
	.comm	conversion_descriptor,4,4
	.local	conversion_descriptor2
	.comm	conversion_descriptor2,4,4
	.section	.rodata
	.align	2
.LC0:
	.ascii	"malloc() failed\012\000"
	.align	2
.LC1:
	.ascii	"UCS-2BE\000"
	.align	2
.LC2:
	.ascii	"UTF-8\000"
	.align	2
.LC3:
	.ascii	"error opening the conversion context\012\000"
	.align	2
.LC4:
	.ascii	"Converting to UCS-2 failed\000"
	.align	2
.LC5:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	convert_ucs_to_utf8
	.syntax unified
	.arm
	.fpu softvfp
	.type	convert_ucs_to_utf8, %function
convert_ucs_to_utf8:
	@ args = 0, pretend = 0, frame = 40
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #48
	str	r0, [fp, #-40]
	ldr	r3, .L8
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	mov	r3, #2
	str	r3, [fp, #-32]
	mov	r3, #8
	str	r3, [fp, #-20]
	ldr	r3, [fp, #-20]
	mov	r1, #1
	mov	r0, r3
	bl	calloc
	mov	r3, r0
	str	r3, [fp, #-16]
	ldr	r3, [fp, #-16]
	cmp	r3, #0
	bne	.L2
	ldr	r1, .L8+4
	mov	r0, #1
	bl	err
.L2:
	ldr	r3, [fp, #-20]
	str	r3, [fp, #-28]
	ldr	r3, [fp, #-16]
	str	r3, [fp, #-24]
	ldr	r3, .L8+8
	ldr	r3, [r3]
	cmp	r3, #0
	bne	.L3
	ldr	r1, .L8+12
	ldr	r0, .L8+16
	bl	iconv_open
	mov	r3, r0
	ldr	r2, .L8+8
	str	r3, [r2]
	ldr	r3, .L8+8
	ldr	r3, [r3]
	cmp	r3, #0
	bne	.L3
	ldr	r3, .L8+20
	ldr	r3, [r3]
	mov	r2, #37
	mov	r1, #1
	ldr	r0, .L8+24
	bl	fwrite
	mov	r0, #1
	bl	exit
.L3:
	ldr	r3, .L8+8
	ldr	r0, [r3]
	mov	r3, #0
	str	r3, [sp]
	mov	r3, #0
	mov	r2, #0
	mov	r1, #0
	bl	iconv
	ldr	r3, .L8+8
	ldr	r0, [r3]
	sub	ip, fp, #24
	sub	r2, fp, #32
	sub	r1, fp, #40
	sub	r3, fp, #28
	str	r3, [sp]
	mov	r3, ip
	bl	iconv
	mov	r3, r0
	str	r3, [fp, #-12]
	ldr	r3, [fp, #-12]
	cmn	r3, #1
	bne	.L4
	ldr	r0, .L8+28
	bl	perror
	mov	r3, #0
	b	.L6
.L4:
	ldr	r3, [fp, #-16]
.L6:
	ldr	r2, .L8
	ldr	r1, [r2]
	ldr	r2, [fp, #-8]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L7
	bl	__stack_chk_fail
.L7:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L9:
	.align	2
.L8:
	.word	.LC5
	.word	.LC0
	.word	conversion_descriptor
	.word	.LC1
	.word	.LC2
	.word	stderr
	.word	.LC3
	.word	.LC4
	.size	convert_ucs_to_utf8, .-convert_ucs_to_utf8
	.section	.rodata
	.align	2
.LC6:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	convert_utf8_to_ucs2
	.syntax unified
	.arm
	.fpu softvfp
	.type	convert_utf8_to_ucs2, %function
convert_utf8_to_ucs2:
	@ args = 0, pretend = 0, frame = 40
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #48
	str	r0, [fp, #-40]
	str	r1, [fp, #-44]
	ldr	r3, .L19
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	ldr	r3, [fp, #-40]
	mov	r0, r3
	bl	strlen
	mov	r3, r0
	add	r3, r3, #1
	str	r3, [fp, #-32]
	ldr	r3, [fp, #-32]
	lsl	r3, r3, #1
	str	r3, [fp, #-20]
	ldr	r3, [fp, #-20]
	mov	r0, r3
	bl	malloc
	mov	r3, r0
	str	r3, [fp, #-16]
	ldr	r3, [fp, #-16]
	cmp	r3, #0
	bne	.L11
	ldr	r1, .L19+4
	mov	r0, #1
	bl	err
.L11:
	ldr	r3, [fp, #-20]
	str	r3, [fp, #-28]
	ldr	r3, [fp, #-16]
	str	r3, [fp, #-24]
	ldr	r3, .L19+8
	ldr	r3, [r3]
	cmp	r3, #0
	bne	.L12
	ldr	r1, .L19+12
	ldr	r0, .L19+16
	bl	iconv_open
	mov	r3, r0
	ldr	r2, .L19+8
	str	r3, [r2]
	ldr	r3, .L19+8
	ldr	r3, [r3]
	cmp	r3, #0
	bne	.L12
	ldr	r3, .L19+20
	ldr	r3, [r3]
	mov	r2, #37
	mov	r1, #1
	ldr	r0, .L19+24
	bl	fwrite
	mov	r0, #1
	bl	exit
.L12:
	ldr	r3, .L19+8
	ldr	r0, [r3]
	mov	r3, #0
	str	r3, [sp]
	mov	r3, #0
	mov	r2, #0
	mov	r1, #0
	bl	iconv
	ldr	r3, .L19+8
	ldr	r0, [r3]
	sub	ip, fp, #24
	sub	r2, fp, #32
	sub	r1, fp, #40
	sub	r3, fp, #28
	str	r3, [sp]
	mov	r3, ip
	bl	iconv
	mov	r3, r0
	str	r3, [fp, #-12]
	ldr	r3, [fp, #-12]
	cmn	r3, #1
	bne	.L13
	ldr	r0, .L19+28
	bl	perror
	ldr	r3, [fp, #-44]
	cmp	r3, #0
	beq	.L14
	ldr	r3, [fp, #-44]
	mov	r2, #0
	str	r2, [r3]
.L14:
	mov	r3, #0
	b	.L17
.L13:
	ldr	r3, [fp, #-44]
	cmp	r3, #0
	beq	.L16
	ldr	r2, [fp, #-20]
	ldr	r3, [fp, #-28]
	sub	r3, r2, r3
	lsr	r3, r3, #1
	sub	r3, r3, #1
	mov	r2, r3
	ldr	r3, [fp, #-44]
	str	r2, [r3]
.L16:
	ldr	r3, [fp, #-16]
.L17:
	ldr	r2, .L19
	ldr	r1, [r2]
	ldr	r2, [fp, #-8]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L18
	bl	__stack_chk_fail
.L18:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L20:
	.align	2
.L19:
	.word	.LC6
	.word	.LC0
	.word	conversion_descriptor2
	.word	.LC2
	.word	.LC1
	.word	stderr
	.word	.LC3
	.word	.LC4
	.size	convert_utf8_to_ucs2, .-convert_utf8_to_ucs2
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
