LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O1/bhk[P]tooltree/lua/../opensource/lua-5.2.3/src/lmathlib.c
// Function: math_random
static int math_random (lua_State *L) {
  /* the `%' avoids the (rare) case of r==1, and is needed also because on
     some systems (SunOS!) `rand()' may return a value larger than RAND_MAX */
  lua_Number r = (lua_Number)(rand()%RAND_MAX) / (lua_Number)RAND_MAX;
  switch (lua_gettop(L)) {  /* check number of arguments */
    case 0: {  /* no arguments */
      lua_pushnumber(L, r);  /* Number between 0 and 1 */
      break;
    }
    case 1: {  /* only upper limit */
      lua_Number u = luaL_checknumber(L, 1);
      luaL_argcheck(L, (lua_Number)1.0 <= u, 1, "interval is empty");
      lua_pushnumber(L, l_mathop(floor)(r*u) + (lua_Number)(1.0));  /* [1, u] */
      break;
    }
    case 2: {  /* lower and upper limits */
      lua_Number l = luaL_checknumber(L, 1);
      lua_Number u = luaL_checknumber(L, 2);
      luaL_argcheck(L, l <= u, 2, "interval is empty");
      lua_pushnumber(L, l_mathop(floor)(r*(u-l+1)) + l);  /* [l, u] */
      break;
    }
    default: return luaL_error(L, "wrong number of arguments");
  }
  return 1;
}

