LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O3/bhk[P]tooltree/lua/../opensource/lua-5.2.3/src/ldump.c
// Function: DumpString
static void DumpString(const TString* s, DumpState* D)
{
 if (s==NULL)
 {
  size_t size=0;
  DumpVar(size,D);
 }
 else
 {
  size_t size=s->tsv.len+1;		/* include trailing '\0' */
  DumpVar(size,D);
  DumpBlock(getstr(s),size*sizeof(char),D);
 }
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
testq %rdi, %rdi
je 0xc62a
movq %rdi, %r14
movq 0x10(%rdi), %rax
incq %rax
movq %rax, (%rsp)
cmpl $0x0, 0x1c(%rbx)
jne 0xc64d
movq (%rbx), %rdi
movq 0x10(%rbx), %rcx
movq %rsp, %rsi
movl $0x8, %edx
callq *0x8(%rbx)
movl %eax, 0x1c(%rbx)
testl %eax, %eax
jne 0xc64d
movq (%rsp), %rdx
addq $0x18, %r14
movq (%rbx), %rdi
movq 0x10(%rbx), %rcx
movq %r14, %rsi
jmp 0xc647
movq $0x0, (%rsp)
cmpl $0x0, 0x1c(%rbx)
jne 0xc64d
movq (%rbx), %rdi
movq 0x10(%rbx), %rcx
movq %rsp, %rsi
movl $0x8, %edx
callq *0x8(%rbx)
movl %eax, 0x1c(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r14
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O3/bhk[P]tooltree/lua/../opensource/lua-5.2.3/src/lfunc.c
// Function: luaF_newupval
UpVal *luaF_newupval (lua_State *L) {
  UpVal *uv = &luaC_newobj(L, LUA_TUPVAL, sizeof(UpVal), NULL, 0)->uv;
  uv->v = &uv->u.value;
  setnilvalue(uv->v);
  return uv;
}

// Assembly:
pushq %rax
movl $0x28, %edx
movl $0xa, %esi
xorl %ecx, %ecx
xorl %r8d, %r8d
callq 0xcb24
leaq 0x18(%rax), %rcx
movq %rcx, 0x10(%rax)
movl $0x0, 0x20(%rax)
popq %rcx
retq
// File: /workspace/github_c_makefile_star2_O3/bhk[P]tooltree/lua/../opensource/lua-5.2.3/src/lfunc.c
// Function: luaF_findupval
UpVal *luaF_findupval (lua_State *L, StkId level) {
  global_State *g = G(L);
  GCObject **pp = &L->openupval;
  UpVal *p;
  UpVal *uv;
  while (*pp != NULL && (p = gco2uv(*pp))->v >= level) {
    GCObject *o = obj2gco(p);
    lua_assert(p->v != &p->u.value);
    lua_assert(!isold(o) || isold(obj2gco(L)));
    if (p->v == level) {  /* found a corresponding upvalue? */
      if (isdead(g, o))  /* is it dead? */
        changewhite(o);  /* resurrect it */
      return p;
    }
    pp = &p->next;
  }
  /* not found: create a new one */
  uv = &luaC_newobj(L, LUA_TUPVAL, sizeof(UpVal), pp, 0)->uv;
  uv->v = level;  /* current value lives in the stack */
  uv->u.l.prev = &g->uvhead;  /* double link it in `uvhead' list */
  uv->u.l.next = g->uvhead.u.l.next;
  uv->u.l.next->u.l.prev = uv;
  g->uvhead.u.l.next = uv;
  lua_assert(uv->u.l.next->u.l.prev == uv && uv->u.l.prev->u.l.next == uv);
  return uv;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq 0x18(%rdi), %r14
leaq 0x60(%rdi), %rcx
movq (%rcx), %rax
testq %rax, %rax
je 0xc73a
cmpq %rbx, 0x10(%rax)
jb 0xc73a
movq %rax, %rcx
jne 0xc711
movb 0x9(%rax), %cl
xorb $0x3, %cl
movb 0x54(%r14), %dl
xorb $0x3, %dl
testb %cl, %dl
jne 0xc771
movb %cl, 0x9(%rax)
jmp 0xc771
movl $0x28, %edx
movl $0xa, %esi
xorl %r8d, %r8d
callq 0xcb24
movq %rbx, 0x10(%rax)
leaq 0xb0(%r14), %rcx
movq %rcx, 0x18(%rax)
movq 0xd0(%r14), %rcx
movq %rcx, 0x20(%rax)
movq %rax, 0x18(%rcx)
movq %rax, 0xd0(%r14)
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O3/bhk[P]tooltree/lua/../opensource/lua-5.2.3/src/lfunc.c
// Function: luaF_close
void luaF_close (lua_State *L, StkId level) {
  UpVal *uv;
  global_State *g = G(L);
  while (L->openupval != NULL && (uv = gco2uv(L->openupval))->v >= level) {
    GCObject *o = obj2gco(uv);
    lua_assert(!isblack(o) && uv->v != &uv->u.value);
    L->openupval = uv->next;  /* remove from `open' list */
    if (isdead(g, o))
      luaF_freeupval(L, uv);  /* free upvalue */
    else {
      unlinkupval(uv);  /* remove upvalue from 'uvhead' list */
      setobj(L, &uv->u.value, uv->v);  /* move value to upvalue slot */
      uv->v = &uv->u.value;  /* now current value lives here */
      gch(o)->next = g->allgc;  /* link upvalue into 'allgc' list */
      g->allgc = o;
      luaC_checkupvalcolor(g, uv);
    }
  }
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rsi, %rbx
movq 0x60(%rdi), %rsi
testq %rsi, %rsi
je 0xc82b
movq %rdi, %r14
movq 0x18(%rdi), %r15
cmpq %rbx, 0x10(%rsi)
jb 0xc82b
movq (%rsi), %rax
movq %rax, 0x60(%r14)
movb 0x9(%rsi), %al
xorb $0x3, %al
movb 0x54(%r15), %cl
xorb $0x3, %cl
testb %al, %cl
je 0xc81a
leaq 0x18(%rsi), %rax
movq 0x18(%rsi), %rcx
movq 0x20(%rsi), %rdx
movq %rcx, 0x18(%rdx)
movq 0x20(%rsi), %rdx
movq %rdx, 0x20(%rcx)
movq 0x10(%rsi), %rcx
movq (%rcx), %rdx
movq %rdx, 0x18(%rsi)
movl 0x8(%rcx), %ecx
movl %ecx, 0x20(%rsi)
movq %rax, 0x10(%rsi)
movq 0x60(%r15), %rax
movq %rax, (%rsi)
movq %rsi, 0x60(%r15)
movq %r15, %rdi
callq 0xcae3
jmp 0xc822
movq %r14, %rdi
callq 0xc779
movq 0x60(%r14), %rsi
testq %rsi, %rsi
jne 0xc7bb
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/bhk[P]tooltree/lua/../opensource/lua-5.2.3/src/lgc.c
// Function: luaC_barrier_
void luaC_barrier_ (lua_State *L, GCObject *o, GCObject *v) {
  global_State *g = G(L);
  lua_assert(isblack(o) && iswhite(v) && !isdead(g, v) && !isdead(g, o));
  lua_assert(g->gcstate != GCSpause);
  lua_assert(gch(o)->tt != LUA_TTABLE);
  if (keepinvariantout(g))  /* must keep invariant? */
    reallymarkobject(g, v);  /* restore invariant */
  else {  /* sweep phase */
    lua_assert(issweepphase(g));
    makewhite(g, o);  /* mark main obj. as white to avoid other barriers */
  }
}

// Assembly:
movq 0x18(%rdi), %rdi
cmpb $0x1, 0x55(%rdi)
ja 0xc95f
movq %rdx, %rsi
jmp 0xc970
movb 0x9(%rsi), %al
andb $-0x48, %al
movb 0x54(%rdi), %cl
andb $0x3, %cl
orb %al, %cl
movb %cl, 0x9(%rsi)
retq
// File: /workspace/github_c_makefile_star2_O3/bhk[P]tooltree/lua/../opensource/lua-5.2.3/src/lgc.c
// Function: reallymarkobject
static void reallymarkobject (global_State *g, GCObject *o) {
  lu_mem size;
  white2gray(o);
  switch (gch(o)->tt) {
    case LUA_TSHRSTR:
    case LUA_TLNGSTR: {
      size = sizestring(gco2ts(o));
      break;  /* nothing else to mark; make it black */
    }
    case LUA_TUSERDATA: {
      Table *mt = gco2u(o)->metatable;
      markobject(g, mt);
      markobject(g, gco2u(o)->env);
      size = sizeudata(gco2u(o));
      break;
    }
    case LUA_TUPVAL: {
      UpVal *uv = gco2uv(o);
      markvalue(g, uv->v);
      if (uv->v != &uv->u.value)  /* open? */
        return;  /* open upvalues remain gray */
      size = sizeof(UpVal);
      break;
    }
    case LUA_TLCL: {
      gco2lcl(o)->gclist = g->gray;
      g->gray = o;
      return;
    }
    case LUA_TCCL: {
      gco2ccl(o)->gclist = g->gray;
      g->gray = o;
      return;
    }
    case LUA_TTABLE: {
      linktable(gco2t(o), &g->gray);
      return;
    }
    case LUA_TTHREAD: {
      gco2th(o)->gclist = g->gray;
      g->gray = o;
      return;
    }
    case LUA_TPROTO: {
      gco2p(o)->gclist = g->gray;
      g->gray = o;
      return;
    }
    default: lua_assert(0); return;
  }
  gray2black(o);
  g->GCmemtrav += size;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %rbx
andb $-0x4, 0x9(%rsi)
movq %rdi, %r14
movzbl 0x8(%rsi), %ecx
leal -0x4(%rcx), %eax
cmpl $0x10, %eax
ja 0xc9b8
leaq 0x13fef(%rip), %rcx     # 0x20984
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movl $0x19, %r15d
movl $0x10, %r12d
addq (%rbx,%r12), %r15
orb $0x4, 0x9(%rbx)
addq %r15, 0x20(%r14)
jmp 0xca26
cmpl $0x26, %ecx
jne 0xca26
movq 0x80(%r14), %rax
movq %rax, 0x10(%rbx)
jmp 0xca1f
movq 0x80(%r14), %rax
movq %rax, 0x68(%rbx)
jmp 0xca1f
movq 0x10(%rbx), %rax
testb $0x40, 0x8(%rax)
je 0xc9f6
movq (%rax), %rsi
testb $0x3, 0x9(%rsi)
je 0xc9f6
movq %r14, %rdi
callq 0xc970
movq 0x10(%rbx), %rax
leaq 0x18(%rbx), %rcx
cmpq %rcx, %rax
jne 0xca26
movl $0x28, %r15d
jmp 0xc9ae
movq 0x80(%r14), %rax
movq %rax, 0x30(%rbx)
jmp 0xca1f
movq 0x80(%r14), %rax
movq %rax, 0x70(%rbx)
movq %rbx, 0x80(%r14)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
movq 0x10(%rbx), %rsi
testq %rsi, %rsi
je 0xca49
testb $0x3, 0x9(%rsi)
je 0xca49
movq %r14, %rdi
callq 0xc970
movq 0x18(%rbx), %rsi
movl $0x28, %r15d
movl $0x20, %r12d
testq %rsi, %rsi
je 0xc9aa
testb $0x3, 0x9(%rsi)
je 0xc9aa
movq %r14, %rdi
callq 0xc970
jmp 0xc9aa
// File: /workspace/github_c_makefile_star2_O3/bhk[P]tooltree/lua/../opensource/lua-5.2.3/src/lgc.c
// Function: luaC_barrierproto_
LUAI_FUNC void luaC_barrierproto_ (lua_State *L, Proto *p, Closure *c) {
  global_State *g = G(L);
  lua_assert(isblack(obj2gco(p)));
  if (p->cache == NULL) {  /* first time? */
    luaC_objbarrier(L, p, c);
  }
  else {  /* use a backward barrier */
    black2gray(obj2gco(p));  /* make prototype gray (again) */
    p->gclist = g->grayagain;
    g->grayagain = obj2gco(p);
  }
}

// Assembly:
cmpq $0x0, 0x40(%rsi)
je 0xcab6
movq 0x18(%rdi), %rax
andb $-0x5, 0x9(%rsi)
movq 0x88(%rax), %rcx
movq %rcx, 0x70(%rsi)
movq %rsi, 0x88(%rax)
retq
testb $0x3, 0x9(%rdx)
je 0xcab5
movb 0x9(%rsi), %al
testb $0x4, %al
je 0xcab5
movq 0x18(%rdi), %rdi
cmpb $0x1, 0x55(%rdi)
ja 0xcad5
movq %rdx, %rsi
jmp 0xc970
andb $-0x48, %al
movb 0x54(%rdi), %cl
andb $0x3, %cl
orb %al, %cl
movb %cl, 0x9(%rsi)
retq
// File: /workspace/github_c_makefile_star2_O3/bhk[P]tooltree/lua/../opensource/lua-5.2.3/src/lgc.c
// Function: luaC_checkupvalcolor
void luaC_checkupvalcolor (global_State *g, UpVal *uv) {
  GCObject *o = obj2gco(uv);
  lua_assert(!isblack(o));  /* open upvalues are never black */
  if (isgray(o)) {
    if (keepinvariant(g)) {
      resetoldbit(o);  /* see MOVE OLD rule */
      gray2black(o);  /* it is being visited now */
      markvalue(g, uv->v);
    }
    else {
      lua_assert(issweepphase(g));
      makewhite(g, o);
    }
  }
}

// Assembly:
movb 0x9(%rsi), %al
testb $0x7, %al
je 0xcaeb
retq
cmpb $0x2, 0x56(%rdi)
je 0xcaf7
cmpb $0x1, 0x55(%rdi)
ja 0xcb16
andb $-0x48, %al
orb $0x4, %al
movb %al, 0x9(%rsi)
movq 0x10(%rsi), %rax
testb $0x40, 0x8(%rax)
je 0xcaea
movq (%rax), %rsi
testb $0x3, 0x9(%rsi)
je 0xcaea
jmp 0xc970
andb $-0x48, %al
movb 0x54(%rdi), %cl
andb $0x3, %cl
orb %al, %cl
movb %cl, 0x9(%rsi)
retq
// File: /workspace/github_c_makefile_star2_O3/bhk[P]tooltree/lua/../opensource/lua-5.2.3/src/lgc.c
// Function: luaC_checkfinalizer
void luaC_checkfinalizer (lua_State *L, GCObject *o, Table *mt) {
  global_State *g = G(L);
  if (testbit(gch(o)->marked, SEPARATED) || /* obj. is already separated... */
      isfinalized(o) ||                           /* ... or is finalized... */
      gfasttm(g, mt, TM_GC) == NULL)                /* or has no finalizer? */
    return;  /* nothing to be done */
  else {  /* move 'o' to 'finobj' list */
    GCObject **p;
    GCheader *ho = gch(o);
    if (g->sweepgc == &ho->next) {  /* avoid removing current sweep object */
      lua_assert(issweepphase(g));
      g->sweepgc = sweeptolive(L, g->sweepgc, NULL);
    }
    /* search for pointer pointing to 'o' */
    for (p = &g->allgc; *p != o; p = &gch(*p)->next) { /* empty */ }
    *p = ho->next;  /* remove 'o' from root list */
    ho->next = g->finobj;  /* link it in list 'finobj' */
    g->finobj = o;
    l_setbit(ho->marked, SEPARATED);  /* mark it as such */
    if (!keepinvariantout(g))  /* not keeping invariant? */
      makewhite(g, o);  /* "sweep" object */
    else
      resetoldbit(o);  /* see MOVE OLD rule */
  }
}

// Assembly:
testq %rdx, %rdx
je 0xcc32
pushq %r15
pushq %r14
pushq %rbx
movq %rsi, %rbx
movb 0x9(%rsi), %al
andb $0x18, %al
jne 0xcc2d
testb $0x4, 0xa(%rdx)
jne 0xcc2d
movq %rdi, %r14
movq 0x18(%rdi), %r15
movq 0x130(%r15), %rax
movq %rdx, %rdi
movl $0x2, %esi
movq %rax, %rdx
callq 0x181f9
testq %rax, %rax
je 0xcc2d
movq 0x70(%r15), %rax
cmpq %rbx, %rax
jne 0xcbed
movl $0x1, %edx
movq %r14, %rdi
movq %rax, %rsi
callq 0xce55
cmpq %rbx, %rax
je 0xcbd4
movq %rax, 0x70(%r15)
leaq 0x60(%r15), %rcx
movq %rcx, %rax
movq (%rcx), %rcx
cmpq %rbx, %rcx
jne 0xcbf1
movq (%rbx), %rcx
movq %rcx, (%rax)
movq 0x68(%r15), %rax
movq %rax, (%rbx)
movq %rbx, 0x68(%r15)
movb 0x9(%rbx), %al
orb $0x10, %al
cmpb $0x2, 0x55(%r15)
jae 0xcc1f
andb $-0x41, %al
movl %eax, %ecx
jmp 0xcc2a
andb $-0x48, %al
movb 0x54(%r15), %cl
andb $0x3, %cl
orb %al, %cl
movb %cl, 0x9(%rbx)
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/bhk[P]tooltree/lua/../opensource/lua-5.2.3/src/lgc.c
// Function: luaC_changemode
void luaC_changemode (lua_State *L, int mode) {
  global_State *g = G(L);
  if (mode == g->gckind) return;  /* nothing to change */
  if (mode == KGC_GEN) {  /* change to generational mode */
    /* make sure gray lists are consistent */
    luaC_runtilstate(L, bitmask(GCSpropagate));
    g->GCestimate = gettotalbytes(g);
    g->gckind = KGC_GEN;
  }
  else {  /* change to incremental mode */
    /* sweep all objects to turn them back to white
       (as white has not changed, nothing extra will be collected) */
    g->gckind = KGC_NORMAL;
    entersweep(L);
    luaC_runtilstate(L, ~sweepphases);
  }
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq 0x18(%rdi), %r14
movzbl 0x56(%r14), %eax
cmpl %esi, %eax
je 0xcc6a
movq %rdi, %rbx
cmpl $0x2, %esi
jne 0xcc72
movq %rbx, %rdi
movl $0x1, %esi
callq 0xcc93
movq 0x18(%r14), %rax
addq 0x10(%r14), %rax
movq %rax, 0x28(%r14)
movb $0x2, 0x56(%r14)
addq $0x8, %rsp
popq %rbx
popq %r14
retq
movb $0x0, 0x56(%r14)
movq %rbx, %rdi
callq 0xccc3
movq %rbx, %rdi
movl $0xffffffe3, %esi       # imm = 0xFFFFFFE3
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0xcc93
// File: /workspace/github_c_makefile_star2_O3/bhk[P]tooltree/lua/../opensource/lua-5.2.3/src/lgc.c
// Function: entersweep
static int entersweep (lua_State *L) {
  global_State *g = G(L);
  int n = 0;
  g->gcstate = GCSsweepstring;
  lua_assert(g->sweepgc == NULL && g->sweepfin == NULL);
  /* prepare to sweep strings, finalizable objects, and regular objects */
  g->sweepstrgc = 0;
  g->sweepfin = sweeptolive(L, &g->finobj, &n);
  g->sweepgc = sweeptolive(L, &g->allgc, &n);
  return n;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq 0x18(%rdi), %r14
movb $0x2, 0x55(%r14)
movl $0x0, 0x58(%r14)
leaq 0x68(%r14), %r15
xorl %ebp, %ebp
movq %r15, %rax
incl %ebp
movl $0x1, %edx
movq %rbx, %rdi
movq %rax, %rsi
callq 0xce55
cmpq %r15, %rax
je 0xcce7
movq %rax, 0x78(%r14)
leaq 0x60(%r14), %r15
movq %r15, %rax
movl $0x1, %edx
movq %rbx, %rdi
movq %rax, %rsi
callq 0xce55
incl %ebp
cmpq %r15, %rax
je 0xcd09
movq %rax, 0x70(%r14)
movl %ebp, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/bhk[P]tooltree/lua/../opensource/lua-5.2.3/src/lgc.c
// Function: luaC_freeallobjects
void luaC_freeallobjects (lua_State *L) {
  global_State *g = G(L);
  int i;
  separatetobefnz(L, 1);  /* separate all objects with finalizers */
  lua_assert(g->finobj == NULL);
  callallpendingfinalizers(L, 0);
  g->currentwhite = WHITEBITS; /* this "white" makes all objects look dead */
  g->gckind = KGC_NORMAL;
  sweepwholelist(L, &g->finobj);  /* finalizers can create objs. in 'finobj' */
  sweepwholelist(L, &g->allgc);
  for (i = 0; i < g->strt.size; i++)  /* free all string lists */
    sweepwholelist(L, &g->strt.hash[i]);
  lua_assert(g->strt.nuse == 0);
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq 0x18(%rdi), %r14
movq %r14, %rdi
movl $0x1, %esi
callq 0xcdc6
movq %rbx, %rdi
xorl %esi, %esi
callq 0xce1b
movb $0x3, 0x54(%r14)
movb $0x0, 0x56(%r14)
leaq 0x68(%r14), %rsi
movq %rbx, %rdi
movq $-0x3, %rdx
callq 0xce55
leaq 0x60(%r14), %rsi
movq %rbx, %rdi
movq $-0x3, %rdx
callq 0xce55
cmpl $0x0, 0x3c(%r14)
jle 0xcdba
xorl %r15d, %r15d
xorl %r12d, %r12d
movq 0x30(%r14), %rsi
addq %r15, %rsi
movq %rbx, %rdi
movq $-0x3, %rdx
callq 0xce55
incq %r12
movslq 0x3c(%r14), %rax
addq $0x8, %r15
cmpq %rax, %r12
jl 0xcd94
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/bhk[P]tooltree/lua/../opensource/lua-5.2.3/src/lgc.c
// Function: separatetobefnz
static void separatetobefnz (lua_State *L, int all) {
  global_State *g = G(L);
  GCObject **p = &g->finobj;
  GCObject *curr;
  GCObject **lastnext = &g->tobefnz;
  /* find last 'next' field in 'tobefnz' list (to add elements in its end) */
  while (*lastnext != NULL)
    lastnext = &gch(*lastnext)->next;
  while ((curr = *p) != NULL) {  /* traverse all finalizable objects */
    lua_assert(!isfinalized(curr));
    lua_assert(testbit(gch(curr)->marked, SEPARATED));
    if (!(iswhite(curr) || all))  /* not being collected? */
      p = &gch(curr)->next;  /* don't bother with it */
    else {
      l_setbit(gch(curr)->marked, FINALIZEDBIT); /* won't be finalized again */
      *p = gch(curr)->next;  /* remove 'curr' from 'finobj' list */
      gch(curr)->next = *lastnext;  /* link at the end of 'tobefnz' list */
      *lastnext = curr;
      lastnext = &gch(curr)->next;
    }
  }
}

// Assembly:
leaq 0xa8(%rdi), %rcx
movq %rcx, %rax
movq (%rcx), %rcx
testq %rcx, %rcx
jne 0xcdcd
movq 0x68(%rdi), %rcx
testq %rcx, %rcx
je 0xce1a
addq $0x68, %rdi
movzbl 0x9(%rcx), %edx
movl %edx, %r8d
andl $0x3, %r8d
orl %esi, %r8d
je 0xce0f
orb $0x8, %dl
movb %dl, 0x9(%rcx)
movq (%rcx), %rdx
movq %rdx, (%rdi)
movq (%rax), %rdx
movq %rdx, (%rcx)
movq %rcx, (%rax)
movq %rcx, %rax
jmp 0xce12
movq %rcx, %rdi
movq (%rdi), %rcx
testq %rcx, %rcx
jne 0xcde5
retq
// File: /workspace/github_c_makefile_star2_O3/bhk[P]tooltree/lua/../opensource/lua-5.2.3/src/lgc.c
// Function: callallpendingfinalizers
static void callallpendingfinalizers (lua_State *L, int propagateerrors) {
  global_State *g = G(L);
  while (g->tobefnz) {
    resetoldbit(g->tobefnz);
    GCTM(L, propagateerrors);
  }
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq 0x18(%rdi), %r15
movq 0xa8(%r15), %rax
testq %rax, %rax
je 0xce4f
movl %esi, %ebx
movq %rdi, %r14
andb $-0x41, 0x9(%rax)
movq %r14, %rdi
movl %ebx, %esi
callq 0xd62d
movq 0xa8(%r15), %rax
testq %rax, %rax
jne 0xce35
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/bhk[P]tooltree/lua/../opensource/lua-5.2.3/src/lgc.c
// Function: luaC_forcestep
void luaC_forcestep (lua_State *L) {
  global_State *g = G(L);
  int i;
  if (isgenerational(g)) generationalcollection(L);
  else incstep(L);
  /* run a few finalizers (or all of them at the end of a collect cycle) */
  for (i = 0; g->tobefnz && (i < GCFINALIZENUM || g->gcstate == GCSpause); i++)
    GCTM(L, 1);  /* call one finalizer */
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
movabsq $0x7ffffffffffffffc, %r12 # imm = 0x7FFFFFFFFFFFFFFC
movq 0x18(%rdi), %r14
cmpb $0x2, 0x56(%r14)
jne 0xd4ad
movq 0x28(%r14), %r15
movq %rbx, %rdi
testq %r15, %r15
je 0xd576
movl $0x20, %esi
callq 0xcc93
movb $0x0, 0x55(%r14)
movq 0x18(%r14), %rsi
addq 0x10(%r14), %rsi
movq %r15, %rax
shrq $0x2, %rax
movabsq $0x28f5c28f5c28f5c3, %rcx # imm = 0x28F5C28F5C28F5C3
mulq %rcx
shrq $0x2, %rdx
movslq 0xf4(%r14), %rcx
imulq %rdx, %rcx
xorl %eax, %eax
cmpq %rcx, %rsi
cmovbeq %r15, %rax
jmp 0xd588
movq 0x18(%r14), %rcx
movl 0xf8(%r14), %eax
cmpl $0x29, %eax
movl $0x28, %r13d
cmovgel %eax, %r13d
movabsq $-0x5c28f5c28f5c28f5, %rbp # imm = 0xA3D70A3D70A3D70B
movq %rcx, %rax
imulq %rbp
addq %rcx, %rdx
movq %rdx, %rax
shrq $0x3f, %rax
sarq $0x7, %rdx
leaq (%rdx,%rax), %rcx
incq %rcx
movabsq $0x7ffffffffffffffc, %rax # imm = 0x7FFFFFFFFFFFFFFC
xorl %edx, %edx
divq %r13
movq %rcx, %r15
imulq %r13, %r15
cmpq %rax, %rcx
cmovgeq %r12, %r15
movq %rbx, %rdi
callq 0xd01b
subq %rax, %r15
movb 0x55(%r14), %al
cmpq $-0x95f, %r15           # imm = 0xF6A1
jl 0xd525
cmpb $0x5, %al
jne 0xd507
jmp 0xd52d
cmpb $0x5, %al
jne 0xd61c
movq 0x18(%r14), %rsi
movq 0x28(%r14), %rcx
movq %rcx, %rax
imulq %rbp
movq %rdx, %rdi
addq %rcx, %rdi
movq %rdi, %rax
shrq $0x3f, %rax
sarq $0x6, %rdi
addq %rax, %rdi
movslq 0xf0(%r14), %rcx
movabsq $0x7ffffffffffffffc, %rax # imm = 0x7FFFFFFFFFFFFFFC
xorl %edx, %edx
idivq %rdi
imulq %rcx, %rdi
cmpq %rcx, %rax
cmovgq %rdi, %r12
addq 0x10(%r14), %rsi
jmp 0xd5d1
xorl %esi, %esi
callq 0xd787
movq 0x18(%r14), %rsi
addq 0x10(%r14), %rsi
movq %rsi, %rax
movq %rax, 0x28(%r14)
movabsq $-0x5c28f5c28f5c28f5, %rcx # imm = 0xA3D70A3D70A3D70B
movq %rsi, %rax
imulq %rcx
movq %rdx, %rcx
addq %rsi, %rcx
movq %rcx, %rax
shrq $0x3f, %rax
sarq $0x6, %rcx
addq %rax, %rcx
movslq 0xf0(%r14), %rdi
movabsq $0x7ffffffffffffffc, %rax # imm = 0x7FFFFFFFFFFFFFFC
xorl %edx, %edx
idivq %rcx
imulq %rdi, %rcx
cmpq %rdi, %rax
cmovgq %rcx, %r12
subq %r12, %rsi
movq %r14, %rdi
callq 0x14420
cmpq $0x0, 0xa8(%r14)
je 0xd60d
xorl %ebp, %ebp
cmpl $0x4, %ebp
jb 0xd5f4
cmpb $0x5, 0x55(%r14)
jne 0xd60d
movq %rbx, %rdi
movl $0x1, %esi
callq 0xd62d
incl %ebp
cmpq $0x0, 0xa8(%r14)
jne 0xd5e8
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %r15, %rax
cqto
idivq %r13
imulq $0xc8, %rax, %rsi
jmp 0xd5d4
// File: /workspace/github_c_makefile_star2_O3/bhk[P]tooltree/lua/../opensource/lua-5.2.3/src/lgc.c
// Function: luaC_fullgc
void luaC_fullgc (lua_State *L, int isemergency) {
  global_State *g = G(L);
  int origkind = g->gckind;
  lua_assert(origkind != KGC_EMERGENCY);
  if (isemergency)  /* do not run finalizers during emergency GC */
    g->gckind = KGC_EMERGENCY;
  else {
    g->gckind = KGC_NORMAL;
    callallpendingfinalizers(L, 1);
  }
  if (keepinvariant(g)) {  /* may there be some black objects? */
    /* must sweep all objects to turn them back to white
       (as white has not changed, nothing will be collected) */
    entersweep(L);
  }
  /* finish any pending sweep phase to start a new cycle */
  luaC_runtilstate(L, bitmask(GCSpause));
  luaC_runtilstate(L, ~bitmask(GCSpause));  /* start new collection */
  luaC_runtilstate(L, bitmask(GCSpause));  /* run entire collection */
  if (origkind == KGC_GEN) {  /* generational mode? */
    /* generational mode must be kept in propagate phase */
    luaC_runtilstate(L, bitmask(GCSpropagate));
  }
  g->gckind = origkind;
  setpause(g, gettotalbytes(g));
  if (!isemergency)   /* do not run finalizers during emergency GC */
    callallpendingfinalizers(L, 1);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movl %esi, %ebp
movq %rdi, %rbx
movq 0x18(%rdi), %r14
movb 0x56(%r14), %r15b
testl %esi, %esi
je 0xd7a6
movb $0x1, 0x56(%r14)
jmp 0xd7bf
movb $0x0, 0x56(%r14)
movq %rbx, %rdi
movl $0x1, %esi
callq 0xce1b
cmpb $0x2, 0x56(%r14)
je 0xd7c6
cmpb $0x1, 0x55(%r14)
ja 0xd7ce
movq %rbx, %rdi
callq 0xccc3
movq %rbx, %rdi
movl $0x20, %esi
callq 0xcc93
movq %rbx, %rdi
movl $0xffffffdf, %esi       # imm = 0xFFFFFFDF
callq 0xcc93
movq %rbx, %rdi
movl $0x20, %esi
callq 0xcc93
cmpb $0x2, %r15b
jne 0xd808
movq %rbx, %rdi
movl $0x1, %esi
callq 0xcc93
movb %r15b, 0x56(%r14)
movq 0x18(%r14), %rsi
addq 0x10(%r14), %rsi
movabsq $-0x5c28f5c28f5c28f5, %rcx # imm = 0xA3D70A3D70A3D70B
movq %rsi, %rax
imulq %rcx
movq %rdx, %rcx
addq %rsi, %rcx
movq %rcx, %rax
shrq $0x3f, %rax
sarq $0x6, %rcx
addq %rax, %rcx
movslq 0xf0(%r14), %r8
movabsq $0x7ffffffffffffffc, %rdi # imm = 0x7FFFFFFFFFFFFFFC
movq %rdi, %rax
xorl %edx, %edx
idivq %rcx
imulq %r8, %rcx
cmpq %r8, %rax
cmovleq %rdi, %rcx
subq %rcx, %rsi
movq %r14, %rdi
callq 0x14420
testl %ebp, %ebp
je 0xd876
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movq %rbx, %rdi
movl $0x1, %esi
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0xce1b
// File: /workspace/github_c_makefile_star2_O3/bhk[P]tooltree/lua/../opensource/lua-5.2.3/src/lgc.c
// Function: markbeingfnz
static void markbeingfnz (global_State *g) {
  GCObject *o;
  for (o = g->tobefnz; o != NULL; o = gch(o)->next) {
    makewhite(g, o);
    reallymarkobject(g, o);
  }
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq 0xa8(%rdi), %r14
testq %r14, %r14
je 0xdfa1
movq %rdi, %rbx
movb 0x9(%r14), %al
andb $-0x48, %al
movb 0x54(%rbx), %cl
andb $0x3, %cl
orb %al, %cl
movb %cl, 0x9(%r14)
movq %rbx, %rdi
movq %r14, %rsi
callq 0xc970
movq (%r14), %r14
testq %r14, %r14
jne 0xdf7c
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O3/bhk[P]tooltree/lua/../opensource/lua-5.2.3/src/lgc.c
// Function: traverseephemeron
static int traverseephemeron (global_State *g, Table *h) {
  int marked = 0;  /* true if an object is marked in this traversal */
  int hasclears = 0;  /* true if table has white keys */
  int prop = 0;  /* true if table has entry "white-key -> white-value" */
  Node *n, *limit = gnodelast(h);
  int i;
  /* traverse array part (numeric keys are 'strong') */
  for (i = 0; i < h->sizearray; i++) {
    if (valiswhite(&h->array[i])) {
      marked = 1;
      reallymarkobject(g, gcvalue(&h->array[i]));
    }
  }
  /* traverse hash part */
  for (n = gnode(h, 0); n < limit; n++) {
    checkdeadkey(n);
    if (ttisnil(gval(n)))  /* entry is empty? */
      removeentry(n);  /* remove it */
    else if (iscleared(g, gkey(n))) {  /* key is not marked (yet)? */
      hasclears = 1;  /* table must be cleared */
      if (valiswhite(gval(n)))  /* value not marked yet? */
        prop = 1;  /* must propagate again */
    }
    else if (valiswhite(gval(n))) {  /* value not marked yet? */
      marked = 1;
      reallymarkobject(g, gcvalue(gval(n)));  /* mark it now */
    }
  }
  if (prop)
    linktable(h, &g->ephemeron);  /* have to propagate again */
  else if (hasclears)  /* does table have white keys? */
    linktable(h, &g->allweak);  /* may have to clean white keys */
  else  /* no white keys */
    linktable(h, &g->grayagain);  /* no need to clean */
  return marked;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
movq 0x20(%rsi), %r12
movb 0xb(%rsi), %cl
movl $0x1, %eax
shll %cl, %eax
cltq
leaq (%rax,%rax,4), %rax
leaq (%r12,%rax,8), %r15
movl 0x38(%rsi), %edx
testl %edx, %edx
jle 0xe01f
xorl %r12d, %r12d
movl $0x8, %r13d
xorl %eax, %eax
movq 0x18(%rbx), %rcx
testb $0x40, (%rcx,%r13)
je 0xe00a
movq -0x8(%rcx,%r13), %rsi
testb $0x3, 0x9(%rsi)
je 0xe00a
movq %r14, %rdi
callq 0xc970
movl 0x38(%rbx), %edx
movl $0x1, %eax
incq %r12
movslq %edx, %rcx
addq $0x10, %r13
cmpq %rcx, %r12
jl 0xdfe4
movq 0x20(%rbx), %r12
jmp 0xe021
xorl %eax, %eax
movl $0x88, %edx
cmpq %r15, %r12
jae 0xe0d2
movl %eax, 0x4(%rsp)
xorl %r13d, %r13d
xorl %ebp, %ebp
cmpl $0x0, 0x8(%r12)
je 0xe06e
leaq 0x10(%r12), %rsi
movq %r14, %rdi
callq 0xe0ed
movl 0x8(%r12), %ecx
testl %eax, %eax
je 0xe08c
movl $0x1, %ebp
testb $0x40, %cl
je 0xe0ab
movq (%r12), %rax
testb $0x3, 0x9(%rax)
cmovnel %ebp, %r13d
jmp 0xe0ab
testb $0x40, 0x18(%r12)
je 0xe0ab
movq 0x10(%r12), %rax
testb $0x3, 0x9(%rax)
je 0xe0ab
movl $0xb, 0x18(%r12)
jmp 0xe0ab
testb $0x40, %cl
je 0xe0ab
movq (%r12), %rsi
testb $0x3, 0x9(%rsi)
je 0xe0ab
movq %r14, %rdi
callq 0xc970
movl $0x1, 0x4(%rsp)
addq $0x28, %r12
cmpq %r15, %r12
jb 0xe038
movl $0x98, %edx
testl %r13d, %r13d
jne 0xe0ce
testl %ebp, %ebp
movl $0x88, %ecx
movl $0xa0, %edx
cmoveq %rcx, %rdx
movl 0x4(%rsp), %eax
movq (%r14,%rdx), %rcx
movq %rcx, 0x30(%rbx)
movq %rbx, (%r14,%rdx)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/bhk[P]tooltree/lua/../opensource/lua-5.2.3/src/lgc.c
// Function: iscleared
static int iscleared (global_State *g, const TValue *o) {
  if (!iscollectable(o)) return 0;
  else if (ttisstring(o)) {
    markobject(g, rawtsvalue(o));  /* strings are `values', so are never weak */
    return 0;
  }
  else return iswhite(gcvalue(o));
}

// Assembly:
pushq %rbx
movl 0x8(%rsi), %eax
xorl %ebx, %ebx
testb $0x40, %al
je 0xe11b
andl $0xf, %eax
movq (%rsi), %rsi
cmpl $0x4, %eax
jne 0xe114
testq %rsi, %rsi
je 0xe11b
testb $0x3, 0x9(%rsi)
je 0xe11b
callq 0xc970
jmp 0xe11b
movzbl 0x9(%rsi), %ebx
andl $0x3, %ebx
movl %ebx, %eax
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O3/bhk[P]tooltree/lua/../opensource/lua-5.2.3/src/linit.c
// Function: luaL_openlibs
LUALIB_API void luaL_openlibs (lua_State *L) {
  const luaL_Reg *lib;
  /* call open functions from 'loadedlibs' and set results to global table */
  for (lib = loadedlibs; lib->func; lib++) {
    luaL_requiref(L, lib->name, lib->func, 1);
    lua_pop(L, 1);  /* remove lib */
  }
  /* add open functions from 'preloadedlibs' into 'package.preload' table */
  luaL_getsubtable(L, LUA_REGISTRYINDEX, "_PRELOAD");
  for (lib = preloadedlibs; lib->func; lib++) {
    lua_pushcfunction(L, lib->func);
    lua_setfield(L, -2, lib->name);
  }
  lua_pop(L, 1);  /* remove _PRELOAD table */
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %rbx
leaq 0x1dcb9(%rip), %r14     # 0x2bfd0
leaq 0xc88a(%rip), %rdx      # 0x1aba8
movq (%r14), %rsi
movq 0x18(%r14), %r15
movq %rbx, %rdi
movl $0x1, %ecx
callq 0xa332
movq %rbx, %rdi
movl $0xfffffffe, %esi       # imm = 0xFFFFFFFE
callq 0x7688
addq $0x10, %r14
movq %r15, %rdx
testq %r15, %r15
jne 0xe31e
leaq 0x1270f(%rip), %rdx     # 0x20a61
movq %rbx, %rdi
movl $0xfff0b9d8, %esi       # imm = 0xFFF0B9D8
callq 0xa2b6
movq %rbx, %rdi
movl $0xfffffffe, %esi       # imm = 0xFFFFFFFE
popq %rbx
popq %r14
popq %r15
jmp 0x7688
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O3/bhk[P]tooltree/lua/../opensource/lua-5.2.3/src/liolib.c
// Function: io_popen
static int io_popen (lua_State *L) {
  const char *filename = luaL_checkstring(L, 1);
  const char *mode = luaL_optstring(L, 2, "r");
  LStream *p = newprefile(L);
  p->f = lua_popen(L, filename, mode);
  p->closef = &io_pclose;
  return (p->f == NULL) ? luaL_fileresult(L, 0, filename) : 1;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
movl $0x1, %esi
xorl %edx, %edx
callq 0x9690
movq %rax, %r14
leaq 0x12b66(%rip), %rdx     # 0x212a8
movq %rbx, %rdi
movl $0x2, %esi
xorl %ecx, %ecx
callq 0x9637
movq %rax, %r15
movl $0x10, %esi
movq %rbx, %rdi
callq 0x8b63
movq %rax, %r12
movq $0x0, 0x8(%rax)
leaq 0x12356(%rip), %rsi     # 0x20ac9
movq %rbx, %rdi
callq 0x949a
xorl %edi, %edi
callq 0x63c0
movq %r14, %rdi
movq %r15, %rsi
callq 0x64b0
movq %rax, (%r12)
leaq 0x868(%rip), %rcx       # 0xf000
movq %rcx, 0x8(%r12)
testq %rax, %rax
je 0xe7b3
movl $0x1, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
movq %rbx, %rdi
xorl %esi, %esi
movq %r14, %rdx
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
jmp 0x92f4
// File: /workspace/github_c_makefile_star2_O3/bhk[P]tooltree/lua/../opensource/lua-5.2.3/src/liolib.c
// Function: getiofile
static FILE *getiofile (lua_State *L, const char *findex) {
  LStream *p;
  lua_getfield(L, LUA_REGISTRYINDEX, findex);
  p = (LStream *)lua_touserdata(L, -1);
  if (isclosed(p))
    luaL_error(L, "standard %s file is closed", findex + strlen(IO_PREFIX));
  return p->f;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rsi, %rbx
movq %rdi, %r14
movl $0xfff0b9d8, %esi       # imm = 0xFFF0B9D8
movq %rbx, %rdx
callq 0x81c3
movq %r14, %rdi
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
callq 0x7dbd
movq %rax, %r15
cmpq $0x0, 0x8(%rax)
jne 0xe955
addq $0x4, %rbx
leaq 0x121a4(%rip), %rsi     # 0x20aec
movq %r14, %rdi
movq %rbx, %rdx
xorl %eax, %eax
callq 0x9144
movq (%r15), %rax
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/bhk[P]tooltree/lua/../opensource/lua-5.2.3/src/liolib.c
// Function: opencheck
static void opencheck (lua_State *L, const char *fname, const char *mode) {
  LStream *p = newfile(L);
  p->f = fopen(fname, mode);
  if (p->f == NULL)
    luaL_error(L, "cannot open file " LUA_QS " (%s)", fname, strerror(errno));
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %rdx, %r15
movq %rsi, %rbx
movq %rdi, %r14
movl $0x10, %esi
callq 0x8b63
movq %rax, %r12
xorl %r13d, %r13d
movq %r13, 0x8(%rax)
leaq 0x120c7(%rip), %rsi     # 0x20ac9
movq %r14, %rdi
callq 0x949a
movq %r13, (%r12)
leaq 0x4f(%rip), %rax        # 0xea64
movq %rax, 0x8(%r12)
movq %rbx, %rdi
movq %r15, %rsi
callq 0x6340
movq %rax, (%r12)
testq %rax, %rax
je 0xea38
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
callq 0x6080
movl (%rax), %edi
callq 0x6570
leaq 0x120bc(%rip), %rsi     # 0x20b07
movq %r14, %rdi
movq %rbx, %rdx
movq %rax, %rcx
xorl %eax, %eax
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
jmp 0x9144
// File: /workspace/github_c_makefile_star2_O3/bhk[P]tooltree/lua/../opensource/lua-5.2.3/src/liolib.c
// Function: aux_lines
static void aux_lines (lua_State *L, int toclose) {
  int i;
  int n = lua_gettop(L) - 1;  /* number of arguments to read */
  /* ensure that arguments will fit here and into 'io_readline' stack */
  luaL_argcheck(L, n <= LUA_MINSTACK - 3, LUA_MINSTACK - 3, "too many options");
  lua_pushvalue(L, 1);  /* file handle */
  lua_pushinteger(L, n);  /* number of arguments to read */
  lua_pushboolean(L, toclose);  /* close/not close file when finished */
  for (i = 1; i <= n; i++) lua_pushvalue(L, i + 1);  /* copy arguments */
  lua_pushcclosure(L, io_readline, 3 + n);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movl %esi, %ebp
movq %rdi, %rbx
callq 0x7674
movl %eax, %r14d
leal -0x1(%r14), %r15d
cmpl $0x13, %eax
jl 0xeac6
leaq 0x12069(%rip), %rdx     # 0x20b22
movq %rbx, %rdi
movl $0x11, %esi
callq 0x905e
movq %rbx, %rdi
movl $0x1, %esi
callq 0x7972
movslq %r15d, %rsi
movq %rbx, %rdi
callq 0x7e95
movq %rbx, %rdi
movl %ebp, %esi
callq 0x80e5
cmpl $0x2, %r14d
jl 0xeb18
movl %r14d, %r12d
negl %r12d
movl $0x2, %r15d
movq %rbx, %rdi
movl %r15d, %esi
callq 0x7972
leal (%r12,%r15), %eax
incl %eax
movl %r15d, %ecx
incl %ecx
movl %ecx, %r15d
cmpl $0x1, %eax
jne 0xeafa
addl $0x2, %r14d
leaq 0x13(%rip), %rsi        # 0xeb36
movq %rbx, %rdi
movl %r14d, %edx
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0x8061
// File: /workspace/github_c_makefile_star2_O3/bhk[P]tooltree/lua/../opensource/lua-5.2.3/src/liolib.c
// Function: io_readline
static int io_readline (lua_State *L) {
  LStream *p = (LStream *)lua_touserdata(L, lua_upvalueindex(1));
  int i;
  int n = (int)lua_tointeger(L, lua_upvalueindex(2));
  if (isclosed(p))  /* file is already closed? */
    return luaL_error(L, "file is already closed");
  lua_settop(L , 1);
  for (i = 1; i <= n; i++)  /* push arguments to 'g_read' */
    lua_pushvalue(L, lua_upvalueindex(3 + i));
  n = g_read(L, p->f, 2);  /* 'n' is number of results */
  lua_assert(n > 0);  /* should return at least a nil */
  if (!lua_isnil(L, -n))  /* read at least one value? */
    return n;  /* return them */
  else {  /* first result is nil: EOF or error */
    if (n > 1) {  /* is there error information? */
      /* 2nd result is error message */
      return luaL_error(L, "%s", lua_tostring(L, -n + 1));
    }
    if (lua_toboolean(L, lua_upvalueindex(3))) {  /* generator created file? */
      lua_settop(L, 0);
      lua_pushvalue(L, lua_upvalueindex(1));
      aux_close(L);  /* close it */
    }
    return 0;
  }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rdi, %rbx
movl $0xfff0b9d7, %esi       # imm = 0xFFF0B9D7
callq 0x7dbd
movq %rax, %r14
movq %rbx, %rdi
movl $0xfff0b9d6, %esi       # imm = 0xFFF0B9D6
xorl %edx, %edx
callq 0x7c2b
cmpq $0x0, 0x8(%r14)
je 0xebcc
movq %rax, %r15
movq %rbx, %rdi
movl $0x1, %esi
callq 0x7688
testl %r15d, %r15d
jle 0xeb9f
movl $0xfff0b9d4, %r12d      # imm = 0xFFF0B9D4
movq %rbx, %rdi
movl %r12d, %esi
callq 0x7972
leal (%r15,%r12), %eax
decl %eax
movl %r12d, %ecx
decl %ecx
movl %ecx, %r12d
cmpl $0xfff0b9d4, %eax       # imm = 0xFFF0B9D4
jne 0xeb7f
movq (%r14), %rsi
movq %rbx, %rdi
movl $0x2, %edx
callq 0xec6b
movl %eax, %ebp
movl %eax, %esi
negl %esi
movq %rbx, %rdi
callq 0x7992
testl %eax, %eax
je 0xebe5
movl %ebp, %eax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
leaq 0x11f60(%rip), %rsi     # 0x20b33
movq %rbx, %rdi
xorl %eax, %eax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0x9144
cmpl $0x2, %ebp
jl 0xec17
movl $0x1, %esi
subl %ebp, %esi
movq %rbx, %rdi
xorl %edx, %edx
callq 0x7cea
leaq 0x1231f(%rip), %rsi     # 0x20f21
movq %rbx, %rdi
movq %rax, %rdx
xorl %eax, %eax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0x9144
movq %rbx, %rdi
movl $0xfff0b9d5, %esi       # imm = 0xFFF0B9D5
callq 0x7cc4
xorl %ebp, %ebp
testl %eax, %eax
je 0xebc1
movq %rbx, %rdi
xorl %esi, %esi
callq 0x7688
movq %rbx, %rdi
movl $0xfff0b9d7, %esi       # imm = 0xFFF0B9D7
callq 0x7972
leaq 0x11e81(%rip), %rdx     # 0x20ac9
movq %rbx, %rdi
movl $0x1, %esi
callq 0x952c
movq 0x8(%rax), %rcx
movq $0x0, 0x8(%rax)
movq %rbx, %rdi
callq *%rcx
jmp 0xebc1
// File: /workspace/github_c_makefile_star2_O3/bhk[P]tooltree/lua/../opensource/lua-5.2.3/src/liolib.c
// Function: read_line
static int read_line (lua_State *L, FILE *f, int chop) {
  luaL_Buffer b;
  luaL_buffinit(L, &b);
  for (;;) {
    size_t l;
    char *p = luaL_prepbuffer(&b);
    if (fgets(p, LUAL_BUFFERSIZE, f) == NULL) {  /* eof? */
      luaL_pushresult(&b);  /* close buffer */
      return (lua_rawlen(L, -1) > 0);  /* check whether read something */
    }
    l = strlen(p);
    if (l == 0 || p[l-1] != '\n')
      luaL_addsize(&b, l);
    else {
      luaL_addsize(&b, l - chop);  /* chop 'eol' if needed */
      luaL_pushresult(&b);  /* close buffer */
      return 1;  /* read at least an `eol' */
    }
  }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x2020, %rsp           # imm = 0x2020
movl %edx, %ebp
movq %rsi, %r14
movq %rdi, %rbx
movq %rsp, %r15
movq %r15, %rsi
callq 0x9ad7
movl $0x2000, %esi           # imm = 0x2000
movq %r15, %rdi
callq 0x98f7
movq %rax, %r15
movq %rax, %rdi
movl $0x2000, %esi           # imm = 0x2000
movq %r14, %rdx
callq 0x62b0
testq %rax, %rax
je 0xefb8
movq %rsp, %r12
movq %r15, %rdi
callq 0x6170
testq %rax, %rax
je 0xef8e
cmpb $0xa, -0x1(%r15,%rax)
je 0xefda
addq %rax, 0x10(%rsp)
movl $0x2000, %esi           # imm = 0x2000
movq %r12, %rdi
callq 0x98f7
movq %rax, %r15
movq %rax, %rdi
movl $0x2000, %esi           # imm = 0x2000
movq %r14, %rdx
callq 0x62b0
testq %rax, %rax
jne 0xef79
movq %rsp, %rdi
callq 0x9a0c
movq %rbx, %rdi
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
callq 0x7d5d
movq %rax, %rcx
xorl %eax, %eax
testq %rcx, %rcx
setne %al
jmp 0xeff0
movl %ebp, %ecx
subq %rcx, %rax
movq %rsp, %rdi
addq %rax, 0x10(%rdi)
callq 0x9a0c
movl $0x1, %eax
addq $0x2020, %rsp           # imm = 0x2020
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/bhk[P]tooltree/lua/../opensource/lua-5.2.3/src/liolib.c
// Function: g_write
static int g_write (lua_State *L, FILE *f, int arg) {
  int nargs = lua_gettop(L) - arg;
  int status = 1;
  for (; nargs--; arg++) {
    if (lua_type(L, arg) == LUA_TNUMBER) {
      /* optimization: could be done exactly as for strings */
      status = status &&
          fprintf(f, LUA_NUMBER_FMT, lua_tonumber(L, arg)) > 0;
    }
    else {
      size_t l;
      const char *s = luaL_checklstring(L, arg, &l);
      status = status && (fwrite(s, sizeof(char), l, f) == l);
    }
  }
  if (status) return 1;  /* file handle already on stack top */
  else return luaL_fileresult(L, status, NULL);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %edx, %ebp
movq %rsi, %r14
movq %rdi, %rbx
callq 0x7674
movl %eax, %r15d
movl $0x1, %eax
cmpl %ebp, %r15d
je 0xf0fb
decl %r15d
movl $0x1, %r12d
movq %rsp, %r13
movq %rbx, %rdi
movl %ebp, %esi
callq 0x7992
cmpl $0x3, %eax
jne 0xf099
testl %r12d, %r12d
je 0xf0cc
movq %rbx, %rdi
movl %ebp, %esi
xorl %edx, %edx
callq 0x7be3
movq %r14, %rdi
leaq 0x11b09(%rip), %rsi     # 0x20b90
movb $0x1, %al
callq 0x6320
xorl %r12d, %r12d
testl %eax, %eax
setg %r12b
jmp 0xf0d9
movq %rbx, %rdi
movl %ebp, %esi
movq %r13, %rdx
callq 0x9690
testl %r12d, %r12d
je 0xf0d6
movq (%rsp), %rdx
movl $0x1, %esi
movq %rax, %rdi
movq %r14, %rcx
callq 0x6550
xorl %r12d, %r12d
cmpq (%rsp), %rax
sete %r12b
jmp 0xf0d9
xorl %r12d, %r12d
cmpl %ebp, %r15d
jne 0xf0de
jmp 0xf0ef
xorl %r12d, %r12d
cmpl %ebp, %r15d
je 0xf0e5
incl %ebp
jmp 0xf05d
movl $0x1, %eax
testl %r12d, %r12d
jne 0xf0fb
movq %rbx, %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x92f4
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/bhk[P]tooltree/lua/../opensource/lua-5.2.3/src/liolib.c
// Function: f_seek
static int f_seek (lua_State *L) {
  static const int mode[] = {SEEK_SET, SEEK_CUR, SEEK_END};
  static const char *const modenames[] = {"set", "cur", "end", NULL};
  FILE *f = tofile(L);
  int op = luaL_checkoption(L, 2, "cur", modenames);
  lua_Number p3 = luaL_optnumber(L, 3, 0);
  l_seeknum offset = (l_seeknum)p3;
  luaL_argcheck(L, (lua_Number)offset == p3, 3,
                  "not an integer in proper range");
  op = l_fseek(f, offset, mode[op]);
  if (op)
    return luaL_fileresult(L, 0, NULL);  /* error */
  else {
    lua_pushnumber(L, (lua_Number)l_ftell(f));
    return 1;
  }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
callq 0xe8d0
movq %rax, %r14
leaq 0x11a35(%rip), %rdx     # 0x20bb0
leaq 0x1d05e(%rip), %rcx     # 0x2c1e0
movq %rbx, %rdi
movl $0x2, %esi
callq 0x95a6
movl %eax, %ebp
xorpd %xmm0, %xmm0
movq %rbx, %rdi
movl $0x3, %esi
callq 0x97d6
cvttsd2si %xmm0, %r15
cvtsi2sd %r15, %xmm1
ucomisd %xmm1, %xmm0
jne 0xf1b4
jnp 0xf1c8
leaq 0x119fd(%rip), %rdx     # 0x20bb8
movq %rbx, %rdi
movl $0x3, %esi
callq 0x905e
movslq %ebp, %rax
leaq 0x11a42(%rip), %rcx     # 0x20c14
movl (%rcx,%rax,4), %edx
movq %r14, %rdi
movq %r15, %rsi
callq 0x6450
testl %eax, %eax
je 0xf1fa
movq %rbx, %rdi
xorl %esi, %esi
xorl %edx, %edx
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0x92f4
movq %r14, %rdi
callq 0x6280
xorps %xmm0, %xmm0
cvtsi2sd %rax, %xmm0
movq %rbx, %rdi
callq 0x7e80
movl $0x1, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/bhk[P]tooltree/lua/../opensource/lua-5.2.3/src/lmathlib.c
// Function: luaopen_math
LUAMOD_API int luaopen_math (lua_State *L) {
  luaL_newlib(L, mathlib);
  lua_pushnumber(L, PI);
  lua_setfield(L, -2, "pi");
  lua_pushnumber(L, HUGE_VAL);
  lua_setfield(L, -2, "huge");
  return 1;
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
xorl %esi, %esi
movl $0x1b, %edx
callq 0x82c4
leaq 0x1ce6d(%rip), %rsi     # 0x2c220
movq %rbx, %rdi
xorl %edx, %edx
callq 0xa163
movsd 0x1186b(%rip), %xmm0    # 0x20c30
movq %rbx, %rdi
callq 0x7e80
leaq 0x1189c(%rip), %rdx     # 0x20c70
movq %rbx, %rdi
movl $0xfffffffe, %esi       # imm = 0xFFFFFFFE
callq 0x844e
movsd 0x1184f(%rip), %xmm0    # 0x20c38
movq %rbx, %rdi
callq 0x7e80
leaq 0x1187b(%rip), %rdx     # 0x20c73
movq %rbx, %rdi
movl $0xfffffffe, %esi       # imm = 0xFFFFFFFE
callq 0x844e
movl $0x1, %eax
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O3/bhk[P]tooltree/lua/../opensource/lua-5.2.3/src/lmathlib.c
// Function: math_frexp
static int math_frexp (lua_State *L) {
  int e;
  lua_pushnumber(L, l_mathop(frexp)(luaL_checknumber(L, 1), &e));
  lua_pushinteger(L, e);
  return 2;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movl $0x1, %esi
callq 0x9787
leaq 0x4(%rsp), %r14
movq %r14, %rdi
callq 0x62c0
movq %rbx, %rdi
callq 0x7e80
movslq (%r14), %rsi
movq %rbx, %rdi
callq 0x7e95
movl $0x2, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O3/bhk[P]tooltree/lua/../opensource/lua-5.2.3/src/lmathlib.c
// Function: math_ldexp
static int math_ldexp (lua_State *L) {
  lua_Number x = luaL_checknumber(L, 1);
  int ep = luaL_checkint(L, 2);
  lua_pushnumber(L, l_mathop(ldexp)(x, ep));
  return 1;
}

// Assembly:
pushq %rbx
subq $0x10, %rsp
movq %rdi, %rbx
movl $0x1, %esi
callq 0x9787
movsd %xmm0, 0x8(%rsp)
movq %rbx, %rdi
movl $0x2, %esi
callq 0x980b
movsd 0x8(%rsp), %xmm0
movl %eax, %edi
callq 0x6090
movq %rbx, %rdi
callq 0x7e80
movl $0x1, %eax
addq $0x10, %rsp
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O3/bhk[P]tooltree/lua/../opensource/lua-5.2.3/src/lmathlib.c
// Function: math_log
static int math_log (lua_State *L) {
  lua_Number x = luaL_checknumber(L, 1);
  lua_Number res;
  if (lua_isnoneornil(L, 2))
    res = l_mathop(log)(x);
  else {
    lua_Number base = luaL_checknumber(L, 2);
    if (base == (lua_Number)10.0) res = l_mathop(log10)(x);
    else res = l_mathop(log)(x)/l_mathop(log)(base);
  }
  lua_pushnumber(L, res);
  return 1;
}

// Assembly:
pushq %rbx
subq $0x10, %rsp
movq %rdi, %rbx
movl $0x1, %esi
callq 0x9787
movsd %xmm0, (%rsp)
movq %rbx, %rdi
movl $0x2, %esi
callq 0x7992
testl %eax, %eax
jle 0xf6c1
movq %rbx, %rdi
movl $0x2, %esi
callq 0x9787
ucomisd 0x11597(%rip), %xmm0    # 0x20c48
jne 0xf6cd
jp 0xf6cd
movsd (%rsp), %xmm0
callq 0x6310
jmp 0xf6fa
movsd (%rsp), %xmm0
callq 0x6220
jmp 0xf6fa
movsd %xmm0, 0x8(%rsp)
movsd (%rsp), %xmm0
callq 0x6220
movsd %xmm0, (%rsp)
movsd 0x8(%rsp), %xmm0
callq 0x6220
movsd (%rsp), %xmm1
divsd %xmm0, %xmm1
movapd %xmm1, %xmm0
movq %rbx, %rdi
callq 0x7e80
movl $0x1, %eax
addq $0x10, %rsp
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O3/bhk[P]tooltree/lua/../opensource/lua-5.2.3/src/lmathlib.c
// Function: math_max
static int math_max (lua_State *L) {
  int n = lua_gettop(L);  /* number of arguments */
  lua_Number dmax = luaL_checknumber(L, 1);
  int i;
  for (i=2; i<=n; i++) {
    lua_Number d = luaL_checknumber(L, i);
    if (d > dmax)
      dmax = d;
  }
  lua_pushnumber(L, dmax);
  return 1;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq %rdi, %rbx
callq 0x7674
movl %eax, %r14d
movq %rbx, %rdi
movl $0x1, %esi
callq 0x9787
movapd %xmm0, %xmm1
cmpl $0x2, %r14d
jge 0xf73e
movapd %xmm1, %xmm0
jmp 0xf775
negl %r14d
movl $0x2, %r15d
movsd %xmm1, 0x8(%rsp)
movq %rbx, %rdi
movl %r15d, %esi
callq 0x9787
maxsd 0x8(%rsp), %xmm0
leal (%r14,%r15), %eax
incl %eax
movl %r15d, %ecx
incl %ecx
movapd %xmm0, %xmm1
movl %ecx, %r15d
cmpl $0x1, %eax
jne 0xf747
movq %rbx, %rdi
callq 0x7e80
movl $0x1, %eax
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/bhk[P]tooltree/lua/../opensource/lua-5.2.3/src/lmathlib.c
// Function: math_min
static int math_min (lua_State *L) {
  int n = lua_gettop(L);  /* number of arguments */
  lua_Number dmin = luaL_checknumber(L, 1);
  int i;
  for (i=2; i<=n; i++) {
    lua_Number d = luaL_checknumber(L, i);
    if (d < dmin)
      dmin = d;
  }
  lua_pushnumber(L, dmin);
  return 1;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq %rdi, %rbx
callq 0x7674
movl %eax, %r14d
movq %rbx, %rdi
movl $0x1, %esi
callq 0x9787
movapd %xmm0, %xmm1
cmpl $0x2, %r14d
jge 0xf7bd
movapd %xmm1, %xmm0
jmp 0xf7f4
negl %r14d
movl $0x2, %r15d
movsd %xmm1, 0x8(%rsp)
movq %rbx, %rdi
movl %r15d, %esi
callq 0x9787
minsd 0x8(%rsp), %xmm0
leal (%r14,%r15), %eax
incl %eax
movl %r15d, %ecx
incl %ecx
movapd %xmm0, %xmm1
movl %ecx, %r15d
cmpl $0x1, %eax
jne 0xf7c6
movq %rbx, %rdi
callq 0x7e80
movl $0x1, %eax
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/bhk[P]tooltree/lua/../opensource/lua-5.2.3/src/lmathlib.c
// Function: math_modf
static int math_modf (lua_State *L) {
  lua_Number ip;
  lua_Number fp = l_mathop(modf)(luaL_checknumber(L, 1), &ip);
  lua_pushnumber(L, ip);
  lua_pushnumber(L, fp);
  return 2;
}

// Assembly:
pushq %r14
pushq %rbx
subq $0x18, %rsp
movq %rdi, %rbx
movl $0x1, %esi
callq 0x9787
leaq 0x10(%rsp), %r14
movq %r14, %rdi
callq 0x61c0
movsd %xmm0, 0x8(%rsp)
movsd (%r14), %xmm0
movq %rbx, %rdi
callq 0x7e80
movq %rbx, %rdi
movsd 0x8(%rsp), %xmm0
callq 0x7e80
movl $0x2, %eax
addq $0x18, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O3/bhk[P]tooltree/lua/../opensource/lua-5.2.3/src/lmathlib.c
// Function: math_pow
static int math_pow (lua_State *L) {
  lua_Number x = luaL_checknumber(L, 1);
  lua_Number y = luaL_checknumber(L, 2);
  lua_pushnumber(L, l_mathop(pow)(x, y));
  return 1;
}

// Assembly:
pushq %rbx
subq $0x10, %rsp
movq %rdi, %rbx
movl $0x1, %esi
callq 0x9787
movsd %xmm0, 0x8(%rsp)
movq %rbx, %rdi
movl $0x2, %esi
callq 0x9787
movaps %xmm0, %xmm1
movsd 0x8(%rsp), %xmm0
callq 0x6140
movq %rbx, %rdi
callq 0x7e80
movl $0x1, %eax
addq $0x10, %rsp
popq %rbx
retq