LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O2/tylerneylon[P]APIsWithLua/lua/lbaselib.c
// Function: luaopen_base
LUAMOD_API int luaopen_base (lua_State *L) {
  /* open lib into global table */
  lua_pushglobaltable(L);
  luaL_setfuncs(L, base_funcs, 0);
  /* set global _G */
  lua_pushvalue(L, -1);
  lua_setfield(L, -2, "_G");
  /* set global _VERSION */
  lua_pushliteral(L, LUA_VERSION);
  lua_setfield(L, -2, "_VERSION");
  return 1;
}

// Assembly:
pushq %rbp
pushq %rbx
pushq %rax
movq %rdi, %rbx
pushq $0x2
popq %rdx
movl $0xfff0b9d8, %esi       # imm = 0xFFF0B9D8
callq 0x65cf
leaq 0x17c66(%rip), %rsi     # 0x2e320
movq %rbx, %rdi
xorl %edx, %edx
callq 0x13c52
pushq $-0x1
popq %rsi
movq %rbx, %rdi
callq 0x5cee
leaq 0x9e88(%rip), %rdx      # 0x2055e
pushq $-0x2
popq %rbp
movq %rbx, %rdi
movl %ebp, %esi
callq 0x68b9
leaq 0xa426(%rip), %rsi      # 0x20b10
movq %rbx, %rdi
callq 0x61d0
leaq 0xa41f(%rip), %rdx      # 0x20b18
movq %rbx, %rdi
movl %ebp, %esi
callq 0x68b9
pushq $0x1
popq %rax
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/tylerneylon[P]APIsWithLua/lua/lbaselib.c
// Function: luaB_assert
static int luaB_assert (lua_State *L) {
  if (lua_toboolean(L, 1))  /* condition is true? */
    return lua_gettop(L);  /* return all arguments */
  else {  /* error */
    luaL_checkany(L, 1);  /* there must be a condition */
    lua_remove(L, 1);  /* remove it */
    lua_pushliteral(L, "assertion failed!");  /* default message */
    lua_settop(L, 1);  /* leave only message (default if no other one) */
    return luaB_error(L);  /* call 'error' */
  }
}

