LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O3/tylerneylon[P]APIsWithLua/lua/lapi.c
// Function: lua_arith
LUA_API void lua_arith (lua_State *L, int op) {
  lua_lock(L);
  if (op != LUA_OPUNM && op != LUA_OPBNOT)
    api_checknelems(L, 2);  /* all other operations expect two operands */
  else {  /* for unary operations, add fake 2nd operand */
    api_checknelems(L, 1);
    setobjs2s(L, L->top, L->top - 1);
    api_incr_top(L);
  }
  /* first operand at top - 2, second at top - 1; result go to top - 2 */
  luaO_arith(L, op, L->top - 2, L->top - 1, L->top - 2);
  L->top--;  /* remove second operand */
  lua_unlock(L);
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
leal -0xe(%rsi), %eax
movq 0x10(%rdi), %rcx
cmpl $-0x2, %eax
jb 0x61b6
movups -0x10(%rcx), %xmm0
movups %xmm0, (%rcx)
movq 0x10(%rbx), %rcx
addq $0x10, %rcx
movq %rcx, 0x10(%rbx)
leaq -0x20(%rcx), %rdx
addq $-0x10, %rcx
movq %rbx, %rdi
movq %rdx, %r8
callq 0xb9c1
addq $-0x10, 0x10(%rbx)
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O3/tylerneylon[P]APIsWithLua/lua/lapi.c
// Function: lua_compare
LUA_API int lua_compare (lua_State *L, int index1, int index2, int op) {
  StkId o1, o2;
  int i = 0;
  lua_lock(L);  /* may call tag method */
  o1 = index2addr(L, index1);
  o2 = index2addr(L, index2);
  if (isvalid(o1) && isvalid(o2)) {
    switch (op) {
      case LUA_OPEQ: i = luaV_equalobj(L, o1, o2); break;
      case LUA_OPLT: i = luaV_lessthan(L, o1, o2); break;
      case LUA_OPLE: i = luaV_lessequal(L, o1, o2); break;
      default: api_check(L, 0, "invalid option");
    }
  }
  lua_unlock(L);
  return i;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movl %ecx, %ebp
movl %edx, %r15d
movq %rdi, %rbx
callq 0x5f8d
movq %rax, %r14
movq %rbx, %rdi
movl %r15d, %esi
callq 0x5f8d
leaq 0x1c457(%rip), %rcx     # 0x22650
cmpq %rcx, %r14
setne %dl
cmpq %rcx, %rax
setne %cl
andb %dl, %cl
cmpb $0x1, %cl
jne 0x6232
cmpl $0x2, %ebp
je 0x6257
cmpl $0x1, %ebp
je 0x623f
testl %ebp, %ebp
jne 0x6232
movq %rbx, %rdi
movq %r14, %rsi
movq %rax, %rdx
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0x11deb
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movq %rbx, %rdi
movq %r14, %rsi
movq %rax, %rdx
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0x11a66
movq %rbx, %rdi
movq %r14, %rsi
movq %rax, %rdx
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0x11c4c
// File: /workspace/github_c_makefile_star2_O3/tylerneylon[P]APIsWithLua/lua/lapi.c
// Function: lua_stringtonumber
LUA_API size_t lua_stringtonumber (lua_State *L, const char *s) {
  size_t sz = luaO_str2num(s, L->top);
  if (sz != 0)
    api_incr_top(L);
  return sz;
}

// Assembly:
pushq %rbx
movq %rsi, %rax
movq %rdi, %rbx
movq 0x10(%rdi), %rsi
movq %rax, %rdi
callq 0xbcb7
testq %rax, %rax
je 0x628c
addq $0x10, 0x10(%rbx)
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O3/tylerneylon[P]APIsWithLua/lua/lapi.c
// Function: lua_tonumberx
LUA_API lua_Number lua_tonumberx (lua_State *L, int idx, int *pisnum) {
  lua_Number n;
  const TValue *o = index2addr(L, idx);
  int isnum = tonumber(o, &n);
  if (!isnum)
    n = 0;  /* call to 'tonumber' may change 'n' even if it fails */
  if (pisnum) *pisnum = isnum;
  return n;
}

// Assembly:
pushq %rbx
subq $0x10, %rsp
movq %rdx, %rbx
callq 0x5f8d
cmpl $0x3, 0x8(%rax)
jne 0x62b2
movsd (%rax), %xmm0
movsd %xmm0, 0x8(%rsp)
movl $0x1, %eax
jmp 0x62ce
leaq 0x8(%rsp), %rsi
movq %rax, %rdi
callq 0x11634
testl %eax, %eax
jne 0x62ce
movq $0x0, 0x8(%rsp)
xorl %eax, %eax
testq %rbx, %rbx
je 0x62d5
movl %eax, (%rbx)
movsd 0x8(%rsp), %xmm0
addq $0x10, %rsp
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O3/tylerneylon[P]APIsWithLua/lua/lapi.c
// Function: lua_tointegerx
LUA_API lua_Integer lua_tointegerx (lua_State *L, int idx, int *pisnum) {
  lua_Integer res;
  const TValue *o = index2addr(L, idx);
  int isnum = tointeger(o, &res);
  if (!isnum)
    res = 0;  /* call to 'tointeger' may change 'n' even if it fails */
  if (pisnum) *pisnum = isnum;
  return res;
}

// Assembly:
pushq %rbx
subq $0x10, %rsp
movq %rdx, %rbx
callq 0x5f8d
cmpl $0x13, 0x8(%rax)
jne 0x6303
movq (%rax), %rax
movq %rax, 0x8(%rsp)
movl $0x1, %eax
jmp 0x6321
leaq 0x8(%rsp), %rsi
movq %rax, %rdi
xorl %edx, %edx
callq 0x116b2
testl %eax, %eax
jne 0x6321
movq $0x0, 0x8(%rsp)
xorl %eax, %eax
testq %rbx, %rbx
je 0x6328
movl %eax, (%rbx)
movq 0x8(%rsp), %rax
addq $0x10, %rsp
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O3/tylerneylon[P]APIsWithLua/lua/lapi.c
// Function: lua_tolstring
LUA_API const char *lua_tolstring (lua_State *L, int idx, size_t *len) {
  StkId o = index2addr(L, idx);
  if (!ttisstring(o)) {
    if (!cvt2str(o)) {  /* not convertible? */
      if (len != NULL) *len = 0;
      return NULL;
    }
    lua_lock(L);  /* 'luaO_tostring' may create a new string */
    luaO_tostring(L, o);
    luaC_checkGC(L);
    o = index2addr(L, idx);  /* previous call may reallocate the stack */
    lua_unlock(L);
  }
  if (len != NULL)
    *len = vslen(o);
  return svalue(o);
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movq %rdx, %rbx
movl %esi, %ebp
movq %rdi, %r14
callq 0x5f8d
movl 0x8(%rax), %ecx
andl $0xf, %ecx
cmpl $0x3, %ecx
je 0x638a
cmpl $0x4, %ecx
je 0x63b2
testq %rbx, %rbx
je 0x6386
movq $0x0, (%rbx)
xorl %eax, %eax
jmp 0x63d4
movq %r14, %rdi
movq %rax, %rsi
callq 0xbf1c
movq 0x18(%r14), %rax
cmpq $0x0, 0x18(%rax)
jle 0x63a8
movq %r14, %rdi
callq 0xa9cc
movq %r14, %rdi
movl %ebp, %esi
callq 0x5f8d
testq %rbx, %rbx
je 0x63cd
movq (%rax), %rcx
cmpb $0x4, 0x8(%rcx)
jne 0x63c6
movzbl 0xb(%rcx), %ecx
jmp 0x63ca
movq 0x10(%rcx), %rcx
movq %rcx, (%rbx)
movq (%rax), %rax
addq $0x18, %rax
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/tylerneylon[P]APIsWithLua/lua/lapi.c
// Function: lua_rawlen
LUA_API size_t lua_rawlen (lua_State *L, int idx) {
  StkId o = index2addr(L, idx);
  switch (ttype(o)) {
    case LUA_TSHRSTR: return tsvalue(o)->shrlen;
    case LUA_TLNGSTR: return tsvalue(o)->u.lnglen;
    case LUA_TUSERDATA: return uvalue(o)->len;
    case LUA_TTABLE: return luaH_getn(hvalue(o));
    default: return 0;
  }
}

// Assembly:
pushq %rax
callq 0x5f8d
movq %rax, %rcx
movl 0x8(%rax), %edx
andl $0x3f, %edx
xorl %eax, %eax
cmpl $0x6, %edx
jg 0x6405
cmpl $0x4, %edx
je 0x6418
cmpl $0x5, %edx
jne 0x6428
movq (%rcx), %rdi
callq 0x107a2
cltq
jmp 0x6428
cmpl $0x7, %edx
je 0x6421
cmpl $0x14, %edx
jne 0x6428
movq (%rcx), %rax
movq 0x10(%rax), %rax
jmp 0x6428
movq (%rcx), %rax
movzbl 0xb(%rax), %eax
jmp 0x6428
movq (%rcx), %rax
movq 0x18(%rax), %rax
popq %rcx
retq
// File: /workspace/github_c_makefile_star2_O3/tylerneylon[P]APIsWithLua/lua/lapi.c
// Function: lua_tocfunction
LUA_API lua_CFunction lua_tocfunction (lua_State *L, int idx) {
  StkId o = index2addr(L, idx);
  if (ttislcf(o)) return fvalue(o);
  else if (ttisCclosure(o))
    return clCvalue(o)->f;
  else return NULL;  /* not a C function */
}

// Assembly:
pushq %rax
callq 0x5f8d
movl 0x8(%rax), %ecx
cmpl $0x16, %ecx
je 0x6444
cmpl $0x66, %ecx
jne 0x6449
movq (%rax), %rax
addq $0x18, %rax
movq (%rax), %rax
jmp 0x644b
xorl %eax, %eax
popq %rcx
retq
// File: /workspace/github_c_makefile_star2_O3/tylerneylon[P]APIsWithLua/lua/lapi.c
// Function: lua_touserdata
LUA_API void *lua_touserdata (lua_State *L, int idx) {
  StkId o = index2addr(L, idx);
  switch (ttnov(o)) {
    case LUA_TUSERDATA: return getudatamem(uvalue(o));
    case LUA_TLIGHTUSERDATA: return pvalue(o);
    default: return NULL;
  }
}

// Assembly:
pushq %rax
callq 0x5f8d
movl 0x8(%rax), %ecx
andl $0xf, %ecx
cmpl $0x2, %ecx
je 0x646c
cmpl $0x7, %ecx
jne 0x6471
movq (%rax), %rax
addq $0x28, %rax
jmp 0x6473
movq (%rax), %rax
jmp 0x6473
xorl %eax, %eax
popq %rcx
retq
// File: /workspace/github_c_makefile_star2_O3/tylerneylon[P]APIsWithLua/lua/lapi.c
// Function: lua_topointer
LUA_API const void *lua_topointer (lua_State *L, int idx) {
  StkId o = index2addr(L, idx);
  switch (ttype(o)) {
    case LUA_TTABLE: return hvalue(o);
    case LUA_TLCL: return clLvalue(o);
    case LUA_TCCL: return clCvalue(o);
    case LUA_TLCF: return cast(void *, cast(size_t, fvalue(o)));
    case LUA_TTHREAD: return thvalue(o);
    case LUA_TUSERDATA: return getudatamem(uvalue(o));
    case LUA_TLIGHTUSERDATA: return pvalue(o);
    default: return NULL;
  }
}

// Assembly:
pushq %rax
callq 0x5f8d
movq %rax, %rcx
movl 0x8(%rax), %edx
andl $0x3f, %edx
xorl %eax, %eax
leal -0x2(%rdx), %esi
cmpl $0x6, %esi
ja 0x64b8
leaq 0x1bc66(%rip), %rdx     # 0x22110
movslq (%rdx,%rsi,4), %rsi
addq %rdx, %rsi
jmpq *%rsi
movq (%rcx), %rax
popq %rcx
retq
cmpl $0x16, %edx
je 0x64b3
cmpl $0x26, %edx
je 0x64b3
jmp 0x64b6
movq (%rcx), %rax
addq $0x28, %rax
jmp 0x64b6
// File: /workspace/github_c_makefile_star2_O3/tylerneylon[P]APIsWithLua/lua/lapi.c
// Function: lua_pushlstring
LUA_API const char *lua_pushlstring (lua_State *L, const char *s, size_t len) {
  TString *ts;
  lua_lock(L);
  ts = (len == 0) ? luaS_new(L, "") : luaS_newlstr(L, s, len);
  setsvalue2s(L, L->top, ts);
  api_incr_top(L);
  luaC_checkGC(L);
  lua_unlock(L);
  return getstr(ts);
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
testq %rdx, %rdx
je 0x6520
movq %rbx, %rdi
callq 0xf828
jmp 0x652f
leaq 0x1e861(%rip), %rsi     # 0x24d88
movq %rbx, %rdi
callq 0xfa60
movq %rax, %r14
movq 0x10(%rbx), %rax
movq %r14, (%rax)
movzbl 0x8(%r14), %ecx
orl $0x40, %ecx
movl %ecx, 0x8(%rax)
addq $0x10, 0x10(%rbx)
movq 0x18(%rbx), %rax
cmpq $0x0, 0x18(%rax)
jle 0x655c
movq %rbx, %rdi
callq 0xa9cc
addq $0x18, %r14
movq %r14, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O3/tylerneylon[P]APIsWithLua/lua/lapi.c
// Function: lua_pushstring
LUA_API const char *lua_pushstring (lua_State *L, const char *s) {
  lua_lock(L);
  if (s == NULL)
    setnilvalue(L->top);
  else {
    TString *ts;
    ts = luaS_new(L, s);
    setsvalue2s(L, L->top, ts);
    s = getstr(ts);  /* internal copy's address */
  }
  api_incr_top(L);
  luaC_checkGC(L);
  lua_unlock(L);
  return s;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
testq %rsi, %rsi
je 0x659e
movq %rbx, %rdi
callq 0xfa60
movq %rax, %r14
movq 0x10(%rbx), %rax
movq %r14, (%rax)
movzbl 0x8(%r14), %ecx
orl $0x40, %ecx
movl %ecx, 0x8(%rax)
addq $0x18, %r14
movq 0x10(%rbx), %rax
jmp 0x65ac
movq 0x10(%rbx), %rax
movl $0x0, 0x8(%rax)
xorl %r14d, %r14d
addq $0x10, %rax
movq %rax, 0x10(%rbx)
movq 0x18(%rbx), %rax
cmpq $0x0, 0x18(%rax)
jle 0x65c7
movq %rbx, %rdi
callq 0xa9cc
movq %r14, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O3/tylerneylon[P]APIsWithLua/lua/lapi.c
// Function: lua_pushvfstring
LUA_API const char *lua_pushvfstring (lua_State *L, const char *fmt,
                                      va_list argp) {
  const char *ret;
  lua_lock(L);
  ret = luaO_pushvfstring(L, fmt, argp);
  luaC_checkGC(L);
  lua_unlock(L);
  return ret;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
callq 0xbfc5
movq %rax, %r14
movq 0x18(%rbx), %rax
cmpq $0x0, 0x18(%rax)
jle 0x65f4
movq %rbx, %rdi
callq 0xa9cc
movq %r14, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O3/tylerneylon[P]APIsWithLua/lua/lapi.c
// Function: lua_pushfstring
LUA_API const char *lua_pushfstring (lua_State *L, const char *fmt, ...) {
  const char *ret;
  va_list argp;
  lua_lock(L);
  va_start(argp, fmt);
  ret = luaO_pushvfstring(L, fmt, argp);
  va_end(argp);
  luaC_checkGC(L);
  lua_unlock(L);
  return ret;
}

// Assembly:
pushq %r14
pushq %rbx
subq $0xd8, %rsp
movq %rdi, %rbx
leaq 0x20(%rsp), %rdi
movq %rdx, 0x10(%rdi)
movq %rcx, 0x18(%rdi)
movq %r8, 0x20(%rdi)
movq %r9, 0x28(%rdi)
testb %al, %al
je 0x665c
movaps %xmm0, 0x50(%rsp)
movaps %xmm1, 0x60(%rsp)
movaps %xmm2, 0x70(%rsp)
movaps %xmm3, 0x80(%rsp)
movaps %xmm4, 0x90(%rsp)
movaps %xmm5, 0xa0(%rsp)
movaps %xmm6, 0xb0(%rsp)
movaps %xmm7, 0xc0(%rsp)
movq %rsp, %rdx
movq %rdi, 0x10(%rdx)
leaq 0xf0(%rsp), %rax
movq %rax, 0x8(%rdx)
movabsq $0x3000000010, %rax     # imm = 0x3000000010
movq %rax, (%rdx)
movq %rbx, %rdi
callq 0xbfc5
movq %rax, %r14
movq 0x18(%rbx), %rax
cmpq $0x0, 0x18(%rax)
jle 0x669a
movq %rbx, %rdi
callq 0xa9cc
movq %r14, %rax
addq $0xd8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O3/tylerneylon[P]APIsWithLua/lua/lapi.c
// Function: lua_pushcclosure
LUA_API void lua_pushcclosure (lua_State *L, lua_CFunction fn, int n) {
  lua_lock(L);
  if (n == 0) {
    setfvalue(L->top, fn);
  }
  else {
    CClosure *cl;
    api_checknelems(L, n);
    api_check(L, n <= MAXUPVAL, "upvalue index too large");
    cl = luaF_newCclosure(L, n);
    cl->f = fn;
    L->top -= n;
    while (n--) {
      setobj2n(L, &cl->upvalue[n], L->top + n);
      /* does not need barrier because closure is white */
    }
    setclCvalue(L, L->top, cl);
  }
  api_incr_top(L);
  luaC_checkGC(L);
  lua_unlock(L);
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movq %rsi, %r14
movq %rdi, %rbx
testl %edx, %edx
je 0x66f5
movl %edx, %ebp
movq %rbx, %rdi
movl %edx, %esi
callq 0x9e5c
movq %r14, 0x18(%rax)
movslq %ebp, %rcx
movq %rcx, %rdx
shlq $0x4, %rdx
subq %rdx, 0x10(%rbx)
movq 0x10(%rbx), %rsi
movups -0x10(%rsi,%rdx), %xmm0
movups %xmm0, 0x10(%rax,%rdx)
addq $-0x10, %rdx
decq %rcx
jne 0x66d4
movl $0x66, %ecx
movq %rax, %r14
jmp 0x66fa
movl $0x16, %ecx
movq 0x10(%rbx), %rax
movq %r14, (%rax)
movl %ecx, 0x8(%rax)
addq $0x10, 0x10(%rbx)
movq 0x18(%rbx), %rax
cmpq $0x0, 0x18(%rax)
jle 0x6720
movq %rbx, %rdi
popq %rbx
popq %r14
popq %rbp
jmp 0xa9cc
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/tylerneylon[P]APIsWithLua/lua/lapi.c
// Function: auxgetstr
static int auxgetstr (lua_State *L, const TValue *t, const char *k) {
  const TValue *slot;
  TString *str = luaS_new(L, k);
  if (luaV_fastget(L, t, str, slot, luaH_getstr)) {
    setobj2s(L, L->top, slot);
    api_incr_top(L);
  }
  else {
    setsvalue2s(L, L->top, str);
    api_incr_top(L);
    luaV_finishget(L, t, L->top - 1, L->top - 1, slot);
  }
  lua_unlock(L);
  return ttnov(L->top - 1);
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rsi, %r14
movq %rdi, %rbx
movq %rdx, %rsi
callq 0xfa60
movq %rax, %r15
cmpl $0x45, 0x8(%r14)
jne 0x67ef
movq (%r14), %rdi
movq %r15, %rsi
callq 0x1063d
movq %rax, %r8
cmpl $0x0, 0x8(%rax)
je 0x67f2
movq 0x10(%rbx), %rax
movups (%r8), %xmm0
movups %xmm0, (%rax)
movq 0x10(%rbx), %rax
addq $0x10, %rax
movq %rax, 0x10(%rbx)
jmp 0x6822
xorl %r8d, %r8d
movq 0x10(%rbx), %rax
movq %r15, (%rax)
movzbl 0x8(%r15), %ecx
orl $0x40, %ecx
movl %ecx, 0x8(%rax)
movq 0x10(%rbx), %rcx
leaq 0x10(%rcx), %rax
movq %rax, 0x10(%rbx)
movq %rbx, %rdi
movq %r14, %rsi
movq %rcx, %rdx
callq 0x117ac
movq 0x10(%rbx), %rax
movl -0x8(%rax), %eax
andl $0xf, %eax
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/tylerneylon[P]APIsWithLua/lua/lapi.c
// Function: lua_gettable
LUA_API int lua_gettable (lua_State *L, int idx) {
  StkId t;
  lua_lock(L);
  t = index2addr(L, idx);
  luaV_gettable(L, t, L->top - 1, L->top - 1);
  lua_unlock(L);
  return ttnov(L->top - 1);
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
callq 0x5f8d
movq %rax, %r14
cmpl $0x45, 0x8(%rax)
jne 0x686a
movq (%r14), %rdi
movq 0x10(%rbx), %rsi
addq $-0x10, %rsi
callq 0x106ef
movq %rax, %r8
cmpl $0x0, 0x8(%rax)
je 0x686d
movq 0x10(%rbx), %rax
movups (%r8), %xmm0
movups %xmm0, -0x10(%rax)
jmp 0x6883
xorl %r8d, %r8d
movq 0x10(%rbx), %rcx
addq $-0x10, %rcx
movq %rbx, %rdi
movq %r14, %rsi
movq %rcx, %rdx
callq 0x117ac
movq 0x10(%rbx), %rax
movl -0x8(%rax), %eax
andl $0xf, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O3/tylerneylon[P]APIsWithLua/lua/lapi.c
// Function: lua_geti
LUA_API int lua_geti (lua_State *L, int idx, lua_Integer n) {
  StkId t;
  const TValue *slot;
  lua_lock(L);
  t = index2addr(L, idx);
  if (luaV_fastget(L, t, n, slot, luaH_getint)) {
    setobj2s(L, L->top, slot);
    api_incr_top(L);
  }
  else {
    setivalue(L->top, n);
    api_incr_top(L);
    luaV_finishget(L, t, L->top - 1, L->top - 1, slot);
  }
  lua_unlock(L);
  return ttnov(L->top - 1);
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdx, %r14
movq %rdi, %rbx
callq 0x5f8d
movq %rax, %r15
cmpl $0x45, 0x8(%rax)
jne 0x68ff
movq (%r15), %rdi
movq %r14, %rsi
callq 0x105a5
movq %rax, %r8
cmpl $0x0, 0x8(%rax)
je 0x6902
movq 0x10(%rbx), %rax
movups (%r8), %xmm0
movups %xmm0, (%rax)
movq 0x10(%rbx), %rax
addq $0x10, %rax
movq %rax, 0x10(%rbx)
jmp 0x692e
xorl %r8d, %r8d
movq 0x10(%rbx), %rax
movq %r14, (%rax)
movl $0x13, 0x8(%rax)
movq 0x10(%rbx), %rcx
leaq 0x10(%rcx), %rax
movq %rax, 0x10(%rbx)
movq %rbx, %rdi
movq %r15, %rsi
movq %rcx, %rdx
callq 0x117ac
movq 0x10(%rbx), %rax
movl -0x8(%rax), %eax
andl $0xf, %eax
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/tylerneylon[P]APIsWithLua/lua/lapi.c
// Function: lua_rawget
LUA_API int lua_rawget (lua_State *L, int idx) {
  StkId t;
  lua_lock(L);
  t = index2addr(L, idx);
  api_check(L, ttistable(t), "table expected");
  setobj2s(L, L->top - 1, luaH_get(hvalue(t), L->top - 1));
  lua_unlock(L);
  return ttnov(L->top - 1);
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
callq 0x5f8d
movq 0x10(%rbx), %r14
leaq -0x10(%r14), %rsi
movq (%rax), %rdi
callq 0x106ef
movups (%rax), %xmm0
movups %xmm0, -0x10(%r14)
movq 0x10(%rbx), %rax
movl -0x8(%rax), %eax
andl $0xf, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O3/tylerneylon[P]APIsWithLua/lua/lapi.c
// Function: lua_rawgeti
LUA_API int lua_rawgeti (lua_State *L, int idx, lua_Integer n) {
  StkId t;
  lua_lock(L);
  t = index2addr(L, idx);
  api_check(L, ttistable(t), "table expected");
  setobj2s(L, L->top, luaH_getint(hvalue(t), n));
  api_incr_top(L);
  lua_unlock(L);
  return ttnov(L->top - 1);
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdx, %rbx
movq %rdi, %r14
callq 0x5f8d
movq 0x10(%r14), %r15
movq (%rax), %rdi
movq %rbx, %rsi
callq 0x105a5
movups (%rax), %xmm0
movups %xmm0, (%r15)
movq 0x10(%r14), %rax
leaq 0x10(%rax), %rcx
movq %rcx, 0x10(%r14)
movl 0x8(%rax), %eax
andl $0xf, %eax
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/tylerneylon[P]APIsWithLua/lua/lapi.c
// Function: lua_rawgetp
LUA_API int lua_rawgetp (lua_State *L, int idx, const void *p) {
  StkId t;
  TValue k;
  lua_lock(L);
  t = index2addr(L, idx);
  api_check(L, ttistable(t), "table expected");
  setpvalue(&k, cast(void *, p));
  setobj2s(L, L->top, luaH_get(hvalue(t), &k));
  api_incr_top(L);
  lua_unlock(L);
  return ttnov(L->top - 1);
}

// Assembly:
pushq %r14
pushq %rbx
subq $0x18, %rsp
movq %rdx, %rbx
movq %rdi, %r14
callq 0x5f8d
leaq 0x8(%rsp), %rsi
movq %rbx, (%rsi)
movl $0x2, 0x8(%rsi)
movq 0x10(%r14), %rbx
movq (%rax), %rdi
callq 0x106ef
movups (%rax), %xmm0
movups %xmm0, (%rbx)
movq 0x10(%r14), %rax
leaq 0x10(%rax), %rcx
movq %rcx, 0x10(%r14)
movl 0x8(%rax), %eax
andl $0xf, %eax
addq $0x18, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O3/tylerneylon[P]APIsWithLua/lua/lapi.c
// Function: lua_createtable
LUA_API void lua_createtable (lua_State *L, int narray, int nrec) {
  Table *t;
  lua_lock(L);
  t = luaH_new(L);
  sethvalue(L, L->top, t);
  api_incr_top(L);
  if (narray > 0 || nrec > 0)
    luaH_resize(L, t, narray, nrec);
  luaC_checkGC(L);
  lua_unlock(L);
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movl %edx, %ebp
movl %esi, %r14d
movq %rdi, %rbx
callq 0x100ba
movq 0x10(%rbx), %rcx
movq %rax, (%rcx)
movl $0x45, 0x8(%rcx)
addq $0x10, 0x10(%rbx)
testl %r14d, %r14d
setle %cl
testl %ebp, %ebp
setle %dl
testb %dl, %cl
jne 0x6a3e
movq %rbx, %rdi
movq %rax, %rsi
movl %r14d, %edx
movl %ebp, %ecx
callq 0xfcc2
movq 0x18(%rbx), %rax
cmpq $0x0, 0x18(%rax)
jle 0x6a55
movq %rbx, %rdi
popq %rbx
popq %r14
popq %rbp
jmp 0xa9cc
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/tylerneylon[P]APIsWithLua/lua/lapi.c
// Function: lua_getmetatable
LUA_API int lua_getmetatable (lua_State *L, int objindex) {
  const TValue *obj;
  Table *mt;
  int res = 0;
  lua_lock(L);
  obj = index2addr(L, objindex);
  switch (ttnov(obj)) {
    case LUA_TTABLE:
      mt = hvalue(obj)->metatable;
      break;
    case LUA_TUSERDATA:
      mt = uvalue(obj)->metatable;
      break;
    default:
      mt = G(L)->mt[ttnov(obj)];
      break;
  }
  if (mt != NULL) {
    sethvalue(L, L->top, mt);
    api_incr_top(L);
    res = 1;
  }
  lua_unlock(L);
  return res;
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
callq 0x5f8d
movl 0x8(%rax), %ecx
andl $0xf, %ecx
cmpq $0x7, %rcx
je 0x6a7d
cmpl $0x5, %ecx
jne 0x6a86
movq (%rax), %rax
addq $0x28, %rax
jmp 0x6a94
movq (%rax), %rax
addq $0x10, %rax
jmp 0x6a94
movq 0x18(%rbx), %rax
leaq (%rax,%rcx,8), %rax
addq $0x1a0, %rax            # imm = 0x1A0
movq (%rax), %rax
testq %rax, %rax
je 0x6ab6
movq 0x10(%rbx), %rcx
movq %rax, (%rcx)
movl $0x45, 0x8(%rcx)
addq $0x10, 0x10(%rbx)
movl $0x1, %eax
jmp 0x6ab8
xorl %eax, %eax
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O3/tylerneylon[P]APIsWithLua/lua/lapi.c
// Function: auxsetstr
static void auxsetstr (lua_State *L, const TValue *t, const char *k) {
  const TValue *slot;
  TString *str = luaS_new(L, k);
  api_checknelems(L, 1);
  if (luaV_fastset(L, t, str, slot, luaH_getstr, L->top - 1))
    L->top--;  /* pop value */
  else {
    setsvalue2s(L, L->top, str);  /* push 'str' (to make it a TValue) */
    api_incr_top(L);
    luaV_finishset(L, t, L->top - 1, L->top - 2, slot);
    L->top -= 2;  /* pop value and key */
  }
  lua_unlock(L);  /* lock done by caller */
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %rsi, %r15
movq %rdi, %rbx
movq %rdx, %rsi
callq 0xfa60
movq %rax, %r12
cmpl $0x45, 0x8(%r15)
jne 0x6b8d
movq (%r15), %rdi
movq %r12, %rsi
callq 0x1063d
movq %rax, %r14
cmpl $0x0, 0x8(%rax)
je 0x6b90
movq 0x10(%rbx), %rax
testb $0x40, -0x8(%rax)
je 0x6b78
movq (%r15), %rsi
testb $0x4, 0x9(%rsi)
je 0x6b78
movq -0x10(%rax), %rcx
testb $0x3, 0x9(%rcx)
je 0x6b78
movq %rbx, %rdi
callq 0xa246
movq 0x10(%rbx), %rax
addq $0x10, %rbx
movups -0x10(%rax), %xmm0
movups %xmm0, (%r14)
movq $-0x10, %rax
jmp 0x6bcf
xorl %r14d, %r14d
leaq 0x10(%rbx), %r13
movq 0x10(%rbx), %rax
movq %r12, (%rax)
movzbl 0x8(%r12), %ecx
orl $0x40, %ecx
movl %ecx, 0x8(%rax)
movq 0x10(%rbx), %rdx
leaq 0x10(%rdx), %rax
movq %rax, 0x10(%rbx)
leaq -0x10(%rdx), %rcx
movq %rbx, %rdi
movq %r15, %rsi
movq %r14, %r8
callq 0x118b2
movq $-0x20, %rax
movq %r13, %rbx
addq %rax, (%rbx)
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/tylerneylon[P]APIsWithLua/lua/lapi.c
// Function: lua_settable
LUA_API void lua_settable (lua_State *L, int idx) {
  StkId t;
  lua_lock(L);
  api_checknelems(L, 2);
  t = index2addr(L, idx);
  luaV_settable(L, t, L->top - 2, L->top - 1);
  L->top -= 2;  /* pop index and value */
  lua_unlock(L);
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %rbx
callq 0x5f8d
movq %rax, %r15
cmpl $0x45, 0x8(%rax)
jne 0x6c3e
movq (%r15), %rdi
movq 0x10(%rbx), %rsi
addq $-0x20, %rsi
callq 0x106ef
movq %rax, %r14
cmpl $0x0, 0x8(%rax)
je 0x6c41
movq 0x10(%rbx), %rax
testb $0x40, -0x8(%rax)
je 0x6c34
movq (%r15), %rsi
testb $0x4, 0x9(%rsi)
je 0x6c34
movq -0x10(%rax), %rcx
testb $0x3, 0x9(%rcx)
je 0x6c34
movq %rbx, %rdi
callq 0xa246
movq 0x10(%rbx), %rax
movups -0x10(%rax), %xmm0
movups %xmm0, (%r14)
jmp 0x6c5b
xorl %r14d, %r14d
movq 0x10(%rbx), %rcx
leaq -0x20(%rcx), %rdx
addq $-0x10, %rcx
movq %rbx, %rdi
movq %r15, %rsi
movq %r14, %r8
callq 0x118b2
addq $-0x20, 0x10(%rbx)
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/tylerneylon[P]APIsWithLua/lua/lapi.c
// Function: lua_seti
LUA_API void lua_seti (lua_State *L, int idx, lua_Integer n) {
  StkId t;
  const TValue *slot;
  lua_lock(L);
  api_checknelems(L, 1);
  t = index2addr(L, idx);
  if (luaV_fastset(L, t, n, slot, luaH_getint, L->top - 1))
    L->top--;  /* pop value */
  else {
    setivalue(L->top, n);
    api_incr_top(L);
    luaV_finishset(L, t, L->top - 1, L->top - 2, slot);
    L->top -= 2;  /* pop value and key */
  }
  lua_unlock(L);
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %rdx, %r12
movq %rdi, %rbx
callq 0x5f8d
movq %rax, %r15
cmpl $0x45, 0x8(%rax)
jne 0x6cf9
movq (%r15), %rdi
movq %r12, %rsi
callq 0x105a5
movq %rax, %r14
cmpl $0x0, 0x8(%rax)
je 0x6cfc
movq 0x10(%rbx), %rax
testb $0x40, -0x8(%rax)
je 0x6ce4
movq (%r15), %rsi
testb $0x4, 0x9(%rsi)
je 0x6ce4
movq -0x10(%rax), %rcx
testb $0x3, 0x9(%rcx)
je 0x6ce4
movq %rbx, %rdi
callq 0xa246
movq 0x10(%rbx), %rax
addq $0x10, %rbx
movups -0x10(%rax), %xmm0
movups %xmm0, (%r14)
movq $-0x10, %rax
jmp 0x6d36
xorl %r14d, %r14d
leaq 0x10(%rbx), %r13
movq 0x10(%rbx), %rax
movq %r12, (%rax)
movl $0x13, 0x8(%rax)
movq 0x10(%rbx), %rdx
leaq 0x10(%rdx), %rax
movq %rax, 0x10(%rbx)
leaq -0x10(%rdx), %rcx
movq %rbx, %rdi
movq %r15, %rsi
movq %r14, %r8
callq 0x118b2
movq $-0x20, %rax
movq %r13, %rbx
addq %rax, (%rbx)
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/tylerneylon[P]APIsWithLua/lua/lapi.c
// Function: lua_rawset
LUA_API void lua_rawset (lua_State *L, int idx) {
  StkId o;
  TValue *slot;
  lua_lock(L);
  api_checknelems(L, 2);
  o = index2addr(L, idx);
  api_check(L, ttistable(o), "table expected");
  slot = luaH_set(L, hvalue(o), L->top - 2);
  setobj2t(L, slot, L->top - 1);
  invalidateTMcache(hvalue(o));
  luaC_barrierback(L, hvalue(o), L->top-1);
  L->top -= 2;
  lua_unlock(L);
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
callq 0x5f8d
movq %rax, %r14
movq (%rax), %rsi
movq 0x10(%rbx), %rdx
addq $-0x20, %rdx
movq %rbx, %rdi
callq 0x1005a
movq 0x10(%rbx), %rcx
movups -0x10(%rcx), %xmm0
movups %xmm0, (%rax)
movq (%r14), %rax
movb $0x0, 0xa(%rax)
movq 0x10(%rbx), %rax
testb $0x40, -0x8(%rax)
je 0x6da0
movq (%r14), %rsi
testb $0x4, 0x9(%rsi)
je 0x6da0
movq -0x10(%rax), %rcx
testb $0x3, 0x9(%rcx)
je 0x6da0
movq %rbx, %rdi
callq 0xa246
movq 0x10(%rbx), %rax
addq $-0x20, %rax
movq %rax, 0x10(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O3/tylerneylon[P]APIsWithLua/lua/lapi.c
// Function: lua_rawseti
LUA_API void lua_rawseti (lua_State *L, int idx, lua_Integer n) {
  StkId o;
  lua_lock(L);
  api_checknelems(L, 1);
  o = index2addr(L, idx);
  api_check(L, ttistable(o), "table expected");
  luaH_setint(L, hvalue(o), n, L->top - 1);
  luaC_barrierback(L, hvalue(o), L->top-1);
  L->top--;
  lua_unlock(L);
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdx, %r15
movq %rdi, %rbx
callq 0x5f8d
movq %rax, %r14
movq (%rax), %rsi
movq 0x10(%rbx), %rcx
addq $-0x10, %rcx
movq %rbx, %rdi
movq %r15, %rdx
callq 0x10000
movq 0x10(%rbx), %rax
testb $0x40, -0x8(%rax)
je 0x6e02
movq (%r14), %rsi
testb $0x4, 0x9(%rsi)
je 0x6e02
movq -0x10(%rax), %rcx
testb $0x3, 0x9(%rcx)
je 0x6e02
movq %rbx, %rdi
callq 0xa246
movq 0x10(%rbx), %rax
addq $-0x10, %rax
movq %rax, 0x10(%rbx)
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/tylerneylon[P]APIsWithLua/lua/lapi.c
// Function: lua_rawsetp
LUA_API void lua_rawsetp (lua_State *L, int idx, const void *p) {
  StkId o;
  TValue k, *slot;
  lua_lock(L);
  api_checknelems(L, 1);
  o = index2addr(L, idx);
  api_check(L, ttistable(o), "table expected");
  setpvalue(&k, cast(void *, p));
  slot = luaH_set(L, hvalue(o), &k);
  setobj2t(L, slot, L->top - 1);
  luaC_barrierback(L, hvalue(o), L->top - 1);
  L->top--;
  lua_unlock(L);
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq %rdx, %r15
movq %rdi, %rbx
callq 0x5f8d
movq %rax, %r14
movq %rsp, %rdx
movq %r15, (%rdx)
movl $0x2, 0x8(%rdx)
movq (%rax), %rsi
movq %rbx, %rdi
callq 0x1005a
movq 0x10(%rbx), %rcx
movups -0x10(%rcx), %xmm0
movups %xmm0, (%rax)
movq 0x10(%rbx), %rax
testb $0x40, -0x8(%rax)
je 0x6e73
movq (%r14), %rsi
testb $0x4, 0x9(%rsi)
je 0x6e73
movq -0x10(%rax), %rcx
testb $0x3, 0x9(%rcx)
je 0x6e73
movq %rbx, %rdi
callq 0xa246
movq 0x10(%rbx), %rax
addq $-0x10, %rax
movq %rax, 0x10(%rbx)
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/tylerneylon[P]APIsWithLua/lua/lapi.c
// Function: lua_setmetatable
LUA_API int lua_setmetatable (lua_State *L, int objindex) {
  TValue *obj;
  Table *mt;
  lua_lock(L);
  api_checknelems(L, 1);
  obj = index2addr(L, objindex);
  if (ttisnil(L->top - 1))
    mt = NULL;
  else {
    api_check(L, ttistable(L->top - 1), "table expected");
    mt = hvalue(L->top - 1);
  }
  switch (ttnov(obj)) {
    case LUA_TTABLE: {
      hvalue(obj)->metatable = mt;
      if (mt) {
        luaC_objbarrier(L, gcvalue(obj), mt);
        luaC_checkfinalizer(L, gcvalue(obj), mt);
      }
      break;
    }
    case LUA_TUSERDATA: {
      uvalue(obj)->metatable = mt;
      if (mt) {
        luaC_objbarrier(L, uvalue(obj), mt);
        luaC_checkfinalizer(L, gcvalue(obj), mt);
      }
      break;
    }
    default: {
      G(L)->mt[ttnov(obj)] = mt;
      break;
    }
  }
  L->top--;
  lua_unlock(L);
  return 1;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %rbx
callq 0x5f8d
movq %rax, %r15
movq 0x10(%rbx), %rax
cmpl $0x0, -0x8(%rax)
je 0x6ea5
movq -0x10(%rax), %r14
jmp 0x6ea8
xorl %r14d, %r14d
movl 0x8(%r15), %eax
andl $0xf, %eax
cmpq $0x7, %rax
je 0x6ec3
cmpl $0x5, %eax
jne 0x6efa
movq (%r15), %rax
movq %r14, 0x28(%rax)
jmp 0x6eca
movq (%r15), %rax
movq %r14, 0x10(%rax)
testq %r14, %r14
je 0x6f06
movq (%r15), %rsi
testb $0x4, 0x9(%rsi)
je 0x6eed
testb $0x3, 0x9(%r14)
je 0x6eed
movq %rbx, %rdi
movq %r14, %rdx
callq 0xa140
movq (%r15), %rsi
movq %rbx, %rdi
movq %r14, %rdx
callq 0xa2ec
jmp 0x6f06
movq 0x18(%rbx), %rcx
movq %r14, 0x1a0(%rcx,%rax,8)
addq $-0x10, 0x10(%rbx)
movl $0x1, %eax
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/tylerneylon[P]APIsWithLua/lua/lapi.c
// Function: lua_setuservalue
LUA_API void lua_setuservalue (lua_State *L, int idx) {
  StkId o;
  lua_lock(L);
  api_checknelems(L, 1);
  o = index2addr(L, idx);
  api_check(L, ttisfulluserdata(o), "full userdata expected");
  setuservalue(L, uvalue(o), L->top - 1);
  luaC_barrier(L, gcvalue(o), L->top - 1);
  L->top--;
  lua_unlock(L);
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
callq 0x5f8d
movq 0x10(%rbx), %rcx
movq (%rax), %rdx
movq -0x10(%rcx), %rsi
movq %rsi, 0x20(%rdx)
movb -0x8(%rcx), %cl
movb %cl, 0xa(%rdx)
movq 0x10(%rbx), %rcx
testb $0x40, -0x8(%rcx)
je 0x6f5d
movq (%rax), %rsi
testb $0x4, 0x9(%rsi)
je 0x6f5d
movq -0x10(%rcx), %rdx
testb $0x3, 0x9(%rdx)
je 0x6f5d
movq %rbx, %rdi
callq 0xa140
movq 0x10(%rbx), %rcx
addq $-0x10, %rcx
movq %rcx, 0x10(%rbx)
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O3/tylerneylon[P]APIsWithLua/lua/lapi.c
// Function: lua_callk
LUA_API void lua_callk (lua_State *L, int nargs, int nresults,
                        lua_KContext ctx, lua_KFunction k) {
  StkId func;
  lua_lock(L);
  api_check(L, k == NULL || !isLua(L->ci),
    "cannot use continuations inside hooks");
  api_checknelems(L, nargs+1);
  api_check(L, L->status == LUA_OK, "cannot do calls on non-normal thread");
  checkresults(L, nargs, nresults);
  func = L->top - (nargs+1);
  if (k != NULL && L->nny == 0) {  /* need to prepare continuation? */
    L->ci->u.c.k = k;  /* save continuation */
    L->ci->u.c.ctx = ctx;  /* save context */
    luaD_call(L, func, nresults);  /* do the call */
  }
  else  /* no continuation or no yieldable */
    luaD_callnoyield(L, func, nresults);  /* just do the call */
  adjustresults(L, nresults);
  lua_unlock(L);
}

// Assembly:
pushq %rbp
pushq %rbx
pushq %rax
movl %edx, %ebp
movq %rdi, %rbx
notl %esi
movslq %esi, %rsi
shlq $0x4, %rsi
addq 0x10(%rdi), %rsi
testq %r8, %r8
je 0x6f8b
cmpw $0x0, 0xc4(%rbx)
je 0x6f97
movq %rbx, %rdi
movl %ebp, %edx
callq 0x90be
jmp 0x6fb1
movq 0x20(%rbx), %rax
movq %r8, 0x20(%rax)
movq 0x20(%rbx), %rax
movq %rcx, 0x30(%rax)
movq %rbx, %rdi
movl %ebp, %edx
callq 0x905c
cmpl $-0x1, %ebp
jne 0x6fc8
movq 0x10(%rbx), %rax
movq 0x20(%rbx), %rcx
cmpq %rax, 0x8(%rcx)
jae 0x6fc8
movq %rax, 0x8(%rcx)
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/tylerneylon[P]APIsWithLua/lua/lapi.c
// Function: lua_pcallk
LUA_API int lua_pcallk (lua_State *L, int nargs, int nresults, int errfunc,
                        lua_KContext ctx, lua_KFunction k) {
  struct CallS c;
  int status;
  ptrdiff_t func;
  lua_lock(L);
  api_check(L, k == NULL || !isLua(L->ci),
    "cannot use continuations inside hooks");
  api_checknelems(L, nargs+1);
  api_check(L, L->status == LUA_OK, "cannot do calls on non-normal thread");
  checkresults(L, nargs, nresults);
  if (errfunc == 0)
    func = 0;
  else {
    StkId o = index2addr(L, errfunc);
    api_checkstackindex(L, errfunc, o);
    func = savestack(L, o);
  }
  c.func = L->top - (nargs+1);  /* function to be called */
  if (k == NULL || L->nny > 0) {  /* no continuation or no yieldable? */
    c.nresults = nresults;  /* do a 'conventional' protected call */
    status = luaD_pcall(L, f_call, &c, savestack(L, c.func), func);
  }
  else {  /* prepare continuation (call is already protected by 'resume') */
    CallInfo *ci = L->ci;
    ci->u.c.k = k;  /* save continuation */
    ci->u.c.ctx = ctx;  /* save context */
    /* save information for error recovery */
    ci->extra = savestack(L, c.func);
    ci->u.c.old_errfunc = L->errfunc;
    L->errfunc = func;
    setoah(ci->callstatus, L->allowhook);  /* save value of 'allowhook' */
    ci->callstatus |= CIST_YPCALL;  /* function can do error recovery */
    luaD_call(L, c.func, nresults);  /* do the call */
    ci->callstatus &= ~CIST_YPCALL;
    L->errfunc = ci->u.c.old_errfunc;
    status = LUA_OK;  /* if it is here, there were no errors */
  }
  adjustresults(L, nresults);
  lua_unlock(L);
  return status;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x10, %rsp
movq %r9, %r15
movq %r8, %r14
movl %edx, %ebp
movl %esi, %r12d
movq %rdi, %rbx
testl %ecx, %ecx
je 0x7000
movq %rbx, %rdi
movl %ecx, %esi
callq 0x5f8d
movq %rax, %r8
subq 0x38(%rbx), %r8
jmp 0x7003
xorl %r8d, %r8d
notl %r12d
movslq %r12d, %rcx
shlq $0x4, %rcx
addq 0x10(%rbx), %rcx
movq %rcx, (%rsp)
testq %r15, %r15
je 0x7024
cmpw $0x0, 0xc4(%rbx)
je 0x703f
movq %rsp, %rdx
movl %ebp, 0x8(%rdx)
subq 0x38(%rbx), %rcx
leaq 0x90(%rip), %rsi        # 0x70c5
movq %rbx, %rdi
callq 0x9416
jmp 0x70a1
movq 0x20(%rbx), %r12
movq %r15, 0x20(%r12)
movq %r14, 0x30(%r12)
movq %rcx, %rax
subq 0x38(%rbx), %rax
movq %rax, 0x38(%r12)
movq 0xb0(%rbx), %rax
movq %rax, 0x28(%r12)
movq %r8, 0xb0(%rbx)
movb 0x42(%r12), %al
andb $-0x12, %al
orb 0xcc(%rbx), %al
orb $0x10, %al
movb %al, 0x42(%r12)
movq %rbx, %rdi
movq %rcx, %rsi
movl %ebp, %edx
callq 0x905c
andb $-0x11, 0x42(%r12)
movq 0x28(%r12), %rax
movq %rax, 0xb0(%rbx)
xorl %eax, %eax
cmpl $-0x1, %ebp
jne 0x70b8
movq 0x10(%rbx), %rcx
movq 0x20(%rbx), %rdx
cmpq %rcx, 0x8(%rdx)
jae 0x70b8
movq %rcx, 0x8(%rdx)
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/tylerneylon[P]APIsWithLua/lua/lapi.c
// Function: lua_load
LUA_API int lua_load (lua_State *L, lua_Reader reader, void *data,
                      const char *chunkname, const char *mode) {
  ZIO z;
  int status;
  lua_lock(L);
  if (!chunkname) chunkname = "?";
  luaZ_init(L, &z, reader, data);
  status = luaD_protectedparser(L, &z, chunkname, mode);
  if (status == LUA_OK) {  /* no errors? */
    LClosure *f = clLvalue(L->top - 1);  /* get newly created function */
    if (f->nupvalues >= 1) {  /* does it have an upvalue? */
      /* get global table from registry */
      Table *reg = hvalue(&G(L)->l_registry);
      const TValue *gt = luaH_getint(reg, LUA_RIDX_GLOBALS);
      /* set global table as 1st upvalue of 'f' (may be LUA_ENV) */
      setobj(L, f->upvals[0]->v, gt);
      luaC_upvalbarrier(L, f->upvals[0]);
    }
  }
  lua_unlock(L);
  return status;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x30, %rsp
movq %r8, %r14
movq %rdx, %rax
movq %rsi, %rdx
movq %rdi, %rbx
testq %rcx, %rcx
leaq 0x1b29d(%rip), %r15     # 0x22392
cmovneq %rcx, %r15
leaq 0x8(%rsp), %r12
movq %r12, %rsi
movq %rax, %rcx
callq 0x145e7
movq %rbx, %rdi
movq %r12, %rsi
movq %r15, %rdx
movq %r14, %rcx
callq 0x94aa
movl %eax, %ebp
testl %eax, %eax
je 0x712f
movl %ebp, %eax
addq $0x30, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movq 0x10(%rbx), %rax
movq -0x10(%rax), %r14
cmpb $0x0, 0xa(%r14)
je 0x7120
movq 0x18(%rbx), %rax
movq 0x40(%rax), %rdi
movl $0x2, %esi
callq 0x105a5
movq 0x20(%r14), %rcx
movq (%rcx), %rcx
movups (%rax), %xmm0
movups %xmm0, (%rcx)
movq 0x20(%r14), %rsi
movq (%rsi), %rax
movb 0x8(%rax), %cl
shrb $0x6, %cl
movq %rsi, %rdx
addq $0x10, %rdx
cmpq %rdx, %rax
sete %al
andb %cl, %al
cmpb $0x1, %al
jne 0x7120
movq %rbx, %rdi
callq 0xa25b
jmp 0x7120
// File: /workspace/github_c_makefile_star2_O3/tylerneylon[P]APIsWithLua/lua/lapi.c
// Function: lua_next
LUA_API int lua_next (lua_State *L, int idx) {
  StkId t;
  int more;
  lua_lock(L);
  t = index2addr(L, idx);
  api_check(L, ttistable(t), "table expected");
  more = luaH_next(L, hvalue(t), L->top - 1);
  if (more) {
    api_incr_top(L);
  }
  else  /* no more elements */
    L->top -= 1;  /* remove key */
  lua_unlock(L);
  return more;
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
callq 0x5f8d
movq (%rax), %rsi
movq 0x10(%rbx), %rdx
addq $-0x10, %rdx
movq %rbx, %rdi
callq 0xfb44
xorl %ecx, %ecx
testl %eax, %eax
setne %cl
movq 0x10(%rbx), %rdx
shll $0x5, %ecx
addq %rdx, %rcx
addq $-0x10, %rcx
movq %rcx, 0x10(%rbx)
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O3/tylerneylon[P]APIsWithLua/lua/lapi.c
// Function: lua_concat
LUA_API void lua_concat (lua_State *L, int n) {
  lua_lock(L);
  api_checknelems(L, n);
  if (n >= 2) {
    luaV_concat(L, n);
  }
  else if (n == 0) {  /* push empty string */
    setsvalue2s(L, L->top, luaS_newlstr(L, "", 0));
    api_incr_top(L);
  }
  /* else n == 1; nothing to do */
  luaC_checkGC(L);
  lua_unlock(L);
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
cmpl $0x2, %esi
jl 0x732c
movq %rbx, %rdi
callq 0x12004
jmp 0x7358
testl %esi, %esi
jne 0x7358
movq 0x10(%rbx), %r14
leaq 0x1da4d(%rip), %rsi     # 0x24d88
movq %rbx, %rdi
xorl %edx, %edx
callq 0xf828
movq %rax, (%r14)
movzbl 0x8(%rax), %eax
orl $0x40, %eax
movl %eax, 0x8(%r14)
addq $0x10, 0x10(%rbx)
movq 0x18(%rbx), %rax
cmpq $0x0, 0x18(%rax)
jle 0x7372
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0xa9cc
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O3/tylerneylon[P]APIsWithLua/lua/lapi.c
// Function: lua_len
LUA_API void lua_len (lua_State *L, int idx) {
  StkId t;
  lua_lock(L);
  t = index2addr(L, idx);
  luaV_objlen(L, L->top, t);
  api_incr_top(L);
  lua_unlock(L);
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
callq 0x5f8d
movq 0x10(%rbx), %rsi
movq %rbx, %rdi
movq %rax, %rdx
callq 0x122c0
addq $0x10, 0x10(%rbx)
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O3/tylerneylon[P]APIsWithLua/lua/lapi.c
// Function: lua_newuserdata
LUA_API void *lua_newuserdata (lua_State *L, size_t size) {
  Udata *u;
  lua_lock(L);
  u = luaS_newudata(L, size);
  setuvalue(L, L->top, u);
  api_incr_top(L);
  luaC_checkGC(L);
  lua_unlock(L);
  return getudatamem(u);
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
callq 0xfafa
movq %rax, %r14
movq 0x10(%rbx), %rax
movq %r14, (%rax)
movl $0x47, 0x8(%rax)
addq $0x10, 0x10(%rbx)
movq 0x18(%rbx), %rax
cmpq $0x0, 0x18(%rax)
jle 0x73f2
movq %rbx, %rdi
callq 0xa9cc
addq $0x28, %r14
movq %r14, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O3/tylerneylon[P]APIsWithLua/lua/lapi.c
// Function: lua_getupvalue
LUA_API const char *lua_getupvalue (lua_State *L, int funcindex, int n) {
  const char *name;
  TValue *val = NULL;  /* to avoid warnings */
  lua_lock(L);
  name = aux_upvalue(index2addr(L, funcindex), n, &val, NULL, NULL);
  if (name) {
    setobj2s(L, L->top, val);
    api_incr_top(L);
  }
  lua_unlock(L);
  return name;
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
subq $0x10, %rsp
movl %edx, %ebp
movq %rdi, %rbx
leaq 0x8(%rsp), %r14
movq $0x0, (%r14)
callq 0x5f8d
movq %rax, %rdi
movl %ebp, %esi
movq %r14, %rdx
xorl %ecx, %ecx
xorl %r8d, %r8d
callq 0x7453
testq %rax, %rax
je 0x744a
movq 0x10(%rbx), %rcx
movq 0x8(%rsp), %rdx
movups (%rdx), %xmm0
movups %xmm0, (%rcx)
addq $0x10, 0x10(%rbx)
addq $0x10, %rsp
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/tylerneylon[P]APIsWithLua/lua/lapi.c
// Function: aux_upvalue
static const char *aux_upvalue (StkId fi, int n, TValue **val,
                                CClosure **owner, UpVal **uv) {
  switch (ttype(fi)) {
    case LUA_TCCL: {  /* C closure */
      CClosure *f = clCvalue(fi);
      if (!(1 <= n && n <= f->nupvalues)) return NULL;
      *val = &f->upvalue[n-1];
      if (owner) *owner = f;
      return "";
    }
    case LUA_TLCL: {  /* Lua closure */
      LClosure *f = clLvalue(fi);
      TString *name;
      Proto *p = f->p;
      if (!(1 <= n && n <= p->sizeupvalues)) return NULL;
      *val = f->upvals[n-1]->v;
      if (uv) *uv = f->upvals[n - 1];
      name = p->upvalues[n-1].name;
      return (name == NULL) ? "(*no name)" : getstr(name);
    }
    default: return NULL;  /* not a closure */
  }
}

// Assembly:
movl 0x8(%rdi), %eax
andl $0x3f, %eax
cmpl $0x6, %eax
je 0x7493
cmpl $0x26, %eax
jne 0x74a3
testl %esi, %esi
jle 0x74a3
movq (%rdi), %rdi
movzbl 0xa(%rdi), %eax
cmpl %esi, %eax
jb 0x74a3
decl %esi
shlq $0x4, %rsi
leaq (%rdi,%rsi), %rax
addq $0x20, %rax
movq %rax, (%rdx)
leaq 0x1d8fe(%rip), %rax     # 0x24d88
testq %rcx, %rcx
je 0x74de
movq %rdi, (%rcx)
retq
testl %esi, %esi
jle 0x74a3
movq (%rdi), %rcx
movq 0x18(%rcx), %rax
cmpl %esi, 0x10(%rax)
jge 0x74a6
xorl %eax, %eax
retq
decl %esi
movq 0x20(%rcx,%rsi,8), %rdi
movq (%rdi), %rdi
movq %rdi, (%rdx)
testq %r8, %r8
je 0x74c0
movq 0x20(%rcx,%rsi,8), %rcx
movq %rcx, (%r8)
movq 0x58(%rax), %rax
shlq $0x4, %rsi
movq (%rax,%rsi), %rax
leaq 0x18(%rax), %rcx
testq %rax, %rax
leaq 0x1ad16(%rip), %rax     # 0x221f0
cmovneq %rcx, %rax
retq
// File: /workspace/github_c_makefile_star2_O3/tylerneylon[P]APIsWithLua/lua/lapi.c
// Function: lua_setupvalue
LUA_API const char *lua_setupvalue (lua_State *L, int funcindex, int n) {
  const char *name;
  TValue *val = NULL;  /* to avoid warnings */
  CClosure *owner = NULL;
  UpVal *uv = NULL;
  StkId fi;
  lua_lock(L);
  fi = index2addr(L, funcindex);
  api_checknelems(L, 1);
  name = aux_upvalue(fi, n, &val, &owner, &uv);
  if (name) {
    L->top--;
    setobj(L, val, L->top);
    if (owner) { luaC_barrier(L, owner, L->top); }
    else if (uv) { luaC_upvalbarrier(L, uv); }
  }
  lua_unlock(L);
  return name;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x20, %rsp
movl %edx, %ebp
movq %rdi, %rbx
xorl %eax, %eax
leaq 0x18(%rsp), %r14
movq %rax, (%r14)
leaq 0x10(%rsp), %r15
movq %rax, (%r15)
leaq 0x8(%rsp), %r12
movq %rax, (%r12)
callq 0x5f8d
movq %rax, %rdi
movl %ebp, %esi
movq %r14, %rdx
movq %r15, %rcx
movq %r12, %r8
callq 0x7453
movq %rax, %r14
testq %rax, %rax
je 0x759b
movq 0x10(%rbx), %rax
leaq -0x10(%rax), %rcx
movq %rcx, 0x10(%rbx)
movq 0x18(%rsp), %rcx
movups -0x10(%rax), %xmm0
movups %xmm0, (%rcx)
movq 0x10(%rsp), %rsi
testq %rsi, %rsi
je 0x7570
movq 0x10(%rbx), %rax
testb $0x40, 0x8(%rax)
je 0x759b
testb $0x4, 0x9(%rsi)
je 0x759b
movq (%rax), %rdx
testb $0x3, 0x9(%rdx)
je 0x759b
movq %rbx, %rdi
callq 0xa140
jmp 0x759b
movq 0x8(%rsp), %rsi
testq %rsi, %rsi
je 0x759b
movq (%rsi), %rax
movb 0x8(%rax), %cl
shrb $0x6, %cl
leaq 0x10(%rsi), %rdx
cmpq %rdx, %rax
sete %al
andb %cl, %al
cmpb $0x1, %al
jne 0x759b
movq %rbx, %rdi
callq 0xa25b
movq %r14, %rax
addq $0x20, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/tylerneylon[P]APIsWithLua/lua/lapi.c
// Function: lua_upvalueid
LUA_API void *lua_upvalueid (lua_State *L, int fidx, int n) {
  StkId fi = index2addr(L, fidx);
  switch (ttype(fi)) {
    case LUA_TLCL: {  /* lua closure */
      return *getupvalref(L, fidx, n, NULL);
    }
    case LUA_TCCL: {  /* C closure */
      CClosure *f = clCvalue(fi);
      api_check(L, 1 <= n && n <= f->nupvalues, "invalid upvalue index");
      return &f->upvalue[n - 1];
    }
    default: {
      api_check(L, 0, "closure expected");
      return NULL;
    }
  }
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movl %edx, %ebx
movl %esi, %ebp
movq %rdi, %r14
callq 0x5f8d
movl 0x8(%rax), %ecx
andl $0x3f, %ecx
cmpl $0x26, %ecx
je 0x75e2
cmpl $0x6, %ecx
jne 0x75f5
movq %r14, %rdi
movl %ebp, %esi
callq 0x5f8d
movq (%rax), %rax
movslq %ebx, %rcx
movq 0x18(%rax,%rcx,8), %rax
jmp 0x75f7
movq (%rax), %rax
movslq %ebx, %rcx
shlq $0x4, %rcx
addq %rcx, %rax
addq $0x10, %rax
jmp 0x75f7
xorl %eax, %eax
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/tylerneylon[P]APIsWithLua/lua/lapi.c
// Function: lua_upvaluejoin
LUA_API void lua_upvaluejoin (lua_State *L, int fidx1, int n1,
                                            int fidx2, int n2) {
  LClosure *f1;
  UpVal **up1 = getupvalref(L, fidx1, n1, &f1);
  UpVal **up2 = getupvalref(L, fidx2, n2, NULL);
  luaC_upvdeccount(L, *up1);
  *up1 = *up2;
  (*up1)->refcount++;
  if (upisopen(*up1)) (*up1)->u.open.touched = 1;
  luaC_upvalbarrier(L, *up1);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %r8d, %ebp
movl %ecx, %r14d
movl %edx, %r15d
movq %rdi, %rbx
callq 0x5f8d
movq (%rax), %r12
movslq %r15d, %r15
movq %rbx, %rdi
movl %r14d, %esi
callq 0x5f8d
movq (%rax), %r14
movslq %ebp, %r13
movq 0x18(%r12,%r15,8), %rsi
movq %rbx, %rdi
callq 0xa2d0
movq 0x18(%r14,%r13,8), %rsi
movq %rsi, 0x18(%r12,%r15,8)
incq 0x8(%rsi)
movq (%rsi), %rax
leaq 0x10(%rsi), %rcx
cmpq %rcx, %rax
je 0x7668
decq %r15
movl $0x1, 0x18(%rsi)
movq 0x20(%r12,%r15,8), %rsi
movq (%rsi), %rax
testb $0x40, 0x8(%rax)
je 0x768d
leaq 0x10(%rsi), %rcx
cmpq %rcx, %rax
jne 0x768d
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0xa25b
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/tylerneylon[P]APIsWithLua/lua/ldebug.c
// Function: lua_getstack
LUA_API int lua_getstack (lua_State *L, int level, lua_Debug *ar) {
  int status;
  CallInfo *ci;
  if (level < 0) return 0;  /* invalid (negative) level */
  lua_lock(L);
  for (ci = L->ci; level > 0 && ci != &L->base_ci; ci = ci->previous)
    level--;
  if (level == 0 && ci != &L->base_ci) {  /* level found? */
    status = 1;
    ar->i_ci = ci;
  }
  else status = 0;  /* no such level */
  lua_unlock(L);
  return status;
}

// Assembly:
xorl %eax, %eax
testl %esi, %esi
js 0x774b
movq 0x20(%rdi), %rcx
addq $0x60, %rdi
testl %esi, %esi
setne %r9b
cmpq %rdi, %rcx
setne %r8b
andb %r8b, %r9b
cmpb $0x1, %r9b
jne 0x7733
movl %esi, %r9d
leal -0x1(%r9), %esi
movq 0x10(%rcx), %rcx
cmpq %rdi, %rcx
setne %r8b
cmpl $0x1, %r9d
je 0x7733
cmpq %rdi, %rcx
jne 0x7716
testl %esi, %esi
sete %sil
andb %r8b, %sil
cmpb $0x1, %sil
jne 0x774b
movq %rcx, 0x78(%rdx)
movl $0x1, %eax
retq