// Assembly:
pushq %rbx
subq $0x20, %rsp
movq %rdi, %rbx
callq 0x65d0
cltq
movq %rax, %rcx
shlq $0x1e, %rcx
addq %rax, %rcx
movq %rcx, %rdx
shrq $0x3f, %rdx
sarq $0x3d, %rcx
addl %edx, %ecx
addl %ecx, %eax
shll $0x1f, %ecx
addl %eax, %ecx
cvtsi2sd %ecx, %xmm0
divsd 0x11492(%rip), %xmm0    # 0x20c50
movsd %xmm0, 0x10(%rsp)
movq %rbx, %rdi
callq 0x7683
cmpl $0x2, %eax
je 0xf840
cmpl $0x1, %eax
je 0xf7ec
testl %eax, %eax
jne 0xf8c2
movq %rbx, %rdi
movsd 0x10(%rsp), %xmm0
jmp 0xf8b2
movq %rbx, %rdi
movl $0x1, %esi
callq 0x9650
movapd %xmm0, %xmm1
ucomisd 0x11453(%rip), %xmm0    # 0x20c58
jae 0xf827
leaq 0x114de(%rip), %rdx     # 0x20cec
movq %rbx, %rdi
movl $0x1, %esi
movsd %xmm1, 0x8(%rsp)
callq 0x8f3e
movsd 0x8(%rsp), %xmm1
movsd 0x10(%rsp), %xmm0
mulsd %xmm1, %xmm0
callq 0x6500
addsd 0x1141a(%rip), %xmm0    # 0x20c58
jmp 0xf8af
movq %rbx, %rdi
movl $0x1, %esi
callq 0x9650
movsd %xmm0, 0x8(%rsp)
movq %rbx, %rdi
movl $0x2, %esi
callq 0x9650
movapd %xmm0, %xmm1
ucomisd 0x8(%rsp), %xmm0
jae 0xf88c
leaq 0x11479(%rip), %rdx     # 0x20cec
movq %rbx, %rdi
movl $0x2, %esi
movsd %xmm1, 0x18(%rsp)
callq 0x8f3e
movsd 0x18(%rsp), %xmm1
subsd 0x8(%rsp), %xmm1
addsd 0x113be(%rip), %xmm1    # 0x20c58
movsd 0x10(%rsp), %xmm0
mulsd %xmm1, %xmm0
callq 0x6500
addsd 0x8(%rsp), %xmm0
movq %rbx, %rdi
callq 0x7d72
movl $0x1, %eax
addq $0x20, %rsp
popq %rbx
retq
leaq 0x11435(%rip), %rsi     # 0x20cfe
movq %rbx, %rdi
xorl %eax, %eax
addq $0x20, %rsp
popq %rbx
jmp 0x9024
// File: /workspace/github_c_makefile_star2_O1/bhk[P]tooltree/lua/../opensource/lua-5.2.3/src/lmem.c
// Function: luaM_realloc_
void *luaM_realloc_ (lua_State *L, void *block, size_t osize, size_t nsize) {
  void *newblock;
  global_State *g = G(L);
  size_t realosize = (block) ? osize : 0;
  lua_assert((realosize == 0) == (block == NULL));
#if defined(HARDMEMTESTS)
  if (nsize > realosize && g->gcrunning)
    luaC_fullgc(L, 1);  /* force a GC whenever possible */
#endif
  newblock = (*g->frealloc)(g->ud, block, osize, nsize);
  if (newblock == NULL && nsize > 0) {
    api_check(L, nsize > realosize,
                 "realloc cannot fail when shrinking a block");
    if (g->gcrunning) {
      luaC_fullgc(L, 1);  /* try to free some memory... */
      newblock = (*g->frealloc)(g->ud, block, osize, nsize);  /* try again */
    }
    if (newblock == NULL)
      luaD_throw(L, LUA_ERRMEM);
  }
  lua_assert((nsize == 0) == (newblock == NULL));
  g->GCdebt = (g->GCdebt + nsize) - realosize;
  return newblock;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %rcx, %rbx
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %r12
movq 0x18(%rdi), %r13
movq 0x8(%r13), %rdi
callq *(%r13)
testq %rbx, %rbx
je 0xfa99
testq %rax, %rax
jne 0xfa99
cmpb $0x0, 0x57(%r13)
je 0xfa92
movq %r12, %rdi
movl $0x1, %esi
callq 0xd68e
movq 0x8(%r13), %rdi
movq %r15, %rsi
movq %r14, %rdx
movq %rbx, %rcx
callq *(%r13)
jmp 0xfa94
xorl %eax, %eax
testq %rax, %rax
je 0xfab1
testq %r15, %r15
cmoveq %r15, %r14
subq %r14, %rbx
addq %rbx, 0x18(%r13)
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
movq %r12, %rdi
movl $0x4, %esi
callq 0xb1b4
nop
// File: /workspace/github_c_makefile_star2_O1/bhk[P]tooltree/lua/../opensource/lua-5.2.3/src/loadlib.c
// Function: gctm
static int gctm (lua_State *L) {
  int n = luaL_len(L, 1);
  for (; n >= 1; n--) {  /* for each handle, in reverse order */
    lua_rawgeti(L, 1, n);  /* get handle CLIBS[n] */
    ll_unloadlib(lua_touserdata(L, -1));
    lua_pop(L, 1);  /* pop handle */
  }
  return 0;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movl $0x1, %esi
callq 0x9edd
testl %eax, %eax
jle 0xfd0e
movl %eax, %r14d
movq %rbx, %rdi
movl $0x1, %esi
movl %r14d, %edx
callq 0x8145
movq %rbx, %rdi
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
callq 0x7caf
movq %rax, %rdi
callq 0x6590
movq %rbx, %rdi
movl $0xfffffffe, %esi       # imm = 0xFFFFFFFE
callq 0x7697
leal -0x1(%r14), %eax
cmpl $0x1, %r14d
movl %eax, %r14d
jg 0xfccf
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O1/bhk[P]tooltree/lua/../opensource/lua-5.2.3/src/loadlib.c
// Function: ll_loadfunc
static int ll_loadfunc (lua_State *L, const char *path, const char *sym) {
  void *reg = ll_checkclib(L, path);  /* check loaded C libraries */
  if (reg == NULL) {  /* must load library? */
    reg = ll_load(L, path, *sym == '*');
    if (reg == NULL) return ERRLIB;  /* unable to load library */
    ll_addtoclib(L, path, reg);
  }
  if (*sym == '*') {  /* loading only library (no function)? */
    lua_pushboolean(L, 1);  /* return 'true' */
    return 0;  /* no errors */
  }
  else {
    lua_CFunction f = ll_sym(L, reg, sym);
    if (f == NULL)
      return ERRFUNC;  /* unable to find function */
    lua_pushcfunction(L, f);  /* else create new function */
    return 0;  /* no errors */
  }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %rbx
leaq 0x10e3c(%rip), %rdx     # 0x20d59
movl $0xfff0b9d8, %esi       # imm = 0xFFF0B9D8
callq 0x80bf
movq %rbx, %rdi
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
movq %r15, %rdx
callq 0x80bf
movq %rbx, %rdi
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
callq 0x7caf
movq %rax, %r12
movq %rbx, %rdi
movl $0xfffffffd, %esi       # imm = 0xFFFFFFFD
callq 0x7697
testq %r12, %r12
jne 0xffe7
xorl %esi, %esi
cmpb $0x2a, (%r14)
sete %sil
shll $0x8, %esi
orl $0x2, %esi
movq %r15, %rdi
callq 0x6300
testq %rax, %rax
je 0x10036
movq %rax, %r12
leaq 0x10dd1(%rip), %rdx     # 0x20d59
movq %rbx, %rdi
movl $0xfff0b9d8, %esi       # imm = 0xFFF0B9D8
callq 0x80bf
movq %rbx, %rdi
movq %r12, %rsi
callq 0x7ffb
movq %rbx, %rdi
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
callq 0x7869
movq %rbx, %rdi
movl $0xfffffffd, %esi       # imm = 0xFFFFFFFD
movq %r15, %rdx
callq 0x833f
movq %rbx, %rdi
movl $0xfffffffe, %esi       # imm = 0xFFFFFFFE
callq 0x9edd
leal 0x1(%rax), %edx
movq %rbx, %rdi
movl $0xfffffffe, %esi       # imm = 0xFFFFFFFE
callq 0x840d
movq %rbx, %rdi
movl $0xfffffffe, %esi       # imm = 0xFFFFFFFE
callq 0x7697
cmpb $0x2a, (%r14)
jne 0xfffe
movq %rbx, %rdi
movl $0x1, %esi
callq 0x7fe1
xorl %ebp, %ebp
jmp 0x1004b
movq %r12, %rdi
movq %r14, %rsi
callq 0x64e0
testq %rax, %rax
je 0x1001f
xorl %ebp, %ebp
movq %rbx, %rdi
movq %rax, %rsi
xorl %edx, %edx
callq 0x7f5d
jmp 0x1004b
callq 0x6050
movq %rbx, %rdi
movq %rax, %rsi
callq 0x7e16
movl $0x2, %ebp
jmp 0x1004b
callq 0x6050
movq %rbx, %rdi
movq %rax, %rsi
callq 0x7e16
movl $0x1, %ebp
movl %ebp, %eax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/bhk[P]tooltree/lua/../opensource/lua-5.2.3/src/loadlib.c
// Function: searcher_preload
static int searcher_preload (lua_State *L) {
  const char *name = luaL_checkstring(L, 1);
  lua_getfield(L, LUA_REGISTRYINDEX, "_PRELOAD");
  lua_getfield(L, -1, name);
  if (lua_isnil(L, -1))  /* not found? */
    lua_pushfstring(L, "\n\tno field package.preload['%s']", name);
  return 1;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movl $0x1, %esi
xorl %edx, %edx
callq 0x9559
movq %rax, %r14
leaq 0x1089e(%rip), %rdx     # 0x20a65
movq %rbx, %rdi
movl $0xfff0b9d8, %esi       # imm = 0xFFF0B9D8
callq 0x80bf
movq %rbx, %rdi
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
movq %r14, %rdx
callq 0x80bf
movq %rbx, %rdi
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
callq 0x7889
testl %eax, %eax
jne 0x10209
leaq 0x10cbb(%rip), %rsi     # 0x20eb7
movq %rbx, %rdi
movq %r14, %rdx
xorl %eax, %eax
callq 0x7eb0
movl $0x1, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O1/bhk[P]tooltree/lua/../opensource/lua-5.2.3/src/loadlib.c
// Function: findfile
static const char *findfile (lua_State *L, const char *name,
                                           const char *pname,
                                           const char *dirsep) {
  const char *path;
  lua_getfield(L, lua_upvalueindex(1), pname);
  path = lua_tostring(L, -1);
  if (path == NULL)
    luaL_error(L, LUA_QL("package.%s") " must be a string", pname);
  return searchpath(L, name, path, ".", dirsep);
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %r15
movq %rsi, %rbx
movq %rdi, %r14
movl $0xfff0b9d7, %esi       # imm = 0xFFF0B9D7
callq 0x80bf
movq %r14, %rdi
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
xorl %edx, %edx
callq 0x7bdc
movq %rax, %r12
testq %rax, %rax
jne 0x103e8
leaq 0x10afd(%rip), %rsi     # 0x20ed8
movq %r14, %rdi
movq %r15, %rdx
xorl %eax, %eax
callq 0x9024
leaq 0x1001e(%rip), %rcx     # 0x2040d
leaq 0x10ab0(%rip), %r8      # 0x20ea6
movq %r14, %rdi
movq %rbx, %rsi
movq %r12, %rdx
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
jmp 0x10056
// File: /workspace/github_c_makefile_star2_O1/bhk[P]tooltree/lua/../opensource/lua-5.2.3/src/loadlib.c
// Function: checkload
static int checkload (lua_State *L, int stat, const char *filename) {
  if (stat) {  /* module loaded successfully? */
    lua_pushstring(L, filename);  /* will be 2nd argument to module */
    return 2;  /* return open function and file name */
  }
  else
    return luaL_error(L, "error loading module " LUA_QS
                         " from file " LUA_QS ":\n\t%s",
                          lua_tostring(L, 1), filename, lua_tostring(L, -1));
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdx, %rbx
movq %rdi, %r14
testl %esi, %esi
je 0x10434
movq %r14, %rdi
movq %rbx, %rsi
callq 0x7e16
movl $0x2, %eax
popq %rbx
popq %r14
popq %r15
retq
movq %r14, %rdi
movl $0x1, %esi
xorl %edx, %edx
callq 0x7bdc
movq %rax, %r15
movq %r14, %rdi
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
xorl %edx, %edx
callq 0x7bdc
leaq 0x10a9a(%rip), %rsi     # 0x20ef6
movq %r14, %rdi
movq %r15, %rdx
movq %rbx, %rcx
movq %rax, %r8
xorl %eax, %eax
popq %rbx
popq %r14
popq %r15
jmp 0x9024
// File: /workspace/github_c_makefile_star2_O1/bhk[P]tooltree/lua/../opensource/lua-5.2.3/src/loadlib.c
// Function: loadfunc
static int loadfunc (lua_State *L, const char *filename, const char *modname) {
  const char *funcname;
  const char *mark;
  modname = luaL_gsub(L, modname, ".", LUA_OFSEP);
  mark = strchr(modname, *LUA_IGMARK);
  if (mark) {
    int stat;
    funcname = lua_pushlstring(L, modname, mark - modname);
    funcname = lua_pushfstring(L, LUA_POF"%s", funcname);
    stat = ll_loadfunc(L, filename, funcname);
    if (stat != ERRFUNC) return stat;
    modname = mark + 1;  /* else go ahead and try old-style name */
  }
  funcname = lua_pushfstring(L, LUA_POF"%s", modname);
  return ll_loadfunc(L, filename, funcname);
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
leaq 0xff84(%rip), %rax      # 0x2040d
leaq 0x10a94(%rip), %rcx     # 0x20f24
movq %rdx, %rsi
movq %rax, %rdx
callq 0xa279
movq %rax, %r15
movq %rax, %rdi
movl $0x2d, %esi
callq 0x6190
testq %rax, %rax
je 0x104f2
movq %rax, %r12
movq %rax, %rdx
subq %r15, %rdx
movq %r14, %rdi
movq %r15, %rsi
callq 0x7dc7
leaq 0x10a5b(%rip), %rsi     # 0x20f26
movq %r14, %rdi
movq %rax, %rdx
xorl %eax, %eax
callq 0x7eb0
movq %r14, %rdi
movq %rbx, %rsi
movq %rax, %rdx
callq 0xff05
incq %r12
cmpl $0x2, %eax
cmoveq %r12, %r15
jne 0x1051f
leaq 0x10a2d(%rip), %rsi     # 0x20f26
movq %r14, %rdi
movq %r15, %rdx
xorl %eax, %eax
callq 0x7eb0
movq %r14, %rdi
movq %rbx, %rsi
movq %rax, %rdx
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
jmp 0xff05
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/bhk[P]tooltree/lua/../opensource/lua-5.2.3/src/lobject.c
// Function: luaO_int2fb
int luaO_int2fb (unsigned int x) {
  int e = 0;  /* exponent */
  if (x < 8) return x;
  while (x >= 0x10) {
    x = (x+1) >> 1;
    e++;
  }
  return ((e+1) << 3) | (cast_int(x) - 8);
}

// Assembly:
movl %edi, %eax
cmpl $0x8, %edi
jb 0x10790
movl $0x8, %ecx
cmpl $0x10, %eax
jb 0x10787
incl %eax
movl %eax, %edx
shrl %edx
addl $0x8, %ecx
cmpl $0x1f, %eax
movl %edx, %eax
ja 0x10775
jmp 0x10789
movl %eax, %edx
addl $-0x8, %edx
orl %ecx, %edx
movl %edx, %eax
retq
// File: /workspace/github_c_makefile_star2_O1/bhk[P]tooltree/lua/../opensource/lua-5.2.3/src/lobject.c
// Function: luaO_ceillog2
int luaO_ceillog2 (unsigned int x) {
  static const lu_byte log_2[256] = {
    0,1,2,2,3,3,3,3,4,4,4,4,4,4,4,4,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,
    6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,
    7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,
    7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,
    8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,
    8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,
    8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,
    8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8
  };
  int l = 0;
  x--;
  while (x >= 256) { l += 8; x >>= 8; }
  return l + log_2[x];
}

// Assembly:
decl %edi
xorl %ecx, %ecx
cmpl $0x100, %edi            # imm = 0x100
jb 0x107cf
xorl %ecx, %ecx
movl %edi, %eax
addl $0x8, %ecx
shrl $0x8, %eax
cmpl $0xffff, %edi           # imm = 0xFFFF
movl %eax, %edi
ja 0x107bd
jmp 0x107d1
movl %edi, %eax
movl %eax, %eax
leaq 0x10806(%rip), %rdx     # 0x20fe0
movzbl (%rax,%rdx), %eax
addl %ecx, %eax
retq
// File: /workspace/github_c_makefile_star2_O1/bhk[P]tooltree/lua/../opensource/lua-5.2.3/src/lobject.c
// Function: luaO_arith
lua_Number luaO_arith (int op, lua_Number v1, lua_Number v2) {
  switch (op) {
    case LUA_OPADD: return luai_numadd(NULL, v1, v2);
    case LUA_OPSUB: return luai_numsub(NULL, v1, v2);
    case LUA_OPMUL: return luai_nummul(NULL, v1, v2);
    case LUA_OPDIV: return luai_numdiv(NULL, v1, v2);
    case LUA_OPMOD: return luai_nummod(NULL, v1, v2);
    case LUA_OPPOW: return luai_numpow(NULL, v1, v2);
    case LUA_OPUNM: return luai_numunm(NULL, v1);
    default: lua_assert(0); return 0;
  }
}

// Assembly:
cmpl $0x6, %edi
ja 0x10839
movl %edi, %eax
leaq 0x107c1(%rip), %rcx     # 0x20fb0
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
addsd %xmm1, %xmm0
retq
subq $0x28, %rsp
movapd %xmm0, 0x10(%rsp)
divsd %xmm1, %xmm0
movsd %xmm1, 0x8(%rsp)
callq 0x6500
mulsd 0x8(%rsp), %xmm0
movapd 0x10(%rsp), %xmm1
subsd %xmm0, %xmm1
movapd %xmm1, %xmm0
addq $0x28, %rsp
retq
mulsd %xmm1, %xmm0
retq
divsd %xmm1, %xmm0
retq
xorps %xmm0, %xmm0
retq
subsd %xmm1, %xmm0
retq
jmp 0x6140
xorps 0x10752(%rip), %xmm0    # 0x20fa0
retq
// File: /workspace/github_c_makefile_star2_O1/bhk[P]tooltree/lua/../opensource/lua-5.2.3/src/lobject.c
// Function: readhexa
static lua_Number readhexa (const char **s, lua_Number r, int *count) {
  for (; lisxdigit(cast_uchar(**s)); (*s)++) {  /* read integer part */
    r = (r * cast_num(16.0)) + cast_num(luaO_hexavalue(cast_uchar(**s)));
    (*count)++;
  }
  return r;
}

// Assembly:
movq (%rdi), %rax
movzbl (%rax), %edx
leaq 0x114d0(%rip), %rcx     # 0x22420
testb $0x10, 0x1(%rdx,%rcx)
je 0x10fab
leaq 0x1(%rdx), %r9
movl (%rsi), %r8d
incl %r8d
incq %rax
movsd 0x10174(%rip), %xmm1    # 0x210e0
movl %r9d, %r9d
leal -0x30(%rdx), %r10d
orl $0x20, %edx
addl $-0x57, %edx
testb $0x2, (%r9,%rcx)
cmovnel %r10d, %edx
xorps %xmm2, %xmm2
cvtsi2sd %edx, %xmm2
mulsd %xmm1, %xmm0
addsd %xmm2, %xmm0
movl %r8d, (%rsi)
movq %rax, (%rdi)
movzbl (%rax), %edx
leaq 0x1(%rdx), %r9
incl %r8d
incq %rax
testb $0x10, 0x1(%rdx,%rcx)
jne 0x10f6c
retq
// File: /workspace/github_c_makefile_star2_O1/bhk[P]tooltree/lua/../opensource/lua-5.2.3/src/loslib.c
// Function: os_exit
static int os_exit (lua_State *L) {
  int status;
  if (lua_isboolean(L, 1))
    status = (lua_toboolean(L, 1) ? EXIT_SUCCESS : EXIT_FAILURE);
  else
    status = luaL_optint(L, 1, EXIT_SUCCESS);
  if (lua_toboolean(L, 2))
    lua_close(L);
  if (L) exit(status);  /* 'if' to avoid warnings for unreachable 'return' */
  return 0;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movl $0x1, %esi
callq 0x7889
movq %rbx, %rdi
movl $0x1, %esi
cmpl $0x1, %eax
jne 0x1143c
callq 0x7bb6
xorl %r14d, %r14d
testl %eax, %eax
sete %r14b
jmp 0x11446
xorl %edx, %edx
callq 0x9769
movq %rax, %r14
movq %rbx, %rdi
movl $0x2, %esi
callq 0x7bb6
testl %eax, %eax
je 0x1145f
movq %rbx, %rdi
callq 0x1487c
testq %rbx, %rbx
jne 0x1146e
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
movl %r14d, %edi
callq 0x6540
// File: /workspace/github_c_makefile_star2_O1/bhk[P]tooltree/lua/../opensource/lua-5.2.3/src/loslib.c
// Function: os_time
static int os_time (lua_State *L) {
  time_t t;
  if (lua_isnoneornil(L, 1))  /* called without args? */
    t = time(NULL);  /* get current time */
  else {
    struct tm ts;
    luaL_checktype(L, 1, LUA_TTABLE);
    lua_settop(L, 1);  /* make sure table is at the top */
    ts.tm_sec = getfield(L, "sec", 0);
    ts.tm_min = getfield(L, "min", 0);
    ts.tm_hour = getfield(L, "hour", 12);
    ts.tm_mday = getfield(L, "day", -1);
    ts.tm_mon = getfield(L, "month", -1) - 1;
    ts.tm_year = getfield(L, "year", -1) - 1900;
    ts.tm_isdst = getboolfield(L, "isdst");
    t = mktime(&ts);
  }
  if (t == (time_t)(-1))
    lua_pushnil(L);
  else
    lua_pushnumber(L, (lua_Number)t);
  return 1;
}

// Assembly:
pushq %rbp
pushq %rbx
subq $0x38, %rsp
movq %rdi, %rbx
movl $0x1, %esi
callq 0x7889
testl %eax, %eax
jle 0x1169d
movq %rbx, %rdi
movl $0x1, %esi
movl $0x5, %edx
callq 0x95e9
movq %rbx, %rdi
movl $0x1, %esi
callq 0x7697
leaq 0xfcd8(%rip), %rsi      # 0x21299
movq %rbx, %rdi
xorl %edx, %edx
callq 0x1171c
movl %eax, (%rsp)
leaq 0xf6e9(%rip), %rsi      # 0x20cbe
movq %rbx, %rdi
xorl %edx, %edx
callq 0x1171c
movl %eax, 0x4(%rsp)
leaq 0xfcb3(%rip), %rsi      # 0x2129d
movq %rbx, %rdi
movl $0xc, %edx
callq 0x1171c
movl %eax, 0x8(%rsp)
leaq 0xfcac(%rip), %rsi      # 0x212ae
movl $0xffffffff, %ebp       # imm = 0xFFFFFFFF
movq %rbx, %rdi
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
callq 0x1171c
movl %eax, 0xc(%rsp)
leaq 0xfc83(%rip), %rsi      # 0x212a2
movq %rbx, %rdi
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
callq 0x1171c
decl %eax
movl %eax, 0x10(%rsp)
leaq 0xfc6f(%rip), %rsi      # 0x212a8
movq %rbx, %rdi
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
callq 0x1171c
addl $0xfffff894, %eax       # imm = 0xFFFFF894
movl %eax, 0x14(%rsp)
leaq 0xfc61(%rip), %rdx      # 0x212b7
movq %rbx, %rdi
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
callq 0x80bf
movq %rbx, %rdi
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
callq 0x7889
testl %eax, %eax
je 0x11683
movq %rbx, %rdi
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
callq 0x7bb6
movl %eax, %ebp
movq %rbx, %rdi
movl $0xfffffffe, %esi       # imm = 0xFFFFFFFE
callq 0x7697
movq %rsp, %rdi
movl %ebp, 0x20(%rdi)
callq 0x6410
jmp 0x116a4
xorl %edi, %edi
callq 0x6390
cmpq $-0x1, %rax
je 0x116b9
cvtsi2sd %rax, %xmm0
movq %rbx, %rdi
callq 0x7d72
jmp 0x116c1
movq %rbx, %rdi
callq 0x7d5e
movl $0x1, %eax
addq $0x38, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/bhk[P]tooltree/lua/../opensource/lua-5.2.3/src/loslib.c
// Function: getfield
static int getfield (lua_State *L, const char *key, int d) {
  int res, isnum;
  lua_getfield(L, -1, key);
  res = (int)lua_tointegerx(L, -1, &isnum);
  if (!isnum) {
    if (d < 0)
      return luaL_error(L, "field " LUA_QS " missing in date table", key);
    res = d;
  }
  lua_pop(L, 1);
  return res;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movl %edx, %ebx
movq %rsi, %r15
movq %rdi, %r14
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
movq %r15, %rdx
callq 0x80bf
leaq 0x4(%rsp), %r12
movq %r14, %rdi
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
movq %r12, %rdx
callq 0x7b1d
cmpl $0x0, (%r12)
je 0x11759
movl %eax, %ebx
jmp 0x1175d
testl %ebx, %ebx
js 0x11778
movq %r14, %rdi
movl $0xfffffffe, %esi       # imm = 0xFFFFFFFE
callq 0x7697
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
leaq 0xfbbe(%rip), %rsi      # 0x2133d
movq %r14, %rdi
movq %r15, %rdx
xorl %eax, %eax
callq 0x9024
movl %eax, %ebx
jmp 0x1176a
// File: /workspace/github_c_makefile_star2_O1/bhk[P]tooltree/lua/../opensource/lua-5.2.3/src/lparser.c
// Function: luaY_parser
Closure *luaY_parser (lua_State *L, ZIO *z, Mbuffer *buff,
                      Dyndata *dyd, const char *name, int firstchar) {
  LexState lexstate;
  FuncState funcstate;
  Closure *cl = luaF_newLclosure(L, 1);  /* create main closure */
  /* anchor closure (to avoid being collected) */
  setclLvalue(L, L->top, cl);
  incr_top(L);
  funcstate.f = cl->l.p = luaF_newproto(L);
  funcstate.f->source = luaS_new(L, name);  /* create and anchor TString */
  lexstate.buff = buff;
  lexstate.dyd = dyd;
  dyd->actvar.n = dyd->gt.n = dyd->label.n = 0;
  luaX_setinput(L, &lexstate, z, funcstate.f->source, firstchar);
  mainfunc(&lexstate, &funcstate);
  lua_assert(!funcstate.prev && funcstate.nups == 1 && !lexstate.fs);
  /* all scopes should be correctly finished */
  lua_assert(dyd->actvar.n == 0 && dyd->gt.n == 0 && dyd->label.n == 0);
  return cl;  /* it's on the stack too */
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xf8, %rsp
movl %r9d, 0xc(%rsp)
movq %r8, %rbp
movq %rcx, %r15
movq %rdx, %r13
movq %rsi, 0x10(%rsp)
movq %rdi, %r12
movl $0x1, %esi
callq 0xc54a
movq %rax, %rbx
movq 0x10(%r12), %rax
movq %rbx, (%rax)
movl $0x46, 0x8(%rax)
movq 0x10(%r12), %rax
movq 0x30(%r12), %rcx
addq $0x10, %rax
movq %rax, 0x10(%r12)
subq %rax, %rcx
cmpq $0xf, %rcx
jg 0x117f9
movq %r12, %rdi
xorl %esi, %esi
callq 0xb483
movq %r12, %rdi
callq 0xc71e
movq %rax, 0x18(%rbx)
leaq 0xb0(%rsp), %r14
movq %rax, (%r14)
movq %r12, %rdi
movq %rbp, %rsi
callq 0x14c07
movq (%r14), %rcx
movq %rax, 0x48(%rcx)
leaq 0x40(%rsp), %rbp
movq %r13, 0x48(%rbp)
movq %r15, 0x50(%rbp)
xorl %r13d, %r13d
movl %r13d, 0x28(%r15)
movl %r13d, 0x18(%r15)
movl %r13d, 0x8(%r15)
movq %r12, %rdi
movq %rbp, %rsi
movq 0x10(%rsp), %rdx
movq %rax, %rcx
movl 0xc(%rsp), %r8d
callq 0x1e652
leaq 0x18(%rsp), %rdx
movq %rbp, %rdi
movq %r14, %rsi
callq 0x118d7
movq (%r14), %rax
movb $0x1, 0x79(%rax)
leaq 0x28(%rsp), %rdx
movq $-0x1, 0x10(%rdx)
movl $0x7, (%rdx)
movl %r13d, 0x8(%rdx)
movq 0x60(%rbp), %rsi
movq %r14, %rdi
callq 0x119a3
movq %rbp, %rdi
callq 0x1e6c4
movq %rbp, %rdi
callq 0x11b24
cmpl $0x11e, 0x10(%rbp)      # imm = 0x11E
jne 0x118c8
leaq 0x40(%rsp), %rdi
callq 0x11b66
movq %rbx, %rax
addq $0xf8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x40(%rsp), %rdi
movl $0x11e, %esi            # imm = 0x11E
callq 0x13f62
// File: /workspace/github_c_makefile_star2_O1/bhk[P]tooltree/lua/../opensource/lua-5.2.3/src/lparser.c
// Function: open_func
static void open_func (LexState *ls, FuncState *fs, BlockCnt *bl) {
  lua_State *L = ls->L;
  Proto *f;
  fs->prev = ls->fs;  /* linked list of funcstates */
  fs->ls = ls;
  ls->fs = fs;
  fs->pc = 0;
  fs->lasttarget = 0;
  fs->jpc = NO_JUMP;
  fs->freereg = 0;
  fs->nk = 0;
  fs->np = 0;
  fs->nups = 0;
  fs->nlocvars = 0;
  fs->nactvar = 0;
  fs->firstlocal = ls->dyd->actvar.n;
  fs->bl = NULL;
  f = fs->f;
  f->source = ls->source;
  f->maxstacksize = 2;  /* registers 0/1 are always valid */
  fs->h = luaH_new(L);
  /* anchor table of constants (to avoid being collected) */
  sethvalue2s(L, L->top, fs->h);
  incr_top(L);
  enterblock(fs, bl, 0);
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdx, %rbx
movq %rsi, %r14
movq 0x30(%rdi), %rax
movq 0x38(%rdi), %r15
movq %rax, 0x10(%rsi)
movq %rdi, 0x18(%rsi)
movq %rsi, 0x30(%rdi)
movaps 0xfac3(%rip), %xmm0     # 0x213c0
movups %xmm0, 0x28(%rsi)
xorl %eax, %eax
movl %eax, 0x38(%rsi)
movl %eax, 0x40(%rsi)
movb $0x0, 0x44(%rsi)
movq 0x50(%rdi), %rax
movl 0x8(%rax), %eax
movl %eax, 0x3c(%rsi)
movq $0x0, 0x20(%rsi)
movq (%rsi), %rax
movq 0x58(%rdi), %rcx
movq %rcx, 0x48(%rax)
movb $0x2, 0x7a(%rax)
movq %r15, %rdi
callq 0x16fbc
movq %rax, 0x8(%r14)
movq 0x10(%r15), %rcx
movq %rax, (%rcx)
movl $0x45, 0x8(%rcx)
movq 0x10(%r15), %rax
movq 0x30(%r15), %rcx
addq $0x10, %rax
movq %rax, 0x10(%r15)
subq %rax, %rcx
cmpq $0xf, %rcx
jg 0x1196b
movq %r15, %rdi
xorl %esi, %esi
callq 0xb483
xorl %eax, %eax
movb %al, 0xe(%rbx)
movb 0x42(%r14), %cl
movb %cl, 0xc(%rbx)
movq 0x18(%r14), %rcx
movq 0x50(%rcx), %rcx
movzwl 0x28(%rcx), %edx
movw %dx, 0x8(%rbx)
movzwl 0x18(%rcx), %ecx
movw %cx, 0xa(%rbx)
movb %al, 0xd(%rbx)
movq 0x20(%r14), %rax
movq %rax, (%rbx)
movq %rbx, 0x20(%r14)
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/bhk[P]tooltree/lua/../opensource/lua-5.2.3/src/lparser.c
// Function: listfield
static void listfield (LexState *ls, struct ConsControl *cc) {
  /* listfield -> exp */
  expr(ls, &cc->v);
  checklimit(ls->fs, cc->na, MAX_INT, "items in a constructor");
  cc->na++;
  cc->tostore++;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
xorl %edx, %edx
callq 0x12b9c
movl 0x24(%rbx), %eax
cmpl $0x7ffffffe, %eax       # imm = 0x7FFFFFFE
jge 0x1352b
incl %eax
movl %eax, 0x24(%rbx)
incl 0x28(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r14
retq
movq 0x30(%r14), %rdi
leaq 0xdfee(%rip), %rdx      # 0x21524
movl $0x7ffffffd, %esi       # imm = 0x7FFFFFFD
callq 0x11d3d
// File: /workspace/github_c_makefile_star2_O1/bhk[P]tooltree/lua/../opensource/lua-5.2.3/src/lparser.c
// Function: singlevar
static void singlevar (LexState *ls, expdesc *var) {
  TString *varname = str_checkname(ls);
  FuncState *fs = ls->fs;
  if (singlevaraux(fs, varname, var, 1) == VVOID) {  /* global name? */
    expdesc key;
    singlevaraux(fs, ls->envn, var, 1);  /* get environment variable */
    lua_assert(var->k == VLOCAL || var->k == VUPVAL);
    codestring(ls, &key, varname);  /* key is variable name */
    luaK_indexed(fs, var, &key);  /* env[varname] */
  }
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rsi, %rbx
movq %rdi, %r15
callq 0x12801
movq %rax, %r12
movq 0x30(%r15), %r14
movq %r14, %rdi
movq %rax, %rsi
movq %rbx, %rdx
movl $0x1, %ecx
callq 0x13ad6
testl %eax, %eax
jne 0x13aca
movq 0x60(%r15), %rsi
movq %r14, %rdi
movq %rbx, %rdx
movl $0x1, %ecx
callq 0x13ad6
movq 0x30(%r15), %rdi
movq %r12, %rsi
callq 0x1c19e
movq %rsp, %rdx
movq $-0x1, 0x10(%rdx)
movl $0x4, (%rdx)
movl %eax, 0x8(%rdx)
movq %r14, %rdi
movq %rbx, %rsi
callq 0x1cc1d
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/bhk[P]tooltree/lua/../opensource/lua-5.2.3/src/lparser.c
// Function: undefgoto
static l_noret undefgoto (LexState *ls, Labeldesc *gt) {
  const char *msg = isreserved(gt->name)
                    ? "<%s> at line %d not inside a loop"
                    : "no visible label " LUA_QS " for <goto> at line %d";
  msg = luaO_pushfstring(ls->L, msg, getstr(gt->name), gt->line);
  semerror(ls, msg);
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
movq (%rsi), %rdx
cmpb $0x4, 0x8(%rdx)
jne 0x13c7c
cmpb $0x0, 0xa(%rdx)
leaq 0xd995(%rip), %rcx      # 0x21604
leaq 0xd96c(%rip), %rax      # 0x215e2
cmoveq %rcx, %rax
jmp 0x13c83
leaq 0xd981(%rip), %rax      # 0x21604
movq 0x38(%rbx), %rdi
addq $0x18, %rdx
movl 0xc(%rsi), %ecx
movq %rax, %rsi
xorl %eax, %eax
callq 0x10d8e
movq %rbx, %rdi
movq %rax, %rsi
callq 0x13e41
// File: /workspace/github_c_makefile_star2_O1/bhk[P]tooltree/lua/../opensource/lua-5.2.3/src/lparser.c
// Function: findgotos
static void findgotos (LexState *ls, Labeldesc *lb) {
  Labellist *gl = &ls->dyd->gt;
  int i = ls->fs->bl->firstgoto;
  while (i < gl->n) {
    if (luaS_eqstr(gl->arr[i].name, lb->name))
      closegoto(ls, i, lb);
    else
      i++;
  }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq 0x30(%rdi), %rax
movq 0x50(%rdi), %r15
movq 0x20(%rax), %rax
movswl 0xa(%rax), %ebp
cmpl %ebp, 0x18(%r15)
jle 0x13d76
movq %rsi, %rbx
movq %rdi, %r14
movq 0x10(%r15), %rax
movslq %ebp, %rcx
leaq (%rcx,%rcx,2), %rcx
movq (%rax,%rcx,8), %rdi
movq (%rbx), %rsi
callq 0x148bf
testl %eax, %eax
je 0x13d6e
movq %r14, %rdi
movl %ebp, %esi
movq %rbx, %rdx
callq 0x13d81
jmp 0x13d70
incl %ebp
cmpl 0x18(%r15), %ebp
jl 0x13d44
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/bhk[P]tooltree/lua/../opensource/lua-5.2.3/src/lparser.c
// Function: closegoto
static void closegoto (LexState *ls, int g, Labeldesc *label) {
  int i;
  FuncState *fs = ls->fs;
  Labellist *gl = &ls->dyd->gt;
  Labeldesc *gt = &gl->arr[g];
  lua_assert(luaS_eqstr(gt->name, label->name));
  if (gt->nactvar < label->nactvar) {
    TString *vname = getlocvar(fs, gt->nactvar)->varname;
    const char *msg = luaO_pushfstring(ls->L,
      "<goto %s> at line %d jumps into the scope of local " LUA_QS,
      getstr(gt->name), gt->line, getstr(vname));
    semerror(ls, msg);
  }
  luaK_patchlist(fs, gt->pc, label->pc);
  /* remove goto from pending list */
  for (i = g; i < gl->n - 1; i++)
    gl->arr[i] = gl->arr[i + 1];
  gl->n--;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movl %esi, %ebp
movq %rdi, %rbx
movq 0x30(%rdi), %rdi
movq 0x50(%rbx), %r14
movq 0x10(%r14), %rax
movslq %esi, %r15
leaq (%r15,%r15,2), %rcx
leaq (%rax,%rcx,8), %r12
movzbl 0x10(%r12), %esi
cmpb 0x10(%rdx), %sil
jb 0x13e0b
movl 0x8(%r12), %esi
movl 0x8(%rdx), %edx
callq 0x1bf11
movl 0x18(%r14), %ecx
decl %ecx
cmpl %ebp, %ecx
jle 0x13dfe
leaq (,%r15,8), %rax
leaq (%rax,%rax,2), %rax
movq 0x10(%r14), %rcx
incq %r15
movq 0x28(%rcx,%rax), %rdx
movq %rdx, 0x10(%rcx,%rax)
movups 0x18(%rcx,%rax), %xmm0
movups %xmm0, (%rcx,%rax)
movslq 0x18(%r14), %rcx
decq %rcx
addq $0x18, %rax
cmpq %rcx, %r15
jl 0x13dd4
movl %ecx, 0x18(%r14)
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
callq 0x13896
movq (%rax), %r8
movq 0x38(%rbx), %rdi
movq (%r12), %rdx
addq $0x18, %rdx
movl 0xc(%r12), %ecx
addq $0x18, %r8
leaq 0xd77b(%rip), %rsi      # 0x215aa
xorl %eax, %eax
callq 0x10d8e
movq %rbx, %rdi
movq %rax, %rsi
callq 0x13e41
// File: /workspace/github_c_makefile_star2_O1/bhk[P]tooltree/lua/../opensource/lua-5.2.3/src/lstate.c
// Function: luaE_extendCI
CallInfo *luaE_extendCI (lua_State *L) {
  CallInfo *ci = luaM_new(L, CallInfo);
  lua_assert(L->ci->next == NULL);
  L->ci->next = ci;
  ci->previous = L->ci;
  ci->next = NULL;
  return ci;
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
movl $0x50, %ecx
xorl %esi, %esi
xorl %edx, %edx
callq 0xfa40
movq 0x20(%rbx), %rcx
movq %rax, 0x18(%rcx)
movq %rcx, 0x10(%rax)
movq $0x0, 0x18(%rax)
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O1/bhk[P]tooltree/lua/../opensource/lua-5.2.3/src/lstate.c
// Function: lua_newthread
LUA_API lua_State *lua_newthread (lua_State *L) {
  lua_State *L1;
  lua_lock(L);
  luaC_checkGC(L);
  L1 = &luaC_newobj(L, LUA_TTHREAD, sizeof(LX), NULL, offsetof(LX, l))->th;
  setthvalue(L, L->top, L1);
  api_incr_top(L);
  preinit_state(L1, G(L));
  L1->hookmask = L->hookmask;
  L1->basehookcount = L->basehookcount;
  L1->hook = L->hook;
  resethookcount(L1);
  luai_userstatethread(L, L1);
  stack_init(L1, L);  /* init stack */
  lua_unlock(L);
  return L1;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %rbx
movq 0x18(%rdi), %rax
cmpq $0x0, 0x18(%rax)
jle 0x143aa
movq %rbx, %rdi
callq 0xd66d
xorl %r15d, %r15d
movl $0xd0, %edx
movq %rbx, %rdi
movl $0x8, %esi
xorl %ecx, %ecx
xorl %r8d, %r8d
callq 0xca0d
movq %rax, %r14
movq 0x10(%rbx), %rax
movq %r14, (%rax)
movl $0x48, 0x8(%rax)
addq $0x10, 0x10(%rbx)
movq 0x18(%rbx), %rax
movq %rax, 0x18(%r14)
movq %r15, 0x38(%r14)
movq %r15, 0x20(%r14)
movabsq $0x100000000, %rax      # imm = 0x100000000
movq %rax, 0x40(%r14)
xorps %xmm0, %xmm0
movups %xmm0, 0x70(%r14)
movups %xmm0, 0x58(%r14)
movw $0x100, 0x48(%r14)      # imm = 0x100
movq %r15, 0x4c(%r14)
movb $0x0, 0xa(%r14)
movb 0x48(%rbx), %al
movb %al, 0x48(%r14)
movl 0x4c(%rbx), %eax
movl %eax, 0x4c(%r14)
movq 0x58(%rbx), %rcx
movq %rcx, 0x58(%r14)
movl %eax, 0x50(%r14)
movq %r14, %rdi
movq %rbx, %rsi
callq 0x14443
movq %r14, %rax
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/bhk[P]tooltree/lua/../opensource/lua-5.2.3/src/lstate.c
// Function: freestack
static void freestack (lua_State *L) {
  if (L->stack == NULL)
    return;  /* stack not completely built yet */
  L->ci = &L->base_ci;  /* free the entire 'ci' list */
  luaE_freeCI(L);
  luaM_freearray(L, L->stack, L->stacksize);  /* free stack array */
}

// Assembly:
cmpq $0x0, 0x38(%rdi)
je 0x14531
pushq %rbx
movq %rdi, %rbx
leaq 0x80(%rdi), %rax
movq %rax, 0x20(%rdi)
callq 0x14350
movq 0x38(%rbx), %rsi
movslq 0x40(%rbx), %rdx
shlq $0x4, %rdx
movq %rbx, %rdi
xorl %ecx, %ecx
popq %rbx
jmp 0xfa40
retq
// File: /workspace/github_c_makefile_star2_O1/bhk[P]tooltree/lua/../opensource/lua-5.2.3/src/lstate.c
// Function: f_luaopen
static void f_luaopen (lua_State *L, void *ud) {
  global_State *g = G(L);
  UNUSED(ud);
  stack_init(L, L);  /* init stack */
  init_registry(L, g);
  luaS_resize(L, MINSTRTABSIZE);  /* initial size of string table */
  luaT_init(L);
  luaX_init(L);
  /* pre-create memory-error message */
  g->memerrmsg = luaS_newliteral(L, MEMERRMSG);
  luaS_fix(g->memerrmsg);  /* it should never be collected */
  g->gcrunning = 1;  /* allow gc */
  g->version = lua_version(NULL);
  luai_userstateopen(L);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x10, %rsp
movq %rdi, %rbx
movq 0x18(%rdi), %r12
movq %rdi, %rsi
callq 0x14443
movq %rbx, %rdi
callq 0x16fbc
movq %rax, %r14
movq %rax, 0x40(%r12)
movl $0x45, %ebp
movl %ebp, 0x48(%r12)
movq %rbx, %rdi
movq %rax, %rsi
movl $0x2, %edx
xorl %ecx, %ecx
callq 0x16b90
movq %rsp, %r15
movq %rbx, (%r15)
movl $0x48, 0x8(%r15)
movq %rbx, %rdi
movq %r14, %rsi
movl $0x1, %edx
movq %r15, %rcx
callq 0x16efb
movq %rbx, %rdi
callq 0x16fbc
movq %rax, (%r15)
movl %ebp, 0x8(%r15)
movq %rbx, %rdi
movq %r14, %rsi
movl $0x2, %edx
movq %r15, %rcx
callq 0x16efb
movq %rbx, %rdi
movl $0x20, %esi
callq 0x14944
movq %rbx, %rdi
callq 0x180f8
movq %rbx, %rdi
callq 0x1e46c
leaq 0xb866(%rip), %rsi      # 0x20025
movl $0x11, %edx
movq %rbx, %rdi
callq 0x14a3f
movq %rax, 0x118(%r12)
orb $0x20, 0x9(%rax)
movb $0x1, 0x57(%r12)
xorl %edi, %edi
callq 0x7649
movq %rax, 0x110(%r12)
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/bhk[P]tooltree/lua/../opensource/lua-5.2.3/src/lstring.c
// Function: luaS_eqlngstr
int luaS_eqlngstr (TString *a, TString *b) {
  size_t len = a->tsv.len;
  lua_assert(a->tsv.tt == LUA_TLNGSTR && b->tsv.tt == LUA_TLNGSTR);
  return (a == b) ||  /* same instance or... */
    ((len == b->tsv.len) &&  /* equal length and ... */
     (memcmp(getstr(a), getstr(b), len) == 0));  /* equal contents */
}

// Assembly:
cmpq %rsi, %rdi
je 0x148b9
movq 0x10(%rdi), %rdx
xorl %eax, %eax
cmpq 0x10(%rsi), %rdx
jne 0x148b8
pushq %rax
addq $0x18, %rdi
addq $0x18, %rsi
callq 0x63f0
movl %eax, %ecx
xorl %eax, %eax
testl %ecx, %ecx
sete %al
addq $0x8, %rsp
retq
movl $0x1, %eax
retq
// File: /workspace/github_c_makefile_star2_O1/bhk[P]tooltree/lua/../opensource/lua-5.2.3/src/lstring.c
// Function: luaS_hash
unsigned int luaS_hash (const char *str, size_t l, unsigned int seed) {
  unsigned int h = seed ^ cast(unsigned int, l);
  size_t l1;
  size_t step = (l >> LUAI_HASHLIMIT) + 1;
  for (l1 = l; l1 >= step; l1 -= step)
    h = h ^ ((h<<5) + (h>>2) + cast_byte(str[l1 - 1]));
  return h;
}

// Assembly:
movl %edx, %eax
xorl %esi, %eax
testq %rsi, %rsi
je 0x14943
movq %rsi, %rcx
shrq $0x5, %rcx
movq %rcx, %rdx
notq %rdx
movl %eax, %r8d
shll $0x5, %r8d
movl %eax, %r9d
shrl $0x2, %r9d
addl %r8d, %r9d
movzbl -0x1(%rdi,%rsi), %r8d
addl %r9d, %r8d
xorl %r8d, %eax
addq %rdx, %rsi
cmpq %rcx, %rsi
ja 0x1491e
retq
// File: /workspace/github_c_makefile_star2_O1/bhk[P]tooltree/lua/../opensource/lua-5.2.3/src/lstring.c
// Function: luaS_resize
void luaS_resize (lua_State *L, int newsize) {
  int i;
  stringtable *tb = &G(L)->strt;
  /* cannot resize while GC is traversing strings */
  luaC_runtilstate(L, ~bitmask(GCSsweepstring));
  if (newsize > tb->size) {
    luaM_reallocvector(L, tb->hash, tb->size, newsize, GCObject *);
    for (i = tb->size; i < newsize; i++) tb->hash[i] = NULL;
  }
  /* rehash */
  for (i=0; i<tb->size; i++) {
    GCObject *p = tb->hash[i];
    tb->hash[i] = NULL;
    while (p) {  /* for each node in the list */
      GCObject *next = gch(p)->next;  /* save next */
      unsigned int h = lmod(gco2ts(p)->hash, newsize);  /* new position */
      gch(p)->next = tb->hash[h];  /* chain it */
      tb->hash[h] = p;
      resetoldbit(p);  /* see MOVE OLD rule */
      p = next;
    }
  }
  if (newsize < tb->size) {
    /* shrinking slice must be empty */
    lua_assert(tb->hash[newsize] == NULL && tb->hash[tb->size - 1] == NULL);
    luaM_reallocvector(L, tb->hash, tb->size, newsize, GCObject *);
  }
  tb->size = newsize;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movl %esi, %ebx
movq %rdi, %r14
movq 0x18(%rdi), %r15
movl $0xfffffffb, %esi       # imm = 0xFFFFFFFB
callq 0xcb8b
movslq 0x3c(%r15), %rdx
cmpl %ebx, %edx
jge 0x149ab
cmpl $-0x2, %ebx
jle 0x14a37
movq 0x30(%r15), %rsi
shlq $0x3, %rdx
movslq %ebx, %r12
leaq (,%r12,8), %rcx
movq %r14, %rdi
callq 0xfa40
movq %rax, 0x30(%r15)
movslq 0x3c(%r15), %rax
cmpl %ebx, %eax
jge 0x149ab
movq 0x30(%r15), %rcx
movq $0x0, (%rcx,%rax,8)
incq %rax
cmpq %rax, %r12
jne 0x14997
movl 0x3c(%r15), %edx
testl %edx, %edx
jle 0x14a00
leal -0x1(%rbx), %eax
xorl %ecx, %ecx
movq 0x30(%r15), %rsi
movq (%rsi,%rcx,8), %rdx
movq $0x0, (%rsi,%rcx,8)
testq %rdx, %rdx
je 0x149f4
movq (%rdx), %rsi
movl 0xc(%rdx), %edi
andl %eax, %edi
movq 0x30(%r15), %r8
movq (%r8,%rdi,8), %r8
movq %r8, (%rdx)
movq 0x30(%r15), %r8
movq %rdx, (%r8,%rdi,8)
andb $-0x41, 0x9(%rdx)
movq %rsi, %rdx
testq %rsi, %rsi
jne 0x149cd
incq %rcx
movslq 0x3c(%r15), %rdx
cmpq %rdx, %rcx
jl 0x149b8
cmpl %ebx, %edx
jle 0x14a27
cmpl $-0x2, %ebx
jle 0x14a37
movq 0x30(%r15), %rsi
movslq %edx, %rdx
shlq $0x3, %rdx
movslq %ebx, %rcx
shlq $0x3, %rcx
movq %r14, %rdi
callq 0xfa40
movq %rax, 0x30(%r15)
movl %ebx, 0x3c(%r15)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
movq %r14, %rdi
callq 0xfa31
// File: /workspace/github_c_makefile_star2_O1/bhk[P]tooltree/lua/../opensource/lua-5.2.3/src/lstring.c
// Function: luaS_newlstr
TString *luaS_newlstr (lua_State *L, const char *str, size_t l) {
  if (l <= LUAI_MAXSHORTLEN)  /* short string? */
    return internshrstr(L, str, l);
  else {
    if (l + 1 > (MAX_SIZET - sizeof(TString))/sizeof(char))
      luaM_toobig(L);
    return createstrobj(L, str, l, LUA_TLNGSTR, G(L)->seed, NULL);
  }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rdx, %rbx
movq %rsi, %r14
cmpq $0x28, %rdx
ja 0x14b1d
movq 0x18(%rdi), %rax
movl 0x50(%rax), %ebp
xorl %ebx, %ebp
testq %rbx, %rbx
movq %rdi, 0x8(%rsp)
je 0x14aa2
movq %rbx, %rcx
shrq $0x5, %rcx
movq %rcx, %rdx
notq %rdx
movq %rbx, %rsi
movl %ebp, %edi
shll $0x5, %edi
movl %ebp, %r8d
shrl $0x2, %r8d
addl %edi, %r8d
movzbl -0x1(%r14,%rsi), %edi
addl %r8d, %edi
xorl %edi, %ebp
addq %rdx, %rsi
cmpq %rcx, %rsi
ja 0x14a80
movslq 0x3c(%rax), %r12
decq %r12
movslq %ebp, %rcx
movq %rcx, 0x10(%rsp)
andq %rcx, %r12
shlq $0x3, %r12
addq 0x30(%rax), %r12
movq (%r12), %r12
testq %r12, %r12
je 0x14b6f
movb $0x1, %r15b
cmpl 0xc(%r12), %ebp
jne 0x14b13
cmpq %rbx, 0x10(%r12)
jne 0x14b13
leaq 0x18(%r12), %rsi
movq %r14, %rdi
movq %rbx, %rdx
callq 0x63f0
testl %eax, %eax
jne 0x14b13
movb 0x9(%r12), %al
xorb $0x3, %al
movq 0x8(%rsp), %rcx
movq 0x18(%rcx), %rcx
movb 0x54(%rcx), %cl
xorb $0x3, %cl
testb %al, %cl
jne 0x14b0d
movb %al, 0x9(%r12)
xorl %r15d, %r15d
movq %r12, %r13
testb %r15b, %r15b
jne 0x14abc
jmp 0x14bf0
leaq 0x1b(%rbx), %rax
cmpq $0x19, %rax
jbe 0x14c02
movq 0x18(%rdi), %rax
movl 0x50(%rax), %ebp
leaq 0x19(%rbx), %rdx
xorl %r15d, %r15d
movl $0x14, %esi
xorl %ecx, %ecx
xorl %r8d, %r8d
callq 0xca0d
movq %rax, %r13
movq %rbx, 0x10(%rax)
movl %ebp, 0xc(%rax)
movb %r15b, 0xa(%rax)
leaq 0x18(%rax), %rdi
movq %r14, %rsi
movq %rbx, %rdx
callq 0x6360
movb %r15b, 0x18(%r13,%rbx)
jmp 0x14bf0
movq 0x8(%rsp), %r13
movq 0x18(%r13), %r12
movl 0x3c(%r12), %esi
cmpl %esi, 0x38(%r12)
setb %al
cmpl $0x3fffffff, %esi       # imm = 0x3FFFFFFF
setge %cl
orb %al, %cl
jne 0x14b9c
addl %esi, %esi
movq %r13, %rdi
callq 0x14944
movslq 0x3c(%r12), %rcx
decq %rcx
andq 0x10(%rsp), %rcx
shlq $0x3, %rcx
addq 0x30(%r12), %rcx
leaq 0x19(%rbx), %rdx
xorl %r15d, %r15d
movq %r13, %rdi
movl $0x4, %esi
xorl %r8d, %r8d
callq 0xca0d
movq %rax, %r13
movq %rbx, 0x10(%rax)
movl %ebp, 0xc(%rax)
movb %r15b, 0xa(%rax)
leaq 0x18(%rax), %rdi
movq %r14, %rsi
movq %rbx, %rdx
callq 0x6360
movb %r15b, 0x18(%r13,%rbx)
incl 0x38(%r12)
movq %r13, %rax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
callq 0xfa31
// File: /workspace/github_c_makefile_star2_O1/bhk[P]tooltree/lua/../opensource/lua-5.2.3/src/lstring.c
// Function: luaS_newudata
Udata *luaS_newudata (lua_State *L, size_t s, Table *e) {
  Udata *u;
  if (s > MAX_SIZET - sizeof(Udata))
    luaM_toobig(L);
  u = &luaC_newobj(L, LUA_TUSERDATA, sizeof(Udata) + s, NULL, 0)->u;
  u->uv.len = s;
  u->uv.metatable = NULL;
  u->uv.env = e;
  return u;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
cmpq $-0x2a, %rsi
jae 0x14c69
movq %rdx, %rbx
movq %rsi, %r14
leaq 0x28(%rsi), %rdx
movl $0x7, %esi
xorl %ecx, %ecx
xorl %r8d, %r8d
callq 0xca0d
movq %r14, 0x20(%rax)
movq $0x0, 0x10(%rax)
movq %rbx, 0x18(%rax)
addq $0x8, %rsp
popq %rbx
popq %r14
retq
callq 0xfa31
nop
// File: /workspace/github_c_makefile_star2_O1/bhk[P]tooltree/lua/../opensource/lua-5.2.3/src/lstrlib.c
// Function: str_byte
static int str_byte (lua_State *L) {
  size_t l;
  const char *s = luaL_checklstring(L, 1, &l);
  size_t posi = posrelat(luaL_optinteger(L, 2, 1), l);
  size_t pose = posrelat(luaL_optinteger(L, 3, posi), l);
  int n, i;
  if (posi < 1) posi = 1;
  if (pose > l) pose = l;
  if (posi > pose) return 0;  /* empty interval; return no values */
  n = (int)(pose -  posi + 1);
  if (posi + n <= pose)  /* (size_t -> int) overflow? */
    return luaL_error(L, "string slice too long");
  luaL_checkstack(L, n, "string slice too long");
  for (i=0; i<n; i++)
    lua_pushinteger(L, uchar(s[posi+i-1]));
  return n;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x10, %rsp
movq %rdi, %rbx
leaq 0x8(%rsp), %rdx
movl $0x1, %esi
callq 0x9559
movq %rax, %r14
movl $0x1, %edx
movq %rbx, %rdi
movl $0x2, %esi
callq 0x9769
movq %rax, %r15
testq %rax, %rax
jns 0x14d63
movq 0x8(%rsp), %rax
movq %r15, %rcx
negq %rcx
cmpq %rcx, %rax
jae 0x14d5d
xorl %r15d, %r15d
jmp 0x14d63
addq %rax, %r15
incq %r15
movq %rbx, %rdi
movl $0x3, %esi
movq %r15, %rdx
callq 0x9769
movq 0x8(%rsp), %rcx
testq %rax, %rax
jns 0x14d92
movq %rax, %rdx
negq %rdx
cmpq %rdx, %rcx
jae 0x14d8c
xorl %eax, %eax
jmp 0x14d92
addq %rcx, %rax
incq %rax
cmpq $0x1, %r15
adcq $0x0, %r15
cmpq %rcx, %rax
cmovbq %rax, %rcx
xorl %ebp, %ebp
cmpq %r15, %rcx
jb 0x14e18
movl %ecx, %r12d
subl %r15d, %r12d
leal 0x1(%r12), %ebp
movslq %ebp, %rax
addq %r15, %rax
cmpq %rcx, %rax
jbe 0x14e05
leaq 0xca6b(%rip), %rdx      # 0x21830
movq %rbx, %rdi
movl %ebp, %esi
callq 0x9593
cmpl $0x7ffffffe, %r12d      # imm = 0x7FFFFFFE
ja 0x14e18
addq %r15, %r14
decq %r14
cmpl $0x2, %ebp
movl $0x1, %r15d
cmovgel %ebp, %r15d
xorl %r12d, %r12d
movzbl (%r14,%r12), %esi
movq %rbx, %rdi
callq 0x7d87
incq %r12
cmpq %r12, %r15
jne 0x14dee
jmp 0x14e18
leaq 0xca24(%rip), %rsi      # 0x21830
movq %rbx, %rdi
xorl %eax, %eax
callq 0x9024
movl %eax, %ebp
movl %ebp, %eax
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/bhk[P]tooltree/lua/../opensource/lua-5.2.3/src/lstrlib.c
// Function: str_char
static int str_char (lua_State *L) {
  int n = lua_gettop(L);  /* number of arguments */
  int i;
  luaL_Buffer b;
  char *p = luaL_buffinitsize(L, &b, n);
  for (i=1; i<=n; i++) {
    int c = luaL_checkint(L, i);
    luaL_argcheck(L, uchar(c) == c, i, "value out of range");
    p[i - 1] = uchar(c);
  }
  luaL_pushresultsize(&b, n);
  return 1;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x2028, %rsp           # imm = 0x2028
movq %rdi, %rbx
callq 0x7683
movl %eax, %r15d
movslq %eax, %r14
leaq 0x8(%rsp), %rsi
movq %rbx, %rdi
movq %r14, %rdx
callq 0x99b7
movq %r14, (%rsp)
testl %r14d, %r14d
jle 0x14ea4
movq %rax, %r12
incl %r15d
movl $0x1, %r13d
leaq 0xc9d4(%rip), %rbp      # 0x21846
movq %rbx, %rdi
movl %r13d, %esi
callq 0x96d4
movq %rax, %r14
testl $0xffffff00, %r14d      # imm = 0xFFFFFF00
je 0x14e97
movq %rbx, %rdi
movl %r13d, %esi
movq %rbp, %rdx
callq 0x8f3e
movb %r14b, -0x1(%r12,%r13)
incq %r13
cmpq %r13, %r15
jne 0x14e72
leaq 0x8(%rsp), %rdi
movq (%rsp), %rsi
callq 0x990f
movl $0x1, %eax
addq $0x2028, %rsp           # imm = 0x2028
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/bhk[P]tooltree/lua/../opensource/lua-5.2.3/src/lstrlib.c
// Function: str_dump
static int str_dump (lua_State *L) {
  luaL_Buffer b;
  luaL_checktype(L, 1, LUA_TFUNCTION);
  lua_settop(L, 1);
  luaL_buffinit(L,&b);
  if (lua_dump(L, writer, &b) != 0)
    return luaL_error(L, "unable to dump given function");
  luaL_pushresult(&b);
  return 1;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x2020, %rsp           # imm = 0x2020
movq %rdi, %r14
movl $0x1, %ebx
movl $0x1, %esi
movl $0x6, %edx
callq 0x95e9
movq %r14, %rdi
movl $0x1, %esi
callq 0x7697
movq %rsp, %r15
movq %r14, %rdi
movq %r15, %rsi
callq 0x999b
leaq 0xe5d(%rip), %rsi       # 0x15d6b
movq %r14, %rdi
movq %r15, %rdx
callq 0x87fd
testl %eax, %eax
je 0x14f32
leaq 0xc935(%rip), %rsi      # 0x21859
movq %r14, %rdi
xorl %eax, %eax
callq 0x9024
movl %eax, %ebx
jmp 0x14f3a
movq %rsp, %rdi
callq 0x98d0
movl %ebx, %eax
addq $0x2020, %rsp           # imm = 0x2020
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/bhk[P]tooltree/lua/../opensource/lua-5.2.3/src/lstrlib.c
// Function: gmatch
static int gmatch (lua_State *L) {
  luaL_checkstring(L, 1);
  luaL_checkstring(L, 2);
  lua_settop(L, 2);
  lua_pushinteger(L, 0);
  lua_pushcclosure(L, gmatch_aux, 3);
  return 1;
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
movl $0x1, %esi
xorl %edx, %edx
callq 0x9559
movq %rbx, %rdi
movl $0x2, %esi
xorl %edx, %edx
callq 0x9559
movq %rbx, %rdi
movl $0x2, %esi
callq 0x7697
movq %rbx, %rdi
xorl %esi, %esi
callq 0x7d87
leaq 0x1388(%rip), %rsi      # 0x168ee
movq %rbx, %rdi
movl $0x3, %edx
callq 0x7f5d
movl $0x1, %eax
popq %rbx
retq