LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O2/mloar[P]charset/euc.c
// Function: write_euc
static int write_euc(charset_spec const *charset, long int input_chr,
		     charset_state *state,
		     void (*emit)(void *ctx, long int output), void *emitctx)
{
    struct euc const *euc = (struct euc *)charset->data;
    unsigned long c;
    int cset, len;

    UNUSEDARG(state);

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

    /* ASCII is the easy bit, and is always the same. */
    if (input_chr < 0x80) {
	emit(emitctx, input_chr);
	return TRUE;
    }

    c = euc->from_ucs(input_chr);
    if (!c) {
	return FALSE;
    }

    cset = c >> 28;
    len = euc->nchars[cset-1];
    c &= 0xFFFFFF;

    if (cset > 1)
	emit(emitctx, 0x8C + cset);    /* SS2/SS3 */

    while (len--)
	emit(emitctx, (c >> (8*len)) & 0xFF);
    return TRUE;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq $0x1
popq %rbx
cmpq $-0x1, %rsi
je 0x6a93
movq %r8, %r15
movq %rcx, %r14
cmpq $0x7f, %rsi
jg 0x6a1a
movq %r15, %rdi
callq *%r14
jmp 0x6a93
movq 0x18(%rdi), %r13
movq %rsi, %rdi
callq *0x18(%r13)
testq %rax, %rax
je 0x6a91
movq %rax, %r12
shrq $0x1c, %rax
movq %rax, %rcx
shlq $0x20, %rcx
movabsq $-0x100000000, %rdx     # imm = 0xFFFFFFFF00000000
addq %rcx, %rdx
sarq $0x1e, %rdx
movl (%r13,%rdx), %r13d
andl $0xffffff, %r12d        # imm = 0xFFFFFF
cmpl $0x2, %eax
jl 0x6a68
addl $0x8c, %eax
movq %r15, %rdi
movq %rax, %rsi
callq *%r14
leaq -0x8(,%r13,8), %r13
cmpq $-0x8, %r13
je 0x6a93
movl %r13d, %ecx
andb $-0x8, %cl
movq %r12, %rax
shrq %cl, %rax
movzbl %al, %esi
movq %r15, %rdi
callq *%r14
addq $-0x8, %r13
jmp 0x6a70
xorl %ebx, %ebx
movl %ebx, %eax
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/mloar[P]charset/euc.c
// Function: euc_cn_to_ucs
static long int euc_cn_to_ucs(unsigned long state)
{
    switch (state >> 28) {
      case 1: return gb2312_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 0x6acd
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 0x6d6c
movl $0xffff, %eax           # imm = 0xFFFF
retq
// File: /workspace/github_c_makefile_star2_O2/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 0x6b3b
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 0x8fab
movl $0xffff, %eax           # imm = 0xFFFF
retq
// File: /workspace/github_c_makefile_star2_O2/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 0x6bd4
cmpq $0x2, %rcx
je 0x6bb8
movl $0xffff, %eax           # imm = 0xFFFF
cmpq $0x1, %rcx
jne 0x6bd3
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 0x8cfc
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 0x8de0
// File: /workspace/github_c_makefile_star2_O2/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 0x6c0e
addq $0x1fff0140, %rbx       # imm = 0x1FFF0140
jmp 0x6c8a
leaq 0xc(%rsp), %rsi
leaq 0x8(%rsp), %rdx
movq %rbx, %rdi
callq 0x8d60
testl %eax, %eax
je 0x6c4b
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 0x6c8a
leaq 0xc(%rsp), %rsi
leaq 0x8(%rsp), %rdx
movq %rbx, %rdi
callq 0x8e44
testl %eax, %eax
je 0x6c88
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 0x6c8a
xorl %ebx, %ebx
movq %rbx, %rax
addq $0x10, %rsp
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O2/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 0x6cc7
cmpq $0x1, %rax
jne 0x6cd2
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 0x66ac
movzbl %dh, %edi
cmpl $0xa7, %edi
jbe 0x6cd8
movl $0xffff, %eax           # imm = 0xFFFF
retq
movl $0xffffff5f, %eax       # imm = 0xFFFFFF5F
addl %eax, %edi
movzbl %dl, %edx
addl %eax, %edx
movl %edi, %esi
jmp 0x66ac
// File: /workspace/github_c_makefile_star2_O2/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 0x674b
testl %eax, %eax
je 0x6d40
movl 0x14(%rsp), %eax
testl %eax, %eax
je 0x6d44
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 0x6d67
xorl %eax, %eax
jmp 0x6d67
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
// File: /workspace/github_c_makefile_star2_O2/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 %rbp
pushq %r15
pushq %r14
pushq %rbx
movq %rdx, %rcx
movl $0x1d15, %r8d           # imm = 0x1D15
movl $0xffffffff, %r10d      # imm = 0xFFFFFFFF
movl $0x2, %r9d
leaq 0x510fe(%rip), %r11     # 0x57ef0
leaq 0x4cbe7(%rip), %rbx     # 0x539e0
leal 0x1(%r10), %ebp
cmpl %ebp, %r8d
jle 0x6e38
leal (%r8,%r10), %eax
cltd
idivl %r9d
movslq %eax, %r14
movzbl (%r11,%r14,2), %edx
movzbl 0x1(%r11,%r14,2), %r14d
imulq $0xbc, %rdx, %r15
addq %rbx, %r15
movzwl (%r15,%r14,2), %r15d
cmpq %rdi, %r15
jl 0x6e33
movl %eax, %r8d
jg 0x6dfd
jmp 0x6e3c
movl %eax, %r10d
jmp 0x6df9
xorl %eax, %eax
jmp 0x6e46
movl %edx, (%rsi)
movl %r14d, (%rcx)
movl $0x1, %eax
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O2/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 0x6f52
movl %r15d, (%rsp)
xorl %r13d, %r13d
jmp 0x6f6a
leaq 0x4(%rsp), %rsi
movq %rsp, %rdx
movq %r15, %rdi
callq 0x6dd0
testl %eax, %eax
je 0x6fca
pushq $0x1
popq %r13
cmpq %r13, (%r12)
je 0x6f96
xorl %ebp, %ebp
cmpq $0x80, %r15
setl %bpl
pushq $0x7e
popq %rsi
movq %r14, %rdi
callq *%rbx
leaq 0x7b(,%rbp,2), %rsi
movq %r14, %rdi
callq *%rbx
movq %r13, (%r12)
pushq $0x1
popq %rbp
testq %r15, %r15
js 0x6fcc
cmpq $0x80, %r15
jge 0x6fac
movl (%rsp), %eax
jmp 0x6fc0
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 0x6fcc
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_O2/mloar[P]charset/iso2022.c
// Function: emacs_big5_1_to_unicode
static long int emacs_big5_1_to_unicode(int r, int c)
{
    unsigned long s;
    s = r * 94 + c;
    r = s / 157;
    c = s % 157;
    if (c >= 64) c += 34; /* Skip over the gap */
    return big5_to_unicode(r, c);
}

// Assembly:
imull $0x5e, %edi, %eax
addl %esi, %eax
cltq
movl $0x9d, %ecx
xorl %edx, %edx
divq %rcx
leal 0x22(%rdx), %esi
cmpq $0x40, %rdx
cmovbl %edx, %esi
movl %eax, %edi
jmp 0x65c8
// File: /workspace/github_c_makefile_star2_O2/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 0x662f
testl %eax, %eax
je 0x70c7
movl 0x8(%rsp), %eax
cmpl $0x40, %eax
jl 0x7091
leal -0x22(%rax), %ecx
movl %ecx, 0x8(%rsp)
cmpl $0x61, %eax
movl %ecx, %eax
jbe 0x70d3
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)
pushq $0x5e
popq %rcx
cltd
idivl %ecx
movl %eax, (%r14)
movl %edx, (%rbx)
pushq $0x1
popq %rax
jmp 0x70c9
xorl %eax, %eax
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
retq
leaq 0x5490a(%rip), %rdi     # 0x5b9e4
leaq 0x5490c(%rip), %rsi     # 0x5b9ed
leaq 0x5490f(%rip), %rcx     # 0x5b9f7
movl $0xfa, %edx
callq 0x6060
// File: /workspace/github_c_makefile_star2_O2/mloar[P]charset/iso2022.c
// Function: emacs_big5_2_to_unicode
static long int emacs_big5_2_to_unicode(int r, int c)
{
    unsigned long s;
    s = r * 94 + c;
    r = s / 157 + 40;
    c = s % 157;
    if (c >= 64) c += 34; /* Skip over the gap */
    return big5_to_unicode(r, c);
}

// Assembly:
imull $0x5e, %edi, %eax
addl %esi, %eax
cltq
movl $0x9d, %ecx
xorl %edx, %edx
divq %rcx
leal 0x22(%rdx), %esi
cmpq $0x40, %rdx
cmovbl %edx, %esi
leal 0x28(%rax), %edi
jmp 0x65c8
// File: /workspace/github_c_makefile_star2_O2/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 %rbx
cmpl $0x3, %esi
ja 0x805f
cmpl $0x3, %edx
ja 0x807e
testl %ecx, %ecx
sete %r9b
leaq 0x9e28d(%rip), %rcx     # 0xa6292
pushq $0x7e
popq %r10
notb %r9b
movq %rcx, %r11
xorl %eax, %eax
cmpq $0x26, %rax
je 0x803b
movsbl -0x2(%r11), %ebx
cmpl %edx, %ebx
setne %bl
orb %r9b, %bl
testb $0x1, %bl
jne 0x8032
movsbl (%r11), %ebx
cmpl %ebx, %r8d
je 0x8043
incq %rax
addq $0x28, %r11
jmp 0x8011
movb $0x1, %r9b
movl %r10d, %r8d
jmp 0x8009
imull $0x7, %esi, %ecx
pushq $0x7f
popq %rdx
shlq %cl, %rdx
notq %rdx
shlq %cl, %rax
andq 0x8(%rdi), %rdx
orq %rdx, %rax
movq %rax, 0x8(%rdi)
popq %rbx
retq
leaq 0x539c6(%rip), %rdi     # 0x5ba2c
leaq 0x53980(%rip), %rsi     # 0x5b9ed
leaq 0x539d9(%rip), %rcx     # 0x5ba4d
movl $0x149, %edx            # imm = 0x149
callq 0x6060
leaq 0x539fc(%rip), %rdi     # 0x5ba81
leaq 0x53961(%rip), %rsi     # 0x5b9ed
leaq 0x539ba(%rip), %rcx     # 0x5ba4d
movl $0x14a, %edx            # imm = 0x14A
callq 0x6060
// File: /workspace/github_c_makefile_star2_O2/mloar[P]charset/iso2022.c
// Function: do_utf8
static void do_utf8(long int input_chr,
		    charset_state *state,
		    void (*emit)(void *ctx, long int output),
		    void *emitctx)
{
    charset_state ustate;

    ustate.s1 = 0;
    ustate.s0 = state->s0 & 0x03ffffffL;
    read_utf8(NULL, input_chr, &ustate, emit, emitctx);
    state->s0 = (state->s0 & ~0x03ffffffL) | (ustate.s0 & 0x03ffffffL);
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq %rcx, %r8
movq %rdx, %rcx
movq %rsi, %rbx
movq %rdi, %rsi
movq %rsp, %r14
andq $0x0, 0x8(%r14)
movl $0x3ffffff, %r15d       # imm = 0x3FFFFFF
movq (%rbx), %rax
andq %r15, %rax
movq %rax, (%r14)
xorl %edi, %edi
movq %r14, %rdx
callq 0x99d4
movq $-0x4000000, %rax       # imm = 0xFC000000
andq (%rbx), %rax
andq (%r14), %r15
orq %rax, %r15
movq %r15, (%rbx)
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/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
pushq $0x11
popq %rax
pushq $0x18
popq %rcx
cmovel %eax, %ecx
movq 0x8(%rdi), %rax
movq %rax, %rdx
shrq %cl, %rdx
andl $0x7f, %edx
cmpl %esi, %edx
je 0x8181
pushq $0x7f
popq %rdx
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 0x8181
movq %r8, %rbx
movslq %esi, %rax
imulq $0x28, %rax, %rax
leaq 0x9e147(%rip), %r14     # 0xa6290
addq %rax, %r14
pushq $0x1b
popq %rsi
movq %r8, %rdi
movq %r9, %r12
callq *%r9
movzbl (%r14), %r15d
movl %r15d, %eax
andb $-0x2, %al
cmpb $0x2, %al
jne 0x816e
pushq $0x24
popq %rsi
movq %rbx, %rdi
callq *%r12
orl $0x2, %r15d
cmpl $0x3, %r15d
jne 0x818a
testl %ebp, %ebp
je 0x81af
pushq $0x2d
popq %rsi
jmp 0x8194
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
cmpl $0x1, %ebp
pushq $0x29
popq %rsi
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
leaq 0x53a36(%rip), %rdi     # 0x5bbec
leaq 0x53830(%rip), %rsi     # 0x5b9ed
leaq 0x53a2e(%rip), %rcx     # 0x5bbf2
movl $0x339, %edx            # imm = 0x339
callq 0x6060
// File: /workspace/github_c_makefile_star2_O2/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 0x8be5
cmpl $0x2, %edi
je 0x8bcc
movl $0xffff, %eax           # imm = 0xFFFF
cmpl $0x1, %edi
jne 0x8bcb
cmpq $0x5c, %rsi
je 0x8be9
movq %rsi, %rax
cmpq $0x7e, %rsi
jne 0x8bcb
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 0x8cfc
movq %rsi, %rax
retq
movl $0xa5, %eax
retq
// File: /workspace/github_c_makefile_star2_O2/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 0x8c05
andl $0x0, (%r14)
jmp 0x8c63
cmpq $0x203e, %rdi           # imm = 0x203E
je 0x8c17
cmpq $0xa5, %rdi
jne 0x8c31
cmpq $0xa5, %rdi
movl $0x1, (%r14)
pushq $0x5c
popq %rax
pushq $0x7e
popq %rdi
cmoveq %rax, %rdi
jmp 0x8c63
leaq 0x4(%rsp), %rsi
movq %rsp, %rdx
callq 0x8d60
testl %eax, %eax
je 0x8c71
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)
pushq $0x1
popq %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
xorl %eax, %eax
jmp 0x8c69
// File: /workspace/github_c_makefile_star2_O2/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 0x8c9c
cmpl $0x1, %edi
jne 0x8c97
movl %esi, %edi
shrl $0x8, %edi
movl $0xff, %eax
andl %eax, %edi
addl $-0x21, %edi
andl %eax, %esi
addl $-0x21, %esi
jmp 0x8fab
movl $0xffff, %esi           # imm = 0xFFFF
movq %rsi, %rax
retq
// File: /workspace/github_c_makefile_star2_O2/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 0x8cb6
andl $0x0, (%r14)
jmp 0x8ce8
leaq 0x4(%rsp), %rsi
movq %rsp, %rdx
callq 0x9014
testl %eax, %eax
je 0x8cf6
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)
pushq $0x1
popq %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
xorl %eax, %eax
jmp 0x8cee
nop
// File: /workspace/github_c_makefile_star2_O2/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 %rbp
pushq %r15
pushq %r14
pushq %rbx
movq %rdx, %rcx
movl $0x1adf, %r8d           # imm = 0x1ADF
movl $0xffffffff, %r10d      # imm = 0xFFFFFFFF
movl $0x2, %r9d
leaq 0x575ae(%rip), %r11     # 0x60330
leaq 0x53097(%rip), %rbx     # 0x5be20
leal 0x1(%r10), %ebp
cmpl %ebp, %r8d
jle 0x8dc8
leal (%r8,%r10), %eax
cltd
idivl %r9d
movslq %eax, %r14
movzbl (%r11,%r14,2), %edx
movzbl 0x1(%r11,%r14,2), %r14d
imulq $0xbc, %rdx, %r15
addq %rbx, %r15
movzwl (%r15,%r14,2), %r15d
cmpq %rdi, %r15
jl 0x8dc3
movl %eax, %r8d
jg 0x8d8d
jmp 0x8dcc
movl %eax, %r10d
jmp 0x8d89
xorl %eax, %eax
jmp 0x8dd6
movl %edx, (%rsi)
movl %r14d, (%rcx)
movl $0x1, %eax
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O2/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 %rbp
pushq %r15
pushq %r14
pushq %rbx
movq %rdx, %rcx
movl $0x17b3, %r8d           # imm = 0x17B3
movl $0xffffffff, %r10d      # imm = 0xFFFFFFFF
movl $0x2, %r9d
leaq 0x5efca(%rip), %r11     # 0x67e30
leaq 0x5aab3(%rip), %rbx     # 0x63920
leal 0x1(%r10), %ebp
cmpl %ebp, %r8d
jle 0x8eac
leal (%r8,%r10), %eax
cltd
idivl %r9d
movslq %eax, %r14
movzbl (%r11,%r14,2), %edx
movzbl 0x1(%r11,%r14,2), %r14d
imulq $0xbc, %rdx, %r15
addq %rbx, %r15
movzwl (%r15,%r14,2), %r15d
cmpq %rdi, %r15
jl 0x8ea7
movl %eax, %r8d
jg 0x8e71
jmp 0x8eb0
movl %eax, %r10d
jmp 0x8e6d
xorl %eax, %eax
jmp 0x8eba
movl %edx, (%rsi)
movl %r14d, (%rcx)
movl $0x1, %eax
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O2/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 %rbp
pushq %r15
pushq %r14
pushq %rbx
movq %rdx, %rcx
movl $0x4298, %r8d           # imm = 0x4298
movl $0xffffffff, %r10d      # imm = 0xFFFFFFFF
movl $0x2, %r9d
leaq 0x6dec0(%rip), %r11     # 0x76e10
leaq 0x61eb9(%rip), %rbx     # 0x6ae10
leal 0x1(%r10), %ebp
cmpl %ebp, %r8d
jle 0x8f96
leal (%r8,%r10), %eax
cltd
idivl %r9d
movslq %eax, %r14
movzbl (%r11,%r14,2), %edx
movzbl 0x1(%r11,%r14,2), %r14d
imulq $0x180, %rdx, %r15      # imm = 0x180
addq %rbx, %r15
movzwl (%r15,%r14,2), %r15d
cmpq %rdi, %r15
jl 0x8f91
movl %eax, %r8d
jg 0x8f5b
jmp 0x8f9a
movl %eax, %r10d
jmp 0x8f57
xorl %eax, %eax
jmp 0x8fa4
movl %edx, (%rsi)
movl %r14d, (%rcx)
movl $0x1, %eax
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/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
pushq %rax
movq %rdx, %rbx
movq %rsi, %r14
leaq 0x4(%rsp), %rsi
movq %rsp, %rdx
callq 0x8f2e
movl %eax, %ecx
xorl %eax, %eax
testl %ecx, %ecx
je 0x9064
movl 0x4(%rsp), %ecx
movl (%rsp), %edx
leal -0x7f(%rcx), %esi
cmpl $-0x5e, %esi
setb %sil
leal -0xbf(%rdx), %edi
cmpl $-0x5e, %edi
setb %dil
orb %sil, %dil
jne 0x9064
addl $-0x61, %edx
addl $-0x21, %ecx
movl %ecx, (%r14)
movl %edx, (%rbx)
pushq $0x1
popq %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O2/mloar[P]charset/localenc.c
// Function: charset_to_localenc
const char *charset_to_localenc(int charset)
{
    int i;

    for (i = 0; i < (int)lenof(localencs); i++)
	if (charset == localencs[i].charset)
	    return localencs[i].name;

    return NULL;		       /* not found */
}

// Assembly:
pushq $-0x10
popq %rdx
xorl %eax, %eax
leaq 0x9da48(%rip), %rcx     # 0xa6ac0
leaq 0x10(%rdx), %rsi
cmpq $0x660, %rsi            # imm = 0x660
je 0x9092
cmpl %edi, 0x18(%rdx,%rcx)
movq %rsi, %rdx
jne 0x9078
movq (%rsi,%rcx), %rax
retq
// File: /workspace/github_c_makefile_star2_O2/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, %r14
callq 0x919f
testl %eax, %eax
jne 0x90c5
movq %r14, %rdi
callq 0x9d63
testl %eax, %eax
jne 0x90c5
movq %r14, %rdi
callq 0x9e0b
testl %eax, %eax
je 0x90d8
movl %eax, %ebx
movl %ebx, %eax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
xorl %ebx, %ebx
movq $0x0, 0x8(%rsp)
movq 0x8(%rsp), %rax
cmpq $0x66, %rax
je 0x90c7
shlq $0x4, %rax
leaq 0x9d9c7(%rip), %rcx     # 0xa6ac0
leaq (%rcx,%rax), %rdx
movq %rdx, 0x10(%rsp)
movq (%rax,%rcx), %rbp
xorl %r15d, %r15d
movzbl (%r14,%r15), %r13d
movb (%rbp,%r15), %al
movl %r13d, %ecx
orb %al, %cl
je 0x913f
movzbl %al, %r12d
callq 0x6080
movq (%rax), %rax
movl (%rax,%r13,4), %ecx
cmpl (%rax,%r12,4), %ecx
jne 0x9135
incq %r15
jmp 0x9109
incq 0x8(%rsp)
orb %r13b, %r12b
jne 0x90e3
movq 0x10(%rsp), %rax
movl 0x8(%rax), %ebx
jmp 0x90c7
// File: /workspace/github_c_makefile_star2_O2/mloar[P]charset/localenc.c
// Function: charset_localenc_nth
int charset_localenc_nth(int n)
{
    int i;

    for (i = 0; i < (int)lenof(localencs); i++)
	if (localencs[i].return_in_enum && !n--)
	    return localencs[i].charset;

    return CS_NONE;		       /* end of list */
}

// Assembly:
pushq $0xc
popq %rax
leaq 0x9d96a(%rip), %rcx     # 0xa6ac0
cmpq $0x66c, %rax            # imm = 0x66C
je 0x916f
cmpl $0x0, (%rax,%rcx)
je 0x9169
subl $0x1, %edi
jb 0x9172
addq $0x10, %rax
jmp 0x9156
xorl %eax, %eax
retq
movl -0x4(%rax,%rcx), %eax
retq
nop
// File: /workspace/github_c_makefile_star2_O2/mloar[P]charset/mimeenc.c
// Function: charset_to_mimeenc
const char *charset_to_mimeenc(int charset)
{
    int i;

    for (i = 0; i < (int)lenof(mimeencs); i++)
	if (charset == mimeencs[i].charset)
	    return mimeencs[i].name;

    return NULL;		       /* not found */
}

// Assembly:
pushq $-0x10
popq %rdx
xorl %eax, %eax
leaq 0x9df9c(%rip), %rcx     # 0xa7120
leaq 0x10(%rdx), %rsi
cmpq $0xd20, %rsi            # imm = 0xD20
je 0x919e
cmpl %edi, 0x18(%rdx,%rcx)
movq %rsi, %rdx
jne 0x9184
movq (%rsi,%rcx), %rax
retq
// File: /workspace/github_c_makefile_star2_O2/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
pushq %rax
movq %rdi, %r14
xorl %r12d, %r12d
cmpq $0xd2, %r12
je 0x921e
movq %r12, %rax
shlq $0x4, %rax
leaq 0x9df59(%rip), %rcx     # 0xa7120
leaq (%rcx,%rax), %rdx
movq %rdx, (%rsp)
movq (%rax,%rcx), %rbp
xorl %r15d, %r15d
movzbl (%r14,%r15), %ebx
movb (%rbp,%r15), %al
movl %ebx, %ecx
orb %al, %cl
je 0x9208
movzbl %al, %r13d
callq 0x6080
movq (%rax), %rax
movl (%rax,%rbx,4), %ecx
cmpl (%rax,%r13,4), %ecx
jne 0x9200
incq %r15
jmp 0x91d6
incq %r12
orb %bl, %r13b
jne 0x91b0
movq (%rsp), %rax
movl 0x8(%rax), %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
xorl %eax, %eax
jmp 0x920f
nop
// File: /workspace/github_c_makefile_star2_O2/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 %rbp
pushq %r14
pushq %rbx
pushq $0x1
popq %rbp
cmpq $-0x1, %rsi
je 0x929c
movq %r8, %r14
movq %rcx, %rbx
movq 0x18(%rdi), %rdi
callq 0x9236
xorl %ecx, %ecx
cmpq $0xffff, %rax           # imm = 0xFFFF
je 0x929e
movq %r14, %rdi
movq %rax, %rsi
callq *%rbx
movl %ebp, %ecx
movl %ecx, %eax
popq %rbx
popq %r14
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O2/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 0x9334
leaq -0x40(%rsi), %rax
cmpq $0xbd, %rax
setae %dl
cmpq $0x7f, %rsi
sete %dil
movl $0xffff, %eax           # imm = 0xFFFF
orb %dl, %dil
jne 0x9326
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 0x8cfc
movq %r15, %rcx
movq %rbx, %rdi
movq %rax, %rsi
callq *%rcx
andq $0x0, (%r14)
jmp 0x935a
leaq -0x81(%rsi), %rax
cmpq $0x1f, %rax
setae %al
movq %rsi, %rdx
andq $-0x10, %rdx
cmpq $0xe0, %rdx
setne %dl
testb %dl, %al
jne 0x9360
movq %rsi, (%r14)
popq %rbx
popq %r14
popq %r15
retq
cmpq $0x5c, %rsi
je 0x9373
cmpq $0x7e, %rsi
jne 0x937a
movl $0x203e, %esi           # imm = 0x203E
jmp 0x93a0
movl $0xa5, %esi
jmp 0x93a0
leaq -0xa1(%rsi), %rax
cmpq $0x3e, %rax
ja 0x9390
addq $0xfec0, %rsi           # imm = 0xFEC0
jmp 0x93a0
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_O2/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
pushq $0x1
popq %rbp
cmpq $-0x1, %rsi
je 0x9485
movq %r8, %r14
movq %rcx, %rbx
cmpq $0x7f, %rsi
jg 0x93d9
cmpq $0x5c, %rsi
je 0x9412
cmpq $0x7e, %rsi
je 0x9412
jmp 0x93f2
cmpq $0x203e, %rsi           # imm = 0x203E
je 0x93ef
cmpq $0xa5, %rsi
jne 0x93fc
pushq $0x5c
jmp 0x93f1
pushq $0x7e
popq %rsi
movq %r14, %rdi
callq *%rbx
jmp 0x9485
leaq -0xff61(%rsi), %rax
cmpq $0x3e, %rax
ja 0x9412
addq $-0xfec0, %rsi          # imm = 0xFFFF0140
jmp 0x93f2
leaq 0xc(%rsp), %rax
leaq 0x8(%rsp), %rdx
movq %rsi, %rdi
movq %rax, %rsi
callq 0x8d60
testl %eax, %eax
je 0x9483
movl 0xc(%rsp), %ecx
pushq $0x2
popq %rsi
movl %ecx, %eax
cltd
idivl %esi
movl %ecx, %esi
subl %eax, %esi
subl %eax, %esi
imull $0x5e, %esi, %edx
addl 0x8(%rsp), %edx
xorl %esi, %esi
cmpl $0x3e, %ecx
setge %sil
shll $0x6, %esi
addl %esi, %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
pushq $0x1
popq %rbp
jmp 0x9485
xorl %ebp, %ebp
movl %ebp, %eax
addq $0x10, %rsp
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/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:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq $0x1
popq %rbp
testq %rsi, %rsi
js 0x9675
movq %rcx, %r15
movq %rsi, %rbx
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 0x9677
movq %r8, %r14
movq 0x18(%rdi), %r12
cmpq $0x0, (%rdx)
jne 0x9626
movq $0x1, (%rdx)
movslq (%r12), %rdx
movl $0xfeff, %ecx           # imm = 0xFEFF
movq %r15, %rdi
movq %r14, %rsi
callq 0x9680
cmpq $0xffff, %rbx           # imm = 0xFFFF
ja 0x9635
movslq (%r12), %rdx
jmp 0x9667
leaq -0x10000(%rbx), %rcx
movslq (%r12), %rdx
shrq $0xa, %rcx
orq $0xd800, %rcx           # imm = 0xD800
movq %r15, %rdi
movq %r14, %rsi
callq 0x9680
movslq (%r12), %rdx
andl $0x3ff, %ebx            # imm = 0x3FF
orq $0xdc00, %rbx           # imm = 0xDC00
movq %r15, %rdi
movq %r14, %rsi
movq %rbx, %rcx
callq 0x9680
movl %ebp, %eax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/mloar[P]charset/utf16.c
// Function: emithl
static void emithl(void (*emit)(void *ctx, long int output), void *emitctx,
		   unsigned long s0, long int hw)
{
    int h = (hw >> 8) & 0xFF, l = hw & 0xFF;

    if (s0 & 0x20000) {
	/* Big-endian takes priority over little, if both are allowed. */
	emit(emitctx, h);
	emit(emitctx, l);
    } else {
	emit(emitctx, l);
	emit(emitctx, h);
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %rax
movzbl %ch, %ebp
btl $0x11, %edx
movzbl %cl, %r14d
jb 0x96aa
movq %rbx, %rdi
movq %r14, %rsi
movq %rax, %r15
callq *%rax
movl %ebp, %r14d
jmp 0x96b4
movl %ebp, %esi
movq %rbx, %rdi
movq %rax, %r15
callq *%rax
movq %rbx, %rdi
movq %r14, %rsi
movq %r15, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmpq *%rax
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O2/mloar[P]charset/xenc.c
// Function: charset_to_xenc
const char *charset_to_xenc(int charset)
{
    int i;

    for (i = 0; i < (int)lenof(xencs); i++)
	if (charset == xencs[i].charset)
	    return xencs[i].name;

    return NULL;		       /* not found */
}

// Assembly:
pushq $-0x10
popq %rdx
xorl %eax, %eax
leaq 0x9e998(%rip), %rcx     # 0xa86e0
leaq 0x10(%rdx), %rsi
cmpq $0x240, %rsi            # imm = 0x240
je 0x9d62
cmpl %edi, 0x18(%rdx,%rcx)
movq %rsi, %rdx
jne 0x9d48
movq (%rsi,%rcx), %rax
retq
// File: /workspace/github_c_makefile_star2_O2/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
pushq %rax
movq %rdi, %r14
xorl %r12d, %r12d
cmpq $0x24, %r12
je 0x9ddf
movq %r12, %rax
shlq $0x4, %rax
leaq 0x9e958(%rip), %rcx     # 0xa86e0
leaq (%rcx,%rax), %rdx
movq %rdx, (%rsp)
movq (%rax,%rcx), %rbp
xorl %r15d, %r15d
movzbl (%r14,%r15), %ebx
movb (%rbp,%r15), %al
movl %ebx, %ecx
orb %al, %cl
je 0x9dc9
movzbl %al, %r13d
callq 0x6080
movq (%rax), %rax
movl (%rax,%rbx,4), %ecx
cmpl (%rax,%r13,4), %ecx
jne 0x9dc1
incq %r15
jmp 0x9d97
incq %r12
orb %bl, %r13b
jne 0x9d74
movq (%rsp), %rax
movl 0x8(%rax), %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
xorl %eax, %eax
jmp 0x9dd0
nop
// File: /workspace/github_c_makefile_star2_O2/mloar[P]charset/emacsenc.c
// Function: charset_to_emacsenc
const char *charset_to_emacsenc(int charset)
{
    int i;

    for (i = 0; i < (int)lenof(emacsencs); i++)
	if (charset == emacsencs[i].charset)
	    return emacsencs[i].name;

    return NULL;		       /* not found */
}

// Assembly:
pushq $-0x10
popq %rdx
xorl %eax, %eax
leaq 0x9eb30(%rip), %rcx     # 0xa8920
leaq 0x10(%rdx), %rsi
cmpq $0x4d0, %rsi            # imm = 0x4D0
je 0x9e0a
cmpl %edi, 0x18(%rdx,%rcx)
movq %rsi, %rdx
jne 0x9df0
movq (%rsi,%rcx), %rax
retq
// File: /workspace/github_c_makefile_star2_O2/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
pushq %rax
movq %rdi, %r14
xorl %r12d, %r12d
cmpq $0x4d, %r12
je 0x9e87
movq %r12, %rax
shlq $0x4, %rax
leaq 0x9eaf0(%rip), %rcx     # 0xa8920
leaq (%rcx,%rax), %rdx
movq %rdx, (%rsp)
movq (%rax,%rcx), %rbp
xorl %r15d, %r15d
movzbl (%r14,%r15), %ebx
movb (%rbp,%r15), %al
movl %ebx, %ecx
orb %al, %cl
je 0x9e71
movzbl %al, %r13d
callq 0x6080
movq (%rax), %rax
movl (%rax,%rbx,4), %ecx
cmpl (%rax,%r13,4), %ecx
jne 0x9e69
incq %r15
jmp 0x9e3f
incq %r12
orb %bl, %r13b
jne 0x9e1c
movq (%rsp), %rax
movl 0x8(%rax), %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
xorl %eax, %eax
jmp 0x9e78
// File: /workspace/github_c_makefile_star2_O2/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:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
testq %rdi, %rdi
sete %al
testq %rdx, %rdx
sete %cl
pushq $-0x1
popq %rbp
orb %al, %cl
jne 0x135d
movq %rdx, %rbx
movq %rsi, %r14
movq %rdi, %r15
leaq 0x6d30(%rip), %rsi      # 0x8044
movq %rdx, %rdi
callq 0x11c0
testq %rax, %rax
je 0x135d
movq %rax, %r12
pushq $0x1
popq %rsi
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 0x135f
movq %rbx, %rdi
xorl %esi, %esi
callq 0x11b0
testl %eax, %eax
jne 0x135d
movq %rbx, %rdi
callq 0x1040
movl %ebp, %eax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/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 %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
testq %rdi, %rdi
sete %al
testq %rsi, %rsi
sete %cl
pushq $-0x1
popq %rbx
orb %al, %cl
jne 0x145e
movq %rdx, %r14
movq %rsi, %r15
andq $0x0, (%rsi)
testq %rdx, %rdx
je 0x139d
andq $0x0, (%r14)
leaq 0x6ca4(%rip), %rsi      # 0x8048
callq 0x11c0
testq %rax, %rax
je 0x145e
movq %rax, %r12
pushq $0x2
popq %rdx
movq %rax, %rdi
xorl %esi, %esi
callq 0x1170
movq %r12, %rdi
callq 0x1130
movq %rax, %r13
testq %r14, %r14
je 0x13d8
movq %r13, (%r14)
xorl %r13d, %r13d
movq %r12, %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x1170
movq %r13, %rdi
testq %r14, %r14
je 0x13ef
movq (%r14), %rdi
testq %rdi, %rdi
je 0x1441
incq %rdi
callq 0x1150
movq %rax, (%r15)
testq %rax, %rax
je 0x1441
movq %r13, %rbp
testq %r14, %r14
je 0x140f
movq (%r14), %rbp
pushq $0x1
popq %rsi
movq %rax, %rdi
movq %rbp, %rdx
movq %r12, %rcx
callq 0x1070
cmpq %rax, %rbp
jne 0x1441
movq (%r15), %rax
testq %r14, %r14
je 0x1430
movq (%r14), %r13
movb $0x0, (%rax,%r13)
movq %r12, %rdi
callq 0x10a0
xorl %ebx, %ebx
jmp 0x145e
movq %r12, %rdi
callq 0x10a0
movq (%r15), %rdi
callq 0x1030
andq $0x0, (%r15)
testq %r14, %r14
je 0x145e
andq $0x0, (%r14)
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/lengjingzju[P]json/./json.h
// Function: json_sax_print_format_start
static inline json_sax_print_hd json_sax_print_format_start(int item_total, json_print_ptr_t *ptr)
{
    json_print_choice_t choice;

    memset(&choice, 0, sizeof(choice));
    choice.format_flag = true;
    choice.item_total = item_total;
    choice.ptr = ptr;
    return json_sax_print_start(&choice);
}

// Assembly:
subq $0x38, %rsp
xorps %xmm0, %xmm0
movq %rsp, %rax
movaps %xmm0, 0x10(%rax)
movaps %xmm0, 0x20(%rax)
movaps %xmm0, (%rax)
movb $0x1, 0x1c(%rax)
movl %edi, 0x18(%rax)
movq %rax, %rdi
callq 0x3694
addq $0x38, %rsp
retq
// File: /workspace/github_c_makefile_star2_O2/lengjingzju[P]json/./json.h
// Function: json_sax_fprint_format_start
static inline json_sax_print_hd json_sax_fprint_format_start(int item_total, const char *path, json_print_ptr_t *ptr)
{
    json_print_choice_t choice;

    memset(&choice, 0, sizeof(choice));
    choice.format_flag = true;
    choice.item_total = item_total;
    choice.path = path;
    choice.ptr = ptr;
    return json_sax_print_start(&choice);
}

// Assembly:
subq $0x38, %rsp
xorps %xmm0, %xmm0
movq %rsp, %rax
movaps %xmm0, 0x10(%rax)
movaps %xmm0, (%rax)
movb $0x1, 0x1c(%rax)
movl %edi, 0x18(%rax)
leaq 0xc8bf(%rip), %rcx      # 0xe120
movq %rcx, 0x28(%rax)
andq $0x0, 0x20(%rax)
movq %rax, %rdi
callq 0x3694
addq $0x38, %rsp
retq