LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O1/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 0x83e1
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 0x83e1
movq %r8, %rbx
movslq %esi, %rax
leaq (%rax,%rax,4), %rax
leaq 0x9ef0b(%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 0x83af
movl $0x24, %esi
movq %rbx, %rdi
callq *%r12
orl $0x2, %r15d
cmpl $0x3, %r15d
jne 0x83ea
movl $0x2d, %esi
testl %ebp, %ebp
jne 0x83f6
leaq 0x5483f(%rip), %rdi     # 0x5cc08
leaq 0x54639(%rip), %rsi     # 0x5ca09
leaq 0x54837(%rip), %rcx     # 0x5cc0e
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
movq %r12, %r15
callq *%r12
movsbq 0x1(%r14), %rsi
testq %rsi, %rsi
je 0x840f
movq %rbx, %rdi
callq *%r15
movsbq 0x2(%r14), %rsi
movq %rbx, %rdi
movq %r15, %rax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmpq *%rax
// File: /workspace/github_c_makefile_star2_O1/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 0x8f28
cmpl $0x2, %edi
je 0x8f0f
movl $0xffff, %eax           # imm = 0xFFFF
cmpl $0x1, %edi
jne 0x8f0e
cmpq $0x5c, %rsi
je 0x8f2c
movq %rsi, %rax
cmpq $0x7e, %rsi
jne 0x8f0e
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 0x904c
movq %rsi, %rax
retq
movl $0xa5, %eax
retq
// File: /workspace/github_c_makefile_star2_O1/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 0x8f4b
movl $0x0, (%r14)
jmp 0x8fad
cmpq $0x203e, %rdi           # imm = 0x203E
je 0x8f5d
cmpq $0xa5, %rdi
jne 0x8f7b
cmpq $0xa5, %rdi
movl $0x1, (%r14)
movl $0x5c, %eax
movl $0x7e, %edi
cmoveq %rax, %rdi
jmp 0x8fad
leaq 0x4(%rsp), %rsi
movq %rsp, %rdx
callq 0x90b0
testl %eax, %eax
je 0x8fbd
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 0x8fb5
// File: /workspace/github_c_makefile_star2_O1/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 0x8fe8
cmpl $0x1, %edi
jne 0x8fe3
movl %esi, %edi
shrl $0x8, %edi
movl $0xff, %eax
andl %eax, %edi
addl $-0x21, %edi
andl %eax, %esi
addl $-0x21, %esi
jmp 0x92f1
movl $0xffff, %esi           # imm = 0xFFFF
movq %rsi, %rax
retq
// File: /workspace/github_c_makefile_star2_O1/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 0x9005
movl $0x0, (%r14)
jmp 0x9037
leaq 0x4(%rsp), %rsi
movq %rsp, %rdx
callq 0x935b
testl %eax, %eax
je 0x9047
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 0x903f
nop
// File: /workspace/github_c_makefile_star2_O1/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 0x5828b(%rip), %rcx     # 0x61350
leaq 0x53d74(%rip), %r8      # 0x5ce40
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 0x9106
movl %r10d, %eax
movl %r9d, %r10d
jmp 0x9108
jle 0x911b
movl %r10d, %r11d
subl %eax, %r11d
movl %r10d, %r9d
cmpl $0x1, %r11d
jg 0x90cc
xorl %eax, %eax
jmp 0x9125
movl %r11d, (%rsi)
movl %ebx, (%rdx)
movl $0x1, %eax
popq %rbx
popq %r14
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O1/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 0x5fcab(%rip), %rcx     # 0x68e50
leaq 0x5b794(%rip), %r8      # 0x64940
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 0x91e6
movl %r10d, %eax
movl %r9d, %r10d
jmp 0x91e8
jle 0x91fb
movl %r10d, %r11d
subl %eax, %r11d
movl %r10d, %r9d
cmpl $0x1, %r11d
jg 0x91ac
xorl %eax, %eax
jmp 0x9205
movl %r11d, (%rsi)
movl %ebx, (%rdx)
movl $0x1, %eax
popq %rbx
popq %r14
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O1/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 0x6eba4(%rip), %rcx     # 0x77e30
leaq 0x62b9d(%rip), %r8      # 0x6be30
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 0x92ce
movl %r10d, %eax
movl %r9d, %r10d
jmp 0x92d0
jle 0x92e3
movl %r10d, %r11d
subl %eax, %r11d
movl %r10d, %r9d
cmpl $0x1, %r11d
jg 0x9293
xorl %eax, %eax
jmp 0x92ed
movl %r11d, (%rsi)
movl %ebx, (%rdx)
movl $0x1, %eax
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O1/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, %r11d          # imm = 0x4298
leaq 0x6eac0(%rip), %r9      # 0x77e30
leaq 0x62ab9(%rip), %r10     # 0x6be30
leal (%rax,%r11), %ecx
movl %ecx, %ebx
shrl $0x1f, %ebx
addl %ecx, %ebx
sarl %ebx
movslq %ebx, %r8
movzbl (%r9,%r8,2), %ecx
movzbl 0x1(%r9,%r8,2), %r8d
leaq (%rcx,%rcx,2), %r14
shll $0x7, %r14d
addq %r10, %r14
movzwl (%r14,%r8,2), %r14d
cmpq %rdi, %r14
jge 0x93ae
movl %ebx, %eax
movl %r11d, %ebx
jmp 0x93b0
jle 0x93c1
movl %ebx, %ecx
subl %eax, %ecx
movl %ebx, %r11d
cmpl $0x1, %ecx
jg 0x9377
movb $0x1, %dil
jmp 0x93c3
xorl %edi, %edi
xorl %eax, %eax
testb %dil, %dil
jne 0x93ef
leal -0x7f(%rcx), %edi
cmpl $-0x5e, %edi
jb 0x93ef
leal -0xbf(%r8), %edi
cmpl $-0x5e, %edi
jb 0x93ef
addl $-0x61, %r8d
addl $-0x21, %ecx
movl %ecx, (%rsi)
movl %r8d, (%rdx)
movl $0x1, %eax
popq %rbx
popq %r14
retq
nop
// File: /workspace/github_c_makefile_star2_O1/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
pushq %rax
movq %rdi, %rbx
callq 0x952b
testl %eax, %eax
jne 0x94ca
movq %rbx, %rdi
callq 0xa183
testl %eax, %eax
jne 0x94ca
movq %rbx, %rdi
callq 0xa23b
testl %eax, %eax
jne 0x94ca
xorl %r14d, %r14d
movq %r14, %rax
shlq $0x4, %rax
leaq 0x9e65d(%rip), %rcx     # 0xa7ac0
leaq (%rcx,%rax), %r12
movq (%rax,%rcx), %r13
xorl %ebp, %ebp
movzbl (%rbx,%rbp), %r15d
testq %r15, %r15
jne 0x947f
cmpb $0x0, (%r13,%rbp)
je 0x949b
callq 0x6090
movq (%rax), %rax
movl (%rax,%r15,4), %ecx
movzbl (%r13,%rbp), %edx
cmpl (%rax,%rdx,4), %ecx
jne 0x949b
incq %rbp
jmp 0x946d
movb $0x1, %al
testq %r15, %r15
jne 0x94b5
cmpb $0x0, (%r13,%rbp)
jne 0x94b5
movl 0x8(%r12), %eax
movl %eax, 0x4(%rsp)
xorl %eax, %eax
testb %al, %al
je 0x94c6
incq %r14
xorl %eax, %eax
cmpq $0x66, %r14
jne 0x9455
jmp 0x94ca
movl 0x4(%rsp), %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/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 %r15d, %r15d
movq %r15, %rax
shlq $0x4, %rax
leaq 0x9ebd6(%rip), %rcx     # 0xa8120
leaq (%rcx,%rax), %r13
movq (%rax,%rcx), %rbp
xorl %ebx, %ebx
movzbl (%r14,%rbx), %r12d
testq %r12, %r12
jne 0x9565
cmpb $0x0, (%rbp,%rbx)
je 0x9580
callq 0x6090
movq (%rax), %rax
movl (%rax,%r12,4), %ecx
movzbl (%rbp,%rbx), %edx
cmpl (%rax,%rdx,4), %ecx
jne 0x9580
incq %rbx
jmp 0x9554
movb $0x1, %al
testq %r12, %r12
jne 0x9598
cmpb $0x0, (%rbp,%rbx)
jne 0x9598
movl 0x8(%r13), %eax
movl %eax, 0x4(%rsp)
xorl %eax, %eax
testb %al, %al
je 0x95ac
incq %r15
cmpq $0xd2, %r15
jne 0x953c
xorl %eax, %eax
jmp 0x95b0
movl 0x4(%rsp), %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O1/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:
movl $0x1, %eax
cmpq $-0x1, %rsi
je 0x967a
pushq %rax
movq 0x18(%rdi), %rax
movl 0x900(%rax), %edi
testl %edi, %edi
jle 0x965a
movl $0xffffffff, %r10d      # imm = 0xFFFFFFFF
leal (%rdi,%r10), %r9d
shrl %r9d
movzbl 0x800(%rax,%r9), %edx
cmpq %rsi, (%rax,%rdx,8)
jle 0x964d
movl %r9d, %edi
movl %r10d, %r9d
jmp 0x964f
jge 0x965f
leal 0x1(%r9), %edx
movl %r9d, %r10d
cmpl %edi, %edx
jl 0x962f
movl $0xffff, %edx           # imm = 0xFFFF
xorl %eax, %eax
cmpl $0xffff, %edx           # imm = 0xFFFF
je 0x9676
movq %r8, %rdi
movq %rdx, %rsi
callq *%rcx
movl $0x1, %eax
addq $0x8, %rsp
retq
nop
// File: /workspace/github_c_makefile_star2_O1/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 0x970b
leaq -0x40(%rsi), %rax
cmpq $0xbd, %rax
setae %dl
cmpq $0x7f, %rsi
sete %dil
movl $0xffff, %eax           # imm = 0xFFFF
orb %dl, %dil
jne 0x96fa
xorl %eax, %eax
cmpq $0x7f, %rsi
setg %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
setge %dil
leal -0x102(%r8,%rdi), %edi
cmovll %edx, %eax
movl %eax, %esi
movq %rcx, %r15
callq 0x904c
movq %r15, %rcx
movq %rbx, %rdi
movq %rax, %rsi
callq *%rcx
movq $0x0, (%r14)
jmp 0x9731
leaq -0x81(%rsi), %rax
cmpq $0x1f, %rax
setae %al
movq %rsi, %rdx
andq $-0x10, %rdx
cmpq $0xe0, %rdx
setne %dl
testb %dl, %al
jne 0x9737
movq %rsi, (%r14)
popq %rbx
popq %r14
popq %r15
retq
cmpq $0x5c, %rsi
je 0x974a
cmpq $0x7e, %rsi
jne 0x9751
movl $0x203e, %esi           # imm = 0x203E
jmp 0x9777
movl $0xa5, %esi
jmp 0x9777
leaq -0xa1(%rsi), %rax
cmpq $0x3e, %rax
ja 0x9767
addq $0xfec0, %rsi           # imm = 0xFEC0
jmp 0x9777
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_O1/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 0x9873
movq %r8, %r14
movq %rcx, %rbx
cmpq $0x7f, %rsi
jg 0x97b5
cmpq $0x5c, %rsi
je 0x97d5
cmpq $0x7e, %rsi
je 0x97d5
jmp 0x986e
cmpq $0x203e, %rsi           # imm = 0x203E
je 0x9869
cmpq $0xa5, %rsi
jne 0x97d5
movl $0x5c, %esi
jmp 0x986e
leaq -0xff61(%rsi), %rax
cmpq $0x3e, %rax
ja 0x97ee
addq $-0xfec0, %rsi          # imm = 0xFFFF0140
jmp 0x986e
leaq 0xc(%rsp), %rax
leaq 0x8(%rsp), %rdx
movq %rsi, %rdi
movq %rax, %rsi
callq 0x90b0
testl %eax, %eax
je 0x987e
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 0x9873
movl $0x7e, %esi
movq %r14, %rdi
callq *%rbx
movl %ebp, %eax
addq $0x10, %rsp
popq %rbx
popq %r14
popq %rbp
retq
xorl %ebp, %ebp
jmp 0x9873
nop
// File: /workspace/github_c_makefile_star2_O1/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 0x9ae8
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rcx, %r12
movq %rsi, %rbx
movabsq $0x7ffffffffffff800, %rax # imm = 0x7FFFFFFFFFFFF800
andq %rsi, %rax
cmpq $0xd800, %rax           # imm = 0xD800
sete %cl
cmpq $0x110000, %rsi         # imm = 0x110000
setge %sil
xorl %eax, %eax
orb %cl, %sil
jne 0x9ada
movq %r8, %r14
movq 0x18(%rdi), %r13
cmpq $0x0, (%rdx)
jne 0x9a4c
movq $0x1, (%rdx)
xorl %r15d, %r15d
btl $0x11, (%r13)
setae %r15b
leaq 0xfe(%r15), %rsi
xorq $0xff, %r15
movq %r14, %rdi
callq *%r12
movq %r14, %rdi
movq %r15, %rsi
callq *%r12
cmpq $0xffff, %rbx           # imm = 0xFFFF
jg 0x9a5a
movzbl %bh, %ebp
jmp 0x9aab
leaq 0xf0000(%rbx), %rax
shrq $0xa, %rax
movzbl %al, %r15d
movl %eax, %ebp
shrl $0x8, %ebp
andl $0x3, %ebp
orl $0xd8, %ebp
testb $0x2, 0x2(%r13)
jne 0x9a8c
movq %r14, %rdi
movq %r15, %rsi
callq *%r12
movl %ebp, %r15d
jmp 0x9a94
movl %ebp, %esi
movq %r14, %rdi
callq *%r12
movq %r14, %rdi
movq %r15, %rsi
callq *%r12
movl %ebx, %ebp
shrl $0x8, %ebp
andl $0x3, %ebp
orl $0xdc, %ebp
testb $0x2, 0x2(%r13)
movzbl %bl, %r15d
jne 0x9ac4
movq %r14, %rdi
movq %r15, %rsi
callq *%r12
movl %ebp, %r15d
jmp 0x9acc
movl %ebp, %esi
movq %r14, %rdi
callq *%r12
movq %r14, %rdi
movq %r15, %rsi
callq *%r12
movl $0x1, %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_O1/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 %r15d, %r15d
movq %r15, %rax
shlq $0x4, %rax
leaq 0x9f53e(%rip), %rcx     # 0xa96e0
leaq (%rcx,%rax), %r13
movq (%rax,%rcx), %rbp
xorl %ebx, %ebx
movzbl (%r14,%rbx), %r12d
testq %r12, %r12
jne 0xa1bd
cmpb $0x0, (%rbp,%rbx)
je 0xa1d8
callq 0x6090
movq (%rax), %rax
movl (%rax,%r12,4), %ecx
movzbl (%rbp,%rbx), %edx
cmpl (%rax,%rdx,4), %ecx
jne 0xa1d8
incq %rbx
jmp 0xa1ac
movb $0x1, %al
testq %r12, %r12
jne 0xa1f0
cmpb $0x0, (%rbp,%rbx)
jne 0xa1f0
movl 0x8(%r13), %eax
movl %eax, 0x4(%rsp)
xorl %eax, %eax
testb %al, %al
je 0xa201
incq %r15
cmpq $0x24, %r15
jne 0xa194
xorl %eax, %eax
jmp 0xa205
movl 0x4(%rsp), %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/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 %r15d, %r15d
movq %r15, %rax
shlq $0x4, %rax
leaq 0x9f6c6(%rip), %rcx     # 0xa9920
leaq (%rcx,%rax), %r13
movq (%rax,%rcx), %rbp
xorl %ebx, %ebx
movzbl (%r14,%rbx), %r12d
testq %r12, %r12
jne 0xa275
cmpb $0x0, (%rbp,%rbx)
je 0xa290
callq 0x6090
movq (%rax), %rax
movl (%rax,%r12,4), %ecx
movzbl (%rbp,%rbx), %edx
cmpl (%rax,%rdx,4), %ecx
jne 0xa290
incq %rbx
jmp 0xa264
movb $0x1, %al
testq %r12, %r12
jne 0xa2a8
cmpb $0x0, (%rbp,%rbx)
jne 0xa2a8
movl 0x8(%r13), %eax
movl %eax, 0x4(%rsp)
xorl %eax, %eax
testb %al, %al
je 0xa2b9
incq %r15
cmpq $0x4d, %r15
jne 0xa24c
xorl %eax, %eax
jmp 0xa2bd
movl 0x4(%rsp), %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/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 0x20(%rdi), %rax
subq 0x10(%rdi), %rax
addq 0x8(%rdi), %rax
addq $0x2, %rsi
cmpq %rsi, %rax
jae 0x19bb
movq %r14, %rdi
callq *0x18(%r14)
testl %eax, %eax
js 0x19e7
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 0x1100
addq %rbx, 0x10(%r14)
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
pushq $-0x1
popq %rax
jmp 0x19df
// File: /workspace/github_c_makefile_star2_O1/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
movl $0xffffffff, %ebp       # imm = 0xFFFFFFFF
orb %al, %cl
jne 0x2baa
movq %rdx, %rbx
movq %rsi, %r14
movq %rdi, %r15
leaq 0x74ee(%rip), %rsi      # 0xa044
movq %rdx, %rdi
callq 0x11d0
testq %rax, %rax
je 0x2baa
movq %rax, %r12
movl $0x1, %esi
movq %r15, %rdi
movq %r14, %rdx
movq %rax, %rcx
callq 0x11f0
movq %rax, %r15
xorl %ebp, %ebp
cmpq %r14, %rax
setne %bpl
negl %ebp
movq %r12, %rdi
callq 0x10b0
cmpq %r14, %r15
je 0x2baa
movq %rbx, %rdi
xorl %esi, %esi
callq 0x11c0
testl %eax, %eax
jne 0x2baa
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_O1/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
movl $0xffffffff, %ebx       # imm = 0xFFFFFFFF
orb %al, %cl
jne 0x2cc2
movq %rdx, %r14
movq %rsi, %r15
movq $0x0, (%rsi)
testq %rdx, %rdx
je 0x2bf2
movq $0x0, (%r14)
leaq 0x744f(%rip), %rsi      # 0xa048
callq 0x11d0
testq %rax, %rax
je 0x2cc2
movq %rax, %r12
movq %rax, %rdi
xorl %esi, %esi
movl $0x2, %edx
callq 0x1180
movq %r12, %rdi
callq 0x1140
movq %rax, %r13
testq %r14, %r14
je 0x2c2f
movq %r13, (%r14)
xorl %r13d, %r13d
movq %r12, %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x1180
movq %r13, %rdi
testq %r14, %r14
je 0x2c46
movq (%r14), %rdi
testq %rdi, %rdi
je 0x2c9a
incq %rdi
callq 0x1160
movq %rax, (%r15)
testq %rax, %rax
je 0x2c9a
movq %r13, %rbp
testq %r14, %r14
je 0x2c66
movq (%r14), %rbp
movl $0x1, %esi
movq %rax, %rdi
movq %rbp, %rdx
movq %r12, %rcx
callq 0x1080
cmpq %rax, %rbp
jne 0x2c9a
movq (%r15), %rax
testq %r14, %r14
je 0x2c89
movq (%r14), %r13
movb $0x0, (%rax,%r13)
movq %r12, %rdi
callq 0x10b0
xorl %ebx, %ebx
jmp 0x2cc2
movq %r12, %rdi
callq 0x10b0
movq (%r15), %rdi
testq %rdi, %rdi
je 0x2caf
callq 0x1030
movq $0x0, (%r15)
testq %r14, %r14
je 0x2cc2
movq $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_O1/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 0x3b52
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %rbx
movq 0x10(%rdi), %rdi
testq %rdi, %rdi
je 0x3b12
callq 0x1030
movl 0x8(%rbx), %eax
andl $0xf, %eax
leal -0x8(%rax), %ecx
cmpl $0x2, %ecx
jae 0x3b53
leaq 0x18(%rbx), %r14
movq 0x18(%rbx), %rdi
cmpq %r14, %rdi
je 0x3b66
movq (%rdi), %r15
cmpq %r14, %r15
jne 0x3b39
movq %r14, 0x20(%rbx)
movq %r15, (%r14)
movq $0x0, (%rdi)
callq 0x3af7
movq %r15, %rdi
cmpq %r14, %r15
jne 0x3b2d
jmp 0x3b66
retq
cmpl $0x7, %eax
jne 0x3b66
movq 0x20(%rbx), %rdi
testq %rdi, %rdi
je 0x3b66
callq 0x1030
movq %rbx, %rdi
popq %rbx
popq %r14
popq %r15
jmp 0x1030
// File: /workspace/github_c_makefile_star2_O1/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 0x3bc9
movq 0x8(%rdi), %rsi
xorl %ecx, %ecx
xorl %edx, %edx
testq %rsi, %rsi
je 0x3bbe
movzbl (%rsi), %r8d
leal -0x8(%r8), %r9d
cmpl $0x6, %r9d
jae 0x3ba7
movl $0x1, %edx
addl $0x100, %ecx            # imm = 0x100
incq %rsi
jmp 0x3b89
cmpl $0x22, %r8d
je 0x3b97
cmpl $0x5c, %r8d
je 0x3b97
testl %r8d, %r8d
jne 0x3b9c
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_O1/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), %r14
cmpq %rdi, %r14
je 0x3c75
movq (%r14), %r15
cmpq %rbx, %r15
jne 0x3c52
movq %rbx, 0x8(%rbx)
movq %r15, (%rbx)
movq $0x0, (%r14)
movq 0x10(%r14), %rdi
callq 0x1030
movq %r14, %rdi
callq 0x1030
movq %r15, %r14
cmpq %rbx, %r15
jne 0x3c46
leaq 0xc624(%rip), %rax      # 0x102a0
movq %rax, 0x18(%rbx)
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/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 %r12
pushq %rbx
pushq %rax
movq %rsi, %r15
movq %rdi, %rbx
movq 0x18(%rsi), %rax
movq 0x18(%rax), %rcx
addq %rdi, %rcx
subq 0x10(%rax), %rcx
cmpq 0x8(%rax), %rcx
jbe 0x3d08
movq 0x10(%r15), %r12
movl $0x20, %edi
callq 0x1160
testq %rax, %rax
je 0x3d19
movq %rax, %r14
cmpq %rbx, %r12
cmovbeq %rbx, %r12
movq %r12, 0x8(%rax)
movq %r12, %rdi
callq 0x1160
movq %rax, 0x10(%r14)
testq %rax, %rax
je 0x3d44
movq %rax, 0x18(%r14)
movq (%r15), %rax
cmpq %r15, %rax
jne 0x3cfe
movq %r14, 0x8(%r15)
movq %rax, (%r14)
movq %r14, (%r15)
movq %r14, 0x18(%r15)
movq 0x18(%r15), %rax
movq 0x18(%rax), %r15
addq %r15, %rbx
movq %rbx, 0x18(%rax)
jmp 0x3d7b
leaq 0x673c(%rip), %rdi      # 0xa45c
leaq 0x68f4(%rip), %rsi      # 0xa61b
xorl %r15d, %r15d
movl $0x40f, %edx            # imm = 0x40F
xorl %eax, %eax
callq 0x10d0
leaq 0x6c23(%rip), %rdi      # 0xa960
callq 0x1070
jmp 0x3d7b
leaq 0x6711(%rip), %rdi      # 0xa45c
leaq 0x68c9(%rip), %rsi      # 0xa61b
xorl %r15d, %r15d
movl $0x414, %edx            # imm = 0x414
xorl %eax, %eax
callq 0x10d0
movl 0x8(%r14), %esi
leaq 0x68bd(%rip), %rdi      # 0xa629
xorl %eax, %eax
callq 0x10d0
movq %r14, %rdi
callq 0x1030
movq %r15, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/lengjingzju[P]json/json.c
// Function: print_val_release
static int _print_val_release(json_print_t *print_ptr, bool free_all_flag, size_t *length, json_print_ptr_t *ptr)
{
#define _clear_free_ptr(ptr)    do { if (ptr) json_free(ptr); ptr = NULL; } while(0)
#define _clear_close_fd(fd)     do { if (fd >= 0) close(fd); fd = -1; } while(0)
    int ret = 0;
    size_t used = GET_BUF_USED_SIZE(print_ptr);

    if (print_ptr->fd >= 0) {
        if (!free_all_flag && used > 0) {
            if (used != (size_t)write(print_ptr->fd, print_ptr->ptr, used)) {
                JsonErr("write failed!\n");
                ret = -1;
            }
        }
        _clear_close_fd(print_ptr->fd);
        if (ptr) {
            ptr->size = print_ptr->size;
            ptr->p = print_ptr->ptr;
        } else {
            _clear_free_ptr(print_ptr->ptr);
        }
    } else {
        if (free_all_flag) {
            _clear_free_ptr(print_ptr->ptr);
        } else {
            if (length)
                *length = print_ptr->cur - print_ptr->ptr;
            *print_ptr->cur = '\0';


            if (ptr) {
                ptr->size = print_ptr->size;
                ptr->p = print_ptr->ptr;
            } else {
                /* Reduce size, never fail */
                print_ptr->ptr = (char *)json_realloc(print_ptr->ptr, used + 1);
            }
        }
    }

    return ret;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rcx, %r14
movl %esi, %eax
movq %rdi, %rbx
movq 0x10(%rdi), %rcx
movq 0x8(%rdi), %rsi
movq %rcx, %r15
subq %rsi, %r15
movl (%rdi), %edi
testl %edi, %edi
js 0x491c
cmpq %rsi, %rcx
sete %cl
xorl %ebp, %ebp
orb %cl, %al
jne 0x48f5
movq %r15, %rdx
callq 0x10a0
cmpq %rax, %r15
je 0x48f5
leaq 0x5b8b(%rip), %rdi      # 0xa45c
leaq 0x5db5(%rip), %rsi      # 0xa68d
movl $0x6e7, %edx            # imm = 0x6E7
xorl %eax, %eax
callq 0x10d0
leaq 0x6067(%rip), %rdi      # 0xa952
callq 0x1070
movl $0xffffffff, %ebp       # imm = 0xFFFFFFFF
movl (%rbx), %edi
testl %edi, %edi
js 0x4900
callq 0x1110
movl $0xffffffff, (%rbx)     # imm = 0xFFFFFFFF
testq %r14, %r14
je 0x4937
movq 0x20(%rbx), %rax
movq %rax, (%r14)
movq 0x8(%rbx), %rax
movq %rax, 0x8(%r14)
jmp 0x4985
testb %al, %al
je 0x494f
testq %rsi, %rsi
je 0x492d
movq %rsi, %rdi
callq 0x1030
movq $0x0, 0x8(%rbx)
jmp 0x4983
movq 0x8(%rbx), %rdi
testq %rdi, %rdi
je 0x4945
callq 0x1030
movq $0x0, 0x8(%rbx)
jmp 0x4985
testq %rdx, %rdx
je 0x4957
movq %r15, (%rdx)
movb $0x0, (%rcx)
testq %r14, %r14
je 0x4970
movq 0x20(%rbx), %rax
movq %rax, (%r14)
movq 0x8(%rbx), %rax
movq %rax, 0x8(%r14)
jmp 0x4983
movq 0x8(%rbx), %rdi
incq %r15
movq %r15, %rsi
callq 0x1190
movq %rax, 0x8(%rbx)
xorl %ebp, %ebp
movl %ebp, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/lengjingzju[P]json/json.c
// Function: json_sax_print_start
json_sax_print_hd json_sax_print_start(json_print_choice_t *choice)
{
    json_sax_print_t *print_handle = NULL;

    if ((print_handle = (json_sax_print_t *)json_calloc(1, sizeof(json_sax_print_t))) == NULL) {
        JsonErr("malloc failed!\n");
        return NULL;
    }
    print_handle->print_val.item_total = choice->item_total ? choice->item_total : JSON_PRINT_NUM_INIT_DEF;
    if (_print_val_init(&print_handle->print_val, choice) < 0) {
        json_free(print_handle);
        return NULL;
    }

    print_handle->total = JSON_PRINT_DEPTH_DEF;
    if ((print_handle->array = (json_sax_print_depth_t *)json_malloc(print_handle->total * sizeof(json_sax_print_depth_t))) == NULL) {
        _print_val_release(&print_handle->print_val, true, NULL, NULL);
        json_free(print_handle);
        JsonErr("malloc failed!\n");
        return NULL;
    }

    return print_handle;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %r15
movl $0x1, %edi
movl $0x60, %esi
callq 0x1130
testq %rax, %rax
je 0x4adb
movq %rax, %rbx
movl 0x18(%r15), %eax
testl %eax, %eax
movl $0x400, %ecx            # imm = 0x400
cmovnel %eax, %ecx
movq %rbx, %r14
addq $0x10, %r14
movl %ecx, 0x48(%rbx)
movq %r14, %rdi
movq %r15, %rsi
callq 0x4740
testl %eax, %eax
js 0x4b05
movl $0x10, (%rbx)
movl $0x80, %edi
callq 0x1160
movq %rax, 0x8(%rbx)
testq %rax, %rax
jne 0x4b0f
movq %r14, %rdi
movl $0x1, %esi
xorl %edx, %edx
xorl %ecx, %ecx
callq 0x488e
movq %rbx, %rdi
callq 0x1030
leaq 0x59a2(%rip), %rdi      # 0xa45c
leaq 0x5aec(%rip), %rsi      # 0xa5ad
movl $0x823, %edx            # imm = 0x823
xorl %eax, %eax
callq 0x10d0
leaq 0x5e8c(%rip), %rdi      # 0xa960
callq 0x1070
jmp 0x4b0d
leaq 0x597a(%rip), %rdi      # 0xa45c
leaq 0x5ac4(%rip), %rsi      # 0xa5ad
xorl %ebx, %ebx
movl $0x816, %edx            # imm = 0x816
xorl %eax, %eax
callq 0x10d0
leaq 0x5e62(%rip), %rdi      # 0xa960
callq 0x1070
jmp 0x4b0f
movq %rbx, %rdi
callq 0x1030
xorl %ebx, %ebx
movq %rbx, %rax
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/lengjingzju[P]json/json.c
// Function: json_sax_print_finish
char *json_sax_print_finish(json_sax_print_hd handle, size_t *length, json_print_ptr_t *ptr)
{
    char *ret = NULL;

    json_sax_print_t *print_handle = (json_sax_print_t *)handle;
    if (!print_handle)
        return NULL;
    if (print_handle->array)
        json_free(print_handle->array);
    if (print_handle->error_flag) {
        _print_val_release(&print_handle->print_val, true, NULL, NULL);
        json_free(print_handle);
        return NULL;
    }

    ret = (print_handle->print_val.fd >= 0) ? (char *)"ok" : print_handle->print_val.ptr;
    if (_print_val_release(&print_handle->print_val, false, length, ptr) < 0) {
        json_free(print_handle);
        return NULL;
    }
    json_free(print_handle);

    return ret;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
testq %rdi, %rdi
je 0x4b64
movq %rdx, %r14
movq %rsi, %r12
movq %rdi, %rbx
movq 0x8(%rdi), %rdi
testq %rdi, %rdi
je 0x4b3f
callq 0x1030
leaq 0x10(%rbx), %rdi
cmpb $0x1, 0x5c(%rbx)
jne 0x4b69
xorl %r15d, %r15d
movl $0x1, %esi
xorl %edx, %edx
xorl %ecx, %ecx
callq 0x488e
movq %rbx, %rdi
callq 0x1030
jmp 0x4b9b
xorl %r15d, %r15d
jmp 0x4b9b
cmpl $0x0, (%rdi)
js 0x4b77
leaq 0x5a10(%rip), %r13      # 0xa585
jmp 0x4b7b
movq 0x18(%rbx), %r13
xorl %r15d, %r15d
xorl %esi, %esi
movq %r12, %rdx
movq %r14, %rcx
callq 0x488e
movl %eax, %ebp
movq %rbx, %rdi
callq 0x1030
testl %ebp, %ebp
cmovnsq %r13, %r15
movq %r15, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/lengjingzju[P]json/json.c
// Function: skip_blank
static inline void _skip_blank(json_parse_t *parse_ptr)
{
    unsigned char *str = NULL;
    int cnt = 0;

    while (_get_parse_ptr(parse_ptr, cnt, 64, (char **)&str)) {
        while (IS_BLANK(*str)) {
            ++str;
            ++cnt;
        }
        if (likely(*str)) {
#if JSON_PARSE_SKIP_COMMENT
            if (unlikely(*str == '/')) {
                if (!_skip_comment(parse_ptr, &cnt))
                    continue;
            }
#endif
            break;
        }
    }
    _UPDATE_PARSE_OFFSET(cnt);
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq %rdi, %rbx
leaq 0x8(%rsp), %r14
movq $0x0, (%r14)
xorl %ebp, %ebp
movl $0x40, %edx
movq %rbx, %rdi
movl %ebp, %esi
movq %r14, %rcx
callq 0x751f
testl %eax, %eax
je 0x4e96
movq 0x8(%rsp), %rax
movb (%rax), %cl
leal -0x1(%rcx), %edx
cmpb $0x1f, %dl
ja 0x4e8d
incl %ebp
movb 0x1(%rax), %cl
incq %rax
leal -0x1(%rcx), %edx
cmpb $0x20, %dl
jb 0x4e7d
movq %rax, 0x8(%rsp)
testb %cl, %cl
je 0x4e58
movslq %ebp, %rax
addq %rax, 0x10(%rbx)
addq $0x10, %rsp
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/lengjingzju[P]json/json.c
// Function: print_file_ptr_realloc
static int _print_file_ptr_realloc(json_print_t *print_ptr, size_t slen)
{
    size_t len = GET_BUF_USED_SIZE(print_ptr);

    if (len > 0) {
        if (len != (size_t)write(print_ptr->fd, print_ptr->ptr, len)) {
            JsonErr("write failed!\n");
            return -1;
        }
        print_ptr->cur = print_ptr->ptr;
    }

    len = slen + 1;
    if (print_ptr->size < len) {
        while (print_ptr->size < len)
            print_ptr->size += print_ptr->plus_size;
        char *new_str = (char *)json_realloc(print_ptr->ptr, print_ptr->size);
        if (new_str) {
            print_ptr->ptr = new_str;
            print_ptr->cur = print_ptr->ptr;
        } else {
            JsonErr("malloc failed!\n");
            json_free(print_ptr->ptr);
            print_ptr->ptr = NULL;
            print_ptr->cur = print_ptr->ptr;
            return -1;
        }
    }

    return 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %rbx
movq 0x8(%rdi), %rsi
movq 0x10(%rdi), %r15
subq %rsi, %r15
je 0x7378
movl (%rbx), %edi
movq %r15, %rdx
callq 0x10a0
cmpq %rax, %r15
jne 0x73bb
movq 0x8(%rbx), %rax
movq %rax, 0x10(%rbx)
incq %r14
xorl %ebp, %ebp
cmpq %r14, 0x20(%rbx)
jae 0x741d
leaq 0x8(%rbx), %r15
movq 0x20(%rbx), %rsi
cmpq %r14, %rsi
jae 0x73a4
movq 0x28(%rbx), %rax
addq %rax, %rsi
cmpq %r14, %rsi
jb 0x7398
movq %rsi, 0x20(%rbx)
movq (%r15), %rdi
callq 0x1190
testq %rax, %rax
je 0x73e3
movq %rax, 0x8(%rbx)
movq %rax, 0x10(%rbx)
jmp 0x741d
leaq 0x309a(%rip), %rdi      # 0xa45c
leaq 0x3283(%rip), %rsi      # 0xa64c
movl $0x587, %edx            # imm = 0x587
xorl %eax, %eax
callq 0x10d0
leaq 0x3576(%rip), %rdi      # 0xa952
callq 0x1070
jmp 0x7418
leaq 0x3072(%rip), %rdi      # 0xa45c
leaq 0x325b(%rip), %rsi      # 0xa64c
movl $0x596, %edx            # imm = 0x596
xorl %eax, %eax
callq 0x10d0
leaq 0x355c(%rip), %rdi      # 0xa960
callq 0x1070
movq (%r15), %rdi
callq 0x1030
xorps %xmm0, %xmm0
movups %xmm0, (%r15)
movl $0xffffffff, %ebp       # imm = 0xFFFFFFFF
movl %ebp, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/lengjingzju[P]json/json.c
// Function: print_str_ptr_realloc
static int _print_str_ptr_realloc(json_print_t *print_ptr, size_t slen)
{
    size_t used = GET_BUF_USED_SIZE(print_ptr);
    size_t len = used + slen + 1;

    while (print_ptr->item_total < print_ptr->item_count) {
        print_ptr->item_total += JSON_PRINT_NUM_PLUS_DEF;
        print_ptr->size += print_ptr->plus_size >> 2;
    }
    if (print_ptr->item_total - print_ptr->item_count > print_ptr->item_count) {
        print_ptr->size += print_ptr->size;
    } else {
        print_ptr->size += (uint64_t)print_ptr->size *
            (print_ptr->item_total - print_ptr->item_count) / print_ptr->item_count;
    }

    while (print_ptr->size < len)
        print_ptr->size += print_ptr->plus_size;

    char *new_str = (char *)json_realloc(print_ptr->ptr, print_ptr->size);
    if (new_str) {
        print_ptr->ptr = new_str;
        print_ptr->cur = print_ptr->ptr + used;
    } else {
        JsonErr("malloc failed!\n");
        json_free(print_ptr->ptr);
        print_ptr->ptr = NULL;
        print_ptr->cur = print_ptr->ptr;
        return -1;
    }

    return 0;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq 0x8(%rdi), %rdi
movq 0x10(%rbx), %r14
subq %rdi, %r14
movslq 0x3c(%rbx), %rcx
movl 0x38(%rbx), %eax
cmpl %ecx, %eax
jge 0x7482
movq 0x28(%rbx), %rdx
shrq $0x2, %rdx
leal 0x40(%rax), %r8d
cmpl %r8d, %ecx
cmovgl %ecx, %r8d
movl %eax, %r9d
notl %r9d
addl %r8d, %r9d
movl %r9d, %r8d
shrl $0x6, %r8d
incl %r8d
imulq %rdx, %r8
andl $-0x40, %r9d
addl %r9d, %eax
addl $0x40, %eax
movl %eax, 0x38(%rbx)
addq %r8, 0x20(%rbx)
leaq (%rsi,%r14), %r8
incq %r8
subl %ecx, %eax
movq 0x20(%rbx), %rsi
cmpl %ecx, %eax
jle 0x7498
addq %rsi, %rsi
jmp 0x74a6
cltq
imulq %rsi, %rax
xorl %edx, %edx
divq %rcx
addq %rax, %rsi
movq %rsi, 0x20(%rbx)
cmpq %r8, %rsi
jae 0x74bf
movq 0x28(%rbx), %rax
addq %rax, %rsi
cmpq %r8, %rsi
jb 0x74b3
movq %rsi, 0x20(%rbx)
callq 0x1190
testq %rax, %rax
je 0x74d4
movq %rax, 0x8(%rbx)
addq %rax, %r14
xorl %eax, %eax
jmp 0x7513
leaq 0x2f81(%rip), %rdi      # 0xa45c
leaq 0x3182(%rip), %rsi      # 0xa664
xorl %r14d, %r14d
movl $0x5b9, %edx            # imm = 0x5B9
xorl %eax, %eax
callq 0x10d0
leaq 0x3468(%rip), %rdi      # 0xa960
callq 0x1070
movq 0x8(%rbx), %rdi
callq 0x1030
movq $0x0, 0x8(%rbx)
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
movq %r14, 0x10(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O1/lengjingzju[P]json/jnum.c
// Function: jnum_ltoa
int jnum_ltoa(int64_t num, char *buffer)
{
    char *s = buffer;
    uint64_t n = 0;
    int32_t tz = 0;

    if (num == 0) {
        memcpy(s, "0", 2);
        return 1;
    }

    if (num < 0) {
        n = -num;
        *s++ = '-';
    } else {
        n = num;
    }

    s += fill_1_20_digits(s, n, &tz);

    *s = '\0';
    return (int)(s - buffer);
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
movl $0x0, 0x4(%rsp)
testq %rdi, %rdi
je 0x7fc5
movq %rdi, %rsi
js 0x7fd1
movq %rbx, %r14
jmp 0x7fdb
movw $0x30, (%rbx)
movl $0x1, %eax
jmp 0x7ff6
negq %rsi
leaq 0x1(%rbx), %r14
movb $0x2d, (%rbx)
leaq 0x4(%rsp), %rdx
movq %r14, %rdi
callq 0x7ffe
movslq %eax, %rcx
leaq (%r14,%rcx), %rax
movb $0x0, (%r14,%rcx)
subl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O1/lengjingzju[P]json/jnum.c
// Function: jnum_htoa
int jnum_htoa(uint32_t num, char *buffer)
{
    char *s = buffer;

    *s++ = '0';
    *s++ = 'x';
    s += fill_1_8_hexs(s, num);

    *s = '\0';
    return (int)(s - buffer);
}

// Assembly:
pushq %rbx
movq %rsi, %rbx
movl %edi, %esi
movw $0x7830, (%rbx)         # imm = 0x7830
leaq 0x2(%rbx), %rdi
callq 0x8517
cltq
addq %rbx, %rax
addq $0x2, %rax
movb $0x0, (%rax)
subl %ebx, %eax
popq %rbx
retq