LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O2/gplessis[P]dotdeb-redis/deps/lua/src/lua_cjson.c
// Function: json_destroy_config
static int json_destroy_config(lua_State *l)
{
    json_config_t *cfg;

    cfg = lua_touserdata(l, 1);
    if (cfg)
        strbuf_free(&cfg->encode_buf);
    cfg = NULL;

    return 0;
}

// Assembly:
pushq %rax
pushq $0x1
popq %rsi
callq 0x789d1
testq %rax, %rax
je 0x89518
addq $0x500, %rax            # imm = 0x500
movq %rax, %rdi
callq 0x8d768
xorl %eax, %eax
popq %rcx
retq
// File: /workspace/github_c_makefile_star2_O2/gplessis[P]dotdeb-redis/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 0x7846b
pushq $0x1
popq %rbp
cmpl $0x1, %eax
je 0x89541
leaq 0x38d88(%rip), %rdx     # 0xc22be
pushq $0x1
popq %rsi
movq %rbx, %rdi
callq 0x82650
movq %rbx, %rdi
movl $0xffffd8ed, %esi       # imm = 0xFFFFD8ED
callq 0x78698
movq %rbx, %rdi
movl %ebp, %esi
callq 0x785a5
movq %rbx, %rdi
movl %ebp, %esi
movl %ebp, %edx
xorl %ecx, %ecx
callq 0x79168
testl %eax, %eax
je 0x89585
cmpl $0x2, %eax
jne 0x8958e
movq %rbx, %rdi
callq 0x78a55
pushq $-0x2
popq %rsi
movq %rbx, %rdi
callq 0x785a5
pushq $0x2
popq %rbp
movl %ebp, %eax
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
leaq 0x3914d(%rip), %rsi     # 0xc26e2
movq %rbx, %rdi
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %rbp
jmp 0x82707
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O2/gplessis[P]dotdeb-redis/deps/lua/src/lua_struct.c
// Function: b_size
static int b_size (lua_State *L) {
  Header h;
  const char *fmt = luaL_checkstring(L, 1);
  size_t pos = 0;
  defaultoptions(&h);
  while (*fmt) {
    int opt = *fmt++;
    size_t size = optsize(L, opt, &fmt);
    pos += gettoalign(pos, &h, opt, size);
    if (opt == 's')
      luaL_argerror(L, 1, "option 's' has no fixed size");
    else if (opt == 'c' && size == 0)
      luaL_argerror(L, 1, "option 'c0' has no fixed size");
    if (!isalnum(opt))
      controloptions(L, opt, &fmt, &h);
    pos += size;
  }
  lua_pushinteger(L, pos);
  return 1;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rdi, %rbx
xorl %r15d, %r15d
pushq $0x1
popq %rsi
xorl %edx, %edx
callq 0x8293c
leaq 0x10(%rsp), %rcx
movl $0x1, 0x4(%rcx)
movsbl (%rax), %r13d
testl %r13d, %r13d
je 0x89d65
incq %rax
movq %rax, 0x8(%rsp)
movq %rbx, %rdi
movl %r13d, %esi
leaq 0x8(%rsp), %rdx
callq 0x89d82
movq %rax, %r14
testq %rax, %rax
sete %al
cmpb $0x63, %r13b
sete %cl
orb %al, %cl
je 0x89ce0
xorl %ebp, %ebp
jmp 0x89cfb
movslq 0x14(%rsp), %rax
cmpq %r14, %rax
cmovaeq %r14, %rax
leal -0x1(%rax), %ecx
movl %r15d, %edx
andl %ecx, %edx
subl %edx, %eax
andl %ecx, %eax
movslq %eax, %rbp
movslq %r13d, %r12
leaq 0x38bad(%rip), %rdx     # 0xc28b2
cmpb $0x73, %r12b
je 0x89d23
cmpb $0x63, %r13b
setne %al
testq %r14, %r14
setne %cl
orb %al, %cl
leaq 0x38bae(%rip), %rdx     # 0xc28cf
jne 0x89d2e
movq %rbx, %rdi
pushq $0x1
popq %rsi
callq 0x82650
callq 0x26560
movq (%rax), %rax
testb $0x8, (%rax,%r12,2)
jne 0x89d52
movq %rbx, %rdi
movl %r13d, %esi
leaq 0x8(%rsp), %rdx
leaq 0x10(%rsp), %rcx
callq 0x89e46
addq %r15, %r14
addq %rbp, %r14
movq 0x8(%rsp), %rax
movq %r14, %r15
jmp 0x89ca3
movq %rbx, %rdi
movq %r15, %rsi
callq 0x78a7b
pushq $0x1
popq %rax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/gplessis[P]dotdeb-redis/deps/lua/src/lua_struct.c
// Function: optsize
static size_t optsize (lua_State *L, char opt, const char **fmt) {
  switch (opt) {
    case 'B': case 'b': return sizeof(char);
    case 'H': case 'h': return sizeof(short);
    case 'L': case 'l': return sizeof(long);
    case 'T': return sizeof(size_t);
    case 'f':  return sizeof(float);
    case 'd':  return sizeof(double);
    case 'x': return 1;
    case 'c': return getnum(L, fmt, 1);
    case 'i': case 'I': {
      int sz = getnum(L, fmt, sizeof(int));
      if (sz > MAXINTSIZE)
        luaL_error(L, "integral size %d is larger than limit of %d",
                       sz, MAXINTSIZE);
      return sz;
    }
    default: return 0;  /* other cases do not need alignment */
  }
}

// Assembly:
pushq %rbp
pushq %rbx
pushq %rax
movq %rdi, %rbx
pushq $0x1
popq %rax
leal -0x62(%rsi), %ecx
cmpl $0xa, %ecx
ja 0x89db7
leaq 0x38a0a(%rip), %rsi     # 0xc27a4
movslq (%rsi,%rcx,4), %rcx
addq %rsi, %rcx
jmpq *%rcx
pushq $0x1
popq %rax
movq %rbx, %rdi
movq %rdx, %rsi
movl %eax, %edx
callq 0x89f07
cltq
jmp 0x89e16
cmpl $0x42, %esi
je 0x89e16
cmpl $0x78, %esi
je 0x89e16
cmpl $0x49, %esi
je 0x89ddd
cmpl $0x4c, %esi
je 0x89dd9
cmpl $0x54, %esi
je 0x89dd9
cmpl $0x48, %esi
jne 0x89e0f
pushq $0x2
jmp 0x89e15
pushq $0x8
jmp 0x89e15
pushq $0x4
popq %rax
movq %rbx, %rdi
movq %rdx, %rsi
movl %eax, %edx
callq 0x89f07
movl %eax, %ebp
cmpl $0x21, %eax
jl 0x89e0a
leaq 0x389d5(%rip), %rsi     # 0xc27d0
pushq $0x20
popq %rcx
movq %rbx, %rdi
movl %ebp, %edx
xorl %eax, %eax
callq 0x82707
movslq %ebp, %rax
jmp 0x89e16
xorl %eax, %eax
jmp 0x89e16
pushq $0x4
popq %rax
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/gplessis[P]dotdeb-redis/deps/lua/src/lua_struct.c
// Function: correctbytes
static void correctbytes (char *b, int size, int endian) {
  if (endian != native.endian) {
    int i = 0;
    while (i < --size) {
      char temp = b[i];
      b[i++] = b[size];
      b[size] = temp;
    }
  }
}

// Assembly:
cmpl $0x1, %edx
jne 0x89e23
retq
movslq %esi, %rax
decq %rax
xorl %ecx, %ecx
cmpq %rax, %rcx
jge 0x89e22
movb (%rdi,%rcx), %dl
movb (%rdi,%rax), %sil
movb %sil, (%rdi,%rcx)
incq %rcx
movb %dl, (%rdi,%rax)
decq %rax
jmp 0x89e2b
// File: /workspace/github_c_makefile_star2_O2/gplessis[P]dotdeb-redis/deps/lua/src/lua_struct.c
// Function: controloptions
static void controloptions (lua_State *L, int opt, const char **fmt,
                            Header *h) {
  switch (opt) {
    case  ' ': return;  /* ignore white spaces */
    case '>': h->endian = BIG; return;
    case '<': h->endian = LITTLE; return;
    case '!': {
      int a = getnum(L, fmt, MAXALIGN);
      if (!isp2(a))
        luaL_error(L, "alignment %d is not a power of 2", a);
      h->align = a;
      return;
    }
    default: {
      const char *msg = lua_pushfstring(L, "invalid format option '%c'", opt);
      luaL_argerror(L, 1, msg);
    }
  }
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
cmpl $0x20, %esi
je 0x89edd
movq %rcx, %r14
movl %esi, %eax
movq %rdi, %rbx
cmpl $0x21, %esi
je 0x89e70
cmpl $0x3c, %eax
je 0x89ed6
cmpl $0x3e, %eax
jne 0x89ee2
andl $0x0, (%r14)
jmp 0x89edd
pushq $0x8
popq %rax
movq %rbx, %rdi
movq %rdx, %rsi
movl %eax, %edx
callq 0x89f07
movl %eax, %ebp
testl %eax, %eax
jle 0x89ebd
movl %ebp, %eax
shrl %eax
andl $0x55555555, %eax       # imm = 0x55555555
movl %ebp, %ecx
subl %eax, %ecx
movl $0x33333333, %eax       # imm = 0x33333333
movl %ecx, %edx
andl %eax, %edx
shrl $0x2, %ecx
andl %eax, %ecx
addl %edx, %ecx
movl %ecx, %eax
shrl $0x4, %eax
addl %ecx, %eax
andl $0xf0f0f0f, %eax        # imm = 0xF0F0F0F
imull $0x1010101, %eax, %eax  # imm = 0x1010101
shrl $0x18, %eax
cmpl $0x2, %eax
jb 0x89ed0
leaq 0x3894f(%rip), %rsi     # 0xc2813
movq %rbx, %rdi
movl %ebp, %edx
xorl %eax, %eax
callq 0x82707
movl %ebp, 0x4(%r14)
jmp 0x89edd
movl $0x1, (%r14)
popq %rbx
popq %r14
popq %rbp
retq
leaq 0x3894b(%rip), %rsi     # 0xc2834
movq %rbx, %rdi
movl %eax, %edx
xorl %eax, %eax
callq 0x78b67
pushq $0x1
popq %rsi
movq %rbx, %rdi
movq %rax, %rdx
popq %rbx
popq %r14
popq %rbp
jmp 0x82650
// File: /workspace/github_c_makefile_star2_O2/gplessis[P]dotdeb-redis/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 %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %edx, %ebp
movq %rsi, %rbx
movq %rdi, %r14
callq 0x26560
movq %rax, %r15
movq (%rax), %rdx
movq (%rbx), %rax
movsbq (%rax), %rcx
testb $0x8, 0x1(%rdx,%rcx,2)
je 0x89f8a
leaq 0x388c2(%rip), %r12     # 0xc27fc
xorl %ebp, %ebp
imull $0xa, %ebp, %r13d
cmpl $0xccccccc, %ebp        # imm = 0xCCCCCCC
jg 0x89f57
movsbl %cl, %ecx
movl $0x8000002f, %edx       # imm = 0x8000002F
subl %ecx, %edx
cmpl %edx, %r13d
jle 0x89f67
movq %r14, %rdi
movq %r12, %rsi
xorl %eax, %eax
callq 0x82707
movq (%rbx), %rax
leaq 0x1(%rax), %rdx
movq %rdx, (%rbx)
movsbl (%rax), %ecx
leal (%rcx,%r13), %ebp
addl $-0x30, %ebp
movq (%r15), %rsi
movsbq 0x1(%rax), %rcx
testb $0x8, 0x1(%rsi,%rcx,2)
movq %rdx, %rax
jne 0x89f3c
movl %ebp, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O2/gplessis[P]dotdeb-redis/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 %rax
pushq $0x18
popq %rcx
xorl %esi, %esi
xorl %edx, %edx
callq 0x89fc2
xorps %xmm0, %xmm0
movups %xmm0, (%rax)
andq $0x0, 0x10(%rax)
popq %rcx
retq
// File: /workspace/github_c_makefile_star2_O2/gplessis[P]dotdeb-redis/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 %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rcx, %rbx
movq %rdx, %r15
movq %rsi, %r14
movq %rdi, %rcx
movq 0x10(%rsi), %rdx
movq (%rsi), %rax
movq 0x8(%rsi), %rdi
cmpq %rbx, %rdx
jae 0x8a05d
leaq (%rdi,%rbx), %r12
addq %r12, %r12
addq %rdi, %rdx
movq %rcx, %rdi
movq %rax, %rsi
movq %r12, %rcx
callq 0x89fc2
movq %rax, (%r14)
movq 0x8(%r14), %rdi
subq %rdi, %r12
movq %r12, 0x10(%r14)
addq %rax, %rdi
movq %r15, %rsi
movq %rbx, %rdx
callq 0x26c50
addq %rbx, 0x8(%r14)
subq %rbx, 0x10(%r14)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/gplessis[P]dotdeb-redis/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 0x8a0e4
movl %ebx, %eax
orb $-0x60, %al
movb %al, 0x3(%rsp)
pushq $0x1
jmp 0x8a135
cmpq $0xff, %rbx
ja 0x8a0fa
movb $-0x27, 0x3(%rsp)
movb %bl, 0x4(%rsp)
pushq $0x2
jmp 0x8a135
cmpq $0xffff, %rbx           # imm = 0xFFFF
ja 0x8a114
movb $-0x26, 0x3(%rsp)
movb %bh, 0x4(%rsp)
movb %bl, 0x5(%rsp)
pushq $0x3
jmp 0x8a135
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)
pushq $0x5
popq %rcx
leaq 0x3(%rsp), %rdx
movq %r12, %rdi
movq %r15, %rsi
callq 0x8a013
movq %r12, %rdi
movq %r15, %rsi
movq %r14, %rdx
movq %rbx, %rcx
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
jmp 0x8a013
// File: /workspace/github_c_makefile_star2_O2/gplessis[P]dotdeb-redis/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:
pushq %r15
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq %rsi, %rbx
movq %rdi, %r14
cvtsd2ss %xmm0, %xmm1
cvtss2sd %xmm1, %xmm2
ucomisd %xmm0, %xmm2
leaq 0x8(%rsp), %rdi
jne 0x8a199
jp 0x8a199
movb $-0x36, 0x7(%rsp)
movss %xmm1, 0x8(%rsp)
pushq $0x5
popq %r15
pushq $0x4
jmp 0x8a1aa
movb $-0x35, 0x7(%rsp)
movsd %xmm0, 0x8(%rsp)
pushq $0x9
popq %r15
pushq $0x8
popq %rsi
callq 0x89f9c
leaq 0x7(%rsp), %rdx
movq %r14, %rdi
movq %rbx, %rsi
movq %r15, %rcx
callq 0x8a013
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/gplessis[P]dotdeb-redis/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 0x8a316
andb $0xf, %dl
orb $-0x70, %dl
movb %dl, 0x3(%rsp)
pushq $0x1
jmp 0x8a351
cmpq $0xffff, %rdx           # imm = 0xFFFF
ja 0x8a330
movb $-0x24, 0x3(%rsp)
movb %dh, 0x4(%rsp)
movb %dl, 0x5(%rsp)
pushq $0x3
jmp 0x8a351
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)
pushq $0x5
popq %rcx
leaq 0x3(%rsp), %rdx
callq 0x8a013
popq %rax
retq
// File: /workspace/github_c_makefile_star2_O2/gplessis[P]dotdeb-redis/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 0x8a373
andb $0xf, %dl
orb $-0x80, %dl
movb %dl, 0x3(%rsp)
pushq $0x1
jmp 0x8a3ae
cmpq $0xffff, %rdx           # imm = 0xFFFF
ja 0x8a38d
movb $-0x22, 0x3(%rsp)
movb %dh, 0x4(%rsp)
movb %dl, 0x5(%rsp)
pushq $0x3
jmp 0x8a3ae
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)
pushq $0x5
popq %rcx
leaq 0x3(%rsp), %rdx
callq 0x8a013
popq %rax
retq
// File: /workspace/github_c_makefile_star2_O2/gplessis[P]dotdeb-redis/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
pushq $-0x1
popq %rsi
callq 0x7885f
movq %xmm0, %rax
btrq $0x3f, %rax
movabsq $0x7ff0000000000000, %rcx # imm = 0x7FF0000000000000
cmpq %rcx, %rax
je 0x8a4a1
cvttsd2si %xmm0, %rax
cvtsi2sd %rax, %xmm1
ucomisd %xmm1, %xmm0
jne 0x8a4a1
jp 0x8a4a1
movq %r14, %rdi
movq %rbx, %rsi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x8a42b
movq %r14, %rdi
movq %rbx, %rsi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x8a162
// File: /workspace/github_c_makefile_star2_O2/gplessis[P]dotdeb-redis/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 %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %edx, %ebx
movq %rsi, %r14
movq %rdi, %r15
pushq $-0x1
popq %rsi
callq 0x7894f
movq %rax, %r12
movq %r15, %rdi
movq %r14, %rsi
movq %rax, %rdx
callq 0x8a301
incl %ebx
pushq $0x1
popq %r13
pushq $-0x2
popq %rbp
cmpq %r12, %r13
ja 0x8a532
movq %r13, %xmm1
punpckldq 0x29b26(%rip), %xmm1 # xmm1 = xmm1[0],mem[0],xmm1[1],mem[1]
subpd 0x29b2e(%rip), %xmm1    # 0xb4030
movapd %xmm1, %xmm0
unpckhpd %xmm1, %xmm0            # xmm0 = xmm0[1],xmm1[1]
addsd %xmm1, %xmm0
movq %r15, %rdi
callq 0x78a66
movq %r15, %rdi
movl %ebp, %esi
callq 0x78d02
movq %r15, %rdi
movq %r14, %rsi
movl %ebx, %edx
callq 0x8a541
incq %r13
jmp 0x8a4e8
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/gplessis[P]dotdeb-redis/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 %r14
pushq %rbx
movl %edx, %ebp
movq %rsi, %r14
movq %rdi, %rbx
pushq $-0x1
popq %rsi
callq 0x786b8
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 0x8a5b3
leaq 0x3837c(%rip), %rax     # 0xc28f0
movslq (%rax,%rcx,4), %rcx
addq %rax, %rcx
jmpq *%rcx
movq %rbx, %rdi
movq %r14, %rsi
callq 0x8a3f5
jmp 0x8a5be
movq %rbx, %rdi
movq %r14, %rsi
callq 0x8a3bb
jmp 0x8a5be
movq %rbx, %rdi
movq %r14, %rsi
callq 0x8a452
jmp 0x8a5be
movq %rbx, %rdi
movq %r14, %rsi
movl %ebp, %edx
callq 0x8a780
jmp 0x8a5be
movq %rbx, %rdi
movq %r14, %rsi
callq 0x8a7b2
pushq $-0x2
popq %rsi
movq %rbx, %rdi
popq %rbx
popq %r14
popq %rbp
jmp 0x78478
// File: /workspace/github_c_makefile_star2_O2/gplessis[P]dotdeb-redis/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 %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movl %edx, %ebx
movq %rsi, %r14
movq %rdi, %r15
callq 0x78a55
xorl %r12d, %r12d
pushq $-0x2
popq %rbp
movq %r15, %rdi
movl %ebp, %esi
callq 0x793f1
movq %r15, %rdi
testl %eax, %eax
je 0x8a605
movl %ebp, %esi
callq 0x78478
incq %r12
jmp 0x8a5e8
movq %r14, %rsi
movq %r12, %rdx
callq 0x8a35e
movq %r15, %rdi
callq 0x78a55
incl %ebx
pushq $-0x2
popq %rbp
movq %r15, %rdi
movl %ebp, %esi
callq 0x793f1
testl %eax, %eax
je 0x8a651
movq %r15, %rdi
movl %ebp, %esi
callq 0x78698
movq %r15, %rdi
movq %r14, %rsi
movl %ebx, %edx
callq 0x8a541
movq %r15, %rdi
movq %r14, %rsi
movl %ebx, %edx
callq 0x8a541
jmp 0x8a61d
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/gplessis[P]dotdeb-redis/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 0x7846b
movl %eax, 0x4(%rsp)
movq %rbx, %rdi
callq 0x78a55
xorl %r12d, %r12d
pushq $-0x2
popq %r14
pushq $-0x1
popq %r15
movabsq $0x7ff0000000000000, %rbp # imm = 0x7FF0000000000000
xorl %r13d, %r13d
movq %rbx, %rdi
movl %r14d, %esi
callq 0x793f1
testl %eax, %eax
je 0x8a75d
movq %rbx, %rdi
movl %r14d, %esi
callq 0x78478
movq %rbx, %rdi
movl %r15d, %esi
callq 0x786b8
cmpl $0x3, %eax
jne 0x8a74d
movq %rbx, %rdi
movl %r15d, %esi
callq 0x7885f
movq %xmm0, %rax
testq %rax, %rax
sets %cl
btrq $0x3f, %rax
movabsq $-0x10000000000000, %rdx # imm = 0xFFF0000000000000
addq %rax, %rdx
shrq $0x35, %rdx
cmpl $0x3ff, %edx            # imm = 0x3FF
setb %dl
andb %cl, %dl
leaq -0x1(%rax), %rsi
movabsq $0xfffffffffffff, %rdi  # imm = 0xFFFFFFFFFFFFF
cmpq %rdi, %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 0x8a74d
cvttpd2dq %xmm0, %xmm1
cvtdq2pd %xmm1, %xmm1
ucomisd %xmm1, %xmm0
jne 0x8a74d
jp 0x8a74d
cvtsi2sd %r12d, %xmm1
maxsd %xmm1, %xmm0
cvttsd2si %xmm0, %r12d
incl %r13d
jmp 0x8a691
movq %rbx, %rdi
movl 0x4(%rsp), %esi
callq 0x78478
xorl %eax, %eax
jmp 0x8a771
movq %rbx, %rdi
movl 0x4(%rsp), %esi
callq 0x78478
xorl %eax, %eax
cmpl %r12d, %r13d
sete %al
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/gplessis[P]dotdeb-redis/deps/lua/src/lua_cmsgpack.c
// Function: mp_encode_lua_table
void mp_encode_lua_table(lua_State *L, mp_buf *buf, int level) {
    if (table_is_an_array(L))
        mp_encode_lua_table_as_array(L,buf,level);
    else
        mp_encode_lua_table_as_map(L,buf,level);
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movl %edx, %ebx
movq %rsi, %r14
movq %rdi, %r15
callq 0x8a65a
movq %r15, %rdi
movq %r14, %rsi
movl %ebx, %edx
testl %eax, %eax
je 0x8a7a8
popq %rbx
popq %r14
popq %r15
jmp 0x8a4b3
popq %rbx
popq %r14
popq %r15
jmp 0x8a5cd
// File: /workspace/github_c_makefile_star2_O2/gplessis[P]dotdeb-redis/deps/lua/src/lua_cmsgpack.c
// Function: mp_pack
int mp_pack(lua_State *L) {
    int nargs = lua_gettop(L);
    int i;
    mp_buf *buf;

    if (nargs == 0)
        return luaL_argerror(L, 0, "MessagePack pack needs input.");

    buf = mp_buf_new(L);
    for(i = 1; i <= nargs; i++) {
        /* Copy argument i to top of stack for _encode processing;
         * the encode function pops it from the stack when complete. */
        lua_pushvalue(L, i);

        mp_encode_lua_type(L,buf,0);

        lua_pushlstring(L,(char*)buf->b,buf->len);

        /* Reuse the buffer for the next operation by
         * setting its free count to the total buffer size
         * and the current position to zero. */
        buf->free += buf->len;
        buf->len = 0;
    }
    mp_buf_free(L, buf);

    /* Concatenate all nargs buffers together */
    lua_concat(L, nargs);
    return 1;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rdi, %rbx
callq 0x7846b
testl %eax, %eax
je 0x8a858
movl %eax, %ebp
movq %rbx, %rdi
callq 0x89ff9
movq %rax, %r14
xorl %eax, %eax
testl %ebp, %ebp
movl %ebp, %r12d
cmovlel %eax, %r12d
negl %r12d
pushq $0x1
popq %r15
leal (%r12,%r15), %eax
movq %rbx, %rdi
cmpl $0x1, %eax
je 0x8a83a
movl %r15d, %esi
callq 0x78698
movq %rbx, %rdi
movq %r14, %rsi
xorl %edx, %edx
callq 0x8a541
movq (%r14), %rsi
movq 0x8(%r14), %rdx
movq %rbx, %rdi
callq 0x78a95
movq 0x8(%r14), %rax
addq %rax, 0x10(%r14)
andq $0x0, 0x8(%r14)
incl %r15d
jmp 0x8a7f8
movq %r14, %rsi
callq 0x8a07f
movq %rbx, %rdi
movl %ebp, %esi
callq 0x79428
pushq $0x1
popq %rax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
leaq 0x38125(%rip), %rdx     # 0xc2984
movq %rbx, %rdi
xorl %esi, %esi
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0x82650
// File: /workspace/github_c_makefile_star2_O2/gplessis[P]dotdeb-redis/deps/lua/src/lua_cmsgpack.c
// Function: mp_decode_to_lua_array
void mp_decode_to_lua_array(lua_State *L, mp_cur *c, size_t len) {
    assert(len <= UINT_MAX);
    int index = 1;

    lua_newtable(L);
    while(len--) {
        lua_pushnumber(L,index++);
        mp_decode_to_lua_type(L,c);
        if (c->err) return;
        lua_settable(L,-3);
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rdx, %rax
shrq $0x20, %rax
jne 0x8a8d6
movq %rdx, %rbx
movq %rsi, %r14
movq %rdi, %r15
xorl %r12d, %r12d
xorl %esi, %esi
xorl %edx, %edx
callq 0x78ddb
pushq $-0x3
popq %rbp
cmpq %r12, %rbx
je 0x8a8cd
incq %r12
cvtsi2sd %r12d, %xmm0
movq %r15, %rdi
callq 0x78a66
movq %r15, %rdi
movq %r14, %rsi
callq 0x8a8f5
cmpl $0x0, 0x10(%r14)
jne 0x8a8cd
movq %r15, %rdi
movl %ebp, %esi
callq 0x78ed3
jmp 0x8a89a
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
leaq 0x380c5(%rip), %rdi     # 0xc29a2
leaq 0x380ce(%rip), %rsi     # 0xc29b2
leaq 0x380d6(%rip), %rcx     # 0xc29c1
movl $0x222, %edx            # imm = 0x222
callq 0x262d0
// File: /workspace/github_c_makefile_star2_O2/gplessis[P]dotdeb-redis/deps/lua/src/lua_cmsgpack.c
// Function: mp_decode_to_lua_hash
void mp_decode_to_lua_hash(lua_State *L, mp_cur *c, size_t len) {
    assert(len <= UINT_MAX);
    lua_newtable(L);
    while(len--) {
        mp_decode_to_lua_type(L,c); /* key */
        if (c->err) return;
        mp_decode_to_lua_type(L,c); /* value */
        if (c->err) return;
        lua_settable(L,-3);
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdx, %rax
shrq $0x20, %rax
jne 0x8ad37
movq %rdx, %rbx
movq %rsi, %r14
movq %rdi, %r15
xorl %esi, %esi
xorl %edx, %edx
callq 0x78ddb
pushq $-0x3
popq %rbp
subq $0x1, %rbx
jb 0x8ad2c
movq %r15, %rdi
movq %r14, %rsi
callq 0x8a8f5
cmpl $0x0, 0x10(%r14)
jne 0x8ad2c
movq %r15, %rdi
movq %r14, %rsi
callq 0x8a8f5
cmpl $0x0, 0x10(%r14)
jne 0x8ad2c
movq %r15, %rdi
movl %ebp, %esi
callq 0x78ed3
jmp 0x8acf6
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
leaq 0x37c64(%rip), %rdi     # 0xc29a2
leaq 0x37c6d(%rip), %rsi     # 0xc29b2
leaq 0x37cb0(%rip), %rcx     # 0xc29fc
movl $0x22f, %edx            # imm = 0x22F
callq 0x262d0
// File: /workspace/github_c_makefile_star2_O2/gplessis[P]dotdeb-redis/deps/lua/src/lua_cmsgpack.c
// Function: luaopen_cmsgpack_safe
LUALIB_API int luaopen_cmsgpack_safe(lua_State *L) {
    int i;

    luaopen_cmsgpack(L);

    /* Wrap all functions in the safe handler */
    for (i = 0; i < (sizeof(cmds)/sizeof(*cmds) - 1); i++) {
        lua_getfield(L, -1, cmds[i].name);
        lua_pushcclosure(L, mp_safe, 1);
        lua_setfield(L, -2, cmds[i].name);
    }

#if LUA_VERSION_NUM < 502
    /* Register name globally for 5.1 */
    lua_pushvalue(L, -1);
    lua_setglobal(L, LUACMSGPACK_SAFE_NAME);
#endif

    return 1;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
callq 0x8b02f
xorl %ebp, %ebp
leaq -0x190(%rip), %r14      # 0x8aee8
pushq $0x1
popq %r15
pushq $-0x2
popq %r12
cmpq $0x40, %rbp
je 0x8b0c2
leaq 0x680e3(%rip), %rax     # 0xf3170
movq (%rbp,%rax), %r13
movq %rbx, %rdi
pushq $-0x1
popq %rsi
movq %r13, %rdx
callq 0x78d22
movq %rbx, %rdi
movq %r14, %rsi
movl %r15d, %edx
callq 0x78c17
movq %rbx, %rdi
movl %r12d, %esi
movq %r13, %rdx
callq 0x78efa
addq $0x10, %rbp
jmp 0x8b080
pushq $-0x1
popq %rsi
movq %rbx, %rdi
callq 0x78698
leaq 0x37ad8(%rip), %rdx     # 0xc2bac
movq %rbx, %rdi
movl $0xffffd8ee, %esi       # imm = 0xFFFFD8EE
callq 0x78efa
pushq $0x1
popq %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O2/gplessis[P]dotdeb-redis/deps/lua/src/lua_bit.c
// Function: luaopen_bit
LUALIB_API int luaopen_bit(lua_State *L)
{
  UBits b;
  lua_pushnumber(L, (lua_Number)1437217655L);
  b = barg(L, -1);
  if (b != (UBits)1437217655L || BAD_SAR) {  /* Perform a simple self-test. */
    const char *msg = "compiled with incompatible luaconf.h";
#ifdef LUA_NUMBER_DOUBLE
#ifdef _WIN32
    if (b == (UBits)1610612736L)
      msg = "use D3DCREATE_FPU_PRESERVE with DirectX";
#endif
    if (b == (UBits)1127743488L)
      msg = "not compiled with SWAPPED_DOUBLE";
#endif
    if (BAD_SAR)
      msg = "arithmetic right-shift broken";
    luaL_error(L, "bit library self-test failed (%s)", msg);
  }
#if LUA_VERSION_NUM < 502
  luaL_register(L, "bit", bit_funcs);
#else
  luaL_newlib(L, bit_funcs);
#endif
  return 1;
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
movsd 0x37ac0(%rip), %xmm0    # 0xc2bc0
callq 0x78a66
pushq $-0x1
popq %rsi
movq %rbx, %rdi
callq 0x8b15a
cmpl $0x55aa3377, %eax       # imm = 0x55AA3377
je 0x8b13f
cmpl $0x43380000, %eax       # imm = 0x43380000
leaq 0x37ad2(%rip), %rax     # 0xc2bf5
leaq 0x37aa6(%rip), %rdx     # 0xc2bd0
cmoveq %rax, %rdx
leaq 0x37ae1(%rip), %rsi     # 0xc2c16
movq %rbx, %rdi
xorl %eax, %eax
callq 0x82707
leaq 0x37af4(%rip), %rsi     # 0xc2c3a
leaq 0x68073(%rip), %rdx     # 0xf31c0
movq %rbx, %rdi
callq 0x82ca7
pushq $0x1
popq %rax
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O2/gplessis[P]dotdeb-redis/deps/lua/src/lua_bit.c
// Function: bit_tohex
static int bit_tohex(lua_State *L)
{
  UBits b = barg(L, 1);
  SBits n = lua_isnone(L, 2) ? 8 : (SBits)barg(L, 2);
  const char *hexdigits = "0123456789abcdef";
  char buf[8];
  int i;
  if (n < 0) { n = -n; hexdigits = "0123456789ABCDEF"; }
  if (n > 8) n = 8;
  for (i = (int)n; --i >= 0; ) { buf[i] = hexdigits[b & 15]; b >>= 4; }
  lua_pushlstring(L, buf, (size_t)n);
  return 1;
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq %rdi, %rbx
pushq $0x1
popq %rsi
callq 0x8b15a
movl %eax, %ebp
pushq $0x2
popq %rsi
movq %rbx, %rdi
callq 0x786b8
pushq $0x8
popq %r14
cmpl $-0x1, %eax
je 0x8b450
pushq $0x2
popq %rsi
movq %rbx, %rdi
callq 0x8b15a
testl %eax, %eax
leaq 0x3782d(%rip), %rdx     # 0xc2c70
leaq 0x26f99(%rip), %rcx     # 0xb23e3
cmovsq %rdx, %rcx
jmp 0x8b45a
leaq 0x26f8c(%rip), %rcx     # 0xb23e3
movl %r14d, %eax
movl %eax, %edx
negl %edx
cmovsl %eax, %edx
cmpl $0x8, %edx
cmovgel %r14d, %edx
testl %edx, %edx
jle 0x8b482
movl %ebp, %esi
andl $0xf, %esi
movb (%rcx,%rsi), %sil
movb %sil, 0x7(%rsp,%rdx)
decq %rdx
shrl $0x4, %ebp
jmp 0x8b468
movl %eax, %ecx
negl %ecx
cmovsl %eax, %ecx
cmpl $0x8, %ecx
cmovbl %ecx, %r14d
leaq 0x8(%rsp), %rsi
movq %rbx, %rdi
movq %r14, %rdx
callq 0x78a95
pushq $0x1
popq %rax
addq $0x10, %rsp
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/gplessis[P]dotdeb-redis/deps/lua/src/strbuf.c
// Function: die
static void die(const char *fmt, ...)
{
    va_list arg;

    va_start(arg, fmt);
    vfprintf(stderr, fmt, arg);
    va_end(arg);
    fprintf(stderr, "\n");

    exit(-1);
}

// Assembly:
pushq %rbx
subq $0xd0, %rsp
movq %rdi, %r10
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 0x8d6c7
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, %rdx
movq %rdi, 0x10(%rdx)
leaq 0xe0(%rsp), %rax
movq %rax, 0x8(%rdx)
movabsq $0x3000000008, %rax     # imm = 0x3000000008
movq %rax, (%rdx)
movq 0x678da(%rip), %rbx     # 0xf4fc8
movq (%rbx), %rdi
movq %r10, %rsi
callq 0x26460
movq (%rbx), %rsi
pushq $0xa
popq %rdi
callq 0x264a0
pushq $-0x1
popq %rdi
callq 0x262c0
// File: /workspace/github_c_makefile_star2_O2/gplessis[P]dotdeb-redis/deps/lua/src/strbuf.c
// Function: strbuf_new
strbuf_t *strbuf_new(int len)
{
    strbuf_t *s;

    s = malloc(sizeof(strbuf_t));
    if (!s)
        die("Out of memory");

    strbuf_init(s, len);

    /* Dynamic strbuf allocation / deallocation */
    s->dynamic = 1;

    return s;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movl %edi, %ebx
pushq $0x20
popq %rdi
callq 0x26360
testq %rax, %rax
je 0x8d73f
movq %rax, %r14
movq %rax, %rdi
movl %ebx, %esi
callq 0x8d624
movl $0x1, 0x14(%r14)
movq %r14, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
leaq 0x331bc(%rip), %rdi     # 0xc0902
xorl %eax, %eax
callq 0x8d668
// File: /workspace/github_c_makefile_star2_O2/gplessis[P]dotdeb-redis/deps/lua/src/strbuf.c
// Function: strbuf_free
void strbuf_free(strbuf_t *s)
{
    debug_stats(s);

    if (s->buf) {
        free(s->buf);
        s->buf = NULL;
    }
    if (s->dynamic)
        free(s);
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
callq 0x8d793
movq (%rbx), %rdi
testq %rdi, %rdi
je 0x8d782
callq 0x264d0
andq $0x0, (%rbx)
cmpl $0x0, 0x14(%rbx)
je 0x8d791
movq %rbx, %rdi
popq %rbx
jmp 0x264d0
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O2/gplessis[P]dotdeb-redis/deps/lua/src/strbuf.c
// Function: strbuf_free_to_string
char *strbuf_free_to_string(strbuf_t *s, int *len)
{
    char *buf;

    debug_stats(s);

    strbuf_ensure_null(s);

    buf = s->buf;
    if (len)
        *len = s->length;

    if (s->dynamic)
        free(s);

    return buf;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rsi, %r15
movq %rdi, %rbx
callq 0x8d793
movq (%rbx), %rax
movslq 0xc(%rbx), %rcx
movb $0x0, (%rax,%rcx)
movq (%rbx), %r14
testq %r15, %r15
je 0x8d7e9
movl 0xc(%rbx), %eax
movl %eax, (%r15)
cmpl $0x0, 0x14(%rbx)
je 0x8d7f7
movq %rbx, %rdi
callq 0x264d0
movq %r14, %rax
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/gplessis[P]dotdeb-redis/deps/lua/src/strbuf.c
// Function: strbuf_resize
void strbuf_resize(strbuf_t *s, int len)
{
    int newsize;

    newsize = calculate_new_size(s, len);

    if (s->debug > 1) {
        fprintf(stderr, "strbuf(%lx) resize: %d => %d\n",
                (long)s, s->size, newsize);
    }

    s->size = newsize;
    s->buf = realloc(s->buf, s->size);
    if (!s->buf)
        die("Out of memory");
    s->reallocs++;
}

// Assembly:
pushq %rbp
pushq %rbx
pushq %rax
testl %esi, %esi
jle 0x8d87a
movq %rdi, %rbx
leal 0x1(%rsi), %ebp
movl 0x8(%rdi), %ecx
cmpl %ebp, %ecx
jg 0x8d827
movl 0x10(%rbx), %edi
testl %edi, %edi
js 0x8d84d
leal (%rdi,%rcx), %ebp
decl %ebp
movl %ebp, %eax
cltd
idivl %edi
subl %edx, %ebp
cmpl $0x2, 0x1c(%rbx)
jge 0x8d85a
movl %ebp, 0x8(%rbx)
movq (%rbx), %rdi
movslq %ebp, %rsi
callq 0x26b30
movq %rax, (%rbx)
testq %rax, %rax
je 0x8d883
incl 0x18(%rbx)
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
movl %ecx, %ebp
cmpl %esi, %ebp
jg 0x8d827
imull %edi, %ebp
negl %ebp
jmp 0x8d84f
movq 0x67767(%rip), %rax     # 0xf4fc8
movq (%rax), %rdi
leaq 0x35743(%rip), %rsi     # 0xc2fae
movq %rbx, %rdx
movl %ebp, %r8d
xorl %eax, %eax
callq 0x26b90
jmp 0x8d82d
leaq 0x357c1(%rip), %rdi     # 0xc3042
jmp 0x8d88a
leaq 0x33078(%rip), %rdi     # 0xc0902
xorl %eax, %eax
callq 0x8d668
// File: /workspace/github_c_makefile_star2_O2/gplessis[P]dotdeb-redis/deps/lua/src/strbuf.c
// Function: strbuf_append_string
void strbuf_append_string(strbuf_t *s, const char *str)
{
    int space, i;

    space = strbuf_empty_length(s);

    for (i = 0; str[i]; i++) {
        if (space < 1) {
            strbuf_resize(s, s->length + 1);
            space = strbuf_empty_length(s);
        }

        s->buf[s->length] = str[i];
        s->length++;
        space--;
    }
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
movl 0xc(%rdi), %esi
movl %esi, %eax
notl %eax
addl 0x8(%rdi), %eax
movb (%rbx), %cl
testb %cl, %cl
je 0x8d8e1
testl %eax, %eax
jg 0x8d8c7
incl %esi
movq %r14, %rdi
callq 0x8d800
movl 0xc(%r14), %esi
movl %esi, %eax
notl %eax
addl 0x8(%r14), %eax
movb (%rbx), %cl
movq (%r14), %rdx
movslq %esi, %rsi
movb %cl, (%rdx,%rsi)
movl 0xc(%r14), %esi
incl %esi
movl %esi, 0xc(%r14)
decl %eax
incq %rbx
jmp 0x8d8a5
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O2/gplessis[P]dotdeb-redis/deps/lua/src/strbuf.c
// Function: strbuf_append_fmt
void strbuf_append_fmt(strbuf_t *s, int len, const char *fmt, ...)
{
    va_list arg;
    int fmt_len;

    strbuf_ensure_empty_length(s, len);

    va_start(arg, fmt);
    fmt_len = vsnprintf(s->buf + s->length, len, fmt, arg);
    va_end(arg);

    if (fmt_len < 0)
        die("BUG: Unable to convert number");  /* This should never happen.. */

    s->length += fmt_len;
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
subq $0xd0, %rsp
movq %rdx, %r14
movl %esi, %ebp
movq %rdi, %rbx
movq %rcx, 0x38(%rsp)
movq %r8, 0x40(%rsp)
movq %r9, 0x48(%rsp)
testb %al, %al
je 0x8d946
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)
movl 0xc(%rdi), %esi
movl %esi, %eax
notl %eax
addl 0x8(%rdi), %eax
cmpl %ebp, %eax
jge 0x8d95e
addl %ebp, %esi
movq %rbx, %rdi
callq 0x8d800
leaq 0x20(%rsp), %rax
movq %rsp, %rcx
movq %rax, 0x10(%rcx)
leaq 0xf0(%rsp), %rax
movq %rax, 0x8(%rcx)
movabsq $0x3000000018, %rax     # imm = 0x3000000018
movq %rax, (%rcx)
movslq 0xc(%rbx), %rdi
addq (%rbx), %rdi
movslq %ebp, %rsi
movq %r14, %rdx
callq 0x26810
testl %eax, %eax
js 0x8d9a8
addl %eax, 0xc(%rbx)
addq $0xd0, %rsp
popq %rbx
popq %r14
popq %rbp
retq
leaq 0x3561d(%rip), %rdi     # 0xc2fcc
xorl %eax, %eax
callq 0x8d668
// File: /workspace/github_c_makefile_star2_O2/gplessis[P]dotdeb-redis/deps/lua/src/strbuf.c
// Function: strbuf_append_fmt_retry
void strbuf_append_fmt_retry(strbuf_t *s, const char *fmt, ...)
{
    va_list arg;
    int fmt_len, try;
    int empty_len;

    /* If the first attempt to append fails, resize the buffer appropriately
     * and try again */
    for (try = 0; ; try++) {
        va_start(arg, fmt);
        /* Append the new formatted string */
        /* fmt_len is the length of the string required, excluding the
         * trailing NULL */
        empty_len = strbuf_empty_length(s);
        /* Add 1 since there is also space to store the terminating NULL. */
        fmt_len = vsnprintf(s->buf + s->length, empty_len + 1, fmt, arg);
        va_end(arg);

        if (fmt_len <= empty_len)
            break;  /* SUCCESS */
        if (try > 0)
            die("BUG: length of formatted string changed");

        strbuf_resize(s, s->length + fmt_len);
    }

    s->length += fmt_len;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xd8, %rsp
movq %rsi, %r14
movq %rdi, %rbx
leaq 0x20(%rsp), %r12
movq %rdx, 0x10(%r12)
movq %rcx, 0x18(%r12)
movq %r8, 0x20(%r12)
movq %r9, 0x28(%r12)
testb %al, %al
je 0x8da21
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)
movb $0x1, %r13b
movq %rsp, %r15
movq %r12, 0x10(%rsp)
leaq 0x110(%rsp), %rax
movq %rax, 0x8(%rsp)
movabsq $0x3000000010, %rax     # imm = 0x3000000010
movq %rax, (%rsp)
movl 0x8(%rbx), %eax
movslq 0xc(%rbx), %rdi
movl %edi, %ebp
notl %ebp
addl %eax, %ebp
subl %edi, %eax
addq (%rbx), %rdi
movslq %eax, %rsi
movq %r14, %rdx
movq %r15, %rcx
callq 0x26810
cmpl %ebp, %eax
jle 0x8da83
testb $0x1, %r13b
je 0x8da98
movl 0xc(%rbx), %esi
addl %eax, %esi
movq %rbx, %rdi
callq 0x8d800
xorl %r13d, %r13d
jmp 0x8da27
addl %eax, 0xc(%rbx)
addq $0xd8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x3554b(%rip), %rdi     # 0xc2fea
xorl %eax, %eax
callq 0x8d668
nop
// File: /workspace/github_c_makefile_star2_O2/gplessis[P]dotdeb-redis/deps/lua/src/fpconv.c
// Function: fpconv_strtod
double fpconv_strtod(const char *nptr, char **endptr)
{
    char localbuf[FPCONV_G_FMT_BUFSIZE];
    char *buf, *endbuf, *dp;
    int buflen;
    double value;

    /* System strtod() is fine when decimal point is '.' */
    if (locale_decimal_point == '.')
        return strtod(nptr, endptr);

    buflen = strtod_buffer_size(nptr);
    if (!buflen) {
        /* No valid characters found, standard strtod() return */
        *endptr = (char *)nptr;
        return 0;
    }

    /* Duplicate number into buffer */
    if (buflen >= FPCONV_G_FMT_BUFSIZE) {
        /* Handle unusually large numbers */
        buf = malloc(buflen + 1);
        if (!buf) {
            fprintf(stderr, "Out of memory");
            abort();
        }
    } else {
        /* This is the common case.. */
        buf = localbuf;
    }
    memcpy(buf, nptr, buflen);
    buf[buflen] = 0;

    /* Update decimal point character if found */
    dp = strchr(buf, '.');
    if (dp)
        *dp = locale_decimal_point;

    value = strtod(buf, &endbuf);
    *endptr = (char *)&nptr[endbuf - buf];
    if (buflen >= FPCONV_G_FMT_BUFSIZE)
        free(buf);

    return value;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movq %rsi, %rbx
movq %rdi, %r14
movb 0x6bd3d(%rip), %bpl     # 0xf9800
cmpb $0x2e, %bpl
jne 0x8dae2
movq %r14, %rdi
movq %rbx, %rsi
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x26cc0
xorl %r13d, %r13d
movabsq $0x100000000, %rax      # imm = 0x100000000
movabsq $0x680000000000, %rcx   # imm = 0x680000000000
xorl %r15d, %r15d
movzbl (%r14,%r13), %edx
leal -0x30(%rdx), %esi
cmpb $0xa, %sil
jb 0x8db22
cmpl $0x2e, %edx
ja 0x8db17
movl %edx, %esi
btq %rsi, %rcx
jb 0x8db22
orb $0x20, %dl
addb $-0x7a, %dl
cmpb $-0x19, %dl
jb 0x8db2a
addq %rax, %r15
incq %r13
jmp 0x8dafc
testl %r13d, %r13d
je 0x8db68
cmpl $0x20, %r13d
jl 0x8db70
movl %r13d, %edi
incl %edi
callq 0x26360
movq %rax, %r12
testq %rax, %rax
jne 0x8db75
movq 0x6747a(%rip), %rax     # 0xf4fc8
movq (%rax), %rcx
leaq 0x32daa(%rip), %rdi     # 0xc0902
pushq $0xd
popq %rsi
pushq $0x1
popq %rdx
callq 0x26b10
callq 0x261c0
movq %r14, (%rbx)
xorps %xmm0, %xmm0
jmp 0x8dbd3
leaq 0x10(%rsp), %r12
sarq $0x20, %r15
movq %r12, %rdi
movq %r14, %rsi
movq %r15, %rdx
callq 0x26c50
movb $0x0, (%r12,%r15)
pushq $0x2e
popq %rsi
movq %r12, %rdi
callq 0x267f0
testq %rax, %rax
je 0x8db9f
movb %bpl, (%rax)
leaq 0x8(%rsp), %r15
movq %r12, %rdi
movq %r15, %rsi
callq 0x26cc0
movq (%r15), %rax
subq %r12, %rax
addq %rax, %r14
movq %r14, (%rbx)
cmpl $0x20, %r13d
jl 0x8dbd3
movq %r12, %rdi
movsd %xmm0, (%rsp)
callq 0x264d0
movsd (%rsp), %xmm0
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/gplessis[P]dotdeb-redis/deps/lua/src/fpconv.c
// Function: fpconv_g_fmt
int fpconv_g_fmt(char *str, double num, int precision)
{
    char buf[FPCONV_G_FMT_BUFSIZE];
    char fmt[6];
    int len;
    char *b;

    set_number_format(fmt, precision);

    /* Pass through when decimal point character is dot. */
    if (locale_decimal_point == '.')
        return snprintf(str, FPCONV_G_FMT_BUFSIZE, fmt, num);

    /* snprintf() to a buffer then translate for other decimal point characters */
    len = snprintf(buf, FPCONV_G_FMT_BUFSIZE, fmt, num);

    /* Copy into target location. Translate decimal point if required */
    b = buf;
    do {
        *str++ = (*b == locale_decimal_point ? '.' : *b);
    } while(*b++);

    return len;
}

// Assembly:
pushq %rbx
subq $0x30, %rsp
leal -0x1(%rsi), %eax
cmpl $0xe, %eax
jae 0x8dc86
movq %rdi, %rbx
movw $0x2e25, 0xa(%rsp)      # imm = 0x2E25
cmpl $0xa, %esi
jae 0x8dc09
leaq 0xc(%rsp), %rax
jmp 0x8dc12
leaq 0xd(%rsp), %rax
movb $0x31, -0x1(%rax)
leal -0xa(%rsi), %ecx
cmpl $0xa, %esi
movzbl %cl, %ecx
cmovbl %esi, %ecx
orb $0x30, %cl
movb %cl, (%rax)
movw $0x67, 0x1(%rax)
cmpb $0x2e, 0x6bbd0(%rip)    # 0xf9800
jne 0x8dc46
pushq $0x20
popq %rsi
leaq 0xa(%rsp), %rdx
movq %rbx, %rdi
movb $0x1, %al
callq 0x26120
jmp 0x8dc80
leaq 0x10(%rsp), %rdi
pushq $0x20
popq %rsi
leaq 0xa(%rsp), %rdx
movb $0x1, %al
callq 0x26120
xorl %ecx, %ecx
movb 0x6bb9e(%rip), %dl      # 0xf9800
pushq $0x2e
popq %rsi
movzbl 0x10(%rsp,%rcx), %edi
cmpb %dl, %dil
movl %edi, %r8d
cmovel %esi, %r8d
movb %r8b, (%rbx,%rcx)
incq %rcx
testb %dil, %dil
jne 0x8dc65
addq $0x30, %rsp
popq %rbx
retq
leaq 0x353e3(%rip), %rdi     # 0xc3070
leaq 0x353fe(%rip), %rsi     # 0xc3092
leaq 0x35400(%rip), %rcx     # 0xc309b
movl $0x9d, %edx
callq 0x262d0
// File: /workspace/github_c_makefile_star2_O2/gplessis[P]dotdeb-redis/deps/lua/src/fpconv.c
// Function: fpconv_init
static void fpconv_update_locale()
{
    char buf[8];

    snprintf(buf, sizeof(buf), "%g", 0.5);

    /* Failing this test might imply the platform has a buggy dtoa
     * implementation or wide characters */
    if (buf[0] != '0' || buf[2] != '5' || buf[3] != 0) {
        fprintf(stderr, "Error: wide characters found or printf() bug.");
        abort();
    }

    locale_decimal_point = buf[1];
}

// Assembly:
pushq %rbx
subq $0x10, %rsp
leaq 0x2d91a(%rip), %rdx     # 0xbb5cb
leaq 0x8(%rsp), %rbx
pushq $0x8
popq %rsi
movsd 0x353a7(%rip), %xmm0    # 0xc3068
movq %rbx, %rdi
movb $0x1, %al
callq 0x26120
cmpb $0x30, (%rbx)
jne 0x8dcee
cmpb $0x35, 0xa(%rsp)
jne 0x8dcee
cmpb $0x0, 0xb(%rsp)
jne 0x8dcee
movb 0x9(%rsp), %al
movb %al, 0x6bb18(%rip)      # 0xf9800
addq $0x10, %rsp
popq %rbx
retq
movq 0x672d3(%rip), %rax     # 0xf4fc8
movq (%rax), %rcx
leaq 0x353c0(%rip), %rdi     # 0xc30bf
pushq $0x2d
popq %rsi
pushq $0x1
popq %rdx
callq 0x26b10
callq 0x261c0
nop