LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O3/mloar[P]charset/euc.c
// Function: euc_kr_to_ucs
static long int euc_kr_to_ucs(unsigned long state)
{
    switch (state >> 28) {
      case 1: return ksx1001_to_unicode(((state >> 8) & 0xFF) - 0xA1,
				       ((state     ) & 0xFF) - 0xA1);
      default: return ERROR;
    }
}

// Assembly:
movq %rdi, %rax
andq $-0x10000000, %rax      # imm = 0xF0000000
cmpq $0x10000000, %rax       # imm = 0x10000000
jne 0x6b6a
movq %rdi, %rsi
shrl $0x8, %edi
movl $0xff, %eax
andl %eax, %edi
movl $0xffffff5f, %ecx       # imm = 0xFFFFFF5F
addl %ecx, %edi
andl %eax, %esi
addl %ecx, %esi
jmp 0x9159
movl $0xffff, %eax           # imm = 0xFFFF
retq
// File: /workspace/github_c_makefile_star2_O3/mloar[P]charset/euc.c
// Function: euc_jp_to_ucs
static long int euc_jp_to_ucs(unsigned long state)
{
    switch (state >> 28) {
      case 1: return jisx0208_to_unicode(((state >> 8) & 0xFF) - 0xA1,
					 ((state     ) & 0xFF) - 0xA1);
      case 2:
	/*
	 * This is the top half of JIS X 0201. That means A1-DF map
	 * to FF61-FF9F, and nothing else is valid.
	 */
	{
	    int c = state & 0xFF;
	    if (c >= 0xA1 && c <= 0xDF)
		return c + (0xFF61 - 0xA1);
	    else
		return ERROR;
	}
	/* (no break needed since all control paths have returned) */
      case 3: return jisx0212_to_unicode(((state >> 8) & 0xFF) - 0xA1,
					 ((state     ) & 0xFF) - 0xA1);
      default: return ERROR;	       /* placate optimisers */
    }
}

// Assembly:
movq %rdi, %rsi
movq %rdi, %rcx
shrq $0x1c, %rcx
cmpq $0x3, %rcx
je 0x6c03
cmpq $0x2, %rcx
je 0x6be7
movl $0xffff, %eax           # imm = 0xFFFF
cmpq $0x1, %rcx
jne 0x6c02
movl %esi, %edi
shrl $0x8, %edi
movl $0xff, %eax
andl %eax, %edi
movl $0xffffff5f, %ecx       # imm = 0xFFFFFF5F
addl %ecx, %edi
andl %eax, %esi
addl %ecx, %esi
jmp 0x8eb4
movzbl %sil, %ecx
leal -0xa1(%rcx), %eax
addl $0xfec0, %ecx           # imm = 0xFEC0
cmpl $0x3f, %eax
movl $0xffff, %eax           # imm = 0xFFFF
cmovbl %ecx, %eax
retq
movl %esi, %edi
shrl $0x8, %edi
movl $0xff, %eax
andl %eax, %edi
movl $0xffffff5f, %ecx       # imm = 0xFFFFFF5F
addl %ecx, %edi
andl %eax, %esi
addl %ecx, %esi
jmp 0x8f94
// File: /workspace/github_c_makefile_star2_O3/mloar[P]charset/euc.c
// Function: euc_jp_from_ucs
static unsigned long euc_jp_from_ucs(long int ucs)
{
    int r, c;
    if (ucs >= 0xFF61 && ucs <= 0xFF9F)
	return 0x20000000 | (ucs - (0xFF61 - 0xA1));
    else if (unicode_to_jisx0208(ucs, &r, &c))
	return 0x10000000 | ((r+0xA1) << 8) | (c+0xA1);
    else if (unicode_to_jisx0212(ucs, &r, &c))
	return 0x30000000 | ((r+0xA1) << 8) | (c+0xA1);
    else
	return 0;
}

// Assembly:
pushq %rbx
subq $0x10, %rsp
movq %rdi, %rbx
leaq -0xff61(%rdi), %rax
cmpq $0x3e, %rax
ja 0x6c3d
addq $0x1fff0140, %rbx       # imm = 0x1FFF0140
jmp 0x6cb9
leaq 0xc(%rsp), %rsi
leaq 0x8(%rsp), %rdx
movq %rbx, %rdi
callq 0x8f18
testl %eax, %eax
je 0x6c7a
movl 0xc(%rsp), %eax
shll $0x8, %eax
addl $0xa100, %eax           # imm = 0xA100
movslq 0x8(%rsp), %rcx
addq $0xa1, %rcx
movslq %eax, %rbx
orq %rcx, %rbx
orq $0x10000000, %rbx       # imm = 0x10000000
jmp 0x6cb9
leaq 0xc(%rsp), %rsi
leaq 0x8(%rsp), %rdx
movq %rbx, %rdi
callq 0x8ff8
testl %eax, %eax
je 0x6cb7
movl 0xc(%rsp), %eax
shll $0x8, %eax
addl $0xa100, %eax           # imm = 0xA100
movslq 0x8(%rsp), %rcx
addq $0xa1, %rcx
movslq %eax, %rbx
orq %rcx, %rbx
orq $0x30000000, %rbx       # imm = 0x30000000
jmp 0x6cb9
xorl %ebx, %ebx
movq %rbx, %rax
addq $0x10, %rsp
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O3/mloar[P]charset/euc.c
// Function: euc_tw_to_ucs
static long int euc_tw_to_ucs(unsigned long state)
{
    int plane;
    switch (state >> 28) {
      case 1: return cns11643_to_unicode(0, ((state >> 8) & 0xFF) - 0xA1,
					    ((state     ) & 0xFF) - 0xA1);
      case 2:
	plane = ((state >> 8) & 0xFF) - 0xA1;
	if (plane >= 7) return ERROR;
	return cns11643_to_unicode(plane, ((state >> 8) & 0xFF) - 0xA1,
					  ((state     ) & 0xFF) - 0xA1);
      default: return ERROR;
    }
}

// Assembly:
movq %rdi, %rdx
movq %rdi, %rax
shrq $0x1c, %rax
cmpq $0x2, %rax
je 0x6cf6
cmpq $0x1, %rax
jne 0x6d01
movl %edx, %esi
shrl $0x8, %esi
movl $0xff, %eax
andl %eax, %esi
movl $0xffffff5f, %ecx       # imm = 0xFFFFFF5F
addl %ecx, %esi
andl %eax, %edx
addl %ecx, %edx
xorl %edi, %edi
jmp 0x66b0
movzbl %dh, %edi
cmpl $0xa7, %edi
jbe 0x6d07
movl $0xffff, %eax           # imm = 0xFFFF
retq
movl $0xffffff5f, %eax       # imm = 0xFFFFFF5F
addl %eax, %edi
movzbl %dl, %edx
addl %eax, %edx
movl %edi, %esi
jmp 0x66b0
// File: /workspace/github_c_makefile_star2_O3/mloar[P]charset/euc.c
// Function: euc_tw_from_ucs
static unsigned long euc_tw_from_ucs(long int ucs)
{
    int p, r, c;
    if (unicode_to_cns11643(ucs, &p, &r, &c)) {
	if (p == 0)
	    return 0x10000000 | ((r+0xA1) << 8) | (c+0xA1);
	else
	    return 0x20000000 |
		((p + 0xA1) << 16) | ((r+0xA1) << 8) | (c+0xA1);
    } else
	return 0;
}

// Assembly:
subq $0x18, %rsp
leaq 0x14(%rsp), %rsi
leaq 0x10(%rsp), %rdx
leaq 0xc(%rsp), %rcx
callq 0x674f
testl %eax, %eax
je 0x6d6f
movl 0x14(%rsp), %eax
testl %eax, %eax
je 0x6d73
shll $0x10, %eax
addl $0xa10000, %eax         # imm = 0xA10000
movl 0x10(%rsp), %ecx
shll $0x8, %ecx
addl $0xa100, %ecx           # imm = 0xA100
orl %eax, %ecx
movslq 0xc(%rsp), %rdx
addq $0xa1, %rdx
movslq %ecx, %rax
orq %rdx, %rax
orq $0x20000000, %rax       # imm = 0x20000000
jmp 0x6d96
xorl %eax, %eax
jmp 0x6d96
movl 0x10(%rsp), %eax
shll $0x8, %eax
addl $0xa100, %eax           # imm = 0xA100
movslq 0xc(%rsp), %rcx
addq $0xa1, %rcx
cltq
orq %rcx, %rax
orq $0x10000000, %rax       # imm = 0x10000000
addq $0x18, %rsp
retq
nop
// File: /workspace/github_c_makefile_star2_O3/mloar[P]charset/gb2312.c
// Function: unicode_to_gb2312
int unicode_to_gb2312(long int unicode, int *r, int *c)
{
    int rr, cc;
    long int uu;
    int i, j, k;

    i = -1;
    j = lenof(gb2312_backward);
    while (j - i > 1) {
	k = (i + j) / 2;
	rr = gb2312_backward[k].r;
	cc = gb2312_backward[k].c;
	uu = gb2312_forward[rr][cc];
	if (unicode > uu)
	    i = k;
	else if (unicode < uu)
	    j = k;
	else {
	    *r = rr;
	    *c = cc;
	    return 1;
	}
    }
    return 0;
}

// Assembly:
pushq %r14
pushq %rbx
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
movl $0x1d15, %r9d           # imm = 0x1D15
leaq 0x520db(%rip), %rcx     # 0x58ef0
leaq 0x4dbc4(%rip), %r8      # 0x549e0
leal (%r9,%rax), %r11d
movl %r11d, %r10d
shrl $0x1f, %r10d
addl %r11d, %r10d
sarl %r10d
movslq %r10d, %rbx
movzbl (%rcx,%rbx,2), %r11d
movzbl 0x1(%rcx,%rbx,2), %ebx
imulq $0xbc, %r11, %r14
addq %r8, %r14
movzwl (%r14,%rbx,2), %r14d
cmpq %rdi, %r14
jge 0x6e56
movl %r10d, %eax
movl %r9d, %r10d
jmp 0x6e58
jle 0x6e6b
movl %r10d, %r11d
subl %eax, %r11d
movl %r10d, %r9d
cmpl $0x1, %r11d
jg 0x6e1c
xorl %eax, %eax
jmp 0x6e75
movl %r11d, (%rsi)
movl %ebx, (%rdx)
movl $0x1, %eax
popq %rbx
popq %r14
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O3/mloar[P]charset/hz.c
// Function: write_hz
static int write_hz(charset_spec const *charset, long int input_chr,
		    charset_state *state,
		    void (*emit)(void *ctx, long int output), void *emitctx)
{
    int desired_state, r, c;

    UNUSEDARG(charset);

    /*
     * Analyse the input char.
     */
    if (input_chr < 0x80) {
	desired_state = 0;
	c = input_chr;
    } else if (unicode_to_gb2312(input_chr, &r, &c)) {
	desired_state = 1;
    } else {
	return FALSE;
    }

    if (state->s0 != (unsigned)desired_state) {
	emit(emitctx, '~');
	emit(emitctx, desired_state ? '{' : '}');
	state->s0 = desired_state;
    }

    if (input_chr < 0)
	return TRUE;		       /* special case: just reset state */

    if (state->s0) {
	/*
	 * GB mode.
	 */
	emit(emitctx, 0x21 + r);
	emit(emitctx, 0x21 + c);
    } else {
	emit(emitctx, c);
    }
    return TRUE;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %r8, %r14
movq %rcx, %rbx
movq %rdx, %r12
movq %rsi, %r15
cmpq $0x7f, %rsi
jg 0x6f88
movl %r15d, (%rsp)
xorl %r13d, %r13d
jmp 0x6fa2
leaq 0x4(%rsp), %rsi
movq %rsp, %rdx
movq %r15, %rdi
callq 0x6e00
movl $0x1, %r13d
testl %eax, %eax
je 0x7006
cmpq %r13, (%r12)
je 0x6fd0
xorl %ebp, %ebp
cmpq $0x80, %r15
setl %bpl
movl $0x7e, %esi
movq %r14, %rdi
callq *%rbx
leaq 0x7b(,%rbp,2), %rsi
movq %r14, %rdi
callq *%rbx
movq %r13, (%r12)
movl $0x1, %ebp
testq %r15, %r15
js 0x7008
cmpq $0x80, %r15
jge 0x6fe8
movl (%rsp), %eax
jmp 0x6ffc
movslq 0x4(%rsp), %rsi
addq $0x21, %rsi
movq %r14, %rdi
callq *%rbx
movl (%rsp), %eax
addl $0x21, %eax
movslq %eax, %rsi
movq %r14, %rdi
callq *%rbx
jmp 0x7008
xorl %ebp, %ebp
movl %ebp, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O3/mloar[P]charset/iso2022.c
// Function: unicode_to_emacs_big5
static int unicode_to_emacs_big5(long int unicode, int *p, int *r, int *c)
{
    int rr, cc, s;
    if (!unicode_to_big5(unicode, &rr, &cc))
	return 0;
    if (cc >= 64) {
	cc -= 34;
	assert(cc >= 64);
    }
    s = rr * 157 + cc;
    if (s >= 40*157) {
	*p = 2;
	s -= 40*157;
    } else {
	*p = 1;
    }
    *r = s / 94;
    *c = s % 94;
    return 1;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq %rcx, %rbx
movq %rdx, %r14
movq %rsi, %r15
leaq 0xc(%rsp), %rsi
leaq 0x8(%rsp), %rdx
callq 0x6637
testl %eax, %eax
je 0x713f
movl 0x8(%rsp), %eax
cmpl $0x40, %eax
jl 0x70ef
leal -0x22(%rax), %ecx
movl %ecx, 0x8(%rsp)
cmpl $0x61, %eax
movl %ecx, %eax
jbe 0x714b
imull $0x9d, 0xc(%rsp), %ecx
leal (%rcx,%rax), %edx
xorl %esi, %esi
cmpl $0x1888, %edx           # imm = 0x1888
leal -0x1888(%rcx,%rax), %eax
cmovll %edx, %eax
setge %sil
incl %esi
movl %esi, (%r15)
cltq
imulq $-0x51b3bea3, %rax, %rcx # imm = 0xAE4C415D
shrq $0x20, %rcx
addl %eax, %ecx
movl %ecx, %edx
shrl $0x1f, %edx
sarl $0x6, %ecx
addl %edx, %ecx
movl %ecx, (%r14)
imull $0x5e, %ecx, %ecx
subl %ecx, %eax
movl %eax, (%rbx)
movl $0x1, %eax
jmp 0x7141
xorl %eax, %eax
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
retq
leaq 0x55892(%rip), %rdi     # 0x5c9e4
leaq 0x55894(%rip), %rsi     # 0x5c9ed
leaq 0x55897(%rip), %rcx     # 0x5c9f7
movl $0xfa, %edx
callq 0x6060
// File: /workspace/github_c_makefile_star2_O3/mloar[P]charset/iso2022.c
// Function: designate
static void designate(charset_state *state, int container,
		      int type, int ibyte, int fbyte)
{
    unsigned long i;

    assert(container >= 0 && container <= 3);
    assert(type == S4 || type == S6 || type == M4 || type == M6);

    for (i = 0; i < lenof(iso2022_subcharsets); i++) {
	if (iso2022_subcharsets[i].type == type &&
	    iso2022_subcharsets[i].i == ibyte &&
	    iso2022_subcharsets[i].f == fbyte) {
	    state->s1 &= ~(0x7fL << (container * 7));
	    state->s1 |= (i << (container * 7));
	    return;
	}
    }
    /*
     * If we don't find the charset, invoke the empty one, so we
     * output ERROR rather than garbage.
     */
    designate(state, container, type, 0, '~');
}

// Assembly:
pushq %rax
cmpl $0x3, %esi
ja 0x81e9
cmpl $0x3, %edx
ja 0x8208
testl %ecx, %ecx
sete %r9b
leaq 0x9f10b(%rip), %rcx     # 0xa7292
notb %r9b
movq %rcx, %r10
xorl %eax, %eax
movsbl -0x2(%r10), %r11d
cmpl %edx, %r11d
setne %r11b
orb %r9b, %r11b
testb $0x1, %r11b
jne 0x81ad
movsbl (%r10), %r11d
cmpl %r11d, %r8d
je 0x81c5
incq %rax
addq $0x28, %r10
cmpq $0x26, %rax
jne 0x818f
movb $0x1, %r9b
movl $0x7e, %r8d
jmp 0x8187
leal (,%rsi,8), %ecx
subl %esi, %ecx
movl $0x7f, %edx
shlq %cl, %rdx
notq %rdx
shlq %cl, %rax
andq 0x8(%rdi), %rdx
orq %rdx, %rax
movq %rax, 0x8(%rdi)
popq %rax
retq
leaq 0x5483c(%rip), %rdi     # 0x5ca2c
leaq 0x547f6(%rip), %rsi     # 0x5c9ed
leaq 0x5484f(%rip), %rcx     # 0x5ca4d
movl $0x149, %edx            # imm = 0x149
callq 0x6060
leaq 0x54872(%rip), %rdi     # 0x5ca81
leaq 0x547d7(%rip), %rsi     # 0x5c9ed
leaq 0x54830(%rip), %rcx     # 0x5ca4d
movl $0x14a, %edx            # imm = 0x14A
callq 0x6060
// File: /workspace/github_c_makefile_star2_O3/mloar[P]charset/iso2022.c
// Function: oselect
static void oselect(charset_state *state, int i, int right,
		    void (*emit)(void *ctx, long int output),
		    void *emitctx)
{
    int shift = (right ? 31-7 : 31-7-7);
    struct iso2022_subcharset const *subcs = &iso2022_subcharsets[i];

    if (((state->s1 >> shift) & 0x7F) != (unsigned)i) {
	state->s1 &= ~(0x7FL << shift);
	state->s1 |= (i << shift);

	if (emit) {
	    emit(emitctx, ESC);
	    if (subcs->type == M4 || subcs->type == M6)
		emit(emitctx, '$');
	    if (subcs->type == S6 || subcs->type == M6) {
		assert(right);
		emit(emitctx, '-');
	    } else if (right) {
		emit(emitctx, ')');
	    } else {
		emit(emitctx, '(');
	    }
	    if (subcs->i)
		emit(emitctx, subcs->i);
	    emit(emitctx, subcs->f);
	}
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rcx, %r9
movl %edx, %ebp
testl %edx, %edx
movl $0x11, %eax
movl $0x18, %ecx
cmovel %eax, %ecx
movq 0x8(%rdi), %rax
movq %rax, %rdx
shrq %cl, %rdx
andl $0x7f, %edx
cmpl %esi, %edx
je 0x82e6
movl $0x7f, %edx
shlq %cl, %rdx
notq %rdx
andq %rdx, %rax
movl %esi, %edx
shll %cl, %edx
movslq %edx, %rcx
orq %rax, %rcx
movq %rcx, 0x8(%rdi)
testq %r9, %r9
je 0x82e6
movq %r8, %rbx
movslq %esi, %rax
leaq (%rax,%rax,4), %rax
leaq 0x9f006(%rip), %rcx     # 0xa7290
leaq (%rcx,%rax,8), %r14
movl $0x1b, %esi
movq %r8, %rdi
movq %r9, %r12
callq *%r9
movzbl (%r14), %r15d
movl %r15d, %eax
andb $-0x2, %al
cmpb $0x2, %al
jne 0x82b4
movl $0x24, %esi
movq %rbx, %rdi
callq *%r12
orl $0x2, %r15d
cmpl $0x3, %r15d
jne 0x82ef
movl $0x2d, %esi
testl %ebp, %ebp
jne 0x82fb
leaq 0x5491e(%rip), %rdi     # 0x5cbec
leaq 0x54718(%rip), %rsi     # 0x5c9ed
leaq 0x54916(%rip), %rcx     # 0x5cbf2
movl $0x339, %edx            # imm = 0x339
callq 0x6060
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
cmpl $0x1, %ebp
movl $0x29, %esi
sbbq $0x0, %rsi
movq %rbx, %rdi
callq *%r12
movsbq 0x2(%r14), %rsi
movq %rbx, %rdi
movq %r12, %rax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmpq *%rax
// File: /workspace/github_c_makefile_star2_O3/mloar[P]charset/iso2022s.c
// Function: iso2022jp_to_ucs
static long int iso2022jp_to_ucs(int subcharset, unsigned long bytes)
{
    switch (subcharset) {
      case 1:			       /* JIS X 0201 bottom half */
	if (bytes == 0x5C)
	    return 0xA5;
	else if (bytes == 0x7E)
	    return 0x203E;
	/* else fall through to ASCII */
      case 0: return bytes;	       /* one-byte ASCII */
	/* (no break needed since all control paths have returned) */
      case 2: return jisx0208_to_unicode(((bytes >> 8) & 0xFF) - 0x21,
					 ((bytes     ) & 0xFF) - 0x21);
      default: return ERROR;
    }
}

// Assembly:
testl %edi, %edi
je 0x8d90
cmpl $0x2, %edi
je 0x8d77
movl $0xffff, %eax           # imm = 0xFFFF
cmpl $0x1, %edi
jne 0x8d76
cmpq $0x5c, %rsi
je 0x8d94
movq %rsi, %rax
cmpq $0x7e, %rsi
jne 0x8d76
movl $0x203e, %eax           # imm = 0x203E
retq
movl %esi, %edi
shrl $0x8, %edi
movl $0xff, %eax
andl %eax, %edi
addl $-0x21, %edi
andl %eax, %esi
addl $-0x21, %esi
jmp 0x8eb4
movq %rsi, %rax
retq
movl $0xa5, %eax
retq
// File: /workspace/github_c_makefile_star2_O3/mloar[P]charset/iso2022s.c
// Function: iso2022jp_from_ucs
static int iso2022jp_from_ucs(long int ucs, int *subcharset,
			      unsigned long *bytes)
{
    int r, c;
    if (ucs < 0x80) {
	*subcharset = 0;
	*bytes = ucs;
	return 1;
    } else if (ucs == 0xA5 || ucs == 0x203E) {
	*subcharset = 1;
	*bytes = (ucs == 0xA5 ? 0x5C : 0x7E);
	return 1;
    } else if (unicode_to_jisx0208(ucs, &r, &c)) {
	*subcharset = 2;
	*bytes = ((r+0x21) << 8) | (c+0x21);
	return 1;
    } else {
	return 0;
    }
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdx, %rbx
movq %rsi, %r14
cmpq $0x7f, %rdi
jg 0x8db3
movl $0x0, (%r14)
jmp 0x8e15
cmpq $0x203e, %rdi           # imm = 0x203E
je 0x8dc5
cmpq $0xa5, %rdi
jne 0x8de3
cmpq $0xa5, %rdi
movl $0x1, (%r14)
movl $0x5c, %eax
movl $0x7e, %edi
cmoveq %rax, %rdi
jmp 0x8e15
leaq 0x4(%rsp), %rsi
movq %rsp, %rdx
callq 0x8f18
testl %eax, %eax
je 0x8e25
movl $0x2, (%r14)
movl 0x4(%rsp), %eax
shll $0x8, %eax
addl $0x2100, %eax           # imm = 0x2100
movslq (%rsp), %rcx
addq $0x21, %rcx
movslq %eax, %rdi
orq %rcx, %rdi
movq %rdi, (%rbx)
movl $0x1, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
xorl %eax, %eax
jmp 0x8e1d
// File: /workspace/github_c_makefile_star2_O3/mloar[P]charset/iso2022s.c
// Function: iso2022kr_to_ucs
static long int iso2022kr_to_ucs(int subcharset, unsigned long bytes)
{
    switch (subcharset) {
      case 0: return bytes;	       /* one-byte ASCII */
      case 1: return ksx1001_to_unicode(((bytes >> 8) & 0xFF) - 0x21,
					((bytes     ) & 0xFF) - 0x21);
      default: return ERROR;
    }
}

// Assembly:
testl %edi, %edi
je 0x8e50
cmpl $0x1, %edi
jne 0x8e4b
movl %esi, %edi
shrl $0x8, %edi
movl $0xff, %eax
andl %eax, %edi
addl $-0x21, %edi
andl %eax, %esi
addl $-0x21, %esi
jmp 0x9159
movl $0xffff, %esi           # imm = 0xFFFF
movq %rsi, %rax
retq
// File: /workspace/github_c_makefile_star2_O3/mloar[P]charset/iso2022s.c
// Function: iso2022kr_from_ucs
static int iso2022kr_from_ucs(long int ucs, int *subcharset,
			      unsigned long *bytes)
{
    int r, c;
    if (ucs < 0x80) {
	*subcharset = 0;
	*bytes = ucs;
	return 1;
    } else if (unicode_to_ksx1001(ucs, &r, &c)) {
	*subcharset = 1;
	*bytes = ((r+0x21) << 8) | (c+0x21);
	return 1;
    } else {
	return 0;
    }
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdx, %rbx
movq %rsi, %r14
cmpq $0x7f, %rdi
jg 0x8e6d
movl $0x0, (%r14)
jmp 0x8e9f
leaq 0x4(%rsp), %rsi
movq %rsp, %rdx
callq 0x91c3
testl %eax, %eax
je 0x8eaf
movl $0x1, (%r14)
movl 0x4(%rsp), %eax
shll $0x8, %eax
addl $0x2100, %eax           # imm = 0x2100
movslq (%rsp), %rcx
addq $0x21, %rcx
movslq %eax, %rdi
orq %rcx, %rdi
movq %rdi, (%rbx)
movl $0x1, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
xorl %eax, %eax
jmp 0x8ea7
nop
// File: /workspace/github_c_makefile_star2_O3/mloar[P]charset/jisx0208.c
// Function: unicode_to_jisx0208
int unicode_to_jisx0208(long int unicode, int *r, int *c)
{
    int rr, cc;
    long int uu;
    int i, j, k;

    i = -1;
    j = lenof(jisx0208_backward);
    while (j - i > 1) {
	k = (i + j) / 2;
	rr = jisx0208_backward[k].r;
	cc = jisx0208_backward[k].c;
	uu = jisx0208_forward[rr][cc];
	if (unicode > uu)
	    i = k;
	else if (unicode < uu)
	    j = k;
	else {
	    *r = rr;
	    *c = cc;
	    return 1;
	}
    }
    return 0;
}

// Assembly:
pushq %r14
pushq %rbx
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
movl $0x1adf, %r9d           # imm = 0x1ADF
leaq 0x58403(%rip), %rcx     # 0x61330
leaq 0x53eec(%rip), %r8      # 0x5ce20
leal (%r9,%rax), %r11d
movl %r11d, %r10d
shrl $0x1f, %r10d
addl %r11d, %r10d
sarl %r10d
movslq %r10d, %rbx
movzbl (%rcx,%rbx,2), %r11d
movzbl 0x1(%rcx,%rbx,2), %ebx
imulq $0xbc, %r11, %r14
addq %r8, %r14
movzwl (%r14,%rbx,2), %r14d
cmpq %rdi, %r14
jge 0x8f6e
movl %r10d, %eax
movl %r9d, %r10d
jmp 0x8f70
jle 0x8f83
movl %r10d, %r11d
subl %eax, %r11d
movl %r10d, %r9d
cmpl $0x1, %r11d
jg 0x8f34
xorl %eax, %eax
jmp 0x8f8d
movl %r11d, (%rsi)
movl %ebx, (%rdx)
movl $0x1, %eax
popq %rbx
popq %r14
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O3/mloar[P]charset/jisx0212.c
// Function: unicode_to_jisx0212
int unicode_to_jisx0212(long int unicode, int *r, int *c)
{
    int rr, cc;
    long int uu;
    int i, j, k;

    i = -1;
    j = lenof(jisx0212_backward);
    while (j - i > 1) {
	k = (i + j) / 2;
	rr = jisx0212_backward[k].r;
	cc = jisx0212_backward[k].c;
	uu = jisx0212_forward[rr][cc];
	if (unicode > uu)
	    i = k;
	else if (unicode < uu)
	    j = k;
	else {
	    *r = rr;
	    *c = cc;
	    return 1;
	}
    }
    return 0;
}

// Assembly:
pushq %r14
pushq %rbx
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
movl $0x17b3, %r9d           # imm = 0x17B3
leaq 0x5fe23(%rip), %rcx     # 0x68e30
leaq 0x5b90c(%rip), %r8      # 0x64920
leal (%r9,%rax), %r11d
movl %r11d, %r10d
shrl $0x1f, %r10d
addl %r11d, %r10d
sarl %r10d
movslq %r10d, %rbx
movzbl (%rcx,%rbx,2), %r11d
movzbl 0x1(%rcx,%rbx,2), %ebx
imulq $0xbc, %r11, %r14
addq %r8, %r14
movzwl (%r14,%rbx,2), %r14d
cmpq %rdi, %r14
jge 0x904e
movl %r10d, %eax
movl %r9d, %r10d
jmp 0x9050
jle 0x9063
movl %r10d, %r11d
subl %eax, %r11d
movl %r10d, %r9d
cmpl $0x1, %r11d
jg 0x9014
xorl %eax, %eax
jmp 0x906d
movl %r11d, (%rsi)
movl %ebx, (%rdx)
movl $0x1, %eax
popq %rbx
popq %r14
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O3/mloar[P]charset/ksx1001.c
// Function: unicode_to_cp949
int unicode_to_cp949(long int unicode, int *r, int *c)
{
    int rr, cc;
    long int uu;
    int i, j, k;

    i = -1;
    j = lenof(cp949_backward);
    while (j - i > 1) {
	k = (i + j) / 2;
	rr = cp949_backward[k].r;
	cc = cp949_backward[k].c;
	uu = cp949_forward[rr][cc];
	if (unicode > uu)
	    i = k;
	else if (unicode < uu)
	    j = k;
	else {
	    *r = rr;
	    *c = cc;
	    return 1;
	}
    }
    return 0;
}

// Assembly:
pushq %r14
pushq %rbx
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
movl $0x4298, %r9d           # imm = 0x4298
leaq 0x6ed1c(%rip), %rcx     # 0x77e10
leaq 0x62d15(%rip), %r8      # 0x6be10
leal (%r9,%rax), %r11d
movl %r11d, %r10d
shrl $0x1f, %r10d
addl %r11d, %r10d
sarl %r10d
movslq %r10d, %rbx
movzbl (%rcx,%rbx,2), %r11d
movzbl 0x1(%rcx,%rbx,2), %ebx
leaq (%r11,%r11,2), %r14
shll $0x7, %r14d
addq %r8, %r14
movzwl (%r14,%rbx,2), %r14d
cmpq %rdi, %r14
jge 0x9136
movl %r10d, %eax
movl %r9d, %r10d
jmp 0x9138
jle 0x914b
movl %r10d, %r11d
subl %eax, %r11d
movl %r10d, %r9d
cmpl $0x1, %r11d
jg 0x90fb
xorl %eax, %eax
jmp 0x9155
movl %r11d, (%rsi)
movl %ebx, (%rdx)
movl $0x1, %eax
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O3/mloar[P]charset/ksx1001.c
// Function: unicode_to_ksx1001
int unicode_to_ksx1001(long int unicode, int *r, int *c)
{
    int rr, cc;
    if (!unicode_to_cp949(unicode, &rr, &cc))
	return 0;
    rr -= 0x21;
    cc -= 0x61;
    if (rr < 0 || rr >= 94 || cc < 0 || cc >= 94)
	return 0;
    *r = rr;
    *c = cc;
    return 1;
}

// Assembly:
pushq %r14
pushq %rbx
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
movl $0x4298, %r9d           # imm = 0x4298
leaq 0x6ec38(%rip), %rcx     # 0x77e10
leaq 0x62c31(%rip), %r8      # 0x6be10
leal (%rax,%r9), %r10d
movl %r10d, %ebx
shrl $0x1f, %ebx
addl %r10d, %ebx
sarl %ebx
movslq %ebx, %r11
movzbl (%rcx,%r11,2), %r10d
movzbl 0x1(%rcx,%r11,2), %r11d
leaq (%r10,%r10,2), %r14
shll $0x7, %r14d
addq %r8, %r14
movzwl (%r14,%r11,2), %r14d
cmpq %rdi, %r14
jge 0x9218
movl %ebx, %eax
movl %r9d, %ebx
jmp 0x921a
jle 0x922b
movl %ebx, %r10d
subl %eax, %r10d
movl %ebx, %r9d
cmpl $0x1, %r10d
jg 0x91df
jmp 0x9246
leal -0x7f(%r10), %eax
cmpl $-0x5e, %eax
setb %al
leal -0xbf(%r11), %ecx
cmpl $-0x5e, %ecx
setb %cl
orb %al, %cl
je 0x924c
xorl %eax, %eax
popq %rbx
popq %r14
retq
addl $-0x61, %r11d
addl $-0x21, %r10d
movl %r10d, (%rsi)
movl %r11d, (%rdx)
movl $0x1, %eax
jmp 0x9248
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O3/mloar[P]charset/localenc.c
// Function: charset_from_localenc
int charset_from_localenc(const char *name)
{
    int i;

    if ( (i = charset_from_mimeenc(name)) != CS_NONE)
	return i;
    if ( (i = charset_from_xenc(name)) != CS_NONE)
	return i;
    if ( (i = charset_from_emacsenc(name)) != CS_NONE)
	return i;

    for (i = 0; i < (int)lenof(localencs); i++) {
	const char *p, *q;
	p = name;
	q = localencs[i].name;
	while (*p || *q) {
		if (tolower((unsigned char)*p) != tolower((unsigned char)*q))
		break;
	    p++; q++;
	}
	if (!*p && !*q)
	    return localencs[i].charset;
    }

    return CS_NONE;		       /* not found */
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rdi, %rbx
callq 0x93bf
testl %eax, %eax
jne 0x935e
movq %rbx, %rdi
callq 0xa03b
testl %eax, %eax
jne 0x935e
movq %rbx, %rdi
callq 0xa117
testl %eax, %eax
jne 0x935e
movb (%rbx), %r14b
testb %r14b, %r14b
sete 0xf(%rsp)
xorl %r13d, %r13d
leaq 0x9e7e2(%rip), %r12     # 0xa7ac0
movq %r13, 0x10(%rsp)
shlq $0x4, %r13
movq (%r13,%r12), %r15
movb (%r15), %bpl
movl %r14d, %eax
orb %bpl, %al
je 0x9356
callq 0x6080
movq (%rax), %rax
movl $0x1, %edx
movb 0xf(%rsp), %cl
movl %r14d, %esi
movzbl %sil, %esi
movl (%rax,%rsi,4), %esi
movzbl %bpl, %edi
cmpl (%rax,%rdi,4), %esi
jne 0x9335
movb (%rbx,%rdx), %sil
testb %sil, %sil
sete %cl
movb (%r15,%rdx), %bpl
incq %rdx
movl %ebp, %edi
orb %sil, %dil
jne 0x930b
jmp 0x9356
testb %bpl, %bpl
setne %al
notb %cl
orb %al, %cl
testb $0x1, %cl
je 0x9356
movq 0x10(%rsp), %r13
incq %r13
xorl %eax, %eax
cmpq $0x66, %r13
jne 0x92de
jmp 0x935e
addq %r13, %r12
movl 0x8(%r12), %eax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/mloar[P]charset/mimeenc.c
// Function: charset_from_mimeenc
int charset_from_mimeenc(const char *name)
{
    int i;

    for (i = 0; i < (int)lenof(mimeencs); i++) {
	const char *p, *q;
	p = name;
	q = mimeencs[i].name;
	while (*p || *q) {
		if (tolower((unsigned char)*p) != tolower((unsigned char)*q))
		break;
	    p++; q++;
	}
	if (!*p && !*q)
	    return mimeencs[i].charset;
    }

    return CS_NONE;		       /* not found */
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rdi, %rbx
movb (%rdi), %r14b
testb %r14b, %r14b
sete 0xf(%rsp)
xorl %r13d, %r13d
leaq 0x9ed3b(%rip), %r12     # 0xa8120
movq %r13, 0x10(%rsp)
shlq $0x4, %r13
movq (%r13,%r12), %r15
movb (%r15), %bpl
movl %r14d, %eax
orb %bpl, %al
je 0x9460
callq 0x6080
movq (%rax), %rax
movl $0x1, %edx
movb 0xf(%rsp), %cl
movl %r14d, %esi
movzbl %sil, %esi
movl (%rax,%rsi,4), %esi
movzbl %bpl, %edi
cmpl (%rax,%rdi,4), %esi
jne 0x943c
movb (%rbx,%rdx), %sil
testb %sil, %sil
sete %cl
movb (%r15,%rdx), %bpl
incq %rdx
movl %ebp, %edi
orb %sil, %dil
jne 0x9412
jmp 0x9460
testb %bpl, %bpl
setne %al
notb %cl
orb %al, %cl
testb $0x1, %cl
je 0x9460
movq 0x10(%rsp), %r13
incq %r13
cmpq $0xd2, %r13
jne 0x93e5
xorl %eax, %eax
jmp 0x9468
addq %r13, %r12
movl 0x8(%r12), %eax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O3/mloar[P]charset/sbcs.c
// Function: write_sbcs
int write_sbcs(charset_spec const *charset, long int input_chr,
	       charset_state *state,
	       void (*emit)(void *ctx, long int output), void *emitctx)
{
    const struct sbcs_data *sd = charset->data;
    long int ret;

    UNUSEDARG(state);

    if (input_chr == -1)
	return TRUE;		       /* stateless; no cleanup required */

    ret = sbcs_from_unicode(sd, input_chr);
    if (ret == ERROR)
	return FALSE;

    emit(emitctx, ret);
    return TRUE;
}

// Assembly:
pushq %rbx
movl $0x1, %ebx
cmpq $-0x1, %rsi
je 0x951e
movq 0x18(%rdi), %rdx
movl 0x900(%rdx), %edi
testl %edi, %edi
jle 0x9512
movl $0xffffffff, %r10d      # imm = 0xFFFFFFFF
leal (%rdi,%r10), %r9d
shrl %r9d
movzbl 0x800(%rdx,%r9), %eax
cmpq %rsi, (%rdx,%rax,8)
jle 0x9505
movl %r9d, %edi
movl %r10d, %r9d
jmp 0x9507
jge 0x9516
leal 0x1(%r9), %eax
movl %r9d, %r10d
cmpl %edi, %eax
jl 0x94e7
xorl %ebx, %ebx
jmp 0x951e
movq %r8, %rdi
movq %rax, %rsi
callq *%rcx
movl %ebx, %eax
popq %rbx
retq
nop
// File: /workspace/github_c_makefile_star2_O3/mloar[P]charset/shiftjis.c
// Function: read_sjis
static void read_sjis(charset_spec const *charset, long int input_chr,
		      charset_state *state,
		      void (*emit)(void *ctx, long int output), void *emitctx)
{
    UNUSEDARG(charset);

    /*
     * For reading Shift-JIS, state->s0 simply contains the single
     * stored lead byte when we are half way through a double-byte
     * character, or 0 if we aren't.
     */

    if (state->s0 == 0) {
	if ((input_chr >= 0x81 && input_chr <= 0x9F) ||
	    (input_chr >= 0xE0 && input_chr <= 0xEF)) {
	    /*
	     * Lead byte. Just store it.
	     */
	    state->s0 = input_chr;
	} else {
	    /*
	     * Anything else we translate through JIS X 0201.
	     */
	    if (input_chr == 0x5C)
		input_chr = 0xA5;
	    else if (input_chr == 0x7E)
		input_chr = 0x203E;
	    else if (input_chr >= 0xA1 && input_chr <= 0xDF)
		input_chr += 0xFF61 - 0xA1;
	    else if (input_chr < 0x80)
		/* do nothing */;
	    else
		input_chr = ERROR;
	    emit(emitctx, input_chr);
	}
    } else {
	/*
	 * We have a stored lead byte. We expect a valid followup
	 * byte.
	 */
	if (input_chr >= 0x40 && input_chr <= 0xFC && input_chr != 0x7F) {
	    int r, c;
	    r = state->s0;
	    if (r >= 0xE0) r -= (0xE0 - 0xA0);
	    r -= 0x81;
	    c = input_chr;
	    if (c > 0x7F) c--;
	    c -= 0x40;
	    r *= 2;
	    if (c >= 94)
		r++, c -= 94;
	    emit(emitctx, jisx0208_to_unicode(r, c));
	} else {
	    emit(emitctx, ERROR);
	}
	state->s0 = 0;
    }
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %r8, %rbx
movq %rdx, %r14
movq (%rdx), %r8
testq %r8, %r8
je 0x95b3
leaq -0x40(%rsi), %rax
cmpq $0xbd, %rax
setae %dl
cmpq $0x7f, %rsi
sete %dil
movl $0xffff, %eax           # imm = 0xFFFF
orb %dl, %dil
jne 0x95a2
xorl %eax, %eax
cmpq $0x7f, %rsi
seta %al
subl %eax, %esi
leal (%r8,%r8), %eax
cmpl $0xe0, %r8d
leal -0x80(%r8,%r8), %r8d
cmovll %eax, %r8d
leal -0x40(%rsi), %edx
leal -0x9e(%rsi), %eax
xorl %edi, %edi
cmpl $0x9e, %esi
setae %dil
leal -0x102(%r8,%rdi), %edi
cmovbl %edx, %eax
movl %eax, %esi
movq %rcx, %r15
callq 0x8eb4
movq %r15, %rcx
movq %rbx, %rdi
movq %rax, %rsi
callq *%rcx
movq $0x0, (%r14)
jmp 0x95d9
leaq -0x81(%rsi), %rax
cmpq $0x1f, %rax
setae %al
movq %rsi, %rdx
andq $-0x10, %rdx
cmpq $0xe0, %rdx
setne %dl
testb %dl, %al
jne 0x95df
movq %rsi, (%r14)
popq %rbx
popq %r14
popq %r15
retq
cmpq $0x5c, %rsi
je 0x95f2
cmpq $0x7e, %rsi
jne 0x95f9
movl $0x203e, %esi           # imm = 0x203E
jmp 0x961f
movl $0xa5, %esi
jmp 0x961f
leaq -0xa1(%rsi), %rax
cmpq $0x3e, %rax
ja 0x960f
addq $0xfec0, %rsi           # imm = 0xFEC0
jmp 0x961f
cmpq $0x80, %rsi
movl $0xffff, %eax           # imm = 0xFFFF
cmovgeq %rax, %rsi
movq %rbx, %rdi
popq %rbx
popq %r14
popq %r15
jmpq *%rcx
// File: /workspace/github_c_makefile_star2_O3/mloar[P]charset/shiftjis.c
// Function: write_sjis
static int write_sjis(charset_spec const *charset, long int input_chr,
		      charset_state *state,
		      void (*emit)(void *ctx, long int output), void *emitctx)
{
    UNUSEDARG(charset);
    UNUSEDARG(state);

    if (input_chr == -1)
	return TRUE;		       /* stateless; no cleanup required */

    if (input_chr < 0x80 && input_chr != 0x5C && input_chr != 0x7E) {
	emit(emitctx, input_chr);
	return TRUE;
    } else if (input_chr == 0xA5) {
	emit(emitctx, 0x5C);
	return TRUE;
    } else if (input_chr == 0x203E) {
	emit(emitctx, 0x7E);
	return TRUE;
    } else if (input_chr >= 0xFF61 && input_chr <= 0xFF9F) {
	emit(emitctx, input_chr - (0xFF61 - 0xA1));
	return TRUE;
    } else {
	int r, c;
	if (unicode_to_jisx0208(input_chr, &r, &c)) {
	    c += 94 * (r % 2);
	    r /= 2;
	    r += 0x81;
	    if (r >= 0xA0) r += 0xE0 - 0xA0;
	    c += 0x40;
	    if (c >= 0x7F) c++;
	    emit(emitctx, r);
	    emit(emitctx, c);
	    return TRUE;
	} else {
	    return FALSE;
	}
    }
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
subq $0x10, %rsp
movl $0x1, %ebp
cmpq $-0x1, %rsi
je 0x9712
movq %r8, %r14
movq %rcx, %rbx
cmpq $0x7f, %rsi
jg 0x965a
cmpq $0x5c, %rsi
je 0x9695
cmpq $0x7e, %rsi
je 0x9695
jmp 0x968e
cmpq $0x203e, %rsi           # imm = 0x203E
je 0x9673
cmpq $0xa5, %rsi
jne 0x967a
movl $0x5c, %esi
jmp 0x968e
movl $0x7e, %esi
jmp 0x968e
leaq -0xff61(%rsi), %rax
cmpq $0x3e, %rax
ja 0x9695
addq $-0xfec0, %rsi          # imm = 0xFFFF0140
movq %r14, %rdi
callq *%rbx
jmp 0x9712
leaq 0xc(%rsp), %rax
leaq 0x8(%rsp), %rdx
movq %rsi, %rdi
movq %rax, %rsi
callq 0x8f18
testl %eax, %eax
je 0x9710
movl 0xc(%rsp), %eax
movl %eax, %ecx
shrl $0x1f, %ecx
addl %eax, %ecx
movl %ecx, %edx
andl $0x7ffffffe, %edx       # imm = 0x7FFFFFFE
movl %eax, %esi
subl %edx, %esi
imull $0x5e, %esi, %edx
addl 0x8(%rsp), %edx
sarl %ecx
xorl %esi, %esi
cmpl $0x3e, %eax
setge %sil
shll $0x6, %esi
leal (%rcx,%rsi), %eax
addl $0x81, %eax
movl %eax, 0xc(%rsp)
xorl %ecx, %ecx
cmpl $0x3f, %edx
setge %cl
addl %edx, %ecx
addl $0x40, %ecx
movl %ecx, 0x8(%rsp)
movslq %eax, %rsi
movq %r14, %rdi
callq *%rbx
movslq 0x8(%rsp), %rsi
movq %r14, %rdi
callq *%rbx
movl $0x1, %ebp
jmp 0x9712
xorl %ebp, %ebp
movl %ebp, %eax
addq $0x10, %rsp
popq %rbx
popq %r14
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O3/mloar[P]charset/utf16.c
// Function: write_utf16
static int write_utf16(charset_spec const *charset, long int input_chr,
		       charset_state *state,
		       void (*emit)(void *ctx, long int output),
		       void *emitctx)
{
    struct utf16 const *utf = (struct utf16 *)charset->data;

    /*
     * state->s0 == 0 means we have not output anything yet (and so
     * must output a BOM before we do anything else). state->s0 ==
     * 1 means we are off and running.
     */

    if (input_chr < 0)
	return TRUE;		       /* no cleanup required */

    if ((input_chr >= 0xD800 && input_chr < 0xE000) ||
	input_chr >= 0x110000) {
	/*
	 * We can't output surrogates, or anything above 0x10FFFF.
	 */
	return FALSE;
    }

    if (!state->s0) {
	state->s0 = 1;
	emithl(emit, emitctx, utf->s0, 0xFEFF);
    }

    if (input_chr < 0x10000) {
	emithl(emit, emitctx, utf->s0, input_chr);
    } else {
	input_chr -= 0x10000;
	/* now input_chr is between 0 and 0xFFFFF inclusive */
	emithl(emit, emitctx, utf->s0, 0xD800 | ((input_chr >> 10) & 0x3FF));
	emithl(emit, emitctx, utf->s0, 0xDC00 | (input_chr & 0x3FF));
    }
    return TRUE;
}

// Assembly:
movl $0x1, %eax
testq %rsi, %rsi
js 0x996e
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rcx, %rbx
movq %rsi, %r15
movabsq $0x7ffffffffffff800, %rax # imm = 0x7FFFFFFFFFFFF800
andq %rsi, %rax
cmpq $0xd800, %rax           # imm = 0xD800
sete %cl
cmpq $0x110000, %rsi         # imm = 0x110000
setae %sil
xorl %eax, %eax
orb %cl, %sil
jne 0x9960
movq %r8, %r14
movq 0x18(%rdi), %r13
cmpq $0x0, (%rdx)
jne 0x98d7
movq $0x1, (%rdx)
xorl %r12d, %r12d
btl $0x11, (%r13)
setae %r12b
leaq 0xfe(%r12), %rsi
xorq $0xff, %r12
movq %r14, %rdi
callq *%rbx
movq %r14, %rdi
movq %r12, %rsi
callq *%rbx
cmpq $0xffff, %r15           # imm = 0xFFFF
ja 0x98e8
movl %r15d, %ebp
shrl $0x8, %ebp
jmp 0x9934
leaq -0x10000(%r15), %rax
shrq $0xa, %rax
movzbl %al, %r12d
movl %eax, %ebp
shrl $0x8, %ebp
orl $0xd8, %ebp
testb $0x2, 0x2(%r13)
jne 0x9916
movq %r14, %rdi
movq %r12, %rsi
callq *%rbx
movl %ebp, %r12d
jmp 0x991d
movl %ebp, %esi
movq %r14, %rdi
callq *%rbx
movq %r14, %rdi
movq %r12, %rsi
callq *%rbx
movl %r15d, %ebp
shrl $0x8, %ebp
andl $0x3, %ebp
orl $0xdc, %ebp
testb $0x2, 0x2(%r13)
movzbl %r15b, %r15d
jne 0x994c
movq %r14, %rdi
movq %r15, %rsi
callq *%rbx
movl %ebp, %r15d
jmp 0x9953
movl %ebp, %esi
movq %r14, %rdi
callq *%rbx
movq %r14, %rdi
movq %r15, %rsi
callq *%rbx
movl $0x1, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O3/mloar[P]charset/xenc.c
// Function: charset_from_xenc
int charset_from_xenc(const char *name)
{
    int i;

    for (i = 0; i < (int)lenof(xencs); i++) {
	const char *p, *q;
	p = name;
	q = xencs[i].name;
	while (*p || *q) {
		if (tolower((unsigned char)*p) != tolower((unsigned char)*q))
		break;
	    p++; q++;
	}
	if (!*p && !*q)
	    return xencs[i].charset;
    }

    return CS_NONE;		       /* not found */
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rdi, %rbx
movb (%rdi), %r14b
testb %r14b, %r14b
sete 0xf(%rsp)
xorl %r13d, %r13d
leaq 0x9f67f(%rip), %r12     # 0xa96e0
movq %r13, 0x10(%rsp)
shlq $0x4, %r13
movq (%r13,%r12), %r15
movb (%r15), %bpl
movl %r14d, %eax
orb %bpl, %al
je 0xa0d9
callq 0x6080
movq (%rax), %rax
movl $0x1, %edx
movb 0xf(%rsp), %cl
movl %r14d, %esi
movzbl %sil, %esi
movl (%rax,%rsi,4), %esi
movzbl %bpl, %edi
cmpl (%rax,%rdi,4), %esi
jne 0xa0b8
movb (%rbx,%rdx), %sil
testb %sil, %sil
sete %cl
movb (%r15,%rdx), %bpl
incq %rdx
movl %ebp, %edi
orb %sil, %dil
jne 0xa08e
jmp 0xa0d9
testb %bpl, %bpl
setne %al
notb %cl
orb %al, %cl
testb $0x1, %cl
je 0xa0d9
movq 0x10(%rsp), %r13
incq %r13
cmpq $0x24, %r13
jne 0xa061
xorl %eax, %eax
jmp 0xa0e1
addq %r13, %r12
movl 0x8(%r12), %eax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/mloar[P]charset/emacsenc.c
// Function: charset_from_emacsenc
int charset_from_emacsenc(const char *name)
{
    int i;

    for (i = 0; i < (int)lenof(emacsencs); i++) {
	const char *p, *q;
	p = name;
	q = emacsencs[i].name;
	while (*p || *q) {
		if (tolower((unsigned char)*p) != tolower((unsigned char)*q))
		break;
	    p++; q++;
	}
	if (!*p && !*q)
	    return emacsencs[i].charset;
    }

    return CS_NONE;		       /* not found */
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rdi, %rbx
movb (%rdi), %r14b
testb %r14b, %r14b
sete 0xf(%rsp)
xorl %r13d, %r13d
leaq 0x9f7e3(%rip), %r12     # 0xa9920
movq %r13, 0x10(%rsp)
shlq $0x4, %r13
movq (%r13,%r12), %r15
movb (%r15), %bpl
movl %r14d, %eax
orb %bpl, %al
je 0xa1b5
callq 0x6080
movq (%rax), %rax
movl $0x1, %edx
movb 0xf(%rsp), %cl
movl %r14d, %esi
movzbl %sil, %esi
movl (%rax,%rsi,4), %esi
movzbl %bpl, %edi
cmpl (%rax,%rdi,4), %esi
jne 0xa194
movb (%rbx,%rdx), %sil
testb %sil, %sil
sete %cl
movb (%r15,%rdx), %bpl
incq %rdx
movl %ebp, %edi
orb %sil, %dil
jne 0xa16a
jmp 0xa1b5
testb %bpl, %bpl
setne %al
notb %cl
orb %al, %cl
testb $0x1, %cl
je 0xa1b5
movq 0x10(%rsp), %r13
incq %r13
cmpq $0x4d, %r13
jne 0xa13d
xorl %eax, %eax
jmp 0xa1bd
addq %r13, %r12
movl 0x8(%r12), %eax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/lengjingzju[P]json/json.c
// Function: print_addi_format
static inline int _print_addi_format(json_print_t *print_ptr, size_t depth)
{
    _PRINT_PTR_REALLOC((depth + 2));
    *print_ptr->cur++ = '\n';
    memset(print_ptr->cur, '\t', depth);
    print_ptr->cur += depth;

    return 0;
err:
    return -1;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
movq 0x10(%rdi), %rax
movq 0x20(%rdi), %rcx
subq %rax, %rcx
addq 0x8(%rdi), %rcx
addq $0x2, %rsi
cmpq %rsi, %rcx
jae 0x1a48
movq %r14, %rdi
callq *0x18(%r14)
testl %eax, %eax
js 0x1a70
movq 0x10(%r14), %rax
leaq 0x1(%rax), %rcx
movq %rcx, 0x10(%r14)
movb $0xa, (%rax)
movq 0x10(%r14), %rdi
pushq $0x9
popq %rsi
movq %rbx, %rdx
callq 0x10f0
addq %rbx, 0x10(%r14)
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
pushq $-0x1
popq %rax
jmp 0x1a68
// File: /workspace/github_c_makefile_star2_O3/lengjingzju[P]json/json_test.c
// Function: copy_data_to_file
int copy_data_to_file(char *data, size_t size, const char *dst)
{
    int ret = -1;
    FILE *wfp = NULL;

    if (!data || !dst)
        return -1;
    if ((wfp = fopen(dst, "wb+")) == NULL)
        return -1;
    if (size == fwrite(data, 1, size, wfp))
        ret = 0;
    _fclose_fp(wfp);
    if (ret < 0 && access(dst, F_OK) == 0)
        unlink(dst);

    return ret;
}

// Assembly:
testq %rdi, %rdi
sete %al
testq %rdx, %rdx
sete %cl
orb %al, %cl
jne 0x2f4d
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %rbx
movq %rsi, %r14
movq %rdi, %r15
leaq 0x7153(%rip), %rsi      # 0xa044
movq %rdx, %rdi
callq 0x11c0
testq %rax, %rax
je 0x2f3c
movq %rax, %r12
movl $0x1, %esi
movq %r15, %rdi
movq %r14, %rdx
movq %rax, %rcx
callq 0x11e0
movq %rax, %r15
movq %r12, %rdi
callq 0x10a0
xorl %eax, %eax
cmpq %r14, %r15
je 0x2f41
movq %rbx, %rdi
xorl %esi, %esi
callq 0x11b0
testl %eax, %eax
jne 0x2f3c
movq %rbx, %rdi
callq 0x1040
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
retq
// File: /workspace/github_c_makefile_star2_O3/lengjingzju[P]json/json_test.c
// Function: read_file_to_data
int read_file_to_data(const char *src, char **data, size_t *size)
{
    FILE *rfp = NULL;
    size_t total = 0;

    if (!src || !data)
        return -1;

    if (!size)
        size = &total;
    *data = NULL, *size = 0;

    if ((rfp = fopen(src, "rb")) == NULL)
        return -1;
    fseek(rfp, 0, SEEK_END);
    *size = ftell(rfp);
    fseek(rfp, 0, SEEK_SET);
    if (*size == 0)
        goto err;

    if ((*data = (char *)_fmalloc(*size + 1)) == NULL)
        goto err;
    if (*size != fread(*data, 1, *size, rfp))
        goto err;

    (*data)[*size] = 0;
    _fclose_fp(rfp);
    return 0;
err:
    _fclose_fp(rfp);
    _free_ptr(*data);
    *size = 0;
    return -1;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
testq %rdi, %rdi
sete %al
testq %rsi, %rsi
sete %cl
movl $0xffffffff, %ebx       # imm = 0xFFFFFFFF
orb %al, %cl
jne 0x3079
movq %rdx, %r14
movq %rsi, %r15
movq $0x0, (%rsi)
testq %rdx, %rdx
je 0x2f8e
movq $0x0, (%r14)
leaq 0x70b3(%rip), %rsi      # 0xa048
callq 0x11c0
testq %rax, %rax
je 0x3079
movq %rax, %r12
movq %rax, %rdi
xorl %esi, %esi
movl $0x2, %edx
callq 0x1170
movq %r12, %rdi
callq 0x1130
movq %rax, %r13
testq %r14, %r14
je 0x2fdc
movq %r13, (%r14)
xorl %r13d, %r13d
movq %r12, %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x1170
movq (%r14), %rdi
jmp 0x2feb
movq %r12, %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x1170
movq %r13, %rdi
testq %rdi, %rdi
je 0x3051
incq %rdi
callq 0x1150
movq %rax, (%r15)
testq %rax, %rax
je 0x3051
testq %r14, %r14
je 0x3025
movq (%r14), %r13
movl $0x1, %esi
movq %rax, %rdi
movq %r13, %rdx
movq %r12, %rcx
callq 0x1070
cmpq %rax, %r13
jne 0x3051
movq (%r14), %r13
jmp 0x303d
movl $0x1, %esi
movq %rax, %rdi
movq %r13, %rdx
movq %r12, %rcx
callq 0x1070
cmpq %rax, %r13
jne 0x3051
movq (%r15), %rax
movb $0x0, (%rax,%r13)
movq %r12, %rdi
callq 0x10a0
xorl %ebx, %ebx
jmp 0x3079
movq %r12, %rdi
callq 0x10a0
movq (%r15), %rdi
testq %rdi, %rdi
je 0x3066
callq 0x1030
movq $0x0, (%r15)
testq %r14, %r14
je 0x3079
movq $0x0, (%r14)
movl %ebx, %eax
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/lengjingzju[P]json/json.c
// Function: json_del_object
void json_del_object(json_object *json)
{
    json_object *p = NULL, *pos = NULL, *n = NULL;

    if (!json)
        return;

    if (json->key_member)
        json_free(json->key_member);

    switch (json->type_member) {
    case JSON_STRING:
        if (json->value.str_member)
            json_free(json->value.str_member);
        break;
    case JSON_ARRAY:
    case JSON_OBJECT:
        json_list_for_each_entry_safe(p, pos, n, &json->value.head, list, json_object) {
            json_list_del(&pos->list, &p->list, &json->value.head);
            json_del_object(pos);
            pos = p;
        }
        break;
    default:
        break;
    }

    json_free(json);
}

// Assembly:
testq %rdi, %rdi
je 0x3eaa
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %rbx
movq 0x10(%rdi), %rdi
testq %rdi, %rdi
je 0x3e68
callq 0x1030
movl 0x8(%rbx), %eax
andl $0xf, %eax
leal -0x8(%rax), %ecx
cmpl $0x2, %ecx
jae 0x3eab
leaq 0x18(%rbx), %r15
movq 0x18(%rbx), %rdi
cmpq %r15, %rdi
je 0x3eda
movq (%rdi), %rax
cmpq %r15, %rax
je 0x3ec0
movq %rax, %r14
movq %rax, (%r15)
movq $0x0, (%rdi)
callq 0x3e4d
movq (%r14), %rax
movq %r14, %rdi
cmpq %r15, %rax
jne 0x3e8b
jmp 0x3ec3
retq
cmpl $0x7, %eax
jne 0x3eda
movq 0x20(%rbx), %rdi
testq %rdi, %rdi
je 0x3eda
callq 0x1030
jmp 0x3eda
movq %rdi, %r14
movq %r15, 0x20(%rbx)
movq %rax, 0x18(%rbx)
movq $0x0, (%r14)
movq %r14, %rdi
callq 0x3e4d
movq %rbx, %rdi
popq %rbx
popq %r14
popq %r15
jmp 0x1030
// File: /workspace/github_c_makefile_star2_O3/lengjingzju[P]json/json.c
// Function: json_string_info_update
void json_string_info_update(json_string_t *jstr)
{
    const char *str = jstr->str;
    int i = 0;
    int escaped = 0;

    if (jstr->len)
        return;

    if (str) {
        for (i = 0; str[i]; ++i) {
            switch (str[i]) {
            case '\"': case '\\': case '\b': case '\f': case '\n': case '\r': case '\t': case '\v':
                escaped = 1;
                break;
            default:
#if JSON_PRINT_UTF16_SUPPORT
                {
                    if ((unsigned char)str[i] < ' ')
                        escaped = 1;
                }
#endif
                break;
            }
        }
    }

    jstr->escaped = escaped;
    jstr->len = i;
}

// Assembly:
movl (%rdi), %eax
cmpl $0xff, %eax
ja 0x3f3d
movq 0x8(%rdi), %rsi
xorl %ecx, %ecx
xorl %edx, %edx
testq %rsi, %rsi
je 0x3f32
movzbl (%rsi), %r8d
leal -0x8(%r8), %r9d
cmpl $0x6, %r9d
jae 0x3f1b
movl $0x1, %edx
addl $0x100, %ecx            # imm = 0x100
incq %rsi
jmp 0x3efd
cmpl $0x22, %r8d
je 0x3f0b
cmpl $0x5c, %r8d
je 0x3f0b
testl %r8d, %r8d
jne 0x3f10
shll $0x4, %edx
andl $0x10, %edx
orl %edx, %ecx
andl $0xef, %eax
orl %ecx, %eax
movl %eax, (%rdi)
retq
// File: /workspace/github_c_makefile_star2_O3/lengjingzju[P]json/json.c
// Function: json_mem_free
static void _json_mem_free(json_mem_mgr_t *mgr)
{
    json_mem_node_t *p = NULL, *pos = NULL, *n = NULL;
    json_list_for_each_entry_safe(p, pos, n, &mgr->head, list, json_mem_node_t) {
        json_list_del(&pos->list, &p->list, &mgr->head);
        json_free(pos->ptr);
        json_free(pos);
        pos = p;
    }
    mgr->cur_node = &s_invalid_json_mem_node;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %rbx
movq (%rdi), %r15
cmpq %rdi, %r15
je 0x400f
movq (%r15), %rax
cmpq %rbx, %rax
je 0x3fed
movq %rax, %r14
movq %rax, (%rbx)
movq $0x0, (%r15)
movq 0x10(%r15), %rdi
callq 0x1030
movq %r15, %rdi
callq 0x1030
movq (%r14), %rax
movq %r14, %r15
cmpq %rbx, %rax
jne 0x3fc2
jmp 0x3ff0
movq %r15, %r14
movq %rbx, 0x8(%rbx)
movq %rax, (%rbx)
movq $0x0, (%r14)
movq 0x10(%r14), %rdi
callq 0x1030
movq %r14, %rdi
callq 0x1030
leaq 0xc27a(%rip), %rax      # 0x10290
movq %rax, 0x18(%rbx)
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/lengjingzju[P]json/json.c
// Function: pjson_memory_alloc
static inline void *pjson_memory_alloc(size_t size, json_mem_mgr_t *mgr)
{
    void *p = NULL;

    if ((mgr->cur_node->cur - mgr->cur_node->ptr) + size > mgr->cur_node->size) {
        if ((_json_mem_new((mgr->mem_size >= size) ? mgr->mem_size : size, mgr) == NULL)) {
            return NULL;
        }
        mgr->cur_node = (json_mem_node_t *)(mgr->head.next);
    }

    p = mgr->cur_node->cur;
    mgr->cur_node->cur += size;
    return p;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %rdi, %r15
movq 0x18(%rsi), %r14
movq 0x18(%r14), %rbx
leaq (%rbx,%rdi), %rax
subq 0x10(%r14), %rax
cmpq 0x8(%r14), %rax
jbe 0x40ab
movq %rsi, %r12
movq 0x10(%rsi), %r13
cmpq %r15, %r13
cmovbeq %r15, %r13
movl $0x20, %edi
callq 0x1150
testq %rax, %rax
je 0x40b4
movq %rax, %r14
movq %r13, 0x8(%rax)
movq %r13, %rdi
callq 0x1150
movq %rax, 0x10(%r14)
testq %rax, %rax
je 0x40de
movq %rax, %rbx
movq %rax, 0x18(%r14)
movq (%r12), %rax
cmpq %r12, %rax
jne 0x409f
movq %r14, 0x8(%r12)
movq %rax, (%r14)
movq %r14, (%r12)
movq %r14, 0x18(%r12)
addq %rbx, %r15
movq %r15, 0x18(%r14)
jmp 0x4113
leaq 0x63a1(%rip), %rdi      # 0xa45c
leaq 0x6559(%rip), %rsi      # 0xa61b
xorl %ebx, %ebx
movl $0x40f, %edx            # imm = 0x40F
xorl %eax, %eax
callq 0x10c0
leaq 0x6889(%rip), %rdi      # 0xa960
callq 0x1060
jmp 0x4113
leaq 0x6377(%rip), %rdi      # 0xa45c
leaq 0x652f(%rip), %rsi      # 0xa61b
xorl %ebx, %ebx
movl $0x414, %edx            # imm = 0x414
xorl %eax, %eax
callq 0x10c0
leaq 0x6528(%rip), %rdi      # 0xa629
movl %r13d, %esi
xorl %eax, %eax
callq 0x10c0
movq %r14, %rdi
callq 0x1030
movq %rbx, %rax
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq