	.file	"110632.c"
	.intel_syntax noprefix
	.text
	.local	state
	.comm	state,8,8
	.globl	c16rtomb
	.type	c16rtomb, @function
c16rtomb:
.LFB0:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	sub	rsp, 48
	mov	QWORD PTR -24[rbp], rdi
	mov	eax, esi
	mov	QWORD PTR -40[rbp], rdx
	mov	WORD PTR -28[rbp], ax
	movzx	eax, WORD PTR -28[rbp]
	mov	DWORD PTR -4[rbp], eax
	cmp	QWORD PTR -40[rbp], 0
	jne	.L2
	lea	rax, state[rip]
	mov	QWORD PTR -40[rbp], rax
.L2:
	cmp	QWORD PTR -24[rbp], 0
	jne	.L3
	mov	rax, QWORD PTR -40[rbp]
	mov	eax, DWORD PTR [rax]
	and	eax, 2147483647
	mov	edx, eax
	mov	rax, QWORD PTR -40[rbp]
	mov	DWORD PTR [rax], edx
	mov	rax, QWORD PTR -40[rbp]
	mov	DWORD PTR 4[rax], 0
	mov	DWORD PTR -4[rbp], 0
.L3:
	mov	rax, QWORD PTR -40[rbp]
	mov	eax, DWORD PTR [rax]
	test	eax, eax
	jns	.L4
	mov	rax, QWORD PTR -40[rbp]
	mov	eax, DWORD PTR [rax]
	and	eax, 2147483647
	mov	edx, eax
	mov	rax, QWORD PTR -40[rbp]
	mov	DWORD PTR [rax], edx
	cmp	DWORD PTR -4[rbp], 56319
	jle	.L5
	cmp	DWORD PTR -4[rbp], 57343
	jg	.L5
	mov	rax, QWORD PTR -40[rbp]
	mov	eax, DWORD PTR 4[rax]
	sal	eax, 10
	and	eax, 1047552
	mov	edx, eax
	mov	eax, DWORD PTR -4[rbp]
	and	eax, 1023
	or	eax, edx
	add	eax, 65536
	mov	DWORD PTR -4[rbp], eax
	jmp	.L6
.L5:
	mov	rax, QWORD PTR -40[rbp]
	mov	eax, DWORD PTR 4[rax]
	mov	DWORD PTR -4[rbp], eax
.L6:
	mov	rax, QWORD PTR -40[rbp]
	mov	DWORD PTR 4[rax], 0
	jmp	.L7
.L4:
	cmp	DWORD PTR -4[rbp], 55295
	jle	.L7
	cmp	DWORD PTR -4[rbp], 56319
	jg	.L7
	mov	rax, QWORD PTR -40[rbp]
	mov	eax, DWORD PTR [rax]
	or	eax, -2147483648
	mov	edx, eax
	mov	rax, QWORD PTR -40[rbp]
	mov	DWORD PTR [rax], edx
	mov	edx, DWORD PTR -4[rbp]
	mov	rax, QWORD PTR -40[rbp]
	mov	DWORD PTR 4[rax], edx
	mov	eax, 0
	jmp	.L8
.L7:
	mov	rdx, QWORD PTR -40[rbp]
	mov	ecx, DWORD PTR -4[rbp]
	mov	rax, QWORD PTR -24[rbp]
	mov	esi, ecx
	mov	rdi, rax
	call	wcrtomb@PLT
.L8:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.size	c16rtomb, .-c16rtomb
	.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	"110632.c"
	.text
	.local	state
	.comm	state,8,4
	.align	2
	.global	c16rtomb
	.syntax unified
	.arm
	.fpu softvfp
	.type	c16rtomb, %function
c16rtomb:
	@ args = 0, pretend = 0, frame = 24
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #24
	str	r0, [fp, #-16]
	mov	r3, r1
	str	r2, [fp, #-24]
	strh	r3, [fp, #-18]	@ movhi
	ldrh	r3, [fp, #-18]
	str	r3, [fp, #-8]
	ldr	r3, [fp, #-24]
	cmp	r3, #0
	bne	.L2
	ldr	r3, .L9
	str	r3, [fp, #-24]
.L2:
	ldr	r3, [fp, #-16]
	cmp	r3, #0
	bne	.L3
	ldr	r3, [fp, #-24]
	ldr	r3, [r3]
	bic	r2, r3, #-2147483648
	ldr	r3, [fp, #-24]
	str	r2, [r3]
	ldr	r3, [fp, #-24]
	mov	r2, #0
	str	r2, [r3, #4]
	mov	r3, #0
	str	r3, [fp, #-8]
.L3:
	ldr	r3, [fp, #-24]
	ldr	r3, [r3]
	cmp	r3, #0
	bge	.L4
	ldr	r3, [fp, #-24]
	ldr	r3, [r3]
	bic	r2, r3, #-2147483648
	ldr	r3, [fp, #-24]
	str	r2, [r3]
	ldr	r3, [fp, #-8]
	cmp	r3, #56320
	bcc	.L5
	ldr	r3, [fp, #-8]
	cmp	r3, #57344
	bcs	.L5
	ldr	r3, [fp, #-24]
	ldr	r3, [r3, #4]
	lsl	r3, r3, #10
	ldr	r2, .L9+4
	and	r2, r2, r3
	ldr	r3, [fp, #-8]
	lsl	r3, r3, #22
	lsr	r3, r3, #22
	orr	r3, r2, r3
	add	r3, r3, #65536
	str	r3, [fp, #-8]
	b	.L6
.L5:
	ldr	r3, [fp, #-24]
	ldr	r3, [r3, #4]
	str	r3, [fp, #-8]
.L6:
	ldr	r3, [fp, #-24]
	mov	r2, #0
	str	r2, [r3, #4]
	b	.L7
.L4:
	ldr	r3, [fp, #-8]
	cmp	r3, #55296
	bcc	.L7
	ldr	r3, [fp, #-8]
	cmp	r3, #56320
	bcs	.L7
	ldr	r3, [fp, #-24]
	ldr	r3, [r3]
	orr	r3, r3, #-2147483648
	mov	r2, r3
	ldr	r3, [fp, #-24]
	str	r2, [r3]
	ldr	r3, [fp, #-24]
	ldr	r2, [fp, #-8]
	str	r2, [r3, #4]
	mov	r3, #0
	b	.L8
.L7:
	ldr	r2, [fp, #-24]
	ldr	r1, [fp, #-8]
	ldr	r0, [fp, #-16]
	bl	wcrtomb
	mov	r3, r0
.L8:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L10:
	.align	2
.L9:
	.word	state
	.word	1047552
	.size	c16rtomb, .-c16rtomb
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