// Assembly:
pushq %rbp
pushq %rbx
pushq %rax
movq %rdi, %rbx
pushq $0x1
popq %rsi
callq 0x5fa6
testl %eax, %eax
je 0x1672d
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %rbp
jmp 0x5b1d
pushq $0x1
popq %rbp
movq %rbx, %rdi
movl %ebp, %esi
callq 0x131a8
pushq $-0x1
popq %rdx
movq %rbx, %rdi
movl %ebp, %esi
callq 0x5b7f
pushq $-0x2
popq %rsi
movq %rbx, %rdi
callq 0x5b31
leaq 0xa44f(%rip), %rsi      # 0x20ba8
movq %rbx, %rdi
callq 0x61d0
movq %rbx, %rdi
movl %ebp, %esi
callq 0x5b31
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %rbp
jmp 0x1687d
// File: /workspace/github_c_makefile_star2_O2/tylerneylon[P]APIsWithLua/lua/lbaselib.c
// Function: luaB_collectgarbage
static int luaB_collectgarbage (lua_State *L) {
  static const char *const opts[] = {"stop", "restart", "collect",
    "count", "step", "setpause", "setstepmul",
    "isrunning", NULL};
  static const int optsnum[] = {LUA_GCSTOP, LUA_GCRESTART, LUA_GCCOLLECT,
    LUA_GCCOUNT, LUA_GCSTEP, LUA_GCSETPAUSE, LUA_GCSETSTEPMUL,
    LUA_GCISRUNNING};
  int o = optsnum[luaL_checkoption(L, 1, "collect", opts)];
  int ex = (int)luaL_optinteger(L, 2, 0);
  int res = lua_gc(L, o, ex);
  switch (o) {
    case LUA_GCCOUNT: {
      int b = lua_gc(L, LUA_GCCOUNTB, 0);
      lua_pushnumber(L, (lua_Number)res + ((lua_Number)b/1024));
      return 1;
    }
    case LUA_GCSTEP: case LUA_GCISRUNNING: {
      lua_pushboolean(L, res);
      return 1;
    }
    default: {
      lua_pushinteger(L, res);
      return 1;
    }
  }
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movq %rdi, %rbx
leaq 0xa440(%rip), %rdx      # 0x20bc7
leaq 0x17d22(%rip), %rcx     # 0x2e4b0
pushq $0x1
popq %rsi
callq 0x1305b
cltq
leaq 0xa561(%rip), %rcx      # 0x20d00
movl (%rcx,%rax,4), %ebp
pushq $0x2
popq %rsi
movq %rbx, %rdi
xorl %edx, %edx
callq 0x132b0
movq %rbx, %rdi
movl %ebp, %esi
movl %eax, %edx
callq 0x6df7
movl %eax, %r14d
cmpl $0x9, %ebp
je 0x167f9
cmpl $0x5, %ebp
je 0x167f9
cmpl $0x3, %ebp
jne 0x16806
pushq $0x4
popq %rsi
movq %rbx, %rdi
xorl %edx, %edx
callq 0x6df7
cvtsi2sd %r14d, %xmm1
cvtsi2sd %eax, %xmm0
mulsd 0xa31d(%rip), %xmm0     # 0x20b08
addsd %xmm1, %xmm0
movq %rbx, %rdi
callq 0x6146
jmp 0x16811
movq %rbx, %rdi
movl %r14d, %esi
callq 0x6386
jmp 0x16811
movslq %r14d, %rsi
movq %rbx, %rdi
callq 0x615b
pushq $0x1
popq %rax
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/tylerneylon[P]APIsWithLua/lua/lbaselib.c
// Function: luaB_dofile
static int luaB_dofile (lua_State *L) {
  const char *fname = luaL_optstring(L, 1, NULL);
  lua_settop(L, 1);
  if (luaL_loadfile(L, fname) != LUA_OK)
    return lua_error(L);
  lua_callk(L, 0, LUA_MULTRET, 0, dofilecont);
  return dofilecont(L, 0, 0);
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movq %rdi, %rbx
pushq $0x1
popq %rbp
movl %ebp, %esi
xorl %edx, %edx
xorl %ecx, %ecx
callq 0x130d8
movq %rax, %r14
movq %rbx, %rdi
movl %ebp, %esi
callq 0x5b31
movq %rbx, %rdi
movq %r14, %rsi
xorl %edx, %edx
callq 0x136bb
testl %eax, %eax
je 0x16858
movq %rbx, %rdi
popq %rbx
popq %r14
popq %rbp
jmp 0x6f1a
leaq 0x941(%rip), %r8        # 0x171a0
pushq $-0x1
popq %rdx
movq %rbx, %rdi
xorl %esi, %esi
xorl %ecx, %ecx
callq 0x6bb0
movq %rbx, %rdi
callq 0x5b1d
decl %eax
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/tylerneylon[P]APIsWithLua/lua/lbaselib.c
// Function: luaB_error
static int luaB_error (lua_State *L) {
  int level = (int)luaL_optinteger(L, 2, 1);
  lua_settop(L, 1);
  if (lua_type(L, 1) == LUA_TSTRING && level > 0) {
    luaL_where(L, level);   /* add extra information */
    lua_pushvalue(L, 1);
    lua_concat(L, 2);
  }
  return lua_error(L);
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movq %rdi, %rbx
pushq $0x2
popq %rsi
pushq $0x1
popq %rdx
callq 0x132b0
movq %rax, %r14
pushq $0x1
popq %rbp
movq %rbx, %rdi
movl %ebp, %esi
callq 0x5b31
movq %rbx, %rdi
movl %ebp, %esi
callq 0x5d12
cmpl $0x4, %eax
sete %al
testl %r14d, %r14d
setg %cl
andb %al, %cl
cmpb $0x1, %cl
jne 0x168dd
movq %rbx, %rdi
movl %r14d, %esi
callq 0x12d58
pushq $0x1
popq %rsi
movq %rbx, %rdi
callq 0x5cee
pushq $0x2
popq %rsi
movq %rbx, %rdi
callq 0x6f57
movq %rbx, %rdi
popq %rbx
popq %r14
popq %rbp
jmp 0x6f1a
// File: /workspace/github_c_makefile_star2_O2/tylerneylon[P]APIsWithLua/lua/lbaselib.c
// Function: luaB_getmetatable
static int luaB_getmetatable (lua_State *L) {
  luaL_checkany(L, 1);
  if (!lua_getmetatable(L, 1)) {
    lua_pushnil(L);
    return 1;  /* no metatable */
  }
  luaL_getmetafield(L, 1, "__metatable");
  return 1;  /* returns either __metatable field (if present) or metatable */
}

// Assembly:
pushq %rbp
pushq %rbx
pushq %rax
movq %rdi, %rbx
pushq $0x1
popq %rbp
movl %ebp, %esi
callq 0x131a8
movq %rbx, %rdi
movl %ebp, %esi
callq 0x66b9
testl %eax, %eax
je 0x1691b
leaq 0xa2ea(%rip), %rdx      # 0x20bf8
pushq $0x1
popq %rsi
movq %rbx, %rdi
callq 0x13a27
jmp 0x16923
movq %rbx, %rdi
callq 0x6135
pushq $0x1
popq %rax
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/tylerneylon[P]APIsWithLua/lua/lbaselib.c
// Function: luaB_ipairs
static int luaB_ipairs (lua_State *L) {
#if defined(LUA_COMPAT_IPAIRS)
  return pairsmeta(L, "__ipairs", 1, ipairsaux);
#else
  luaL_checkany(L, 1);
  lua_pushcfunction(L, ipairsaux);  /* iteration function */
  lua_pushvalue(L, 1);  /* state */
  lua_pushinteger(L, 0);  /* initial value */
  return 3;
#endif
}

// Assembly:
pushq %rbp
pushq %rbx
pushq %rax
movq %rdi, %rbx
pushq $0x1
popq %rbp
movl %ebp, %esi
callq 0x131a8
leaq 0x866(%rip), %rsi       # 0x171aa
movq %rbx, %rdi
xorl %edx, %edx
callq 0x630a
movq %rbx, %rdi
movl %ebp, %esi
callq 0x5cee
movq %rbx, %rdi
xorl %esi, %esi
callq 0x615b
pushq $0x3
popq %rax
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/tylerneylon[P]APIsWithLua/lua/lbaselib.c
// Function: luaB_loadfile
static int luaB_loadfile (lua_State *L) {
  const char *fname = luaL_optstring(L, 1, NULL);
  const char *mode = luaL_optstring(L, 2, NULL);
  int env = (!lua_isnone(L, 3) ? 3 : 0);  /* 'env' index or 0 if no 'env' */
  int status = luaL_loadfilex(L, fname, mode);
  return load_aux(L, status, env);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
pushq $0x1
popq %rsi
xorl %edx, %edx
xorl %ecx, %ecx
callq 0x130d8
movq %rax, %r14
pushq $0x2
popq %rsi
movq %rbx, %rdi
xorl %edx, %edx
xorl %ecx, %ecx
callq 0x130d8
movq %rax, %r15
pushq $0x3
popq %rsi
movq %rbx, %rdi
callq 0x5d12
xorl %ecx, %ecx
cmpl $-0x1, %eax
setne %cl
leal (%rcx,%rcx,2), %ebp
movq %rbx, %rdi
movq %r14, %rsi
movq %r15, %rdx
callq 0x136bb
movq %rbx, %rdi
movl %eax, %esi
movl %ebp, %edx
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0x171e5
// File: /workspace/github_c_makefile_star2_O2/tylerneylon[P]APIsWithLua/lua/lbaselib.c
// Function: luaB_load
static int luaB_load (lua_State *L) {
  int status;
  size_t l;
  const char *s = lua_tolstring(L, 1, &l);
  const char *mode = luaL_optstring(L, 3, "bt");
  int env = (!lua_isnone(L, 4) ? 4 : 0);  /* 'env' index or 0 if no 'env' */
  if (s != NULL) {  /* loading a string? */
    const char *chunkname = luaL_optstring(L, 2, s);
    status = luaL_loadbufferx(L, s, l, chunkname, mode);
  }
  else {  /* loading from a reader function */
    const char *chunkname = luaL_optstring(L, 2, "=(load)");
    luaL_checktype(L, 1, LUA_TFUNCTION);
    lua_settop(L, RESERVEDSLOT);  /* create reserved slot */
    status = lua_load(L, generic_reader, NULL, chunkname, mode);
  }
  return load_aux(L, status, env);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
pushq $0x1
popq %rsi
movq %rsp, %rdx
callq 0x5fca
movq %rax, %r15
leaq 0xa214(%rip), %rdx      # 0x20c04
pushq $0x3
popq %rsi
movq %rbx, %rdi
xorl %ecx, %ecx
callq 0x130d8
movq %rax, %r14
pushq $0x4
popq %rsi
movq %rbx, %rdi
callq 0x5d12
movl %eax, %ebp
testq %r15, %r15
je 0x16a39
pushq $0x2
popq %rsi
movq %rbx, %rdi
movq %r15, %rdx
xorl %ecx, %ecx
callq 0x130d8
movq (%rsp), %rdx
movq %rbx, %rdi
movq %r15, %rsi
movq %rax, %rcx
movq %r14, %r8
callq 0x139be
jmp 0x16a80
leaq 0xa1c7(%rip), %rdx      # 0x20c07
pushq $0x2
popq %rsi
movq %rbx, %rdi
xorl %ecx, %ecx
callq 0x130d8
movq %rax, %r15
pushq $0x1
popq %rsi
pushq $0x6
popq %rdx
movq %rbx, %rdi
callq 0x1315e
pushq $0x5
popq %rsi
movq %rbx, %rdi
callq 0x5b31
leaq 0x7d5(%rip), %rsi       # 0x17245
movq %rbx, %rdi
xorl %edx, %edx
movq %r15, %rcx
movq %r14, %r8
callq 0x6d1c
xorl %edx, %edx
cmpl $-0x1, %ebp
setne %dl
shll $0x2, %edx
movq %rbx, %rdi
movl %eax, %esi
callq 0x171e5
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/tylerneylon[P]APIsWithLua/lua/lbaselib.c
// Function: luaB_next
static int luaB_next (lua_State *L) {
  luaL_checktype(L, 1, LUA_TTABLE);
  lua_settop(L, 2);  /* create a 2nd argument if there isn't one */
  if (lua_next(L, 1))
    return 2;
  else {
    lua_pushnil(L);
    return 1;
  }
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movq %rdi, %r14
pushq $0x1
popq %rbx
pushq $0x5
popq %rdx
movl %ebx, %esi
callq 0x1315e
pushq $0x2
popq %rbp
movq %r14, %rdi
movl %ebp, %esi
callq 0x5b31
movq %r14, %rdi
movl %ebx, %esi
callq 0x6f20
testl %eax, %eax
jne 0x16ad9
movq %r14, %rdi
callq 0x6135
movl %ebx, %ebp
movl %ebp, %eax
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/tylerneylon[P]APIsWithLua/lua/lbaselib.c
// Function: luaB_pcall
static int luaB_pcall (lua_State *L) {
  int status;
  luaL_checkany(L, 1);
  lua_pushboolean(L, 1);  /* first result if no errors */
  lua_insert(L, 1);  /* put it in place */
  status = lua_pcallk(L, lua_gettop(L) - 2, LUA_MULTRET, 0, 0, finishpcall);
  return finishpcall(L, status, 0);
}

// Assembly:
pushq %rbp
pushq %rbx
pushq %rax
movq %rdi, %rbx
pushq $0x1
popq %rbp
movl %ebp, %esi
callq 0x131a8
movq %rbx, %rdi
movl %ebp, %esi
callq 0x6386
movq %rbx, %rdi
movl %ebp, %esi
movl %ebp, %edx
callq 0x5b7f
movq %rbx, %rdi
callq 0x5b1d
leal -0x2(%rax), %esi
leaq 0x761(%rip), %r9        # 0x172ed
pushq $-0x1
popq %rdx
movq %rbx, %rdi
xorl %ecx, %ecx
xorl %r8d, %r8d
callq 0x6c18
movq %rbx, %rdi
movl %eax, %esi
xorl %edx, %edx
addq $0x8, %rsp
popq %rbx
popq %rbp
jmp 0x172ed
// File: /workspace/github_c_makefile_star2_O2/tylerneylon[P]APIsWithLua/lua/lbaselib.c
// Function: luaB_print
static int luaB_print (lua_State *L) {
  int n = lua_gettop(L);  /* number of arguments */
  int i;
  lua_getglobal(L, "tostring");
  for (i=1; i<=n; i++) {
    const char *s;
    size_t l;
    lua_pushvalue(L, -1);  /* function to be called */
    lua_pushvalue(L, i);   /* value to print */
    lua_call(L, 1, 1);
    s = lua_tolstring(L, -1, &l);  /* get result */
    if (s == NULL)
      return luaL_error(L, "'tostring' must return a string to 'print'");
    if (i>1) lua_writestring("\t", 1);
    lua_writestring(s, l);
    lua_pop(L, 1);  /* pop result */
  }
  lua_writeline();
  return 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
callq 0x5b1d
movl %eax, %r14d
leaq 0x97ea(%rip), %rsi      # 0x203b5
movq %rbx, %rdi
callq 0x63d8
xorl %eax, %eax
testl %r14d, %r14d
cmovlel %eax, %r14d
negl %r14d
pushq $0x1
popq %rbp
pushq $-0x1
popq %r15
movl %ebp, %r13d
leal (%r14,%r13), %eax
cmpl $0x1, %eax
je 0x16c77
movq %rbx, %rdi
movl %r15d, %esi
callq 0x5cee
movq %rbx, %rdi
movl %r13d, %esi
callq 0x5cee
movq %rbx, %rdi
movl %ebp, %esi
movl %ebp, %edx
xorl %ecx, %ecx
xorl %r8d, %r8d
callq 0x6bb0
movq %rbx, %rdi
movl %r15d, %esi
movq %rsp, %rdx
callq 0x5fca
testq %rax, %rax
je 0x16c95
movq %rax, %r12
cmpl $0x2, %r13d
jb 0x16c4b
movq 0x18388(%rip), %rax     # 0x2efc8
movq (%rax), %rsi
pushq $0x9
popq %rdi
callq 0x5200
movq (%rsp), %rdx
movq 0x18372(%rip), %rax     # 0x2efc8
movq (%rax), %rcx
movq %r12, %rdi
pushq $0x1
popq %rsi
callq 0x5480
movq %rbx, %rdi
pushq $-0x2
popq %rsi
callq 0x5b31
incl %r13d
jmp 0x16be9
movq 0x1834a(%rip), %rbx     # 0x2efc8
movq (%rbx), %rsi
pushq $0xa
popq %rdi
callq 0x5200
movq (%rbx), %rdi
callq 0x5340
xorl %eax, %eax
jmp 0x16ca6
leaq 0x9fba(%rip), %rsi      # 0x20c56
movq %rbx, %rdi
xorl %eax, %eax
callq 0x12bd6
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/tylerneylon[P]APIsWithLua/lua/lbaselib.c
// Function: luaB_rawequal
static int luaB_rawequal (lua_State *L) {
  luaL_checkany(L, 1);
  luaL_checkany(L, 2);
  lua_pushboolean(L, lua_rawequal(L, 1, 2));
  return 1;
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movq %rdi, %rbx
pushq $0x1
popq %rbp
movl %ebp, %esi
callq 0x131a8
pushq $0x2
popq %r14
movq %rbx, %rdi
movl %r14d, %esi
callq 0x131a8
movq %rbx, %rdi
movl %ebp, %esi
movl %r14d, %edx
callq 0x5dc3
movq %rbx, %rdi
movl %eax, %esi
callq 0x6386
movl %ebp, %eax
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/tylerneylon[P]APIsWithLua/lua/lbaselib.c
// Function: luaB_rawlen
static int luaB_rawlen (lua_State *L) {
  int t = lua_type(L, 1);
  luaL_argcheck(L, t == LUA_TTABLE || t == LUA_TSTRING, 1,
                   "table or string expected");
  lua_pushinteger(L, lua_rawlen(L, 1));
  return 1;
}

// Assembly:
pushq %rbp
pushq %rbx
pushq %rax
movq %rdi, %rbx
pushq $0x1
popq %rsi
callq 0x5d12
andl $-0x2, %eax
cmpl $0x4, %eax
je 0x16d1b
leaq 0x9f71(%rip), %rdx      # 0x20c81
pushq $0x1
popq %rsi
movq %rbx, %rdi
callq 0x12af2
pushq $0x1
popq %rbp
movq %rbx, %rdi
movl %ebp, %esi
callq 0x6047
movq %rbx, %rdi
movq %rax, %rsi
callq 0x615b
movl %ebp, %eax
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/tylerneylon[P]APIsWithLua/lua/lbaselib.c
// Function: luaB_rawget
static int luaB_rawget (lua_State *L) {
  luaL_checktype(L, 1, LUA_TTABLE);
  luaL_checkany(L, 2);
  lua_settop(L, 2);
  lua_rawget(L, 1);
  return 1;
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movq %rdi, %rbx
pushq $0x1
popq %rbp
pushq $0x5
popq %rdx
movl %ebp, %esi
callq 0x1315e
pushq $0x2
popq %r14
movq %rbx, %rdi
movl %r14d, %esi
callq 0x131a8
movq %rbx, %rdi
movl %r14d, %esi
callq 0x5b31
movq %rbx, %rdi
movl %ebp, %esi
callq 0x6599
movl %ebp, %eax
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/tylerneylon[P]APIsWithLua/lua/lbaselib.c
// Function: luaB_rawset
static int luaB_rawset (lua_State *L) {
  luaL_checktype(L, 1, LUA_TTABLE);
  luaL_checkany(L, 2);
  luaL_checkany(L, 3);
  lua_settop(L, 3);
  lua_rawset(L, 1);
  return 1;
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movq %rdi, %rbx
pushq $0x1
popq %rbp
pushq $0x5
popq %rdx
movl %ebp, %esi
callq 0x1315e
pushq $0x2
popq %rsi
movq %rbx, %rdi
callq 0x131a8
pushq $0x3
popq %r14
movq %rbx, %rdi
movl %r14d, %esi
callq 0x131a8
movq %rbx, %rdi
movl %r14d, %esi
callq 0x5b31
movq %rbx, %rdi
movl %ebp, %esi
callq 0x698e
movl %ebp, %eax
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/tylerneylon[P]APIsWithLua/lua/lbaselib.c
// Function: luaB_select
static int luaB_select (lua_State *L) {
  int n = lua_gettop(L);
  if (lua_type(L, 1) == LUA_TSTRING && *lua_tostring(L, 1) == '#') {
    lua_pushinteger(L, n-1);
    return 1;
  }
  else {
    lua_Integer i = luaL_checkinteger(L, 1);
    if (i < 0) i = n + i;
    else if (i > n) i = n;
    luaL_argcheck(L, 1 <= i, 1, "index out of range");
    return n - (int)i;
  }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %r14
callq 0x5b1d
movl %eax, %ebx
pushq $0x1
popq %rsi
movq %r14, %rdi
callq 0x5d12
cmpl $0x4, %eax
jne 0x16e09
pushq $0x1
popq %rbp
movq %r14, %rdi
movl %ebp, %esi
xorl %edx, %edx
callq 0x5fca
cmpb $0x23, (%rax)
jne 0x16e09
decl %ebx
movslq %ebx, %rsi
movq %r14, %rdi
callq 0x615b
jmp 0x16e45
pushq $0x1
popq %rsi
movq %r14, %rdi
callq 0x13252
movslq %ebx, %r15
leaq (%rax,%r15), %rcx
cmpq %r15, %rax
cmovlq %rax, %r15
testq %rax, %rax
cmovsq %rcx, %r15
testq %r15, %r15
jg 0x16e40
leaq 0x9e65(%rip), %rdx      # 0x20c9a
pushq $0x1
popq %rsi
movq %r14, %rdi
callq 0x12af2
subl %r15d, %ebx
movl %ebx, %ebp
movl %ebp, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/tylerneylon[P]APIsWithLua/lua/lbaselib.c
// Function: luaB_setmetatable
static int luaB_setmetatable (lua_State *L) {
  int t = lua_type(L, 2);
  luaL_checktype(L, 1, LUA_TTABLE);
  luaL_argcheck(L, t == LUA_TNIL || t == LUA_TTABLE, 2,
                    "nil or table expected");
  if (luaL_getmetafield(L, 1, "__metatable") != LUA_TNIL)
    return luaL_error(L, "cannot change a protected metatable");
  lua_settop(L, 2);
  lua_setmetatable(L, 1);
  return 1;
}

// Assembly:
pushq %rbp
pushq %rbx
pushq %rax
movq %rdi, %rbx
pushq $0x2
popq %rsi
callq 0x5d12
movl %eax, %ebp
pushq $0x1
popq %rsi
pushq $0x5
popq %rdx
movq %rbx, %rdi
callq 0x1315e
testl %ebp, %ebp
je 0x16e8b
cmpl $0x5, %ebp
je 0x16e8b
leaq 0x9e2d(%rip), %rdx      # 0x20cad
pushq $0x2
popq %rsi
movq %rbx, %rdi
callq 0x12af2
leaq 0x9d66(%rip), %rdx      # 0x20bf8
pushq $0x1
popq %rsi
movq %rbx, %rdi
callq 0x13a27
testl %eax, %eax
je 0x16eb8
leaq 0x9e1b(%rip), %rsi      # 0x20cc3
movq %rbx, %rdi
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %rbp
jmp 0x12bd6
pushq $0x2
popq %rsi
movq %rbx, %rdi
callq 0x5b31
pushq $0x1
popq %rbp
movq %rbx, %rdi
movl %ebp, %esi
callq 0x6ad0
movl %ebp, %eax
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/tylerneylon[P]APIsWithLua/lua/lbaselib.c
// Function: luaB_type
static int luaB_type (lua_State *L) {
  int t = lua_type(L, 1);
  luaL_argcheck(L, t != LUA_TNONE, 1, "value expected");
  lua_pushstring(L, lua_typename(L, t));
  return 1;
}

// Assembly:
pushq %rbp
pushq %rbx
pushq %rax
movq %rdi, %rbx
pushq $0x1
popq %rsi
callq 0x5d12
movl %eax, %ebp
cmpl $-0x1, %eax
jne 0x170ff
leaq 0x926a(%rip), %rdx      # 0x2035e
pushq $0x1
popq %rsi
movq %rbx, %rdi
callq 0x12af2
movq %rbx, %rdi
movl %ebp, %esi
callq 0x5d31
movq %rbx, %rdi
movq %rax, %rsi
callq 0x61d0
pushq $0x1
popq %rax
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/tylerneylon[P]APIsWithLua/lua/lbaselib.c
// Function: luaB_xpcall
static int luaB_xpcall (lua_State *L) {
  int status;
  int n = lua_gettop(L);
  luaL_checktype(L, 2, LUA_TFUNCTION);  /* check error function */
  lua_pushboolean(L, 1);  /* first result */
  lua_pushvalue(L, 1);  /* function */
  lua_rotate(L, 3, 2);  /* move them below function's arguments */
  status = lua_pcallk(L, n - 2, LUA_MULTRET, 2, 2, finishpcall);
  return finishpcall(L, status, 2);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
callq 0x5b1d
movl %eax, %r14d
pushq $0x2
popq %rbp
pushq $0x6
popq %rdx
movq %rbx, %rdi
movl %ebp, %esi
callq 0x1315e
pushq $0x1
popq %r15
movq %rbx, %rdi
movl %r15d, %esi
callq 0x6386
movq %rbx, %rdi
movl %r15d, %esi
callq 0x5cee
pushq $0x3
popq %rsi
movq %rbx, %rdi
movl %ebp, %edx
callq 0x5b7f
addl $-0x2, %r14d
leaq 0x17b(%rip), %r9        # 0x172ed
pushq $-0x1
popq %rdx
pushq $0x2
popq %r15
movq %rbx, %rdi
movl %r14d, %esi
movl %ebp, %ecx
movq %r15, %r8
callq 0x6c18
movq %rbx, %rdi
movl %eax, %esi
movq %r15, %rdx
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0x172ed
// File: /workspace/github_c_makefile_star2_O2/tylerneylon[P]APIsWithLua/lua/lbaselib.c
// Function: load_aux
static int load_aux (lua_State *L, int status, int envidx) {
  if (status == LUA_OK) {
    if (envidx != 0) {  /* 'env' parameter? */
      lua_pushvalue(L, envidx);  /* environment for loaded function */
      if (!lua_setupvalue(L, -2, 1))  /* set it as 1st upvalue */
        lua_pop(L, 1);  /* remove 'env' if not used by previous call */
    }
    return 1;
  }
  else {  /* error (message is on top of the stack) */
    lua_pushnil(L);
    lua_insert(L, -2);  /* put before error message */
    return 2;  /* return nil plus error message */
  }
}

// Assembly:
pushq %rbp
pushq %rbx
pushq %rax
movq %rdi, %rbx
testl %esi, %esi
je 0x17211
movq %rbx, %rdi
callq 0x6135
pushq $-0x2
popq %rsi
pushq $0x1
popq %rdx
movq %rbx, %rdi
callq 0x5b7f
pushq $0x2
popq %rbp
movl %ebp, %eax
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
testl %edx, %edx
je 0x17241
movq %rbx, %rdi
movl %edx, %esi
callq 0x5cee
pushq $-0x2
popq %rsi
pushq $0x1
popq %rbp
movq %rbx, %rdi
movl %ebp, %edx
callq 0x711d
testq %rax, %rax
jne 0x17208
pushq $-0x2
popq %rsi
movq %rbx, %rdi
callq 0x5b31
jmp 0x17208
pushq $0x1
jmp 0x17207
// File: /workspace/github_c_makefile_star2_O2/tylerneylon[P]APIsWithLua/lua/lbaselib.c
// Function: generic_reader
static const char *generic_reader (lua_State *L, void *ud, size_t *size) {
  (void)(ud);  /* not used */
  luaL_checkstack(L, 2, "too many nested functions");
  lua_pushvalue(L, 1);  /* get function */
  lua_call(L, 0, 1);  /* call it */
  if (lua_isnil(L, -1)) {
    lua_pop(L, 1);  /* pop result */
    *size = 0;
    return NULL;
  }
  else if (!lua_isstring(L, -1))
    luaL_error(L, "reader function must return a string");
  lua_replace(L, RESERVEDSLOT);  /* save string in reserved slot */
  return lua_tolstring(L, RESERVEDSLOT, size);
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movq %rdx, %rbx
movq %rdi, %r14
leaq 0x99b9(%rip), %rdx      # 0x20c0f
pushq $0x2
popq %rsi
callq 0x12a9f
pushq $0x1
popq %rbp
movq %r14, %rdi
movl %ebp, %esi
callq 0x5cee
movq %r14, %rdi
xorl %esi, %esi
movl %ebp, %edx
xorl %ecx, %ecx
xorl %r8d, %r8d
callq 0x6bb0
pushq $-0x1
popq %rsi
movq %r14, %rdi
callq 0x5d12
testl %eax, %eax
je 0x172d7
pushq $-0x1
popq %rsi
movq %r14, %rdi
callq 0x5d8e
testl %eax, %eax
jne 0x172ab
leaq 0x9988(%rip), %rsi      # 0x20c29
movq %r14, %rdi
xorl %eax, %eax
callq 0x12bd6
pushq $-0x1
popq %rsi
pushq $0x5
popq %rbp
movq %r14, %rdi
movl %ebp, %edx
callq 0x5c93
pushq $-0x2
popq %rsi
movq %r14, %rdi
callq 0x5b31
movq %r14, %rdi
movl %ebp, %esi
movq %rbx, %rdx
popq %rbx
popq %r14
popq %rbp
jmp 0x5fca
pushq $-0x2
popq %rsi
movq %r14, %rdi
callq 0x5b31
andq $0x0, (%rbx)
xorl %eax, %eax
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/tylerneylon[P]APIsWithLua/lua/lbaselib.c
// Function: finishpcall
static int finishpcall (lua_State *L, int status, lua_KContext extra) {
  if (status != LUA_OK && status != LUA_YIELD) {  /* error? */
    lua_pushboolean(L, 0);  /* first result (false) */
    lua_pushvalue(L, -2);  /* error message */
    return 2;  /* return false, msg */
  }
  else
    return lua_gettop(L) - (int)extra;  /* return all results */
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
cmpl $0x2, %esi
jb 0x17313
movq %rbx, %rdi
xorl %esi, %esi
callq 0x6386
pushq $-0x2
popq %rsi
movq %rbx, %rdi
callq 0x5cee
pushq $0x2
popq %rax
jmp 0x17321
movq %rdx, %r14
movq %rbx, %rdi
callq 0x5b1d
subl %r14d, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O2/tylerneylon[P]APIsWithLua/lua/lcorolib.c
// Function: luaB_cocreate
static int luaB_cocreate (lua_State *L) {
  lua_State *NL;
  luaL_checktype(L, 1, LUA_TFUNCTION);
  NL = lua_newthread(L);
  lua_pushvalue(L, 1);  /* move function to top */
  lua_xmove(L, NL, 1);  /* move function from L to NL */
  return 1;
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movq %rdi, %rbx
pushq $0x1
popq %rbp
pushq $0x6
popq %rdx
movl %ebp, %esi
callq 0x1315e
movq %rbx, %rdi
callq 0xdf85
movq %rax, %r14
movq %rbx, %rdi
movl %ebp, %esi
callq 0x5cee
movq %rbx, %rdi
movq %r14, %rsi
movl %ebp, %edx
callq 0x5a91
movl %ebp, %eax
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/tylerneylon[P]APIsWithLua/lua/lcorolib.c
// Function: luaB_coresume
static int luaB_coresume (lua_State *L) {
  lua_State *co = getco(L);
  int r;
  r = auxresume(L, co, lua_gettop(L) - 1);
  if (r < 0) {
    lua_pushboolean(L, 0);
    lua_insert(L, -2);
    return 2;  /* return false + error message */
  }
  else {
    lua_pushboolean(L, 1);
    lua_insert(L, -(r + 1));
    return r + 1;  /* return true + 'resume' returns */
  }
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movq %rdi, %rbx
callq 0x1750c
movq %rax, %r14
movq %rbx, %rdi
callq 0x5b1d
leal -0x1(%rax), %edx
movq %rbx, %rdi
movq %r14, %rsi
callq 0x17540
testl %eax, %eax
js 0x173e2
movl %eax, %r14d
pushq $0x1
popq %rsi
movq %rbx, %rdi
callq 0x6386
leal 0x1(%r14), %ebp
notl %r14d
jmp 0x173f3
movq %rbx, %rdi
xorl %esi, %esi
callq 0x6386
pushq $0x2
popq %rbp
pushq $-0x2
popq %r14
pushq $0x1
popq %rdx
movq %rbx, %rdi
movl %r14d, %esi
callq 0x5b7f
movl %ebp, %eax
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/tylerneylon[P]APIsWithLua/lua/lcorolib.c
// Function: luaB_costatus
static int luaB_costatus (lua_State *L) {
  lua_State *co = getco(L);
  if (L == co) lua_pushliteral(L, "running");
  else {
    switch (lua_status(co)) {
      case LUA_YIELD:
        lua_pushliteral(L, "suspended");
        break;
      case LUA_OK: {
        lua_Debug ar;
        if (lua_getstack(co, 0, &ar) > 0)  /* does it have frames? */
          lua_pushliteral(L, "normal");  /* it is running */
        else if (lua_gettop(co) == 0)
            lua_pushliteral(L, "dead");
        else
          lua_pushliteral(L, "suspended");  /* initial state */
        break;
      }
      default:  /* some error occurred */
        lua_pushliteral(L, "dead");
        break;
    }
  }
  return 1;
}

// Assembly:
pushq %r14
pushq %rbx
subq $0x88, %rsp
movq %rdi, %rbx
callq 0x1750c
cmpq %rbx, %rax
je 0x17454
movq %rax, %r14
movq %rax, %rdi
callq 0x6df2
testl %eax, %eax
je 0x1745d
cmpl $0x1, %eax
jne 0x17479
leaq 0x9943(%rip), %rsi      # 0x20d95
jmp 0x1749e
leaq 0x9795(%rip), %rsi      # 0x20bf0
jmp 0x1749e
leaq 0x8(%rsp), %rdx
movq %r14, %rdi
xorl %esi, %esi
callq 0x7336
testl %eax, %eax
jle 0x17482
leaq 0x9928(%rip), %rsi      # 0x20d9f
jmp 0x1749e
leaq 0x9926(%rip), %rsi      # 0x20da6
jmp 0x1749e
movq %r14, %rdi
callq 0x5b1d
testl %eax, %eax
leaq 0x9913(%rip), %rax      # 0x20da6
leaq 0x98fb(%rip), %rsi      # 0x20d95
cmoveq %rax, %rsi
movq %rbx, %rdi
callq 0x61d0
pushq $0x1
popq %rax
addq $0x88, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O2/tylerneylon[P]APIsWithLua/lua/lcorolib.c
// Function: auxresume
static int auxresume (lua_State *L, lua_State *co, int narg) {
  int status;
  if (!lua_checkstack(co, narg)) {
    lua_pushliteral(L, "too many arguments to resume");
    return -1;  /* error flag */
  }
  if (lua_status(co) == LUA_OK && lua_gettop(co) == 0) {
    lua_pushliteral(L, "cannot resume dead coroutine");
    return -1;  /* error flag */
  }
  lua_xmove(L, co, narg);
  status = lua_resume(co, L, narg);
  if (status == LUA_OK || status == LUA_YIELD) {
    int nres = lua_gettop(co);
    if (!lua_checkstack(L, nres + 1)) {
      lua_pop(co, nres);  /* remove results anyway */
      lua_pushliteral(L, "too many results to resume");
      return -1;  /* error flag */
    }
    lua_xmove(co, L, nres);  /* move yielded values */
    return nres;
  }
  else {
    lua_xmove(co, L, 1);  /* move error message */
    return -1;  /* error flag */
  }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movl %edx, %ebp
movq %rsi, %r14
movq %rdi, %rbx
movq %rsi, %rdi
movl %edx, %esi
callq 0x5a04
testl %eax, %eax
je 0x175bf
movq %r14, %rdi
callq 0x6df2
testl %eax, %eax
jne 0x17575
movq %r14, %rdi
callq 0x5b1d
testl %eax, %eax
je 0x175ef
movq %rbx, %rdi
movq %r14, %rsi
movl %ebp, %edx
callq 0x5a91
movq %r14, %rdi
movq %rbx, %rsi
movl %ebp, %edx
callq 0x8a09
cmpl $0x1, %eax
ja 0x175c8
movq %r14, %rdi
callq 0x5b1d
movl %eax, %r15d
leal 0x1(%r15), %esi
movq %rbx, %rdi
callq 0x5a04
testl %eax, %eax
je 0x175d8
movq %r14, %rdi
movq %rbx, %rsi
movl %r15d, %edx
callq 0x5a91
jmp 0x17602
leaq 0x9797(%rip), %rsi      # 0x20d5d
jmp 0x175f6
pushq $0x1
popq %rdx
movq %r14, %rdi
movq %rbx, %rsi
callq 0x5a91
jmp 0x175fe
notl %r15d
movq %r14, %rdi
movl %r15d, %esi
callq 0x5b31
leaq 0x978d(%rip), %rsi      # 0x20d7a
jmp 0x175f6
leaq 0x7e68(%rip), %rsi      # 0x1f45e
movq %rbx, %rdi
callq 0x61d0
pushq $-0x1
popq %r15
movl %r15d, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/tylerneylon[P]APIsWithLua/lua/lcorolib.c
// Function: luaB_auxwrap
static int luaB_auxwrap (lua_State *L) {
  lua_State *co = lua_tothread(L, lua_upvalueindex(1));
  int r = auxresume(L, co, lua_gettop(L));
  if (r < 0) {
    if (lua_type(L, -1) == LUA_TSTRING) {  /* error object is a string? */
      luaL_where(L, 1);  /* add extra info */
      lua_insert(L, -2);
      lua_concat(L, 2);
    }
    return lua_error(L);  /* propagate error */
  }
  return r;
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movq %rdi, %rbx
movl $0xfff0b9d7, %esi       # imm = 0xFFF0B9D7
callq 0x60dd
movq %rax, %r14
movq %rbx, %rdi
callq 0x5b1d
movq %rbx, %rdi
movq %r14, %rsi
movl %eax, %edx
callq 0x17540
testl %eax, %eax
js 0x17642
popq %rbx
popq %r14
popq %rbp
retq
pushq $-0x1
popq %rsi
movq %rbx, %rdi
callq 0x5d12
cmpl $0x4, %eax
jne 0x17677
pushq $0x1
popq %rbp
movq %rbx, %rdi
movl %ebp, %esi
callq 0x12d58
pushq $-0x2
popq %rsi
movq %rbx, %rdi
movl %ebp, %edx
callq 0x5b7f
pushq $0x2
popq %rsi
movq %rbx, %rdi
callq 0x6f57
movq %rbx, %rdi
popq %rbx
popq %r14
popq %rbp
jmp 0x6f1a
nop
// File: /workspace/github_c_makefile_star2_O2/tylerneylon[P]APIsWithLua/lua/ldblib.c
// Function: db_debug
static int db_debug (lua_State *L) {
  for (;;) {
    char buffer[250];
    lua_writestringerror("%s", "lua_debug> ");
    if (fgets(buffer, sizeof(buffer), stdin) == 0 ||
        strcmp(buffer, "cont\n") == 0)
      return 0;
    if (luaL_loadbuffer(L, buffer, strlen(buffer), "=(debug command)") ||
        lua_pcall(L, 0, 0, 0))
      lua_writestringerror("%s\n", lua_tostring(L, -1));
    lua_settop(L, 0);  /* remove eventual returns */
  }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x108, %rsp            # imm = 0x108
movq %rdi, %rbx
movq 0x17918(%rip), %r14     # 0x2eff0
leaq 0x9752(%rip), %rbp      # 0x20e31
movq 0x178ea(%rip), %r12     # 0x2efd0
movq %rsp, %r15
leaq 0x974d(%rip), %r13      # 0x20e3d
movq (%r14), %rsi
movq %rbp, %rdi
callq 0x51b0
movq (%r14), %rdi
callq 0x5340
movq (%r12), %rdx
movq %r15, %rdi
movl $0xfa, %esi
callq 0x5240
testq %rax, %rax
je 0x177bf
movq %r15, %rdi
movq %r13, %rsi
pushq $0x6
popq %rdx
callq 0x5370
testl %eax, %eax
je 0x177bf
movq %r15, %rdi
callq 0x5140
movq %rbx, %rdi
movq %r15, %rsi
movq %rax, %rdx
leaq 0x96f8(%rip), %rcx      # 0x20e43
xorl %r8d, %r8d
callq 0x139be
testl %eax, %eax
jne 0x1776f
movq %rbx, %rdi
xorl %esi, %esi
xorl %edx, %edx
xorl %ecx, %ecx
xorl %r8d, %r8d
xorl %r9d, %r9d
callq 0x6c18
testl %eax, %eax
je 0x177b0
movq %r13, %r15
movq %r12, %r13
movq %rbp, %r12
movq (%r14), %rbp
movq %rbx, %rdi
pushq $-0x1
popq %rsi
xorl %edx, %edx
callq 0x5fca
movq %rbp, %rdi
movq %r12, %rbp
movq %r13, %r12
movq %r15, %r13
movq %rsp, %r15
leaq 0x8af2(%rip), %rsi      # 0x20290
movq %rax, %rdx
xorl %eax, %eax
callq 0x52a0
movq (%r14), %rdi
callq 0x5340
movq %rbx, %rdi
xorl %esi, %esi
callq 0x5b31
jmp 0x176f0
xorl %eax, %eax
addq $0x108, %rsp            # imm = 0x108
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/tylerneylon[P]APIsWithLua/lua/ldblib.c
// Function: db_getuservalue
static int db_getuservalue (lua_State *L) {
  if (lua_type(L, 1) != LUA_TUSERDATA)
    lua_pushnil(L);
  else
    lua_getuservalue(L, 1);
  return 1;
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
pushq $0x1
popq %rsi
callq 0x5d12
cmpl $0x7, %eax
jne 0x177f1
pushq $0x1
popq %rsi
movq %rbx, %rdi
callq 0x6717
jmp 0x177f9
movq %rbx, %rdi
callq 0x6135
pushq $0x1
popq %rax
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O2/tylerneylon[P]APIsWithLua/lua/ldblib.c
// Function: db_gethook
static int db_gethook (lua_State *L) {
  int arg;
  lua_State *L1 = getthread(L, &arg);
  char buff[5];
  int mask = lua_gethookmask(L1);
  lua_Hook hook = lua_gethook(L1);
  if (hook == NULL)  /* no hook? */
    lua_pushnil(L);
  else if (hook != hookf)  /* external hook? */
    lua_pushliteral(L, "external hook");
  else {  /* hook table must exist */
    lua_rawgetp(L, LUA_REGISTRYINDEX, &HOOKKEY);
    checkstack(L, L1, 1);
    lua_pushthread(L1); lua_xmove(L1, L, 1);
    lua_rawget(L, -2);   /* 1st result = hooktable[L1] */
    lua_remove(L, -2);  /* remove hook table */
  }
  lua_pushstring(L, unmakemask(mask, buff));  /* 2nd result = mask */
  lua_pushinteger(L, lua_gethookcount(L1));  /* 3rd result = count */
  return 3;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x18, %rsp
movq %rdi, %rbx
leaq 0x14(%rsp), %rsi
callq 0x181a6
movq %rax, %r14
movq %rax, %rdi
callq 0x7328
movl %eax, %ebp
movq %r14, %rdi
callq 0x7320
testq %rax, %rax
je 0x1784c
leaq 0x9af(%rip), %rcx       # 0x181e5
cmpq %rcx, %rax
je 0x17856
leaq 0x9612(%rip), %rsi      # 0x20e54
movq %rbx, %rdi
callq 0x61d0
jmp 0x178ba
movq %rbx, %rdi
callq 0x6135
jmp 0x178ba
leaq 0x96d3(%rip), %rdx      # 0x20f30
movq %rbx, %rdi
movl $0xfff0b9d8, %esi       # imm = 0xFFF0B9D8
callq 0x660d
pushq $0x1
popq %r15
movq %rbx, %rdi
movq %r14, %rsi
movl %r15d, %edx
callq 0x1826a
movq %r14, %rdi
callq 0x63b4
movq %r14, %rdi
movq %rbx, %rsi
movl %r15d, %edx
callq 0x5a91
pushq $-0x2
popq %r15
movq %rbx, %rdi
movl %r15d, %esi
callq 0x6599
pushq $-0x1
popq %rdx
movq %rbx, %rdi
movl %r15d, %esi
callq 0x5b7f
movq %rbx, %rdi
movl %r15d, %esi
callq 0x5b31
xorl %eax, %eax
testb $0x1, %bpl
je 0x178ca
pushq $0x1
popq %rax
movb $0x63, 0xf(%rsp)
testb $0x2, %bpl
je 0x178d9
movl %eax, %ecx
incl %eax
movb $0x72, 0xf(%rsp,%rcx)
testb $0x4, %bpl
je 0x178e8
movl %eax, %ecx
incl %eax
movb $0x6c, 0xf(%rsp,%rcx)
movl %eax, %eax
movb $0x0, 0xf(%rsp,%rax)
leaq 0xf(%rsp), %rsi
movq %rbx, %rdi
callq 0x61d0
movq %r14, %rdi
callq 0x732f
movslq %eax, %rsi
movq %rbx, %rdi
callq 0x615b
pushq $0x3
popq %rax
addq $0x18, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/tylerneylon[P]APIsWithLua/lua/ldblib.c
// Function: db_getlocal
static int db_getlocal (lua_State *L) {
  int arg;
  lua_State *L1 = getthread(L, &arg);
  lua_Debug ar;
  const char *name;
  int nvar = (int)luaL_checkinteger(L, arg + 2);  /* local-variable index */
  if (lua_isfunction(L, arg + 1)) {  /* function argument? */
    lua_pushvalue(L, arg + 1);  /* push function */
    lua_pushstring(L, lua_getlocal(L, NULL, nvar));  /* push local name */
    return 1;  /* return only name (there is no value) */
  }
  else {  /* stack-level argument */
    int level = (int)luaL_checkinteger(L, arg + 1);
    if (!lua_getstack(L1, level, &ar))  /* out of range? */
      return luaL_argerror(L, arg+1, "level out of range");
    checkstack(L, L1, 1);
    name = lua_getlocal(L1, &ar, nvar);
    if (name) {
      lua_xmove(L1, L, 1);  /* move local value */
      lua_pushstring(L, name);  /* push name */
      lua_rotate(L, -2, 1);  /* re-order */
      return 2;
    }
    else {
      lua_pushnil(L);  /* no name (nor value) */
      return 1;
    }
  }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x90, %rsp
movq %rdi, %rbx
leaq 0xc(%rsp), %r15
movq %r15, %rsi
callq 0x181a6
movq %rax, %r14
movl (%r15), %r12d
leal 0x2(%r12), %esi
movq %rbx, %rdi
callq 0x13252
movq %rax, %r15
incl %r12d
movq %rbx, %rdi
movl %r12d, %esi
callq 0x5d12
movq %rbx, %rdi
cmpl $0x6, %eax
jne 0x17c22
movl %r12d, %esi
callq 0x5cee
movq %rbx, %rdi
xorl %esi, %esi
movl %r15d, %edx
callq 0x737c
movq %rbx, %rdi
movq %rax, %rsi
callq 0x61d0
pushq $0x1
jmp 0x17c8f
movl %r12d, %esi
callq 0x13252
leaq 0x10(%rsp), %rdx
movq %r14, %rdi
movl %eax, %esi
callq 0x7336
testl %eax, %eax
je 0x17c92
pushq $0x1
popq %rbp
movq %rbx, %rdi
movq %r14, %rsi
movl %ebp, %edx
callq 0x1826a
leaq 0x10(%rsp), %rsi
movq %r14, %rdi
movl %r15d, %edx
callq 0x737c
testq %rax, %rax
je 0x17ca8
movq %rax, %r15
pushq $0x1
popq %rbp
movq %r14, %rdi
movq %rbx, %rsi
movl %ebp, %edx
callq 0x5a91
movq %rbx, %rdi
movq %r15, %rsi
callq 0x61d0
pushq $-0x2
popq %rsi
movq %rbx, %rdi
movl %ebp, %edx
callq 0x5b7f
pushq $0x2
popq %rbp
jmp 0x17cb0
leaq 0x9255(%rip), %rdx      # 0x20eee
movq %rbx, %rdi
movl %r12d, %esi
callq 0x12af2
movl %eax, %ebp
jmp 0x17cb0
movq %rbx, %rdi
callq 0x6135
movl %ebp, %eax
addq $0x90, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/tylerneylon[P]APIsWithLua/lua/ldblib.c
// Function: db_getmetatable
static int db_getmetatable (lua_State *L) {
  luaL_checkany(L, 1);
  if (!lua_getmetatable(L, 1)) {
    lua_pushnil(L);  /* no metatable */
  }
  return 1;
}

// Assembly:
pushq %rbp
pushq %rbx
pushq %rax
movq %rdi, %rbx
pushq $0x1
popq %rbp
movl %ebp, %esi
callq 0x131a8
movq %rbx, %rdi
movl %ebp, %esi
callq 0x66b9
testl %eax, %eax
jne 0x17cf8
movq %rbx, %rdi
callq 0x6135
pushq $0x1
popq %rax
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/tylerneylon[P]APIsWithLua/lua/ldblib.c
// Function: db_upvaluejoin
static int db_upvaluejoin (lua_State *L) {
  int n1 = checkupval(L, 1, 2);
  int n2 = checkupval(L, 3, 4);
  luaL_argcheck(L, !lua_iscfunction(L, 1), 1, "Lua function expected");
  luaL_argcheck(L, !lua_iscfunction(L, 3), 3, "Lua function expected");
  lua_upvaluejoin(L, 1, n1, 3, n2);
  return 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
pushq $0x1
popq %r15
pushq $0x2
popq %rdx
movl %r15d, %esi
callq 0x183bc
movl %eax, %ebp
pushq $0x3
popq %rsi
pushq $0x4
popq %rdx
movq %rbx, %rdi
callq 0x183bc
movl %eax, %r14d
movq %rbx, %rdi
movl %r15d, %esi
callq 0x5d41
testl %eax, %eax
je 0x17d57
leaq 0x91b5(%rip), %rdx      # 0x20f01
pushq $0x1
popq %rsi
movq %rbx, %rdi
callq 0x12af2
pushq $0x3
popq %rsi
movq %rbx, %rdi
callq 0x5d41
testl %eax, %eax
je 0x17d78
leaq 0x9194(%rip), %rdx      # 0x20f01
pushq $0x3
popq %rsi
movq %rbx, %rdi
callq 0x12af2
pushq $0x1
popq %rsi
pushq $0x3
popq %rcx
movq %rbx, %rdi
movl %ebp, %edx
movl %r14d, %r8d
callq 0x7263
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/tylerneylon[P]APIsWithLua/lua/ldblib.c
// Function: db_setuservalue
static int db_setuservalue (lua_State *L) {
  luaL_checktype(L, 1, LUA_TUSERDATA);
  luaL_checkany(L, 2);
  lua_settop(L, 2);
  lua_setuservalue(L, 1);
  return 1;
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movq %rdi, %rbx
pushq $0x1
popq %rbp
pushq $0x7
popq %rdx
movl %ebp, %esi
callq 0x1315e
pushq $0x2
popq %r14
movq %rbx, %rdi
movl %r14d, %esi
callq 0x131a8
movq %rbx, %rdi
movl %r14d, %esi
callq 0x5b31
movq %rbx, %rdi
movl %ebp, %esi
callq 0x6b5f
movl %ebp, %eax
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/tylerneylon[P]APIsWithLua/lua/ldblib.c
// Function: db_setlocal
static int db_setlocal (lua_State *L) {
  int arg;
  const char *name;
  lua_State *L1 = getthread(L, &arg);
  lua_Debug ar;
  int level = (int)luaL_checkinteger(L, arg + 1);
  int nvar = (int)luaL_checkinteger(L, arg + 2);
  if (!lua_getstack(L1, level, &ar))  /* out of range? */
    return luaL_argerror(L, arg+1, "level out of range");
  luaL_checkany(L, arg+3);
  lua_settop(L, arg+3);
  checkstack(L, L1, 1);
  lua_xmove(L, L1, 1);
  name = lua_setlocal(L1, &ar, nvar);
  if (name == NULL)
    lua_pop(L1, 1);  /* pop value (if not popped by 'lua_setlocal') */
  lua_pushstring(L, name);
  return 1;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x88, %rsp
movq %rdi, %rbx
leaq 0x4(%rsp), %r15
movq %r15, %rsi
callq 0x181a6
movq %rax, %r14
movl (%r15), %r12d
leal 0x1(%r12), %ebp
movq %rbx, %rdi
movl %ebp, %esi
callq 0x13252
movq %rax, %r13
leal 0x2(%r12), %esi
movq %rbx, %rdi
callq 0x13252
movq %rax, %r15
leaq 0x8(%rsp), %rdx
movq %r14, %rdi
movl %r13d, %esi
callq 0x7336
testl %eax, %eax
je 0x18093
addl $0x3, %r12d
movq %rbx, %rdi
movl %r12d, %esi
callq 0x131a8
movq %rbx, %rdi
movl %r12d, %esi
callq 0x5b31
pushq $0x1
popq %rbp
movq %rbx, %rdi
movq %r14, %rsi
movl %ebp, %edx
callq 0x1826a
movq %rbx, %rdi
movq %r14, %rsi
movl %ebp, %edx
callq 0x5a91
leaq 0x8(%rsp), %rsi
movq %r14, %rdi
movl %r15d, %edx
callq 0x7504
movq %rax, %r15
testq %rax, %rax
jne 0x18086
pushq $-0x2
popq %rsi
movq %r14, %rdi
callq 0x5b31
movq %rbx, %rdi
movq %r15, %rsi
callq 0x61d0
jmp 0x180a6
leaq 0x8e54(%rip), %rdx      # 0x20eee
movq %rbx, %rdi
movl %ebp, %esi
callq 0x12af2
movl %eax, %ebp
movl %ebp, %eax
addq $0x88, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/tylerneylon[P]APIsWithLua/lua/ldblib.c
// Function: db_setmetatable
static int db_setmetatable (lua_State *L) {
  int t = lua_type(L, 2);
  luaL_argcheck(L, t == LUA_TNIL || t == LUA_TTABLE, 2,
                    "nil or table expected");
  lua_settop(L, 2);
  lua_setmetatable(L, 1);
  return 1;  /* return 1st argument */
}

// Assembly:
pushq %rbp
pushq %rbx
pushq %rax
movq %rdi, %rbx
pushq $0x2
popq %rsi
callq 0x5d12
testl %eax, %eax
je 0x180e3
cmpl $0x5, %eax
je 0x180e3
leaq 0x8bd5(%rip), %rdx      # 0x20cad
pushq $0x2
popq %rsi
movq %rbx, %rdi
callq 0x12af2
pushq $0x2
popq %rsi
movq %rbx, %rdi
callq 0x5b31
pushq $0x1
popq %rbp
movq %rbx, %rdi
movl %ebp, %esi
callq 0x6ad0
movl %ebp, %eax
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/tylerneylon[P]APIsWithLua/lua/ldblib.c
// Function: db_traceback
static int db_traceback (lua_State *L) {
  int arg;
  lua_State *L1 = getthread(L, &arg);
  const char *msg = lua_tostring(L, arg + 1);
  if (msg == NULL && !lua_isnoneornil(L, arg + 1))  /* non-string 'msg'? */
    lua_pushvalue(L, arg + 1);  /* return it untouched */
  else {
    int level = (int)luaL_optinteger(L, arg + 2, (L == L1) ? 1 : 0);
    luaL_traceback(L, L1, msg, level);
  }
  return 1;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x10, %rsp
movq %rdi, %rbx
leaq 0xc(%rsp), %r15
movq %r15, %rsi
callq 0x181a6
movq %rax, %r14
movl (%r15), %r15d
leal 0x1(%r15), %ebp
movq %rbx, %rdi
movl %ebp, %esi
xorl %edx, %edx
callq 0x5fca
movq %rax, %r12
testq %rax, %rax
je 0x1817e
addl $0x2, %r15d
xorl %edx, %edx
cmpq %rbx, %r14
sete %dl
movq %rbx, %rdi
movl %r15d, %esi
callq 0x132b0
movq %rbx, %rdi
movq %r14, %rsi
movq %r12, %rdx
movl %eax, %ecx
callq 0x12814
jmp 0x18196
movq %rbx, %rdi
movl %ebp, %esi
callq 0x5d12
testl %eax, %eax
jle 0x18155
movq %rbx, %rdi
movl %ebp, %esi
callq 0x5cee
pushq $0x1
popq %rax
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/tylerneylon[P]APIsWithLua/lua/ldblib.c
// Function: getthread
static lua_State *getthread (lua_State *L, int *arg) {
  if (lua_isthread(L, 1)) {
    *arg = 1;
    return lua_tothread(L, 1);
  }
  else {
    *arg = 0;
    return L;  /* function will operate over current thread */
  }
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %rbx
pushq $0x1
popq %rsi
callq 0x5d12
cmpl $0x8, %eax
jne 0x181d6
movl $0x1, (%r14)
pushq $0x1
popq %rsi
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x60dd
andl $0x0, (%r14)
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O2/tylerneylon[P]APIsWithLua/lua/ldblib.c
// Function: hookf
static void hookf (lua_State *L, lua_Debug *ar) {
  static const char *const hooknames[] =
    {"call", "return", "line", "count", "tail call"};
  lua_rawgetp(L, LUA_REGISTRYINDEX, &HOOKKEY);
  lua_pushthread(L);
  if (lua_rawget(L, -2) == LUA_TFUNCTION) {  /* is there a hook function? */
    lua_pushstring(L, hooknames[(int)ar->event]);  /* push event name */
    if (ar->currentline >= 0)
      lua_pushinteger(L, ar->currentline);  /* push current line */
    else lua_pushnil(L);
    lua_assert(lua_getinfo(L, "lS", ar));
    lua_call(L, 2, 0);  /* call hook function */
  }
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %rbx
leaq 0x8d3a(%rip), %rdx      # 0x20f30
movl $0xfff0b9d8, %esi       # imm = 0xFFF0B9D8
callq 0x660d
movq %rbx, %rdi
callq 0x63b4
pushq $-0x2
popq %rsi
movq %rbx, %rdi
callq 0x6599
cmpl $0x6, %eax
jne 0x18244
movslq (%r14), %rax
leaq 0x8d12(%rip), %rcx      # 0x20f34
movslq (%rcx,%rax,4), %rsi
addq %rcx, %rsi
movq %rbx, %rdi
callq 0x61d0
movslq 0x28(%r14), %rsi
movq %rbx, %rdi
testq %rsi, %rsi
js 0x1824c
callq 0x615b
jmp 0x18251
addq $0x8, %rsp
popq %rbx
popq %r14
retq
callq 0x6135
pushq $0x2
popq %rsi
movq %rbx, %rdi
xorl %edx, %edx
xorl %ecx, %ecx
xorl %r8d, %r8d
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x6bb0
// File: /workspace/github_c_makefile_star2_O2/tylerneylon[P]APIsWithLua/lua/ldblib.c
// Function: treatstackoption
static void treatstackoption (lua_State *L, lua_State *L1, const char *fname) {
  if (L == L1)
    lua_rotate(L, -2, 1);  /* exchange object and table */
  else
    lua_xmove(L1, L, 1);  /* move object to the "main" stack */
  lua_setfield(L, -2, fname);  /* put object into table */
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdx, %rbx
movq %rdi, %r14
cmpq %rsi, %rdi
je 0x18328
pushq $0x1
popq %rdx
movq %rsi, %rdi
movq %r14, %rsi
callq 0x5a91
jmp 0x18336
pushq $-0x2
popq %rsi
pushq $0x1
popq %rdx
movq %r14, %rdi
callq 0x5b7f
pushq $-0x2
popq %rsi
movq %r14, %rdi
movq %rbx, %rdx
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x68b9
// File: /workspace/github_c_makefile_star2_O2/tylerneylon[P]APIsWithLua/lua/ldblib.c
// Function: auxupvalue
static int auxupvalue (lua_State *L, int get) {
  const char *name;
  int n = (int)luaL_checkinteger(L, 2);  /* upvalue index */
  luaL_checktype(L, 1, LUA_TFUNCTION);  /* closure */
  name = get ? lua_getupvalue(L, 1, n) : lua_setupvalue(L, 1, n);
  if (name == NULL) return 0;
  lua_pushstring(L, name);
  lua_insert(L, -(get+1));  /* no-op if get is false */
  return get + 1;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movl %esi, %ebx
movq %rdi, %r14
pushq $0x2
popq %rsi
callq 0x13252
movq %rax, %r15
pushq $0x1
popq %rsi
pushq $0x6
popq %rdx
movq %r14, %rdi
callq 0x1315e
pushq $0x1
popq %rsi
movq %r14, %rdi
movl %r15d, %edx
testl %ebx, %ebx
je 0x18384
callq 0x7042
jmp 0x18389
callq 0x711d
testq %rax, %rax
je 0x183ad
movq %r14, %rdi
movq %rax, %rsi
callq 0x61d0
leal 0x1(%rbx), %ebp
notl %ebx
pushq $0x1
popq %rdx
movq %r14, %rdi
movl %ebx, %esi
callq 0x5b7f
jmp 0x183af
xorl %ebp, %ebp
movl %ebp, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/tylerneylon[P]APIsWithLua/lua/ldblib.c
// Function: checkupval
static int checkupval (lua_State *L, int argf, int argnup) {
  int nup = (int)luaL_checkinteger(L, argnup);  /* upvalue index */
  luaL_checktype(L, argf, LUA_TFUNCTION);  /* closure */
  luaL_argcheck(L, (lua_getupvalue(L, argf, nup) != NULL), argnup,
                   "invalid upvalue index");
  return nup;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movl %edx, %ebx
movl %esi, %ebp
movq %rdi, %r14
movl %edx, %esi
callq 0x13252
movq %rax, %r15
pushq $0x6
popq %rdx
movq %r14, %rdi
movl %ebp, %esi
callq 0x1315e
movq %r14, %rdi
movl %ebp, %esi
movl %r15d, %edx
callq 0x7042
testq %rax, %rax
jne 0x18404
leaq 0x8b1d(%rip), %rdx      # 0x20f17
movq %r14, %rdi
movl %ebx, %esi
callq 0x12af2
movl %r15d, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
nop