LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O2/bhk[P]tooltree/lua/../opensource/lua-5.2.3/src/lstrlib.c
// Function: str_rep
static int str_rep (lua_State *L) {
  size_t l, lsep;
  const char *s = luaL_checklstring(L, 1, &l);
  int n = luaL_checkint(L, 2);
  const char *sep = luaL_optlstring(L, 3, "", &lsep);
  if (n <= 0) lua_pushliteral(L, "");
  else if (l + lsep < l || l + lsep >= MAXSIZE / n)  /* may overflow? */
    return luaL_error(L, "resulting string too large");
  else {
    size_t totallen = n * l + (n - 1) * lsep;
    luaL_Buffer b;
    char *p = luaL_buffinitsize(L, &b, totallen);
    while (n-- > 1) {  /* first n-1 copies (followed by separator) */
      memcpy(p, s, l * sizeof(char)); p += l;
      if (lsep > 0) {  /* avoid empty 'memcpy' (may be expensive) */
        memcpy(p, sep, lsep * sizeof(char)); p += lsep;
      }
    }
    memcpy(p, s, l * sizeof(char));  /* last copy (not followed by separator) */
    luaL_pushresultsize(&b, totallen);
  }
  return 1;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x2038, %rsp           # imm = 0x2038
movq %rdi, %rbp
pushq $0x1
popq %rbx
leaq 0x10(%rsp), %rdx
movl %ebx, %esi
callq 0x9264
movq %rax, %r14
pushq $0x2
popq %rsi
movq %rbp, %rdi
callq 0x93db
movq %rax, %r15
leaq 0xa7d5(%rip), %rdx      # 0x1ef27
pushq $0x3
popq %rsi
leaq 0x8(%rsp), %rcx
movq %rbp, %rdi
callq 0x920b
testl %r15d, %r15d
jle 0x1480f
movq 0x10(%rsp), %rcx
movq 0x8(%rsp), %r13
movq %r13, %rsi
addq %rcx, %rsi
jb 0x147fa
movq %rax, %r12
movl %r15d, %edi
andl $0x7fffffff, %edi       # imm = 0x7FFFFFFF
movabsq $0x7fffffffffffffff, %rax # imm = 0x7FFFFFFFFFFFFFFF
xorl %edx, %edx
divq %rdi
cmpq %rax, %rsi
jae 0x147fa
imulq %rdi, %rcx
movl %r15d, %eax
decl %eax
imulq %rax, %r13
addq %rcx, %r13
leaq 0x18(%rsp), %rsi
movq %rbp, %rdi
movq %r13, %rdx
callq 0x9670
movq %rax, %rbp
movq 0x10(%rsp), %rdx
movq %rbp, %rdi
movq %r14, %rsi
callq 0x6350
cmpl $0x2, %r15d
jl 0x14822
addq 0x10(%rsp), %rbp
movq 0x8(%rsp), %rdx
testq %rdx, %rdx
je 0x147f5
movq %rbp, %rdi
movq %r12, %rsi
callq 0x6350
addq 0x8(%rsp), %rbp
decl %r15d
jmp 0x147c0
leaq 0xb2b1(%rip), %rsi      # 0x1fab2
movq %rbp, %rdi
xorl %eax, %eax
callq 0x8d68
movl %eax, %ebx
jmp 0x1482f
leaq 0xa711(%rip), %rsi      # 0x1ef27
movq %rbp, %rdi
xorl %edx, %edx
callq 0x7b27
jmp 0x1482f
leaq 0x18(%rsp), %rdi
movq %r13, %rsi
callq 0x95eb
movl %ebx, %eax
addq $0x2038, %rsp           # imm = 0x2038
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/bhk[P]tooltree/lua/../opensource/lua-5.2.3/src/lstrlib.c
// Function: str_sub
static int str_sub (lua_State *L) {
  size_t l;
  const char *s = luaL_checklstring(L, 1, &l);
  size_t start = posrelat(luaL_checkinteger(L, 2), l);
  size_t end = posrelat(luaL_optinteger(L, 3, -1), l);
  if (start < 1) start = 1;
  if (end > l) end = l;
  if (start <= end)
    lua_pushlstring(L, s + start - 1, end - start + 1);
  else lua_pushliteral(L, "");
  return 1;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq %rdi, %rbx
pushq $0x1
popq %rsi
leaq 0x8(%rsp), %rdx
callq 0x9264
movq %rax, %r14
pushq $0x2
popq %rsi
movq %rbx, %rdi
callq 0x93db
movq %rax, %r15
testq %rax, %rax
jns 0x148f6
movq 0x8(%rsp), %rax
movq %r15, %rcx
negq %rcx
cmpq %rcx, %rax
jae 0x148f0
xorl %r15d, %r15d
jmp 0x148f6
addq %rax, %r15
incq %r15
pushq $0x3
popq %rsi
pushq $-0x1
popq %rdx
movq %rbx, %rdi
callq 0x9456
movq 0x8(%rsp), %rdx
testq %rax, %rax
jns 0x14923
movq %rax, %rcx
negq %rcx
cmpq %rcx, %rdx
jae 0x1491d
xorl %eax, %eax
jmp 0x14923
addq %rdx, %rax
incq %rax
cmpq $0x1, %r15
adcq $0x0, %r15
cmpq %rdx, %rax
cmovbq %rax, %rdx
subq %r15, %rdx
jae 0x14945
leaq 0xa5e9(%rip), %rsi      # 0x1ef27
movq %rbx, %rdi
xorl %edx, %edx
jmp 0x14952
leaq (%r14,%r15), %rsi
decq %rsi
incq %rdx
movq %rbx, %rdi
callq 0x7b27
pushq $0x1
popq %rax
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/bhk[P]tooltree/lua/../opensource/lua-5.2.3/src/lstrlib.c
// Function: push_onecapture
static void push_onecapture (MatchState *ms, int i, const char *s,
                                                    const char *e) {
  if (i >= ms->level) {
    if (i == 0)  /* ms->level == 0, too */
      lua_pushlstring(ms->L, s, e - s);  /* add whole match */
    else
      luaL_error(ms->L, "invalid capture index");
  }
  else {
    ptrdiff_t l = ms->capture[i].len;
    if (l == CAP_UNFINISHED) luaL_error(ms->L, "unfinished capture");
    if (l == CAP_POSITION)
      lua_pushinteger(ms->L, ms->capture[i].init - ms->src_init + 1);
    else
      lua_pushlstring(ms->L, ms->capture[i].init, l);
  }
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %rbx
cmpl %esi, 0x28(%rdi)
jle 0x1543d
movslq %esi, %rax
shlq $0x4, %rax
leaq (%rbx,%rax), %r15
addq $0x30, %r15
movq 0x8(%r15), %r14
cmpq $-0x2, %r14
je 0x1546b
cmpq $-0x1, %r14
jne 0x15431
movq 0x20(%rbx), %rdi
leaq 0xa53c(%rip), %rsi      # 0x1f966
xorl %eax, %eax
callq 0x8d68
movq 0x20(%rbx), %rdi
movq (%r15), %rsi
movq %r14, %rdx
jmp 0x15461
movq 0x20(%rbx), %rdi
testl %esi, %esi
je 0x15458
leaq 0xa504(%rip), %rsi      # 0x1f950
xorl %eax, %eax
popq %rbx
popq %r14
popq %r15
jmp 0x8d68
subq %rdx, %rcx
movq %rdx, %rsi
movq %rcx, %rdx
popq %rbx
popq %r14
popq %r15
jmp 0x7b27
movq (%r15), %rsi
subq 0x8(%rbx), %rsi
movq 0x20(%rbx), %rdi
incq %rsi
popq %rbx
popq %r14
popq %r15
jmp 0x7af1
// File: /workspace/github_c_makefile_star2_O2/bhk[P]tooltree/lua/../opensource/lua-5.2.3/src/lstrlib.c
// Function: gmatch_aux
static int gmatch_aux (lua_State *L) {
  MatchState ms;
  size_t ls, lp;
  const char *s = lua_tolstring(L, lua_upvalueindex(1), &ls);
  const char *p = lua_tolstring(L, lua_upvalueindex(2), &lp);
  const char *src;
  ms.L = L;
  ms.matchdepth = MAXCCALLS;
  ms.src_init = s;
  ms.src_end = s+ls;
  ms.p_end = p + lp;
  for (src = s + (size_t)lua_tointeger(L, lua_upvalueindex(3));
       src <= ms.src_end;
       src++) {
    const char *e;
    ms.level = 0;
    lua_assert(ms.matchdepth == MAXCCALLS);
    if ((e = match(&ms, src, p)) != NULL) {
      lua_Integer newstart = e-s;
      if (e == src) newstart++;  /* empty match? go at least one position */
      lua_pushinteger(L, newstart);
      lua_replace(L, lua_upvalueindex(3));
      return push_captures(&ms, src, e);
    }
  }
  return 0;  /* not found */
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x248, %rsp            # imm = 0x248
movq %rdi, %rbx
leaq 0x10(%rsp), %rbp
movl $0xfff0b9d7, %esi       # imm = 0xFFF0B9D7
movq %rbp, %rdx
callq 0x7967
movq %rax, %r14
leaq 0x8(%rsp), %r15
movq %rbx, %rdi
movl $0xfff0b9d6, %esi       # imm = 0xFFF0B9D6
movq %r15, %rdx
callq 0x7967
movq %rax, %r12
leaq 0x18(%rsp), %r13
movq %rbx, 0x20(%r13)
movl $0xc8, (%r13)
movq %r14, 0x8(%r13)
movq (%rbp), %rbp
addq %r14, %rbp
movq %rbp, 0x10(%r13)
addq (%r15), %rax
movq %rax, 0x18(%r13)
movq %rbx, %rdi
movl $0xfff0b9d5, %esi       # imm = 0xFFF0B9D5
xorl %edx, %edx
callq 0x78a4
movq %rax, %r15
addq %r14, %r15
cmpq %rbp, %r15
ja 0x1557a
andl $0x0, 0x40(%rsp)
movq %r13, %rdi
movq %r15, %rsi
movq %r12, %rdx
callq 0x14c9c
testq %rax, %rax
jne 0x1557e
incq %r15
movq 0x28(%rsp), %rbp
jmp 0x15553
xorl %eax, %eax
jmp 0x155b5
movq %rax, %rbp
subq %r14, %rax
xorl %esi, %esi
cmpq %rbp, %r15
sete %sil
addq %rax, %rsi
movq %rbx, %rdi
callq 0x7af1
movq %rbx, %rdi
movl $0xfff0b9d5, %esi       # imm = 0xFFF0B9D5
callq 0x756e
leaq 0x18(%rsp), %rdi
movq %r15, %rsi
movq %rbp, %rdx
callq 0x15077
addq $0x248, %rsp            # imm = 0x248
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O2/bhk[P]tooltree/lua/../opensource/lua-5.2.3/src/ltable.c
// Function: luaH_next
int luaH_next (lua_State *L, Table *t, StkId key) {
  int i = findindex(L, t, key);  /* find original element */
  for (i++; i < t->sizearray; i++) {  /* try first array part */
    if (!ttisnil(&t->array[i])) {  /* a non-nil value? */
      setnvalue(key, cast_num(i+1));
      setobj2s(L, key+1, &t->array[i]);
      return 1;
    }
  }
  for (i -= t->sizearray; i < sizenode(t); i++) {  /* then hash part */
    if (!ttisnil(gval(gnode(t, i)))) {  /* a non-nil value? */
      setobj2s(L, key, gkey(gnode(t, i)));
      setobj2s(L, key+1, gval(gnode(t, i)));
      return 1;
    }
  }
  return 0;  /* no more elements */
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %rdx, %rbx
movq %rsi, %r14
cmpl $0x0, 0x8(%rdx)
je 0x15675
movq %rdi, %r15
movq %rbx, %rdi
callq 0x16099
testl %eax, %eax
jle 0x155fc
movl 0x38(%r14), %edx
cmpl %edx, %eax
jle 0x1567e
movq %r14, %rdi
movq %rbx, %rsi
callq 0x15d86
movq %rax, %r12
leaq 0x10(%r12), %r13
movl 0x18(%r12), %eax
cmpl 0x8(%rbx), %eax
jne 0x1562f
xorl %edi, %edi
movq %r13, %rsi
movq %rbx, %rdx
callq 0x174ba
testl %eax, %eax
jne 0x1565e
movl 0x18(%r12), %eax
cmpl $0xb, %eax
jne 0x15643
testb $0x40, 0x8(%rbx)
je 0x15643
movq (%r13), %rax
cmpq (%rbx), %rax
je 0x1565e
movq 0x20(%r12), %r12
testq %r12, %r12
jne 0x1560a
leaq 0xa4da(%rip), %rsi      # 0x1fb2e
movq %r15, %rdi
xorl %eax, %eax
callq 0xaa89
subq 0x20(%r14), %r12
pushq $0x28
popq %rcx
movq %r12, %rax
cqto
idivq %rcx
movl 0x38(%r14), %edx
addl %edx, %eax
jmp 0x15680
movl 0x38(%r14), %edx
pushq $-0x1
popq %rax
jmp 0x15680
decl %eax
movslq %eax, %rsi
movslq %edx, %rdi
movq %rsi, %r8
shlq $0x4, %r8
incq %rsi
pushq $0x1
popq %rax
cmpq %rdi, %rsi
jge 0x156c3
movq 0x18(%r14), %r9
incq %rsi
leaq 0x10(%r8), %rcx
cmpl $0x0, 0x18(%r9,%r8)
movq %rcx, %r8
je 0x15693
cvtsi2sd %esi, %xmm0
movsd %xmm0, (%rbx)
movl $0x3, 0x8(%rbx)
addq 0x18(%r14), %rcx
jmp 0x1570d
movb 0xb(%r14), %cl
movl %eax, %edi
shll %cl, %edi
movslq %edi, %rdi
subl %edx, %esi
movslq %esi, %rdx
imulq $0x28, %rdx, %rsi
addq $-0x28, %rsi
decq %rdx
incq %rdx
cmpq %rdi, %rdx
jge 0x1571c
leaq 0x28(%rsi), %rcx
movq 0x20(%r14), %r8
cmpl $0x0, 0x30(%r8,%rsi)
movq %rcx, %rsi
je 0x156de
movq 0x10(%r8,%rcx), %rdx
movq %rdx, (%rbx)
movl 0x18(%r8,%rcx), %edx
movl %edx, 0x8(%rbx)
addq 0x20(%r14), %rcx
movq (%rcx), %rdx
movq %rdx, 0x10(%rbx)
movl 0x8(%rcx), %ecx
movl %ecx, 0x18(%rbx)
jmp 0x1571e
xorl %eax, %eax
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/bhk[P]tooltree/lua/../opensource/lua-5.2.3/src/ltable.c
// Function: setnodevector
static void setnodevector (lua_State *L, Table *t, int size) {
  int lsize;
  if (size == 0) {  /* no elements to hash part? */
    t->node = cast(Node *, dummynode);  /* use common `dummynode' */
    lsize = 0;
  }
  else {
    int i;
    lsize = luaO_ceillog2(size);
    if (lsize > MAXBITS)
      luaG_runerror(L, "table overflow");
    size = twoto(lsize);
    t->node = luaM_newvector(L, size, Node);
    for (i=0; i<size; i++) {
      Node *n = gnode(t, i);
      gnext(n) = NULL;
      setnilvalue(gkey(n));
      setnilvalue(gval(n));
    }
  }
  t->lsizenode = cast_byte(lsize);
  t->lastfree = gnode(t, size);  /* all positions are free */
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %rsi, %rbx
testl %edx, %edx
je 0x15948
movq %rdi, %r15
movl %edx, %edi
callq 0xfa2e
cmpl $0x1f, %eax
jge 0x15972
movl %eax, %r14d
pushq $0x1
popq %r12
movl %r14d, %ecx
shll %cl, %r12d
pushq $0x28
popq %rax
shlq %cl, %rax
xorl %r13d, %r13d
movq %r15, %rdi
xorl %esi, %esi
xorl %edx, %edx
movq %rax, %rcx
callq 0xed73
movq %rax, 0x20(%rbx)
imulq $0x28, %r12, %rax
cmpq %r13, %rax
je 0x15942
movq 0x20(%rbx), %rcx
andq $0x0, 0x20(%rcx,%r13)
andl $0x0, 0x18(%rcx,%r13)
andl $0x0, 0x8(%rcx,%r13)
addq $0x28, %r13
jmp 0x15921
movq 0x20(%rbx), %rax
jmp 0x15959
leaq 0xa191(%rip), %rax      # 0x1fae0
movq %rax, 0x20(%rbx)
xorl %r14d, %r14d
xorl %r12d, %r12d
movb %r14b, 0xb(%rbx)
imulq $0x28, %r12, %rcx
addq %rax, %rcx
movq %rcx, 0x28(%rbx)
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
leaq 0xa1cb(%rip), %rsi      # 0x1fb44
movq %r15, %rdi
xorl %eax, %eax
callq 0xaa89
// File: /workspace/github_c_makefile_star2_O2/bhk[P]tooltree/lua/../opensource/lua-5.2.3/src/ltable.c
// Function: luaH_setint
void luaH_setint (lua_State *L, Table *t, int key, TValue *value) {
  const TValue *p = luaH_getint(t, key);
  TValue *cell;
  if (p != luaO_nilobject)
    cell = cast(TValue *, p);
  else {
    TValue k;
    setnvalue(&k, cast_num(key));
    cell = luaH_newkey(L, t, &k);
  }
  setobj2t(L, cell, value);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x18, %rsp
movq %rcx, %rbx
movl %edx, %ebp
movq %rsi, %r14
movq %rdi, %r15
movq %rsi, %rdi
movl %edx, %esi
callq 0x15e44
leaq 0x95f7(%rip), %rcx      # 0x1efa0
cmpq %rcx, %rax
jne 0x159cd
cvtsi2sd %ebp, %xmm0
leaq 0x8(%rsp), %rdx
movsd %xmm0, (%rdx)
movl $0x3, 0x8(%rdx)
movq %r15, %rdi
movq %r14, %rsi
callq 0x15ad4
movq (%rbx), %rcx
movq %rcx, (%rax)
movl 0x8(%rbx), %ecx
movl %ecx, 0x8(%rax)
addq $0x18, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/bhk[P]tooltree/lua/../opensource/lua-5.2.3/src/ltable.c
// Function: luaH_new
Table *luaH_new (lua_State *L) {
  Table *t = &luaC_newobj(L, LUA_TTABLE, sizeof(Table), NULL, 0)->h;
  t->metatable = NULL;
  t->flags = cast_byte(~0);
  t->array = NULL;
  t->sizearray = 0;
  setnodevector(L, t, 0);
  return t;
}

// Assembly:
pushq %rax
pushq $0x5
popq %rsi
pushq $0x40
popq %rdx
xorl %ecx, %ecx
xorl %r8d, %r8d
callq 0xc26a
xorps %xmm0, %xmm0
movups %xmm0, 0x10(%rax)
movw $0xff, 0xa(%rax)
andl $0x0, 0x38(%rax)
leaq 0xa075(%rip), %rcx      # 0x1fae0
movq %rcx, 0x20(%rax)
movq %rcx, 0x28(%rax)
popq %rcx
retq
// File: /workspace/github_c_makefile_star2_O2/bhk[P]tooltree/lua/../opensource/lua-5.2.3/src/ltable.c
// Function: mainposition
static Node *mainposition (const Table *t, const TValue *key) {
  switch (ttype(key)) {
    case LUA_TNUMBER:
      return hashnum(t, nvalue(key));
    case LUA_TLNGSTR: {
      TString *s = rawtsvalue(key);
      if (s->tsv.extra == 0) {  /* no hash? */
        s->tsv.hash = luaS_hash(getstr(s), s->tsv.len, s->tsv.hash);
        s->tsv.extra = 1;  /* now it has its hash */
      }
      return hashstr(t, rawtsvalue(key));
    }
    case LUA_TSHRSTR:
      return hashstr(t, rawtsvalue(key));
    case LUA_TBOOLEAN:
      return hashboolean(t, bvalue(key));
    case LUA_TLIGHTUSERDATA:
      return hashpointer(t, pvalue(key));
    case LUA_TLCF:
      return hashpointer(t, fvalue(key));
    default:
      return hashpointer(t, gcvalue(key));
  }
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rsi, %r14
movq %rdi, %rbx
movl 0x8(%rsi), %eax
andl $0x3f, %eax
leal -0x1(%rax), %ecx
cmpl $0x3, %ecx
ja 0x15dbe
leaq 0x9d2a(%rip), %rax      # 0x1fad0
movslq (%rax,%rcx,4), %rcx
addq %rax, %rcx
jmpq *%rcx
movb 0xb(%rbx), %cl
pushq $-0x1
popq %rax
shll %cl, %eax
notl %eax
andl (%r14), %eax
jmp 0x15e36
cmpl $0x14, %eax
je 0x15de0
cmpl $0x16, %eax
movl (%r14), %eax
movb 0xb(%rbx), %cl
pushq $-0x1
popq %rsi
shll %cl, %esi
notl %esi
orl $0x1, %esi
xorl %edx, %edx
divl %esi
imulq $0x28, %rdx, %rax
jmp 0x15e3a
movq (%r14), %r15
cmpb $0x0, 0xa(%r15)
jne 0x15e07
leaq 0x18(%r15), %rdi
movq 0x10(%r15), %rsi
movl 0xc(%r15), %edx
callq 0x13633
movl %eax, 0xc(%r15)
movb $0x1, 0xa(%r15)
movq (%r14), %r15
movb 0xb(%rbx), %cl
pushq $-0x1
popq %rax
shll %cl, %eax
notl %eax
andl 0xc(%r15), %eax
jmp 0x15e36
movsd (%r14), %xmm0
movq %rbx, %rdi
popq %rbx
popq %r14
popq %r15
jmp 0x15e92
movb 0xb(%rbx), %cl
pushq $-0x1
popq %rax
shll %cl, %eax
movq (%r14), %rcx
notl %eax
andl 0xc(%rcx), %eax
imulq $0x28, %rax, %rax
addq 0x20(%rbx), %rax
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/bhk[P]tooltree/lua/../opensource/lua-5.2.3/src/ltable.c
// Function: luaH_getint
const TValue *luaH_getint (Table *t, int key) {
  /* (1 <= key && key <= t->sizearray) */
  if (cast(unsigned int, key-1) < cast(unsigned int, t->sizearray))
    return &t->array[key-1];
  else {
    lua_Number nk = cast_num(key);
    Node *n = hashnum(t, nk);
    do {  /* check whether `key' is somewhere in the chain */
      if (ttisnumber(gkey(n)) && luai_numeq(nvalue(gkey(n)), nk))
        return gval(n);  /* that's it */
      else n = gnext(n);
    } while (n);
    return luaO_nilobject;
  }
}

// Assembly:
leal -0x1(%rsi), %eax
cmpl 0x38(%rdi), %eax
jae 0x15e57
cltq
shlq $0x4, %rax
addq 0x18(%rdi), %rax
retq
pushq %rax
cvtsi2sd %esi, %xmm0
movsd %xmm0, (%rsp)
callq 0x15e92
leaq 0x9133(%rip), %rcx      # 0x1efa0
cmpl $0x3, 0x18(%rax)
jne 0x15e81
movsd 0x10(%rax), %xmm0
ucomisd (%rsp), %xmm0
jne 0x15e81
jnp 0x15e8d
movq 0x20(%rax), %rax
testq %rax, %rax
jne 0x15e6d
movq %rcx, %rax
addq $0x8, %rsp
retq
// File: /workspace/github_c_makefile_star2_O2/bhk[P]tooltree/lua/../opensource/lua-5.2.3/src/ltable.c
// Function: luaH_getstr
const TValue *luaH_getstr (Table *t, TString *key) {
  Node *n = hashstr(t, key);
  lua_assert(key->tsv.tt == LUA_TSHRSTR);
  do {  /* check whether `key' is somewhere in the chain */
    if (ttisshrstring(gkey(n)) && eqshrstr(rawtsvalue(gkey(n)), key))
      return gval(n);  /* that's it */
    else n = gnext(n);
  } while (n);
  return luaO_nilobject;
}

// Assembly:
movb 0xb(%rdi), %cl
pushq $-0x1
popq %rax
shll %cl, %eax
notl %eax
andl 0xc(%rsi), %eax
imulq $0x28, %rax, %rax
addq 0x20(%rdi), %rax
leaq 0x90b0(%rip), %rcx      # 0x1efa0
cmpl $0x44, 0x18(%rax)
jne 0x15efc
cmpq %rsi, 0x10(%rax)
je 0x15f08
movq 0x20(%rax), %rax
testq %rax, %rax
jne 0x15ef0
movq %rcx, %rax
retq
// File: /workspace/github_c_makefile_star2_O2/bhk[P]tooltree/lua/../opensource/lua-5.2.3/src/ltable.c
// Function: luaH_get
const TValue *luaH_get (Table *t, const TValue *key) {
  switch (ttype(key)) {
    case LUA_TSHRSTR: return luaH_getstr(t, rawtsvalue(key));
    case LUA_TNIL: return luaO_nilobject;
    case LUA_TNUMBER: {
      int k;
      lua_Number n = nvalue(key);
      lua_number2int(k, n);
      if (luai_numeq(cast_num(k), n)) /* index is int? */
        return luaH_getint(t, k);  /* use specialized version */
      /* else go through */
    }
    default: {
      Node *n = mainposition(t, key);
      do {  /* check whether `key' is somewhere in the chain */
        if (luaV_rawequalobj(gkey(n), key))
          return gval(n);  /* that's it */
        else n = gnext(n);
      } while (n);
      return luaO_nilobject;
    }
  }
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x10, %rsp
movl 0x8(%rsi), %eax
leaq 0x9084(%rip), %rbx      # 0x1efa0
andl $0x3f, %eax
je 0x15fad
movq %rsi, %r14
cmpl $0x3, %eax
je 0x15f43
cmpl $0x4, %eax
jne 0x15f78
movq (%r14), %rsi
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
jmp 0x15ed4
movsd (%r14), %xmm0
movsd 0x83b0(%rip), %xmm1     # 0x1e300
addsd %xmm0, %xmm1
movsd %xmm1, 0x8(%rsp)
movl 0x8(%rsp), %esi
cvtsi2sd %esi, %xmm1
ucomisd %xmm1, %xmm0
jne 0x15f78
jp 0x15f78
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
jmp 0x15e44
movq %r14, %rsi
callq 0x15d86
movq %rax, %r15
movl 0x18(%r15), %eax
cmpl 0x8(%r14), %eax
jne 0x15f9f
leaq 0x10(%r15), %rsi
xorl %edi, %edi
movq %r14, %rdx
callq 0x174ba
testl %eax, %eax
jne 0x15faa
movq 0x20(%r15), %r15
testq %r15, %r15
jne 0x15f83
jmp 0x15fad
movq %r15, %rbx
movq %rbx, %rax
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/bhk[P]tooltree/lua/../opensource/lua-5.2.3/src/ltable.c
// Function: arrayindex
static int arrayindex (const TValue *key) {
  if (ttisnumber(key)) {
    lua_Number n = nvalue(key);
    int k;
    lua_number2int(k, n);
    if (luai_numeq(cast_num(k), n))
      return k;
  }
  return -1;  /* `key' did not match some condition */
}

// Assembly:
cmpl $0x3, 0x8(%rdi)
jne 0x160c5
movsd (%rdi), %xmm0
movsd 0x8255(%rip), %xmm1     # 0x1e300
addsd %xmm0, %xmm1
movsd %xmm1, -0x8(%rsp)
movl -0x8(%rsp), %eax
cvtsi2sd %eax, %xmm1
ucomisd %xmm1, %xmm0
jne 0x160c5
jnp 0x160ca
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
retq
// File: /workspace/github_c_makefile_star2_O2/bhk[P]tooltree/lua/../opensource/lua-5.2.3/src/ltable.c
// Function: countint
static int countint (const TValue *key, int *nums) {
  int k = arrayindex(key);
  if (0 < k && k <= MAXASIZE) {  /* is `key' an appropriate array index? */
    nums[luaO_ceillog2(k)]++;  /* count as such */
    return 1;
  }
  else
    return 0;
}

// Assembly:
pushq %rbx
movq %rsi, %rbx
callq 0x16099
leal -0x1(%rax), %edx
xorl %ecx, %ecx
cmpl $0x3fffffff, %edx       # imm = 0x3FFFFFFF
ja 0x160f0
movl %eax, %edi
callq 0xfa2e
cltq
incl (%rbx,%rax,4)
pushq $0x1
popq %rcx
movl %ecx, %eax
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O2/bhk[P]tooltree/lua/../opensource/lua-5.2.3/src/ltablib.c
// Function: tconcat
static int tconcat (lua_State *L) {
  luaL_Buffer b;
  size_t lsep;
  int i, last;
  const char *sep = luaL_optlstring(L, 2, "", &lsep);
  luaL_checktype(L, 1, LUA_TTABLE);
  i = luaL_optint(L, 3, 1);
  last = luaL_opt(L, luaL_checkint, 4, luaL_len(L, 1));
  luaL_buffinit(L, &b);
  for (; i < last; i++) {
    addfield(L, &b, i);
    luaL_addlstring(&b, sep, lsep);
  }
  if (i == last)  /* add last value (if interval was not empty) */
    addfield(L, &b, i);
  luaL_pushresult(&b);
  return 1;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x2030, %rsp           # imm = 0x2030
movq %rdi, %rbx
leaq 0x8df5(%rip), %rdx      # 0x1ef27
pushq $0x2
popq %rsi
leaq 0x8(%rsp), %rcx
callq 0x920b
movq %rax, %r14
pushq $0x1
popq %rsi
pushq $0x5
popq %rdx
movq %rbx, %rdi
callq 0x92e7
pushq $0x3
popq %rsi
pushq $0x1
popq %rdx
movq %rbx, %rdi
callq 0x9456
movq %rax, %r15
pushq $0x4
popq %rsi
movq %rbx, %rdi
callq 0x7624
testl %eax, %eax
jle 0x16180
pushq $0x4
popq %rsi
movq %rbx, %rdi
callq 0x93db
movq %rax, %r12
jmp 0x1618e
pushq $0x1
popq %rsi
movq %rbx, %rdi
callq 0x9b70
movl %eax, %r12d
leaq 0x10(%rsp), %r13
movq %rbx, %rdi
movq %r13, %rsi
callq 0x9657
cmpl %r12d, %r15d
jge 0x161c6
movq %rbx, %rdi
movq %r13, %rsi
movl %r15d, %edx
callq 0x16527
movq 0x8(%rsp), %rdx
movq %r13, %rdi
movq %r14, %rsi
callq 0x9559
incl %r15d
jmp 0x1619e
jne 0x161d8
leaq 0x10(%rsp), %rsi
movq %rbx, %rdi
movl %r12d, %edx
callq 0x16527
leaq 0x10(%rsp), %rdi
callq 0x95ae
pushq $0x1
popq %rax
addq $0x2030, %rsp           # imm = 0x2030
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/bhk[P]tooltree/lua/../opensource/lua-5.2.3/src/ltablib.c
// Function: tinsert
static int tinsert (lua_State *L) {
  int e = aux_getn(L, 1) + 1;  /* first empty element */
  int pos;  /* where to insert new element */
  switch (lua_gettop(L)) {
    case 2: {  /* called with only 2 arguments */
      pos = e;  /* insert new element at the end */
      break;
    }
    case 3: {
      int i;
      pos = luaL_checkint(L, 2);  /* 2nd argument is the position */
      luaL_argcheck(L, 1 <= pos && pos <= e, 2, "position out of bounds");
      for (i = e; i > pos; i--) {  /* move up elements */
        lua_rawgeti(L, 1, i-1);
        lua_rawseti(L, 1, i);  /* t[i] = t[i-1] */
      }
      break;
    }
    default: {
      return luaL_error(L, "wrong number of arguments to " LUA_QL("insert"));
    }
  }
  lua_rawseti(L, 1, pos);  /* t[pos] = v */
  return 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rdi, %rbx
pushq $0x1
popq %rbp
pushq $0x5
popq %rdx
movl %ebp, %esi
callq 0x92e7
movq %rbx, %rdi
movl %ebp, %esi
callq 0x9b70
movl %eax, %r14d
incl %r14d
movq %rbx, %rdi
callq 0x7423
cmpl $0x2, %eax
je 0x16291
cmpl $0x3, %eax
jne 0x162aa
pushq $0x2
popq %rsi
movq %rbx, %rdi
callq 0x93db
movq %rax, %r15
testl %r15d, %r15d
setle %al
cmpl %r15d, %r14d
setl %cl
orb %al, %cl
cmpb $0x1, %cl
jne 0x16263
leaq 0x993c(%rip), %rdx      # 0x1fb94
pushq $0x2
popq %rsi
movq %rbx, %rdi
callq 0x8c84
pushq $0x1
popq %rbp
cmpl %r15d, %r14d
jle 0x1628e
leal -0x1(%r14), %r12d
movq %rbx, %rdi
movl %ebp, %esi
movl %r12d, %edx
callq 0x7e9f
movq %rbx, %rdi
movl %ebp, %esi
movl %r14d, %edx
callq 0x8172
movl %r12d, %r14d
jmp 0x16266
movl %r15d, %r14d
pushq $0x1
popq %rsi
movq %rbx, %rdi
movl %r14d, %edx
callq 0x8172
xorl %eax, %eax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
leaq 0x98fa(%rip), %rsi      # 0x1fbab
movq %rbx, %rdi
xorl %eax, %eax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0x8d68
// File: /workspace/github_c_makefile_star2_O2/bhk[P]tooltree/lua/../opensource/lua-5.2.3/src/ltablib.c
// Function: pack
static int pack (lua_State *L) {
  int n = lua_gettop(L);  /* number of elements to pack */
  lua_createtable(L, n, 1);  /* create result table */
  lua_pushinteger(L, n);
  lua_setfield(L, -2, "n");  /* t.n = number of elements */
  if (n > 0) {  /* at least one element? */
    int i;
    lua_pushvalue(L, 1);
    lua_rawseti(L, -2, 1);  /* insert first element */
    lua_replace(L, 1);  /* move table into index 1 */
    for (i = n; i >= 2; i--)  /* assign other elements */
      lua_rawseti(L, 1, i);
  }
  return 1;  /* return table */
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movq %rdi, %rbx
callq 0x7423
movl %eax, %ebp
pushq $0x1
popq %rdx
movq %rbx, %rdi
movl %eax, %esi
callq 0x7f1a
movslq %ebp, %rsi
movq %rbx, %rdi
callq 0x7af1
leaq 0x9925(%rip), %rdx      # 0x1fc15
pushq $-0x2
popq %rsi
movq %rbx, %rdi
callq 0x809d
testl %ebp, %ebp
jle 0x1633d
pushq $0x1
popq %r14
movq %rbx, %rdi
movl %r14d, %esi
callq 0x7604
pushq $-0x2
popq %rsi
movq %rbx, %rdi
movl %r14d, %edx
callq 0x8172
movq %rbx, %rdi
movl %r14d, %esi
callq 0x756e
cmpl $0x2, %ebp
jl 0x1633d
movq %rbx, %rdi
movl %r14d, %esi
movl %ebp, %edx
callq 0x8172
decl %ebp
jmp 0x16327
pushq $0x1
popq %rax
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/bhk[P]tooltree/lua/../opensource/lua-5.2.3/src/ltablib.c
// Function: unpack
static int unpack (lua_State *L) {
  int i, e, n;
  luaL_checktype(L, 1, LUA_TTABLE);
  i = luaL_optint(L, 2, 1);
  e = luaL_opt(L, luaL_checkint, 3, luaL_len(L, 1));
  if (i > e) return 0;  /* empty range */
  n = e - i + 1;  /* number of elements */
  if (n <= 0 || !lua_checkstack(L, n))  /* n <= 0 means arith. overflow */
    return luaL_error(L, "too many results to unpack");
  lua_rawgeti(L, 1, i);  /* push arg[i] (avoiding overflow problems) */
  while (i++ < e)  /* push arg[i + 1...e] */
    lua_rawgeti(L, 1, i);
  return n;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rdi, %rbx
pushq $0x1
popq %rsi
pushq $0x5
popq %rdx
callq 0x92e7
pushq $0x2
popq %rsi
pushq $0x1
popq %rdx
movq %rbx, %rdi
callq 0x9456
movq %rax, %r14
pushq $0x3
popq %rsi
movq %rbx, %rdi
callq 0x7624
testl %eax, %eax
jle 0x1638b
pushq $0x3
popq %rsi
movq %rbx, %rdi
callq 0x93db
movq %rax, %r15
jmp 0x16399
pushq $0x1
popq %rsi
movq %rbx, %rdi
callq 0x9b70
movl %eax, %r15d
xorl %eax, %eax
movl %r15d, %ebp
subl %r14d, %ebp
jl 0x163d4
js 0x163dd
incl %ebp
movq %rbx, %rdi
movl %ebp, %esi
callq 0x7300
testl %eax, %eax
je 0x163dd
incl %r15d
pushq $0x1
popq %r12
movq %rbx, %rdi
movl %r12d, %esi
movl %r14d, %edx
callq 0x7e9f
incl %r14d
cmpl %r14d, %r15d
jne 0x163bc
movl %ebp, %eax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
leaq 0x97ed(%rip), %rsi      # 0x1fbd1
movq %rbx, %rdi
xorl %eax, %eax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0x8d68
// File: /workspace/github_c_makefile_star2_O2/bhk[P]tooltree/lua/../opensource/lua-5.2.3/src/ltablib.c
// Function: tremove
static int tremove (lua_State *L) {
  int size = aux_getn(L, 1);
  int pos = luaL_optint(L, 2, size);
  if (pos != size)  /* validate 'pos' if given */
    luaL_argcheck(L, 1 <= pos && pos <= size + 1, 1, "position out of bounds");
  lua_rawgeti(L, 1, pos);  /* result = t[pos] */
  for ( ; pos < size; pos++) {
    lua_rawgeti(L, 1, pos+1);
    lua_rawseti(L, 1, pos);  /* t[pos] = t[pos+1] */
  }
  lua_pushnil(L);
  lua_rawseti(L, 1, pos);  /* t[pos] = nil */
  return 1;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rdi, %rbx
pushq $0x1
popq %rbp
pushq $0x5
popq %rdx
movl %ebp, %esi
callq 0x92e7
movq %rbx, %rdi
movl %ebp, %esi
callq 0x9b70
movl %eax, %r14d
movslq %eax, %r12
pushq $0x2
popq %rsi
movq %rbx, %rdi
movq %r12, %rdx
callq 0x9456
movq %rax, %r15
cmpl %r15d, %r12d
je 0x1645d
testl %r15d, %r15d
setle %al
leal 0x1(%r14), %ecx
cmpl %r15d, %ecx
setl %cl
orb %al, %cl
cmpb $0x1, %cl
jne 0x1645d
leaq 0x9742(%rip), %rdx      # 0x1fb94
pushq $0x1
popq %rsi
movq %rbx, %rdi
callq 0x8c84
pushq $0x1
popq %rbp
movq %rbx, %rdi
movl %ebp, %esi
movl %r15d, %edx
callq 0x7e9f
cmpl %r14d, %r15d
jge 0x16495
leal 0x1(%r15), %r12d
movq %rbx, %rdi
movl %ebp, %esi
movl %r12d, %edx
callq 0x7e9f
movq %rbx, %rdi
movl %ebp, %esi
movl %r15d, %edx
callq 0x8172
movl %r12d, %r15d
jmp 0x1646d
movq %rbx, %rdi
callq 0x7acb
pushq $0x1
popq %rbp
movq %rbx, %rdi
movl %ebp, %esi
movl %r15d, %edx
callq 0x8172
movl %ebp, %eax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/bhk[P]tooltree/lua/../opensource/lua-5.2.3/src/ltablib.c
// Function: sort
static int sort (lua_State *L) {
  int n = aux_getn(L, 1);
  luaL_checkstack(L, 40, "");  /* assume array is smaller than 2^40 */
  if (!lua_isnoneornil(L, 2))  /* is there a 2nd argument? */
    luaL_checktype(L, 2, LUA_TFUNCTION);
  lua_settop(L, 2);  /* make sure there is two arguments */
  auxsort(L, 1, n);
  return 0;
}

// Assembly:
pushq %rbp
pushq %rbx
pushq %rax
movq %rdi, %rbx
pushq $0x1
popq %rbp
pushq $0x5
popq %rdx
movl %ebp, %esi
callq 0x92e7
movq %rbx, %rdi
movl %ebp, %esi
callq 0x9b70
movl %eax, %ebp
leaq 0x8a49(%rip), %rdx      # 0x1ef27
pushq $0x28
popq %rsi
movq %rbx, %rdi
callq 0x9291
pushq $0x2
popq %rsi
movq %rbx, %rdi
callq 0x7624
testl %eax, %eax
jle 0x16506
pushq $0x2
popq %rsi
pushq $0x6
popq %rdx
movq %rbx, %rdi
callq 0x92e7
pushq $0x2
popq %rsi
movq %rbx, %rdi
callq 0x7437
pushq $0x1
popq %rsi
movq %rbx, %rdi
movl %ebp, %edx
callq 0x16581
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/bhk[P]tooltree/lua/../opensource/lua-5.2.3/src/ltablib.c
// Function: addfield
static void addfield (lua_State *L, luaL_Buffer *b, int i) {
  lua_rawgeti(L, 1, i);
  if (!lua_isstring(L, -1))
    luaL_error(L, "invalid value (%s) at index %d in table for "
                  LUA_QL("concat"), luaL_typename(L, -1), i);
  luaL_addvalue(b);
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movl %edx, %ebp
movq %rsi, %rbx
movq %rdi, %r14
pushq $0x1
popq %rsi
callq 0x7e9f
pushq $-0x1
popq %rsi
movq %r14, %rdi
callq 0x76a0
testl %eax, %eax
jne 0x16575
pushq $-0x1
popq %rsi
movq %r14, %rdi
callq 0x7624
movq %r14, %rdi
movl %eax, %esi
callq 0x7643
leaq 0x95f9(%rip), %rsi      # 0x1fb5f
movq %r14, %rdi
movq %rax, %rdx
movl %ebp, %ecx
xorl %eax, %eax
callq 0x8d68
movq %rbx, %rdi
popq %rbx
popq %r14
popq %rbp
jmp 0x95f4
// File: /workspace/github_c_makefile_star2_O2/bhk[P]tooltree/lua/../opensource/lua-5.2.3/src/ltablib.c
// Function: sort_comp
static int sort_comp (lua_State *L, int a, int b) {
  if (!lua_isnil(L, 2)) {  /* function? */
    int res;
    lua_pushvalue(L, 2);
    lua_pushvalue(L, a-1);  /* -1 to compensate function */
    lua_pushvalue(L, b-2);  /* -2 to compensate function and `a' */
    lua_call(L, 2, 1);
    res = lua_toboolean(L, -1);
    lua_pop(L, 1);
    return res;
  }
  else  /* a < b? */
    return lua_compare(L, a, b, LUA_OPLT);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movl %edx, %ebp
movl %esi, %r14d
movq %rdi, %rbx
pushq $0x2
popq %rsi
callq 0x7624
testl %eax, %eax
je 0x168be
pushq $0x2
popq %r15
movq %rbx, %rdi
movl %r15d, %esi
callq 0x7604
decl %r14d
movq %rbx, %rdi
movl %r14d, %esi
callq 0x7604
addl $-0x2, %ebp
movq %rbx, %rdi
movl %ebp, %esi
callq 0x7604
pushq $0x1
popq %rdx
movq %rbx, %rdi
movl %r15d, %esi
xorl %ecx, %ecx
xorl %r8d, %r8d
callq 0x835f
pushq $-0x1
popq %rsi
movq %rbx, %rdi
callq 0x7943
movl %eax, %ebp
pushq $-0x2
popq %rsi
movq %rbx, %rdi
callq 0x7437
movl %ebp, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
pushq $0x1
popq %rcx
movq %rbx, %rdi
movl %r14d, %esi
movl %ebp, %edx
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0x77b5
// File: /workspace/github_c_makefile_star2_O2/bhk[P]tooltree/lua/../opensource/lua-5.2.3/src/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", "__div", "__mod",
    "__pow", "__unm", "__lt", "__le",
    "__concat", "__call"
  };
  int i;
  for (i=0; i<TM_N; i++) {
    G(L)->tmname[i] = luaS_new(L, luaT_eventname[i]);
    luaS_fix(G(L)->tmname[i]);  /* never collect these names */
  }
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %rbx
xorl %r14d, %r14d
leaq 0x9386(%rip), %r15      # 0x1fc98
cmpq $0x44, %r14
je 0x16949
movslq (%r14,%r15), %rsi
addq %r15, %rsi
movq %rbx, %rdi
callq 0x138fd
movq 0x18(%rbx), %rcx
movq %rax, 0x120(%rcx,%r14,2)
movq 0x18(%rbx), %rax
movq 0x120(%rax,%r14,2), %rax
orb $0x20, 0x9(%rax)
addq $0x4, %r14
jmp 0x16912
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/bhk[P]tooltree/lua/../opensource/lua-5.2.3/src/ltm.c
// Function: luaT_gettm
const TValue *luaT_gettm (Table *events, TMS event, TString *ename) {
  const TValue *tm = luaH_getstr(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 0x15ed4
cmpl $0x0, 0x8(%rax)
jne 0x16971
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/bhk[P]tooltree/lua/../opensource/lua-5.2.3/src/ltm.c
// Function: luaT_gettmbyobj
const TValue *luaT_gettmbyobj (lua_State *L, const TValue *o, TMS event) {
  Table *mt;
  switch (ttypenv(o)) {
    case LUA_TTABLE:
      mt = hvalue(o)->metatable;
      break;
    case LUA_TUSERDATA:
      mt = uvalue(o)->metatable;
      break;
    default:
      mt = G(L)->mt[ttypenv(o)];
  }
  return (mt ? luaH_getstr(mt, G(L)->tmname[event]) : luaO_nilobject);
}

// Assembly:
movl 0x8(%rsi), %eax
andl $0xf, %eax
cmpq $0x7, %rax
je 0x16989
cmpl $0x5, %eax
jne 0x16992
movq (%rsi), %rax
addq $0x10, %rax
jmp 0x169a0
movq 0x18(%rdi), %rcx
leaq (%rcx,%rax,8), %rax
addq $0x1a8, %rax            # imm = 0x1A8
movq (%rax), %rax
testq %rax, %rax
je 0x169be
movq 0x18(%rdi), %rcx
movl %edx, %edx
movq 0x120(%rcx,%rdx,8), %rsi
movq %rax, %rdi
jmp 0x15ed4
leaq 0x85db(%rip), %rax      # 0x1efa0
retq
nop
// File: /workspace/github_c_makefile_star2_O2/bhk[P]tooltree/lua/../opensource/lua-5.2.3/src/lundump.c
// Function: luaU_undump
Closure* luaU_undump (lua_State* L, ZIO* Z, Mbuffer* buff, const char* name)
{
 LoadState S;
 Closure* 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;
 S.b=buff;
 LoadHeader(&S);
 cl=luaF_newLclosure(L,1);
 setclLvalue(L,L->top,cl); incr_top(L);
 cl->l.p=luaF_newproto(L);
 LoadFunction(&S,cl->l.p);
 if (cl->l.p->sizeupvalues != 1)
 {
  Proto* p=cl->l.p;
  cl=luaF_newLclosure(L,cl->l.p->sizeupvalues);
  cl->l.p=p;
  setclLvalue(L,L->top-1,cl);
 }
 luai_verifycode(L,buff,cl->l.p);
 return cl;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x60, %rsp
movq %rdi, %rbx
movzbl (%rcx), %eax
cmpl $0x1b, %eax
je 0x169eb
cmpl $0x40, %eax
je 0x169e6
cmpl $0x3d, %eax
jne 0x169f2
incq %rcx
jmp 0x169f2
leaq 0x92fe(%rip), %rcx      # 0x1fcf0
leaq 0x20(%rsp), %rdi
movq %rcx, 0x18(%rdi)
movq %rbx, (%rdi)
movq %rsi, 0x8(%rdi)
movq %rdx, 0x10(%rdi)
leaq 0x40(%rsp), %r14
movl $0x61754c1b, (%r14)     # imm = 0x61754C1B
movabsq $0x8040804010052, %rax  # imm = 0x8040804010052
movq %rax, 0x4(%r14)
movl $0xa0d9319, 0xc(%r14)   # imm = 0xA0D9319
movw $0xa1a, 0x10(%r14)      # imm = 0xA1A
leaq 0x1(%rsp), %rsi
movb $0x1b, -0x1(%rsi)
pushq $0x11
popq %rdx
callq 0x16e59
movq %rsp, %rsi
pushq $0x12
popq %rdx
movq %r14, %rdi
callq 0x63e0
testl %eax, %eax
jne 0x16ae6
pushq $0x1
popq %rsi
movq %rbx, %rdi
callq 0xbe28
movq %rax, %r14
movq 0x10(%rbx), %rax
movq %r14, (%rax)
movl $0x46, 0x8(%rax)
movq 0x10(%rbx), %rax
movq 0x30(%rbx), %rcx
addq $0x10, %rax
movq %rax, 0x10(%rbx)
subq %rax, %rcx
cmpq $0xf, %rcx
jg 0x16a95
movq %rbx, %rdi
xorl %esi, %esi
callq 0xaef2
movq %rbx, %rdi
callq 0xbfa4
movq %rax, 0x18(%r14)
leaq 0x20(%rsp), %rdi
movq %rax, %rsi
callq 0x16b43
movq 0x18(%r14), %r15
movl 0x50(%r15), %esi
cmpl $0x1, %esi
je 0x16ad9
movq %rbx, %rdi
callq 0xbe28
movq %rax, %r14
movq %r15, 0x18(%rax)
movq 0x10(%rbx), %rax
movq %r14, -0x10(%rax)
movl $0x46, -0x8(%rax)
movq %r14, %rax
addq $0x60, %rsp
popq %rbx
popq %r14
popq %r15
retq
cmpl $0x61754c1b, (%rsp)     # imm = 0x61754C1B
jne 0x16b20
leaq 0x40(%rsp), %rdi
movq %rsp, %rsi
pushq $0x6
popq %rdx
callq 0x63e0
testl %eax, %eax
jne 0x16b29
leaq 0x40(%rsp), %rdi
movq %rsp, %rsi
pushq $0xc
popq %rdx
callq 0x63e0
testl %eax, %eax
jne 0x16b32
leaq 0x920e(%rip), %rsi      # 0x1fd2c
jmp 0x16b39
leaq 0x91de(%rip), %rsi      # 0x1fd05
jmp 0x16b39
leaq 0x91db(%rip), %rsi      # 0x1fd0b
jmp 0x16b39
leaq 0x91e6(%rip), %rsi      # 0x1fd1f
leaq 0x20(%rsp), %rdi
callq 0x16e7c
// File: /workspace/github_c_makefile_star2_O2/bhk[P]tooltree/lua/../opensource/lua-5.2.3/src/lundump.c
// Function: LoadInt
static int LoadInt(LoadState* S)
{
 int x;
 LoadVar(S,x);
 if (x<0) error(S,"corrupted");
 return x;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
leaq 0x4(%rsp), %r14
pushq $0x4
popq %rdx
movq %r14, %rsi
callq 0x16e59
movl (%r14), %eax
testl %eax, %eax
js 0x16ec9
addq $0x8, %rsp
popq %rbx
popq %r14
retq
leaq 0x8e5c(%rip), %rsi      # 0x1fd2c
movq %rbx, %rdi
callq 0x16e7c
// File: /workspace/github_c_makefile_star2_O2/bhk[P]tooltree/lua/../opensource/lua-5.2.3/src/lundump.c
// Function: LoadString
static TString* LoadString(LoadState* S)
{
 size_t size;
 LoadVar(S,size);
 if (size==0)
  return NULL;
 else
 {
  char* s=luaZ_openspace(S->L,S->b,size);
  LoadBlock(S,s,size*sizeof(char));
  return luaS_newlstr(S->L,s,size-1);		/* remove trailing '\0' */
 }
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq %rsp, %r14
pushq $0x8
popq %rdx
movq %r14, %rsi
callq 0x16e59
movq (%r14), %rdx
testq %rdx, %rdx
je 0x16f45
movq (%rbx), %rdi
movq 0x10(%rbx), %rsi
callq 0x18e8d
movq %rax, %r14
movq (%rsp), %rdx
movq %rbx, %rdi
movq %rax, %rsi
callq 0x16e59
movq (%rbx), %rdi
movq (%rsp), %rdx
decq %rdx
movq %r14, %rsi
callq 0x13766
jmp 0x16f47
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
nop
// File: /workspace/github_c_makefile_star2_O2/bhk[P]tooltree/lua/../opensource/lua-5.2.3/src/lvm.c
// Function: luaV_tonumber
const TValue *luaV_tonumber (const TValue *obj, TValue *n) {
  lua_Number num;
  if (ttisnumber(obj)) return obj;
  if (ttisstring(obj) && luaO_str2d(svalue(obj), tsvalue(obj)->len, &num)) {
    setnvalue(n, num);
    return n;
  }
  else
    return NULL;
}

// Assembly:
pushq %rbx
subq $0x10, %rsp
movl 0x8(%rdi), %eax
cmpl $0x3, %eax
jne 0x16f62
movq %rdi, %rbx
jmp 0x16f9b
andl $0xf, %eax
cmpl $0x4, %eax
jne 0x16f99
movq %rsi, %rbx
movq (%rdi), %rdi
movq 0x10(%rdi), %rsi
addq $0x18, %rdi
leaq 0x8(%rsp), %rdx
callq 0xfade
testl %eax, %eax
je 0x16f99
movsd 0x8(%rsp), %xmm0
movsd %xmm0, (%rbx)
movl $0x3, 0x8(%rbx)
jmp 0x16f9b
xorl %ebx, %ebx
movq %rbx, %rax
addq $0x10, %rsp
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O2/bhk[P]tooltree/lua/../opensource/lua-5.2.3/src/lvm.c
// Function: luaV_tostring
int luaV_tostring (lua_State *L, StkId obj) {
  if (!ttisnumber(obj))
    return 0;
  else {
    char s[LUAI_MAXNUMBER2STR];
    lua_Number n = nvalue(obj);
    int l = lua_number2str(s, n);
    setsvalue2s(L, obj, luaS_newlstr(L, s, l));
    return 1;
  }
}

// Assembly:
xorl %eax, %eax
cmpl $0x3, 0x8(%rsi)
jne 0x16ffa
pushq %r15
pushq %r14
pushq %rbx
subq $0x20, %rsp
movq %rsi, %rbx
movq %rdi, %r14
movsd (%rsi), %xmm0
leaq 0x7b9e(%rip), %rsi      # 0x1eb64
movq %rsp, %r15
movq %r15, %rdi
movb $0x1, %al
callq 0x6520
movslq %eax, %rdx
movq %r14, %rdi
movq %r15, %rsi
callq 0x13766
movq %rax, (%rbx)
movzbl 0x8(%rax), %eax
orl $0x40, %eax
movl %eax, 0x8(%rbx)
pushq $0x1
popq %rax
addq $0x20, %rsp
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/bhk[P]tooltree/lua/../opensource/lua-5.2.3/src/lvm.c
// Function: luaV_gettable
void luaV_gettable (lua_State *L, const TValue *t, TValue *key, StkId val) {
  int loop;
  for (loop = 0; loop < MAXTAGLOOP; loop++) {
    const TValue *tm;
    if (ttistable(t)) {  /* `t' is a table? */
      Table *h = hvalue(t);
      const TValue *res = luaH_get(h, key); /* do a primitive get */
      if (!ttisnil(res) ||  /* result is not nil? */
          (tm = fasttm(L, h->metatable, TM_INDEX)) == NULL) { /* or no TM? */
        setobj2s(L, val, res);
        return;
      }
      /* else will try the tag method */
    }
    else if (ttisnil(tm = luaT_gettmbyobj(L, t, TM_INDEX)))
      luaG_typeerror(L, t, "index");
    if (ttisfunction(tm)) {
      callTM(L, tm, t, key, val, 1);
      return;
    }
    t = tm;  /* else repeat with 'tm' */
  }
  luaG_runerror(L, "loop in gettable");
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rcx, (%rsp)
movq %rdx, %r15
movq %rsi, %rax
movq %rdi, %r14
pushq $0x65
popq %rbx
decl %ebx
je 0x170cb
movq %rax, %r12
cmpl $0x45, 0x8(%rax)
jne 0x1706a
movq (%r12), %rbp
movq %rbp, %rdi
movq %r15, %rsi
callq 0x15f09
movq %rax, %r13
cmpl $0x0, 0x8(%rax)
jne 0x170aa
movq 0x10(%rbp), %rdi
testq %rdi, %rdi
je 0x170aa
testb $0x1, 0xa(%rdi)
jne 0x170aa
movq 0x18(%r14), %rax
movq 0x120(%rax), %rdx
xorl %esi, %esi
callq 0x1694f
testq %rax, %rax
je 0x170aa
movl 0x8(%rax), %ecx
jmp 0x1707e
movq %r14, %rdi
movq %r12, %rsi
xorl %edx, %edx
callq 0x16978
movl 0x8(%rax), %ecx
testl %ecx, %ecx
je 0x170dc
andl $0xf, %ecx
cmpl $0x6, %ecx
jne 0x17016
pushq $0x1
popq %r9
movq %r14, %rdi
movq %rax, %rsi
movq %r12, %rdx
movq %r15, %rcx
movq (%rsp), %r8
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x170ee
movq (%r13), %rax
movq (%rsp), %rcx
movq %rax, (%rcx)
movl 0x8(%r13), %eax
movl %eax, 0x8(%rcx)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x8dee(%rip), %rsi      # 0x1fec0
movq %r14, %rdi
xorl %eax, %eax
callq 0xaa89
leaq 0x887d(%rip), %rdx      # 0x1f960
movq %r14, %rdi
movq %r12, %rsi
callq 0xa6bd
// File: /workspace/github_c_makefile_star2_O2/bhk[P]tooltree/lua/../opensource/lua-5.2.3/src/lvm.c
// Function: callTM
static void callTM (lua_State *L, const TValue *f, const TValue *p1,
                    const TValue *p2, TValue *p3, int hasres) {
  ptrdiff_t result = savestack(L, p3);
  setobj2s(L, L->top++, f);  /* push function */
  setobj2s(L, L->top++, p1);  /* 1st argument */
  setobj2s(L, L->top++, p2);  /* 2nd argument */
  if (!hasres)  /* no result? 'p3' is third argument */
    setobj2s(L, L->top++, p3);  /* 3rd argument */
  /* metamethod may yield only when called from Lua code */
  luaD_call(L, L->top - (4 - hasres), hasres, isLua(L->ci));
  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 0x10(%rdi), %rax
leaq 0x10(%rax), %rdi
movq %rdi, 0x10(%rbx)
movq (%rsi), %rdi
movq %rdi, (%rax)
movl 0x8(%rsi), %esi
movl %esi, 0x8(%rax)
movq 0x10(%rbx), %rax
leaq 0x10(%rax), %rsi
movq %rsi, 0x10(%rbx)
movq (%rdx), %rsi
movq %rsi, (%rax)
movl 0x8(%rdx), %edx
movl %edx, 0x8(%rax)
movq 0x10(%rbx), %rax
leaq 0x10(%rax), %rdx
movq %rdx, 0x10(%rbx)
movq (%rcx), %rdx
movq %rdx, (%rax)
movl 0x8(%rcx), %ecx
movl %ecx, 0x8(%rax)
testl %r9d, %r9d
jne 0x17165
movq 0x10(%rbx), %rax
leaq 0x10(%rax), %rcx
movq %rcx, 0x10(%rbx)
movq (%r8), %rcx
movq %rcx, (%rax)
movl 0x8(%r8), %ecx
movl %ecx, 0x8(%rax)
pushq $0x4
popq %rax
subl %ebp, %eax
shll $0x4, %eax
movq 0x10(%rbx), %rsi
subq %rax, %rsi
movq 0x20(%rbx), %rax
movzbl 0x22(%rax), %ecx
andl $0x1, %ecx
movq %rbx, %rdi
movl %ebp, %edx
callq 0xb418
testl %ebp, %ebp
je 0x171ad
movq 0x10(%rbx), %rax
movq 0x38(%rbx), %rcx
leaq -0x10(%rax), %rdx
movq %rdx, 0x10(%rbx)
movq -0x10(%rax), %rdx
movq %rdx, (%rcx,%r14)
movl -0x8(%rax), %eax
movl %eax, 0x8(%rcx,%r14)
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/bhk[P]tooltree/lua/../opensource/lua-5.2.3/src/lvm.c
// Function: luaV_lessthan
int luaV_lessthan (lua_State *L, const TValue *l, const TValue *r) {
  int res;
  if (ttisnumber(l) && ttisnumber(r))
    return luai_numlt(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_LT)) < 0)
    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 0x1732b
cmpl $0x3, 0x8(%rbx)
jne 0x1734e
movsd (%rbx), %xmm0
xorl %eax, %eax
ucomisd (%r14), %xmm0
seta %al
jmp 0x17363
andl $0xf, %eax
cmpl $0x4, %eax
jne 0x1734e
movl 0x8(%rbx), %eax
andl $0xf, %eax
cmpl $0x4, %eax
jne 0x1734e
movq (%r14), %rdi
movq (%rbx), %rsi
callq 0x17377
shrl $0x1f, %eax
jmp 0x17363
pushq $0xd
popq %rcx
movq %r15, %rdi
movq %r14, %rsi
movq %rbx, %rdx
callq 0x173ea
testl %eax, %eax
js 0x17369
popq %rbx
popq %r14
popq %r15
retq
movq %r15, %rdi
movq %r14, %rsi
movq %rbx, %rdx
callq 0xab78
// File: /workspace/github_c_makefile_star2_O2/bhk[P]tooltree/lua/../opensource/lua-5.2.3/src/lvm.c
// Function: l_strcmp
static int l_strcmp (const TString *ls, const TString *rs) {
  const char *l = getstr(ls);
  size_t ll = ls->tsv.len;
  const char *r = getstr(rs);
  size_t lr = rs->tsv.len;
  for (;;) {
    int temp = strcoll(l, r);
    if (temp != 0) return temp;
    else {  /* strings are equal up to a `\0' */
      size_t len = strlen(l);  /* index of first `\0' in both strings */
      if (len == lr)  /* r is finished? */
        return (len == ll) ? 0 : 1;
      else if (len == ll)  /* l is finished? */
        return -1;  /* l is smaller than r (because r 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 %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %rsi, %r14
movq %rdi, %r15
movq 0x10(%rdi), %r12
addq $0x18, %r15
movq 0x10(%rsi), %r13
addq $0x18, %r14
pushq $-0x1
popq %rbx
movq %r15, %rdi
movq %r14, %rsi
callq 0x63f0
testl %eax, %eax
jne 0x173d2
movq %r15, %rdi
callq 0x6170
cmpq %r13, %rax
je 0x173d6
cmpq %r12, %rax
je 0x173de
leaq 0x1(%rax), %rcx
addq %rax, %r15
incq %r15
subq %rcx, %r12
addq %rax, %r14
incq %r14
subq %rcx, %r13
jmp 0x17399
movl %eax, %ebx
jmp 0x173de
xorl %ebx, %ebx
cmpq %r12, %r13
setne %bl
movl %ebx, %eax
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/bhk[P]tooltree/lua/../opensource/lua-5.2.3/src/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 0x1744d
cmpl $0x3, 0x8(%rbx)
jne 0x17476
movsd (%rbx), %xmm0
xorl %eax, %eax
ucomisd (%r14), %xmm0
setae %al
jmp 0x174a6
andl $0xf, %eax
cmpl $0x4, %eax
jne 0x17476
movl 0x8(%rbx), %eax
andl $0xf, %eax
cmpl $0x4, %eax
jne 0x17476
movq (%r14), %rdi
movq (%rbx), %rsi
callq 0x17377
movl %eax, %ecx
xorl %eax, %eax
testl %ecx, %ecx
setle %al
jmp 0x174a6
pushq $0xe
popq %rcx
movq %r15, %rdi
movq %r14, %rsi
movq %rbx, %rdx
callq 0x173ea
testl %eax, %eax
jns 0x174a6
pushq $0xd
popq %rcx
movq %r15, %rdi
movq %rbx, %rsi
movq %r14, %rdx
callq 0x173ea
testl %eax, %eax
js 0x174ac
sete %al
movzbl %al, %eax
popq %rbx
popq %r14
popq %r15
retq
movq %r15, %rdi
movq %r14, %rsi
movq %rbx, %rdx
callq 0xab78