LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O1/tylerneylon[P]APIsWithLua/ch4/eatyguy8.c
// Function: sleephires
void sleephires(double sec) {
  long s = (long)floor(sec);
  long n = (long)floor((sec - s) * 1e9);
  struct timespec delay = { .tv_sec = s, .tv_nsec = n };
  nanosleep(&delay, NULL);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
subq $0x18, %rsp
movsd %xmm0, -0x10(%rbp)
callq 0x5470
cvttsd2si %xmm0, %rbx
xorps %xmm0, %xmm0
cvtsi2sd %rbx, %xmm0
movsd -0x10(%rbp), %xmm1
subsd %xmm0, %xmm1
mulsd 0x1b737(%rip), %xmm1    # 0x21010
movapd %xmm1, %xmm0
callq 0x5470
cvttsd2si %xmm0, %rax
leaq -0x20(%rbp), %rdi
movq %rbx, (%rdi)
movq %rax, 0x8(%rdi)
xorl %esi, %esi
callq 0x51a0
addq $0x18, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/tylerneylon[P]APIsWithLua/ch4/eatyguy8.c
// Function: start
void start() {
  // Terminal setup.
  system("tput setab 0");    // Use a black background.
  system("tput clear");      // Clear the screen.
  system("tput civis");      // Hide the cursor.
  system("stty raw -echo");  // Improve access to keypresses.
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
leaq 0x1b70d(%rip), %rdi     # 0x21018
callq 0x5160
leaq 0x1b70e(%rip), %rdi     # 0x21025
callq 0x5160
leaq 0x1b70d(%rip), %rdi     # 0x21030
callq 0x5160
leaq 0x1b70c(%rip), %rdi     # 0x2103b
popq %rbp
jmp 0x5160
// File: /workspace/github_c_makefile_star2_O1/tylerneylon[P]APIsWithLua/ch4/eatyguy8.c
// Function: done
void done() {

  // Put the terminal back into a decent state.
  system("stty cooked echo");  // Undo init call to "stty raw".
  system("tput reset");        // Reset colors and clear screen.

  exit(0);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
leaq 0x1b70a(%rip), %rdi     # 0x2104a
callq 0x5160
leaq 0x1b70f(%rip), %rdi     # 0x2105b
callq 0x5160
xorl %edi, %edi
callq 0x5490
// File: /workspace/github_c_makefile_star2_O1/tylerneylon[P]APIsWithLua/ch4/eatyguy8.c
// Function: push_keypress
void push_keypress(lua_State *L, int key, int is_end_of_seq) {
  if (is_end_of_seq && 65 <= key && key <= 68) {
    // up, down, right, left = 65, 66, 67, 68
    static const char *arrow_names[] = {"up", "down",
                                        "right", "left"};
    lua_pushstring(L, arrow_names[key - 65]);
  } else {
    lua_pushnumber(L, key);
  }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
testl %edx, %edx
sete %cl
leal -0x41(%rsi), %eax
cmpl $0x4, %eax
setae %dl
orb %cl, %dl
jne 0x5984
movl %eax, %eax
leaq 0x1b759(%rip), %rcx     # 0x210d0
movslq (%rcx,%rax,4), %rsi
addq %rcx, %rsi
popq %rbp
jmp 0x645b
cvtsi2sd %esi, %xmm0
popq %rbp
jmp 0x63d1
// File: /workspace/github_c_makefile_star2_O1/tylerneylon[P]APIsWithLua/ch4/eatyguy8.c
// Function: push_state_table
void push_state_table(lua_State *L,
                      int key,
                      int is_end_of_seq) {

  lua_newtable(L);

    // stack = [.., {}]

  push_keypress(L, key, is_end_of_seq);

    // stack = [.., {}, key]

  lua_setfield(L, -2, "key");

    // stack = [.., {key = key}]

  lua_pushnumber(L, gettime());

    // stack = [.., {key = key}, clock]

  lua_setfield(L, -2, "clock");

    // stack = [.., {key = key, clock = clock}]
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x18, %rsp
movl %edx, %r14d
movl %esi, %r15d
movq %rdi, %rbx
xorl %esi, %esi
xorl %edx, %edx
callq 0x68d6
movq %rbx, %rdi
movl %r15d, %esi
movl %r14d, %edx
callq 0x5958
leaq 0x1b6b7(%rip), %rdx     # 0x21079
movq %rbx, %rdi
movl $0xfffffffe, %esi       # imm = 0xFFFFFFFE
callq 0x6b3f
leaq -0x28(%rbp), %r14
movq %r14, %rdi
xorl %esi, %esi
callq 0x51b0
cvtsi2sdq (%r14), %xmm1
cvtsi2sdq 0x8(%r14), %xmm0
mulsd 0x1b618(%rip), %xmm0    # 0x21008
addsd %xmm1, %xmm0
movq %rbx, %rdi
callq 0x63d1
leaq 0x1b67a(%rip), %rdx     # 0x2107d
movq %rbx, %rdi
movl $0xfffffffe, %esi       # imm = 0xFFFFFFFE
addq $0x18, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0x6b3f
// File: /workspace/github_c_makefile_star2_O1/tylerneylon[P]APIsWithLua/lua/lapi.c
// Function: lua_checkstack
LUA_API int lua_checkstack (lua_State *L, int n) {
  int res;
  CallInfo *ci = L->ci;
  lua_lock(L);
  api_check(L, n >= 0, "negative 'n'");
  if (L->stack_last - L->top > n)  /* stack large enough? */
    res = 1;  /* yes; check is OK */
  else {  /* no; need to grow stack */
    int inuse = cast_int(L->top - L->stack) + EXTRA_STACK;
    if (inuse > LUAI_MAXSTACK - n)  /* can grow without overflow? */
      res = 0;  /* no */
    else  /* try to grow stack */
      res = (luaD_rawrunprotected(L, &growstack, &n) == LUA_OK);
  }
  if (res && ci->top < L->top + n)
    ci->top = L->top + n;  /* adjust frame top */
  lua_unlock(L);
  return res;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movl %esi, 0x4(%rsp)
movq 0x10(%rdi), %rcx
movq 0x20(%rdi), %r14
movq 0x30(%rdi), %rdx
subq %rcx, %rdx
sarq $0x4, %rdx
movslq %esi, %rdi
movl $0x1, %eax
cmpq %rdi, %rdx
jg 0x5c88
subq 0x38(%rbx), %rcx
shrq $0x4, %rcx
addl $0x5, %ecx
movl $0xf4240, %edx          # imm = 0xF4240
subl %esi, %edx
xorl %eax, %eax
cmpl %edx, %ecx
jg 0x5c88
leaq 0x39(%rip), %rsi        # 0x5cab
leaq 0x4(%rsp), %rdx
movq %rbx, %rdi
callq 0x857f
movl %eax, %ecx
xorl %eax, %eax
testl %ecx, %ecx
sete %al
testl %eax, %eax
je 0x5ca3
movslq 0x4(%rsp), %rcx
shlq $0x4, %rcx
addq 0x10(%rbx), %rcx
cmpq %rcx, 0x8(%r14)
jae 0x5ca3
movq %rcx, 0x8(%r14)
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O1/tylerneylon[P]APIsWithLua/lua/lapi.c
// Function: lua_xmove
LUA_API void lua_xmove (lua_State *from, lua_State *to, int n) {
  int i;
  if (from == to) return;
  lua_lock(to);
  api_checknelems(from, n);
  api_check(from, G(from) == G(to), "moving among independent states");
  api_check(from, to->ci->top - to->top >= n, "stack overflow");
  from->top -= n;
  for (i = 0; i < n; i++) {
    setobj2s(to, to->top, from->top + i);
    to->top++;  /* stack already checked by previous 'api_check' */
  }
  lua_unlock(to);
}

// Assembly:
cmpq %rsi, %rdi
je 0x5cef
movslq %edx, %rax
movq %rax, %rcx
shlq $0x4, %rcx
subq %rcx, 0x10(%rdi)
testl %eax, %eax
jle 0x5cef
movl %edx, %eax
shlq $0x4, %rax
xorl %ecx, %ecx
movq 0x10(%rsi), %rdx
movq 0x10(%rdi), %r8
movups (%r8,%rcx), %xmm0
movups %xmm0, (%rdx)
addq $0x10, 0x10(%rsi)
addq $0x10, %rcx
cmpq %rcx, %rax
jne 0x5cd1
retq
// File: /workspace/github_c_makefile_star2_O1/tylerneylon[P]APIsWithLua/lua/lapi.c
// Function: lua_settop
LUA_API void lua_settop (lua_State *L, int idx) {
  StkId func = L->ci->func;
  lua_lock(L);
  if (idx >= 0) {
    api_check(L, idx <= L->stack_last - (func + 1), "new top too large");
    while (L->top < (func + 1) + idx)
      setnilvalue(L->top++);
    L->top = (func + 1) + idx;
  }
  else {
    api_check(L, -(idx+1) <= (L->top - (func + 1)), "invalid new top");
    L->top += idx+1;  /* 'subtract' index (index is negative) */
  }
  lua_unlock(L);
}

// Assembly:
testl %esi, %esi
js 0x5d8b
movq 0x10(%rdi), %rax
movq 0x20(%rdi), %rcx
movq (%rcx), %rcx
movl %esi, %edx
shlq $0x4, %rdx
addq %rdx, %rcx
addq $0x10, %rcx
cmpq %rcx, %rax
jae 0x5d86
movl $0x0, 0x8(%rax)
addq $0x10, %rax
cmpq %rcx, %rax
jb 0x5d72
movq %rax, 0x10(%rdi)
movq %rcx, 0x10(%rdi)
retq
movq 0x10(%rdi), %rax
movslq %esi, %rcx
shlq $0x4, %rcx
addq %rcx, %rax
addq $0x10, %rax
movq %rax, 0x10(%rdi)
retq
// File: /workspace/github_c_makefile_star2_O1/tylerneylon[P]APIsWithLua/lua/lapi.c
// Function: lua_rotate
LUA_API void lua_rotate (lua_State *L, int idx, int n) {
  StkId p, t, m;
  lua_lock(L);
  t = L->top - 1;  /* end of stack segment being rotated */
  p = index2addr(L, idx);  /* start of segment */
  api_checkstackindex(L, idx, p);
  api_check(L, (n >= 0 ? n : -n) <= (t - p + 1), "invalid 'n'");
  m = (n >= 0 ? t - n : p - n - 1);  /* end of prefix */
  reverse(L, p, m);  /* reverse the prefix with length 'n' */
  reverse(L, m + 1, t);  /* reverse the suffix */
  reverse(L, p, t);  /* reverse the entire segment */
  lua_unlock(L);
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x10, %rsp
movl %edx, %ebx
movq 0x10(%rdi), %r14
leaq -0x10(%r14), %r15
callq 0x5e7d
testl %ebx, %ebx
js 0x5dcc
movl %ebx, %edx
shlq $0x4, %rdx
movq %r15, %rcx
subq %rdx, %rcx
jmp 0x5ddd
movslq %ebx, %rdx
shlq $0x4, %rdx
movq %rax, %rcx
subq %rdx, %rcx
addq $-0x10, %rcx
cmpq %rcx, %rax
jae 0x5e0f
leaq -0x10(%rcx), %rdx
movq %rax, %rsi
movups (%rsi), %xmm0
movaps %xmm0, (%rsp)
movups 0x10(%rdx), %xmm0
movups %xmm0, (%rsi)
movaps (%rsp), %xmm0
movups %xmm0, 0x10(%rdx)
addq $0x10, %rsi
leaq -0x10(%rdx), %rdi
cmpq %rdx, %rsi
movq %rdi, %rdx
jb 0x5de9
addq $0x10, %rcx
cmpq %r15, %rcx
jae 0x5e42
leaq -0x20(%r14), %rdx
movups (%rcx), %xmm0
movaps %xmm0, (%rsp)
movups 0x10(%rdx), %xmm0
movups %xmm0, (%rcx)
movaps (%rsp), %xmm0
movups %xmm0, 0x10(%rdx)
addq $0x10, %rcx
leaq -0x10(%rdx), %rsi
cmpq %rdx, %rcx
movq %rsi, %rdx
jb 0x5e1c
cmpq %r15, %rax
jae 0x5e73
addq $-0x20, %r14
movups (%rax), %xmm0
movaps %xmm0, (%rsp)
movups 0x10(%r14), %xmm0
movups %xmm0, (%rax)
movaps (%rsp), %xmm0
movups %xmm0, 0x10(%r14)
addq $0x10, %rax
leaq -0x10(%r14), %rcx
cmpq %r14, %rax
movq %rcx, %r14
jb 0x5e4b
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/tylerneylon[P]APIsWithLua/lua/lapi.c
// Function: index2addr
static TValue *index2addr (lua_State *L, int idx) {
  CallInfo *ci = L->ci;
  if (idx > 0) {
    TValue *o = ci->func + idx;
    api_check(L, idx <= ci->top - (ci->func + 1), "unacceptable index");
    if (o >= L->top) return NONVALIDVALUE;
    else return o;
  }
  else if (!ispseudo(idx)) {  /* negative index */
    api_check(L, idx != 0 && -idx <= L->top - (ci->func + 1), "invalid index");
    return L->top + idx;
  }
  else if (idx == LUA_REGISTRYINDEX)
    return &G(L)->l_registry;
  else {  /* upvalues */
    idx = LUA_REGISTRYINDEX - idx;
    api_check(L, idx <= MAXUPVAL + 1, "upvalue index too large");
    if (ttislcf(ci->func))  /* light C function? */
      return NONVALIDVALUE;  /* it has no upvalues */
    else {
      CClosure *func = clCvalue(ci->func);
      return (idx <= func->nupvalues) ? &func->upvalue[idx-1] : NONVALIDVALUE;
    }
  }
}

// Assembly:
movq 0x20(%rdi), %rax
testl %esi, %esi
jle 0x5e9e
movl %esi, %ecx
shlq $0x4, %rcx
addq (%rax), %rcx
cmpq 0x10(%rdi), %rcx
leaq 0x1b787(%rip), %rax     # 0x21620
cmovbq %rcx, %rax
retq
cmpl $0xfff0b9d9, %esi       # imm = 0xFFF0B9D9
jge 0x5eb7
cmpl $0xfff0b9d8, %esi       # imm = 0xFFF0B9D8
jne 0x5ec3
movq 0x18(%rdi), %rax
addq $0x40, %rax
retq
movslq %esi, %rax
shlq $0x4, %rax
addq 0x10(%rdi), %rax
retq
movq (%rax), %rax
cmpl $0x16, 0x8(%rax)
jne 0x5ed4
leaq 0x1b74d(%rip), %rax     # 0x21620
retq
movl $0xfff0b9d8, %ecx       # imm = 0xFFF0B9D8
subl %esi, %ecx
movq (%rax), %rax
movzbl 0xa(%rax), %edx
movl $0xfff0b9d7, %edi       # imm = 0xFFF0B9D7
subl %esi, %edi
shlq $0x4, %rdi
cmpl %edx, %ecx
leaq 0x20(%rax,%rdi), %rcx
leaq 0x1b725(%rip), %rax     # 0x21620
cmovleq %rcx, %rax
retq
// File: /workspace/github_c_makefile_star2_O1/tylerneylon[P]APIsWithLua/lua/lapi.c
// Function: lua_copy
LUA_API void lua_copy (lua_State *L, int fromidx, int toidx) {
  TValue *fr, *to;
  lua_lock(L);
  fr = index2addr(L, fromidx);
  to = index2addr(L, toidx);
  api_checkvalidindex(L, to);
  setobj(L, to, fr);
  if (isupvalue(toidx))  /* function upvalue? */
    luaC_barrier(L, clCvalue(L->ci->func), fr);
  /* LUA_REGISTRYINDEX does not need gc barrier
     (collector revisits it before finishing collection) */
  lua_unlock(L);
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movl %edx, %ebp
movq %rdi, %rbx
callq 0x5e7d
movq %rax, %r14
movq %rbx, %rdi
movl %ebp, %esi
callq 0x5e7d
movups (%r14), %xmm0
movups %xmm0, (%rax)
cmpl $0xfff0b9d7, %ebp       # imm = 0xFFF0B9D7
jg 0x5f56
testb $0x40, 0x8(%r14)
je 0x5f56
movq 0x20(%rbx), %rax
movq (%rax), %rax
movq (%rax), %rsi
testb $0x4, 0x9(%rsi)
je 0x5f56
movq (%r14), %rdx
testb $0x3, 0x9(%rdx)
je 0x5f56
movq %rbx, %rdi
popq %rbx
popq %r14
popq %rbp
jmp 0x9ddc
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/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
cmpl $-0x2, %eax
jb 0x60a6
movq 0x10(%rbx), %rax
movups -0x10(%rax), %xmm0
movups %xmm0, (%rax)
addq $0x10, 0x10(%rbx)
movq 0x10(%rbx), %rcx
leaq -0x20(%rcx), %rdx
addq $-0x10, %rcx
movq %rbx, %rdi
movq %rdx, %r8
callq 0xb519
addq $-0x10, 0x10(%rbx)
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O1/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 0x5e7d
movq %rax, %r14
movq %rbx, %rdi
movl %r15d, %esi
callq 0x5e7d
leaq 0x1b533(%rip), %rcx     # 0x21620
cmpq %rcx, %r14
setne %dl
cmpq %rcx, %rax
setne %cl
andb %dl, %cl
cmpb $0x1, %cl
jne 0x6126
cmpl $0x2, %ebp
je 0x614b
cmpl $0x1, %ebp
je 0x6133
testl %ebp, %ebp
jne 0x6126
movq %rbx, %rdi
movq %r14, %rsi
movq %rax, %rdx
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0x11583
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 0x111e5
movq %rbx, %rdi
movq %r14, %rsi
movq %rax, %rdx
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0x113df
// File: /workspace/github_c_makefile_star2_O1/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 0xb811
testq %rax, %rax
je 0x6180
addq $0x10, 0x10(%rbx)
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O1/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 0x5e7d
cmpl $0x3, 0x8(%rax)
jne 0x61a6
movsd (%rax), %xmm0
movsd %xmm0, 0x8(%rsp)
movl $0x1, %eax
jmp 0x61b3
leaq 0x8(%rsp), %rsi
movq %rax, %rdi
callq 0x10da8
testl %eax, %eax
jne 0x61c0
movq $0x0, 0x8(%rsp)
testq %rbx, %rbx
je 0x61c7
movl %eax, (%rbx)
movsd 0x8(%rsp), %xmm0
addq $0x10, %rsp
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O1/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 0x5e7d
cmpl $0x13, 0x8(%rax)
jne 0x61f5
movq (%rax), %rax
movq %rax, 0x8(%rsp)
movl $0x1, %eax
jmp 0x6204
leaq 0x8(%rsp), %rsi
movq %rax, %rdi
xorl %edx, %edx
callq 0x10e26
testl %eax, %eax
jne 0x6211
movq $0x0, 0x8(%rsp)
testq %rbx, %rbx
je 0x6218
movl %eax, (%rbx)
movq 0x8(%rsp), %rax
addq $0x10, %rsp
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O1/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 0x5e7d
movl 0x8(%rax), %ecx
andl $0xf, %ecx
cmpl $0x3, %ecx
je 0x627a
cmpl $0x4, %ecx
je 0x62a2
testq %rbx, %rbx
je 0x6276
movq $0x0, (%rbx)
xorl %eax, %eax
jmp 0x62c4
movq %r14, %rdi
movq %rax, %rsi
callq 0xbabd
movq 0x18(%r14), %rax
cmpq $0x0, 0x18(%rax)
jle 0x6298
movq %r14, %rdi
callq 0xa65d
movq %r14, %rdi
movl %ebp, %esi
callq 0x5e7d
testq %rbx, %rbx
je 0x62bd
movq (%rax), %rcx
cmpb $0x4, 0x8(%rcx)
jne 0x62b6
movzbl 0xb(%rcx), %ecx
jmp 0x62ba
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_O1/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 0x5e7d
movq %rax, %rcx
movl 0x8(%rax), %edx
andl $0x3f, %edx
xorl %eax, %eax
cmpl $0x6, %edx
jg 0x62f5
cmpl $0x4, %edx
je 0x6308
cmpl $0x5, %edx
jne 0x6318
movq (%rcx), %rdi
callq 0x1012b
cltq
jmp 0x6318
cmpl $0x7, %edx
je 0x6311
cmpl $0x14, %edx
jne 0x6318
movq (%rcx), %rax
movq 0x10(%rax), %rax
jmp 0x6318
movq (%rcx), %rax
movzbl 0xb(%rax), %eax
jmp 0x6318
movq (%rcx), %rax
movq 0x18(%rax), %rax
popq %rcx
retq
// File: /workspace/github_c_makefile_star2_O1/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 0x5e7d
movl 0x8(%rax), %ecx
cmpl $0x16, %ecx
je 0x6334
cmpl $0x66, %ecx
jne 0x6339
movq (%rax), %rax
addq $0x18, %rax
movq (%rax), %rax
jmp 0x633b
xorl %eax, %eax
popq %rcx
retq
// File: /workspace/github_c_makefile_star2_O1/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 0x5e7d
movl 0x8(%rax), %ecx
andl $0xf, %ecx
cmpl $0x2, %ecx
je 0x635c
cmpl $0x7, %ecx
jne 0x6361
movq (%rax), %rax
addq $0x28, %rax
jmp 0x6363
movq (%rax), %rax
jmp 0x6363
xorl %eax, %eax
popq %rcx
retq
// File: /workspace/github_c_makefile_star2_O1/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 0x5e7d
movq %rax, %rcx
movl 0x8(%rax), %edx
andl $0x3f, %edx
xorl %eax, %eax
leal -0x2(%rdx), %esi
cmpl $0x6, %esi
ja 0x63a8
leaq 0x1ad46(%rip), %rdx     # 0x210e0
movslq (%rdx,%rsi,4), %rsi
addq %rdx, %rsi
jmpq *%rsi
movq (%rcx), %rax
popq %rcx
retq
cmpl $0x16, %edx
je 0x63a3
cmpl $0x26, %edx
je 0x63a3
jmp 0x63a6
movq (%rcx), %rax
addq $0x28, %rax
jmp 0x63a6
// File: /workspace/github_c_makefile_star2_O1/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 0x6410
movq %rbx, %rdi
callq 0xf2f1
jmp 0x641f
leaq 0x1d8b1(%rip), %rsi     # 0x23cc8
movq %rbx, %rdi
callq 0xf52a
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 0x644c
movq %rbx, %rdi
callq 0xa65d
addq $0x18, %r14
movq %r14, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O1/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 0x648a
movq %rbx, %rdi
callq 0xf52a
movq %rax, %r14
movq 0x10(%rbx), %rax
movq %r14, (%rax)
movzbl 0x8(%r14), %ecx
orl $0x40, %ecx
movl %ecx, 0x8(%rax)
addq $0x18, %r14
jmp 0x6498
movq 0x10(%rbx), %rax
movl $0x0, 0x8(%rax)
xorl %r14d, %r14d
addq $0x10, 0x10(%rbx)
movq 0x18(%rbx), %rax
cmpq $0x0, 0x18(%rax)
jle 0x64b0
movq %rbx, %rdi
callq 0xa65d
movq %r14, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O1/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 0xbb66
movq %rax, %r14
movq 0x18(%rbx), %rax
cmpq $0x0, 0x18(%rax)
jle 0x64dd
movq %rbx, %rdi
callq 0xa65d
movq %r14, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O1/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 0x6545
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 0xbb66
movq %rax, %r14
movq 0x18(%rbx), %rax
cmpq $0x0, 0x18(%rax)
jle 0x6583
movq %rbx, %rdi
callq 0xa65d
movq %r14, %rax
addq $0xd8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O1/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 0x65de
movl %edx, %ebp
movq %rbx, %rdi
movl %edx, %esi
callq 0x9af8
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 0x65bd
movl $0x66, %ecx
movq %rax, %r14
jmp 0x65e3
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 0x6609
movq %rbx, %rdi
popq %rbx
popq %r14
popq %rbp
jmp 0xa65d
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/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 0xf52a
movq %rax, %r15
cmpl $0x45, 0x8(%r14)
jne 0x66d1
movq (%r14), %rdi
movq %r15, %rsi
callq 0x10020
movq %rax, %r8
cmpl $0x0, 0x8(%rax)
je 0x66d4
movq 0x10(%rbx), %rax
movups (%r8), %xmm0
movups %xmm0, (%rax)
addq $0x10, 0x10(%rbx)
jmp 0x6700
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 0x10f20
movq 0x10(%rbx), %rax
movl -0x8(%rax), %eax
andl $0xf, %eax
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/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 0x5e7d
movq %rax, %r14
cmpl $0x45, 0x8(%rax)
jne 0x674c
movq (%r14), %rdi
movq 0x10(%rbx), %rsi
addq $-0x10, %rsi
callq 0x10094
movq %rax, %r8
cmpl $0x0, 0x8(%rax)
je 0x674f
movq 0x10(%rbx), %rax
movups (%r8), %xmm0
movups %xmm0, -0x10(%rax)
jmp 0x6765
xorl %r8d, %r8d
movq 0x10(%rbx), %rcx
addq $-0x10, %rcx
movq %rbx, %rdi
movq %r14, %rsi
movq %rcx, %rdx
callq 0x10f20
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_O1/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 0x5e7d
movq %rax, %r15
cmpl $0x45, 0x8(%rax)
jne 0x67da
movq (%r15), %rdi
movq %r14, %rsi
callq 0xff77
movq %rax, %r8
cmpl $0x0, 0x8(%rax)
je 0x67dd
movq 0x10(%rbx), %rax
movups (%r8), %xmm0
movups %xmm0, (%rax)
addq $0x10, 0x10(%rbx)
jmp 0x6805
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 0x10f20
movq 0x10(%rbx), %rax
movl -0x8(%rax), %eax
andl $0xf, %eax
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/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 0x5e7d
movq 0x10(%rbx), %r14
leaq -0x10(%r14), %rsi
movq (%rax), %rdi
callq 0x10094
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_O1/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 0x5e7d
movq 0x10(%r14), %r15
movq (%rax), %rdi
movq %rbx, %rsi
callq 0xff77
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_O1/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 0x5e7d
leaq 0x8(%rsp), %rsi
movq %rbx, (%rsi)
movl $0x2, 0x8(%rsi)
movq 0x10(%r14), %rbx
movq (%rax), %rdi
callq 0x10094
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_O1/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 0xfa85
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 0x6919
movq %rbx, %rdi
movq %rax, %rsi
movl %r14d, %edx
movl %ebp, %ecx
callq 0xf78b
movq 0x18(%rbx), %rax
cmpq $0x0, 0x18(%rax)
jle 0x6930
movq %rbx, %rdi
popq %rbx
popq %r14
popq %rbp
jmp 0xa65d
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/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 0x5e7d
movl 0x8(%rax), %ecx
andl $0xf, %ecx
cmpq $0x7, %rcx
je 0x6958
cmpl $0x5, %ecx
jne 0x6961
movq (%rax), %rax
addq $0x28, %rax
jmp 0x696f
movq (%rax), %rax
addq $0x10, %rax
jmp 0x696f
movq 0x18(%rbx), %rax
leaq (%rax,%rcx,8), %rax
addq $0x1a0, %rax            # imm = 0x1A0
movq (%rax), %rax
testq %rax, %rax
je 0x6991
movq 0x10(%rbx), %rcx
movq %rax, (%rcx)
movl $0x45, 0x8(%rcx)
addq $0x10, 0x10(%rbx)
movl $0x1, %eax
jmp 0x6993
xorl %eax, %eax
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O1/tylerneylon[P]APIsWithLua/lua/lapi.c
// Function: lua_getuservalue
LUA_API int lua_getuservalue (lua_State *L, int idx) {
  StkId o;
  lua_lock(L);
  o = index2addr(L, idx);
  api_check(L, ttisfulluserdata(o), "full userdata expected");
  getuservalue(L, uvalue(o), L->top);
  api_incr_top(L);
  lua_unlock(L);
  return ttnov(L->top - 1);
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
callq 0x5e7d
movq 0x10(%rbx), %rcx
movq (%rax), %rax
movq 0x20(%rax), %rdx
movq %rdx, (%rcx)
movzbl 0xa(%rax), %eax
movl %eax, 0x8(%rcx)
movq 0x10(%rbx), %rax
leaq 0x10(%rax), %rcx
movq %rcx, 0x10(%rbx)
movl 0x8(%rax), %eax
andl $0xf, %eax
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O1/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 0xf52a
movq %rax, %r12
cmpl $0x45, 0x8(%r15)
jne 0x6a68
movq (%r15), %rdi
movq %r12, %rsi
callq 0x10020
movq %rax, %r14
cmpl $0x0, 0x8(%rax)
je 0x6a6b
leaq 0x10(%rbx), %r13
movq 0x10(%rbx), %rax
testb $0x40, -0x8(%rax)
je 0x6a53
movq (%r15), %rsi
testb $0x4, 0x9(%rsi)
je 0x6a53
movq -0x10(%rax), %rax
testb $0x3, 0x9(%rax)
je 0x6a53
movq %rbx, %rdi
callq 0x9ee6
movq (%r13), %rax
movups -0x10(%rax), %xmm0
movups %xmm0, (%r14)
movq $-0x10, %rax
jmp 0x6aa7
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 0x11032
movq $-0x20, %rax
addq %rax, (%r13)
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/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 0x5e7d
movq %rax, %r15
cmpl $0x45, 0x8(%rax)
jne 0x6b17
movq (%r15), %rdi
movq 0x10(%rbx), %rsi
addq $-0x20, %rsi
callq 0x10094
movq %rax, %r14
cmpl $0x0, 0x8(%rax)
je 0x6b1a
movq 0x10(%rbx), %rax
testb $0x40, -0x8(%rax)
je 0x6b09
movq (%r15), %rsi
testb $0x4, 0x9(%rsi)
je 0x6b09
movq -0x10(%rax), %rax
testb $0x3, 0x9(%rax)
je 0x6b09
movq %rbx, %rdi
callq 0x9ee6
movq 0x10(%rbx), %rax
movups -0x10(%rax), %xmm0
movups %xmm0, (%r14)
jmp 0x6b34
xorl %r14d, %r14d
movq 0x10(%rbx), %rcx
leaq -0x20(%rcx), %rdx
addq $-0x10, %rcx
movq %rbx, %rdi
movq %r15, %rsi
movq %r14, %r8
callq 0x11032
addq $-0x20, 0x10(%rbx)
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/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 0x5e7d
movq %rax, %r15
cmpl $0x45, 0x8(%rax)
jne 0x6bd2
movq (%r15), %rdi
movq %r12, %rsi
callq 0xff77
movq %rax, %r14
cmpl $0x0, 0x8(%rax)
je 0x6bd5
leaq 0x10(%rbx), %r13
movq 0x10(%rbx), %rax
testb $0x40, -0x8(%rax)
je 0x6bbd
movq (%r15), %rsi
testb $0x4, 0x9(%rsi)
je 0x6bbd
movq -0x10(%rax), %rax
testb $0x3, 0x9(%rax)
je 0x6bbd
movq %rbx, %rdi
callq 0x9ee6
movq (%r13), %rax
movups -0x10(%rax), %xmm0
movups %xmm0, (%r14)
movq $-0x10, %rax
jmp 0x6c0c
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 0x11032
movq $-0x20, %rax
addq %rax, (%r13)
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/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 0x5e7d
movq %rax, %r14
movq (%rax), %rsi
movq 0x10(%rbx), %rdx
addq $-0x20, %rdx
movq %rbx, %rdi
callq 0xfa25
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 0x6c73
movq (%r14), %rsi
testb $0x4, 0x9(%rsi)
je 0x6c73
movq -0x10(%rax), %rax
testb $0x3, 0x9(%rax)
je 0x6c73
movq %rbx, %rdi
callq 0x9ee6
addq $-0x20, 0x10(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O1/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 0x5e7d
movq %rax, %r14
movq (%rax), %rsi
movq 0x10(%rbx), %rcx
addq $-0x10, %rcx
movq %rbx, %rdi
movq %r15, %rdx
callq 0xf9cb
movq 0x10(%rbx), %rax
testb $0x40, -0x8(%rax)
je 0x6cce
movq (%r14), %rsi
testb $0x4, 0x9(%rsi)
je 0x6cce
movq -0x10(%rax), %rax
testb $0x3, 0x9(%rax)
je 0x6cce
movq %rbx, %rdi
callq 0x9ee6
addq $-0x10, 0x10(%rbx)
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/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 0x5e7d
movq %rax, %r14
movq %rsp, %rdx
movq %r15, (%rdx)
movl $0x2, 0x8(%rdx)
movq (%rax), %rsi
movq %rbx, %rdi
callq 0xfa25
movq 0x10(%rbx), %rcx
movups -0x10(%rcx), %xmm0
movups %xmm0, (%rax)
movq 0x10(%rbx), %rax
testb $0x40, -0x8(%rax)
je 0x6d38
movq (%r14), %rsi
testb $0x4, 0x9(%rsi)
je 0x6d38
movq -0x10(%rax), %rax
testb $0x3, 0x9(%rax)
je 0x6d38
movq %rbx, %rdi
callq 0x9ee6
addq $-0x10, 0x10(%rbx)
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/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 0x5e7d
movq %rax, %r15
movq 0x10(%rbx), %rax
cmpl $0x0, -0x8(%rax)
je 0x6d67
movq -0x10(%rax), %r14
jmp 0x6d6a
xorl %r14d, %r14d
movl 0x8(%r15), %eax
andl $0xf, %eax
cmpq $0x7, %rax
je 0x6d85
cmpl $0x5, %eax
jne 0x6dbc
movq (%r15), %rax
movq %r14, 0x28(%rax)
jmp 0x6d8c
movq (%r15), %rax
movq %r14, 0x10(%rax)
testq %r14, %r14
je 0x6dc8
movq (%r15), %rsi
testb $0x4, 0x9(%rsi)
je 0x6dac
testb $0x3, 0x9(%r14)
je 0x6dac
movq %rbx, %rdi
movq %r14, %rdx
callq 0x9ddc
movq (%r15), %rsi
movq %rbx, %rdi
movq %r14, %rdx
callq 0x9f8c
jmp 0x6dc8
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_O1/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 0x5e7d
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 0x6e1b
movq (%rax), %rsi
testb $0x4, 0x9(%rsi)
je 0x6e1b
movq -0x10(%rcx), %rdx
testb $0x3, 0x9(%rdx)
je 0x6e1b
movq %rbx, %rdi
callq 0x9ddc
addq $-0x10, 0x10(%rbx)
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O1/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 0x6e46
cmpw $0x0, 0xc4(%rbx)
je 0x6e52
movq %rbx, %rdi
movl %ebp, %edx
callq 0x8dac
jmp 0x6e6c
movq 0x20(%rbx), %rax
movq %r8, 0x20(%rax)
movq 0x20(%rbx), %rax
movq %rcx, 0x30(%rax)
movq %rbx, %rdi
movl %ebp, %edx
callq 0x8d4a
cmpl $-0x1, %ebp
jne 0x6e83
movq 0x10(%rbx), %rax
movq 0x20(%rbx), %rcx
cmpq %rax, 0x8(%rcx)
jae 0x6e83
movq %rax, 0x8(%rcx)
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/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 0x6ebb
movq %rbx, %rdi
movl %ecx, %esi
callq 0x5e7d
movq %rax, %r8
subq 0x38(%rbx), %r8
jmp 0x6ebe
xorl %r8d, %r8d
notl %r12d
movslq %r12d, %rcx
shlq $0x4, %rcx
addq 0x10(%rbx), %rcx
movq %rcx, (%rsp)
testq %r15, %r15
je 0x6edf
cmpw $0x0, 0xc4(%rbx)
je 0x6efa
movq %rsp, %rdx
movl %ebp, 0x8(%rdx)
subq 0x38(%rbx), %rcx
leaq 0x90(%rip), %rsi        # 0x6f80
movq %rbx, %rdi
callq 0x90f3
jmp 0x6f5c
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 0x8d4a
andb $-0x11, 0x42(%r12)
movq 0x28(%r12), %rax
movq %rax, 0xb0(%rbx)
xorl %eax, %eax
cmpl $-0x1, %ebp
jne 0x6f73
movq 0x10(%rbx), %rcx
movq 0x20(%rbx), %rdx
cmpq %rcx, 0x8(%rdx)
jae 0x6f73
movq %rcx, 0x8(%rdx)
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq