LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O2/bhk[P]tooltree/lua/../opensource/lua-5.2.3/src/lapi.c
// Function: lua_load
LUA_API int lua_load (lua_State *L, lua_Reader reader, void *data,
                      const char *chunkname, const char *mode) {
  ZIO z;
  int status;
  lua_lock(L);
  if (!chunkname) chunkname = "?";
  luaZ_init(L, &z, reader, data);
  status = luaD_protectedparser(L, &z, chunkname, mode);
  if (status == LUA_OK) {  /* no errors? */
    LClosure *f = clLvalue(L->top - 1);  /* get newly created function */
    if (f->nupvalues == 1) {  /* does it have one upvalue? */
      /* get global table from registry */
      Table *reg = hvalue(&G(L)->l_registry);
      const TValue *gt = luaH_getint(reg, LUA_RIDX_GLOBALS);
      /* set global table as 1st upvalue of 'f' (may be LUA_ENV) */
      setobj(L, f->upvals[0]->v, gt);
      luaC_barrier(L, f->upvals[0], gt);
    }
  }
  lua_unlock(L);
  return status;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x30, %rsp
movq %r8, %r14
movq %rdx, %rax
movq %rsi, %rdx
movq %rdi, %rbx
testq %rcx, %rcx
leaq 0x1633f(%rip), %r15     # 0x1e818
cmovneq %rcx, %r15
leaq 0x8(%rsp), %r12
movq %r12, %rsi
movq %rax, %rcx
callq 0x18e05
movq %rbx, %rdi
movq %r12, %rsi
movq %r15, %rdx
movq %r14, %rcx
callq 0xb862
movl %eax, %ebp
testl %eax, %eax
jne 0x8557
movq 0x10(%rbx), %rax
movq -0x10(%rax), %r14
cmpb $0x1, 0xa(%r14)
jne 0x8557
movq 0x18(%rbx), %rax
movq 0x40(%rax), %rdi
pushq $0x2
popq %rsi
callq 0x15e44
movq 0x20(%r14), %rcx
movq 0x10(%rcx), %rcx
movq (%rax), %rdx
movq %rdx, (%rcx)
movl 0x8(%rax), %edx
movl %edx, 0x8(%rcx)
testb $0x40, %dl
je 0x8557
movq (%rax), %rdx
testb $0x3, 0x9(%rdx)
je 0x8557
movq 0x20(%r14), %rsi
testb $0x4, 0x9(%rsi)
je 0x8557
movq %rbx, %rdi
callq 0xc0bc
movl %ebp, %eax
addq $0x30, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/bhk[P]tooltree/lua/../opensource/lua-5.2.3/src/lapi.c
// Function: lua_dump
LUA_API int lua_dump (lua_State *L, lua_Writer writer, void *data) {
  int status;
  TValue *o;
  lua_lock(L);
  api_checknelems(L, 1);
  o = L->top - 1;
  if (isLfunction(o))
    status = luaU_dump(L, getproto(o), writer, data, 0);
  else
    status = 1;
  lua_unlock(L);
  return status;
}

// Assembly:
movq 0x10(%rdi), %rax
cmpl $0x46, -0x8(%rax)
jne 0x8586
movq %rdx, %rcx
movq %rsi, %rdx
movq -0x10(%rax), %rax
movq 0x18(%rax), %rsi
xorl %r8d, %r8d
jmp 0xba78
pushq $0x1
popq %rax
retq
// File: /workspace/github_c_makefile_star2_O2/bhk[P]tooltree/lua/../opensource/lua-5.2.3/src/lapi.c
// Function: lua_newuserdata
LUA_API void *lua_newuserdata (lua_State *L, size_t size) {
  Udata *u;
  lua_lock(L);
  luaC_checkGC(L);
  u = luaS_newudata(L, size, NULL);
  setuvalue(L, L->top, u);
  api_incr_top(L);
  lua_unlock(L);
  return u + 1;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %rbx
movq 0x18(%rdi), %rax
cmpq $0x0, 0x18(%rax)
jle 0x87c0
movq %rbx, %rdi
callq 0xcd44
movq %rbx, %rdi
movq %r14, %rsi
xorl %edx, %edx
callq 0x13924
movq 0x10(%rbx), %rcx
movq %rax, (%rcx)
movl $0x47, 0x8(%rcx)
addq $0x10, 0x10(%rbx)
addq $0x28, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O2/bhk[P]tooltree/lua/../opensource/lua-5.2.3/src/lapi.c
// Function: aux_upvalue
static const char *aux_upvalue (StkId fi, int n, TValue **val,
                                GCObject **owner) {
  switch (ttype(fi)) {
    case LUA_TCCL: {  /* C closure */
      CClosure *f = clCvalue(fi);
      if (!(1 <= n && n <= f->nupvalues)) return NULL;
      *val = &f->upvalue[n-1];
      if (owner) *owner = obj2gco(f);
      return "";
    }
    case LUA_TLCL: {  /* Lua closure */
      LClosure *f = clLvalue(fi);
      TString *name;
      Proto *p = f->p;
      if (!(1 <= n && n <= p->sizeupvalues)) return NULL;
      *val = f->upvals[n-1]->v;
      if (owner) *owner = obj2gco(f->upvals[n - 1]);
      name = p->upvalues[n-1].name;
      return (name == NULL) ? "" : getstr(name);
    }
    default: return NULL;  /* not a closure */
  }
}

// Assembly:
movl 0x8(%rdi), %eax
andl $0x3f, %eax
cmpl $0x6, %eax
je 0x887e
cmpl $0x26, %eax
jne 0x888e
testl %esi, %esi
jle 0x888e
movq (%rdi), %rdi
movzbl 0xa(%rdi), %eax
cmpl %esi, %eax
jb 0x888e
decl %esi
shlq $0x4, %rsi
leaq (%rdi,%rsi), %rax
addq $0x20, %rax
movq %rax, (%rdx)
leaq 0x166b2(%rip), %rax     # 0x1ef27
testq %rcx, %rcx
je 0x88ca
movq %rdi, (%rcx)
retq
testl %esi, %esi
jle 0x888e
movq (%rdi), %rdi
movq 0x18(%rdi), %rax
cmpl %esi, 0x50(%rax)
jge 0x8891
xorl %eax, %eax
retq
decl %esi
movq 0x20(%rdi,%rsi,8), %r8
movq 0x10(%r8), %r8
movq %r8, (%rdx)
testq %rcx, %rcx
je 0x88ac
movq 0x20(%rdi,%rsi,8), %rdx
movq %rdx, (%rcx)
movq 0x38(%rax), %rax
shlq $0x4, %rsi
movq (%rax,%rsi), %rax
leaq 0x18(%rax), %rcx
testq %rax, %rax
leaq 0x16661(%rip), %rax     # 0x1ef27
cmovneq %rcx, %rax
retq
// File: /workspace/github_c_makefile_star2_O2/bhk[P]tooltree/lua/../opensource/lua-5.2.3/src/lapi.c
// Function: lua_setupvalue
LUA_API const char *lua_setupvalue (lua_State *L, int funcindex, int n) {
  const char *name;
  TValue *val = NULL;  /* to avoid warnings */
  GCObject *owner = NULL;  /* to avoid warnings */
  StkId fi;
  lua_lock(L);
  fi = index2addr(L, funcindex);
  api_checknelems(L, 1);
  name = aux_upvalue(fi, n, &val, &owner);
  if (name) {
    L->top--;
    setobj(L, val, L->top);
    luaC_barrier(L, owner, L->top);
  }
  lua_unlock(L);
  return name;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x18, %rsp
movl %edx, %ebp
movq %rdi, %rbx
leaq 0x10(%rsp), %r14
andq $0x0, (%r14)
leaq 0x8(%rsp), %r15
andq $0x0, (%r15)
callq 0x74b4
movq %rax, %rdi
movl %ebp, %esi
movq %r14, %rdx
movq %r15, %rcx
callq 0x883e
movq %rax, %r14
testq %rax, %rax
je 0x894d
movq 0x10(%rbx), %rax
leaq -0x10(%rax), %rcx
movq %rcx, 0x10(%rbx)
movq 0x10(%rsp), %rcx
movq -0x10(%rax), %rdx
movq %rdx, (%rcx)
movl -0x8(%rax), %eax
movl %eax, 0x8(%rcx)
movq 0x10(%rbx), %rax
testb $0x40, 0x8(%rax)
je 0x894d
movq (%rax), %rdx
testb $0x3, 0x9(%rdx)
je 0x894d
movq 0x8(%rsp), %rsi
testb $0x4, 0x9(%rsi)
je 0x894d
movq %rbx, %rdi
callq 0xc0bc
movq %r14, %rax
addq $0x18, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/bhk[P]tooltree/lua/../opensource/lua-5.2.3/src/lapi.c
// Function: lua_upvaluejoin
LUA_API void lua_upvaluejoin (lua_State *L, int fidx1, int n1,
                                            int fidx2, int n2) {
  LClosure *f1;
  UpVal **up1 = getupvalref(L, fidx1, n1, &f1);
  UpVal **up2 = getupvalref(L, fidx2, n2, NULL);
  *up1 = *up2;
  luaC_objbarrier(L, f1, *up2);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movl %r8d, %ebp
movl %ecx, %r14d
movq %rdi, %rbx
movq %rsp, %rcx
callq 0x89a8
movq %rax, %r15
movq %rbx, %rdi
movl %r14d, %esi
movl %ebp, %edx
xorl %ecx, %ecx
callq 0x89a8
movq (%rax), %rdx
movq %rdx, (%r15)
testb $0x3, 0x9(%rdx)
je 0x8a1c
movq (%rsp), %rsi
testb $0x4, 0x9(%rsi)
je 0x8a1c
movq %rbx, %rdi
callq 0xc0bc
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O2/bhk[P]tooltree/lua/../opensource/lua-5.2.3/src/lauxlib.c
// Function: luaL_argerror
LUALIB_API int luaL_argerror (lua_State *L, int narg, const char *extramsg) {
  lua_Debug ar;
  if (!lua_getstack(L, 0, &ar))  /* no stack frame? */
    return luaL_error(L, "bad argument #%d (%s)", narg, extramsg);
  lua_getinfo(L, "n", &ar);
  if (strcmp(ar.namewhat, "method") == 0) {
    narg--;  /* do not count `self' */
    if (narg == 0)  /* error is in the self argument itself? */
      return luaL_error(L, "calling " LUA_QS " on bad self (%s)",
                           ar.name, extramsg);
  }
  if (ar.name == NULL)
    ar.name = (pushglobalfuncname(L, &ar)) ? lua_tostring(L, -1) : "?";
  return luaL_error(L, "bad argument #%d to " LUA_QS " (%s)",
                        narg, ar.name, extramsg);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x88, %rsp
movq %rdx, %rbx
movl %esi, %ebp
movq %rdi, %r14
leaq 0x8(%rsp), %rdx
xorl %esi, %esi
callq 0xa176
testl %eax, %eax
je 0x8d05
leaq 0x16f65(%rip), %rsi     # 0x1fc15
leaq 0x8(%rsp), %r15
movq %r14, %rdi
movq %r15, %rdx
callq 0xa351
movq 0x10(%r15), %rdi
leaq 0x15b69(%rip), %rsi     # 0x1e834
callq 0x62d0
testl %eax, %eax
jne 0x8cd8
decl %ebp
je 0x8d1d
movq 0x10(%rsp), %rcx
testq %rcx, %rcx
jne 0x8d44
leaq 0x8(%rsp), %rsi
movq %r14, %rdi
callq 0x8e20
testl %eax, %eax
je 0x8d38
pushq $-0x1
popq %rsi
movq %r14, %rdi
xorl %edx, %edx
callq 0x7967
movq %rax, %rcx
jmp 0x8d3f
leaq 0x1572c(%rip), %rsi     # 0x1e438
movq %r14, %rdi
movl %ebp, %edx
movq %rbx, %rcx
xorl %eax, %eax
callq 0x8d68
jmp 0x8d5a
movq 0x10(%rsp), %rdx
leaq 0x15725(%rip), %rsi     # 0x1e44e
movq %r14, %rdi
movq %rbx, %rcx
xorl %eax, %eax
callq 0x8d68
jmp 0x8d5a
leaq 0x15ad9(%rip), %rcx     # 0x1e818
movq %rcx, 0x10(%rsp)
leaq 0x15721(%rip), %rsi     # 0x1e46c
movq %r14, %rdi
movl %ebp, %edx
movq %rbx, %r8
xorl %eax, %eax
callq 0x8d68
addq $0x88, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/bhk[P]tooltree/lua/../opensource/lua-5.2.3/src/lauxlib.c
// Function: pushglobalfuncname
static int pushglobalfuncname (lua_State *L, lua_Debug *ar) {
  int top = lua_gettop(L);
  lua_getinfo(L, "f", ar);  /* push function */
  lua_pushglobaltable(L);
  if (findfield(L, top + 1, 2)) {
    lua_copy(L, -1, top + 1);  /* move name to proper place */
    lua_pop(L, 2);  /* remove pushed values */
    return 1;
  }
  else {
    lua_settop(L, top);  /* remove function and global table */
    return 0;
  }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %r15
movq %rdi, %rbx
callq 0x7423
movl %eax, %r14d
leaq 0x15753(%rip), %rsi     # 0x1e58f
movq %rbx, %rdi
movq %r15, %rdx
callq 0xa351
pushq $0x2
popq %r15
movq %rbx, %rdi
movl $0xfff0b9d8, %esi       # imm = 0xFFF0B9D8
movl %r15d, %edx
callq 0x7e9f
leal 0x1(%r14), %ebp
movq %rbx, %rdi
movl %ebp, %esi
movl %r15d, %edx
callq 0xa048
testl %eax, %eax
je 0x8e86
pushq $-0x1
popq %rsi
movq %rbx, %rdi
movl %ebp, %edx
callq 0x75e5
pushq $0x1
popq %rbp
pushq $-0x3
popq %r14
jmp 0x8e88
xorl %ebp, %ebp
movq %rbx, %rdi
movl %r14d, %esi
callq 0x7437
movl %ebp, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/bhk[P]tooltree/lua/../opensource/lua-5.2.3/src/lauxlib.c
// Function: luaL_execresult
LUALIB_API int luaL_execresult (lua_State *L, int stat) {
  const char *what = "exit";  /* type of termination */
  if (stat == -1)  /* error? */
    return luaL_fileresult(L, 0, NULL);
  else {
    inspectstat(stat, what);  /* interpret result */
    if (*what == 'e' && stat == 0)  /* successful termination? */
      lua_pushboolean(L, 1);
    else
      lua_pushnil(L);
    lua_pushstring(L, what);
    lua_pushinteger(L, stat);
    return 3;  /* return true/nil,what,code */
  }
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %r15
cmpl $-0x1, %esi
je 0x8fca
movl %esi, %ebx
movl %esi, %eax
andl $0x7f, %eax
je 0x8fdb
movl %eax, %ecx
shll $0x18, %ecx
addl $0x1000000, %ecx        # imm = 0x1000000
cmpl $0x2000000, %ecx        # imm = 0x2000000
cmovgel %eax, %ebx
leaq 0x154dd(%rip), %rax     # 0x1e49a
leaq 0x154d1(%rip), %r14     # 0x1e495
cmovgeq %rax, %r14
jmp 0x8fe5
movq %r15, %rdi
xorl %esi, %esi
xorl %edx, %edx
popq %rbx
popq %r14
popq %r15
jmp 0x8f0e
movzbl %bh, %ebx
leaq 0x154b0(%rip), %r14     # 0x1e495
testl %ebx, %ebx
jne 0x8ffc
cmpb $0x65, (%r14)
jne 0x8ffc
pushq $0x1
popq %rsi
movq %r15, %rdi
callq 0x7d3d
jmp 0x9004
movq %r15, %rdi
callq 0x7acb
movq %r15, %rdi
movq %r14, %rsi
callq 0x7b76
movslq %ebx, %rsi
movq %r15, %rdi
callq 0x7af1
pushq $0x3
popq %rax
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/bhk[P]tooltree/lua/../opensource/lua-5.2.3/src/lauxlib.c
// Function: luaL_newmetatable
LUALIB_API int luaL_newmetatable (lua_State *L, const char *tname) {
  luaL_getmetatable(L, tname);  /* try to get metatable */
  if (!lua_isnil(L, -1))  /* name already in use? */
    return 0;  /* leave previous value on top, but return 0 */
  lua_pop(L, 1);
  lua_newtable(L);  /* create metatable */
  lua_pushvalue(L, -1);
  lua_setfield(L, LUA_REGISTRYINDEX, tname);  /* registry.name = metatable */
  return 1;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
movl $0xfff0b9d8, %esi       # imm = 0xFFF0B9D8
movq %rbx, %rdx
callq 0x7e19
pushq $-0x1
popq %rsi
movq %r14, %rdi
callq 0x7624
movl %eax, %ecx
xorl %eax, %eax
testl %ecx, %ecx
jne 0x9082
pushq $-0x2
popq %rsi
movq %r14, %rdi
callq 0x7437
movq %r14, %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x7f1a
pushq $-0x1
popq %rsi
movq %r14, %rdi
callq 0x7604
movq %r14, %rdi
movl $0xfff0b9d8, %esi       # imm = 0xFFF0B9D8
movq %rbx, %rdx
callq 0x809d
pushq $0x1
popq %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O2/bhk[P]tooltree/lua/../opensource/lua-5.2.3/src/lauxlib.c
// Function: luaL_checkoption
LUALIB_API int luaL_checkoption (lua_State *L, int narg, const char *def,
                                 const char *const lst[]) {
  const char *name = (def) ? luaL_optstring(L, narg, def) :
                             luaL_checkstring(L, narg);
  int i;
  for (i=0; lst[i]; i++)
    if (strcmp(lst[i], name) == 0)
      return i;
  return luaL_argerror(L, narg,
                       lua_pushfstring(L, "invalid option " LUA_QS, name));
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %rcx, %r15
movl %esi, %ebx
movq %rdi, %r14
testq %rdx, %rdx
je 0x91ad
xorl %ecx, %ecx
callq 0x920b
jmp 0x91b4
xorl %edx, %edx
callq 0x9264
movq %rax, %r12
xorl %r13d, %r13d
movq (%r15,%r13,8), %rdi
testq %rdi, %rdi
je 0x91d4
movq %r12, %rsi
callq 0x62d0
testl %eax, %eax
je 0x91fe
incq %r13
jmp 0x91ba
leaq 0x152c6(%rip), %rsi     # 0x1e4a1
movq %r14, %rdi
movq %r12, %rdx
xorl %eax, %eax
callq 0x7c0d
movq %r14, %rdi
movl %ebx, %esi
movq %rax, %rdx
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
jmp 0x8c84
movl %r13d, %eax
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/bhk[P]tooltree/lua/../opensource/lua-5.2.3/src/lauxlib.c
// Function: luaL_optlstring
LUALIB_API const char *luaL_optlstring (lua_State *L, int narg,
                                        const char *def, size_t *len) {
  if (lua_isnoneornil(L, narg)) {
    if (len)
      *len = (def ? strlen(def) : 0);
    return def;
  }
  else return luaL_checklstring(L, narg, len);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rcx, %rbx
movq %rdx, %r14
movl %esi, %ebp
movq %rdi, %r15
callq 0x7624
testl %eax, %eax
jle 0x923d
movq %r15, %rdi
movl %ebp, %esi
movq %rbx, %rdx
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0x9264
testq %rbx, %rbx
je 0x9256
testq %r14, %r14
je 0x9251
movq %r14, %rdi
callq 0x6170
jmp 0x9253
xorl %eax, %eax
movq %rax, (%rbx)
movq %r14, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/bhk[P]tooltree/lua/../opensource/lua-5.2.3/src/lauxlib.c
// Function: luaL_checkstack
LUALIB_API void luaL_checkstack (lua_State *L, int space, const char *msg) {
  /* keep some extra space to run error routines, if needed */
  const int extra = LUA_MINSTACK;
  if (!lua_checkstack(L, space + extra)) {
    if (msg)
      luaL_error(L, "stack overflow (%s)", msg);
    else
      luaL_error(L, "stack overflow");
  }
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdx, %r14
movq %rdi, %rbx
addl $0x14, %esi
callq 0x7300
testl %eax, %eax
je 0x92af
addq $0x8, %rsp
popq %rbx
popq %r14
retq
testq %r14, %r14
je 0x92cf
leaq 0x151fa(%rip), %rsi     # 0x1e4b5
movq %rbx, %rdi
movq %r14, %rdx
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x8d68
leaq 0x1558c(%rip), %rsi     # 0x1e862
movq %rbx, %rdi
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x8d68
// File: /workspace/github_c_makefile_star2_O2/bhk[P]tooltree/lua/../opensource/lua-5.2.3/src/lauxlib.c
// Function: luaL_checknumber
LUALIB_API lua_Number luaL_checknumber (lua_State *L, int narg) {
  int isnum;
  lua_Number d = lua_tonumberx(L, narg, &isnum);
  if (!isnum)
    tag_error(L, narg, LUA_TNUMBER);
  return d;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x10, %rsp
movl %esi, %ebx
movq %rdi, %r14
leaq 0xc(%rsp), %r15
movq %r15, %rdx
callq 0x785f
cmpl $0x0, (%r15)
jne 0x939c
pushq $0x3
popq %rdx
movq %r14, %rdi
movl %ebx, %esi
movsd %xmm0, (%rsp)
callq 0x930d
movsd (%rsp), %xmm0
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/bhk[P]tooltree/lua/../opensource/lua-5.2.3/src/lauxlib.c
// Function: luaL_checkinteger
LUALIB_API lua_Integer luaL_checkinteger (lua_State *L, int narg) {
  int isnum;
  lua_Integer d = lua_tointegerx(L, narg, &isnum);
  if (!isnum)
    tag_error(L, narg, LUA_TNUMBER);
  return d;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movl %esi, %ebx
movq %rdi, %r14
leaq 0x4(%rsp), %r12
movq %r12, %rdx
callq 0x78a4
movq %rax, %r15
cmpl $0x0, (%r12)
jne 0x940c
pushq $0x3
popq %rdx
movq %r14, %rdi
movl %ebx, %esi
callq 0x930d
movq %r15, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/bhk[P]tooltree/lua/../opensource/lua-5.2.3/src/lauxlib.c
// Function: luaL_checkunsigned
LUALIB_API lua_Unsigned luaL_checkunsigned (lua_State *L, int narg) {
  int isnum;
  lua_Unsigned d = lua_tounsignedx(L, narg, &isnum);
  if (!isnum)
    tag_error(L, narg, LUA_TNUMBER);
  return d;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movl %esi, %ebx
movq %rdi, %r14
leaq 0x4(%rsp), %r15
movq %r15, %rdx
callq 0x78ea
movl %eax, %ebp
cmpl $0x0, (%r15)
jne 0x9449
pushq $0x3
popq %rdx
movq %r14, %rdi
movl %ebx, %esi
callq 0x930d
movl %ebp, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/bhk[P]tooltree/lua/../opensource/lua-5.2.3/src/lauxlib.c
// Function: luaL_prepbuffsize
LUALIB_API char *luaL_prepbuffsize (luaL_Buffer *B, size_t sz) {
  lua_State *L = B->L;
  if (B->size - B->n < sz) {  /* not enough space? */
    char *newbuff;
    size_t newsize = B->size * 2;  /* double buffer size */
    if (newsize - B->n < sz)  /* not big enough? */
      newsize = B->n + sz;
    if (newsize < B->n || newsize - B->n < sz)
      luaL_error(L, "buffer too large");
    /* create larger buffer */
    newbuff = (char *)lua_newuserdata(L, newsize * sizeof(char));
    /* move content to new buffer */
    memcpy(newbuff, B->b, B->n * sizeof(char));
    if (buffonstack(B))
      lua_remove(L, -2);  /* remove old buffer */
    B->b = newbuff;
    B->size = newsize;
  }
  return &B->b[B->n];
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq 0x8(%rdi), %rcx
movq 0x10(%rdi), %rax
movq %rcx, %rdx
subq %rax, %rdx
cmpq %rsi, %rdx
jae 0x9547
addq %rcx, %rcx
movq %rcx, %rdx
subq %rax, %rdx
leaq (%rax,%rsi), %r14
cmpq %rsi, %rdx
cmovaeq %rcx, %r14
movq 0x18(%rbx), %r15
movq %r14, %rcx
subq %rax, %rcx
setb %al
notb %al
cmpq %rsi, %rcx
setae %cl
testb %cl, %al
jne 0x9509
leaq 0x14fd9(%rip), %rsi     # 0x1e4d8
movq %r15, %rdi
xorl %eax, %eax
callq 0x8d68
movq %r15, %rdi
movq %r14, %rsi
callq 0x87a3
movq %rax, %r12
movq (%rbx), %rsi
movq 0x10(%rbx), %rdx
movq %rax, %rdi
callq 0x6350
leaq 0x20(%rbx), %rax
cmpq %rax, (%rbx)
je 0x953a
pushq $-0x2
popq %rsi
movq %r15, %rdi
callq 0x7485
movq %r12, (%rbx)
movq %r14, 0x8(%rbx)
movq 0x10(%rbx), %rax
jmp 0x954a
movq (%rbx), %r12
addq %r12, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/bhk[P]tooltree/lua/../opensource/lua-5.2.3/src/lauxlib.c
// Function: luaL_pushresult
LUALIB_API void luaL_pushresult (luaL_Buffer *B) {
  lua_State *L = B->L;
  lua_pushlstring(L, B->b, B->n);
  if (buffonstack(B))
    lua_remove(L, -2);  /* remove old buffer */
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %r14
movq 0x18(%rdi), %rbx
movq (%rdi), %rsi
movq 0x10(%rdi), %rdx
movq %rbx, %rdi
callq 0x7b27
leaq 0x20(%r14), %rax
cmpq %rax, (%r14)
je 0x95e3
pushq $-0x2
popq %rsi
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x7485
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O2/bhk[P]tooltree/lua/../opensource/lua-5.2.3/src/lauxlib.c
// Function: luaL_getmetafield
LUALIB_API int luaL_getmetafield (lua_State *L, int obj, const char *event) {
  if (!lua_getmetatable(L, obj))  /* no metatable? */
    return 0;
  lua_pushstring(L, event);
  lua_rawget(L, -2);
  if (lua_isnil(L, -1)) {
    lua_pop(L, 2);  /* remove metatable and metafield */
    return 0;
  }
  else {
    lua_remove(L, -2);  /* remove only metatable */
    return 1;
  }
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdx, %r15
movq %rdi, %r14
callq 0x7f79
xorl %ebx, %ebx
testl %eax, %eax
je 0x9b1d
movq %r14, %rdi
movq %r15, %rsi
callq 0x7b76
pushq $-0x2
popq %rsi
movq %r14, %rdi
callq 0x7e73
pushq $-0x1
popq %rsi
movq %r14, %rdi
callq 0x7624
testl %eax, %eax
je 0x9b12
pushq $-0x2
popq %rsi
movq %r14, %rdi
callq 0x7485
pushq $0x1
popq %rbx
jmp 0x9b1d
pushq $-0x3
popq %rsi
movq %r14, %rdi
callq 0x7437
movl %ebx, %eax
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/bhk[P]tooltree/lua/../opensource/lua-5.2.3/src/lauxlib.c
// Function: luaL_callmeta
LUALIB_API int luaL_callmeta (lua_State *L, int obj, const char *event) {
  obj = lua_absindex(L, obj);
  if (!luaL_getmetafield(L, obj, event))  /* no metafield? */
    return 0;
  lua_pushvalue(L, obj);
  lua_call(L, 1, 1);
  return 1;
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movq %rdx, %r14
movq %rdi, %rbx
callq 0x7402
movl %eax, %ebp
movq %rbx, %rdi
movl %eax, %esi
movq %r14, %rdx
callq 0x9ac7
testl %eax, %eax
je 0x9b67
movq %rbx, %rdi
movl %ebp, %esi
callq 0x7604
pushq $0x1
popq %rbp
movq %rbx, %rdi
movl %ebp, %esi
movl %ebp, %edx
xorl %ecx, %ecx
xorl %r8d, %r8d
callq 0x835f
jmp 0x9b69
xorl %ebp, %ebp
movl %ebp, %eax
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/bhk[P]tooltree/lua/../opensource/lua-5.2.3/src/lauxlib.c
// Function: luaL_len
LUALIB_API int luaL_len (lua_State *L, int idx) {
  int l;
  int isnum;
  lua_len(L, idx);
  l = (int)lua_tointegerx(L, -1, &isnum);
  if (!isnum)
    luaL_error(L, "object length is not a number");
  lua_pop(L, 1);  /* remove object */
  return l;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq %rdi, %rbx
callq 0x8760
pushq $-0x1
popq %rsi
leaq 0xc(%rsp), %r15
movq %rbx, %rdi
movq %r15, %rdx
callq 0x78a4
movq %rax, %r14
cmpl $0x0, (%r15)
jne 0x9bae
leaq 0x14953(%rip), %rsi     # 0x1e4f7
movq %rbx, %rdi
xorl %eax, %eax
callq 0x8d68
pushq $-0x2
popq %rsi
movq %rbx, %rdi
callq 0x7437
movl %r14d, %eax
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/bhk[P]tooltree/lua/../opensource/lua-5.2.3/src/lauxlib.c
// Function: luaL_checkversion_
LUALIB_API void luaL_checkversion_ (lua_State *L, lua_Number ver) {
  const lua_Number *v = lua_version(L);
  if (v != lua_version(NULL))
    luaL_error(L, "multiple Lua VMs detected");
  else if (*v != ver)
    luaL_error(L, "version mismatch: app. needs %f, Lua core provides %f",
                  ver, *v);
  /* check conversions number -> integer types */
  lua_pushnumber(L, -(lua_Number)0x1234);
  if (lua_tointeger(L, -1) != -0x1234 ||
      lua_tounsigned(L, -1) != (lua_Unsigned)-0x1234)
    luaL_error(L, "bad conversion number->int;"
                  " must recompile Lua with proper settings");
  lua_pop(L, 1);
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movsd %xmm0, (%rsp)
movq %rdi, %rbx
callq 0x73e9
movq %rax, %r14
xorl %edi, %edi
callq 0x73e9
cmpq %rax, %r14
je 0x9d76
leaq 0x147d7(%rip), %rsi     # 0x1e541
movq %rbx, %rdi
xorl %eax, %eax
callq 0x8d68
jmp 0x9d99
movsd (%r14), %xmm1
movsd (%rsp), %xmm0
ucomisd %xmm0, %xmm1
jne 0x9d88
jnp 0x9d99
leaq 0x147cc(%rip), %rsi     # 0x1e55b
movq %rbx, %rdi
movb $0x2, %al
callq 0x8d68
movsd 0x1464f(%rip), %xmm0    # 0x1e3f0
movq %rbx, %rdi
callq 0x7adc
pushq $-0x1
popq %rsi
movq %rbx, %rdi
xorl %edx, %edx
callq 0x78a4
cmpq $-0x1234, %rax          # imm = 0xEDCC
jne 0x9dd2
pushq $-0x1
popq %rsi
movq %rbx, %rdi
xorl %edx, %edx
callq 0x78ea
cmpl $0xffffedcc, %eax       # imm = 0xFFFFEDCC
je 0x9de3
leaq 0x147b8(%rip), %rsi     # 0x1e591
movq %rbx, %rdi
xorl %eax, %eax
callq 0x8d68
pushq $-0x2
popq %rsi
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x7437
// File: /workspace/github_c_makefile_star2_O2/bhk[P]tooltree/lua/../opensource/lua-5.2.3/src/lauxlib.c
// Function: luaL_getsubtable
LUALIB_API int luaL_getsubtable (lua_State *L, int idx, const char *fname) {
  lua_getfield(L, idx, fname);
  if (lua_istable(L, -1)) return 1;  /* table already there */
  else {
    lua_pop(L, 1);  /* remove previous result */
    idx = lua_absindex(L, idx);
    lua_newtable(L);
    lua_pushvalue(L, -1);  /* copy to be left at top */
    lua_setfield(L, idx, fname);  /* assign new table to field */
    return 0;  /* false, because did not find table there */
  }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdx, %rbx
movl %esi, %ebp
movq %rdi, %r14
callq 0x7e19
pushq $-0x1
popq %rsi
movq %r14, %rdi
callq 0x7624
cmpl $0x5, %eax
jne 0x9e1e
pushq $0x1
popq %rbp
jmp 0x9e5d
pushq $-0x2
popq %rsi
movq %r14, %rdi
callq 0x7437
movq %r14, %rdi
movl %ebp, %esi
callq 0x7402
movl %eax, %r15d
xorl %ebp, %ebp
movq %r14, %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x7f1a
pushq $-0x1
popq %rsi
movq %r14, %rdi
callq 0x7604
movq %r14, %rdi
movl %r15d, %esi
movq %rbx, %rdx
callq 0x809d
movl %ebp, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/bhk[P]tooltree/lua/../opensource/lua-5.2.3/src/lauxlib.c
// Function: luaL_requiref
LUALIB_API void luaL_requiref (lua_State *L, const char *modname,
                               lua_CFunction openf, int glb) {
  lua_pushcfunction(L, openf);
  lua_pushstring(L, modname);  /* argument to open function */
  lua_call(L, 1, 1);  /* open module */
  luaL_getsubtable(L, LUA_REGISTRYINDEX, "_LOADED");
  lua_pushvalue(L, -2);  /* make copy of module (call result) */
  lua_setfield(L, -2, modname);  /* _LOADED[modname] = module */
  lua_pop(L, 1);  /* remove _LOADED table */
  if (glb) {
    lua_pushvalue(L, -1);  /* copy of 'mod' */
    lua_setglobal(L, modname);  /* _G[modname] = module */
  }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movl %ecx, %ebp
movq %rsi, %rbx
movq %rdi, %r14
movq %rdx, %rsi
xorl %edx, %edx
callq 0x7cba
movq %r14, %rdi
movq %rbx, %rsi
callq 0x7b76
pushq $0x1
popq %rdx
movq %r14, %rdi
movl %edx, %esi
xorl %ecx, %ecx
xorl %r8d, %r8d
callq 0x835f
leaq 0x14692(%rip), %rdx     # 0x1e539
movq %r14, %rdi
movl $0xfff0b9d8, %esi       # imm = 0xFFF0B9D8
callq 0x9df5
pushq $-0x2
popq %r15
movq %r14, %rdi
movl %r15d, %esi
callq 0x7604
movq %r14, %rdi
movl %r15d, %esi
movq %rbx, %rdx
callq 0x809d
movq %r14, %rdi
movl %r15d, %esi
callq 0x7437
testl %ebp, %ebp
je 0x9f00
pushq $-0x1
popq %rsi
movq %r14, %rdi
callq 0x7604
movq %r14, %rdi
movq %rbx, %rsi
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0x8005
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/bhk[P]tooltree/lua/../opensource/lua-5.2.3/src/ldebug.c
// Function: lua_setlocal
LUA_API const char *lua_setlocal (lua_State *L, const lua_Debug *ar, int n) {
  StkId pos = 0;  /* to avoid warnings */
  const char *name = findlocal(L, ar->i_ci, n, &pos);
  lua_lock(L);
  if (name)
    setobjs2s(L, pos, L->top - 1);
  L->top--;  /* pop value */
  lua_unlock(L);
  return name;
}

// Assembly:
pushq %rbx
subq $0x10, %rsp
movq %rdi, %rbx
leaq 0x8(%rsp), %rcx
andq $0x0, (%rcx)
movq 0x78(%rsi), %rsi
callq 0xa227
testq %rax, %rax
je 0xa346
movq 0x10(%rbx), %rcx
movq 0x8(%rsp), %rdx
movq -0x10(%rcx), %rsi
movq %rsi, (%rdx)
movl -0x8(%rcx), %ecx
movl %ecx, 0x8(%rdx)
addq $-0x10, 0x10(%rbx)
addq $0x10, %rsp
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O2/bhk[P]tooltree/lua/../opensource/lua-5.2.3/src/ldebug.c
// Function: luaG_typeerror
l_noret luaG_typeerror (lua_State *L, const TValue *o, const char *op) {
  CallInfo *ci = L->ci;
  const char *name = NULL;
  const char *t = objtypename(o);
  const char *kind = NULL;
  if (isLua(ci)) {
    kind = getupvalname(ci, o, &name);  /* check whether 'o' is an upvalue */
    if (!kind && isinstack(ci, o))  /* no? try a register */
      kind = getobjname(ci_func(ci)->p, currentpc(ci),
                        cast_int(o - ci->u.l.base), &name);
  }
  if (kind)
    luaG_runerror(L, "attempt to %s %s " LUA_QS " (a %s value)",
                op, kind, name, t);
  else
    luaG_runerror(L, "attempt to %s a %s value", op, t);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %r14
movq 0x20(%rdi), %rdi
andq $0x0, (%rsp)
movq %rdx, %rbx
movl 0x8(%rsi), %eax
andl $0xf, %eax
leaq 0x2215c(%rip), %rcx     # 0x2c840
movq 0x8(%rcx,%rax,8), %r15
testb $0x1, 0x22(%rdi)
jne 0xa706
leaq 0x14089(%rip), %rsi     # 0x1e77f
movq %r14, %rdi
movq %rbx, %rdx
movq %r15, %rcx
xorl %eax, %eax
callq 0xaa89
movq %rsi, %r12
movq (%rdi), %rax
movq (%rax), %rax
movzbl 0xa(%rax), %ecx
shll $0x3, %ecx
xorl %edx, %edx
cmpq %rdx, %rcx
je 0xa72e
movq 0x20(%rax,%rdx), %rsi
cmpq %r12, 0x10(%rsi)
je 0xa778
addq $0x8, %rdx
jmp 0xa718
movq 0x8(%rdi), %rcx
movq 0x30(%rdi), %rbp
movq %rbp, %rdx
cmpq %rcx, %rdx
jae 0xa6ef
leaq 0x10(%rdx), %rsi
cmpq %r12, %rdx
movq %rsi, %rdx
jne 0xa739
movq 0x18(%rax), %r13
callq 0xaa70
subq %rbp, %r12
shrq $0x4, %r12
movq %rsp, %rcx
movq %r13, %rdi
movl %eax, %esi
movl %r12d, %edx
callq 0xa7b4
testq %rax, %rax
je 0xa6ef
movq %rax, %rcx
movq (%rsp), %r8
jmp 0xa79d
movq 0x18(%rax), %rax
movq 0x38(%rax), %rax
movq (%rax,%rdx,2), %rax
leaq 0x18(%rax), %rcx
testq %rax, %rax
leaq 0x14086(%rip), %r8      # 0x1e818
cmovneq %rcx, %r8
leaq 0x15da9(%rip), %rcx     # 0x20546
leaq 0x13fb8(%rip), %rsi     # 0x1e75c
movq %r14, %rdi
movq %rbx, %rdx
movq %r15, %r9
xorl %eax, %eax
callq 0xaa89
// File: /workspace/github_c_makefile_star2_O2/bhk[P]tooltree/lua/../opensource/lua-5.2.3/src/ldebug.c
// Function: luaG_runerror
l_noret luaG_runerror (lua_State *L, const char *fmt, ...) {
  va_list argp;
  va_start(argp, fmt);
  addinfo(L, luaO_pushvfstring(L, fmt, argp));
  va_end(argp);
  luaG_errormsg(L);
}

// Assembly:
pushq %rbx
subq $0xd0, %rsp
movq %rdi, %rbx
leaq 0x20(%rsp), %rdi
movq %rdx, 0x10(%rdi)
movq %rcx, 0x18(%rdi)
movq %r8, 0x20(%rdi)
movq %r9, 0x28(%rdi)
testb %al, %al
je 0xaae4
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 $0x3000000010, %rax     # imm = 0x3000000010
movq %rax, (%rdx)
movq %rbx, %rdi
callq 0xfce6
movq %rbx, %rdi
movq %rax, %rsi
callq 0xac27
movq %rbx, %rdi
callq 0xabba
// File: /workspace/github_c_makefile_star2_O2/bhk[P]tooltree/lua/../opensource/lua-5.2.3/src/ldebug.c
// Function: luaG_ordererror
l_noret luaG_ordererror (lua_State *L, const TValue *p1, const TValue *p2) {
  const char *t1 = objtypename(p1);
  const char *t2 = objtypename(p2);
  if (t1 == t2)
    luaG_runerror(L, "attempt to compare two %s values", t1);
  else
    luaG_runerror(L, "attempt to compare %s with %s", t1, t2);
}

// Assembly:
pushq %rax
movq %rdx, %rax
movl 0x8(%rsi), %ecx
andl $0xf, %ecx
leaq 0x21cb7(%rip), %rsi     # 0x2c840
movq 0x8(%rsi,%rcx,8), %rdx
movl 0x8(%rax), %eax
andl $0xf, %eax
movq 0x8(%rsi,%rax,8), %rcx
cmpq %rcx, %rdx
jne 0xabac
leaq 0x13c15(%rip), %rsi     # 0x1e7ba
xorl %eax, %eax
callq 0xaa89
leaq 0x13c28(%rip), %rsi     # 0x1e7db
xorl %eax, %eax
callq 0xaa89
// File: /workspace/github_c_makefile_star2_O2/bhk[P]tooltree/lua/../opensource/lua-5.2.3/src/ldebug.c
// Function: luaG_errormsg
l_noret luaG_errormsg (lua_State *L) {
  if (L->errfunc != 0) {  /* is there an error handling function? */
    StkId errfunc = restorestack(L, L->errfunc);
    if (!ttisfunction(errfunc)) luaD_throw(L, LUA_ERRERR);
    setobjs2s(L, L->top, L->top - 1);  /* move argument */
    setobjs2s(L, L->top - 1, errfunc);  /* push function */
    L->top++;
    luaD_call(L, L->top - 2, 1, 0);  /* call it */
  }
  luaD_throw(L, LUA_ERRRUN);
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
movq 0x78(%rdi), %rax
testq %rax, %rax
je 0xac18
movq 0x38(%rbx), %rcx
movl 0x8(%rcx,%rax), %edx
andl $0xf, %edx
cmpl $0x6, %edx
jne 0xac1c
movq 0x10(%rbx), %rdx
movq -0x10(%rdx), %rsi
movq %rsi, (%rdx)
movl -0x8(%rdx), %esi
movl %esi, 0x8(%rdx)
movq 0x10(%rbx), %rdx
movq (%rcx,%rax), %rsi
movq %rsi, -0x10(%rdx)
movl 0x8(%rcx,%rax), %eax
movl %eax, -0x8(%rdx)
movq 0x10(%rbx), %rsi
leaq 0x10(%rsi), %rax
movq %rax, 0x10(%rbx)
addq $-0x10, %rsi
pushq $0x1
popq %rdx
movq %rbx, %rdi
xorl %ecx, %ecx
callq 0xb418
pushq $0x2
jmp 0xac1e
pushq $0x6
popq %rsi
movq %rbx, %rdi
callq 0xad18
// File: /workspace/github_c_makefile_star2_O2/bhk[P]tooltree/lua/../opensource/lua-5.2.3/src/ldebug.c
// Function: addinfo
static void addinfo (lua_State *L, const char *msg) {
  CallInfo *ci = L->ci;
  if (isLua(ci)) {  /* is Lua code? */
    char buff[LUA_IDSIZE];  /* add file:line information */
    int line = currentline(ci);
    TString *src = ci_func(ci)->p->source;
    if (src)
      luaO_chunkid(buff, getstr(src), LUA_IDSIZE);
    else {  /* no source available; use "?" instead */
      buff[0] = '?'; buff[1] = '\0';
    }
    luaO_pushfstring(L, "%s:%d: %s", buff, line, msg);
  }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x48, %rsp
movq 0x20(%rdi), %r15
testb $0x1, 0x22(%r15)
je 0xac8f
movq %rsi, %rbx
movq %rdi, %r14
movq %r15, %rdi
callq 0xac9a
movl %eax, %ebp
movq (%r15), %rax
movq (%rax), %rax
movq 0x18(%rax), %rax
movq 0x48(%rax), %rsi
testq %rsi, %rsi
je 0xac70
addq $0x18, %rsi
movq %rsp, %rdi
pushq $0x3c
popq %rdx
callq 0xfffd
jmp 0xac76
movw $0x3f, (%rsp)
leaq 0x13bd9(%rip), %rsi     # 0x1e856
movq %rsp, %rdx
movq %r14, %rdi
movl %ebp, %ecx
movq %rbx, %r8
xorl %eax, %eax
callq 0xff79
addq $0x48, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/bhk[P]tooltree/lua/../opensource/lua-5.2.3/src/ldo.c
// Function: luaD_throw
l_noret luaD_throw (lua_State *L, int errcode) {
  if (L->errorJmp) {  /* thread has an error handler? */
    L->errorJmp->status = errcode;  /* set status */
    LUAI_THROW(L, L->errorJmp);  /* jump to it */
  }
  else {  /* thread has no error handler */
    L->status = cast_byte(errcode);  /* mark it as dead */
    if (G(L)->mainthread->errorJmp) {  /* main thread has a handler? */
      setobjs2s(L, G(L)->mainthread->top++, L->top - 1);  /* copy error obj. */
      luaD_throw(G(L)->mainthread, errcode);  /* re-throw in main thread */
    }
    else {  /* no handler at all; abort */
      if (G(L)->panic) {  /* panic function? */
        lua_unlock(L);
        G(L)->panic(L);  /* call it (last chance to jump out) */
      }
      abort();
    }
  }
}

// Assembly:
pushq %rax
movq 0x70(%rdi), %rax
testq %rax, %rax
jne 0xad4b
movb %sil, 0xa(%rdi)
movq 0x18(%rdi), %rcx
movq 0x108(%rcx), %rax
cmpq $0x0, 0x70(%rax)
jne 0xad60
movq 0x100(%rcx), %rax
testq %rax, %rax
je 0xad46
callq *%rax
callq 0x6070
movl %esi, 0xd0(%rax)
addq $0x8, %rax
pushq $0x1
popq %rsi
movq %rax, %rdi
callq 0x6450
movq 0x10(%rdi), %rcx
movq 0x10(%rax), %rdx
leaq 0x10(%rdx), %r8
movq %r8, 0x10(%rax)
movq -0x10(%rcx), %rax
movq %rax, (%rdx)
movl -0x8(%rcx), %eax
movl %eax, 0x8(%rdx)
movq 0x18(%rdi), %rax
movq 0x108(%rax), %rdi
callq 0xad18
// File: /workspace/github_c_makefile_star2_O2/bhk[P]tooltree/lua/../opensource/lua-5.2.3/src/ldo.c
// Function: luaD_shrinkstack
static int stackinuse (lua_State *L) {
  CallInfo *ci;
  StkId lim = L->top;
  for (ci = L->ci; ci != NULL; ci = ci->previous) {
    lua_assert(ci->top <= L->stack_last);
    if (lim < ci->top) lim = ci->top;
  }
  return cast_int(lim - L->stack) + 1;  /* part of stack in use */
}

// Assembly:
movq 0x10(%rdi), %rcx
leaq 0x20(%rdi), %rax
movq (%rax), %rax
testq %rax, %rax
je 0xaf80
movq 0x8(%rax), %rdx
cmpq %rdx, %rcx
cmovbq %rdx, %rcx
addq $0x10, %rax
jmp 0xaf67
subq 0x38(%rdi), %rcx
shrq $0x4, %rcx
leal 0x1(%rcx), %eax
pushq $0x8
popq %rsi
cltd
idivl %esi
addl %ecx, %eax
incl %eax
movl $0xf4236, %esi          # imm = 0xF4236
cmpl %esi, %eax
cmovll %eax, %esi
cmpl $0xf423f, %ecx          # imm = 0xF423F
jg 0xafb3
addl $0xa, %esi
cmpl 0x40(%rdi), %esi
jl 0xadf7
retq
// File: /workspace/github_c_makefile_star2_O2/bhk[P]tooltree/lua/../opensource/lua-5.2.3/src/ldo.c
// Function: luaD_poscall
int luaD_poscall (lua_State *L, StkId firstResult) {
  StkId res;
  int wanted, i;
  CallInfo *ci = L->ci;
  if (L->hookmask & (LUA_MASKRET | LUA_MASKLINE)) {
    if (L->hookmask & LUA_MASKRET) {
      ptrdiff_t fr = savestack(L, firstResult);  /* hook may change stack */
      luaD_hook(L, LUA_HOOKRET, -1);
      firstResult = restorestack(L, fr);
    }
    L->oldpc = ci->previous->u.l.savedpc;  /* 'oldpc' for caller function */
  }
  res = ci->func;  /* res == final position of 1st result */
  wanted = ci->nresults;
  L->ci = ci = ci->previous;  /* back to caller */
  /* move results to correct place */
  for (i = wanted; i != 0 && firstResult < L->top; i--)
    setobjs2s(L, res++, firstResult++);
  while (i-- > 0)
    setnilvalue(res++);
  L->top = res;
  return (wanted - LUA_MULTRET);  /* 0 iff wanted == LUA_MULTRET */
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rsi, %r14
movq %rdi, %rbx
movq 0x20(%rdi), %r15
movzbl 0x48(%rdi), %eax
testb $0x6, %al
je 0xb3c6
testb $0x2, %al
je 0xb3b8
subq 0x38(%rbx), %r14
pushq $0x1
popq %rsi
pushq $-0x1
popq %rdx
movq %rbx, %rdi
callq 0xafb4
addq 0x38(%rbx), %r14
movq 0x10(%r15), %rdx
movq 0x38(%rdx), %rax
movq %rax, 0x28(%rbx)
jmp 0xb3ca
movq 0x10(%r15), %rdx
movq (%r15), %rcx
movswl 0x20(%r15), %eax
movq %rdx, 0x20(%rbx)
movl %eax, %edx
movl %eax, %esi
subl $0x1, %esi
jb 0xb408
cmpq 0x10(%rbx), %r14
jae 0xb408
movq (%r14), %rdx
movq %rdx, (%rcx)
movl 0x8(%r14), %edx
movl %edx, 0x8(%rcx)
addq $0x10, %rcx
addq $0x10, %r14
movl %esi, %edx
jmp 0xb3da
decl %edx
andl $0x0, 0x8(%rcx)
addq $0x10, %rcx
testl %edx, %edx
jg 0xb3fe
movq %rcx, 0x10(%rbx)
incl %eax
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/bhk[P]tooltree/lua/../opensource/lua-5.2.3/src/ldo.c
// Function: luaD_call
void luaD_call (lua_State *L, StkId func, int nResults, int allowyield) {
  if (++L->nCcalls >= LUAI_MAXCCALLS) {
    if (L->nCcalls == LUAI_MAXCCALLS)
      luaG_runerror(L, "C stack overflow");
    else if (L->nCcalls >= (LUAI_MAXCCALLS + (LUAI_MAXCCALLS>>3)))
      luaD_throw(L, LUA_ERRERR);  /* error while handing stack error */
  }
  if (!allowyield) L->nny++;
  if (!luaD_precall(L, func, nResults))  /* is a Lua function? */
    luaV_execute(L);  /* call it */
  if (!allowyield) L->nny--;
  L->nCcalls--;
}

// Assembly:
pushq %rbp
pushq %rbx
pushq %rax
movl %ecx, %ebp
movq %rdi, %rbx
movzwl 0x46(%rdi), %eax
incl %eax
movw %ax, 0x46(%rdi)
cmpw $0xc8, %ax
jb 0xb438
je 0xb467
cmpw $0xe1, %ax
jae 0xb478
testl %ebp, %ebp
jne 0xb440
incw 0x44(%rbx)
movq %rbx, %rdi
callq 0xb066
testl %eax, %eax
jne 0xb454
movq %rbx, %rdi
callq 0x17b97
testl %ebp, %ebp
jne 0xb45c
decw 0x44(%rbx)
decw 0x46(%rbx)
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
leaq 0x133f2(%rip), %rsi     # 0x1e860
movq %rbx, %rdi
xorl %eax, %eax
callq 0xaa89
pushq $0x6
popq %rsi
movq %rbx, %rdi
callq 0xad18
// File: /workspace/github_c_makefile_star2_O2/bhk[P]tooltree/lua/../opensource/lua-5.2.3/src/ldo.c
// Function: lua_resume
LUA_API int lua_resume (lua_State *L, lua_State *from, int nargs) {
  int status;
  int oldnny = L->nny;  /* save 'nny' */
  lua_lock(L);
  luai_userstateresume(L, nargs);
  L->nCcalls = (from) ? from->nCcalls + 1 : 1;
  L->nny = 0;  /* allow yields */
  api_checknelems(L, (L->status == LUA_OK) ? nargs + 1 : nargs);
  status = luaD_rawrunprotected(L, resume, L->top - nargs);
  if (status == -1)  /* error calling 'lua_resume'? */
    status = LUA_ERRRUN;
  else {  /* yield or regular error */
    while (status != LUA_OK && status != LUA_YIELD) {  /* error? */
      if (recover(L, status))  /* recover point? */
        status = luaD_rawrunprotected(L, unroll, NULL);  /* run continuation */
      else {  /* unrecoverable error */
        L->status = cast_byte(status);  /* mark thread as `dead' */
        seterrorobj(L, status, L->top);
        L->ci->top = L->top;
        break;
      }
    }
    lua_assert(status == L->status);
  }
  L->nny = oldnny;  /* restore 'nny' */
  L->nCcalls--;
  lua_assert(L->nCcalls == ((from) ? from->nCcalls : 0));
  lua_unlock(L);
  return status;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
testq %rsi, %rsi
je 0xb49e
movzwl 0x46(%rsi), %eax
incl %eax
jmp 0xb4a2
movw $0x1, %ax
movzwl 0x44(%rbx), %r14d
movw %ax, 0x46(%rbx)
andw $0x0, 0x44(%rbx)
movq 0x10(%rbx), %rax
movslq %edx, %rcx
shlq $0x4, %rcx
subq %rcx, %rax
leaq 0xeb(%rip), %rsi        # 0xb5b0
movq %rbx, %rdi
movq %rax, %rdx
callq 0xad8d
cmpl $-0x1, %eax
je 0xb593
movl %eax, %ebp
leaq 0x20(%rbx), %rax
leaq 0x19e(%rip), %r15       # 0xb684
cmpl $0x2, %ebp
jb 0xb596
movq %rax, %r13
movq (%r13), %r13
testq %r13, %r13
je 0xb573
testb $0x10, 0x22(%r13)
jne 0xb508
addq $0x10, %r13
jmp 0xb4f2
movq %r15, %r12
movq 0x38(%rbx), %r15
addq 0x28(%r13), %r15
movq %rbx, %rdi
movq %r15, %rsi
movq %rax, (%rsp)
callq 0xbf1d
movq %rbx, %rdi
movl %ebp, %esi
movq %r15, %rdx
movq %r12, %r15
callq 0xb70e
movq %r13, 0x20(%rbx)
movb 0x48(%r13), %al
movb %al, 0x49(%rbx)
andw $0x0, 0x44(%rbx)
movq %rbx, %rdi
callq 0xaf5f
movq 0x40(%r13), %rax
movq %rax, 0x78(%rbx)
orb $0x20, 0x22(%r13)
movb %bpl, 0x49(%r13)
movq %rbx, %rdi
movq %r12, %rsi
xorl %edx, %edx
callq 0xad8d
movl %eax, %ebp
movq (%rsp), %rax
jmp 0xb4e6
movb %bpl, 0xa(%rbx)
movq 0x10(%rbx), %rdx
movq %rbx, %rdi
movl %ebp, %esi
callq 0xb70e
movq 0x10(%rbx), %rax
movq 0x20(%rbx), %rcx
movq %rax, 0x8(%rcx)
jmp 0xb596
pushq $0x2
popq %rbp
movw %r14w, 0x44(%rbx)
decw 0x46(%rbx)
movl %ebp, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/bhk[P]tooltree/lua/../opensource/lua-5.2.3/src/ldo.c
// Function: resume
static void resume (lua_State *L, void *ud) {
  int nCcalls = L->nCcalls;
  StkId firstArg = cast(StkId, ud);
  CallInfo *ci = L->ci;
  if (nCcalls >= LUAI_MAXCCALLS)
    resume_error(L, "C stack overflow", firstArg);
  if (L->status == LUA_OK) {  /* may be starting a coroutine */
    if (ci != &L->base_ci)  /* not in base level? */
      resume_error(L, "cannot resume non-suspended coroutine", firstArg);
    /* coroutine is in base level; start running it */
    if (!luaD_precall(L, firstArg - 1, LUA_MULTRET))  /* Lua function? */
      luaV_execute(L);  /* call it */
  }
  else if (L->status != LUA_YIELD)
    resume_error(L, "cannot resume dead coroutine", firstArg);
  else {  /* resuming from previous yield */
    L->status = LUA_OK;
    ci->func = restorestack(L, ci->extra);
    if (isLua(ci))  /* yielded inside a hook? */
      luaV_execute(L);  /* just continue running Lua code */
    else {  /* 'common' yield */
      if (ci->u.c.k != NULL) {  /* does it have a continuation? */
        int n;
        ci->u.c.status = LUA_YIELD;  /* 'default' status */
        ci->callstatus |= CIST_YIELDED;
        lua_unlock(L);
        n = (*ci->u.c.k)(L);  /* call continuation */
        lua_lock(L);
        api_checknelems(L, n);
        firstArg = L->top - n;  /* yield results come from continuation */
      }
      luaD_poscall(L, firstArg);  /* finish 'luaD_precall' */
    }
    unroll(L, NULL);
  }
  lua_assert(nCcalls == L->nCcalls);
}

// Assembly:
pushq %rbx
movq %rsi, %rcx
movq %rdi, %rbx
cmpw $0xc8, 0x46(%rdi)
jae 0xb660
movq 0x20(%rbx), %rax
movzbl 0xa(%rbx), %edx
cmpl $0x1, %edx
je 0xb600
testl %edx, %edx
jne 0xb669
leaq 0x80(%rbx), %rdx
cmpq %rdx, %rax
jne 0xb672
addq $-0x10, %rcx
pushq $-0x1
popq %rdx
movq %rbx, %rdi
movq %rcx, %rsi
callq 0xb066
testl %eax, %eax
je 0xb657
popq %rbx
retq
movb $0x0, 0xa(%rbx)
movq 0x38(%rbx), %rdx
addq 0x28(%rax), %rdx
movq %rdx, (%rax)
movb 0x22(%rax), %dl
testb $0x1, %dl
jne 0xb649
movq 0x38(%rax), %rsi
testq %rsi, %rsi
je 0xb63c
movb $0x1, 0x49(%rax)
orb $0x8, %dl
movb %dl, 0x22(%rax)
movq %rbx, %rdi
callq *%rsi
movq 0x10(%rbx), %rcx
cltq
shlq $0x4, %rax
subq %rax, %rcx
movq %rbx, %rdi
movq %rcx, %rsi
callq 0xb387
jmp 0xb651
movq %rbx, %rdi
callq 0x17b97
movq %rbx, %rdi
popq %rbx
jmp 0xb684
movq %rbx, %rdi
popq %rbx
jmp 0x17b97
leaq 0x131f9(%rip), %rsi     # 0x1e860
jmp 0xb679
leaq 0x1327b(%rip), %rsi     # 0x1e8eb
jmp 0xb679
leaq 0x1324c(%rip), %rsi     # 0x1e8c5
movq %rbx, %rdi
movq %rcx, %rdx
callq 0xb9fb
// File: /workspace/github_c_makefile_star2_O2/bhk[P]tooltree/lua/../opensource/lua-5.2.3/src/ldo.c
// Function: unroll
static void unroll (lua_State *L, void *ud) {
  UNUSED(ud);
  for (;;) {
    if (L->ci == &L->base_ci)  /* stack is empty? */
      return;  /* coroutine finished normally */
    if (!isLua(L->ci))  /* C function? */
      finishCcall(L);
    else {  /* Lua function */
      luaV_finishOp(L);  /* finish interrupted instruction */
      luaV_execute(L);  /* execute down to higher C 'boundary' */
    }
  }
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
leaq 0x80(%rdi), %r14
movq 0x20(%rbx), %rax
cmpq %r14, %rax
je 0xb706
movb 0x22(%rax), %cl
testb $0x1, %cl
jne 0xb6f4
testb $0x10, %cl
je 0xb6b0
movq 0x40(%rax), %rdx
movq %rdx, 0x78(%rbx)
cmpw $-0x1, 0x20(%rax)
jne 0xb6c5
movq 0x10(%rbx), %rdx
cmpq %rdx, 0x8(%rax)
jae 0xb6c5
movq %rdx, 0x8(%rax)
testb $0x20, %cl
jne 0xb6ce
movb $0x1, 0x49(%rax)
andb $-0x3a, %cl
orb $0x8, %cl
movb %cl, 0x22(%rax)
movq %rbx, %rdi
callq *0x38(%rax)
movq 0x10(%rbx), %rsi
cltq
shlq $0x4, %rax
subq %rax, %rsi
movq %rbx, %rdi
callq 0xb387
jmp 0xb692
movq %rbx, %rdi
callq 0x17a3c
movq %rbx, %rdi
callq 0x17b97
jmp 0xb692
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O2/bhk[P]tooltree/lua/../opensource/lua-5.2.3/src/ldo.c
// Function: f_parser
static void f_parser (lua_State *L, void *ud) {
  int i;
  Closure *cl;
  struct SParser *p = cast(struct SParser *, ud);
  int c = zgetc(p->z);  /* read first character */
  if (c == LUA_SIGNATURE[0]) {
    checkmode(L, p->mode, "binary");
    cl = luaU_undump(L, p->z, &p->buff, p->name);
  }
  else {
    checkmode(L, p->mode, "text");
    cl = luaY_parser(L, p->z, &p->buff, &p->dyd, p->name, c);
  }
  lua_assert(cl->l.nupvalues == cl->l.p->sizeupvalues);
  for (i = 0; i < cl->l.nupvalues; i++) {  /* initialize upvalues */
    UpVal *up = luaF_newupval(L);
    cl->l.upvals[i] = up;
    luaC_objbarrier(L, cl, up);
  }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %rbx
movq (%rsi), %rdi
subq $0x1, (%rdi)
jae 0xb94c
callq 0x18db8
movl %eax, %ebp
jmp 0xb95b
movq 0x8(%rdi), %rax
leaq 0x1(%rax), %rcx
movq %rcx, 0x8(%rdi)
movzbl (%rax), %ebp
leaq 0x8(%r14), %r15
movq 0x50(%r14), %rsi
cmpl $0x1b, %ebp
jne 0xb98b
leaq 0x12fb1(%rip), %rdx     # 0x1e920
movq %rbx, %rdi
callq 0xba2b
movq (%r14), %rsi
movq 0x58(%r14), %rcx
movq %rbx, %rdi
movq %r15, %rdx
callq 0x169c8
jmp 0xb9b3
leaq 0x12f95(%rip), %rdx     # 0x1e927
movq %rbx, %rdi
callq 0xba2b
leaq 0x20(%r14), %rcx
movq (%r14), %rsi
movq 0x58(%r14), %r8
movq %rbx, %rdi
movq %r15, %rdx
movl %ebp, %r9d
callq 0x108d4
movq %rax, %r14
xorl %r15d, %r15d
movzbl 0xa(%r14), %eax
cmpq %rax, %r15
jae 0xb9f0
movq %rbx, %rdi
callq 0xbe63
movq %rax, 0x20(%r14,%r15,8)
testb $0x3, 0x9(%rax)
je 0xb9eb
testb $0x4, 0x9(%r14)
je 0xb9eb
movq %rbx, %rdi
movq %r14, %rsi
movq %rax, %rdx
callq 0xc0bc
incq %r15
jmp 0xb9b9
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq