LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O1/zhou-yuxin[P]redis-aof-no-cow/src/geo.c
// Function: geoAppendIfWithinRadius
int geoAppendIfWithinRadius(geoArray *ga, double lon, double lat, double radius, double score, sds member) {
    double distance, xy[2];

    if (!decodeGeohash(score,xy)) return C_ERR; /* Can't decode. */
    /* Note that geohashGetDistanceIfInRadiusWGS84() takes arguments in
     * reverse order: longitude first, latitude later. */
    if (!geohashGetDistanceIfInRadiusWGS84(lon,lat, xy[0], xy[1],
                                           radius, &distance))
    {
        return C_ERR;
    }

    /* Append the new element. */
    geoPoint *gp = geoArrayAppend(ga);
    gp->longitude = xy[0];
    gp->latitude = xy[1];
    gp->dist = distance;
    gp->member = member;
    gp->score = score;
    return C_OK;
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
subq $0x40, %rsp
movq %rsi, %rbx
movsd %xmm2, 0x20(%rsp)
movsd %xmm1, 0x18(%rsp)
movsd %xmm0, 0x10(%rsp)
movq %rdi, %r14
cvttsd2si %xmm3, %rax
movq %rax, %rcx
sarq $0x3f, %rcx
movapd %xmm3, 0x30(%rsp)
movapd %xmm3, %xmm0
subsd 0x4c286(%rip), %xmm0    # 0xd08e8
cvttsd2si %xmm0, %rdi
andq %rcx, %rdi
orq %rax, %rdi
movq %rsp, %rdx
movl $0x1a, %esi
callq 0xa10ee
movl $0xffffffff, %ebp       # imm = 0xFFFFFFFF
testl %eax, %eax
je 0x846e6
movsd (%rsp), %xmm2
movsd 0x8(%rsp), %xmm3
leaq 0x28(%rsp), %rdi
movsd 0x10(%rsp), %xmm0
movsd 0x18(%rsp), %xmm1
movsd 0x20(%rsp), %xmm4
callq 0xa19db
testl %eax, %eax
je 0x846e6
movq %r14, %rdi
callq 0x842e3
movsd (%rsp), %xmm0
movsd %xmm0, (%rax)
movsd 0x8(%rsp), %xmm0
movsd %xmm0, 0x8(%rax)
movsd 0x28(%rsp), %xmm0
movsd %xmm0, 0x10(%rax)
movq %rbx, 0x20(%rax)
movapd 0x30(%rsp), %xmm0
movsd %xmm0, 0x18(%rax)
xorl %ebp, %ebp
movl %ebp, %eax
addq $0x40, %rsp
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/zhou-yuxin[P]redis-aof-no-cow/src/geo.c
// Function: geoposCommand
void geoposCommand(client *c) {
    int j;

    /* Look up the requested zset */
    robj *zobj = NULL;
    if ((zobj = lookupKeyReadOrReply(c, c->argv[1], shared.emptymultibulk))
        == NULL || checkType(c, zobj, OBJ_ZSET)) return;

    /* Report elements one after the other, using a null bulk reply for
     * missing elements. */
    addReplyMultiBulkLen(c,c->argc-2);
    for (j = 2; j < c->argc; j++) {
        double score;
        if (zsetScore(zobj, c->argv[j], &score) == C_ERR) {
            addReply(c,shared.nullmultibulk);
        } else {
            /* Decode... */
            double xy[2];
            if (!decodeGeohash(score,xy)) {
                addReply(c,shared.nullmultibulk);
                continue;
            }
            addReplyMultiBulkLen(c,2);
            addReplyHumanLongDouble(c,xy[0]);
            addReplyHumanLongDouble(c,xy[1]);
        }
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movq %rdi, %rbx
movq 0x40(%rdi), %rax
movq 0x8(%rax), %rsi
leaq 0x81a63(%rip), %r13     # 0x1072b0
movq 0x68(%r13), %rdx
callq 0x44f89
testq %rax, %rax
je 0x8593a
movq %rax, %r14
movq %rbx, %rdi
movq %rax, %rsi
movl $0x3, %edx
callq 0x441ab
testl %eax, %eax
jne 0x8593a
movslq 0x38(%rbx), %rsi
addq $-0x2, %rsi
movq %rbx, %rdi
callq 0x4063b
cmpl $0x3, 0x38(%rbx)
jl 0x8593a
movl $0x2, %ebp
leaq 0x18(%rsp), %r15
leaq 0x20(%rsp), %r12
movq 0x40(%rbx), %rax
movq (%rax,%rbp,8), %rsi
movq %r14, %rdi
movq %r15, %rdx
callq 0x55517
cmpl $-0x1, %eax
je 0x8591e
movsd 0x18(%rsp), %xmm0
cvttsd2si %xmm0, %rax
movq %rax, %rcx
sarq $0x3f, %rcx
subsd 0x4b013(%rip), %xmm0    # 0xd08e8
cvttsd2si %xmm0, %rdi
andq %rcx, %rdi
orq %rax, %rdi
movl $0x1a, %esi
movq %r12, %rdx
callq 0xa10ee
testl %eax, %eax
je 0x8591e
movl $0x2, %esi
movq %rbx, %rdi
callq 0x4063b
fldl 0x20(%rsp)
fstpt (%rsp)
movq %rbx, %rdi
callq 0x404ff
fldl 0x28(%rsp)
fstpt (%rsp)
movq %rbx, %rdi
callq 0x404ff
jmp 0x8592a
movq 0x58(%r13), %rsi
movq %rbx, %rdi
callq 0x3fc19
incq %rbp
movslq 0x38(%rbx), %rax
cmpq %rax, %rbp
jl 0x858a3
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/zhou-yuxin[P]redis-aof-no-cow/src/geo.c
// Function: geodistCommand
void geodistCommand(client *c) {
    double to_meter = 1;

    /* Check if there is the unit to extract, otherwise assume meters. */
    if (c->argc == 5) {
        to_meter = extractUnitOrReply(c,c->argv[4]);
        if (to_meter < 0) return;
    } else if (c->argc > 5) {
        addReply(c,shared.syntaxerr);
        return;
    }

    /* Look up the requested zset */
    robj *zobj = NULL;
    if ((zobj = lookupKeyReadOrReply(c, c->argv[1], shared.emptybulk))
        == NULL || checkType(c, zobj, OBJ_ZSET)) return;

    /* Get the scores. We need both otherwise NULL is returned. */
    double score1, score2, xyxy[4];
    if (zsetScore(zobj, c->argv[2], &score1) == C_ERR ||
        zsetScore(zobj, c->argv[3], &score2) == C_ERR)
    {
        addReply(c,shared.nullbulk);
        return;
    }

    /* Decode & compute the distance. */
    if (!decodeGeohash(score1,xyxy) || !decodeGeohash(score2,xyxy+2))
        addReply(c,shared.nullbulk);
    else
        addReplyDoubleDistance(c,
            geohashGetDistance(xyxy[0],xyxy[1],xyxy[2],xyxy[3]) / to_meter);
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x40, %rsp
movq %rdi, %rbx
movl 0x38(%rdi), %eax
cmpl $0x5, %eax
jne 0x85982
movq 0x40(%rbx), %rax
movq 0x20(%rax), %rsi
movq %rbx, %rdi
callq 0x844b1
xorpd %xmm1, %xmm1
movsd %xmm0, 0x8(%rsp)
ucomisd %xmm0, %xmm1
jbe 0x859b1
jmp 0x85ad5
jle 0x859a3
leaq 0x81925(%rip), %rax     # 0x1072b0
movq 0x80(%rax), %rsi
movq %rbx, %rdi
addq $0x40, %rsp
popq %rbx
popq %r14
popq %r15
jmp 0x3fc19
movsd 0x3e02d(%rip), %xmm0    # 0xc39d8
movsd %xmm0, 0x8(%rsp)
movq 0x40(%rbx), %rax
movq 0x8(%rax), %rsi
leaq 0x818f0(%rip), %r15     # 0x1072b0
movq 0x18(%r15), %rdx
movq %rbx, %rdi
callq 0x44f89
testq %rax, %rax
je 0x85ad5
movq %rax, %r14
movq %rbx, %rdi
movq %rax, %rsi
movl $0x3, %edx
callq 0x441ab
testl %eax, %eax
jne 0x85ad5
movq 0x40(%rbx), %rax
movq 0x10(%rax), %rsi
leaq 0x18(%rsp), %rdx
movq %r14, %rdi
callq 0x55517
cmpl $-0x1, %eax
je 0x85ac9
movq 0x40(%rbx), %rax
movq 0x18(%rax), %rsi
leaq 0x10(%rsp), %rdx
movq %r14, %rdi
callq 0x55517
cmpl $-0x1, %eax
je 0x85ac9
movsd 0x18(%rsp), %xmm0
cvttsd2si %xmm0, %rax
movq %rax, %rcx
sarq $0x3f, %rcx
subsd 0x4aea2(%rip), %xmm0    # 0xd08e8
cvttsd2si %xmm0, %rdi
andq %rcx, %rdi
orq %rax, %rdi
leaq 0x20(%rsp), %rdx
movl $0x1a, %esi
callq 0xa10ee
testl %eax, %eax
je 0x85ac9
movsd 0x10(%rsp), %xmm0
leaq 0x30(%rsp), %rdx
cvttsd2si %xmm0, %rax
movq %rax, %rcx
sarq $0x3f, %rcx
subsd 0x4ae65(%rip), %xmm0    # 0xd08e8
cvttsd2si %xmm0, %rdi
andq %rcx, %rdi
orq %rax, %rdi
movl $0x1a, %esi
callq 0xa10ee
testl %eax, %eax
je 0x85ac9
movsd 0x20(%rsp), %xmm0
movsd 0x28(%rsp), %xmm1
movsd 0x30(%rsp), %xmm2
movsd 0x38(%rsp), %xmm3
callq 0xa18c8
divsd 0x8(%rsp), %xmm0
movq %rbx, %rdi
callq 0x845e5
jmp 0x85ad5
movq 0x50(%r15), %rsi
movq %rbx, %rdi
callq 0x3fc19
addq $0x40, %rsp
popq %rbx
popq %r14
popq %r15
retq
nop
// File: /workspace/github_c_makefile_star2_O1/zhou-yuxin[P]redis-aof-no-cow/deps/lua/src/ldo.c
// Function: f_parser
static void f_parser (lua_State *L, void *ud) {
  int i;
  Proto *tf;
  Closure *cl;
  struct SParser *p = cast(struct SParser *, ud);
  int c = luaZ_lookahead(p->z);
  luaC_checkGC(L);
  tf = (luaY_parser)(L, p->z,
                                                             &p->buff, p->name);
  cl = luaF_newLclosure(L, tf->nups, hvalue(gt(L)));
  cl->l.p = tf;
  for (i = 0; i < tf->nups; i++)  /* initialize eventual upvalues */
    cl->l.upvals[i] = luaF_newupval(L);
  setclvalue(L, L->top, cl);
  incr_top(L);
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %rbx
movq (%rsi), %rdi
callq 0x944ff
movq 0x20(%rbx), %rax
movq 0x78(%rax), %rcx
cmpq 0x70(%rax), %rcx
jb 0x8c912
movq %rbx, %rdi
callq 0x8d547
leaq 0x8(%r14), %rdx
movq (%r14), %rsi
movq 0x20(%r14), %rcx
movq %rbx, %rdi
callq 0x8e838
movq %rax, %r14
movzbl 0x70(%rax), %esi
movq 0x78(%rbx), %rdx
movq %rbx, %rdi
callq 0x8ce6d
movq %rax, %r15
movq %r14, 0x20(%rax)
cmpb $0x0, 0x70(%r14)
je 0x8c963
xorl %r12d, %r12d
movq %rbx, %rdi
callq 0x8cee9
movq %rax, 0x28(%r15,%r12,8)
incq %r12
movzbl 0x70(%r14), %eax
cmpq %rax, %r12
jb 0x8c949
movq 0x10(%rbx), %rax
movq %r15, (%rax)
movl $0x6, 0x8(%rax)
movq 0x38(%rbx), %rax
subq 0x10(%rbx), %rax
cmpq $0x10, %rax
jg 0x8c98c
movq %rbx, %rdi
movl $0x1, %esi
callq 0x8bf06
addq $0x10, 0x10(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O1/zhou-yuxin[P]redis-aof-no-cow/deps/lua/src/lua_cjson.c
// Function: luaopen_cjson
int luaopen_cjson(lua_State *l)
{
    lua_cjson_new(l);

#ifdef ENABLE_CJSON_GLOBAL
    /* Register a global "cjson" table. */
    lua_pushvalue(l, -1);
    lua_setglobal(l, CJSON_MODNAME);
#endif

    /* Return cjson table */
    return 1;
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
callq 0x9a3b1
movq %rbx, %rdi
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
callq 0x89ba4
leaq 0x32952(%rip), %rdx     # 0xcccef
movq %rbx, %rdi
movl $0xffffd8ee, %esi       # imm = 0xFFFFD8EE
callq 0x8a43e
movl $0x1, %eax
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O1/zhou-yuxin[P]redis-aof-no-cow/deps/lua/src/lua_cjson.c
// Function: lua_cjson_safe_new
static int lua_cjson_safe_new(lua_State *l)
{
    const char *func[] = { "decode", "encode", NULL };
    int i;

    lua_cjson_new(l);

    /* Fix new() method */
    lua_pushcfunction(l, lua_cjson_safe_new);
    lua_setfield(l, -2, "new");

    for (i = 0; func[i]; i++) {
        lua_getfield(l, -1, func[i]);
        lua_pushcclosure(l, json_protect_conversion, 1);
        lua_setfield(l, -2, func[i]);
    }

    return 1;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %rdi, %rbx
callq 0x9a3b1
leaq -0x18(%rip), %rsi       # 0x9a67e
xorl %r12d, %r12d
movq %rbx, %rdi
xorl %edx, %edx
callq 0x8a159
leaq 0x39fe4(%rip), %rdx     # 0xd468e
movq %rbx, %rdi
movl $0xfffffffe, %esi       # imm = 0xFFFFFFFE
callq 0x8a43e
leaq 0x658b2(%rip), %r13     # 0xfff70
leaq 0x1532(%rip), %r14      # 0x9bbf7
movq (%r12,%r13), %r15
movq %rbx, %rdi
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
movq %r15, %rdx
callq 0x8a262
movq %rbx, %rdi
movq %r14, %rsi
movl $0x1, %edx
callq 0x8a159
movq %rbx, %rdi
movl $0xfffffffe, %esi       # imm = 0xFFFFFFFE
movq %r15, %rdx
callq 0x8a43e
addq $0x8, %r12
cmpq $0x10, %r12
jne 0x9a6c5
movl $0x1, %eax
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/zhou-yuxin[P]redis-aof-no-cow/deps/lua/src/lua_cjson.c
// Function: json_encode
static int json_encode(lua_State *l)
{
    json_config_t *cfg = json_fetch_config(l);
    strbuf_t local_encode_buf;
    strbuf_t *encode_buf;
    char *json;
    int len;

    luaL_argcheck(l, lua_gettop(l) == 1, 1, "expected 1 argument");

    if (!cfg->encode_keep_buffer) {
        /* Use private buffer */
        encode_buf = &local_encode_buf;
        strbuf_init(encode_buf, 0);
    } else {
        /* Reuse existing buffer */
        encode_buf = &cfg->encode_buf;
        strbuf_reset(encode_buf);
    }

    json_append_data(l, cfg, 0, encode_buf);
    json = strbuf_string(encode_buf, &len);

    lua_pushlstring(l, json, len);

    if (!cfg->encode_keep_buffer)
        strbuf_free(encode_buf);

    return 1;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x20, %rsp
movq %rdi, %rbx
callq 0x9aa5d
movq %rax, %r14
movq %rbx, %rdi
callq 0x89969
cmpl $0x1, %eax
je 0x9a747
leaq 0x39f64(%rip), %rdx     # 0xd469e
movq %rbx, %rdi
movl $0x1, %esi
callq 0x94600
cmpl $0x0, 0x538(%r14)
je 0x9a768
movq %r14, %r15
addq $0x500, %r15            # imm = 0x500
movl $0x0, 0x50c(%r14)
jmp 0x9a775
movq %rsp, %r15
movq %r15, %rdi
xorl %esi, %esi
callq 0xa0424
movq %rbx, %rdi
movq %r14, %rsi
xorl %edx, %edx
movq %r15, %rcx
callq 0x9aa92
movslq 0xc(%r15), %rdx
movq (%r15), %rsi
movq %rbx, %rdi
callq 0x89fd4
cmpl $0x0, 0x538(%r14)
jne 0x9a7a6
movq %r15, %rdi
callq 0xa0580
movl $0x1, %eax
addq $0x20, %rsp
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/zhou-yuxin[P]redis-aof-no-cow/deps/lua/src/lua_cjson.c
// Function: json_decode
static int json_decode(lua_State *l)
{
    json_parse_t json;
    json_token_t token;
    size_t json_len;

    luaL_argcheck(l, lua_gettop(l) == 1, 1, "expected 1 argument");

    json.cfg = json_fetch_config(l);
    json.data = luaL_checklstring(l, 1, &json_len);
    json.current_depth = 0;
    json.ptr = json.data;

    /* Detect Unicode other than UTF-8 (see RFC 4627, Sec 3)
     *
     * CJSON can support any simple data type, hence only the first
     * character is guaranteed to be ASCII (at worst: '"'). This is
     * still enough to detect whether the wrong encoding is in use. */
    if (json_len >= 2 && (!json.data[0] || !json.data[1]))
        luaL_error(l, "JSON parser does not support UTF-16 or UTF-32");

    /* Ensure the temporary buffer can hold the entire string.
     * This means we no longer need to do length checks since the decoded
     * string must be smaller than the entire json string */
    json.tmp = strbuf_new(json_len);

    json_next_token(&json, &token);
    json_process_value(l, &json, &token);

    /* Ensure there is no more input left */
    json_next_token(&json, &token);

    if (token.type != T_END)
        json_throw_parse_error(l, &json, "the end", &token);

    strbuf_free(json.tmp);

    return 1;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x50, %rsp
movq %rdi, %rbx
callq 0x89969
cmpl $0x1, %eax
je 0x9a7df
leaq 0x39ecc(%rip), %rdx     # 0xd469e
movq %rbx, %rdi
movl $0x1, %esi
callq 0x94600
movq %rbx, %rdi
callq 0x9aa5d
movq %rax, 0x28(%rsp)
leaq 0x8(%rsp), %r14
movq %rbx, %rdi
movl $0x1, %esi
movq %r14, %rdx
callq 0x94907
movq %rax, 0x10(%rsp)
movl $0x0, 0x30(%rsp)
movq %rax, 0x18(%rsp)
cmpq $0x2, (%r14)
jb 0x9a835
cmpb $0x0, (%rax)
je 0x9a824
cmpb $0x0, 0x1(%rax)
jne 0x9a835
leaq 0x3a029(%rip), %rsi     # 0xd4854
movq %rbx, %rdi
xorl %eax, %eax
callq 0x946ba
movl 0x8(%rsp), %edi
callq 0xa0522
leaq 0x10(%rsp), %r14
movq %rax, 0x10(%r14)
leaq 0x38(%rsp), %r15
movq %r14, %rdi
movq %r15, %rsi
callq 0x9b203
movq %rbx, %rdi
movq %r14, %rsi
movq %r15, %rdx
callq 0x9b62e
movq %r14, %rdi
movq %r15, %rsi
callq 0x9b203
cmpl $0xa, (%r15)
je 0x9a88f
leaq 0x3a005(%rip), %rdx     # 0xd4882
leaq 0x10(%rsp), %rsi
leaq 0x38(%rsp), %rcx
movq %rbx, %rdi
callq 0x9b890
movq 0x20(%rsp), %rdi
callq 0xa0580
movl $0x1, %eax
addq $0x50, %rsp
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/zhou-yuxin[P]redis-aof-no-cow/deps/lua/src/lua_cjson.c
// Function: json_cfg_encode_sparse_array
static int json_cfg_encode_sparse_array(lua_State *l)
{
    json_config_t *cfg = json_arg_init(l, 3);

    json_enum_option(l, 1, &cfg->encode_sparse_convert, NULL, 1);
    json_integer_option(l, 2, &cfg->encode_sparse_ratio, 0, INT_MAX);
    json_integer_option(l, 3, &cfg->encode_sparse_safe, 0, INT_MAX);

    return 3;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movl $0x3, %esi
callq 0x9ba83
movq %rax, %r14
leaq 0x520(%rax), %rsi
movq %rbx, %rdi
xorl %edx, %edx
callq 0x9bad0
leaq 0x524(%r14), %rdx
movq %rbx, %rdi
movl $0x2, %esi
xorl %ecx, %ecx
movl $0x7fffffff, %r8d       # imm = 0x7FFFFFFF
callq 0x9bb4c
addq $0x528, %r14            # imm = 0x528
movq %rbx, %rdi
movl $0x3, %esi
movq %r14, %rdx
xorl %ecx, %ecx
movl $0x7fffffff, %r8d       # imm = 0x7FFFFFFF
callq 0x9bb4c
movl $0x3, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O1/zhou-yuxin[P]redis-aof-no-cow/deps/lua/src/lua_cjson.c
// Function: json_cfg_encode_keep_buffer
static int json_cfg_encode_keep_buffer(lua_State *l)
{
    json_config_t *cfg = json_arg_init(l, 1);
    int old_value;

    old_value = cfg->encode_keep_buffer;

    json_enum_option(l, 1, &cfg->encode_keep_buffer, NULL, 1);

    /* Init / free the buffer if the setting has changed */
    if (old_value ^ cfg->encode_keep_buffer) {
        if (cfg->encode_keep_buffer)
            strbuf_init(&cfg->encode_buf, 0);
        else
            strbuf_free(&cfg->encode_buf);
    }

    return 1;
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movq %rdi, %r14
movl $0x1, %esi
callq 0x9ba83
movq %rax, %rbx
leaq 0x538(%rax), %rsi
movl 0x538(%rax), %ebp
movq %r14, %rdi
xorl %edx, %edx
callq 0x9bad0
movl 0x538(%rbx), %eax
cmpl %eax, %ebp
je 0x9aa02
addq $0x500, %rbx            # imm = 0x500
movq %rbx, %rdi
testl %eax, %eax
je 0x9a9fd
xorl %esi, %esi
callq 0xa0424
jmp 0x9aa02
callq 0xa0580
movl $0x1, %eax
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/zhou-yuxin[P]redis-aof-no-cow/deps/lua/src/lua_cjson.c
// Function: json_fetch_config
static json_config_t *json_fetch_config(lua_State *l)
{
    json_config_t *cfg;

    cfg = lua_touserdata(l, lua_upvalueindex(1));
    if (!cfg)
        luaL_error(l, "BUG: Unable to fetch CJSON configuration");

    return cfg;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %r14
movl $0xffffd8ed, %esi       # imm = 0xFFFFD8ED
callq 0x89ef5
movq %rax, %rbx
testq %rax, %rax
jne 0x9aa87
leaq 0x39c35(%rip), %rsi     # 0xd46b2
movq %r14, %rdi
xorl %eax, %eax
callq 0x946ba
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O1/zhou-yuxin[P]redis-aof-no-cow/deps/lua/src/lua_cjson.c
// Function: json_append_number
static void json_append_number(lua_State *l, json_config_t *cfg,
                               strbuf_t *json, int lindex)
{
    double num = lua_tonumber(l, lindex);
    int len;

    if (cfg->encode_invalid_numbers == 0) {
        /* Prevent encoding invalid numbers */
        if (isinf(num) || isnan(num))
            json_encode_exception(l, cfg, json, lindex, "must not be NaN or Inf");
    } else if (cfg->encode_invalid_numbers == 1) {
        /* Encode invalid numbers, but handle "nan" separately
         * since some platforms may encode as "-nan". */
        if (isnan(num)) {
            strbuf_append_mem(json, "nan", 3);
            return;
        }
    } else {
        /* Encode invalid numbers as "null" */
        if (isinf(num) || isnan(num)) {
            strbuf_append_mem(json, "null", 4);
            return;
        }
    }

    strbuf_ensure_empty_length(json, FPCONV_G_FMT_BUFSIZE);
    len = fpconv_g_fmt(strbuf_empty_ptr(json), num, cfg->encode_number_precision);
    strbuf_extend_length(json, len);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movl %ecx, %ebp
movq %rdx, %rbx
movq %rsi, %r14
movq %rdi, %r15
movl %ecx, %esi
callq 0x89d7e
movl 0x530(%r14), %eax
cmpl $0x1, %eax
je 0x9b0cb
testl %eax, %eax
jne 0x9b0ef
movq %xmm0, %rax
btrq $0x3f, %rax
movabsq $0x7ff0000000000000, %rcx # imm = 0x7FF0000000000000
cmpq %rcx, %rax
jl 0x9b134
leaq 0x3970f(%rip), %r8      # 0xd47be
movq %r15, %rdi
movq %r14, %rsi
movq %rbx, %rdx
movl %ebp, %ecx
movq %xmm0, (%rsp)
callq 0x9b1b7
movsd (%rsp), %xmm0
jmp 0x9b134
ucomisd %xmm0, %xmm0
jnp 0x9b134
leaq 0x2896c(%rip), %rsi     # 0xc3a44
movq %rbx, %rdi
movl $0x3, %edx
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0x9b177
movq %xmm0, %rax
btrq $0x3f, %rax
movabsq $0x7ff0000000000000, %rcx # imm = 0x7FF0000000000000
cmpq %rcx, %rax
jl 0x9b134
movl 0xc(%rbx), %esi
movl %esi, %eax
subl 0x8(%rbx), %eax
cmpl $-0x4, %eax
jl 0x9b120
addl $0x4, %esi
movq %rbx, %rdi
callq 0xa0604
movq (%rbx), %rax
movslq 0xc(%rbx), %rcx
movl $0x6c6c756e, (%rax,%rcx) # imm = 0x6C6C756E
addl $0x4, 0xc(%rbx)
jmp 0x9b16c
movl 0xc(%rbx), %esi
movl %esi, %eax
subl 0x8(%rbx), %eax
cmpl $-0x20, %eax
jl 0x9b156
addl $0x20, %esi
movq %rbx, %rdi
movsd %xmm0, (%rsp)
callq 0xa0604
movsd (%rsp), %xmm0
movslq 0xc(%rbx), %rdi
addq (%rbx), %rdi
movl 0x534(%r14), %esi
callq 0xa0a0c
addl %eax, 0xc(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/zhou-yuxin[P]redis-aof-no-cow/deps/lua/src/lua_cjson.c
// Function: json_encode_exception
static void json_encode_exception(lua_State *l, json_config_t *cfg, strbuf_t *json, int lindex,
                                  const char *reason)
{
    if (!cfg->encode_keep_buffer)
        strbuf_free(json);
    luaL_error(l, "Cannot serialise %s: %s",
                  lua_typename(l, lua_type(l, lindex)), reason);
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movq %r8, %rbx
movl %ecx, %ebp
movq %rdi, %r14
cmpl $0x0, 0x538(%rsi)
jne 0x9b1d4
movq %rdx, %rdi
callq 0xa0580
movq %r14, %rdi
movl %ebp, %esi
callq 0x89bc4
movq %r14, %rdi
movl %eax, %esi
callq 0x89be2
leaq 0x3964d(%rip), %rsi     # 0xd483c
movq %r14, %rdi
movq %rax, %rdx
movq %rbx, %rcx
xorl %eax, %eax
popq %rbx
popq %r14
popq %rbp
jmp 0x946ba
// File: /workspace/github_c_makefile_star2_O1/zhou-yuxin[P]redis-aof-no-cow/deps/lua/src/lua_cjson.c
// Function: json_is_invalid_number
static int json_is_invalid_number(json_parse_t *json)
{
    const char *p = json->ptr;

    /* Reject numbers starting with + */
    if (*p == '+')
        return 1;

    /* Skip minus sign if it exists */
    if (*p == '-')
        p++;

    /* Reject numbers starting with 0x, or leading zeros */
    if (*p == '0') {
        int ch2 = *(p + 1);

        if ((ch2 | 0x20) == 'x' ||          /* Hex */
            ('0' <= ch2 && ch2 <= '9'))     /* Leading zero */
            return 1;

        return 0;
    } else if (*p <= '9') {
        return 0;                           /* Ordinary number */
    }

    /* Reject inf/nan */
    if (!strncasecmp(p, "inf", 3))
        return 1;
    if (!strncasecmp(p, "nan", 3))
        return 1;

    /* Pass all other numbers which may still be invalid, but
     * strtod() will catch them. */
    return 0;
}

// Assembly:
pushq %rbp
pushq %rbx
pushq %rax
movq 0x8(%rdi), %rbx
movzbl (%rbx), %eax
movb $0x1, %bpl
cmpl $0x2b, %eax
je 0x9b958
cmpl $0x2d, %eax
jne 0x9b8fd
incq %rbx
movb (%rbx), %al
cmpb $0x30, %al
jne 0x9b91e
movb 0x1(%rbx), %al
movl %eax, %ecx
andb $-0x21, %cl
cmpb $0x58, %cl
sete %cl
addb $-0x30, %al
cmpb $0xa, %al
setb %bpl
orb %cl, %bpl
jmp 0x9b958
cmpb $0x3a, %al
jge 0x9b926
xorl %ebp, %ebp
jmp 0x9b958
leaq 0x27636(%rip), %rsi     # 0xc2f63
movl $0x3, %edx
movq %rbx, %rdi
callq 0x268e0
testl %eax, %eax
je 0x9b958
leaq 0x280ff(%rip), %rsi     # 0xc3a44
movl $0x3, %edx
movq %rbx, %rdi
callq 0x268e0
testl %eax, %eax
sete %bpl
movzbl %bpl, %eax
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/zhou-yuxin[P]redis-aof-no-cow/deps/lua/src/lua_cjson.c
// Function: json_next_number_token
static void json_next_number_token(json_parse_t *json, json_token_t *token)
{
    char *endptr;

    token->type = T_NUMBER;
    token->value.number = fpconv_strtod(json->ptr, &endptr);
    if (json->ptr == endptr)
        json_set_token_error(token, json, "invalid number");
    else
        json->ptr = endptr;     /* Skip the processed number */

    return;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq %rsi, %rbx
movq %rdi, %r14
movl $0x5, (%rsi)
movq 0x8(%rdi), %rdi
leaq 0x8(%rsp), %r15
movq %r15, %rsi
callq 0xa08ec
movsd %xmm0, 0x8(%rbx)
movq 0x8(%r14), %rax
movq (%r15), %rcx
cmpq %rcx, %rax
je 0x9b9a0
movq %rcx, 0x8(%r14)
jmp 0x9b9b7
movl $0xc, (%rbx)
subl (%r14), %eax
movl %eax, 0x4(%rbx)
leaq 0x38ee5(%rip), %rax     # 0xd4898
movq %rax, 0x8(%rbx)
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/zhou-yuxin[P]redis-aof-no-cow/deps/lua/src/lua_cjson.c
// Function: json_decode_descend
static void json_decode_descend(lua_State *l, json_parse_t *json, int slots)
{
    json->current_depth++;

    if (json->current_depth <= json->cfg->decode_max_depth &&
        lua_checkstack(l, slots)) {
        return;
    }

    strbuf_free(json->tmp);
    luaL_error(l, "Found too many nested data structures (%d) at character %d",
        json->current_depth, json->ptr - json->data);
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %rbx
movl 0x20(%rsi), %eax
leal 0x1(%rax), %ecx
movl %ecx, 0x20(%rsi)
movq 0x18(%rsi), %rcx
cmpl 0x540(%rcx), %eax
jge 0x9ba57
movq %rbx, %rdi
movl %edx, %esi
callq 0x8985e
testl %eax, %eax
je 0x9ba57
addq $0x8, %rsp
popq %rbx
popq %r14
retq
movq 0x10(%r14), %rdi
callq 0xa0580
movl 0x20(%r14), %edx
movq 0x8(%r14), %rcx
subq (%r14), %rcx
leaq 0x38f04(%rip), %rsi     # 0xd4976
movq %rbx, %rdi
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x946ba
// File: /workspace/github_c_makefile_star2_O1/zhou-yuxin[P]redis-aof-no-cow/deps/lua/src/lua_cjson.c
// Function: json_arg_init
static json_config_t *json_arg_init(lua_State *l, int args)
{
    luaL_argcheck(l, lua_gettop(l) <= args, args + 1,
                  "found too many arguments");

    while (lua_gettop(l) < args)
        lua_pushnil(l);

    return json_fetch_config(l);
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movl %esi, %r14d
movq %rdi, %rbx
callq 0x89969
cmpl %r14d, %eax
jle 0x9bab4
leal 0x1(%r14), %esi
leaq 0x38fcf(%rip), %rdx     # 0xd4a71
movq %rbx, %rdi
callq 0x94600
jmp 0x9bab4
movq %rbx, %rdi
callq 0x89f91
movq %rbx, %rdi
callq 0x89969
cmpl %r14d, %eax
jl 0x9baac
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x9aa5d
// File: /workspace/github_c_makefile_star2_O1/zhou-yuxin[P]redis-aof-no-cow/deps/lua/src/lua_cjson.c
// Function: json_enum_option
static int json_enum_option(lua_State *l, int optindex, int *setting,
                            const char **options, int bool_true)
{
    static const char *bool_options[] = { "off", "on", NULL };

    if (!options) {
        options = bool_options;
        bool_true = 1;
    }

    if (!lua_isnil(l, optindex)) {
        if (bool_true && lua_isboolean(l, optindex))
            *setting = lua_toboolean(l, optindex) * bool_true;
        else
            *setting = luaL_checkoption(l, optindex, NULL, options);
    }

    if (bool_true && (*setting == 0 || *setting == bool_true))
        lua_pushboolean(l, *setting);
    else
        lua_pushstring(l, options[*setting]);

    return 1;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rsi, %r15
movq %rdi, %rbx
testq %rdx, %rdx
leaq 0x6ac3b(%rip), %r14     # 0x106720
cmovneq %rdx, %r14
movl $0x1, %esi
callq 0x89bc4
testl %eax, %eax
je 0x9bb25
movq %rbx, %rdi
movl $0x1, %esi
callq 0x89bc4
movq %rbx, %rdi
movl $0x1, %esi
cmpl $0x1, %eax
jne 0x9bb18
callq 0x89ddc
jmp 0x9bb22
xorl %edx, %edx
movq %r14, %rcx
callq 0x9481d
movl %eax, (%r15)
movslq (%r15), %rsi
cmpq $0x1, %rsi
ja 0x9bb3b
movq %rbx, %rdi
popq %rbx
popq %r14
popq %r15
jmp 0x8a1f0
movq (%r14,%rsi,8), %rsi
movq %rbx, %rdi
popq %rbx
popq %r14
popq %r15
jmp 0x8a02b
// File: /workspace/github_c_makefile_star2_O1/zhou-yuxin[P]redis-aof-no-cow/deps/lua/src/lua_cjson.c
// Function: json_integer_option
static int json_integer_option(lua_State *l, int optindex, int *setting,
                               int min, int max)
{
    char errmsg[64];
    int value;

    if (!lua_isnil(l, optindex)) {
        value = luaL_checkinteger(l, optindex);
        snprintf(errmsg, sizeof(errmsg), "expected integer between %d and %d", min, max);
        luaL_argcheck(l, min <= value && value <= max, 1, errmsg);
        *setting = value;
    }

    lua_pushinteger(l, *setting);

    return 1;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x40, %rsp
movl %r8d, %ebp
movl %ecx, %r15d
movq %rdx, %r14
movl %esi, %r12d
movq %rdi, %rbx
callq 0x89bc4
testl %eax, %eax
je 0x9bbbd
movq %rbx, %rdi
movl %r12d, %esi
callq 0x94b57
movq %rax, %r12
leaq 0x38f05(%rip), %rdx     # 0xd4a8a
movq %rsp, %rdi
movl $0x40, %esi
movl %r15d, %ecx
movl %ebp, %r8d
xorl %eax, %eax
callq 0x26120
cmpl %r15d, %r12d
setge %al
cmpl %ebp, %r12d
setle %cl
testb %cl, %al
jne 0x9bbba
movq %rsp, %rdx
movq %rbx, %rdi
movl $0x1, %esi
callq 0x94600
movl %r12d, (%r14)
movslq (%r14), %rsi
movq %rbx, %rdi
callq 0x89fba
addq $0x40, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/zhou-yuxin[P]redis-aof-no-cow/deps/lua/src/lua_cjson.c
// Function: json_protect_conversion
static int json_protect_conversion(lua_State *l)
{
    int err;

    /* Deliberately throw an error for invalid arguments */
    luaL_argcheck(l, lua_gettop(l) == 1, 1, "expected 1 argument");

    /* pcall() the function stored as upvalue(1) */
    lua_pushvalue(l, lua_upvalueindex(1));
    lua_insert(l, 1);
    err = lua_pcall(l, 1, 1, 0);
    if (!err)
        return 1;

    if (err == LUA_ERRRUN) {
        lua_pushnil(l);
        lua_insert(l, -2);
        return 2;
    }

    /* Since we are not using a custom error handler, the only remaining
     * errors are memory related */
    return luaL_error(l, "Memory allocation error in CJSON protected call");
}

// Assembly:
pushq %rbp
pushq %rbx
pushq %rax
movq %rdi, %rbx
callq 0x89969
cmpl $0x1, %eax
je 0x9bc1b
leaq 0x38a90(%rip), %rdx     # 0xd469e
movq %rbx, %rdi
movl $0x1, %esi
callq 0x94600
movq %rbx, %rdi
movl $0xffffd8ed, %esi       # imm = 0xFFFFD8ED
callq 0x89ba4
movl $0x1, %ebp
movq %rbx, %rdi
movl $0x1, %esi
callq 0x89aab
movq %rbx, %rdi
movl $0x1, %esi
movl $0x1, %edx
xorl %ecx, %ecx
callq 0x8a6ac
testl %eax, %eax
je 0x9bc71
cmpl $0x2, %eax
jne 0x9bc7a
movq %rbx, %rdi
callq 0x89f91
movq %rbx, %rdi
movl $0xfffffffe, %esi       # imm = 0xFFFFFFFE
callq 0x89aab
movl $0x2, %ebp
movl %ebp, %eax
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
leaq 0x38e3e(%rip), %rsi     # 0xd4abf
movq %rbx, %rdi
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %rbp
jmp 0x946ba
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O1/zhou-yuxin[P]redis-aof-no-cow/deps/lua/src/lua_struct.c
// Function: getnum
static int getnum (lua_State *L, const char **fmt, int df) {
  if (!isdigit(**fmt))  /* no number? */
    return df;  /* return default value */
  else {
    int a = 0;
    do {
      if (a > (INT_MAX / 10) || a * 10 > (INT_MAX - (**fmt - '0')))
        luaL_error(L, "integral size overflow");
      a = a*10 + *((*fmt)++) - '0';
    } while (isdigit(**fmt));
    return a;
  }
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movl %edx, %r12d
movq %rsi, %rbx
movq %rdi, %r14
callq 0x26570
movq %rax, %r15
movq (%rax), %rax
movq (%rbx), %rcx
movsbq (%rcx), %rcx
testb $0x8, 0x1(%rax,%rcx,2)
je 0x9c7b4
leaq 0x3847d(%rip), %r13     # 0xd4bd8
xorl %r12d, %r12d
cmpl $0xccccccc, %r12d       # imm = 0xCCCCCCC
jg 0x9c77f
leal (%r12,%r12), %eax
leal (%rax,%rax,4), %eax
movq (%rbx), %rcx
movsbl (%rcx), %ecx
movl $0x8000002f, %edx       # imm = 0x8000002F
subl %ecx, %edx
cmpl %edx, %eax
jle 0x9c78c
movq %r14, %rdi
movq %r13, %rsi
xorl %eax, %eax
callq 0x946ba
leal (%r12,%r12,4), %eax
movq (%rbx), %rcx
leaq 0x1(%rcx), %rdx
movq %rdx, (%rbx)
movsbl (%rcx), %edx
leal (%rdx,%rax,2), %r12d
addl $-0x30, %r12d
movq (%r15), %rax
movsbq 0x1(%rcx), %rcx
testb $0x8, 0x1(%rax,%rcx,2)
jne 0x9c75e
movl %r12d, %eax
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O1/zhou-yuxin[P]redis-aof-no-cow/deps/lua/src/lua_cmsgpack.c
// Function: memrevifle
void memrevifle(void *ptr, size_t len) {
    unsigned char   *p = (unsigned char *)ptr,
                    *e = (unsigned char *)p+len-1,
                    aux;
    int test = 1;
    unsigned char *testp = (unsigned char*) &test;

    if (testp[0] == 0) return; /* Big endian, nothing to do. */
    len /= 2;
    while(len--) {
        aux = *p;
        *p = *e;
        *e = aux;
        p++;
        e--;
    }
}

// Assembly:
cmpq $0x2, %rsi
jb 0x9c7f0
leaq (%rsi,%rdi), %rax
decq %rax
shrq %rsi
negq %rsi
xorl %ecx, %ecx
movb (%rdi), %dl
movb (%rax,%rcx), %r8b
movb %r8b, (%rdi)
movb %dl, (%rax,%rcx)
incq %rdi
decq %rcx
cmpq %rcx, %rsi
jne 0x9c7d9
retq
// File: /workspace/github_c_makefile_star2_O1/zhou-yuxin[P]redis-aof-no-cow/deps/lua/src/lua_cmsgpack.c
// Function: mp_buf_new
mp_buf *mp_buf_new(lua_State *L) {
    mp_buf *buf = NULL;

    /* Old size = 0; new size = sizeof(*buf) */
    buf = (mp_buf*)mp_realloc(L, NULL, 0, sizeof(*buf));

    buf->b = NULL;
    buf->len = buf->free = 0;
    return buf;
}

// Assembly:
pushq %rbx
subq $0x10, %rsp
leaq 0x8(%rsp), %rbx
movq %rbx, %rsi
callq 0x8a9e0
movq (%rbx), %rdi
movl $0x18, %ecx
xorl %esi, %esi
xorl %edx, %edx
callq *%rax
xorps %xmm0, %xmm0
movups %xmm0, (%rax)
movq $0x0, 0x10(%rax)
addq $0x10, %rsp
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O1/zhou-yuxin[P]redis-aof-no-cow/deps/lua/src/lua_cmsgpack.c
// Function: mp_buf_append
void mp_buf_append(lua_State *L, mp_buf *buf, const unsigned char *s, size_t len) {
    if (buf->free < len) {
        size_t newsize = (buf->len+len)*2;

        buf->b = (unsigned char*)mp_realloc(L, buf->b, buf->len + buf->free, newsize);
        buf->free = newsize - buf->len;
    }
    memcpy(buf->b+buf->len,s,len);
    buf->len += len;
    buf->free -= len;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rcx, %rbx
movq %rdx, %r15
movq %rsi, %r14
movq 0x10(%rsi), %r12
cmpq %rcx, %r12
jae 0x9c8bb
movq (%r14), %rax
movq %rax, 0x8(%rsp)
movq 0x8(%r14), %rax
leaq (%rax,%rbx), %rbp
addq %rbp, %rbp
addq %rax, %r12
leaq 0x10(%rsp), %r13
movq %r13, %rsi
callq 0x8a9e0
movq (%r13), %rdi
movq 0x8(%rsp), %rsi
movq %r12, %rdx
movq %rbp, %rcx
callq *%rax
movq %rax, (%r14)
subq 0x8(%r14), %rbp
movq %rbp, 0x10(%r14)
movq (%r14), %rdi
addq 0x8(%r14), %rdi
movq %r15, %rsi
movq %rbx, %rdx
callq 0x26c60
addq %rbx, 0x8(%r14)
subq %rbx, 0x10(%r14)
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/zhou-yuxin[P]redis-aof-no-cow/deps/lua/src/lua_cmsgpack.c
// Function: mp_encode_bytes
void mp_encode_bytes(lua_State *L, mp_buf *buf, const unsigned char *s, size_t len) {
    unsigned char hdr[5];
    int hdrlen;

    if (len < 32) {
        hdr[0] = 0xa0 | (len&0xff); /* fix raw */
        hdrlen = 1;
    } else if (len <= 0xff) {
        hdr[0] = 0xd9;
        hdr[1] = len;
        hdrlen = 2;
    } else if (len <= 0xffff) {
        hdr[0] = 0xda;
        hdr[1] = (len&0xff00)>>8;
        hdr[2] = len&0xff;
        hdrlen = 3;
    } else {
        hdr[0] = 0xdb;
        hdr[1] = (len&0xff000000)>>24;
        hdr[2] = (len&0xff0000)>>16;
        hdr[3] = (len&0xff00)>>8;
        hdr[4] = len&0xff;
        hdrlen = 5;
    }
    mp_buf_append(L,buf,hdr,hdrlen);
    mp_buf_append(L,buf,s,len);
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rcx, %rbx
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %r12
cmpq $0x1f, %rcx
ja 0x9c982
movl %ebx, %eax
orb $-0x60, %al
movb %al, 0x3(%rsp)
movl $0x1, %ecx
jmp 0x9c9dc
cmpq $0xff, %rbx
ja 0x9c99b
movb $-0x27, 0x3(%rsp)
movb %bl, 0x4(%rsp)
movl $0x2, %ecx
jmp 0x9c9dc
cmpq $0xffff, %rbx           # imm = 0xFFFF
ja 0x9c9b8
movb $-0x26, 0x3(%rsp)
movb %bh, 0x4(%rsp)
movb %bl, 0x5(%rsp)
movl $0x3, %ecx
jmp 0x9c9dc
movb $-0x25, 0x3(%rsp)
movl %ebx, %eax
shrl $0x18, %eax
movb %al, 0x4(%rsp)
movl %ebx, %eax
shrl $0x10, %eax
movb %al, 0x5(%rsp)
movb %bh, 0x6(%rsp)
movb %bl, 0x7(%rsp)
movl $0x5, %ecx
leaq 0x3(%rsp), %rdx
movq %r12, %rdi
movq %r15, %rsi
callq 0x9c85c
movq %r12, %rdi
movq %r15, %rsi
movq %r14, %rdx
movq %rbx, %rcx
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
jmp 0x9c85c
// File: /workspace/github_c_makefile_star2_O1/zhou-yuxin[P]redis-aof-no-cow/deps/lua/src/lua_cmsgpack.c
// Function: mp_encode_double
void mp_encode_double(lua_State *L, mp_buf *buf, double d) {
    unsigned char b[9];
    float f = d;

    assert(sizeof(f) == 4 && sizeof(d) == 8);
    if (d == (double)f) {
        b[0] = 0xca;    /* float IEEE 754 */
        memcpy(b+1,&f,4);
        memrevifle(b+1,4);
        mp_buf_append(L,buf,b,5);
    } else if (sizeof(d) == 8) {
        b[0] = 0xcb;    /* double IEEE 754 */
        memcpy(b+1,&d,8);
        memrevifle(b+1,8);
        mp_buf_append(L,buf,b,9);
    }
}

// Assembly:
subq $0x18, %rsp
cvtsd2ss %xmm0, %xmm1
cvtss2sd %xmm1, %xmm2
ucomisd %xmm0, %xmm2
leaq 0x10(%rsp), %rax
jne 0x9ca52
jp 0x9ca52
movb $-0x36, 0xf(%rsp)
movss %xmm1, 0x10(%rsp)
movl $0x4, %ecx
movb (%rax), %dl
movb 0xf(%rsp,%rcx), %r8b
movb %r8b, (%rax)
movb %dl, 0xf(%rsp,%rcx)
incq %rax
decq %rcx
cmpq $0x2, %rcx
jne 0x9ca31
movl $0x5, %ecx
jmp 0x9ca81
movb $-0x35, 0xf(%rsp)
movsd %xmm0, 0x10(%rsp)
movl $0x8, %ecx
movb (%rax), %dl
movb 0xf(%rsp,%rcx), %r8b
movb %r8b, (%rax)
movb %dl, 0xf(%rsp,%rcx)
incq %rax
decq %rcx
cmpq $0x4, %rcx
jne 0x9ca62
movl $0x9, %ecx
leaq 0xf(%rsp), %rdx
callq 0x9c85c
addq $0x18, %rsp
retq
// File: /workspace/github_c_makefile_star2_O1/zhou-yuxin[P]redis-aof-no-cow/deps/lua/src/lua_cmsgpack.c
// Function: mp_encode_array
void mp_encode_array(lua_State *L, mp_buf *buf, int64_t n) {
    unsigned char b[5];
    int enclen;

    if (n <= 15) {
        b[0] = 0x90 | (n & 0xf);    /* fix array */
        enclen = 1;
    } else if (n <= 65535) {
        b[0] = 0xdc;                /* array 16 */
        b[1] = (n & 0xff00) >> 8;
        b[2] = n & 0xff;
        enclen = 3;
    } else {
        b[0] = 0xdd;                /* array 32 */
        b[1] = (n & 0xff000000) >> 24;
        b[2] = (n & 0xff0000) >> 16;
        b[3] = (n & 0xff00) >> 8;
        b[4] = n & 0xff;
        enclen = 5;
    }
    mp_buf_append(L,buf,b,enclen);
}

// Assembly:
pushq %rax
cmpq $0xf, %rdx
jg 0x9cbcf
andb $0xf, %dl
orb $-0x70, %dl
movb %dl, 0x3(%rsp)
movl $0x1, %ecx
jmp 0x9cc10
cmpq $0xffff, %rdx           # imm = 0xFFFF
jg 0x9cbec
movb $-0x24, 0x3(%rsp)
movb %dh, 0x4(%rsp)
movb %dl, 0x5(%rsp)
movl $0x3, %ecx
jmp 0x9cc10
movb $-0x23, 0x3(%rsp)
movl %edx, %eax
shrl $0x18, %eax
movb %al, 0x4(%rsp)
movl %edx, %eax
shrl $0x10, %eax
movb %al, 0x5(%rsp)
movb %dh, 0x6(%rsp)
movb %dl, 0x7(%rsp)
movl $0x5, %ecx
leaq 0x3(%rsp), %rdx
callq 0x9c85c
popq %rax
retq
// File: /workspace/github_c_makefile_star2_O1/zhou-yuxin[P]redis-aof-no-cow/deps/lua/src/lua_cmsgpack.c
// Function: mp_encode_map
void mp_encode_map(lua_State *L, mp_buf *buf, int64_t n) {
    unsigned char b[5];
    int enclen;

    if (n <= 15) {
        b[0] = 0x80 | (n & 0xf);    /* fix map */
        enclen = 1;
    } else if (n <= 65535) {
        b[0] = 0xde;                /* map 16 */
        b[1] = (n & 0xff00) >> 8;
        b[2] = n & 0xff;
        enclen = 3;
    } else {
        b[0] = 0xdf;                /* map 32 */
        b[1] = (n & 0xff000000) >> 24;
        b[2] = (n & 0xff0000) >> 16;
        b[3] = (n & 0xff00) >> 8;
        b[4] = n & 0xff;
        enclen = 5;
    }
    mp_buf_append(L,buf,b,enclen);
}

// Assembly:
pushq %rax
cmpq $0xf, %rdx
jg 0x9cc34
andb $0xf, %dl
orb $-0x80, %dl
movb %dl, 0x3(%rsp)
movl $0x1, %ecx
jmp 0x9cc75
cmpq $0xffff, %rdx           # imm = 0xFFFF
jg 0x9cc51
movb $-0x22, 0x3(%rsp)
movb %dh, 0x4(%rsp)
movb %dl, 0x5(%rsp)
movl $0x3, %ecx
jmp 0x9cc75
movb $-0x21, 0x3(%rsp)
movl %edx, %eax
shrl $0x18, %eax
movb %al, 0x4(%rsp)
movl %edx, %eax
shrl $0x10, %eax
movb %al, 0x5(%rsp)
movb %dh, 0x6(%rsp)
movb %dl, 0x7(%rsp)
movl $0x5, %ecx
leaq 0x3(%rsp), %rdx
callq 0x9c85c
popq %rax
retq
// File: /workspace/github_c_makefile_star2_O1/zhou-yuxin[P]redis-aof-no-cow/deps/lua/src/lua_cmsgpack.c
// Function: mp_encode_lua_number
void mp_encode_lua_number(lua_State *L, mp_buf *buf) {
    lua_Number n = lua_tonumber(L,-1);

    if (IS_INT64_EQUIVALENT(n)) {
        mp_encode_lua_integer(L, buf);
    } else {
        mp_encode_double(L,buf,(double)n);
    }
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
callq 0x89d7e
movq %xmm0, %rax
btrq $0x3f, %rax
movabsq $0x7ff0000000000000, %rcx # imm = 0x7FF0000000000000
cmpq %rcx, %rax
je 0x9cd81
cvttsd2si %xmm0, %rax
cvtsi2sd %rax, %xmm1
ucomisd %xmm1, %xmm0
jne 0x9cd81
jp 0x9cd81
movq %r14, %rdi
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
callq 0x89dad
movq %r14, %rdi
movq %rbx, %rsi
movq %rax, %rdx
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x9ca90
movq %r14, %rdi
movq %rbx, %rsi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x9ca08
// File: /workspace/github_c_makefile_star2_O1/zhou-yuxin[P]redis-aof-no-cow/deps/lua/src/lua_cmsgpack.c
// Function: mp_encode_lua_table_as_array
void mp_encode_lua_table_as_array(lua_State *L, mp_buf *buf, int level) {
#if LUA_VERSION_NUM < 502
    size_t len = lua_objlen(L,-1), j;
#else
    size_t len = lua_rawlen(L,-1), j;
#endif

    mp_encode_array(L,buf,len);
    for (j = 1; j <= len; j++) {
        lua_pushnumber(L,j);
        lua_gettable(L,-2);
        mp_encode_lua_type(L,buf,level+1);
    }
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movl %edx, %ebx
movq %rsi, %r14
movq %rdi, %r15
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
callq 0x89e73
movq %rax, %r12
movq %r15, %rdi
movq %r14, %rsi
movq %rax, %rdx
callq 0x9cbb7
testq %r12, %r12
je 0x9ce17
incl %ebx
movl $0x1, %r13d
movq %r13, %xmm1
punpckldq 0x28b07(%rip), %xmm1 # xmm1 = xmm1[0],mem[0],xmm1[1],mem[1]
subpd 0x28b0f(%rip), %xmm1    # 0xc58f0
movapd %xmm1, %xmm0
unpckhpd %xmm1, %xmm0            # xmm0 = xmm0[1],xmm1[1]
addsd %xmm1, %xmm0
movq %r15, %rdi
callq 0x89fa5
movq %r15, %rdi
movl $0xfffffffe, %esi       # imm = 0xFFFFFFFE
callq 0x8a242
movq %r15, %rdi
movq %r14, %rsi
movl %ebx, %edx
callq 0x9ce21
incq %r13
cmpq %r12, %r13
jbe 0x9cdcc
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/zhou-yuxin[P]redis-aof-no-cow/deps/lua/src/lua_cmsgpack.c
// Function: mp_encode_lua_type
void mp_encode_lua_type(lua_State *L, mp_buf *buf, int level) {
    int t = lua_type(L,-1);

    /* Limit the encoding of nested tables to a specified maximum depth, so that
     * we survive when called against circular references in tables. */
    if (t == LUA_TTABLE && level == LUACMSGPACK_MAX_NESTING) t = LUA_TNIL;
    switch(t) {
    case LUA_TSTRING: mp_encode_lua_string(L,buf); break;
    case LUA_TBOOLEAN: mp_encode_lua_bool(L,buf); break;
    case LUA_TNUMBER:
    #if LUA_VERSION_NUM < 503
        mp_encode_lua_number(L,buf); break;
    #else
        if (lua_isinteger(L, -1)) {
            mp_encode_lua_integer(L, buf);
        } else {
            mp_encode_lua_number(L, buf);
        }
        break;
    #endif
    case LUA_TTABLE: mp_encode_lua_table(L,buf,level); break;
    default: mp_encode_lua_null(L,buf); break;
    }
    lua_pop(L,1);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x18, %rsp
movl %edx, %ebp
movq %rsi, %r14
movq %rdi, %rbx
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
callq 0x89bc4
movl %eax, %edx
xorl $0x5, %edx
movl %ebp, %esi
xorl $0x10, %esi
xorl %ecx, %ecx
orl %edx, %esi
cmovnel %eax, %ecx
decl %ecx
cmpl $0x4, %ecx
ja 0x9cec6
leaq 0x37e70(%rip), %rax     # 0xd4ccc
movslq (%rax,%rcx,4), %rcx
addq %rax, %rcx
jmpq *%rcx
movq %rbx, %rdi
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
callq 0x89ddc
testl %eax, %eax
sete %al
xorb $-0x3d, %al
leaq 0xe(%rsp), %rdx
movb %al, (%rdx)
jmp 0x9cece
leaq 0x10(%rsp), %r15
movq %rbx, %rdi
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
movq %r15, %rdx
callq 0x89e02
movq (%r15), %rcx
movq %rbx, %rdi
movq %r14, %rsi
movq %rax, %rdx
callq 0x9c959
jmp 0x9cede
movq %rbx, %rdi
movq %r14, %rsi
callq 0x9cd20
jmp 0x9cede
movq %rbx, %rdi
movq %r14, %rsi
movl %ebp, %edx
callq 0x9d0ea
jmp 0x9cede
leaq 0xf(%rsp), %rdx
movb $-0x40, (%rdx)
movl $0x1, %ecx
movq %rbx, %rdi
movq %r14, %rsi
callq 0x9c85c
movq %rbx, %rdi
movl $0xfffffffe, %esi       # imm = 0xFFFFFFFE
callq 0x89976
addq $0x18, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/zhou-yuxin[P]redis-aof-no-cow/deps/lua/src/lua_cmsgpack.c
// Function: mp_encode_lua_table_as_map
void mp_encode_lua_table_as_map(lua_State *L, mp_buf *buf, int level) {
    size_t len = 0;

    /* First step: count keys into table. No other way to do it with the
     * Lua API, we need to iterate a first time. Note that an alternative
     * would be to do a single run, and then hack the buffer to insert the
     * map opcodes for message pack. Too hackish for this lib. */
    lua_pushnil(L);
    while(lua_next(L,-2)) {
        lua_pop(L,1); /* remove value, keep key for next iteration. */
        len++;
    }

    /* Step two: actually encoding of the map. */
    mp_encode_map(L,buf,len);
    lua_pushnil(L);
    while(lua_next(L,-2)) {
        /* Stack: ... key value */
        lua_pushvalue(L,-2); /* Stack: ... key value key */
        mp_encode_lua_type(L,buf,level+1); /* encode key */
        mp_encode_lua_type(L,buf,level+1); /* encode val */
    }
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movl %edx, %ebx
movq %rsi, %r14
movq %rdi, %r15
callq 0x89f91
movq %r15, %rdi
movl $0xfffffffe, %esi       # imm = 0xFFFFFFFE
callq 0x8a92c
xorl %r12d, %r12d
movq %r15, %rdi
testl %eax, %eax
je 0x9cf3e
movl $0xfffffffe, %esi       # imm = 0xFFFFFFFE
callq 0x89976
incq %r12
movq %r15, %rdi
movl $0xfffffffe, %esi       # imm = 0xFFFFFFFE
callq 0x8a92c
jmp 0x9cf1b
movq %r14, %rsi
movq %r12, %rdx
callq 0x9cc1c
movq %r15, %rdi
callq 0x89f91
movq %r15, %rdi
movl $0xfffffffe, %esi       # imm = 0xFFFFFFFE
callq 0x8a92c
testl %eax, %eax
je 0x9cf9c
incl %ebx
movq %r15, %rdi
movl $0xfffffffe, %esi       # imm = 0xFFFFFFFE
callq 0x89ba4
movq %r15, %rdi
movq %r14, %rsi
movl %ebx, %edx
callq 0x9ce21
movq %r15, %rdi
movq %r14, %rsi
movl %ebx, %edx
callq 0x9ce21
movq %r15, %rdi
movl $0xfffffffe, %esi       # imm = 0xFFFFFFFE
callq 0x8a92c
testl %eax, %eax
jne 0x9cf64
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/zhou-yuxin[P]redis-aof-no-cow/deps/lua/src/lua_cmsgpack.c
// Function: table_is_an_array
int table_is_an_array(lua_State *L) {
    int count = 0, max = 0;
#if LUA_VERSION_NUM < 503
    lua_Number n;
#else
    lua_Integer n;
#endif

    /* Stack top on function entry */
    int stacktop;

    stacktop = lua_gettop(L);

    lua_pushnil(L);
    while(lua_next(L,-2)) {
        /* Stack: ... key value */
        lua_pop(L,1); /* Stack: ... key */
        /* The <= 0 check is valid here because we're comparing indexes. */
#if LUA_VERSION_NUM < 503
        if ((LUA_TNUMBER != lua_type(L,-1)) || (n = lua_tonumber(L, -1)) <= 0 ||
            !IS_INT_EQUIVALENT(n))
#else
        if (!lua_isinteger(L,-1) || (n = lua_tointeger(L, -1)) <= 0)
#endif
        {
            lua_settop(L, stacktop);
            return 0;
        }
        max = (n > max ? n : max);
        count++;
    }
    /* We have the total number of elements in "count". Also we have
     * the max index encountered in "max". We can't reach this code
     * if there are indexes <= 0. If you also note that there can not be
     * repeated keys into a table, you have that if max==count you are sure
     * that there are all the keys form 1 to count (both included). */
    lua_settop(L, stacktop);
    return max == count;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
callq 0x89969
movl %eax, 0x4(%rsp)
movq %rbx, %rdi
callq 0x89f91
movq %rbx, %rdi
movl $0xfffffffe, %esi       # imm = 0xFFFFFFFE
callq 0x8a92c
testl %eax, %eax
je 0x9d0c1
xorl %r14d, %r14d
movabsq $-0x10000000000000, %r12 # imm = 0xFFF0000000000000
movabsq $0xfffffffffffff, %r13  # imm = 0xFFFFFFFFFFFFF
movabsq $0x7ff0000000000000, %rbp # imm = 0x7FF0000000000000
xorl %r15d, %r15d
movq %rbx, %rdi
movl $0xfffffffe, %esi       # imm = 0xFFFFFFFE
callq 0x89976
movq %rbx, %rdi
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
callq 0x89bc4
cmpl $0x3, %eax
jne 0x9d0b1
movq %rbx, %rdi
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
callq 0x89d7e
movq %xmm0, %rax
testq %rax, %rax
sets %cl
btrq $0x3f, %rax
leaq (%rax,%r12), %rdx
shrq $0x35, %rdx
cmpl $0x3ff, %edx            # imm = 0x3FF
setb %dl
andb %cl, %dl
leaq -0x1(%rax), %rsi
cmpq %r13, %rsi
setb %sil
andb %cl, %sil
testq %rax, %rax
sete %cl
cmpq %rbp, %rax
sete %al
orb %cl, %al
orb %sil, %al
orb %dl, %al
jne 0x9d0b1
cvttpd2dq %xmm0, %xmm1
cvtdq2pd %xmm1, %xmm1
ucomisd %xmm1, %xmm0
jne 0x9d0b1
jp 0x9d0b1
xorps %xmm1, %xmm1
cvtsi2sd %r15d, %xmm1
maxsd %xmm1, %xmm0
cvttsd2si %xmm0, %r15d
incl %r14d
movq %rbx, %rdi
movl $0xfffffffe, %esi       # imm = 0xFFFFFFFE
callq 0x8a92c
testl %eax, %eax
jne 0x9d000
jmp 0x9d0c7
movq %rbx, %rdi
movl 0x4(%rsp), %esi
callq 0x89976
xorl %eax, %eax
jmp 0x9d0db
xorl %r15d, %r15d
xorl %r14d, %r14d
movq %rbx, %rdi
movl 0x4(%rsp), %esi
callq 0x89976
xorl %eax, %eax
cmpl %r14d, %r15d
sete %al
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq