LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O1/skeeto[P]enchive/src/enchive.c
// Function: fatal
static void
fatal(const char *fmt, ...)
{
    unsigned i;
    va_list ap;
    va_start(ap, fmt);
    fprintf(stderr, "enchive: ");
    vfprintf(stderr, fmt, ap);
    fputc('\n', stderr);
    for (i = 0; i < sizeof(cleanup) / sizeof(*cleanup); i++) {
        if (cleanup[i].file)
            fclose(cleanup[i].file);
        if (cleanup[i].name)
            remove(cleanup[i].name);
    }
    va_end(ap);
    exit(EXIT_FAILURE);
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0xd0, %rsp
movq %rdi, %rbx
leaq 0x20(%rsp), %rdi
movq %rsi, 0x8(%rdi)
movq %rdx, 0x10(%rdi)
movq %rcx, 0x18(%rdi)
movq %r8, 0x20(%rdi)
movq %r9, 0x28(%rdi)
testb %al, %al
je 0x4008
movaps %xmm0, 0x50(%rsp)
movaps %xmm1, 0x60(%rsp)
movaps %xmm2, 0x70(%rsp)
movaps %xmm3, 0x80(%rsp)
movaps %xmm4, 0x90(%rsp)
movaps %xmm5, 0xa0(%rsp)
movaps %xmm6, 0xb0(%rsp)
movaps %xmm7, 0xc0(%rsp)
movq %rsp, %r14
movq %rdi, 0x10(%r14)
leaq 0xf0(%rsp), %rax
movq %rax, 0x8(%r14)
movabsq $0x3000000008, %rax     # imm = 0x3000000008
movq %rax, (%r14)
movq 0x6fc9(%rip), %r15      # 0xaff8
movq (%r15), %rcx
leaq 0x4176(%rip), %rdi      # 0x81af
movl $0x9, %esi
movl $0x1, %edx
callq 0x2320
movq (%r15), %rdi
movq %rbx, %rsi
movq %r14, %rdx
callq 0x22d0
movq (%r15), %rsi
movl $0xa, %edi
callq 0x2190
xorl %ebx, %ebx
leaq 0x7194(%rip), %r14      # 0xb200
movq 0x8(%rbx,%r14), %rdi
testq %rdi, %rdi
je 0x407b
callq 0x2100
movq (%rbx,%r14), %rdi
testq %rdi, %rdi
je 0x4089
callq 0x2090
addq $0x10, %rbx
cmpq $0x10, %rbx
je 0x406c
movl $0x1, %edi
callq 0x2300
// File: /workspace/github_c_makefile_star2_O1/skeeto[P]enchive/src/enchive.c
// Function: dupstr
static char *
dupstr(const char *s)
{
    char *copy = 0;
    if (s) {
        size_t len = strlen(s) + 1;
        copy = malloc(len);
        if (!copy)
            fatal("out of memory");
        memcpy(copy, s, len);
    }
    return copy;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
testq %rdi, %rdi
je 0x4120
movq %rdi, %rbx
callq 0x2110
movq %rax, %r14
incq %r14
movq %r14, %rdi
callq 0x2230
testq %rax, %rax
je 0x412a
movq %rax, %rdi
movq %rbx, %rsi
movq %r14, %rdx
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x2220
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
leaq 0x45e1(%rip), %rdi      # 0x8712
xorl %eax, %eax
callq 0x3fa5
// File: /workspace/github_c_makefile_star2_O1/skeeto[P]enchive/src/enchive.c
// Function: print_fingerprint
static void
print_fingerprint(const uint8_t *key)
{
    int i;
    uint8_t hash[32];
    SHA256_CTX sha[1];

    sha256_init(sha);
    sha256_update(sha, key, 32);
    sha256_final(sha, hash);
    for (i = 0; i < 16; i += 4) {
        unsigned long chunk =
            ((unsigned long)hash[i + 0] << 24) |
            ((unsigned long)hash[i + 1] << 16) |
            ((unsigned long)hash[i + 2] <<  8) |
            ((unsigned long)hash[i + 3] <<  0);
        printf("%s%08lx", i ? "-" : "", chunk);
    }
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x98, %rsp
movq %rdi, %rbx
leaq 0x20(%rsp), %r14
movq %r14, %rdi
callq 0x7029
movl $0x20, %edx
movq %r14, %rdi
movq %rbx, %rsi
callq 0x704f
movq %rsp, %rsi
movq %r14, %rdi
callq 0x70b5
movq $-0x4, %r14
leaq 0x3e1c(%rip), %r15      # 0x8afd
leaq 0x3ee9(%rip), %r12      # 0x8bd1
leaq 0x3eda(%rip), %rbx      # 0x8bc9
movl 0x4(%rsp,%r14), %edx
bswapl %edx
cmpq $-0x4, %r14
movq %r12, %rsi
cmoveq %r15, %rsi
movq %rbx, %rdi
xorl %eax, %eax
callq 0x2140
addq $0x4, %r14
cmpq $0xc, %r14
jb 0x4cef
addq $0x98, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/skeeto[P]enchive/src/enchive.c
// Function: storage_directory
static char *
storage_directory(char *file)
{
    static const char enchive[] = "/enchive/";
    static const char config[] = "/.config";
    char *xdg_config_home = getenv("XDG_CONFIG_HOME");
    char *path, *s;

    if (!xdg_config_home) {
        char *home = getenv("HOME");
        if (!home)
            fatal("no $HOME or $XDG_CONFIG_HOME, giving up");
        if (home[0] != '/')
            fatal("$HOME is not absolute");
        path = joinstr(4, home, config, enchive, file);
    } else {
        if (xdg_config_home[0] != '/')
            fatal("$XDG_CONFIG_HOME is not absolute");
        path = joinstr(3, xdg_config_home, enchive, file);
    }

    s = strchr(path + 1, '/');
    while (s) {
        *s = 0;
        if (mkdir(path, 0700) && !dir_exists(path))
            fatal("mkdir(%s) -- %s", path, strerror(errno));
        *s = '/';
        s = strchr(s + 1, '/');
    }

    return path;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x98, %rsp
movq %rdi, %rbx
leaq 0x39f1(%rip), %rdi      # 0x872c
callq 0x2030
testq %rax, %rax
je 0x4d69
cmpb $0x2f, (%rax)
jne 0x4e48
leaq 0x333b(%rip), %rdx      # 0x8090
movl $0x3, %edi
movq %rax, %rsi
movq %rbx, %rcx
xorl %eax, %eax
callq 0x4e68
jmp 0x4da7
leaq 0x39c7(%rip), %rdi      # 0x8737
callq 0x2030
testq %rax, %rax
je 0x4e51
cmpb $0x2f, (%rax)
jne 0x4e5a
leaq 0x330c(%rip), %rdx      # 0x809a
leaq 0x32fb(%rip), %rcx      # 0x8090
movl $0x4, %edi
movq %rax, %rsi
movq %rbx, %r8
xorl %eax, %eax
callq 0x4e68
movq %rax, %rbx
leaq 0x1(%rax), %rdi
movl $0x2f, %esi
callq 0x2130
testq %rax, %rax
je 0x4e17
movq %rax, %r14
leaq 0x8(%rsp), %r15
movl $0xf000, %ebp           # imm = 0xF000
movb $0x0, (%r14)
movq %rbx, %rdi
movl $0x1c0, %esi            # imm = 0x1C0
callq 0x20b0
testl %eax, %eax
je 0x4dfb
movq %rbx, %rdi
movq %r15, %rsi
callq 0x2200
testl %eax, %eax
jne 0x4e28
movl 0x20(%rsp), %eax
andl %ebp, %eax
cmpl $0x4000, %eax           # imm = 0x4000
jne 0x4e28
movb $0x2f, (%r14)
incq %r14
movq %r14, %rdi
movl $0x2f, %esi
callq 0x2130
movq %rax, %r14
testq %rax, %rax
jne 0x4dca
movq %rbx, %rax
addq $0x98, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
callq 0x2070
movl (%rax), %edi
callq 0x2340
leaq 0x3960(%rip), %rdi      # 0x879b
movq %rbx, %rsi
movq %rax, %rdx
xorl %eax, %eax
callq 0x3fa5
leaq 0x392b(%rip), %rdi      # 0x877a
jmp 0x4e61
leaq 0x38e4(%rip), %rdi      # 0x873c
jmp 0x4e61
leaq 0x3903(%rip), %rdi      # 0x8764
xorl %eax, %eax
callq 0x3fa5
// File: /workspace/github_c_makefile_star2_O1/skeeto[P]enchive/src/enchive.c
// Function: joinstr
static char *
joinstr(int n, ...)
{
    int i;
    va_list ap;
    char *p, *str;
    size_t len = 1;

    va_start(ap, n);
    for (i = 0; i < n; i++) {
        char *s = va_arg(ap, char *);
        len += strlen(s);
    }
    va_end(ap);

    p = str = malloc(len);
    if (!str)
        fatal("out of memory");

    va_start(ap, n);
    for (i = 0; i < n; i++) {
        char *s = va_arg(ap, char *);
        size_t slen = strlen(s);
        memcpy(p, s, slen);
        p += slen;
    }
    va_end(ap);

    *p = 0;
    return str;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xe8, %rsp
leaq 0x30(%rsp), %r15
movq %rsi, 0x8(%r15)
movq %rdx, 0x10(%r15)
movq %rcx, 0x18(%r15)
movq %r8, 0x20(%r15)
movq %r9, 0x28(%r15)
testb %al, %al
je 0x4ed0
movaps %xmm0, 0x60(%rsp)
movaps %xmm1, 0x70(%rsp)
movaps %xmm2, 0x80(%rsp)
movaps %xmm3, 0x90(%rsp)
movaps %xmm4, 0xa0(%rsp)
movaps %xmm5, 0xb0(%rsp)
movaps %xmm6, 0xc0(%rsp)
movaps %xmm7, 0xd0(%rsp)
movq %r15, 0x10(%rsp)
leaq 0x120(%rsp), %rax
movq %rax, 0x8(%rsp)
movabsq $0x3000000008, %rax     # imm = 0x3000000008
movq %rax, (%rsp)
testl %edi, %edi
movl %edi, 0x1c(%rsp)
jle 0x4f3f
movl (%rsp), %ebp
movq 0x10(%rsp), %r12
movl $0x1, %r14d
movq 0x8(%rsp), %rax
movl %edi, %ebx
cmpl $0x28, %ebp
ja 0x4f22
movq %rax, %r13
movl %ebp, %eax
addq %r12, %rax
addl $0x8, %ebp
movl %ebp, (%rsp)
jmp 0x4f2b
leaq 0x8(%rax), %r13
movq %r13, 0x8(%rsp)
movq (%rax), %rdi
callq 0x2110
addq %rax, %r14
movq %r13, %rax
decl %ebx
jne 0x4f0d
jmp 0x4f45
movl $0x1, %r14d
movq %r14, %rdi
callq 0x2230
testq %rax, %rax
je 0x5004
movq %rax, %rcx
movq %r15, 0x10(%rsp)
leaq 0x120(%rsp), %rax
movq %rax, 0x8(%rsp)
movabsq $0x3000000008, %rax     # imm = 0x3000000008
movq %rax, (%rsp)
movq %rcx, 0x20(%rsp)
movq %rcx, %r15
movl 0x1c(%rsp), %r14d
testl %r14d, %r14d
jle 0x4fe9
movl (%rsp), %ebp
movq 0x10(%rsp), %rax
movq %rax, 0x28(%rsp)
movq 0x8(%rsp), %rax
movq 0x20(%rsp), %r15
cmpl $0x28, %ebp
ja 0x4fb9
movq %rax, %rbx
movl %ebp, %eax
addq 0x28(%rsp), %rax
addl $0x8, %ebp
movl %ebp, (%rsp)
jmp 0x4fc2
leaq 0x8(%rax), %rbx
movq %rbx, 0x8(%rsp)
movq (%rax), %r12
movq %r12, %rdi
callq 0x2110
movq %rax, %r13
movq %r15, %rdi
movq %r12, %rsi
movq %rax, %rdx
callq 0x2220
addq %r13, %r15
movq %rbx, %rax
decl %r14d
jne 0x4fa2
movb $0x0, (%r15)
movq 0x20(%rsp), %rax
addq $0xe8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x3707(%rip), %rdi      # 0x8712
xorl %eax, %eax
callq 0x3fa5
// File: /workspace/github_c_makefile_star2_O1/skeeto[P]enchive/src/enchive.c
// Function: agent_addr
static int
agent_addr(struct sockaddr_un *addr, const uint8_t *iv)
{
    char *dir = getenv("XDG_RUNTIME_DIR");
    if (!dir) {
        dir = getenv("TMPDIR");
        if (!dir)
            dir = "/tmp";
    }

    addr->sun_family = AF_UNIX;
    if (strlen(dir) + 1 + 16 + 1 > sizeof(addr->sun_path)) {
        warning("agent socket path too long -- %s", dir);
        return 0;
    } else {
        sprintf(addr->sun_path, "%s/%02x%02x%02x%02x%02x%02x%02x%02x", dir,
                iv[0], iv[1], iv[2], iv[3], iv[4], iv[5], iv[6], iv[7]);
        return 1;
    }
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %rsi, %r14
movq %rdi, %rbx
leaq 0x3823(%rip), %rdi      # 0x884b
callq 0x2030
movq %rax, %r15
testq %rax, %rax
jne 0x504f
leaq 0x381f(%rip), %rdi      # 0x885b
callq 0x2030
testq %rax, %rax
leaq 0x3817(%rip), %r15      # 0x8862
cmovneq %rax, %r15
movw $0x1, (%rbx)
movq %r15, %rdi
callq 0x2110
addq $-0x5b, %rax
cmpq $-0x6e, %rax
jbe 0x50c8
addq $0x2, %rbx
movzbl (%r14), %ecx
movzbl 0x1(%r14), %r8d
movzbl 0x2(%r14), %r9d
movzbl 0x3(%r14), %r10d
movzbl 0x4(%r14), %r11d
movzbl 0x5(%r14), %r12d
movzbl 0x6(%r14), %r13d
movzbl 0x7(%r14), %r14d
subq $0x8, %rsp
leaq 0x37ec(%rip), %rsi      # 0x8888
movq %rbx, %rdi
movq %r15, %rdx
xorl %eax, %eax
pushq %r14
pushq %r13
pushq %r12
pushq %r11
pushq %r10
callq 0x22f0
addq $0x30, %rsp
movl $0x1, %ebx
movl %ebx, %eax
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
leaq 0x3798(%rip), %rdi      # 0x8867
xorl %ebx, %ebx
movq %r15, %rsi
xorl %eax, %eax
callq 0x2380
jmp 0x50bc
// File: /workspace/github_c_makefile_star2_O1/skeeto[P]enchive/src/enchive.c
// Function: hmac_init
static void
hmac_init(SHA256_CTX *ctx, const uint8_t *key)
{
    int i;
    uint8_t pad[SHA256_BLOCK_SIZE];
    sha256_init(ctx);
    for (i = 0; i < SHA256_BLOCK_SIZE; i++)
        pad[i] = key[i] ^ 0x36U;
    sha256_update(ctx, pad, sizeof(pad));
}

// Assembly:
pushq %r14
pushq %rbx
subq $0x28, %rsp
movq %rsi, %r14
movq %rdi, %rbx
callq 0x7029
xorl %eax, %eax
movb (%r14,%rax), %cl
xorb $0x36, %cl
movb %cl, (%rsp,%rax)
incq %rax
cmpq $0x20, %rax
jne 0x50f1
movq %rsp, %rsi
movl $0x20, %edx
movq %rbx, %rdi
callq 0x704f
addq $0x28, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O1/skeeto[P]enchive/src/enchive.c
// Function: hmac_final
static void
hmac_final(SHA256_CTX *ctx, const uint8_t *key, uint8_t *hash)
{
    int i;
    uint8_t pad[SHA256_BLOCK_SIZE];
    sha256_final(ctx, hash);
    sha256_init(ctx);
    for (i = 0; i < SHA256_BLOCK_SIZE; i++)
        pad[i] = key[i] ^ 0x5cU;
    sha256_update(ctx, pad, sizeof(pad));
    sha256_update(ctx, hash, SHA256_BLOCK_SIZE);
    sha256_final(ctx, hash);
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x20, %rsp
movq %rdx, %rbx
movq %rsi, %r15
movq %rdi, %r14
movq %rdx, %rsi
callq 0x70b5
movq %r14, %rdi
callq 0x7029
xorl %eax, %eax
movb (%r15,%rax), %cl
xorb $0x5c, %cl
movb %cl, (%rsp,%rax)
incq %rax
cmpq $0x20, %rax
jne 0x5140
movq %rsp, %rsi
movl $0x20, %edx
movq %r14, %rdi
callq 0x704f
movl $0x20, %edx
movq %r14, %rdi
movq %rbx, %rsi
callq 0x704f
movq %r14, %rdi
movq %rbx, %rsi
callq 0x70b5
addq $0x20, %rsp
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/skeeto[P]enchive/src/enchive.c
// Function: secure_entropy
static void
secure_entropy(void *buf, size_t len)
{
    FILE *r = fopen("/dev/urandom", "rb");
    if (!r)
        fatal("failed to open %s", "/dev/urandom");
    if (!fread(buf, len, 1, r))
        fatal("failed to gather entropy");
    fclose(r);
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rsi, %r14
movq %rdi, %r15
leaq 0x39f7(%rip), %rdi      # 0x8b91
leaq 0x3616(%rip), %rsi      # 0x87b7
callq 0x22c0
testq %rax, %rax
je 0x51d3
movq %rax, %rbx
movl $0x1, %edx
movq %r15, %rdi
movq %r14, %rsi
movq %rax, %rcx
callq 0x20e0
testq %rax, %rax
je 0x51e8
movq %rbx, %rdi
popq %rbx
popq %r14
popq %r15
jmp 0x2100
leaq 0x39c4(%rip), %rdi      # 0x8b9e
leaq 0x39b0(%rip), %rsi      # 0x8b91
xorl %eax, %eax
callq 0x3fa5
leaq 0x39c1(%rip), %rdi      # 0x8bb0
xorl %eax, %eax
callq 0x3fa5
// File: /workspace/github_c_makefile_star2_O1/skeeto[P]enchive/src/enchive.c
// Function: load_pubkey
static void
load_pubkey(const char *file, uint8_t *key)
{
    FILE *f = fopen(file, "rb");
    if (!f)
        fatal("failed to open key file for reading '%s' -- %s",
              file, strerror(errno));
    if (!fread(key, 32, 1, f))
        fatal("failed to read key file '%s'", file);
    fclose(f);
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rsi, %r15
movq %rdi, %rbx
leaq 0x35af(%rip), %rsi      # 0x87b7
callq 0x22c0
testq %rax, %rax
je 0x523c
movq %rax, %r14
movl $0x20, %esi
movl $0x1, %edx
movq %r15, %rdi
movq %rax, %rcx
callq 0x20e0
testq %rax, %rax
je 0x525c
movq %r14, %rdi
popq %rbx
popq %r14
popq %r15
jmp 0x2100
callq 0x2070
movl (%rax), %edi
callq 0x2340
leaq 0x356b(%rip), %rdi      # 0x87ba
movq %rbx, %rsi
movq %rax, %rdx
xorl %eax, %eax
callq 0x3fa5
leaq 0x3a7a(%rip), %rdi      # 0x8cdd
movq %rbx, %rsi
xorl %eax, %eax
callq 0x3fa5
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O1/skeeto[P]enchive/src/curve25519-donna.c
// Function: fmul
static void
fmul(int64_t *output, const int64_t *in, const int64_t *in2)
{
  int64_t t[19];
  fproduct(t, in, in2);
  /* |t[i]| < 14*2^54 */
  freduce_degree(t);
  freduce_coefficients(t);
  /* |t[i]| < 2^26 */
  memcpy(output, t, sizeof(int64_t) * 10);
}

// Assembly:
pushq %r14
pushq %rbx
subq $0x98, %rsp
movq %rdi, %rbx
movq %rsp, %r14
movq %r14, %rdi
callq 0x6461
movq %r14, %rdi
callq 0x6a50
movq %r14, %rdi
callq 0x6b0c
movl $0xa, %ecx
movq %rbx, %rdi
movq %r14, %rsi
rep  movsq (%rsi), %es:(%rdi)
addq $0x98, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O1/skeeto[P]enchive/src/sha256.c
// Function: sha256_update
void sha256_update(SHA256_CTX *ctx, const uint8_t data[], size_t len)
{
	uint32_t i;

	for (i = 0; i < len; ++i) {
		ctx->data[ctx->datalen] = data[i];
		ctx->datalen++;
		if (ctx->datalen == 64) {
			sha256_transform(ctx, ctx->data);
			ctx->bitlen += 512;
			ctx->datalen = 0;
		}
	}
}

// Assembly:
testq %rdx, %rdx
je 0x70b4
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdx, %rbx
movq %rsi, %r14
movq %rdi, %r15
movl $0x1, %ebp
xorl %eax, %eax
movb (%r14,%rax), %al
movl 0x40(%r15), %ecx
movb %al, (%r15,%rcx)
movl 0x40(%r15), %eax
incl %eax
movl %eax, 0x40(%r15)
cmpl $0x40, %eax
jne 0x70a1
movq %r15, %rdi
movq %r15, %rsi
callq 0x6e8c
addq $0x200, 0x48(%r15)      # imm = 0x200
movl $0x0, 0x40(%r15)
movl %ebp, %eax
incl %ebp
cmpq %rbx, %rax
jb 0x706b
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/janmojzis[P]mcencrypt/mcdecrypt.c
// Function: cleanup
void cleanup(void) {
    randombytes(&g, sizeof g);

    if (map != MAP_FAILED) {
        munmap(map, maplen);
        map = MAP_FAILED;
        maplen = 0;
    }

    if (buf) {
        free(buf);
        buf = 0;
    }
}

// Assembly:
pushq %rax
leaq 0x8e84(%rip), %rdi      # 0xa0d8
movl $0x1037d8, %esi         # imm = 0x1037D8
callq 0x6668
movq 0x8e53(%rip), %rdi      # 0xa0b8
cmpq $-0x1, %rdi
je 0x128d
movq 0x10c63e(%rip), %rsi    # 0x10d8b0
callq 0x10e0
movq $-0x1, 0x8e36(%rip) # 0xa0b8
movq $0x0, 0x10c623(%rip) # 0x10d8b0
movq 0x10c624(%rip), %rdi    # 0x10d8b8
testq %rdi, %rdi
je 0x12a9
callq 0x1030
movq $0x0, 0x10c60f(%rip) # 0x10d8b8
popq %rax
retq
// File: /workspace/github_c_makefile_star2_O1/lengjingzju[P]json/json.c
// Function: item_total_get
static inline int _item_total_get(json_object *json)
{
    int cnt = 0;
    json_object *item = NULL;

    switch (json->type_member) {
    case JSON_ARRAY:
    case JSON_OBJECT:
        json_list_for_each_entry(item, &json->value.head, list, json_object) {
            cnt += _item_total_get(item);
        }
        break;
    default:
        break;
    }
    ++cnt;

    return cnt;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movl 0x8(%rdi), %eax
andl $0xe, %eax
movl $0x1, %ebx
cmpl $0x8, %eax
jne 0x3bfa
movq %rdi, %r14
movq 0x18(%rdi), %r15
addq $0x18, %r14
cmpq %r14, %r15
je 0x3bfa
xorl %ebx, %ebx
movq %r15, %rdi
callq 0x3bbf
addl %eax, %ebx
movq (%r15), %r15
cmpq %r14, %r15
jne 0x3be6
incl %ebx
movl %ebx, %eax
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/lengjingzju[P]json/json.c
// Function: json_new_object
json_object *json_new_object(json_type_t type)
{
    json_object *json = NULL;

    if ((json = (json_object *)json_calloc(1, sizeof(json_object))) == NULL) {
        JsonErr("malloc failed!\n");
        return NULL;
    }

    json->type_member = type;
    switch (type) {
    case JSON_ARRAY:
    case JSON_OBJECT:
        INIT_JSON_LIST_HEAD(&json->value.head);
        break;
    default:
        break;
    }

    return json;
}

// Assembly:
pushq %rbp
pushq %rbx
pushq %rax
movl %edi, %ebp
movl $0x1, %edi
movl $0x28, %esi
callq 0x2150
testq %rax, %rax
je 0x3cc3
movq %rax, %rbx
movl 0x8(%rax), %eax
movl %ebp, %ecx
andl $0xf, %ecx
andl $-0x10, %eax
orl %ecx, %eax
movl %eax, 0x8(%rbx)
andl $-0x2, %ebp
cmpl $0x8, %ebp
jne 0x3ceb
movq %rbx, %rax
addq $0x18, %rax
movq %rax, 0x18(%rbx)
movq %rax, 0x20(%rbx)
jmp 0x3ceb
leaq 0x85d2(%rip), %rdi      # 0xc29c
leaq 0x8619(%rip), %rsi      # 0xc2ea
xorl %ebx, %ebx
movl $0x137, %edx            # imm = 0x137
xorl %eax, %eax
callq 0x20f0
leaq 0x8aba(%rip), %rdi      # 0xc7a0
callq 0x2090
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/lengjingzju[P]json/json.c
// Function: json_create_item
json_object *json_create_item(json_type_t type, void *value)
{
    json_object *json = NULL;

    if ((json = (json_object *)json_calloc(1, sizeof(json_object))) == NULL) {
        JsonErr("malloc failed!\n");
        return NULL;
    }

    json->type_member = type;
    switch (type) {
    case JSON_NULL:
        break;
    case JSON_BOOL:   json->value.vnum.vbool = *(bool *)value;      break;
    case JSON_INT:    json->value.vnum.vint  = *(int32_t *)value;   break;
    case JSON_HEX:    json->value.vnum.vhex  = *(uint32_t *)value;  break;
    case JSON_LINT:   json->value.vnum.vlint = *(int64_t *)value;   break;
    case JSON_LHEX:   json->value.vnum.vlhex = *(uint64_t *)value;  break;
    case JSON_DOUBLE: json->value.vnum.vdbl  = *(double *)value;    break;
    case JSON_STRING:
        if (json_set_string_value(json, (json_string_t *)value) < 0)
            return NULL;
        break;
    case JSON_ARRAY:
    case JSON_OBJECT:
        INIT_JSON_LIST_HEAD(&json->value.head);
        break;
    default:
        break;
    }

    return json;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rsi, %r14
movl %edi, %r15d
movl $0x1, %edi
movl $0x28, %esi
callq 0x2150
testq %rax, %rax
je 0x3d4d
movq %rax, %rbx
movl 0x8(%rax), %ecx
movl %r15d, %eax
andl $0xf, %eax
andl $-0x10, %ecx
orl %eax, %ecx
movl %ecx, 0x8(%rbx)
decl %r15d
cmpl $0x8, %r15d
ja 0x3dbf
leaq 0x82c4(%rip), %rcx      # 0xc000
movslq (%rcx,%r15,4), %rdx
addq %rcx, %rdx
jmpq *%rdx
movl (%r14), %eax
movl %eax, 0x18(%rbx)
jmp 0x3dbf
leaq 0x8548(%rip), %rdi      # 0xc29c
leaq 0x85a0(%rip), %rsi      # 0xc2fb
xorl %ebx, %ebx
movl $0x14d, %edx            # imm = 0x14D
xorl %eax, %eax
callq 0x20f0
leaq 0x8a30(%rip), %rdi      # 0xc7a0
callq 0x2090
jmp 0x3dbf
movq (%r14), %rax
movq %rax, 0x18(%rbx)
jmp 0x3dbf
movq %rbx, %rax
addq $0x18, %rax
movq %rax, 0x18(%rbx)
movq %rax, 0x20(%rbx)
jmp 0x3dbf
movb (%r14), %al
movb %al, 0x18(%rbx)
jmp 0x3dbf
movsd (%r14), %xmm0
movsd %xmm0, 0x18(%rbx)
jmp 0x3dbf
cmpl $0x7, %eax
jne 0x3dbd
movq %rbx, %rsi
addq $0x18, %rsi
movq %r14, %rdi
callq 0x21b0
testl %eax, %eax
jns 0x3dbf
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_create_item_array
json_object *json_create_item_array(json_type_t type, void *values, int count)
{
    int i = 0;
    void *value = NULL;
    json_object *json = NULL, *node = NULL;

    if ((json = json_create_array()) == NULL) {
        JsonErr("create array failed!\n");
        return NULL;
    }

    for (i = 0; i < count; ++i) {
        switch (type) {
        case JSON_BOOL:   value = ((bool *)values) + i;         break;
        case JSON_INT:    value = ((int32_t *)values) + i;      break;
        case JSON_HEX:    value = ((uint32_t *)values) + i;     break;
        case JSON_LINT:   value = ((int64_t *)values) + i;      break;
        case JSON_LHEX:   value = ((uint64_t *)values) + i;     break;
        case JSON_DOUBLE: value = ((double *)values) + i;       break;
        case JSON_STRING: value = ((json_string_t *)values) + i;break;
        default:          JsonErr("not support json type.\n");  goto err;
        }

        if ((node = json_create_item(type, value)) == NULL) {
            JsonErr("create item failed!\n");
            goto err;
        }
        json_list_add_tail(&node->list, &json->value.head);
    }

    return json;
err:
    json_del_object(json);
    return NULL;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %edx, %ebp
movq %rsi, (%rsp)
movl %edi, %r12d
movl $0x8, %edi
callq 0x2030
testq %rax, %rax
je 0x3e75
movq %rax, %rbx
testl %ebp, %ebp
jle 0x3ee0
leal -0x1(%r12), %r13d
cmpl $0x6, %r13d
ja 0x3e9f
movl %ebp, %ebp
xorl %r14d, %r14d
movq (%rsp), %r15
cmpl $0x5, %r13d
ja 0x3e46
leaq 0x8205(%rip), %rcx      # 0xc024
movslq (%rcx,%r13,4), %rax
addq %rcx, %rax
jmpq *%rax
movq (%rsp), %rax
leaq (%rax,%r14,8), %rsi
jmp 0x3e49
movq (%rsp), %rax
leaq (%rax,%r14,4), %rsi
jmp 0x3e49
movq (%rsp), %rax
leaq (%rax,%r14), %rsi
jmp 0x3e49
movq %r15, %rsi
movl %r12d, %edi
callq 0x2290
testq %rax, %rax
je 0x3ead
movq 0x20(%rbx), %rcx
movq (%rcx), %rdx
movq %rdx, (%rax)
movq %rax, (%rcx)
movq %rax, 0x20(%rbx)
incq %r14
addq $0x10, %r15
decq %rbp
jne 0x3e12
jmp 0x3ee0
leaq 0x8420(%rip), %rdi      # 0xc29c
leaq 0x848a(%rip), %rsi      # 0xc30d
xorl %ebx, %ebx
movl $0x171, %edx            # imm = 0x171
xorl %eax, %eax
callq 0x20f0
leaq 0x8848(%rip), %rdi      # 0xc6e0
callq 0x2090
jmp 0x3ee0
leaq 0x8880(%rip), %r14      # 0xc726
movl $0x17e, %edx            # imm = 0x17E
jmp 0x3eb9
movl $0x182, %edx            # imm = 0x182
leaq 0x8859(%rip), %r14      # 0xc712
leaq 0x83dc(%rip), %rdi      # 0xc29c
leaq 0x8446(%rip), %rsi      # 0xc30d
xorl %eax, %eax
callq 0x20f0
movq %r14, %rdi
callq 0x2090
movq %rbx, %rdi
callq 0x2270
xorl %ebx, %ebx
movq %rbx, %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: json_string_hash_code
uint32_t json_string_hash_code(json_string_t *jstr)
{
    uint32_t i = 0, hash = 0;

    json_string_info_update(jstr);
    if (!jstr->len)
        return 0;

    for (i = 0; i < jstr->len; ++i)
        hash = (hash << 5) - hash + jstr->str[i];
    return hash;
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
callq 0x20b0
movl (%rbx), %ecx
xorl %eax, %eax
cmpq $0x100, %rcx            # imm = 0x100
jb 0x3f7f
shrl $0x8, %ecx
movq 0x8(%rbx), %rdx
xorl %esi, %esi
xorl %eax, %eax
movl %eax, %edi
shll $0x5, %edi
subl %eax, %edi
movsbl (%rdx,%rsi), %eax
addl %edi, %eax
incq %rsi
cmpq %rsi, %rcx
jne 0x3f6a
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O1/lengjingzju[P]json/json.c
// Function: json_string_strdup
int json_string_strdup(json_string_t *src, json_string_t *dst)
{
    json_string_info_update(src);
    json_string_info_update(dst);
    if (src->len) {
        if (dst->len < src->len) {
            char *new_str = (char *)json_realloc(dst->str, src->len + 1);
            if (new_str) {
                dst->str = new_str;
            } else {
                JsonErr("malloc failed!\n");
                json_free(dst->str);
                dst->str = NULL;
                dst->len = 0;
                return -1;
            }
        }
        dst->escaped = src->escaped;
        dst->len = src->len;
        memcpy(dst->str, src->str, src->len);
        dst->str[src->len] = '\0';
    } else {
        dst->escaped = 0;
        dst->len = 0;
        if (dst->str) {
            json_free(dst->str);
            dst->str = NULL;
        }
    }

    return 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
callq 0x20b0
movq %rbx, %rdi
callq 0x20b0
movl (%r14), %esi
movl (%rbx), %eax
cmpl $0x100, %esi            # imm = 0x100
jae 0x3fd0
andl $0xef, %eax
movl %eax, (%rbx)
movq 0x8(%rbx), %rdi
xorl %ebp, %ebp
testq %rdi, %rdi
je 0x4076
callq 0x2050
movq $0x0, 0x8(%rbx)
jmp 0x4076
shrl $0x8, %esi
shrl $0x8, %eax
cmpl %esi, %eax
jae 0x4035
movq 0x8(%rbx), %rdi
incq %rsi
callq 0x2210
movq %rax, %r15
testq %rax, %rax
je 0x3ff4
movq %r15, 0x8(%rbx)
jmp 0x4030
leaq 0x82a1(%rip), %rdi      # 0xc29c
leaq 0x8323(%rip), %rsi      # 0xc325
movl $0x1c4, %edx            # imm = 0x1C4
xorl %eax, %eax
callq 0x20f0
leaq 0x878b(%rip), %rdi      # 0xc7a0
callq 0x2090
movq 0x8(%rbx), %rdi
callq 0x2050
movq $0x0, 0x8(%rbx)
movzbl (%rbx), %eax
movl %eax, (%rbx)
testq %r15, %r15
je 0x4083
movl (%r14), %eax
andl $0x10, %eax
movl (%rbx), %ecx
andl $-0x11, %ecx
orl %eax, %ecx
movl %ecx, (%rbx)
movl $0xffffff00, %eax       # imm = 0xFFFFFF00
andl (%r14), %eax
movzbl %cl, %ecx
orl %eax, %ecx
movl %ecx, (%rbx)
movq 0x8(%rbx), %rdi
movq 0x8(%r14), %rsi
movl (%r14), %edx
shrl $0x8, %edx
callq 0x2190
movq 0x8(%rbx), %rax
movl (%r14), %ecx
shrl $0x8, %ecx
movb $0x0, (%rax,%rcx)
xorl %ebp, %ebp
movl %ebp, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movl $0xffffffff, %ebp       # imm = 0xFFFFFFFF
jmp 0x4076
// File: /workspace/github_c_makefile_star2_O1/lengjingzju[P]json/json.c
// Function: json_set_number_value
int json_set_number_value(json_object *json, json_type_t type, void *value)
{
    int ret = 0;

    switch (json->type_member) {
    case JSON_BOOL:
    case JSON_INT:
    case JSON_HEX:
    case JSON_LINT:
    case JSON_LHEX:
    case JSON_DOUBLE:
        break;
    default:
        JsonErr("wrong type!\n");
        return -1;
    }

    switch (type) {
    case JSON_BOOL:   json->value.vnum.vbool = *(bool *)value;      break;
    case JSON_INT:    json->value.vnum.vint  = *(int32_t *)value;   break;
    case JSON_HEX:    json->value.vnum.vhex  = *(uint32_t *)value;  break;
    case JSON_LINT:   json->value.vnum.vlint = *(int64_t *)value;   break;
    case JSON_LHEX:   json->value.vnum.vlhex = *(uint64_t *)value;  break;
    case JSON_DOUBLE: json->value.vnum.vdbl  = *(double *)value;    break;
    default:                                                    return -1;
    }

    if (json->type_member != type) {
        ret = json->type_member;
        json->type_member = type;
    }

    return ret;
}

// Assembly:
movl 0x8(%rdi), %ecx
movl %ecx, %r8d
andl $0xf, %r8d
leal -0x1(%r8), %eax
cmpl $0x6, %eax
jae 0x43a9
leal -0x1(%rsi), %eax
cmpl $0x5, %eax
ja 0x4409
leaq 0x7d87(%rip), %r9       # 0xc120
movslq (%r9,%rax,4), %rax
addq %r9, %rax
jmpq *%rax
movl (%rdx), %eax
movl %eax, 0x18(%rdi)
jmp 0x43f3
pushq %rax
leaq 0x7eeb(%rip), %rdi      # 0xc29c
leaq 0x7f0c(%rip), %rsi      # 0xc2c4
movl $0x203, %edx            # imm = 0x203
xorl %eax, %eax
callq 0x20f0
leaq 0x8309(%rip), %rdi      # 0xc6d4
callq 0x2090
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
addq $0x8, %rsp
retq
movq (%rdx), %rax
movq %rax, 0x18(%rdi)
jmp 0x43f3
movb (%rdx), %al
movb %al, 0x18(%rdi)
jmp 0x43f3
movsd (%rdx), %xmm0
movsd %xmm0, 0x18(%rdi)
xorl %eax, %eax
cmpl %esi, %r8d
je 0x4408
andl $0xf, %esi
andl $-0x10, %ecx
orl %esi, %ecx
movl %ecx, 0x8(%rdi)
movl %r8d, %eax
retq
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
retq
// File: /workspace/github_c_makefile_star2_O1/lengjingzju[P]json/json.c
// Function: json_get_array_size
int json_get_array_size(json_object *json)
{
    int count = 0;
    json_object *pos = NULL;

    if (json->type_member == JSON_ARRAY) {
        json_list_for_each_entry(pos, &json->value.head, list, json_object) {
            ++count;
        }
    }

    return count;
}

// Assembly:
movl 0x8(%rdi), %ecx
andl $0xf, %ecx
xorl %eax, %eax
cmpl $0x8, %ecx
jne 0x4432
addq $0x18, %rdi
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
movq %rdi, %rcx
movq (%rcx), %rcx
incl %eax
cmpq %rdi, %rcx
jne 0x4428
retq
// File: /workspace/github_c_makefile_star2_O1/lengjingzju[P]json/json.c
// Function: json_get_object_size
int json_get_object_size(json_object *json)
{
    int count = 0;
    json_object *pos = NULL;

    if (json->type_member == JSON_OBJECT) {
        json_list_for_each_entry(pos, &json->value.head, list, json_object) {
            ++count;
        }
    }

    return count;
}

// Assembly:
movl 0x8(%rdi), %ecx
andl $0xf, %ecx
xorl %eax, %eax
cmpl $0x9, %ecx
jne 0x4456
addq $0x18, %rdi
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
movq %rdi, %rcx
movq (%rcx), %rcx
incl %eax
cmpq %rdi, %rcx
jne 0x444c
retq
// File: /workspace/github_c_makefile_star2_O1/lengjingzju[P]json/json.c
// Function: json_get_array_item
json_object *json_get_array_item(json_object *json, int seq, json_object **prev)
{
    int count = 0;
    json_object *p = NULL, *pos = NULL, *n = NULL;

    if (json->type_member == JSON_ARRAY) {
        json_list_for_each_entry_safe(p, pos, n, &json->value.head, list, json_object) {
            if (count++ == seq) {
                if (prev)
                    *prev = p;
                return pos;
            }
        }
    }

    return NULL;
}

// Assembly:
movl 0x8(%rdi), %eax
andl $0xf, %eax
cmpl $0x8, %eax
jne 0x4484
movq 0x18(%rdi), %rax
addq $0x18, %rdi
cmpq %rdi, %rax
je 0x4484
testl %esi, %esi
je 0x4487
movq %rax, %rcx
movq (%rax), %rax
cmpq %rdi, %rax
je 0x4484
decl %esi
jne 0x4473
jmp 0x448a
xorl %eax, %eax
retq
movq %rdi, %rcx
testq %rdx, %rdx
je 0x4486
movq %rcx, (%rdx)
retq
// File: /workspace/github_c_makefile_star2_O1/lengjingzju[P]json/json.c
// Function: json_get_object_item
json_object *json_get_object_item(json_object *json, const char *key, json_object **prev)
{
    json_object *p = NULL, *pos = NULL, *n = NULL;

    if (json->type_member == JSON_OBJECT) {
        if (key && key[0]) {
            json_list_for_each_entry_safe(p, pos, n, &json->value.head, list, json_object) {
                if (pos->key_member && strcmp(key, pos->key_member) == 0) {
                    if (prev)
                        *prev = p;
                    return pos;
                }
            }
        } else {
            json_list_for_each_entry_safe(p, pos, n, &json->value.head, list, json_object) {
                if (!pos->jkey.len) {
                    if (prev)
                        *prev = p;
                    return pos;
                }
            }
        }
    }

    return NULL;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl 0x8(%rdi), %eax
andl $0xf, %eax
cmpl $0x9, %eax
jne 0x44f2
movq %rdx, %rbx
movq %rsi, %r12
movq %rdi, %r14
testq %rsi, %rsi
je 0x4507
cmpb $0x0, (%r12)
je 0x4507
movq 0x18(%r14), %rbp
addq $0x18, %r14
cmpq %r14, %rbp
je 0x44f2
movq %r14, %r13
movq %rbp, %r15
movq (%rbp), %rbp
movq 0x10(%r15), %rsi
testq %rsi, %rsi
je 0x44ea
movq %r12, %rdi
callq 0x2160
testl %eax, %eax
je 0x4523
movq %r15, %r13
cmpq %r14, %rbp
jne 0x44ce
xorl %r15d, %r15d
movq %r15, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
addq $0x18, %r14
movq %r14, %r15
movq %r15, %r13
movq (%r15), %r15
cmpq %r14, %r15
je 0x44f2
cmpl $0xff, 0x8(%r15)
ja 0x450e
testq %rbx, %rbx
je 0x44f5
movq %r13, (%rbx)
jmp 0x44f5
// File: /workspace/github_c_makefile_star2_O1/lengjingzju[P]json/json.c
// Function: json_free_items
void json_free_items(json_items_t *items)
{
    if (items->items)
        json_free(items->items);
    items->items = NULL;
    items->conflicted = 0;
    items->total = 0;
    items->count = 0;
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
movq 0x10(%rdi), %rdi
testq %rdi, %rdi
je 0x4779
callq 0x2050
xorl %eax, %eax
movq %rax, 0x10(%rbx)
andb $-0x2, (%rbx)
movq %rax, 0x4(%rbx)
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O1/lengjingzju[P]json/json.c
// Function: json_add_item_to_array
int json_add_item_to_array(json_object *array, json_object *item)
{
    if (array->type_member == JSON_ARRAY) {
        json_list_add_tail(&item->list, &array->value.head);
        return 0;
    }
    return -1;
}

// Assembly:
movl 0x8(%rdi), %ecx
andl $0xf, %ecx
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
cmpl $0x8, %ecx
jne 0x49c8
movq 0x20(%rdi), %rax
movq (%rax), %rcx
movq %rcx, (%rsi)
movq %rsi, (%rax)
movq %rsi, 0x20(%rdi)
xorl %eax, %eax
retq
// File: /workspace/github_c_makefile_star2_O1/lengjingzju[P]json/json.c
// Function: json_add_item_to_object
int json_add_item_to_object(json_object *object, json_object *item)
{
    if (object->type_member == JSON_OBJECT) {
        json_list_add_tail(&item->list, &object->value.head);
        return 0;
    }
    return -1;
}

// Assembly:
movl 0x8(%rdi), %ecx
andl $0xf, %ecx
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
cmpl $0x9, %ecx
jne 0x49ec
movq 0x20(%rdi), %rax
movq (%rax), %rcx
movq %rcx, (%rsi)
movq %rsi, (%rax)
movq %rsi, 0x20(%rdi)
xorl %eax, %eax
retq
// File: /workspace/github_c_makefile_star2_O1/lengjingzju[P]json/json.c
// Function: json_detach_item_from_object
json_object *json_detach_item_from_object(json_object *json, const char *key)
{
    json_object *item = NULL, *prev = NULL;

    if ((item = json_get_object_item(json, key, &prev)) == NULL)
        return NULL;
    json_list_del(&item->list, &prev->list, &json->value.head);

    return item;
}

// Assembly:
pushq %rbx
subq $0x10, %rsp
movq %rdi, %rbx
leaq 0x8(%rsp), %rdx
movq $0x0, (%rdx)
callq 0x21f0
testq %rax, %rax
je 0x4a85
movq 0x8(%rsp), %rcx
leaq 0x18(%rbx), %rsi
movq (%rax), %rdx
cmpq %rsi, %rdx
jne 0x4a79
movq %rcx, 0x20(%rbx)
movq %rdx, (%rcx)
movq $0x0, (%rax)
jmp 0x4a87
xorl %eax, %eax
addq $0x10, %rsp
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O1/lengjingzju[P]json/json.c
// Function: json_replace_item_in_array
int json_replace_item_in_array(json_object *array, int seq, json_object *new_item)
{
    json_object *item = NULL, *prev = NULL;

    if (array->type_member == JSON_ARRAY) {
        if ((item = json_get_array_item(array, seq, &prev)) != NULL) {
            json_list_del(&item->list, &prev->list, &array->value.head);
            json_del_object(item);
            json_list_add(&new_item->list, &prev->list, &array->value.head);
        } else {
            json_list_add_tail(&new_item->list, &array->value.head);
        }

        return 0;
    }

    return -1;
}

// Assembly:
movl 0x8(%rdi), %ecx
andl $0xf, %ecx
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
cmpl $0x8, %ecx
jne 0x4b70
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %rbx
movq %rdi, %r14
leaq 0x18(%rdi), %rax
movq 0x18(%rdi), %rdi
cmpq %rax, %rdi
je 0x4b0d
testl %esi, %esi
je 0x4b14
movq %rdi, %r15
movq (%rdi), %rdi
cmpq %rax, %rdi
je 0x4b0d
decl %esi
jne 0x4afc
jmp 0x4b17
xorl %r15d, %r15d
xorl %edi, %edi
jmp 0x4b17
movq %rax, %r15
testq %rdi, %rdi
je 0x4b4c
leaq 0x18(%r14), %r12
movq (%rdi), %rax
cmpq %r12, %rax
jne 0x4b2c
movq %r15, 0x20(%r14)
movq %rax, (%r15)
movq $0x0, (%rdi)
callq 0x2270
movq (%r15), %rax
cmpq %r12, %rax
jne 0x4b47
movq %rbx, 0x20(%r14)
movq %rax, (%rbx)
jmp 0x4b60
movq 0x20(%r14), %rax
addq $0x20, %r14
movq (%rax), %rcx
movq %rcx, (%rbx)
movq %rbx, (%rax)
movq %r14, %r15
movq %rbx, (%r15)
xorl %eax, %eax
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: json_replace_item_in_object
int json_replace_item_in_object(json_object *object, json_object *new_item)
{
    json_object *item = NULL, *prev = NULL;

    if (object->type_member == JSON_OBJECT) {
        if ((item = json_get_object_item(object, new_item->key_member, &prev)) != NULL) {
            json_list_del(&item->list, &prev->list, &object->value.head);
            json_del_object(item);
            json_list_add(&new_item->list, &prev->list, &object->value.head);
        } else {
            json_list_add_tail(&new_item->list, &object->value.head);
        }

        return 0;
    }

    return -1;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq $0x0, 0x8(%rsp)
movl 0x8(%rdi), %ecx
andl $0xf, %ecx
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
cmpl $0x9, %ecx
jne 0x4c02
movq %rsi, %rbx
movq %rdi, %r14
movq 0x10(%rsi), %rsi
leaq 0x8(%rsp), %rdx
callq 0x21f0
testq %rax, %rax
je 0x4be9
movq 0x8(%rsp), %rcx
leaq 0x18(%r14), %r15
movq (%rax), %rdx
cmpq %r15, %rdx
jne 0x4bc1
movq %rcx, 0x20(%r14)
movq %rdx, (%rcx)
movq $0x0, (%rax)
movq %rax, %rdi
callq 0x2270
movq 0x8(%rsp), %rax
movq (%rax), %rcx
cmpq %r15, %rcx
jne 0x4be4
movq %rbx, 0x20(%r14)
movq %rcx, (%rbx)
jmp 0x4bfd
movq 0x20(%r14), %rax
addq $0x20, %r14
movq (%rax), %rcx
movq %rcx, (%rbx)
movq %rbx, (%rax)
movq %r14, %rax
movq %rbx, (%rax)
xorl %eax, %eax
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/lengjingzju[P]json/json.c
// Function: json_copy_item_to_array
int json_copy_item_to_array(json_object *array, json_object *item)
{
    json_object *node = NULL;

    if (array->type_member == JSON_ARRAY) {
        if ((node = json_deepcopy(item)) == NULL) {
            JsonErr("copy failed!\n");
            return -1;
        }
        json_list_add_tail(&node->list, &array->value.head);
        return 0;
    }

    return -1;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movl 0x8(%rdi), %eax
andl $0xf, %eax
movl $0xffffffff, %ebx       # imm = 0xFFFFFFFF
cmpl $0x8, %eax
jne 0x4dd6
movq %rdi, %r14
movq %rsi, %rdi
callq 0x2260
testq %rax, %rax
je 0x4db0
movq 0x20(%r14), %rcx
movq (%rcx), %rdx
movq %rdx, (%rax)
movq %rax, (%rcx)
movq %rax, 0x20(%r14)
xorl %ebx, %ebx
jmp 0x4dd6
leaq 0x74e5(%rip), %rdi      # 0xc29c
leaq 0x758a(%rip), %rsi      # 0xc348
movl $0x384, %edx            # imm = 0x384
xorl %eax, %eax
callq 0x20f0
leaq 0x7924(%rip), %rdi      # 0xc6f5
callq 0x2090
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O1/lengjingzju[P]json/json.c
// Function: json_copy_item_to_object
int json_copy_item_to_object(json_object *object, json_object *item)
{
    json_object *node = NULL;

    if (object->type_member == JSON_OBJECT) {
        if ((node = json_deepcopy(item)) == NULL) {
            JsonErr("copy failed!\n");
            return -1;
        }
        json_list_add_tail(&node->list, &object->value.head);
        return 0;
    }

    return -1;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movl 0x8(%rdi), %eax
andl $0xf, %eax
movl $0xffffffff, %ebx       # imm = 0xFFFFFFFF
cmpl $0x9, %eax
jne 0x4e3f
movq %rdi, %r14
movq %rsi, %rdi
callq 0x2260
testq %rax, %rax
je 0x4e19
movq 0x20(%r14), %rcx
movq (%rcx), %rdx
movq %rdx, (%rax)
movq %rax, (%rcx)
movq %rax, 0x20(%r14)
xorl %ebx, %ebx
jmp 0x4e3f
leaq 0x747c(%rip), %rdi      # 0xc29c
leaq 0x753a(%rip), %rsi      # 0xc361
movl $0x394, %edx            # imm = 0x394
xorl %eax, %eax
callq 0x20f0
leaq 0x78bb(%rip), %rdi      # 0xc6f5
callq 0x2090
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O1/lengjingzju[P]json/json.c
// Function: json_add_new_item_to_array
json_object *json_add_new_item_to_array(json_object *array, json_type_t type, void *value)
{
    json_object *item = NULL;

    if (array->type_member == JSON_ARRAY) {
        switch (type) {
        case JSON_NULL:
        case JSON_BOOL:
        case JSON_INT:
        case JSON_HEX:
        case JSON_LINT:
        case JSON_LHEX:
        case JSON_DOUBLE:
        case JSON_STRING:
        case JSON_ARRAY:
        case JSON_OBJECT:
            if ((item = json_create_item(type, value)) == NULL) {
                JsonErr("create item failed!\n");
                return NULL;
            }
            json_list_add_tail(&item->list, &array->value.head);
            return item;
        default:
            JsonErr("not support json type.\n");
            return NULL;
        }
    }

    return NULL;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movl 0x8(%rdi), %eax
andl $0xf, %eax
cmpl $0x8, %eax
jne 0x4e85
cmpl $0x9, %esi
ja 0x4e89
movq %rdi, %r14
movl %esi, %edi
movq %rdx, %rsi
callq 0x2290
testq %rax, %rax
je 0x4eae
movq %rax, %rbx
movq 0x20(%r14), %rax
movq (%rax), %rcx
movq %rcx, (%rbx)
movq %rbx, (%rax)
movq %rbx, 0x20(%r14)
jmp 0x4ed6
xorl %ebx, %ebx
jmp 0x4ed6
leaq 0x740c(%rip), %rdi      # 0xc29c
leaq 0x74e4(%rip), %rsi      # 0xc37b
xorl %ebx, %ebx
movl $0x3b5, %edx            # imm = 0x3B5
xorl %eax, %eax
callq 0x20f0
leaq 0x787a(%rip), %rdi      # 0xc726
jmp 0x4ed1
leaq 0x73e7(%rip), %rdi      # 0xc29c
leaq 0x74bf(%rip), %rsi      # 0xc37b
xorl %ebx, %ebx
movl $0x3af, %edx            # imm = 0x3AF
xorl %eax, %eax
callq 0x20f0
leaq 0x7841(%rip), %rdi      # 0xc712
callq 0x2090
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O1/lengjingzju[P]json/json.c
// Function: json_add_new_item_to_object
json_object *json_add_new_item_to_object(json_object *object, json_type_t type, json_string_t *jkey, void *value)
{
    json_object *item = NULL;

    if (object->type_member == JSON_OBJECT) {
        switch (type) {
        case JSON_NULL:
        case JSON_BOOL:
        case JSON_INT:
        case JSON_HEX:
        case JSON_LINT:
        case JSON_LHEX:
        case JSON_DOUBLE:
        case JSON_STRING:
        case JSON_ARRAY:
        case JSON_OBJECT:
            if ((item = json_create_item(type, value)) == NULL) {
                JsonErr("create item failed!\n");
                return NULL;
            }
            if (json_set_key(item, jkey) < 0) {
                JsonErr("add key failed!\n");
                json_del_object(item);
                return NULL;
            }
            json_list_add_tail(&item->list, &object->value.head);
            return item;
        default:
            JsonErr("not support json type.\n");
            return NULL;
        }
    }

    return NULL;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movl 0x8(%rdi), %eax
andl $0xf, %eax
cmpl $0x9, %eax
jne 0x4fb5
cmpl $0x9, %esi
ja 0x4f38
movq %rdx, %r15
movq %rdi, %r14
movl %esi, %edi
movq %rcx, %rsi
callq 0x2290
testq %rax, %rax
je 0x4f5d
movq %rax, %rbx
movq %rax, %rsi
addq $0x8, %rsi
movq %r15, %rdi
callq 0x21b0
testl %eax, %eax
js 0x4f87
movq 0x20(%r14), %rax
movq (%rax), %rcx
movq %rcx, (%rbx)
movq %rbx, (%rax)
movq %rbx, 0x20(%r14)
jmp 0x4fb7
leaq 0x735d(%rip), %rdi      # 0xc29c
leaq 0x7451(%rip), %rsi      # 0xc397
xorl %ebx, %ebx
movl $0x3d9, %edx            # imm = 0x3D9
xorl %eax, %eax
callq 0x20f0
leaq 0x77cb(%rip), %rdi      # 0xc726
jmp 0x4f80
leaq 0x7338(%rip), %rdi      # 0xc29c
leaq 0x742c(%rip), %rsi      # 0xc397
xorl %ebx, %ebx
movl $0x3ce, %edx            # imm = 0x3CE
xorl %eax, %eax
callq 0x20f0
leaq 0x7792(%rip), %rdi      # 0xc712
callq 0x2090
jmp 0x4fb7
leaq 0x730e(%rip), %rdi      # 0xc29c
leaq 0x7402(%rip), %rsi      # 0xc397
movl $0x3d2, %edx            # imm = 0x3D2
xorl %eax, %eax
callq 0x20f0
leaq 0x775a(%rip), %rdi      # 0xc702
callq 0x2090
movq %rbx, %rdi
callq 0x2270
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_mem_refresh
static void _json_mem_refresh(json_mem_mgr_t *mgr)
{
    json_mem_node_t *p = NULL, *pos = NULL, *n = NULL;
    int i = 0;
    json_list_for_each_entry_safe(p, pos, n, &mgr->head, list, json_mem_node_t) {
        if (++i == 1) {
            pos->cur = pos->ptr;
            mgr->cur_node = pos;
        } else {
            json_list_del(&pos->list, &p->list, &mgr->head);
            json_free(pos->ptr);
            json_free(pos);
            pos = p;
        }
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq (%rdi), %r14
cmpq %rdi, %r14
je 0x50fc
movq %rdi, %rbx
xorl %ebp, %ebp
movq %rdi, %r15
movq (%r14), %r12
subl $0x1, %ebp
jae 0x50d0
movq 0x10(%r14), %rax
movq %rax, 0x18(%r14)
movq %r14, 0x18(%rbx)
movq %r14, %r15
jmp 0x50f4
cmpq %rbx, %r12
jne 0x50d9
movq %r15, 0x8(%rbx)
movq %r12, (%r15)
movq $0x0, (%r14)
movq 0x10(%r14), %rdi
callq 0x2050
movq %r14, %rdi
callq 0x2050
movq %r12, %r14
cmpq %rbx, %r12
jne 0x50b7
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/lengjingzju[P]json/json.c
// Function: pjson_new_object
json_object *pjson_new_object(json_type_t type, json_mem_t *mem)
{
    json_object *json = NULL;

    if ((json = (json_object *)pjson_memory_alloc(sizeof(json_object), &mem->obj_mgr)) == NULL) {
        JsonErr("malloc failed!\n");
        return NULL;
    }
    memset(json, 0, sizeof(json_object));
    json->type_member = type;

    switch (type) {
    case JSON_ARRAY:
    case JSON_OBJECT:
        INIT_JSON_LIST_HEAD(&json->value.head);
        break;
    default:
        break;
    }

    return json;
}

// Assembly:
pushq %rbp
pushq %rbx
pushq %rax
movl %edi, %ebp
addq $0x8, %rsi
movl $0x28, %edi
callq 0x51a0
testq %rax, %rax
je 0x516e
movq %rax, %rbx
xorps %xmm0, %xmm0
movups %xmm0, (%rax)
movups %xmm0, 0x10(%rax)
movq $0x0, 0x20(%rax)
movl 0x8(%rax), %eax
movl %ebp, %ecx
andl $0xf, %ecx
andl $-0x10, %eax
orl %ecx, %eax
movl %eax, 0x8(%rbx)
andl $-0x2, %ebp
cmpl $0x8, %ebp
jne 0x5196
movq %rbx, %rax
addq $0x18, %rax
movq %rax, 0x18(%rbx)
movq %rax, 0x20(%rbx)
jmp 0x5196
leaq 0x7127(%rip), %rdi      # 0xc29c
leaq 0x716d(%rip), %rsi      # 0xc2e9
xorl %ebx, %ebx
movl $0x453, %edx            # imm = 0x453
xorl %eax, %eax
callq 0x20f0
leaq 0x760f(%rip), %rdi      # 0xc7a0
callq 0x2090
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %rbp
retq