LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O1/bhk[P]tooltree/lua/../opensource/lua-5.2.3/src/lvm.c
// Function: call_orderTM
static int call_orderTM (lua_State *L, const TValue *p1, const TValue *p2,
                         TMS event) {
  if (!call_binTM(L, p1, p2, L->top, event))
    return -1;  /* no metamethod */
  else
    return !l_isfalse(L->top);
}

// Assembly:
pushq %rbx
movl %ecx, %r8d
movq %rdi, %rbx
movq 0x10(%rdi), %rcx
callq 0x1936f
testl %eax, %eax
je 0x18f2f
movq 0x10(%rbx), %rcx
movl 0x8(%rcx), %eax
testl %eax, %eax
je 0x18f3b
cmpl $0x1, %eax
jne 0x18f36
xorl %eax, %eax
cmpl $0x0, (%rcx)
setne %al
jmp 0x18f3b
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
jmp 0x18f3b
movl $0x1, %eax
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O1/bhk[P]tooltree/lua/../opensource/lua-5.2.3/src/lvm.c
// Function: luaV_lessequal
int luaV_lessequal (lua_State *L, const TValue *l, const TValue *r) {
  int res;
  if (ttisnumber(l) && ttisnumber(r))
    return luai_numle(L, nvalue(l), nvalue(r));
  else if (ttisstring(l) && ttisstring(r))
    return l_strcmp(rawtsvalue(l), rawtsvalue(r)) <= 0;
  else if ((res = call_orderTM(L, l, r, TM_LE)) >= 0)  /* first try `le' */
    return res;
  else if ((res = call_orderTM(L, r, l, TM_LT)) < 0)  /* else try `lt' */
    luaG_ordererror(L, l, r);
  return !res;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdx, %rbx
movq %rsi, %r14
movq %rdi, %r15
movl 0x8(%rsi), %eax
cmpl $0x3, %eax
jne 0x18f69
cmpl $0x3, 0x8(%rbx)
jne 0x18f69
movsd (%rbx), %xmm0
xorl %eax, %eax
ucomisd (%r14), %xmm0
setae %al
jmp 0x18fc6
andl $0xf, %eax
cmpl $0x4, %eax
jne 0x18f92
movl 0x8(%rbx), %eax
andl $0xf, %eax
cmpl $0x4, %eax
jne 0x18f92
movq (%r14), %rdi
movq (%rbx), %rsi
callq 0x18e81
movl %eax, %ecx
xorl %eax, %eax
testl %ecx, %ecx
setle %al
jmp 0x18fc6
movq %r15, %rdi
movq %r14, %rsi
movq %rbx, %rdx
movl $0xe, %ecx
callq 0x18f01
testl %eax, %eax
jns 0x18fc6
movq %r15, %rdi
movq %rbx, %rsi
movq %r14, %rdx
movl $0xd, %ecx
callq 0x18f01
testl %eax, %eax
js 0x18fcc
sete %al
movzbl %al, %eax
popq %rbx
popq %r14
popq %r15
retq
movq %r15, %rdi
movq %r14, %rsi
movq %rbx, %rdx
callq 0xb009
// File: /workspace/github_c_makefile_star2_O1/bhk[P]tooltree/lua/../opensource/lua-5.2.3/src/lvm.c
// Function: luaV_equalobj_
int luaV_equalobj_ (lua_State *L, const TValue *t1, const TValue *t2) {
  const TValue *tm;
  lua_assert(ttisequal(t1, t2));
  switch (ttype(t1)) {
    case LUA_TNIL: return 1;
    case LUA_TNUMBER: return luai_numeq(nvalue(t1), nvalue(t2));
    case LUA_TBOOLEAN: return bvalue(t1) == bvalue(t2);  /* true must be 1 !! */
    case LUA_TLIGHTUSERDATA: return pvalue(t1) == pvalue(t2);
    case LUA_TLCF: return fvalue(t1) == fvalue(t2);
    case LUA_TSHRSTR: return eqshrstr(rawtsvalue(t1), rawtsvalue(t2));
    case LUA_TLNGSTR: return luaS_eqlngstr(rawtsvalue(t1), rawtsvalue(t2));
    case LUA_TUSERDATA: {
      if (uvalue(t1) == uvalue(t2)) return 1;
      else if (L == NULL) return 0;
      tm = get_equalTM(L, uvalue(t1)->metatable, uvalue(t2)->metatable, TM_EQ);
      break;  /* will try TM */
    }
    case LUA_TTABLE: {
      if (hvalue(t1) == hvalue(t2)) return 1;
      else if (L == NULL) return 0;
      tm = get_equalTM(L, hvalue(t1)->metatable, hvalue(t2)->metatable, TM_EQ);
      break;  /* will try TM */
    }
    default:
      lua_assert(iscollectable(t1));
      return gcvalue(t1) == gcvalue(t2);
  }
  if (tm == NULL) return 0;  /* no TM? */
  callTM(L, tm, t1, t2, L->top, 1);  /* call TM */
  return !l_isfalse(L->top);
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdx, %rbx
movq %rsi, %r14
movl 0x8(%rsi), %ecx
andl $0x3f, %ecx
cmpl $0x7, %ecx
ja 0x19066
movq %rdi, %r15
movl $0x1, %eax
leaq 0x8da1(%rip), %rdx      # 0x21da0
movslq (%rdx,%rcx,4), %rcx
addq %rdx, %rcx
jmpq *%rcx
movq (%r14), %rcx
movq (%rbx), %rdx
cmpq %rdx, %rcx
je 0x19079
testq %r15, %r15
je 0x190ac
movq 0x10(%rcx), %rsi
movq 0x10(%rdx), %rdx
movq %r15, %rdi
callq 0x190b7
testq %rax, %rax
je 0x190ac
movq 0x10(%r15), %r8
movq %r15, %rdi
movq %rax, %rsi
movq %r14, %rdx
movq %rbx, %rcx
movl $0x1, %r9d
callq 0x18bc4
movq 0x10(%r15), %rcx
movl 0x8(%rcx), %eax
testl %eax, %eax
je 0x19079
cmpl $0x1, %eax
jne 0x190b0
xorl %eax, %eax
cmpl $0x0, (%rcx)
setne %al
jmp 0x19079
cmpl $0x14, %ecx
je 0x1909c
cmpl $0x16, %ecx
movq (%r14), %rcx
xorl %eax, %eax
cmpq (%rbx), %rcx
sete %al
popq %rbx
popq %r14
popq %r15
retq
movl (%r14), %ecx
xorl %eax, %eax
cmpl (%rbx), %ecx
jmp 0x19076
movsd (%rbx), %xmm0
cmpeqsd (%r14), %xmm0
movq %xmm0, %rax
andl $0x1, %eax
jmp 0x19079
movq (%r14), %rdi
movq (%rbx), %rsi
popq %rbx
popq %r14
popq %r15
jmp 0x1488c
xorl %eax, %eax
jmp 0x19079
movl $0x1, %eax
jmp 0x19079
// File: /workspace/github_c_makefile_star2_O1/bhk[P]tooltree/lua/../opensource/lua-5.2.3/src/lvm.c
// Function: get_equalTM
static const TValue *get_equalTM (lua_State *L, Table *mt1, Table *mt2,
                                  TMS event) {
  const TValue *tm1 = fasttm(L, mt1, event);
  const TValue *tm2;
  if (tm1 == NULL) return NULL;  /* no metamethod */
  if (mt1 == mt2) return tm1;  /* same metatables => same metamethods */
  tm2 = fasttm(L, mt2, event);
  if (tm2 == NULL) return NULL;  /* no metamethod */
  if (luaV_rawequalobj(tm1, tm2))  /* same metamethods? */
    return tm1;
  return NULL;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %r14
movq %rsi, %r12
movq %rdi, %r15
testq %rsi, %rsi
je 0x190f2
testb $0x20, 0xa(%r12)
jne 0x190f2
movq 0x18(%r15), %rax
movq 0x148(%rax), %rdx
movq %r12, %rdi
movl $0x5, %esi
callq 0x18145
movq %rax, %rbx
jmp 0x190f4
xorl %ebx, %ebx
testq %rbx, %rbx
je 0x19144
cmpq %r14, %r12
je 0x19146
testq %r14, %r14
je 0x19124
testb $0x20, 0xa(%r14)
jne 0x19124
movq 0x18(%r15), %rax
movq 0x148(%rax), %rdx
movq %r14, %rdi
movl $0x5, %esi
callq 0x18145
jmp 0x19126
xorl %eax, %eax
testq %rax, %rax
je 0x19144
movl 0x8(%rbx), %ecx
cmpl 0x8(%rax), %ecx
jne 0x19144
xorl %edi, %edi
movq %rbx, %rsi
movq %rax, %rdx
callq 0x18fda
testl %eax, %eax
jne 0x19146
xorl %ebx, %ebx
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/bhk[P]tooltree/lua/../opensource/lua-5.2.3/src/lvm.c
// Function: call_binTM
static int call_binTM (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;
  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 0x18170
cmpl $0x0, 0x8(%rax)
jne 0x193a1
movq %r12, %rdi
movq %r14, %rsi
movl %ebp, %edx
callq 0x18170
cmpl $0x0, 0x8(%rax)
je 0x193c8
movl $0x1, %ebp
movq %r12, %rdi
movq %rax, %rsi
movq %r15, %rdx
movq %r14, %rcx
movq %rbx, %r8
movl $0x1, %r9d
callq 0x18bc4
jmp 0x193ca
xorl %ebp, %ebp
movl %ebp, %eax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/bhk[P]tooltree/lua/../opensource/lua-5.2.3/src/lvm.c
// Function: luaV_objlen
void luaV_objlen (lua_State *L, StkId ra, const TValue *rb) {
  const TValue *tm;
  switch (ttypenv(rb)) {
    case LUA_TTABLE: {
      Table *h = hvalue(rb);
      tm = fasttm(L, h->metatable, TM_LEN);
      if (tm) break;  /* metamethod? break switch to call it */
      setnvalue(ra, cast_num(luaH_getn(h)));  /* else primitive len */
      return;
    }
    case LUA_TSTRING: {
      setnvalue(ra, cast_num(tsvalue(rb)->len));
      return;
    }
    default: {  /* try metamethod */
      tm = luaT_gettmbyobj(L, rb, TM_LEN);
      if (ttisnil(tm))  /* no metamethod? */
        luaG_typeerror(L, rb, "get length of");
      break;
    }
  }
  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 $0xf, %eax
cmpl $0x4, %eax
je 0x19423
movq %rdi, %r15
cmpl $0x5, %eax
jne 0x1944c
movq (%r14), %r12
movq 0x10(%r12), %rdi
testq %rdi, %rdi
je 0x19477
testb $0x10, 0xa(%rdi)
jne 0x19477
movq 0x18(%r15), %rax
movq 0x140(%rax), %rdx
movl $0x4, %esi
callq 0x18145
movq %rax, %rsi
jmp 0x19479
movq (%r14), %rax
movsd 0x10(%rax), %xmm0
unpcklps 0x82ce(%rip), %xmm0     # xmm0 = xmm0[0],mem[0],xmm0[1],mem[1]
subpd 0x82d6(%rip), %xmm0     # 0x21710
movapd %xmm0, %xmm1
unpckhpd %xmm0, %xmm1            # xmm1 = xmm1[1],xmm0[1]
addsd %xmm0, %xmm1
movsd %xmm1, (%rbx)
jmp 0x194b0
movq %r15, %rdi
movq %r14, %rsi
movl $0x4, %edx
callq 0x18170
movq %rax, %rsi
cmpl $0x0, 0x8(%rax)
jne 0x1947e
leaq 0x8a9d(%rip), %rdx      # 0x21f09
movq %r15, %rdi
movq %r14, %rsi
callq 0xab63
xorl %esi, %esi
testq %rsi, %rsi
je 0x194a0
movq %r15, %rdi
movq %r14, %rdx
movq %r14, %rcx
movq %rbx, %r8
movl $0x1, %r9d
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
jmp 0x18bc4
movq %r12, %rdi
callq 0x17613
cvtsi2sd %eax, %xmm0
movsd %xmm0, (%rbx)
movl $0x3, 0x8(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/bhk[P]tooltree/lua/../opensource/lua-5.2.3/src/lvm.c
// Function: luaV_arith
void luaV_arith (lua_State *L, StkId ra, const TValue *rb,
                 const TValue *rc, TMS op) {
  TValue tempb, tempc;
  const TValue *b, *c;
  if ((b = luaV_tonumber(rb, &tempb)) != NULL &&
      (c = luaV_tonumber(rc, &tempc)) != NULL) {
    lua_Number res = luaO_arith(op - TM_ADD + LUA_OPADD, nvalue(b), nvalue(c));
    setnvalue(ra, res);
  }
  else if (!call_binTM(L, rb, rc, ra, op))
    luaG_aritherror(L, rb, rc);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movl %r8d, %ebp
movq %rcx, %r14
movq %rdx, %r15
movq %rsi, %rbx
movq %rdi, %r12
leaq 0x18(%rsp), %rsi
movq %rdx, %rdi
callq 0x189ec
testq %rax, %rax
je 0x19528
movq %rax, %r13
leaq 0x8(%rsp), %rsi
movq %r14, %rdi
callq 0x189ec
testq %rax, %rax
je 0x19528
addl $-0x6, %ebp
movsd (%r13), %xmm0
movsd (%rax), %xmm1
movl %ebp, %edi
callq 0x107e1
movsd %xmm0, (%rbx)
movl $0x3, 0x8(%rbx)
jmp 0x19540
movq %r12, %rdi
movq %r15, %rsi
movq %r14, %rdx
movq %rbx, %rcx
movl %ebp, %r8d
callq 0x1936f
testl %eax, %eax
je 0x1954f
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %r12, %rdi
movq %r15, %rsi
movq %r14, %rdx
callq 0xafd3
// File: /workspace/github_c_makefile_star2_O1/bhk[P]tooltree/lua/../opensource/lua-5.2.3/src/lzio.c
// Function: luaZ_openspace
char *luaZ_openspace (lua_State *L, Mbuffer *buff, size_t n) {
  if (n > buff->buffsize) {
    if (n < LUA_MINBUFFER) n = LUA_MINBUFFER;
    luaZ_resizebuffer(L, buff, n);
  }
  return buff->buffer;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdx, %rax
movq %rsi, %rbx
movq 0x10(%rsi), %rdx
cmpq %rax, %rdx
jae 0x1ab75
cmpq $0x21, %rax
movl $0x20, %r14d
cmovaeq %rax, %r14
leaq 0x3(%r14), %rax
cmpq $0x1, %rax
jbe 0x1ab80
movq (%rbx), %rsi
movq %r14, %rcx
callq 0xfa40
movq %rax, (%rbx)
movq %r14, 0x10(%rbx)
movq (%rbx), %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
callq 0xfa31
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O1/bhk[P]tooltree/lua/../opensource/lua-5.2.3/src/lbaselib.c
// Function: luaopen_base
LUAMOD_API int luaopen_base (lua_State *L) {
  /* set global _G */
  lua_pushglobaltable(L);
  lua_pushglobaltable(L);
  lua_setfield(L, -2, "_G");
  /* open lib into global table */
  luaL_setfuncs(L, base_funcs, 0);
  lua_pushliteral(L, LUA_VERSION);
  lua_setfield(L, -2, "_VERSION");  /* set global _VERSION */
  return 1;
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
movl $0xfff0b9d8, %esi       # imm = 0xFFF0B9D8
movl $0x2, %edx
callq 0x8145
movq %rbx, %rdi
movl $0xfff0b9d8, %esi       # imm = 0xFFF0B9D8
movl $0x2, %edx
callq 0x8145
leaq 0x5eba(%rip), %rdx      # 0x20a6e
movq %rbx, %rdi
movl $0xfffffffe, %esi       # imm = 0xFFFFFFFE
callq 0x833f
leaq 0x11cd8(%rip), %rsi     # 0x2c8a0
movq %rbx, %rdi
xorl %edx, %edx
callq 0xa00f
leaq 0x73a7(%rip), %rsi      # 0x21f80
movl $0x7, %edx
movq %rbx, %rdi
callq 0x7dc7
leaq 0x739b(%rip), %rdx      # 0x21f88
movq %rbx, %rdi
movl $0xfffffffe, %esi       # imm = 0xFFFFFFFE
callq 0x833f
movl $0x1, %eax
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O1/bhk[P]tooltree/lua/../opensource/lua-5.2.3/src/lbaselib.c
// Function: luaB_collectgarbage
static int luaB_collectgarbage (lua_State *L) {
  static const char *const opts[] = {"stop", "restart", "collect",
    "count", "step", "setpause", "setstepmul",
    "setmajorinc", "isrunning", "generational", "incremental", NULL};
  static const int optsnum[] = {LUA_GCSTOP, LUA_GCRESTART, LUA_GCCOLLECT,
    LUA_GCCOUNT, LUA_GCSTEP, LUA_GCSETPAUSE, LUA_GCSETSTEPMUL,
    LUA_GCSETMAJORINC, LUA_GCISRUNNING, LUA_GCGEN, LUA_GCINC};
  int o = optsnum[luaL_checkoption(L, 1, "collect", opts)];
  int ex = luaL_optint(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, res + ((lua_Number)b/1024));
      lua_pushinteger(L, b);
      return 2;
    }
    case LUA_GCSTEP: case LUA_GCISRUNNING: {
      lua_pushboolean(L, res);
      return 1;
    }
    default: {
      lua_pushinteger(L, res);
      return 1;
    }
  }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
leaq 0x73d2(%rip), %rdx      # 0x2202a
leaq 0x11db1(%rip), %rcx     # 0x2ca10
movl $0x1, %ebp
movl $0x1, %esi
callq 0x946f
cltq
leaq 0x7529(%rip), %rcx      # 0x221a0
movl (%rcx,%rax,4), %r14d
movq %rbx, %rdi
movl $0x2, %esi
xorl %edx, %edx
callq 0x9769
movq %rbx, %rdi
movl %r14d, %esi
movl %eax, %edx
callq 0x8828
movl %eax, %r15d
cmpl $0x9, %r14d
je 0x1acec
cmpl $0x5, %r14d
je 0x1acec
cmpl $0x3, %r14d
jne 0x1acf9
movq %rbx, %rdi
movl $0x4, %esi
xorl %edx, %edx
callq 0x8828
movl %eax, %ebp
cvtsi2sd %r15d, %xmm1
cvtsi2sd %eax, %xmm0
mulsd 0x72aa(%rip), %xmm0     # 0x21f78
addsd %xmm1, %xmm0
movq %rbx, %rdi
callq 0x7d72
movslq %ebp, %rsi
movq %rbx, %rdi
callq 0x7d87
movl $0x2, %ebp
jmp 0x1ad09
movq %rbx, %rdi
movl %r15d, %esi
callq 0x7fe1
jmp 0x1ad09
movslq %r15d, %rsi
movq %rbx, %rdi
callq 0x7d87
movl $0x1, %ebp
movl %ebp, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/bhk[P]tooltree/lua/../opensource/lua-5.2.3/src/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);
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movl $0x1, %esi
xorl %edx, %edx
xorl %ecx, %ecx
callq 0x9500
movq %rax, %r14
movq %rbx, %rdi
movl $0x1, %esi
callq 0x7697
movq %rbx, %rdi
movq %r14, %rsi
xorl %edx, %edx
callq 0x9aca
testl %eax, %eax
je 0x1ad5b
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x8960
leaq 0x8eb(%rip), %r8        # 0x1b64d
movq %rbx, %rdi
xorl %esi, %esi
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
xorl %ecx, %ecx
callq 0x85f1
movq %rbx, %rdi
callq 0x7683
decl %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O1/bhk[P]tooltree/lua/../opensource/lua-5.2.3/src/lbaselib.c
// Function: luaB_error
static int luaB_error (lua_State *L) {
  int level = luaL_optint(L, 2, 1);
  lua_settop(L, 1);
  if (lua_isstring(L, 1) && level > 0) {  /* add extra information? */
    luaL_where(L, level);
    lua_pushvalue(L, 1);
    lua_concat(L, 2);
  }
  return lua_error(L);
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movl $0x1, %edx
movl $0x2, %esi
callq 0x9769
movq %rax, %r14
movq %rbx, %rdi
movl $0x1, %esi
callq 0x7697
movq %rbx, %rdi
movl $0x1, %esi
callq 0x7907
testl %eax, %eax
setne %al
testl %r14d, %r14d
setg %cl
andb %al, %cl
cmpb $0x1, %cl
jne 0x1adef
movq %rbx, %rdi
movl %r14d, %esi
callq 0x9166
movq %rbx, %rdi
movl $0x1, %esi
callq 0x7869
movq %rbx, %rdi
movl $0x2, %esi
callq 0x899d
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x8960
// File: /workspace/github_c_makefile_star2_O1/bhk[P]tooltree/lua/../opensource/lua-5.2.3/src/lbaselib.c
// Function: luaB_pcall
static int luaB_pcall (lua_State *L) {
  int status;
  luaL_checkany(L, 1);
  lua_pushnil(L);
  lua_insert(L, 1);  /* create space for status result */
  status = lua_pcallk(L, lua_gettop(L) - 2, LUA_MULTRET, 0, 0, pcallcont);
  return finishpcall(L, (status == LUA_OK));
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
movl $0x1, %esi
callq 0x961d
movq %rbx, %rdi
callq 0x7d5e
movq %rbx, %rdi
movl $0x1, %esi
callq 0x779a
movq %rbx, %rdi
callq 0x7683
leal -0x2(%rax), %esi
leaq 0x815(%rip), %r9        # 0x1b861
movq %rbx, %rdi
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
xorl %ecx, %ecx
xorl %r8d, %r8d
callq 0x8652
xorl %esi, %esi
testl %eax, %eax
sete %sil
movq %rbx, %rdi
popq %rbx
jmp 0x1b87b
// File: /workspace/github_c_makefile_star2_O1/bhk[P]tooltree/lua/../opensource/lua-5.2.3/src/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,
         LUA_QL("tostring") " must return a string to " LUA_QL("print"));
    if (i>1) luai_writestring("\t", 1);
    luai_writestring(s, l);
    lua_pop(L, 1);  /* pop result */
  }
  luai_writeline();
  return 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
callq 0x7683
movl %eax, %r14d
leaq 0x5195(%rip), %rsi      # 0x20221
movq %rbx, %rdi
callq 0x8033
testl %r14d, %r14d
jle 0x1b163
negl %r14d
movl $0x1, %r13d
movq %rsp, %r15
movq %rbx, %rdi
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
callq 0x7869
movq %rbx, %rdi
movl %r13d, %esi
callq 0x7869
movq %rbx, %rdi
movl $0x1, %esi
movl $0x1, %edx
xorl %ecx, %ecx
xorl %r8d, %r8d
callq 0x85f1
movq %rbx, %rdi
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
movq %r15, %rdx
callq 0x7bdc
movq %rax, %r12
testq %rax, %rax
je 0x1b134
cmpl $0x2, %r13d
jb 0x1b10a
movq 0x11ecb(%rip), %rax     # 0x2cfc8
movq (%rax), %rsi
movl $0x9, %edi
callq 0x6260
movq (%rsp), %rdx
movq 0x11eb3(%rip), %rax     # 0x2cfc8
movq (%rax), %rcx
movl $0x1, %esi
movq %r12, %rdi
callq 0x6550
movq %rbx, %rdi
movl $0xfffffffe, %esi       # imm = 0xFFFFFFFE
callq 0x7697
jmp 0x1b147
movq %rbx, %rdi
leaq 0x6fa9(%rip), %rsi      # 0x220e7
xorl %eax, %eax
callq 0x9024
movl %eax, %ebp
testq %r12, %r12
je 0x1b181
leal (%r14,%r13), %eax
incl %eax
movl %r13d, %ecx
incl %ecx
movl %ecx, %r13d
cmpl $0x1, %eax
jne 0x1b0a9
movq 0x11e5e(%rip), %rbx     # 0x2cfc8
movq (%rbx), %rsi
movl $0xa, %edi
callq 0x6260
movq (%rbx), %rdi
callq 0x63c0
xorl %ebp, %ebp
movl %ebp, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/bhk[P]tooltree/lua/../opensource/lua-5.2.3/src/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 {
    int i = luaL_checkint(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 - i;
  }
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movq %rdi, %r14
callq 0x7683
movl %eax, %ebx
movq %r14, %rdi
movl $0x1, %esi
callq 0x7889
cmpl $0x4, %eax
jne 0x1b2f0
movl $0x1, %ebp
movq %r14, %rdi
movl $0x1, %esi
xorl %edx, %edx
callq 0x7bdc
cmpb $0x23, (%rax)
jne 0x1b2f0
decl %ebx
movslq %ebx, %rsi
movq %r14, %rdi
callq 0x7d87
jmp 0x1b328
movq %r14, %rdi
movl $0x1, %esi
callq 0x96d4
leal (%rbx,%rax), %ecx
cmpl %eax, %ebx
movl %eax, %ebp
cmovll %ebx, %ebp
testl %eax, %eax
cmovsl %ecx, %ebp
testl %ebp, %ebp
jg 0x1b324
leaq 0x6e14(%rip), %rdx      # 0x2212b
movq %r14, %rdi
movl $0x1, %esi
callq 0x8f3e
subl %ebp, %ebx
movl %ebx, %ebp
movl %ebp, %eax
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/bhk[P]tooltree/lua/../opensource/lua-5.2.3/src/lbaselib.c
// Function: luaB_xpcall
static int luaB_xpcall (lua_State *L) {
  int status;
  int n = lua_gettop(L);
  luaL_argcheck(L, n >= 2, 2, "value expected");
  lua_pushvalue(L, 1);  /* exchange function... */
  lua_copy(L, 2, 1);  /* ...and error handler */
  lua_replace(L, 2);
  status = lua_pcallk(L, n - 2, LUA_MULTRET, 1, 0, pcallcont);
  return finishpcall(L, (status == LUA_OK));
}

// Assembly:
pushq %rbp
pushq %rbx
pushq %rax
movq %rdi, %rbx
callq 0x7683
movl %eax, %ebp
cmpl $0x1, %eax
jg 0x1b5ea
leaq 0x4eec(%rip), %rdx      # 0x204c9
movq %rbx, %rdi
movl $0x2, %esi
callq 0x8f3e
movq %rbx, %rdi
movl $0x1, %esi
callq 0x7869
movq %rbx, %rdi
movl $0x2, %esi
movl $0x1, %edx
callq 0x784a
movq %rbx, %rdi
movl $0x2, %esi
callq 0x77d7
addl $-0x2, %ebp
leaq 0x241(%rip), %r9        # 0x1b861
movq %rbx, %rdi
movl %ebp, %esi
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
movl $0x1, %ecx
xorl %r8d, %r8d
callq 0x8652
xorl %esi, %esi
testl %eax, %eax
sete %sil
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %rbp
jmp 0x1b87b
// File: /workspace/github_c_makefile_star2_O1/bhk[P]tooltree/lua/../opensource/lua-5.2.3/src/lbaselib.c
// Function: pairsmeta
static int pairsmeta (lua_State *L, const char *method, int iszero,
                      lua_CFunction iter) {
  if (!luaL_getmetafield(L, 1, method)) {  /* no metamethod? */
    luaL_checktype(L, 1, LUA_TTABLE);  /* argument must be a table */
    lua_pushcfunction(L, iter);  /* will return generator, */
    lua_pushvalue(L, 1);  /* state, */
    if (iszero) lua_pushinteger(L, 0);  /* and initial value */
    else lua_pushnil(L);
  }
  else {
    lua_pushvalue(L, 1);  /* argument 'self' to metamethod */
    lua_call(L, 1, 3);  /* get 3 values from metamethod */
  }
  return 3;
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movq %rcx, %r14
movl %edx, %ebp
movq %rsi, %rdx
movq %rdi, %rbx
movl $0x1, %esi
callq 0x9e25
movq %rbx, %rdi
movl $0x1, %esi
testl %eax, %eax
je 0x1b69c
callq 0x7869
movq %rbx, %rdi
movl $0x1, %esi
movl $0x3, %edx
xorl %ecx, %ecx
xorl %r8d, %r8d
popq %rbx
popq %r14
popq %rbp
jmp 0x85f1
movl $0x5, %edx
callq 0x95e9
movq %rbx, %rdi
movq %r14, %rsi
xorl %edx, %edx
callq 0x7f5d
movq %rbx, %rdi
movl $0x1, %esi
callq 0x7869
movq %rbx, %rdi
testl %ebp, %ebp
je 0x1b6d2
xorl %esi, %esi
popq %rbx
popq %r14
popq %rbp
jmp 0x7d87
popq %rbx
popq %r14
popq %rbp
jmp 0x7d5e
// File: /workspace/github_c_makefile_star2_O1/bhk[P]tooltree/lua/../opensource/lua-5.2.3/src/lbaselib.c
// Function: ipairsaux
static int ipairsaux (lua_State *L) {
  int i = luaL_checkint(L, 2);
  luaL_checktype(L, 1, LUA_TTABLE);
  i++;  /* next value */
  lua_pushinteger(L, i);
  lua_rawgeti(L, 1, i);
  return (lua_isnil(L, -1)) ? 1 : 2;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %r14
movl $0x2, %ebx
movl $0x2, %esi
callq 0x96d4
movq %rax, %r15
movq %r14, %rdi
movl $0x1, %esi
movl $0x5, %edx
callq 0x95e9
incl %r15d
movslq %r15d, %r15
movq %r14, %rdi
movq %r15, %rsi
callq 0x7d87
movq %r14, %rdi
movl $0x1, %esi
movl %r15d, %edx
callq 0x8145
movq %r14, %rdi
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
callq 0x7889
cmpl $0x1, %eax
sbbl $0x0, %ebx
movl %ebx, %eax
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/bhk[P]tooltree/lua/../opensource/lua-5.2.3/src/lbaselib.c
// Function: finishpcall
static int finishpcall (lua_State *L, int status) {
  if (!lua_checkstack(L, 1)) {  /* no space for extra boolean? */
    lua_settop(L, 0);  /* create space for return values */
    lua_pushboolean(L, 0);
    lua_pushstring(L, "stack overflow");
    return 2;  /* return false, msg */
  }
  lua_pushboolean(L, status);  /* first result (status) */
  lua_replace(L, 1);  /* put first result in first slot */
  return lua_gettop(L);
}

// Assembly:
pushq %rbp
pushq %rbx
pushq %rax
movl %esi, %ebp
movq %rdi, %rbx
movl $0x1, %esi
callq 0x7564
movq %rbx, %rdi
testl %eax, %eax
je 0x1b8b6
movl %ebp, %esi
callq 0x7fe1
movq %rbx, %rdi
movl $0x1, %esi
callq 0x77d7
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %rbp
jmp 0x7683
xorl %esi, %esi
callq 0x7697
movq %rbx, %rdi
xorl %esi, %esi
callq 0x7fe1
leaq 0x4fc4(%rip), %rsi      # 0x20892
movq %rbx, %rdi
callq 0x7e16
movl $0x2, %eax
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O1/bhk[P]tooltree/lua/../opensource/lua-5.2.3/src/lbitlib.c
// Function: b_arshift
static int b_arshift (lua_State *L) {
  b_uint r = luaL_checkunsigned(L, 1);
  int i = luaL_checkint(L, 2);
  if (i < 0 || !(r & ((b_uint)1 << (LUA_NBITS - 1))))
    return b_shift(L, r, -i);
  else {  /* arithmetic shift for 'negative' number */
    if (i >= LUA_NBITS) r = ALLONES;
    else
      r = trim((r >> i) | ~(~(b_uint)0 >> i));  /* add signal bit */
    lua_pushunsigned(L, r);
    return 1;
  }
}

// Assembly:
pushq %rbp
pushq %rbx
pushq %rax
movq %rdi, %rbx
movl $0x1, %esi
callq 0x9721
movl %eax, %ebp
movq %rbx, %rdi
movl $0x2, %esi
callq 0x96d4
testl %eax, %eax
sets %cl
testl %ebp, %ebp
setns %dl
orb %cl, %dl
movl %eax, %ecx
cmpb $0x1, %dl
jne 0x1b94e
testl %eax, %eax
jle 0x1b968
shrl %cl, %ebp
xorl %esi, %esi
cmpl $0x20, %eax
cmovll %ebp, %esi
jmp 0x1b974
shrl %cl, %ebp
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
shrl %cl, %esi
notl %esi
orl %ebp, %esi
cmpl $0x20, %eax
cmovgel %edx, %esi
jmp 0x1b974
negb %cl
shll %cl, %ebp
xorl %esi, %esi
cmpl $-0x1f, %eax
cmovgel %ebp, %esi
movq %rbx, %rdi
callq 0x7da1
movl $0x1, %eax
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/bhk[P]tooltree/lua/../opensource/lua-5.2.3/src/lbitlib.c
// Function: b_or
static int b_or (lua_State *L) {
  int i, n = lua_gettop(L);
  b_uint r = 0;
  for (i = 1; i <= n; i++)
    r |= luaL_checkunsigned(L, i);
  lua_pushunsigned(L, trim(r));
  return 1;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
callq 0x7683
testl %eax, %eax
jle 0x1ba06
movl %eax, %r14d
negl %r14d
movl $0x1, %r15d
xorl %ebp, %ebp
movq %rbx, %rdi
movl %r15d, %esi
callq 0x9721
orl %eax, %ebp
leal (%r14,%r15), %eax
incl %eax
movl %r15d, %ecx
incl %ecx
movl %ecx, %r15d
cmpl $0x1, %eax
jne 0x1b9e4
jmp 0x1ba08
xorl %ebp, %ebp
movq %rbx, %rdi
movl %ebp, %esi
callq 0x7da1
movl $0x1, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/bhk[P]tooltree/lua/../opensource/lua-5.2.3/src/lbitlib.c
// Function: b_extract
static int b_extract (lua_State *L) {
  int w;
  b_uint r = luaL_checkunsigned(L, 1);
  int f = fieldargs(L, 2, &w);
  r = (r >> f) & mask(w);
  lua_pushunsigned(L, r);
  return 1;
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq %rdi, %rbx
movl $0x1, %esi
callq 0x9721
movl %eax, %ebp
leaq 0xc(%rsp), %r14
movq %rbx, %rdi
movl $0x2, %esi
movq %r14, %rdx
callq 0x1bcf1
movl %eax, %ecx
shrl %cl, %ebp
movb (%r14), %cl
decb %cl
movl $0xfffffffe, %esi       # imm = 0xFFFFFFFE
shll %cl, %esi
notl %esi
andl %ebp, %esi
movq %rbx, %rdi
callq 0x7da1
movl $0x1, %eax
addq $0x10, %rsp
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/bhk[P]tooltree/lua/../opensource/lua-5.2.3/src/lbitlib.c
// Function: b_replace
static int b_replace (lua_State *L) {
  int w;
  b_uint r = luaL_checkunsigned(L, 1);
  b_uint v = luaL_checkunsigned(L, 2);
  int f = fieldargs(L, 3, &w);
  int m = mask(w);
  v &= m;  /* erase bits outside given width */
  r = (r & ~(m << f)) | (v << f);
  lua_pushunsigned(L, r);
  return 1;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movl $0x1, %esi
callq 0x9721
movl %eax, %r14d
movq %rbx, %rdi
movl $0x2, %esi
callq 0x9721
movl %eax, %ebp
leaq 0x4(%rsp), %r15
movq %rbx, %rdi
movl $0x3, %esi
movq %r15, %rdx
callq 0x1bcf1
movb (%r15), %cl
decb %cl
movl $0xfffffffe, %edx       # imm = 0xFFFFFFFE
shll %cl, %edx
movl %eax, %ecx
notl %edx
andl %edx, %ebp
shll %cl, %edx
notl %edx
andl %r14d, %edx
shll %cl, %ebp
orl %edx, %ebp
movq %rbx, %rdi
movl %ebp, %esi
callq 0x7da1
movl $0x1, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/bhk[P]tooltree/lua/../opensource/lua-5.2.3/src/lbitlib.c
// Function: andaux
static b_uint andaux (lua_State *L) {
  int i, n = lua_gettop(L);
  b_uint r = ~(b_uint)0;
  for (i = 1; i <= n; i++)
    r &= luaL_checkunsigned(L, i);
  return trim(r);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
callq 0x7683
testl %eax, %eax
jle 0x1bcdf
movl %eax, %r14d
negl %r14d
movl $0x1, %r15d
movl $0xffffffff, %ebp       # imm = 0xFFFFFFFF
movq %rbx, %rdi
movl %r15d, %esi
callq 0x9721
andl %eax, %ebp
leal (%r14,%r15), %eax
incl %eax
movl %r15d, %ecx
incl %ecx
movl %ecx, %r15d
cmpl $0x1, %eax
jne 0x1bcbd
jmp 0x1bce4
movl $0xffffffff, %ebp       # imm = 0xFFFFFFFF
movl %ebp, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/bhk[P]tooltree/lua/../opensource/lua-5.2.3/src/lbitlib.c
// Function: fieldargs
static int fieldargs (lua_State *L, int farg, int *width) {
  int f = luaL_checkint(L, farg);
  int w = luaL_optint(L, farg + 1, 1);
  luaL_argcheck(L, 0 <= f, farg, "field cannot be negative");
  luaL_argcheck(L, 0 < w, farg + 1, "width must be positive");
  if (f + w > LUA_NBITS)
    luaL_error(L, "trying to access non-existent bits");
  *width = w;
  return f;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %rbx
movl %esi, %r13d
movq %rdi, %r15
callq 0x96d4
movq %rax, %r14
leal 0x1(%r13), %ebp
movl $0x1, %edx
movq %r15, %rdi
movl %ebp, %esi
callq 0x9769
movq %rax, %r12
testl %r14d, %r14d
jns 0x1bd3a
leaq 0x64e5(%rip), %rdx      # 0x22214
movq %r15, %rdi
movl %r13d, %esi
callq 0x8f3e
testl %r12d, %r12d
jg 0x1bd50
leaq 0x64e7(%rip), %rdx      # 0x2222d
movq %r15, %rdi
movl %ebp, %esi
callq 0x8f3e
leal (%r12,%r14), %eax
cmpl $0x21, %eax
jl 0x1bd6a
leaq 0x64e4(%rip), %rsi      # 0x22244
movq %r15, %rdi
xorl %eax, %eax
callq 0x9024
movl %r12d, (%rbx)
movl %r14d, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O1/bhk[P]tooltree/lua/../opensource/lua-5.2.3/src/lcode.c
// Function: luaK_concat
void luaK_concat (FuncState *fs, int *l1, int l2) {
  if (l2 == NO_JUMP) return;
  else if (*l1 == NO_JUMP)
    *l1 = l2;
  else {
    int list = *l1;
    int next;
    while ((next = getjump(fs, list)) != NO_JUMP)  /* find last element */
      list = next;
    fixjump(fs, list, l2);
  }
}

// Assembly:
cmpl $-0x1, %edx
je 0x1bef3
movl (%rsi), %ecx
cmpl $-0x1, %ecx
je 0x1bef1
movq (%rdi), %rax
movq 0x18(%rax), %rax
movl %ecx, %esi
movslq %ecx, %rcx
movl (%rax,%rcx,4), %r8d
shrl $0xe, %r8d
leal -0x1ffff(%r8), %r9d
cmpl $-0x1, %r9d
leal -0x1fffe(%rcx,%r8), %ecx
cmovel %r9d, %ecx
cmpl $-0x1, %ecx
jne 0x1bec3
jmp 0x1c00a
movl %edx, (%rsi)
retq
// File: /workspace/github_c_makefile_star2_O1/bhk[P]tooltree/lua/../opensource/lua-5.2.3/src/lcode.c
// Function: luaK_patchlist
void luaK_patchlist (FuncState *fs, int list, int target) {
  if (target == fs->pc)
    luaK_patchtohere(fs, list);
  else {
    lua_assert(target < fs->pc);
    patchlistaux(fs, list, target, NO_REG, target);
  }
}

// Assembly:
movl %edx, %r8d
movl %esi, %edx
movl 0x28(%rdi), %eax
cmpl %r8d, %eax
jne 0x1bf2a
movl %eax, 0x2c(%rdi)
leaq 0x30(%rdi), %rsi
jmp 0x1beb0
movl %edx, %esi
movl %r8d, %edx
movl $0xff, %ecx
jmp 0x1bf47
// File: /workspace/github_c_makefile_star2_O1/bhk[P]tooltree/lua/../opensource/lua-5.2.3/src/lcode.c
// Function: luaK_patchclose
LUAI_FUNC void luaK_patchclose (FuncState *fs, int list, int level) {
  level++;  /* argument is +1 to reserve 0 as non-op */
  while (list != NO_JUMP) {
    int next = getjump(fs, list);
    lua_assert(GET_OPCODE(fs->f->code[list]) == OP_JMP &&
                (GETARG_A(fs->f->code[list]) == 0 ||
                 GETARG_A(fs->f->code[list]) >= level));
    SETARG_A(fs->f->code[list], level);
    list = next;
  }
}

// Assembly:
cmpl $-0x1, %esi
je 0x1c009
movq (%rdi), %rax
movq 0x18(%rax), %rax
shll $0x6, %edx
addl $0x40, %edx
andl $0x3fc0, %edx           # imm = 0x3FC0
movslq %esi, %rcx
movl (%rax,%rcx,4), %edi
movl %edi, %esi
shrl $0xe, %esi
leal -0x1ffff(%rsi), %r8d
cmpl $-0x1, %r8d
leal -0x1fffe(%rcx,%rsi), %esi
cmovel %r8d, %esi
andl $0xffffc03f, %edi       # imm = 0xFFFFC03F
orl %edx, %edi
movl %edi, (%rax,%rcx,4)
cmpl $-0x1, %esi
jne 0x1bfd8
retq
// File: /workspace/github_c_makefile_star2_O1/bhk[P]tooltree/lua/../opensource/lua-5.2.3/src/lcode.c
// Function: fixjump
static void fixjump (FuncState *fs, int pc, int dest) {
  Instruction *jmp = &fs->f->code[pc];
  int offset = dest-(pc+1);
  lua_assert(dest != NO_JUMP);
  if (abs(offset) > MAXARG_sBx)
    luaX_syntaxerror(fs->ls, "control structure too long");
  SETARG_sBx(*jmp, offset);
}

// Assembly:
movl %esi, %eax
notl %eax
addl %edx, %eax
movl %eax, %ecx
negl %ecx
cmovsl %eax, %ecx
cmpl $0x20000, %ecx          # imm = 0x20000
jae 0x1c03f
movq (%rdi), %rcx
movq 0x18(%rcx), %rcx
movslq %esi, %rdx
movl $0x3fff, %esi           # imm = 0x3FFF
andl (%rcx,%rdx,4), %esi
shll $0xe, %eax
addl %esi, %eax
addl $0x7fffc000, %eax       # imm = 0x7FFFC000
movl %eax, (%rcx,%rdx,4)
retq
pushq %rax
movq 0x18(%rdi), %rdi
leaq 0x632c(%rip), %rsi      # 0x22377
callq 0x1e517
// File: /workspace/github_c_makefile_star2_O1/bhk[P]tooltree/lua/../opensource/lua-5.2.3/src/lcode.c
// Function: luaK_checkstack
void luaK_checkstack (FuncState *fs, int n) {
  int newstack = fs->freereg + n;
  if (newstack > fs->f->maxstacksize) {
    if (newstack >= MAXSTACK)
      luaX_syntaxerror(fs->ls, "function or expression too complex");
    fs->f->maxstacksize = cast_byte(newstack);
  }
}

// Assembly:
movzbl 0x44(%rdi), %eax
addl %esi, %eax
movq (%rdi), %rcx
movzbl 0x7a(%rcx), %edx
cmpl %edx, %eax
jle 0x1c172
cmpl $0xfa, %eax
jge 0x1c173
movb %al, 0x7a(%rcx)
retq
pushq %rax
movq 0x18(%rdi), %rdi
leaq 0x61d5(%rip), %rsi      # 0x22354
callq 0x1e517
// File: /workspace/github_c_makefile_star2_O1/bhk[P]tooltree/lua/../opensource/lua-5.2.3/src/lcode.c
// Function: luaK_numberK
int luaK_numberK (FuncState *fs, lua_Number r) {
  int n;
  lua_State *L = fs->ls->L;
  TValue o;
  setnvalue(&o, r);
  if (r == 0 || luai_numisnan(NULL, r)) {  /* handle -0 and NaN */
    /* use raw representation as key to avoid numeric problems */
    setsvalue(L, L->top++, luaS_newlstr(L, (char *)&r, sizeof(r)));
    n = addk(fs, L->top - 1, &o);
    L->top--;
  }
  else
    n = addk(fs, &o, &o);  /* regular case */
  return n;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x20, %rsp
movq %rdi, %r14
movsd %xmm0, 0x18(%rsp)
movq 0x18(%rdi), %rax
movq 0x38(%rax), %rbx
movsd %xmm0, 0x8(%rsp)
movl $0x3, 0x10(%rsp)
xorpd %xmm1, %xmm1
ucomisd %xmm1, %xmm0
je 0x1c451
leaq 0x8(%rsp), %rdx
movq %r14, %rdi
movq %rdx, %rsi
callq 0x1c1c1
jmp 0x1c497
movq 0x10(%rbx), %r15
leaq 0x10(%r15), %rax
movq %rax, 0x10(%rbx)
leaq 0x18(%rsp), %rsi
movl $0x8, %edx
movq %rbx, %rdi
callq 0x14a3f
movq %rax, (%r15)
movzbl 0x8(%rax), %eax
orl $0x40, %eax
movl %eax, 0x8(%r15)
movq 0x10(%rbx), %rsi
addq $-0x10, %rsi
leaq 0x8(%rsp), %rdx
movq %r14, %rdi
callq 0x1c1c1
addq $-0x10, 0x10(%rbx)
addq $0x20, %rsp
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/bhk[P]tooltree/lua/../opensource/lua-5.2.3/src/lcode.c
// Function: luaK_setreturns
void luaK_setreturns (FuncState *fs, expdesc *e, int nresults) {
  if (e->k == VCALL) {  /* expression is an open function call? */
    SETARG_C(getcode(fs, e), nresults+1);
  }
  else if (e->k == VVARARG) {
    SETARG_B(getcode(fs, e), nresults+1);
    SETARG_A(getcode(fs, e), fs->freereg);
    luaK_reserveregs(fs, 1);
  }
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
movl (%rsi), %eax
cmpl $0xd, %eax
je 0x1c4da
cmpl $0xc, %eax
jne 0x1c523
movq (%rbx), %rax
movq 0x18(%rax), %rax
movslq 0x8(%rsi), %rcx
movl $0xff803fff, %esi       # imm = 0xFF803FFF
andl (%rax,%rcx,4), %esi
shll $0xe, %edx
addl $0x4000, %edx           # imm = 0x4000
andl $0x7fc000, %edx         # imm = 0x7FC000
orl %esi, %edx
movl %edx, (%rax,%rcx,4)
jmp 0x1c523
movq (%rbx), %rax
movq 0x18(%rax), %rax
movslq 0x8(%rsi), %rcx
movl $0x7fffff, %edi         # imm = 0x7FFFFF
andl (%rax,%rcx,4), %edi
shll $0x17, %edx
addl %edi, %edx
addl $0x800000, %edx         # imm = 0x800000
movl %edx, (%rax,%rcx,4)
movslq 0x8(%rsi), %rcx
movl $0xffffc03f, %edx       # imm = 0xFFFFC03F
andl (%rax,%rcx,4), %edx
movzbl 0x44(%rbx), %esi
shll $0x6, %esi
orl %edx, %esi
movl %esi, (%rax,%rcx,4)
movq %rbx, %rdi
movl $0x1, %esi
callq 0x1c157
incb 0x44(%rbx)
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O1/bhk[P]tooltree/lua/../opensource/lua-5.2.3/src/lcode.c
// Function: luaK_setoneret
void luaK_setoneret (FuncState *fs, expdesc *e) {
  if (e->k == VCALL) {  /* expression is an open function call? */
    e->k = VNONRELOC;
    e->u.info = GETARG_A(getcode(fs, e));
  }
  else if (e->k == VVARARG) {
    SETARG_B(getcode(fs, e), 2);
    e->k = VRELOCABLE;  /* can relocate its simple result */
  }
}

// Assembly:
movl (%rsi), %eax
cmpl $0xd, %eax
je 0x1c54f
cmpl $0xc, %eax
jne 0x1c571
movl $0x6, (%rsi)
movq (%rdi), %rax
movq 0x18(%rax), %rax
movslq 0x8(%rsi), %rcx
movl (%rax,%rcx,4), %eax
shrl $0x6, %eax
movzbl %al, %eax
movl %eax, 0x8(%rsi)
retq
movq (%rdi), %rax
movq 0x18(%rax), %rax
movslq 0x8(%rsi), %rcx
movl $0x7fffff, %edx         # imm = 0x7FFFFF
andl (%rax,%rcx,4), %edx
orl $0x1000000, %edx        # imm = 0x1000000
movl %edx, (%rax,%rcx,4)
movl $0xb, (%rsi)
retq
// File: /workspace/github_c_makefile_star2_O1/bhk[P]tooltree/lua/../opensource/lua-5.2.3/src/lcode.c
// Function: luaK_dischargevars
void luaK_dischargevars (FuncState *fs, expdesc *e) {
  switch (e->k) {
    case VLOCAL: {
      e->k = VNONRELOC;
      break;
    }
    case VUPVAL: {
      e->u.info = luaK_codeABC(fs, OP_GETUPVAL, 0, e->u.info, 0);
      e->k = VRELOCABLE;
      break;
    }
    case VINDEXED: {
      OpCode op = OP_GETTABUP;  /* assume 't' is in an upvalue */
      freereg(fs, e->u.ind.idx);
      if (e->u.ind.vt == VLOCAL) {  /* 't' is in a register? */
        freereg(fs, e->u.ind.t);
        op = OP_GETTABLE;
      }
      e->u.info = luaK_codeABC(fs, op, 0, e->u.ind.t, e->u.ind.idx);
      e->k = VRELOCABLE;
      break;
    }
    case VVARARG:
    case VCALL: {
      luaK_setoneret(fs, e);
      break;
    }
    default: break;  /* there is one value available (somewhere) */
  }
}

// Assembly:
pushq %rbx
movl (%rsi), %eax
addl $-0x7, %eax
cmpl $0x6, %eax
ja 0x1c5fc
movq %rsi, %rbx
leaq 0x5ce1(%rip), %rcx      # 0x22268
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movq %rbx, %rsi
popq %rbx
jmp 0x1c525
movswl 0x8(%rbx), %eax
btl $0x8, %eax
jb 0x1c5ae
movzbl 0x42(%rdi), %ecx
cmpl %eax, %ecx
jg 0x1c5ae
decb 0x44(%rdi)
movl $0x6, %eax
cmpb $0x7, 0xb(%rbx)
jne 0x1c5c9
movb 0x42(%rdi), %cl
movl $0x7, %eax
cmpb 0xa(%rbx), %cl
ja 0x1c5c9
decb 0x44(%rdi)
movzbl 0xa(%rbx), %ecx
movswl 0x8(%rbx), %esi
shll $0x17, %ecx
orl %eax, %ecx
shll $0xe, %esi
orl %ecx, %esi
jmp 0x1c5ee
movl $0x6, (%rbx)
jmp 0x1c5fc
movl 0x8(%rbx), %esi
shll $0x17, %esi
orl $0x5, %esi
callq 0x1c050
movl %eax, 0x8(%rbx)
movl $0xb, (%rbx)
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O1/bhk[P]tooltree/lua/../opensource/lua-5.2.3/src/lcode.c
// Function: luaK_exp2anyreg
int luaK_exp2anyreg (FuncState *fs, expdesc *e) {
  luaK_dischargevars(fs, e);
  if (e->k == VNONRELOC) {
    if (!hasjumps(e)) return e->u.info;  /* exp is already in a register */
    if (e->u.info >= fs->nactvar) {  /* reg. is not a local? */
      exp2reg(fs, e, e->u.info);  /* put value on it */
      return e->u.info;
    }
  }
  luaK_exp2nextreg(fs, e);  /* default */
  return e->u.info;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rsi, %rbx
movq %rdi, %r14
callq 0x1c572
cmpl $0x6, (%rbx)
jne 0x1c7a4
movl 0x10(%rbx), %eax
leaq 0x8(%rbx), %r15
cmpl 0x14(%rbx), %eax
je 0x1c7b6
movl (%r15), %edx
movzbl 0x42(%r14), %eax
cmpl %eax, %edx
jge 0x1c7bf
movq %r14, %rdi
movq %rbx, %rsi
callq 0x1c5fe
addq $0x8, %rbx
movq %rbx, %r15
movl (%r15), %eax
popq %rbx
popq %r14
popq %r15
retq
movq %r14, %rdi
movq %rbx, %rsi
callq 0x1c653
jmp 0x1c7b6
// File: /workspace/github_c_makefile_star2_O1/bhk[P]tooltree/lua/../opensource/lua-5.2.3/src/lcode.c
// Function: luaK_exp2RK
int luaK_exp2RK (FuncState *fs, expdesc *e) {
  luaK_exp2val(fs, e);
  switch (e->k) {
    case VTRUE:
    case VFALSE:
    case VNIL: {
      if (fs->nk <= MAXINDEXRK) {  /* constant fits in RK operand? */
        e->u.info = (e->k == VNIL) ? nilK(fs) : boolK(fs, (e->k == VTRUE));
        e->k = VK;
        return RKASK(e->u.info);
      }
      else break;
    }
    case VKNUM: {
      e->u.info = luaK_numberK(fs, e->u.nval);
      e->k = VK;
      /* go through */
    }
    case VK: {
      if (e->u.info <= MAXINDEXRK)  /* constant fits in argC? */
        return RKASK(e->u.info);
      else break;
    }
    default: break;
  }
  /* not a constant in the right range: put it in a register */
  return luaK_exp2anyreg(fs, e);
}

// Assembly:
pushq %r14
pushq %rbx
subq $0x28, %rsp
movq %rsi, %rbx
movq %rdi, %r14
callq 0x1c7e2
movl (%rbx), %eax
leal -0x1(%rax), %ecx
cmpl $0x3, %ecx
jae 0x1c842
cmpl $0xff, 0x34(%r14)
jg 0x1c86c
cmpl $0x1, %eax
jne 0x1c87e
leaq 0x18(%rsp), %rdx
movl $0x0, 0x8(%rdx)
movq 0x8(%r14), %rax
leaq 0x8(%rsp), %rsi
movq %rax, (%rsi)
movl $0x45, 0x8(%rsi)
movq %r14, %rdi
jmp 0x1c89a
cmpl $0x4, %eax
je 0x1c862
cmpl $0x5, %eax
jne 0x1c86c
movsd 0x8(%rbx), %xmm0
movq %r14, %rdi
callq 0x1c40d
movl %eax, 0x8(%rbx)
movl $0x4, (%rbx)
movl 0x8(%rbx), %eax
cmpl $0xff, %eax
jle 0x1c8a8
movq %r14, %rdi
movq %rbx, %rsi
addq $0x28, %rsp
popq %rbx
popq %r14
jmp 0x1c777
xorl %ecx, %ecx
cmpl $0x2, %eax
sete %cl
leaq 0x8(%rsp), %rdx
movl %ecx, (%rdx)
movl $0x1, 0x8(%rdx)
movq %r14, %rdi
movq %rdx, %rsi
callq 0x1c1c1
movl %eax, 0x8(%rbx)
movl $0x4, (%rbx)
orl $0x100, %eax            # imm = 0x100
addq $0x28, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O1/bhk[P]tooltree/lua/../opensource/lua-5.2.3/src/lcode.c
// Function: luaK_self
void luaK_self (FuncState *fs, expdesc *e, expdesc *key) {
  int ereg;
  luaK_exp2anyreg(fs, e);
  ereg = e->u.info;  /* register where 'e' was placed */
  freeexp(fs, e);
  e->u.info = fs->freereg;  /* base register for op_self */
  e->k = VNONRELOC;
  luaK_reserveregs(fs, 2);  /* function and 'self' produced by op_self */
  luaK_codeABC(fs, OP_SELF, e->u.info, ereg, luaK_exp2RK(fs, key));
  freeexp(fs, key);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %rbx
callq 0x1c777
movl (%r15), %eax
movl 0x8(%r15), %ebp
xorl $0x6, %eax
movl %ebp, %ecx
andl $0x100, %ecx            # imm = 0x100
orl %eax, %ecx
jne 0x1c9c7
movzbl 0x42(%rbx), %eax
cmpl %eax, %ebp
jl 0x1c9c7
decb 0x44(%rbx)
movzbl 0x44(%rbx), %eax
movl %eax, 0x8(%r15)
movl $0x6, (%r15)
movq %rbx, %rdi
movl $0x2, %esi
callq 0x1c157
addb $0x2, 0x44(%rbx)
movl 0x8(%r15), %r15d
movq %rbx, %rdi
movq %r14, %rsi
callq 0x1c7f3
shll $0x6, %r15d
shll $0x17, %ebp
orl %r15d, %ebp
shll $0xe, %eax
orl %eax, %ebp
orl $0xc, %ebp
movq %rbx, %rdi
movl %ebp, %esi
callq 0x1c050
cmpl $0x6, (%r14)
jne 0x1ca2d
movl 0x8(%r14), %eax
btl $0x8, %eax
jb 0x1ca2d
movzbl 0x42(%rbx), %ecx
cmpl %ecx, %eax
jl 0x1ca2d
decb 0x44(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/bhk[P]tooltree/lua/../opensource/lua-5.2.3/src/lcode.c
// Function: luaK_goiftrue
void luaK_goiftrue (FuncState *fs, expdesc *e) {
  int pc;  /* pc of last jump */
  luaK_dischargevars(fs, e);
  switch (e->k) {
    case VJMP: {
      invertjump(fs, e);
      pc = e->u.info;
      break;
    }
    case VK: case VKNUM: case VTRUE: {
      pc = NO_JUMP;  /* always true; do nothing */
      break;
    }
    default: {
      pc = jumponcond(fs, e, 0);
      break;
    }
  }
  luaK_concat(fs, &e->f, pc);  /* insert last jump in `f' list */
  luaK_patchtohere(fs, e->t);
  e->t = NO_JUMP;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
callq 0x1c572
movl (%rbx), %eax
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
leal -0x4(%rax), %ecx
cmpl $0x2, %ecx
jb 0x1cac0
cmpl $0x2, %eax
je 0x1cac0
cmpl $0xa, %eax
jne 0x1cab1
movslq 0x8(%rbx), %rcx
movq (%r14), %rdx
leaq (,%rcx,4), %rax
addq 0x18(%rdx), %rax
testq %rcx, %rcx
jle 0x1ca8f
movl -0x4(%rax), %ecx
andl $0x3f, %ecx
leaq 0x479b(%rip), %rdx      # 0x21220
cmpb $0x0, (%rcx,%rdx)
jns 0x1ca8f
addq $-0x4, %rax
movl (%rax), %ecx
movl %ecx, %edx
andl $0xffffc03f, %edx       # imm = 0xFFFFC03F
xorl %esi, %esi
testl $0x3fc0, %ecx           # imm = 0x3FC0
sete %sil
shll $0x6, %esi
orl %edx, %esi
movl %esi, (%rax)
movl 0x8(%rbx), %edx
jmp 0x1cac0
movq %r14, %rdi
movq %rbx, %rsi
xorl %edx, %edx
callq 0x1caf2
movl %eax, %edx
leaq 0x14(%rbx), %rsi
movq %r14, %rdi
callq 0x1beb0
movl 0x10(%rbx), %edx
movl 0x28(%r14), %eax
movl %eax, 0x2c(%r14)
leaq 0x30(%r14), %rsi
movq %r14, %rdi
callq 0x1beb0
movl $0xffffffff, 0x10(%rbx) # imm = 0xFFFFFFFF
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O1/bhk[P]tooltree/lua/../opensource/lua-5.2.3/src/lcode.c
// Function: jumponcond
static int jumponcond (FuncState *fs, expdesc *e, int cond) {
  if (e->k == VRELOCABLE) {
    Instruction ie = getcode(fs, e);
    if (GET_OPCODE(ie) == OP_NOT) {
      fs->pc--;  /* remove previous OP_NOT */
      return condjump(fs, OP_TEST, GETARG_B(ie), 0, !cond);
    }
    /* else go through */
  }
  discharge2anyreg(fs, e);
  freeexp(fs, e);
  return condjump(fs, OP_TESTSET, NO_REG, e->u.info, cond);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movl %edx, %ebp
movq %rsi, %r14
movq %rdi, %rbx
cmpl $0xb, (%rsi)
jne 0x1cb5b
movq (%rbx), %rax
movq 0x18(%rax), %rax
movslq 0x8(%r14), %rcx
movl (%rax,%rcx,4), %ecx
movl %ecx, %r15d
andl $0x3f, %r15d
cmpl $0x14, %r15d
jne 0x1cb4a
decl 0x28(%rbx)
xorl %esi, %esi
testl %ebp, %ebp
sete %sil
shrl $0x11, %ecx
andl $-0x40, %ecx
shll $0xe, %esi
orl %ecx, %esi
orl $0x1b, %esi
movq %rbx, %rdi
callq 0x1c050
movq %rbx, %rdi
callq 0x1be61
cmpl $0x14, %r15d
jne 0x1cb5b
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movq %rbx, %rdi
movq %r14, %rsi
callq 0x1d3bc
cmpl $0x6, (%r14)
jne 0x1cb81
movl 0x8(%r14), %eax
btl $0x8, %eax
jb 0x1cb81
movzbl 0x42(%rbx), %ecx
cmpl %ecx, %eax
jl 0x1cb81
decb 0x44(%rbx)
movl 0x8(%r14), %eax
shll $0x17, %eax
shll $0xe, %ebp
orl %eax, %ebp
orl $0x3fdc, %ebp           # imm = 0x3FDC
movq %rbx, %rdi
movl %ebp, %esi
callq 0x1c050
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0x1be61
// File: /workspace/github_c_makefile_star2_O1/bhk[P]tooltree/lua/../opensource/lua-5.2.3/src/lcode.c
// Function: luaK_goiffalse
void luaK_goiffalse (FuncState *fs, expdesc *e) {
  int pc;  /* pc of last jump */
  luaK_dischargevars(fs, e);
  switch (e->k) {
    case VJMP: {
      pc = e->u.info;
      break;
    }
    case VNIL: case VFALSE: {
      pc = NO_JUMP;  /* always false; do nothing */
      break;
    }
    default: {
      pc = jumponcond(fs, e, 1);
      break;
    }
  }
  luaK_concat(fs, &e->t, pc);  /* insert last jump in `t' list */
  luaK_patchtohere(fs, e->f);
  e->f = NO_JUMP;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
callq 0x1c572
movl (%rbx), %eax
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
cmpl $0x1, %eax
je 0x1cbeb
cmpl $0x3, %eax
je 0x1cbeb
cmpl $0xa, %eax
jne 0x1cbd9
movl 0x8(%rbx), %edx
jmp 0x1cbeb
movq %r14, %rdi
movq %rbx, %rsi
movl $0x1, %edx
callq 0x1caf2
movl %eax, %edx
leaq 0x10(%rbx), %rsi
movq %r14, %rdi
callq 0x1beb0
movl 0x14(%rbx), %edx
movl 0x28(%r14), %eax
movl %eax, 0x2c(%r14)
leaq 0x30(%r14), %rsi
movq %r14, %rdi
callq 0x1beb0
movl $0xffffffff, 0x14(%rbx) # imm = 0xFFFFFFFF
addq $0x8, %rsp
popq %rbx
popq %r14
retq