LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O2/tylerneylon[P]APIsWithLua/lua/ltable.c
// Function: luaH_getshortstr
const TValue *luaH_getshortstr (Table *t, TString *key) {
  Node *n = hashstr(t, key);
  lua_assert(key->tt == LUA_TSHRSTR);
  for (;;) {  /* check whether 'key' is somewhere in the chain */
    const TValue *k = gkey(n);
    if (ttisshrstring(k) && eqshrstr(tsvalue(k), key))
      return gval(n);  /* that's it */
    else {
      int nx = gnext(n);
      if (nx == 0)
        return luaO_nilobject;  /* not found */
      n += nx;
    }
  }
}

// Assembly:
movb 0xb(%rdi), %cl
pushq $-0x1
popq %rax
shll %cl, %eax
notl %eax
andl 0xc(%rsi), %eax
shlq $0x5, %rax
addq 0x18(%rdi), %rax
leaq 0x1046b(%rip), %rcx     # 0x1f670
cmpl $0x44, 0x18(%rax)
jne 0xf211
cmpq %rsi, 0x10(%rax)
je 0xf227
movslq 0x1c(%rax), %rdx
movq %rdx, %rdi
shlq $0x5, %rdi
addq %rdi, %rax
testq %rdx, %rdx
jne 0xf205
movq %rcx, %rax
retq
// File: /workspace/github_c_makefile_star2_O2/tylerneylon[P]APIsWithLua/lua/ltable.c
// Function: getgeneric
static const TValue *getgeneric (Table *t, const TValue *key) {
  Node *n = mainposition(t, key);
  for (;;) {  /* check whether 'key' is somewhere in the chain */
    if (luaV_rawequalobj(gkey(n), key))
      return gval(n);  /* that's it */
    else {
      int nx = gnext(n);
      if (nx == 0)
        return luaO_nilobject;  /* not found */
      n += nx;
    }
  }
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rsi, %rbx
callq 0xf0a2
movq %rax, %r14
leaq 0x10405(%rip), %r15     # 0x1f670
leaq 0x10(%r14), %rsi
xorl %edi, %edi
movq %rbx, %rdx
callq 0x104c8
testl %eax, %eax
jne 0xf293
movslq 0x1c(%r14), %rax
movq %rax, %rcx
shlq $0x5, %rcx
addq %rcx, %r14
testq %rax, %rax
jne 0xf26b
movq %r15, %r14
movq %r14, %rax
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/tylerneylon[P]APIsWithLua/lua/ltable.c
// Function: luaH_get
const TValue *luaH_get (Table *t, const TValue *key) {
  switch (ttype(key)) {
    case LUA_TSHRSTR: return luaH_getshortstr(t, tsvalue(key));
    case LUA_TNUMINT: return luaH_getint(t, ivalue(key));
    case LUA_TNIL: return luaO_nilobject;
    case LUA_TNUMFLT: {
      lua_Integer k;
      if (luaV_tointeger(key, &k, 0)) /* index is int? */
        return luaH_getint(t, k);  /* use specialized version */
      /* else... */
    }  /* FALLTHROUGH */
    default:
      return getgeneric(t, key);
  }
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movl 0x8(%rsi), %eax
andl $0x3f, %eax
je 0xf30d
movq %rsi, %r14
movq %rdi, %rbx
cmpl $0x3, %eax
je 0xf2cf
cmpl $0x13, %eax
je 0xf2fb
cmpl $0x4, %eax
jne 0xf2ee
movq (%r14), %rsi
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0xf1e9
movq %rsp, %rsi
movq %r14, %rdi
xorl %edx, %edx
callq 0xfed4
testl %eax, %eax
je 0xf2ee
movq (%rsp), %rsi
movq %rbx, %rdi
callq 0xf194
jmp 0xf314
movq %rbx, %rdi
movq %r14, %rsi
callq 0xf254
jmp 0xf314
movq (%r14), %rsi
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0xf194
leaq 0x1035c(%rip), %rax     # 0x1f670
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O2/tylerneylon[P]APIsWithLua/lua/ltable.c
// Function: luaH_getn
int luaH_getn (Table *t) {
  unsigned int j = t->sizearray;
  if (j > 0 && ttisnil(&t->array[j - 1])) {
    /* there is a boundary in the array part: (binary) search for it */
    unsigned int i = 0;
    while (j - i > 1) {
      unsigned int m = (i+j)/2;
      if (ttisnil(&t->array[m - 1])) j = m;
      else i = m;
    }
    return i;
  }
  /* else must find a boundary in hash part */
  else if (isdummy(t->node))  /* hash part is empty? */
    return j;  /* that is easy... */
  else return unbound_search(t, j);
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
movl 0xc(%rdi), %r15d
testl %r15d, %r15d
je 0xf347
movq 0x10(%rbx), %rax
leal -0x1(%r15), %ecx
shlq $0x4, %rcx
cmpl $0x0, 0x8(%rax,%rcx)
je 0xf3d6
leaq 0x10992(%rip), %rax     # 0x1fce0
cmpq %rax, 0x18(%rbx)
je 0xf3a9
leal 0x1(%r15), %eax
movl %eax, %r12d
movl %eax, %esi
movq %rbx, %rdi
callq 0xf194
cmpl $0x0, 0x8(%rax)
je 0xf39e
cmpl $0x40000000, %r12d      # imm = 0x40000000
jae 0xf3ae
leal (%r12,%r12), %eax
movl %r12d, %r15d
jmp 0xf358
leal (%r15,%r12), %r14d
shrl %r14d
movq %rbx, %rdi
movq %r14, %rsi
callq 0xf194
cmpl $0x0, 0x8(%rax)
jne 0xf39b
movl %r14d, %r12d
movl %r15d, %r14d
movl %r14d, %r15d
movl %r12d, %eax
subl %r15d, %eax
cmpl $0x2, %eax
jae 0xf37d
movl %r15d, %r14d
jmp 0xf3c7
pushq $-0x1
popq %r14
leal 0x2(%r14), %esi
movq %rbx, %rdi
callq 0xf194
incl %r14d
cmpl $0x0, 0x8(%rax)
jne 0xf3b2
movl %r14d, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
xorl %r14d, %r14d
movl %r15d, %ecx
subl %r14d, %ecx
cmpl $0x2, %ecx
jb 0xf3c7
leal (%r14,%r15), %ecx
shrl %ecx
leal -0x1(%rcx), %edx
shlq $0x4, %rdx
cmpl $0x0, 0x8(%rax,%rdx)
jne 0xf3fe
movl %ecx, %r15d
movl %r14d, %ecx
movl %ecx, %r14d
jmp 0xf3d9
// File: /workspace/github_c_makefile_star2_O2/tylerneylon[P]APIsWithLua/lua/ltable.c
// Function: countint
static int countint (const TValue *key, unsigned int *nums) {
  unsigned int k = arrayindex(key);
  if (k != 0) {  /* is 'key' an appropriate array index? */
    nums[luaO_ceillog2(k)]++;  /* count as such */
    return 1;
  }
  else
    return 0;
}

// Assembly:
xorl %eax, %eax
cmpl $0x13, 0x8(%rdi)
jne 0xf436
movq (%rdi), %rdi
movabsq $-0x80000001, %rcx      # imm = 0xFFFFFFFF7FFFFFFF
addq %rdi, %rcx
cmpq $-0x80000000, %rcx      # imm = 0x80000000
jb 0xf436
pushq %rbx
movq %rsi, %rbx
callq 0xac47
cltq
incl (%rbx,%rax,4)
pushq $0x1
popq %rax
popq %rbx
retq
nop
// File: /workspace/github_c_makefile_star2_O2/tylerneylon[P]APIsWithLua/lua/ltm.c
// Function: luaT_init
void luaT_init (lua_State *L) {
  static const char *const luaT_eventname[] = {  /* ORDER TM */
    "__index", "__newindex",
    "__gc", "__mode", "__len", "__eq",
    "__add", "__sub", "__mul", "__mod", "__pow",
    "__div", "__idiv",
    "__band", "__bor", "__bxor", "__shl", "__shr",
    "__unm", "__bnot", "__lt", "__le",
    "__concat", "__call"
  };
  int i;
  for (i=0; i<TM_N; i++) {
    G(L)->tmname[i] = luaS_new(L, luaT_eventname[i]);
    luaC_fix(L, obj2gco(G(L)->tmname[i]));  /* never collect these names */
  }
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %rbx
xorl %r14d, %r14d
leaq 0x10a02(%rip), %r15     # 0x1fe4c
cmpq $0x60, %r14
je 0xf485
movslq (%r14,%r15), %rsi
addq %r15, %rsi
movq %rbx, %rdi
callq 0xe823
movq 0x18(%rbx), %rcx
movq %rax, 0xe0(%rcx,%r14,2)
movq 0x18(%rbx), %rax
movq 0xe0(%rax,%r14,2), %rsi
movq %rbx, %rdi
callq 0x9853
addq $0x4, %r14
jmp 0xf44a
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/tylerneylon[P]APIsWithLua/lua/ltm.c
// Function: luaT_gettm
const TValue *luaT_gettm (Table *events, TMS event, TString *ename) {
  const TValue *tm = luaH_getshortstr(events, ename);
  lua_assert(event <= TM_EQ);
  if (ttisnil(tm)) {  /* no tag method? */
    events->flags |= cast_byte(1u<<event);  /* cache this fact */
    return NULL;
  }
  else return tm;
}

// Assembly:
pushq %rbp
pushq %rbx
pushq %rax
movl %esi, %ebp
movq %rdi, %rbx
movq %rdx, %rsi
callq 0xf1e9
cmpl $0x0, 0x8(%rax)
jne 0xf4ad
pushq $0x1
popq %rax
movl %ebp, %ecx
shll %cl, %eax
orb %al, 0xa(%rbx)
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/tylerneylon[P]APIsWithLua/lua/ltm.c
// Function: luaT_gettmbyobj
const TValue *luaT_gettmbyobj (lua_State *L, const TValue *o, TMS event) {
  Table *mt;
  switch (ttnov(o)) {
    case LUA_TTABLE:
      mt = hvalue(o)->metatable;
      break;
    case LUA_TUSERDATA:
      mt = uvalue(o)->metatable;
      break;
    default:
      mt = G(L)->mt[ttnov(o)];
  }
  return (mt ? luaH_getshortstr(mt, G(L)->tmname[event]) : luaO_nilobject);
}

// Assembly:
movl 0x8(%rsi), %eax
andl $0xf, %eax
cmpq $0x7, %rax
je 0xf4ce
cmpl $0x5, %eax
jne 0xf4d7
movq (%rsi), %rax
addq $0x28, %rax
jmp 0xf4e5
movq (%rsi), %rax
addq $0x10, %rax
jmp 0xf4e5
movq 0x18(%rdi), %rcx
leaq (%rcx,%rax,8), %rax
addq $0x1a0, %rax            # imm = 0x1A0
movq (%rax), %rax
testq %rax, %rax
je 0xf503
movq 0x18(%rdi), %rcx
movl %edx, %edx
movq 0xe0(%rcx,%rdx,8), %rsi
movq %rax, %rdi
jmp 0xf1e9
leaq 0x10166(%rip), %rax     # 0x1f670
retq
// File: /workspace/github_c_makefile_star2_O2/tylerneylon[P]APIsWithLua/lua/ltm.c
// Function: luaT_objtypename
const char *luaT_objtypename (lua_State *L, const TValue *o) {
  Table *mt;
  if ((ttistable(o) && (mt = hvalue(o)->metatable) != NULL) ||
      (ttisfulluserdata(o) && (mt = uvalue(o)->metatable) != NULL)) {
    const TValue *name = luaH_getshortstr(mt, luaS_new(L, "__name"));
    if (ttisstring(name))  /* is '__name' a string? */
      return getstr(tsvalue(name));  /* use it as type name */
  }
  return ttypename(ttnov(o));  /* else use standard type name */
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
movl 0x8(%rsi), %eax
cmpl $0x47, %eax
je 0xf52f
cmpl $0x45, %eax
jne 0xf56e
movq (%rbx), %rax
movq 0x28(%rax), %r14
testq %r14, %r14
jne 0xf53b
pushq $0x45
jmp 0xf56d
movq (%rbx), %rax
movq 0x10(%rax), %r14
testq %r14, %r14
je 0xf56b
leaq 0x108c3(%rip), %rsi     # 0x1fe05
callq 0xe823
movq %r14, %rdi
movq %rax, %rsi
callq 0xf1e9
movl 0x8(%rax), %ecx
andl $0xf, %ecx
cmpl $0x4, %ecx
jne 0xf566
movq (%rax), %rax
addq $0x18, %rax
jmp 0xf57d
movl 0x8(%rbx), %eax
jmp 0xf56e
pushq $0x47
popq %rax
andl $0xf, %eax
leaq 0x1eb68(%rip), %rcx     # 0x2e0e0
movq 0x8(%rcx,%rax,8), %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O2/tylerneylon[P]APIsWithLua/lua/ltm.c
// Function: luaT_callTM
void luaT_callTM (lua_State *L, const TValue *f, const TValue *p1,
                  const TValue *p2, TValue *p3, int hasres) {
  ptrdiff_t result = savestack(L, p3);
  StkId func = L->top;
  setobj2s(L, func, f);  /* push function (assume EXTRA_STACK) */
  setobj2s(L, func + 1, p1);  /* 1st argument */
  setobj2s(L, func + 2, p2);  /* 2nd argument */
  L->top += 3;
  if (!hasres)  /* no result? 'p3' is third argument */
    setobj2s(L, L->top++, p3);  /* 3rd argument */
  /* metamethod may yield only when called from Lua code */
  if (isLua(L->ci))
    luaD_call(L, func, hasres);
  else
    luaD_callnoyield(L, func, hasres);
  if (hasres) {  /* if has result, move it to its place */
    p3 = restorestack(L, result);
    setobjs2s(L, p3, --L->top);
  }
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movl %r9d, %ebp
movq %rdi, %rbx
movq %r8, %r14
subq 0x38(%rdi), %r14
movq %rsi, %rax
movq 0x10(%rdi), %rsi
movups (%rax), %xmm0
movups %xmm0, (%rsi)
movups (%rdx), %xmm0
movups %xmm0, 0x10(%rsi)
movups (%rcx), %xmm0
movups %xmm0, 0x20(%rsi)
movq 0x10(%rdi), %rcx
leaq 0x30(%rcx), %rax
movq %rax, 0x10(%rdi)
testl %r9d, %r9d
jne 0xf5d1
addq $0x40, %rcx
movq %rcx, 0x10(%rbx)
movups (%r8), %xmm0
movups %xmm0, (%rax)
movq 0x20(%rbx), %rax
testb $0x2, 0x42(%rax)
jne 0xf5e7
movq %rbx, %rdi
movl %ebp, %edx
callq 0x89f0
jmp 0xf5f1
movq %rbx, %rdi
movl %ebp, %edx
callq 0x8995
testl %ebp, %ebp
je 0xf60e
movq 0x10(%rbx), %rax
movq 0x38(%rbx), %rcx
leaq -0x10(%rax), %rdx
movq %rdx, 0x10(%rbx)
movups -0x10(%rax), %xmm0
movups %xmm0, (%rcx,%r14)
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/tylerneylon[P]APIsWithLua/lua/ltm.c
// Function: luaT_callbinTM
int luaT_callbinTM (lua_State *L, const TValue *p1, const TValue *p2,
                    StkId res, TMS event) {
  const TValue *tm = luaT_gettmbyobj(L, p1, event);  /* try first operand */
  if (ttisnil(tm))
    tm = luaT_gettmbyobj(L, p2, event);  /* try second operand */
  if (ttisnil(tm)) return 0;
  luaT_callTM(L, tm, p1, p2, res, 1);
  return 1;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movl %r8d, %ebp
movq %rcx, %rbx
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %r12
movl %r8d, %edx
callq 0xf4b4
cmpl $0x0, 0x8(%rax)
jne 0xf64b
movq %r12, %rdi
movq %r14, %rsi
movl %ebp, %edx
callq 0xf4b4
cmpl $0x0, 0x8(%rax)
je 0xf670
pushq $0x1
popq %rbp
movq %r12, %rdi
movq %rax, %rsi
movq %r15, %rdx
movq %r14, %rcx
movq %rbx, %r8
movl %ebp, %r9d
callq 0xf585
movl %ebp, %eax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
xorl %ebp, %ebp
jmp 0xf665
// File: /workspace/github_c_makefile_star2_O2/tylerneylon[P]APIsWithLua/lua/ltm.c
// Function: luaT_trybinTM
void luaT_trybinTM (lua_State *L, const TValue *p1, const TValue *p2,
                    StkId res, TMS event) {
  if (!luaT_callbinTM(L, p1, p2, res, event)) {
    switch (event) {
      case TM_CONCAT:
        luaG_concaterror(L, p1, p2);
      /* call never returns, but to avoid warnings: *//* FALLTHROUGH */
      case TM_BAND: case TM_BOR: case TM_BXOR:
      case TM_SHL: case TM_SHR: case TM_BNOT: {
        lua_Number dummy;
        if (tonumber(p1, &dummy) && tonumber(p2, &dummy))
          luaG_tointerror(L, p1, p2);
        else
          luaG_opinterror(L, p1, p2, "perform bitwise operation on");
      }
      /* calls never return, but to avoid warnings: *//* FALLTHROUGH */
      default:
        luaG_opinterror(L, p1, p2, "perform arithmetic on");
    }
  }
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movl %r8d, %r12d
movq %rdx, %rbx
movq %rsi, %r14
movq %rdi, %r15
callq 0xf613
testl %eax, %eax
je 0xf69d
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
leal -0xd(%r12), %eax
cmpl $0x5, %eax
jae 0xf6ba
cmpl $0x3, 0x8(%r14)
jne 0xf6d4
movsd (%r14), %xmm0
movsd %xmm0, (%rsp)
jmp 0xf6e3
cmpl $0x13, %r12d
je 0xf6a7
cmpl $0x16, %r12d
jne 0xf71a
movq %r15, %rdi
movq %r14, %rsi
movq %rbx, %rdx
callq 0x7acb
movq %rsp, %rsi
movq %r14, %rdi
callq 0xfe58
testl %eax, %eax
je 0xf703
cmpl $0x3, 0x8(%rbx)
jne 0xf6f4
movsd (%rbx), %xmm0
movsd %xmm0, (%rsp)
jmp 0xf70c
movq %rsp, %rsi
movq %rbx, %rdi
callq 0xfe58
testl %eax, %eax
jne 0xf70c
leaq 0x10702(%rip), %rcx     # 0x1fe0c
jmp 0xf721
movq %r15, %rdi
movq %r14, %rsi
movq %rbx, %rdx
callq 0x7b2e
leaq 0x10708(%rip), %rcx     # 0x1fe29
movq %r15, %rdi
movq %r14, %rsi
movq %rbx, %rdx
callq 0x7ae8
// File: /workspace/github_c_makefile_star2_O2/tylerneylon[P]APIsWithLua/lua/lundump.c
// Function: luaU_undump
LClosure *luaU_undump(lua_State *L, ZIO *Z, const char *name) {
  LoadState S;
  LClosure *cl;
  if (*name == '@' || *name == '=')
    S.name = name + 1;
  else if (*name == LUA_SIGNATURE[0])
    S.name = "binary string";
  else
    S.name = name;
  S.L = L;
  S.Z = Z;
  checkHeader(&S);
  cl = luaF_newLclosure(L, LoadByte(&S));
  setclLvalue(L, L->top, cl);
  luaD_inctop(L);
  cl->p = luaF_newproto(L);
  LoadFunction(&S, cl->p, NULL);
  lua_assert(cl->nupvalues == cl->p->sizeupvalues);
  luai_verifycode(L, buff, cl->p);
  return cl;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rdi, %rbx
movzbl (%rdx), %eax
cmpl $0x1b, %eax
je 0xf78d
cmpl $0x40, %eax
je 0xf788
cmpl $0x3d, %eax
jne 0xf794
incq %rdx
jmp 0xf794
leaq 0x1072c(%rip), %rdx     # 0x1fec0
movq %rsp, %r14
movq %rdx, 0x10(%r14)
movq %rbx, (%r14)
movq %rsi, 0x8(%r14)
leaq 0xfd18(%rip), %rsi      # 0x1f4c1
leaq 0x1071e(%rip), %rdx     # 0x1fece
movq %r14, %rdi
callq 0xfc7b
movq %r14, %rdi
callq 0xf8f8
cmpb $0x53, %al
jne 0xf8ce
movq %rsp, %rdi
callq 0xf8f8
testb %al, %al
jne 0xf8d7
leaq 0xfce6(%rip), %rsi      # 0x1f4c5
leaq 0x10702(%rip), %rdx     # 0x1fee8
movq %rsp, %r14
movq %r14, %rdi
callq 0xfc7b
leaq 0x12320(%rip), %rdx     # 0x21b18
pushq $0x4
popq %r15
movq %r14, %rdi
movq %r15, %rsi
callq 0xfd01
leaq 0x106e4(%rip), %rdx     # 0x1fef2
pushq $0x8
popq %r12
movq %r14, %rdi
movq %r12, %rsi
callq 0xfd01
leaq 0x106d5(%rip), %rdx     # 0x1fef9
movq %r14, %rdi
movq %r15, %rsi
callq 0xfd01
leaq 0x106cf(%rip), %rdx     # 0x1ff05
movq %r14, %rdi
movq %r12, %rsi
callq 0xfd01
leaq 0x106c9(%rip), %rdx     # 0x1ff11
movq %r14, %rdi
movq %r12, %rsi
callq 0xfd01
movq %r14, %rdi
callq 0xfd41
cmpq $0x5678, %rax           # imm = 0x5678
jne 0xf8e0
movq %rsp, %rdi
callq 0xfd5f
ucomisd 0xfc45(%rip), %xmm0     # 0x1f4b8
jne 0xf8e9
jp 0xf8e9
movq %rsp, %r14
movq %r14, %rdi
callq 0xf8f8
movzbl %al, %esi
movq %rbx, %rdi
callq 0x94bf
movq %rax, %r15
movq 0x10(%rbx), %rax
movq %r15, (%rax)
movl $0x46, 0x8(%rax)
movq %rbx, %rdi
callq 0x8447
movq %rbx, %rdi
callq 0x961d
movq %rax, 0x18(%r15)
movq %r14, %rdi
movq %rax, %rsi
xorl %edx, %edx
callq 0xf915
movq %r15, %rax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
leaq 0x105ff(%rip), %rsi     # 0x1fed4
jmp 0xf8f0
leaq 0x1065b(%rip), %rsi     # 0x1ff39
jmp 0xf8f0
leaq 0x10635(%rip), %rsi     # 0x1ff1c
jmp 0xf8f0
leaq 0x10643(%rip), %rsi     # 0x1ff33
movq %rsp, %rdi
callq 0xfcda
// File: /workspace/github_c_makefile_star2_O2/tylerneylon[P]APIsWithLua/lua/lundump.c
// Function: checkliteral
static void checkliteral (LoadState *S, const char *s, const char *msg) {
  char buff[sizeof(LUA_SIGNATURE) + sizeof(LUAC_DATA)]; /* larger than both */
  size_t len = strlen(s);
  LoadVector(S, buff, len);
  if (memcmp(s, buff, len) != 0)
    error(S, msg);
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x10, %rsp
movq %rdx, %rbx
movq %rsi, %r15
movq %rdi, %r14
movq %rsi, %rdi
callq 0x5140
movq %rax, %r12
leaq 0x4(%rsp), %r13
movq %r14, %rdi
movq %r13, %rsi
movq %rax, %rdx
callq 0xfd7e
movq %r15, %rdi
movq %r13, %rsi
movq %r12, %rdx
callq 0x5370
testl %eax, %eax
jne 0xfccf
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
movq %r14, %rdi
movq %rbx, %rsi
callq 0xfcda
// File: /workspace/github_c_makefile_star2_O2/tylerneylon[P]APIsWithLua/lua/lundump.c
// Function: LoadString
static TString *LoadString (LoadState *S) {
  size_t size = LoadByte(S);
  if (size == 0xFF)
    LoadVar(S, size);
  if (size == 0)
    return NULL;
  else if (--size <= LUAI_MAXSHORTLEN) {  /* short string? */
    char buff[LUAI_MAXSHORTLEN];
    LoadVector(S, buff, size);
    return luaS_newlstr(S->L, buff, size);
  }
  else {  /* long string */
    TString *ts = luaS_createlngstrobj(S->L, size);
    LoadVector(S, getstr(ts), size);  /* load directly in final place */
    return ts;
  }
}

// Assembly:
pushq %r14
pushq %rbx
subq $0x38, %rsp
movq %rdi, %rbx
callq 0xf8f8
movzbl %al, %eax
movq %rax, 0x8(%rsp)
cmpb $-0x1, %al
jne 0xfdd2
leaq 0x8(%rsp), %r14
pushq $0x8
popq %rdx
movq %rbx, %rdi
movq %r14, %rsi
callq 0xfd7e
movq (%r14), %rax
testq %rax, %rax
je 0xfe0b
leaq -0x1(%rax), %rdx
movq %rdx, 0x8(%rsp)
cmpq $0x29, %rax
ja 0xfe10
leaq 0x10(%rsp), %r14
movq %rbx, %rdi
movq %r14, %rsi
callq 0xfd7e
movq (%rbx), %rdi
movq 0x8(%rsp), %rdx
movq %r14, %rsi
callq 0xe658
movq %rax, %r14
jmp 0xfe2f
xorl %r14d, %r14d
jmp 0xfe2f
movq (%rbx), %rdi
movq %rdx, %rsi
callq 0xe7ab
movq %rax, %r14
leaq 0x18(%rax), %rsi
movq 0x8(%rsp), %rdx
movq %rbx, %rdi
callq 0xfd7e
movq %r14, %rax
addq $0x38, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O2/tylerneylon[P]APIsWithLua/lua/lvm.c
// Function: luaV_tonumber_
int luaV_tonumber_ (const TValue *obj, lua_Number *n) {
  TValue v;
  if (ttisinteger(obj)) {
    *n = cast_num(ivalue(obj));
    return 1;
  }
  else if (cvt2num(obj) &&  /* string convertible to number? */
            luaO_str2num(svalue(obj), &v) == vslen(obj) + 1) {
    *n = nvalue(&v);  /* convert result of 'luaO_str2num' to a float */
    return 1;
  }
  else
    return 0;  /* conversion failed */
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq %rsi, %rbx
movq %rdi, %r14
movl 0x8(%rdi), %eax
cmpl $0x13, %eax
jne 0xfe7c
cvtsi2sdq (%r14), %xmm0
movsd %xmm0, (%rbx)
pushq $0x1
popq %rbp
jmp 0xfec2
andl $0xf, %eax
xorl %ebp, %ebp
cmpl $0x4, %eax
jne 0xfec2
movq (%r14), %rdi
addq $0x18, %rdi
movq %rsp, %rsi
callq 0xaf5a
movq (%r14), %rcx
cmpb $0x4, 0x8(%rcx)
jne 0xfea4
movzbl 0xb(%rcx), %ecx
jmp 0xfea8
movq 0x10(%rcx), %rcx
incq %rcx
cmpq %rcx, %rax
jne 0xfec2
cmpl $0x13, 0x8(%rsp)
movq (%rsp), %rax
je 0xfecd
movq %rax, %xmm0
jmp 0xfe73
movl %ebp, %eax
addq $0x10, %rsp
popq %rbx
popq %r14
popq %rbp
retq
cvtsi2sd %rax, %xmm0
jmp 0xfe73
// File: /workspace/github_c_makefile_star2_O2/tylerneylon[P]APIsWithLua/lua/lvm.c
// Function: luaV_tointeger
int luaV_tointeger (const TValue *obj, lua_Integer *p, int mode) {
  TValue v;
 again:
  if (ttisfloat(obj)) {
    lua_Number n = fltvalue(obj);
    lua_Number f = l_floor(n);
    if (n != f) {  /* not an integral value? */
      if (mode == 0) return 0;  /* fails if mode demands integral value */
      else if (mode > 1)  /* needs ceil? */
        f += 1;  /* convert floor to ceil (remember: n != f) */
    }
    return lua_numbertointeger(f, p);
  }
  else if (ttisinteger(obj)) {
    *p = ivalue(obj);
    return 1;
  }
  else if (cvt2num(obj) &&
            luaO_str2num(svalue(obj), &v) == vslen(obj) + 1) {
    obj = &v;
    goto again;  /* convert result from 'luaO_str2num' to an integer */
  }
  return 0;  /* conversion failed */
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x20, %rsp
movl %edx, %ebp
movq %rsi, %rbx
movq %rdi, %r12
leaq 0x10(%rsp), %r15
xorl %r14d, %r14d
movl 0x8(%r12), %eax
cmpl $0x13, %eax
je 0xffac
cmpl $0x3, %eax
je 0xff40
andl $0xf, %eax
cmpl $0x4, %eax
jne 0xffb7
movq (%r12), %rdi
addq $0x18, %rdi
movq %r15, %rsi
callq 0xaf5a
movq (%r12), %rcx
cmpb $0x4, 0x8(%rcx)
jne 0xff2f
movzbl 0xb(%rcx), %ecx
jmp 0xff33
movq 0x10(%rcx), %rcx
incq %rcx
movq %r15, %r12
cmpq %rcx, %rax
je 0xfef0
jmp 0xffb7
movsd (%r12), %xmm0
movsd %xmm0, 0x8(%rsp)
callq 0x5450
movsd 0x8(%rsp), %xmm1
ucomisd %xmm0, %xmm1
jne 0xff5f
jnp 0xff70
testl %ebp, %ebp
je 0xffc7
cmpl $0x2, %ebp
jl 0xff70
addsd 0x10018(%rip), %xmm0    # 0x1ff88
movsd 0xfd50(%rip), %xmm1     # 0x1fcc8
movapd %xmm0, %xmm2
cmpltpd %xmm1, %xmm2
movsd 0xfd37(%rip), %xmm1     # 0x1fcc0
cmplepd %xmm0, %xmm1
andpd %xmm2, %xmm1
movd %xmm1, %eax
testb $0x1, %al
je 0xffa2
cvttsd2si %xmm0, %rcx
movq %rcx, (%rbx)
movzbl %al, %r14d
andl $0x1, %r14d
jmp 0xffb7
movq (%r12), %rax
movq %rax, (%rbx)
pushq $0x1
popq %r14
movl %r14d, %eax
addq $0x20, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
xorl %r14d, %r14d
jmp 0xffb7
// File: /workspace/github_c_makefile_star2_O2/tylerneylon[P]APIsWithLua/lua/lvm.c
// Function: luaV_finishget
void luaV_finishget (lua_State *L, const TValue *t, TValue *key, StkId val,
                      const TValue *slot) {
  int loop;  /* counter to avoid infinite loops */
  const TValue *tm;  /* metamethod */
  for (loop = 0; loop < MAXTAGLOOP; loop++) {
    if (slot == NULL) {  /* 't' is not a table? */
      lua_assert(!ttistable(t));
      tm = luaT_gettmbyobj(L, t, TM_INDEX);
      if (ttisnil(tm))
        luaG_typeerror(L, t, "index");  /* no metamethod */
      /* else will try the metamethod */
    }
    else {  /* 't' is a table */
      lua_assert(ttisnil(slot));
      tm = fasttm(L, hvalue(t)->metatable, TM_INDEX);  /* table's metamethod */
      if (tm == NULL) {  /* no metamethod? */
        setnilvalue(val);  /* result is nil */
        return;
      }
      /* else will try the metamethod */
    }
    if (ttisfunction(tm)) {  /* is metamethod a function? */
      luaT_callTM(L, tm, t, key, val, 1);  /* call it */
      return;
    }
    t = tm;  /* else try to access 'tm[key]' */
    if (luaV_fastget(L,t,key,slot,luaH_get)) {  /* fast track? */
      setobj2s(L, val, slot);  /* done */
      return;
    }
    /* else repeat (tail call 'luaV_finishget') */
  }
  luaG_runerror(L, "'__index' chain too long; possible loop");
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %r8, %rax
movq %rcx, %rbx
movq %rdx, %r15
movq %rsi, %r12
movq %rdi, %r14
movl $0x7d0, %ebp            # imm = 0x7D0
subl $0x1, %ebp
jb 0x100b0
testq %rax, %rax
je 0x1002b
movq (%r12), %rax
movq 0x28(%rax), %rdi
testq %rdi, %rdi
je 0x1006f
testb $0x1, 0xa(%rdi)
jne 0x1006f
movq 0x18(%r14), %rax
movq 0xe0(%rax), %rdx
xorl %esi, %esi
callq 0xf48b
testq %rax, %rax
je 0x1006f
movq %rax, %r13
movl 0x8(%rax), %eax
jmp 0x10042
movq %r14, %rdi
movq %r12, %rsi
xorl %edx, %edx
callq 0xf4b4
movq %rax, %r13
movl 0x8(%rax), %eax
testl %eax, %eax
je 0x100c1
movl %eax, %ecx
andl $0xf, %ecx
cmpl $0x6, %ecx
je 0x10075
cmpl $0x45, %eax
jne 0x10065
movq (%r13), %rdi
movq %r15, %rsi
callq 0xf29c
cmpl $0x0, 0x8(%rax)
je 0x10067
jmp 0x1009b
xorl %eax, %eax
movq %r13, %r12
jmp 0xffeb
andl $0x0, 0x8(%rbx)
jmp 0x100a1
pushq $0x1
popq %r9
movq %r14, %rdi
movq %r13, %rsi
movq %r12, %rdx
movq %r15, %rcx
movq %rbx, %r8
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0xf585
movups (%rax), %xmm0
movups %xmm0, (%rbx)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x100b9(%rip), %rsi     # 0x20170
movq %r14, %rdi
xorl %eax, %eax
callq 0x7930
leaq 0x10e5f(%rip), %rdx     # 0x20f27
movq %r14, %rdi
movq %r12, %rsi
callq 0x78f2
// File: /workspace/github_c_makefile_star2_O2/tylerneylon[P]APIsWithLua/lua/lvm.c
// Function: luaV_lessthan
int luaV_lessthan (lua_State *L, const TValue *l, const TValue *r) {
  int res;
  if (ttisnumber(l) && ttisnumber(r))  /* both operands are numbers? */
    return LTnum(l, r);
  else if (ttisstring(l) && ttisstring(r))  /* both are strings? */
    return l_strcmp(tsvalue(l), tsvalue(r)) < 0;
  else if ((res = luaT_callorderTM(L, l, r, TM_LT)) < 0)  /* no metamethod? */
    luaG_ordererror(L, l, r);  /* error */
  return res;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdx, %rbx
movq %rsi, %r14
movq %rdi, %r15
movl 0x8(%rsi), %eax
movl %eax, %ecx
andl $0xf, %ecx
cmpl $0x4, %ecx
je 0x102c2
cmpl $0x3, %ecx
jne 0x102dd
movl 0x8(%rbx), %ecx
movl %ecx, %edx
andl $0xf, %edx
cmpl $0x3, %edx
jne 0x102dd
cmpl $0x13, %eax
jne 0x102f8
movq (%r14), %rdi
cmpl $0x13, %ecx
jne 0x10311
xorl %eax, %eax
cmpq (%rbx), %rdi
setl %al
jmp 0x102f2
movl 0x8(%rbx), %eax
andl $0xf, %eax
cmpl $0x4, %eax
jne 0x102dd
movq (%r14), %rdi
movq (%rbx), %rsi
callq 0x10344
shrl $0x1f, %eax
jmp 0x102f2
pushq $0x14
popq %rcx
movq %r15, %rdi
movq %r14, %rsi
movq %rbx, %rdx
callq 0xf72f
testl %eax, %eax
js 0x10332
popq %rbx
popq %r14
popq %r15
retq
movsd (%r14), %xmm0
cmpl $0x3, %ecx
jne 0x1031f
movsd (%rbx), %xmm1
xorl %eax, %eax
ucomisd %xmm0, %xmm1
seta %al
jmp 0x102f2
movsd (%rbx), %xmm0
popq %rbx
popq %r14
popq %r15
jmp 0x12696
ucomisd %xmm0, %xmm0
jp 0x10340
movq (%rbx), %rdi
callq 0x126e9
xorl $0x1, %eax
jmp 0x102f2
movq %r15, %rdi
movq %r14, %rsi
movq %rbx, %rdx
callq 0x7b84
xorl %eax, %eax
jmp 0x102f2
// File: /workspace/github_c_makefile_star2_O2/tylerneylon[P]APIsWithLua/lua/lvm.c
// Function: l_strcmp
static int l_strcmp (const TString *ls, const TString *rs) {
  const char *l = getstr(ls);
  size_t ll = tsslen(ls);
  const char *r = getstr(rs);
  size_t lr = tsslen(rs);
  for (;;) {  /* for each segment */
    int temp = strcoll(l, r);
    if (temp != 0)  /* not equal? */
      return temp;  /* done */
    else {  /* strings are equal up to a '\0' */
      size_t len = strlen(l);  /* index of first '\0' in both strings */
      if (len == lr)  /* 'rs' is finished? */
        return (len == ll) ? 0 : 1;  /* check 'ls' */
      else if (len == ll)  /* 'ls' is finished? */
        return -1;  /* 'ls' is smaller than 'rs' ('rs' is not finished) */
      /* both strings longer than 'len'; go on comparing after the '\0' */
      len++;
      l += len; ll -= len; r += len; lr -= len;
    }
  }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rsi, %rbx
movq %rdi, %r14
cmpb $0x4, 0x8(%rdi)
jne 0x1035f
movzbl 0xb(%r14), %r15d
jmp 0x10363
movq 0x10(%r14), %r15
cmpb $0x4, 0x8(%rbx)
jne 0x10370
movzbl 0xb(%rbx), %r12d
jmp 0x10374
movq 0x10(%rbx), %r12
addq $0x18, %r14
addq $0x18, %rbx
pushq $-0x1
popq %rbp
movq %r14, %rdi
movq %rbx, %rsi
callq 0x5380
testl %eax, %eax
jne 0x103b8
movq %r14, %rdi
callq 0x5140
cmpq %r12, %rax
je 0x103bc
cmpq %r15, %rax
je 0x103c5
leaq 0x1(%rax), %rcx
addq %rax, %r14
incq %r14
subq %rcx, %r15
addq %rax, %rbx
incq %rbx
subq %rcx, %r12
jmp 0x1037f
movl %eax, %ebp
jmp 0x103c5
xorl %ebp, %ebp
cmpq %r15, %r12
setne %bpl
movl %ebp, %eax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/tylerneylon[P]APIsWithLua/lua/lvm.c
// Function: luaV_lessequal
int luaV_lessequal (lua_State *L, const TValue *l, const TValue *r) {
  int res;
  if (ttisnumber(l) && ttisnumber(r))  /* both operands are numbers? */
    return LEnum(l, r);
  else if (ttisstring(l) && ttisstring(r))  /* both are strings? */
    return l_strcmp(tsvalue(l), tsvalue(r)) <= 0;
  else if ((res = luaT_callorderTM(L, l, r, TM_LE)) >= 0)  /* try 'le' */
    return res;
  else {  /* try 'lt': */
    L->ci->callstatus |= CIST_LEQ;  /* mark it is doing 'lt' for 'le' */
    res = luaT_callorderTM(L, r, l, TM_LT);
    L->ci->callstatus ^= CIST_LEQ;  /* clear mark */
    if (res < 0)
      luaG_ordererror(L, l, r);
    return !res;  /* result is negated */
  }
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdx, %rbx
movq %rsi, %r14
movq %rdi, %r15
movl 0x8(%rsi), %eax
movl %eax, %ecx
andl $0xf, %ecx
cmpl $0x4, %ecx
je 0x10415
cmpl $0x3, %ecx
jne 0x10436
movl 0x8(%rbx), %ecx
movl %ecx, %edx
andl $0xf, %edx
cmpl $0x3, %edx
jne 0x10436
cmpl $0x13, %eax
jne 0x1047c
movq (%r14), %rdi
cmpl $0x13, %ecx
jne 0x10495
xorl %eax, %eax
cmpq (%rbx), %rdi
jmp 0x10431
movl 0x8(%rbx), %eax
andl $0xf, %eax
cmpl $0x4, %eax
jne 0x10436
movq (%r14), %rdi
movq (%rbx), %rsi
callq 0x10344
movl %eax, %ecx
xorl %eax, %eax
testl %ecx, %ecx
setle %al
jmp 0x10476
pushq $0x15
popq %rcx
movq %r15, %rdi
movq %r14, %rsi
movq %rbx, %rdx
callq 0xf72f
testl %eax, %eax
jns 0x10476
movq 0x20(%r15), %rax
orb $-0x80, 0x42(%rax)
pushq $0x14
popq %rcx
movq %r15, %rdi
movq %rbx, %rsi
movq %r14, %rdx
callq 0xf72f
movq 0x20(%r15), %rcx
xorb $-0x80, 0x42(%rcx)
testl %eax, %eax
js 0x104b6
sete %al
movzbl %al, %eax
popq %rbx
popq %r14
popq %r15
retq
movsd (%r14), %xmm0
cmpl $0x3, %ecx
jne 0x104a3
movsd (%rbx), %xmm1
xorl %eax, %eax
ucomisd %xmm0, %xmm1
setae %al
jmp 0x10476
movsd (%rbx), %xmm0
popq %rbx
popq %r14
popq %r15
jmp 0x126e9
ucomisd %xmm0, %xmm0
jp 0x104c4
movq (%rbx), %rdi
callq 0x12696
xorl $0x1, %eax
jmp 0x10476
movq %r15, %rdi
movq %r14, %rsi
movq %rbx, %rdx
callq 0x7b84
xorl %eax, %eax
jmp 0x10476
// File: /workspace/github_c_makefile_star2_O2/tylerneylon[P]APIsWithLua/lua/lvm.c
// Function: copy2buff
static void copy2buff (StkId top, int n, char *buff) {
  size_t tl = 0;  /* size already copied */
  do {
    size_t l = vslen(top - n);  /* length of string being copied */
    memcpy(buff + tl, svalue(top - n), l * sizeof(char));
    tl += l;
  } while (--n > 0);
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %rdx, %rbx
movq %rdi, %r14
movslq %esi, %rax
leaq 0x1(%rax), %r12
shlq $0x4, %rax
subq %rax, %r14
xorl %r13d, %r13d
movq (%r14), %rsi
cmpb $0x4, 0x8(%rsi)
jne 0x10914
movzbl 0xb(%rsi), %r15d
jmp 0x10918
movq 0x10(%rsi), %r15
leaq (%rbx,%r13), %rdi
addq $0x18, %rsi
movq %r15, %rdx
callq 0x5300
addq %r15, %r13
decq %r12
addq $0x10, %r14
cmpq $0x1, %r12
jg 0x10904
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/tylerneylon[P]APIsWithLua/lua/lvm.c
// Function: luaV_objlen
void luaV_objlen (lua_State *L, StkId ra, const TValue *rb) {
  const TValue *tm;
  switch (ttype(rb)) {
    case LUA_TTABLE: {
      Table *h = hvalue(rb);
      tm = fasttm(L, h->metatable, TM_LEN);
      if (tm) break;  /* metamethod? break switch to call it */
      setivalue(ra, luaH_getn(h));  /* else primitive len */
      return;
    }
    case LUA_TSHRSTR: {
      setivalue(ra, tsvalue(rb)->shrlen);
      return;
    }
    case LUA_TLNGSTR: {
      setivalue(ra, tsvalue(rb)->u.lnglen);
      return;
    }
    default: {  /* try metamethod */
      tm = luaT_gettmbyobj(L, rb, TM_LEN);
      if (ttisnil(tm))  /* no metamethod? */
        luaG_typeerror(L, rb, "get length of");
      break;
    }
  }
  luaT_callTM(L, tm, rb, rb, ra, 1);
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %r14
movq %rsi, %rbx
movl 0x8(%rdx), %eax
andl $0x3f, %eax
cmpl $0x4, %eax
je 0x109a8
cmpl $0x14, %eax
je 0x1099f
movq %rdi, %r15
cmpl $0x5, %eax
jne 0x109c5
movq (%r14), %r12
movq 0x28(%r12), %rdi
testq %rdi, %rdi
je 0x10993
testb $0x10, 0xa(%rdi)
jne 0x10993
movq 0x18(%r15), %rax
movq 0x100(%rax), %rdx
pushq $0x4
popq %rsi
callq 0xf48b
testq %rax, %rax
jne 0x109d9
movq %r12, %rdi
callq 0xf31c
cltq
jmp 0x109af
movq (%r14), %rax
movq 0x10(%rax), %rax
jmp 0x109af
movq (%r14), %rax
movzbl 0xb(%rax), %eax
movq %rax, (%rbx)
movl $0x13, 0x8(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
pushq $0x4
popq %rdx
movq %r15, %rdi
movq %r14, %rsi
callq 0xf4b4
cmpl $0x0, 0x8(%rax)
je 0x109fc
pushq $0x1
popq %r9
movq %r15, %rdi
movq %rax, %rsi
movq %r14, %rdx
movq %r14, %rcx
movq %rbx, %r8
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
jmp 0xf585
leaq 0xf7d7(%rip), %rdx      # 0x201da
movq %r15, %rdi
movq %r14, %rsi
callq 0x78f2
// File: /workspace/github_c_makefile_star2_O2/tylerneylon[P]APIsWithLua/lua/lvm.c
// Function: luaV_div
lua_Integer luaV_div (lua_State *L, lua_Integer m, lua_Integer n) {
  if (l_castS2U(n) + 1u <= 1u) {  /* special cases: -1 or 0 */
    if (n == 0)
      luaG_runerror(L, "attempt to divide by zero");
    return intop(-, 0, m);   /* n==-1; avoid overflow with 0x80000...//-1 */
  }
  else {
    lua_Integer q = m / n;  /* perform C division */
    if ((m ^ n) < 0 && m % n != 0)  /* 'm/n' would be negative non-integer? */
      q -= 1;  /* correct result for different rounding */
    return q;
  }
}

// Assembly:
movq %rdx, %rcx
leaq 0x1(%rdx), %rax
cmpq $0x1, %rax
ja 0x10a27
testq %rcx, %rcx
je 0x10a3e
negq %rsi
movq %rsi, %rax
retq
movq %rsi, %rax
cqto
idivq %rcx
xorq %rsi, %rcx
js 0x10a35
retq
cmpq $0x1, %rdx
adcq $-0x1, %rax
retq
pushq %rax
leaq 0xf7a2(%rip), %rsi      # 0x201e8
xorl %eax, %eax
callq 0x7930
// File: /workspace/github_c_makefile_star2_O2/tylerneylon[P]APIsWithLua/lua/lvm.c
// Function: luaV_mod
lua_Integer luaV_mod (lua_State *L, lua_Integer m, lua_Integer n) {
  if (l_castS2U(n) + 1u <= 1u) {  /* special cases: -1 or 0 */
    if (n == 0)
      luaG_runerror(L, "attempt to perform 'n%%0'");
    return 0;   /* m % -1 == 0; avoid overflow with 0x80000...%-1 */
  }
  else {
    lua_Integer r = m % n;
    if (r != 0 && (m ^ n) < 0)  /* 'm/n' would be non-integer negative? */
      r += n;  /* correct result for different rounding */
    return r;
  }
}

// Assembly:
movq %rdx, %rcx
leaq 0x1(%rdx), %rax
cmpq $0x1, %rax
ja 0x10a6e
testq %rcx, %rcx
jne 0x10a8c
pushq %rax
leaq 0xf79b(%rip), %rsi      # 0x20202
xorl %eax, %eax
callq 0x7930
movq %rsi, %rax
cqto
idivq %rcx
testq %rdx, %rdx
je 0x10a8c
movq %rdx, %rax
xorq %rcx, %rsi
sarq $0x3f, %rsi
andq %rcx, %rsi
addq %rsi, %rax
retq
xorl %eax, %eax
retq
// File: /workspace/github_c_makefile_star2_O2/tylerneylon[P]APIsWithLua/lua/lvm.c
// Function: luaV_shiftl
lua_Integer luaV_shiftl (lua_Integer x, lua_Integer y) {
  if (y < 0) {  /* shift right? */
    if (y <= -NBITS) return 0;
    else return intop(>>, x, -y);
  }
  else {  /* shift left */
    if (y >= NBITS) return 0;
    else return intop(<<, x, y);
  }
}

// Assembly:
movq %rdi, %rax
testq %rsi, %rsi
js 0x10aa7
movl %esi, %ecx
shlq %cl, %rax
xorl %ecx, %ecx
cmpq $0x40, %rsi
cmovaeq %rcx, %rax
retq
cmpq $-0x3f, %rsi
jae 0x10ab0
xorl %eax, %eax
retq
negb %sil
movl %esi, %ecx
shrq %cl, %rax
retq
// File: /workspace/github_c_makefile_star2_O2/tylerneylon[P]APIsWithLua/lua/lvm.c
// Function: LTintfloat
static int LTintfloat (lua_Integer i, lua_Number f) {
#if defined(l_intfitsf)
  if (!l_intfitsf(i)) {
    if (f >= -cast_num(LUA_MININTEGER))  /* -minint == maxint + 1 */
      return 1;  /* f >= maxint + 1 > i */
    else if (f > cast_num(LUA_MININTEGER))  /* minint < f <= maxint ? */
      return (i < cast(lua_Integer, f));  /* compare them as integers */
    else  /* f <= minint <= i (or 'f' is NaN)  -->  not(i < f) */
      return 0;
  }
#endif
  return luai_numlt(cast_num(i), f);  /* compare them as floats */
}

// Assembly:
movabsq $0x20000000000000, %rax # imm = 0x20000000000000
addq %rdi, %rax
movabsq $0x40000000000001, %rcx # imm = 0x40000000000001
cmpq %rcx, %rax
jae 0x126c0
cvtsi2sd %rdi, %xmm1
ucomisd %xmm1, %xmm0
seta %al
jmp 0x126e5
movb $0x1, %al
ucomisd 0xd5fe(%rip), %xmm0     # 0x1fcc8
jae 0x126e5
ucomisd 0xd5ec(%rip), %xmm0     # 0x1fcc0
jbe 0x126e3
cvttsd2si %xmm0, %rax
cmpq %rdi, %rax
setg %al
jmp 0x126e5
xorl %eax, %eax
movzbl %al, %eax
retq
// File: /workspace/github_c_makefile_star2_O2/tylerneylon[P]APIsWithLua/lua/lvm.c
// Function: LEintfloat
static int LEintfloat (lua_Integer i, lua_Number f) {
#if defined(l_intfitsf)
  if (!l_intfitsf(i)) {
    if (f >= -cast_num(LUA_MININTEGER))  /* -minint == maxint + 1 */
      return 1;  /* f >= maxint + 1 > i */
    else if (f >= cast_num(LUA_MININTEGER))  /* minint <= f <= maxint ? */
      return (i <= cast(lua_Integer, f));  /* compare them as integers */
    else  /* f < minint <= i (or 'f' is NaN)  -->  not(i <= f) */
      return 0;
  }
#endif
  return luai_numle(cast_num(i), f);  /* compare them as floats */
}

// Assembly:
movabsq $0x20000000000000, %rax # imm = 0x20000000000000
addq %rdi, %rax
movabsq $0x40000000000001, %rcx # imm = 0x40000000000001
cmpq %rcx, %rax
jae 0x12713
cvtsi2sd %rdi, %xmm1
ucomisd %xmm1, %xmm0
setae %al
jmp 0x12738
movb $0x1, %al
ucomisd 0xd5ab(%rip), %xmm0     # 0x1fcc8
jae 0x12738
ucomisd 0xd599(%rip), %xmm0     # 0x1fcc0
jae 0x1272d
xorl %eax, %eax
jmp 0x12738
cvttsd2si %xmm0, %rax
cmpq %rdi, %rax
setge %al
movzbl %al, %eax
retq
// File: /workspace/github_c_makefile_star2_O2/tylerneylon[P]APIsWithLua/lua/lzio.c
// Function: luaZ_read
size_t luaZ_read (ZIO *z, void *b, size_t n) {
  while (n) {
    size_t m;
    if (z->n == 0) {  /* no bytes in buffer? */
      if (luaZ_fill(z) == EOZ)  /* try to read more */
        return n;  /* no more input; return number of missing bytes */
      else {
        z->n++;  /* luaZ_fill consumed first byte; put it back */
        z->p--;
      }
    }
    m = (n <= z->n) ? n : z->n;  /* min. between n and z->n */
    memcpy(b, z->p, m);
    z->n -= m;
    z->p += m;
    b = (char *)b + m;
    n -= m;
  }
  return 0;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %rbx
movq %rsi, %r14
movq %rdi, %r15
testq %rbx, %rbx
je 0x12802
movq (%r15), %r12
testq %r12, %r12
je 0x127c0
movq 0x8(%r15), %rsi
jmp 0x127e1
movq %r15, %rdi
callq 0x1273c
cmpl $-0x1, %eax
je 0x12802
movq (%r15), %r12
movq 0x8(%r15), %rsi
incq %r12
movq %r12, (%r15)
decq %rsi
movq %rsi, 0x8(%r15)
cmpq %r12, %rbx
cmovbq %rbx, %r12
movq %r14, %rdi
movq %r12, %rdx
callq 0x5300
subq %r12, (%r15)
addq %r12, 0x8(%r15)
addq %r12, %r14
subq %r12, %rbx
jmp 0x127ad
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O2/tylerneylon[P]APIsWithLua/lua/lauxlib.c
// Function: luaL_checkstack
LUALIB_API void luaL_checkstack (lua_State *L, int space, const char *msg) {
  if (!lua_checkstack(L, space)) {
    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
callq 0x5a04
testl %eax, %eax
je 0x12aba
addq $0x8, %rsp
popq %rbx
popq %r14
retq
testq %r14, %r14
je 0x12ada
leaq 0xd884(%rip), %rsi      # 0x2034a
movq %rbx, %rdi
movq %r14, %rdx
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x12bd6
leaq 0xc948(%rip), %rsi      # 0x1f429
movq %rbx, %rdi
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x12bd6
// File: /workspace/github_c_makefile_star2_O2/tylerneylon[P]APIsWithLua/lua/lauxlib.c
// Function: luaL_argerror
LUALIB_API int luaL_argerror (lua_State *L, int arg, const char *extramsg) {
  lua_Debug ar;
  if (!lua_getstack(L, 0, &ar))  /* no stack frame? */
    return luaL_error(L, "bad argument #%d (%s)", arg, extramsg);
  lua_getinfo(L, "n", &ar);
  if (strcmp(ar.namewhat, "method") == 0) {
    arg--;  /* do not count 'self' */
    if (arg == 0)  /* error is in the self argument itself? */
      return luaL_error(L, "calling '%s' 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 '%s' (%s)",
                        arg, 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 0x7336
testl %eax, %eax
je 0x12b73
leaq 0xd23c(%rip), %rsi      # 0x1fd5a
leaq 0x8(%rsp), %r15
movq %r14, %rdi
movq %r15, %rdx
callq 0x7562
movq 0x10(%r15), %rdi
leaq 0xc855(%rip), %rsi      # 0x1f38e
callq 0x5270
testl %eax, %eax
jne 0x12b46
decl %ebp
je 0x12b8b
movq 0x10(%rsp), %rcx
testq %rcx, %rcx
jne 0x12bb2
leaq 0x8(%rsp), %rsi
movq %r14, %rdi
callq 0x12c8e
testl %eax, %eax
je 0x12ba6
pushq $-0x1
popq %rsi
movq %r14, %rdi
xorl %edx, %edx
callq 0x5fca
movq %rax, %rcx
jmp 0x12bad
leaq 0xd75a(%rip), %rsi      # 0x202d4
movq %r14, %rdi
movl %ebp, %edx
movq %rbx, %rcx
xorl %eax, %eax
callq 0x12bd6
jmp 0x12bc8
movq 0x10(%rsp), %rdx
leaq 0xd753(%rip), %rsi      # 0x202ea
movq %r14, %rdi
movq %rbx, %rcx
xorl %eax, %eax
callq 0x12bd6
jmp 0x12bc8
leaq 0xc7c9(%rip), %rcx      # 0x1f376
movq %rcx, 0x10(%rsp)
leaq 0xd74f(%rip), %rsi      # 0x20308
movq %r14, %rdi
movl %ebp, %edx
movq %rbx, %r8
xorl %eax, %eax
callq 0x12bd6
addq $0x88, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/tylerneylon[P]APIsWithLua/lua/lauxlib.c
// Function: luaL_error
LUALIB_API int luaL_error (lua_State *L, const char *fmt, ...) {
  va_list argp;
  va_start(argp, fmt);
  luaL_where(L, 1);
  lua_pushvfstring(L, fmt, argp);
  va_end(argp);
  lua_concat(L, 2);
  return lua_error(L);
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0xd0, %rsp
movq %rsi, %r14
movq %rdi, %rbx
leaq 0x20(%rsp), %rsi
movq %rdx, 0x10(%rsi)
movq %rcx, 0x18(%rsi)
movq %r8, 0x20(%rsi)
movq %r9, 0x28(%rsi)
testb %al, %al
je 0x12c38
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, %r15
movq %rsi, 0x10(%r15)
leaq 0xf0(%rsp), %rax
movq %rax, 0x8(%r15)
movabsq $0x3000000010, %rax     # imm = 0x3000000010
movq %rax, (%r15)
pushq $0x1
popq %rsi
callq 0x12d58
movq %rbx, %rdi
movq %r14, %rsi
movq %r15, %rdx
callq 0x6234
pushq $0x2
popq %rsi
movq %rbx, %rdi
callq 0x6f57
movq %rbx, %rdi
callq 0x6f1a
addq $0xd0, %rsp
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/tylerneylon[P]APIsWithLua/lua/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_getfield(L, LUA_REGISTRYINDEX, "_LOADED");
  if (findfield(L, top + 1, 2)) {
    const char *name = lua_tostring(L, -1);
    if (strncmp(name, "_G.", 3) == 0) {  /* name start with '_G.'? */
      lua_pushstring(L, name + 3);  /* push name without prefix */
      lua_remove(L, -2);  /* remove original name */
    }
    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 0x5b1d
movl %eax, %r14d
leaq 0xd7c2(%rip), %rsi      # 0x2046c
movq %rbx, %rdi
movq %r15, %rdx
callq 0x7562
leaq 0xd729(%rip), %rdx      # 0x203e5
movq %rbx, %rdi
movl $0xfff0b9d8, %esi       # imm = 0xFFF0B9D8
callq 0x64f4
leal 0x1(%r14), %ebp
pushq $0x2
popq %rdx
movq %rbx, %rdi
movl %ebp, %esi
callq 0x14001
testl %eax, %eax
je 0x12d3e
pushq $-0x1
popq %rsi
movq %rbx, %rdi
xorl %edx, %edx
callq 0x5fca
cmpb $0x5f, (%rax)
jne 0x12d28
cmpb $0x47, 0x1(%rax)
jne 0x12d28
cmpb $0x2e, 0x2(%rax)
jne 0x12d28
addq $0x3, %rax
movq %rbx, %rdi
movq %rax, %rsi
callq 0x61d0
pushq $-0x2
popq %r14
pushq $-0x1
popq %rdx
movq %rbx, %rdi
movl %r14d, %esi
callq 0x5b7f
movq %rbx, %rdi
movl %r14d, %esi
callq 0x5b31
pushq $-0x1
popq %rsi
movq %rbx, %rdi
movl %ebp, %edx
callq 0x5c93
pushq $0x1
popq %rbp
pushq $-0x3
popq %r14
jmp 0x12d40
xorl %ebp, %ebp
movq %rbx, %rdi
movl %r14d, %esi
callq 0x5b31
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/lauxlib.c
// Function: luaL_where
LUALIB_API void luaL_where (lua_State *L, int level) {
  lua_Debug ar;
  if (lua_getstack(L, level, &ar)) {  /* check function at level */
    lua_getinfo(L, "Sl", &ar);  /* get info about it */
    if (ar.currentline > 0) {  /* is there info? */
      lua_pushfstring(L, "%s:%d: ", ar.short_src, ar.currentline);
      return;
    }
  }
  lua_pushfstring(L, "");  /* else, no information available... */
}

// Assembly:
pushq %r14
pushq %rbx
subq $0x88, %rsp
movq %rdi, %rbx
leaq 0x8(%rsp), %rdx
callq 0x7336
testl %eax, %eax
je 0x12daa
leaq 0xd5ac(%rip), %rsi      # 0x20326
leaq 0x8(%rsp), %r14
movq %rbx, %rdi
movq %r14, %rdx
callq 0x7562
movl 0x28(%r14), %ecx
testl %ecx, %ecx
jle 0x12daa
leaq 0x40(%rsp), %rdx
leaq 0xd58b(%rip), %rsi      # 0x20329
movq %rbx, %rdi
xorl %eax, %eax
callq 0x6261
jmp 0x12dbb
leaq 0xf037(%rip), %rsi      # 0x21de8
movq %rbx, %rdi
xorl %eax, %eax
callq 0x6261
addq $0x88, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O2/tylerneylon[P]APIsWithLua/lua/lauxlib.c
// Function: luaL_fileresult
LUALIB_API int luaL_fileresult (lua_State *L, int stat, const char *fname) {
  int en = errno;  /* calls to Lua API may change this value */
  if (stat) {
    lua_pushboolean(L, 1);
    return 1;
  }
  else {
    lua_pushnil(L);
    if (fname)
      lua_pushfstring(L, "%s: %s", fname, strerror(en));
    else
      lua_pushstring(L, strerror(en));
    lua_pushinteger(L, en);
    return 3;
  }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdx, %r15
movl %esi, %ebp
movq %rdi, %rbx
callq 0x5090
testl %ebp, %ebp
je 0x12ded
pushq $0x1
popq %rbp
movq %rbx, %rdi
movl %ebp, %esi
callq 0x6386
jmp 0x12e37
movslq (%rax), %r14
movq %rbx, %rdi
callq 0x6135
movl %r14d, %edi
callq 0x54b0
testq %r15, %r15
je 0x12e1e
leaq 0xd715(%rip), %rsi      # 0x20521
movq %rbx, %rdi
movq %r15, %rdx
movq %rax, %rcx
xorl %eax, %eax
callq 0x6261
jmp 0x12e29
movq %rbx, %rdi
movq %rax, %rsi
callq 0x61d0
movq %rbx, %rdi
movq %r14, %rsi
callq 0x615b
pushq $0x3
popq %rbp
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/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 {
    l_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 %rbp
pushq %rbx
pushq %rax
movl %esi, %ebp
movq %rdi, %rbx
testl %esi, %esi
je 0x12e67
cmpl $-0x1, %ebp
jne 0x12e74
movq %rbx, %rdi
xorl %esi, %esi
xorl %edx, %edx
addq $0x8, %rsp
popq %rbx
popq %rbp
jmp 0x12dc6
pushq $0x1
popq %rsi
movq %rbx, %rdi
callq 0x6386
jmp 0x12e7c
movq %rbx, %rdi
callq 0x6135
leaq 0xd4ae(%rip), %rsi      # 0x20331
movq %rbx, %rdi
callq 0x61d0
movslq %ebp, %rsi
movq %rbx, %rdi
callq 0x615b
pushq $0x3
popq %rax
addq $0x8, %rsp
popq %rbx
popq %rbp
retq