LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O2/xiane[P]libvphevcodec/vdi.cpp
// Function: vdi_wait_bus_busy(unsigned int, unsigned int, unsigned int)
s32 vdi_wait_bus_busy(u32 core_idx, u32 timeoutMs, u32 gdi_busy_flag) {
    ulong elapse, cur;
    struct timeval tv;
    vdi_info_t *vdi;

    vdi = &s_vdi_info[core_idx];
    tv.tv_sec = 0;
    tv.tv_usec = 0;
    gettimeofday(&tv, NULL);
    elapse = tv.tv_sec * 1000 + tv.tv_usec / 1000;

    while (1) {
        if (vdi_fio_read_register(core_idx, gdi_busy_flag) == 0x738)
            break;
        gettimeofday(&tv, NULL);
        cur = tv.tv_sec * 1000 + tv.tv_usec / 1000;
        if ((cur - elapse) > timeoutMs) {
            VLOG(ERR, "[VDI] vdi_wait_bus_busy timeout, timeoutMs: %d, PC=0x%x",
                                                     timeoutMs, vdi_read_register(core_idx, W4_VCPU_CUR_PC));
            return -1;
        }
        usleep(5);
    }
    return 0;

}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movl %edx, %r15d
movl %esi, %ebx
movl %edi, %ebp
xorps %xmm0, %xmm0
leaq 0x10(%rsp), %r12
movaps %xmm0, (%r12)
movq %r12, %rdi
xorl %esi, %esi
callq 0x22c0
movq (%r12), %r14
movq 0x8(%r12), %rax
movq $-0x3e8, %rcx           # imm = 0xFC18
cqto
idivq %rcx
movq %rax, %r13
movl %ebx, 0xc(%rsp)
movl %ebx, %r12d
movl $0x3e8, %ebx            # imm = 0x3E8
movl %ebp, %edi
movl %r15d, %esi
callq 0x2030
cmpl $0x738, %eax            # imm = 0x738
je 0x7b7d
leaq 0x10(%rsp), %rdi
xorl %esi, %esi
callq 0x22c0
movq 0x10(%rsp), %rcx
movq 0x18(%rsp), %rax
cqto
idivq %rbx
subq %r14, %rcx
imulq $0x3e8, %rcx, %rcx      # imm = 0x3E8
addq %r13, %rcx
addq %rax, %rcx
cmpq %r12, %rcx
ja 0x7b81
pushq $0x5
popq %rdi
callq 0x2250
jmp 0x7b32
xorl %eax, %eax
jmp 0x7baa
pushq $0x4
popq %rsi
movl %ebp, %edi
callq 0x2210
leaq 0x24b91(%rip), %rdi     # 0x2c723
movl 0xc(%rsp), %esi
movl %eax, %edx
xorl %eax, %eax
callq 0x2050
pushq $0xa
popq %rdi
callq 0x2230
pushq $-0x1
popq %rax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/xiane[P]libvphevcodec/vdi.cpp
// Function: vdi_wait_vpu_busy(unsigned int, unsigned int, unsigned int)
s32 vdi_wait_vpu_busy(u32 core_idx, u32 timeoutMs, u32 addr_bit_busy_flag) {
    ulong elapse, cur;
    struct timeval tv;
    s32 i;
    u32 normalReg = 1;
    tv.tv_sec = 0;
    tv.tv_usec = 0;
    gettimeofday(&tv, NULL);
    elapse = tv.tv_sec * 1000 + tv.tv_usec / 1000;

    if (addr_bit_busy_flag & 0x8000)
        normalReg = 0;

    i = 0;
    while (1) {
        if (normalReg == 1) {
            if (vdi_read_register(core_idx, addr_bit_busy_flag) == 0)
                break;
        } else {
            if (vdi_fio_read_register(core_idx, addr_bit_busy_flag) == 0)
                break;
        }
        i++;
        gettimeofday(&tv, NULL);
        cur = tv.tv_sec * 1000 + tv.tv_usec / 1000;
        if ((cur - elapse) > timeoutMs) {
            for (i = 0; i < 20; i++) {
                VLOG(ERR, "[VDI] vdi_wait_vpu_busy timeout, timeoutMs: %d, PC=0x%x",
						timeoutMs, vdi_read_register(core_idx, W4_VCPU_CUR_PC));
            }
            return -1;
        }
        usleep(5);
    }
    VLOG(DEBUG, "[VDI] vdi_wait_vpu_busy i = %d", i);
    return 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movl %edx, %r14d
movl %esi, %ebx
movl %edi, %ebp
xorps %xmm0, %xmm0
movq %rsp, %r15
movaps %xmm0, (%r15)
movq %r15, %rdi
xorl %esi, %esi
callq 0x22c0
movq (%r15), %r13
movq 0x8(%r15), %rax
movq $-0x3e8, %rcx           # imm = 0xFC18
cqto
idivq %rcx
movq %rax, %r12
movl %ebx, %r15d
movl %ebp, %edi
movl %r14d, %esi
testw %r14w, %r14w
js 0x7c0d
callq 0x2210
jmp 0x7c12
callq 0x2030
testl %eax, %eax
je 0x7c52
movq %rsp, %rdi
xorl %esi, %esi
callq 0x22c0
movq (%rsp), %rcx
movq 0x8(%rsp), %rax
cqto
movl $0x3e8, %esi            # imm = 0x3E8
idivq %rsi
subq %r13, %rcx
imulq $0x3e8, %rcx, %rcx      # imm = 0x3E8
addq %r12, %rcx
addq %rax, %rcx
cmpq %r15, %rcx
ja 0x7c56
pushq $0x5
popq %rdi
callq 0x2250
jmp 0x7bfb
xorl %eax, %eax
jmp 0x7c94
pushq $0x14
popq %r14
pushq $0x4
popq %r15
leaq 0x24af6(%rip), %r12     # 0x2c75b
pushq $0xa
popq %r13
subl $0x1, %r14d
jb 0x7c91
movl %ebp, %edi
movl %r15d, %esi
callq 0x2210
movq %r12, %rdi
movl %ebx, %esi
movl %eax, %edx
xorl %eax, %eax
callq 0x2050
movl %r13d, %edi
callq 0x2230
jmp 0x7c69
pushq $-0x1
popq %rax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/xiane[P]libvphevcodec/vdi.cpp
// Function: vdi_wait_interrupt(unsigned int, unsigned int)
s32 vdi_wait_interrupt(u32 coreIdx, u32 timeout) {
    s32 intr_reason = 0;
    s32 ret;
    vdi_info_t *vdi;
    vpudrv_intr_info_t intr_info;

    if (coreIdx >= MAX_NUM_VPU_CORE)
        return -1;

    vdi = &s_vdi_info[coreIdx];
    if (!vdi || vdi->vpu_fd < 0 || vdi->opened == 0)
        return -1;

    intr_info.timeout = timeout;
    intr_info.intr_reason = 0;
    ret = ioctl(vdi->vpu_fd, VDI_IOCTL_WAIT_INTERRUPT, (void*) &intr_info);
    if (ret != 0)
        return -1;

    intr_reason = intr_info.intr_reason;
    return intr_reason;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
pushq $-0x1
popq %rbx
testl %edi, %edi
jne 0x7ce5
movl 0x27550(%rip), %edi     # 0x2f204
testl %edi, %edi
js 0x7ce5
cmpb $0x0, 0x27549(%rip)     # 0x2f208
je 0x7ce5
movq %rsp, %r14
movl %esi, (%r14)
andl $0x0, 0x4(%r14)
xorl %ebx, %ebx
movl $0x40085602, %esi       # imm = 0x40085602
movq %r14, %rdx
xorl %eax, %eax
callq 0x2240
negl %eax
sbbl %ebx, %ebx
orl 0x4(%r14), %ebx
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O2/xiane[P]libvphevcodec/vdi.cpp
// Function: flush_memory(unsigned int, vpu_buffer_t*)
s32 flush_memory(u32 core_idx, vpu_buffer_t *vb) {
    vdi_info_t *vdi;
    s32 i, ret = -1;
    vpu_buffer_t vdb;

    if (core_idx >= MAX_NUM_VPU_CORE)
        return -1;

    vdi = &s_vdi_info[core_idx];
    if (!vdi || vdi->vpu_fd < 0 || vdi->opened == 0)
        return -1;

    memset(&vdb, 0x00, sizeof(vpu_buffer_t));

    for (i = 0; i < MAX_VPU_BUFFER_POOL; i++) {
        if (vdi->vpu_buffer_pool[i].vdb.phys_addr == vb->phys_addr) {
            vdb = vdi->vpu_buffer_pool[i].vdb;
            break;
        }
    }
    VLOG(DEBUG, "[VDI] flush_memory vdb.size = %d", vdb.size);
    if (vdb.size > 0)
        ret = ioctl(vdi->vpu_fd, VDI_IOCTL_FLUSH_BUFFER, (void*) &vdb);
    return ret;
}

// Assembly:
pushq $-0x1
popq %rax
testl %edi, %edi
je 0x7cf7
retq
movl 0x27507(%rip), %edi     # 0x2f204
testl %edi, %edi
js 0x7cf6
cmpb $0x0, 0x27500(%rip)     # 0x2f208
je 0x7cf6
movq 0x8(%rsi), %rdx
movl $0x88, %esi
leaq 0x274e6(%rip), %rcx     # 0x2f200
leaq 0x28(%rsi), %r8
cmpq $0x28b0, %r8            # imm = 0x28B0
je 0x7cf6
cmpq %rdx, (%rsi,%rcx)
movq %r8, %rsi
jne 0x7d1a
subq $0x28, %rsp
movups -0x30(%r8,%rcx), %xmm0
movups -0x20(%r8,%rcx), %xmm1
movaps %xmm0, (%rsp)
movaps %xmm1, 0x10(%rsp)
cmpl $0x0, (%rsp)
je 0x7d5e
movq %rsp, %rdx
movl $0x4020560d, %esi       # imm = 0x4020560D
xorl %eax, %eax
callq 0x2240
addq $0x28, %rsp
retq
// File: /workspace/github_c_makefile_star2_O2/bhk[P]tooltree/lua/../opensource/lua-5.2.3/src/lua.c
// Function: main
int main (int argc, char **argv) {
  int status, result;
  lua_State *L = luaL_newstate();  /* create state */
  if (L == NULL) {
    l_message(argv[0], "cannot create state: not enough memory");
    return EXIT_FAILURE;
  }
  /* call 'pmain' in protected mode */
  lua_pushcfunction(L, &pmain);
  lua_pushinteger(L, argc);  /* 1st argument */
  lua_pushlightuserdata(L, argv); /* 2nd argument */
  status = lua_pcall(L, 2, 1, 0);
  result = lua_toboolean(L, -1);  /* get result */
  finalreport(L, status);
  lua_close(L);
  return (result && status == LUA_OK) ? EXIT_SUCCESS : EXIT_FAILURE;
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movq %rsi, %r14
movl %edi, %ebp
callq 0x9fc5
testq %rax, %rax
je 0x6772
movq %rax, %rbx
leaq 0x11a(%rip), %rsi       # 0x6823
movq %rax, %rdi
xorl %edx, %edx
callq 0x7cba
movslq %ebp, %rsi
movq %rbx, %rdi
callq 0x7af1
movq %rbx, %rdi
movq %r14, %rsi
callq 0x7d57
pushq $0x2
popq %rsi
pushq $0x1
popq %rdx
movq %rbx, %rdi
xorl %ecx, %ecx
xorl %r8d, %r8d
xorl %r9d, %r9d
callq 0x83be
movl %eax, %ebp
pushq $-0x1
popq %rsi
movq %rbx, %rdi
callq 0x7943
movl %eax, %r14d
testl %ebp, %ebp
je 0x67ad
pushq $-0x1
popq %rsi
movq %rbx, %rdi
callq 0x7624
cmpl $0x4, %eax
jne 0x6786
pushq $-0x1
popq %rsi
movq %rbx, %rdi
xorl %edx, %edx
callq 0x7967
jmp 0x6788
movq (%r14), %rdi
leaq 0x17894(%rip), %rsi     # 0x1e010
callq 0x67ca
pushq $0x1
popq %rax
jmp 0x67c5
xorl %eax, %eax
testq %rax, %rax
leaq 0x17ab8(%rip), %rsi     # 0x1e24a
cmovneq %rax, %rsi
movq 0x26b6b(%rip), %rdi     # 0x2d308
callq 0x67ca
pushq $-0x2
popq %rsi
movq %rbx, %rdi
callq 0x7437
movq %rbx, %rdi
callq 0x135c7
testl %r14d, %r14d
sete %al
testl %ebp, %ebp
setne %cl
orb %al, %cl
movzbl %cl, %eax
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/bhk[P]tooltree/lua/../opensource/lua-5.2.3/src/lua.c
// Function: docall
static int docall (lua_State *L, int narg, int nres) {
  int status;
  int base = lua_gettop(L) - narg;  /* function index */
  lua_pushcfunction(L, traceback);  /* push traceback function */
  lua_insert(L, base);  /* put it under chunk and args */
  globalL = L;  /* to be available to 'laction' */
  signal(SIGINT, laction);
  status = lua_pcall(L, narg, nres, base);
  signal(SIGINT, SIG_DFL);
  lua_remove(L, base);  /* remove traceback function */
  return status;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movl %edx, %r14d
movl %esi, %r15d
movq %rdi, %rbx
callq 0x7423
movl %eax, %ebp
subl %r15d, %ebp
leaq 0xc9(%rip), %rsi        # 0x7161
movq %rbx, %rdi
xorl %edx, %edx
callq 0x7cba
movq %rbx, %rdi
movl %ebp, %esi
callq 0x7537
movq %rbx, 0x26265(%rip)     # 0x2d318
leaq 0x109(%rip), %rsi       # 0x71c3
pushq $0x2
popq %r12
movl %r12d, %edi
callq 0x62e0
movq %rbx, %rdi
movl %r15d, %esi
movl %r14d, %edx
movl %ebp, %ecx
xorl %r8d, %r8d
xorl %r9d, %r9d
callq 0x83be
movl %eax, %r14d
movl %r12d, %edi
xorl %esi, %esi
callq 0x62e0
movq %rbx, %rdi
movl %ebp, %esi
callq 0x7485
movl %r14d, %eax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/bhk[P]tooltree/lua/../opensource/lua-5.2.3/src/lua.c
// Function: report
static int report (lua_State *L, int status) {
  if (status != LUA_OK && !lua_isnil(L, -1)) {
    const char *msg = lua_tostring(L, -1);
    if (msg == NULL) msg = "(error object is not a string)";
    l_message(progname, msg);
    lua_pop(L, 1);
    /* force a complete garbage collection in case of errors */
    lua_gc(L, LUA_GCCOLLECT, 0);
  }
  return status;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movl %esi, %ebx
testl %esi, %esi
je 0x7157
movq %rdi, %r14
pushq $-0x1
popq %rsi
callq 0x7624
testl %eax, %eax
je 0x7157
pushq $-0x1
popq %rsi
movq %r14, %rdi
xorl %edx, %edx
callq 0x7967
testq %rax, %rax
leaq 0x1711b(%rip), %rsi     # 0x1e24a
cmovneq %rax, %rsi
movq 0x261ce(%rip), %rdi     # 0x2d308
callq 0x67ca
pushq $-0x2
popq %rsi
movq %r14, %rdi
callq 0x7437
pushq $0x2
popq %rsi
movq %r14, %rdi
xorl %edx, %edx
callq 0x858f
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O2/bhk[P]tooltree/lua/../opensource/lua-5.2.3/src/lua.c
// Function: traceback
static int traceback (lua_State *L) {
  const char *msg = lua_tostring(L, 1);
  if (msg)
    luaL_traceback(L, L, msg, 1);
  else if (!lua_isnoneornil(L, 1)) {  /* is there an error object? */
    if (!luaL_callmeta(L, 1, "__tostring"))  /* try its 'tostring' metamethod */
      lua_pushliteral(L, "(no error message)");
  }
  return 1;
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
pushq $0x1
popq %rsi
xorl %edx, %edx
callq 0x7967
testq %rax, %rax
je 0x718a
pushq $0x1
popq %rcx
movq %rbx, %rdi
movq %rbx, %rsi
movq %rax, %rdx
callq 0x8a28
pushq $0x1
popq %rax
popq %rbx
retq
pushq $0x1
popq %rsi
movq %rbx, %rdi
callq 0x7624
testl %eax, %eax
jle 0x7185
leaq 0x1707f(%rip), %rdx     # 0x1e21f
pushq $0x1
popq %rsi
movq %rbx, %rdi
callq 0x9b25
testl %eax, %eax
jne 0x7185
leaq 0x17074(%rip), %rsi     # 0x1e22a
pushq $0x12
popq %rdx
movq %rbx, %rdi
callq 0x7b27
jmp 0x7185
// File: /workspace/github_c_makefile_star2_O2/bhk[P]tooltree/lua/../opensource/lua-5.2.3/src/lua.c
// Function: pushline
static int pushline (lua_State *L, int firstline) {
  char buffer[LUA_MAXINPUT];
  char *b = buffer;
  size_t l;
  const char *prmt = get_prompt(L, firstline);
  int readstatus = lua_readline(L, b, prmt);
  lua_pop(L, 1);  /* remove result from 'get_prompt' */
  if (readstatus == 0)
    return 0;  /* no input */
  l = strlen(b);
  if (l > 0 && b[l-1] == '\n')  /* line ends with newline? */
    b[l-1] = '\0';  /* remove it */
  if (firstline && b[0] == '=')  /* first line starts with `=' ? */
    lua_pushfstring(L, "return %s", b+1);  /* change it to `return' */
  else
    lua_pushstring(L, b);
  lua_freeline(L, b);
  return 1;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x200, %rsp            # imm = 0x200
movl %esi, %ebp
movq %rdi, %rbx
testl %esi, %esi
leaq 0x170c9(%rip), %rax     # 0x1e2ec
leaq 0x170ba(%rip), %rsi     # 0x1e2e4
cmoveq %rax, %rsi
leaq 0x170c0(%rip), %rax     # 0x1e2f5
leaq 0x170ba(%rip), %r15     # 0x1e2f6
cmoveq %rax, %r15
callq 0x7d8f
xorl %r14d, %r14d
pushq $-0x1
popq %rsi
movq %rbx, %rdi
xorl %edx, %edx
callq 0x7967
testq %rax, %rax
cmovneq %rax, %r15
movq 0x25d65(%rip), %r12     # 0x2cfc8
movq (%r12), %rsi
movq %r15, %rdi
callq 0x61e0
movq (%r12), %rdi
callq 0x63b0
movq 0x25d51(%rip), %rax     # 0x2cfd0
movq (%rax), %rdx
movq %rsp, %rdi
movl $0x200, %esi            # imm = 0x200
callq 0x62a0
movq %rax, %r15
pushq $-0x2
popq %rsi
movq %rbx, %rdi
callq 0x7437
testq %r15, %r15
je 0x72ec
movq %rsp, %rdi
callq 0x6170
testq %rax, %rax
je 0x72bb
cmpb $0xa, -0x1(%rsp,%rax)
jne 0x72bb
movb $0x0, -0x1(%rsp,%rax)
testl %ebp, %ebp
je 0x72dd
cmpb $0x3d, (%rsp)
jne 0x72dd
leaq 0x1(%rsp), %rdx
leaq 0x17009(%rip), %rsi     # 0x1e2da
movq %rbx, %rdi
xorl %eax, %eax
callq 0x7c0d
jmp 0x72e8
movq %rsp, %rsi
movq %rbx, %rdi
callq 0x7b76
pushq $0x1
popq %r14
movl %r14d, %eax
addq $0x200, %rsp            # imm = 0x200
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O2/bhk[P]tooltree/lua/../opensource/lua-5.2.3/src/lapi.c
// Function: lua_checkstack
LUA_API int lua_checkstack (lua_State *L, int size) {
  int res;
  CallInfo *ci = L->ci;
  lua_lock(L);
  if (L->stack_last - L->top > size)  /* 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 - size)  /* can grow without overflow? */
      res = 0;  /* no */
    else  /* try to grow stack */
      res = (luaD_rawrunprotected(L, &growstack, &size) == LUA_OK);
  }
  if (res && ci->top < L->top + size)
    ci->top = L->top + size;  /* adjust frame top */
  lua_unlock(L);
  return res;
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
subq $0x10, %rsp
movl %esi, 0xc(%rsp)
movq 0x10(%rdi), %rax
movq 0x20(%rdi), %r14
movq 0x30(%rdi), %rdx
subq %rax, %rdx
sarq $0x4, %rdx
movslq %esi, %rcx
cmpq %rcx, %rdx
jle 0x733d
shlq $0x4, %rcx
addq %rax, %rcx
pushq $0x1
popq %rbp
cmpq %rcx, 0x8(%r14)
jae 0x7370
movq %rcx, 0x8(%r14)
jmp 0x7370
movq %rdi, %rbx
subq 0x38(%rdi), %rax
shrq $0x4, %rax
addl $0x5, %eax
movl $0xf4240, %ecx          # imm = 0xF4240
subl %esi, %ecx
xorl %ebp, %ebp
cmpl %ecx, %eax
jg 0x7370
leaq 0x27(%rip), %rsi        # 0x7386
leaq 0xc(%rsp), %rdx
movq %rbx, %rdi
callq 0xad8d
testl %eax, %eax
je 0x737b
movl %ebp, %eax
addq $0x10, %rsp
popq %rbx
popq %r14
popq %rbp
retq
movq 0x10(%rbx), %rax
movslq 0xc(%rsp), %rcx
jmp 0x7327
// File: /workspace/github_c_makefile_star2_O2/bhk[P]tooltree/lua/../opensource/lua-5.2.3/src/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, "not enough elements to move");
  from->top -= n;
  for (i = 0; i < n; i++) {
    setobj2s(to, to->top++, from->top + i);
  }
  lua_unlock(to);
}

// Assembly:
cmpq %rsi, %rdi
je 0x73d5
movslq %edx, %rax
movq %rax, %rcx
shlq $0x4, %rcx
subq %rcx, 0x10(%rdi)
xorl %ecx, %ecx
testl %eax, %eax
cmovlel %ecx, %eax
shlq $0x4, %rax
cmpq %rcx, %rax
je 0x73d5
movq 0x10(%rdi), %rdx
movq 0x10(%rsi), %r8
leaq 0x10(%r8), %r9
movq %r9, 0x10(%rsi)
movq (%rdx,%rcx), %r9
movq %r9, (%r8)
movl 0x8(%rdx,%rcx), %edx
movl %edx, 0x8(%r8)
addq $0x10, %rcx
jmp 0x73ab
retq
// File: /workspace/github_c_makefile_star2_O2/bhk[P]tooltree/lua/../opensource/lua-5.2.3/src/lapi.c
// Function: lua_remove
LUA_API void lua_remove (lua_State *L, int idx) {
  StkId p;
  lua_lock(L);
  p = index2addr(L, idx);
  api_checkstackindex(L, idx, p);
  while (++p < L->top) setobjs2s(L, p-1, p);
  L->top--;
  lua_unlock(L);
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
callq 0x74b4
addq $0x10, %rax
movq 0x10(%rbx), %rcx
cmpq %rcx, %rax
jae 0x74aa
movq (%rax), %rcx
movq %rcx, -0x10(%rax)
movl 0x8(%rax), %ecx
movl %ecx, -0x8(%rax)
jmp 0x748e
addq $-0x10, %rcx
movq %rcx, 0x10(%rbx)
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O2/bhk[P]tooltree/lua/../opensource/lua-5.2.3/src/lapi.c
// Function: lua_insert
LUA_API void lua_insert (lua_State *L, int idx) {
  StkId p;
  StkId q;
  lua_lock(L);
  p = index2addr(L, idx);
  api_checkstackindex(L, idx, p);
  for (q = L->top; q > p; q--)  /* use L->top as a temporary */
    setobjs2s(L, q, q - 1);
  setobjs2s(L, p, L->top);
  lua_unlock(L);
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
callq 0x74b4
movq 0x10(%rbx), %rcx
cmpq %rax, %rcx
jbe 0x755c
movq -0x10(%rcx), %rdx
movq %rdx, (%rcx)
movl -0x8(%rcx), %edx
movl %edx, 0x8(%rcx)
addq $-0x10, %rcx
jmp 0x7544
movq 0x10(%rbx), %rcx
movq (%rcx), %rdx
movq %rdx, (%rax)
movl 0x8(%rcx), %ecx
movl %ecx, 0x8(%rax)
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O2/bhk[P]tooltree/lua/../opensource/lua-5.2.3/src/lapi.c
// Function: moveto
static void moveto (lua_State *L, TValue *fr, int idx) {
  TValue *to = index2addr(L, idx);
  api_checkvalidindex(L, to);
  setobj(L, to, fr);
  if (idx < LUA_REGISTRYINDEX)  /* function upvalue? */
    luaC_barrier(L, clCvalue(L->ci->func), fr);
  /* LUA_REGISTRYINDEX does not need gc barrier
     (collector revisits it before finishing collection) */
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movl %edx, %ebp
movq %rsi, %r14
movq %rdi, %rbx
movl %edx, %esi
callq 0x74b4
movq (%r14), %rcx
movq %rcx, (%rax)
movl 0x8(%r14), %ecx
movl %ecx, 0x8(%rax)
cmpl $0xfff0b9d8, %ebp       # imm = 0xFFF0B9D8
setge %al
testb $0x40, %cl
sete %cl
orb %al, %cl
jne 0x75d4
movq (%r14), %rdx
testb $0x3, 0x9(%rdx)
je 0x75d4
movq 0x20(%rbx), %rax
movq (%rax), %rax
movq (%rax), %rsi
testb $0x4, 0x9(%rsi)
jne 0x75d9
popq %rbx
popq %r14
popq %rbp
retq
movq %rbx, %rdi
popq %rbx
popq %r14
popq %rbp
jmp 0xc0bc
// File: /workspace/github_c_makefile_star2_O2/bhk[P]tooltree/lua/../opensource/lua-5.2.3/src/lapi.c
// Function: lua_arith
LUA_API void lua_arith (lua_State *L, int op) {
  StkId o1;  /* 1st operand */
  StkId o2;  /* 2nd operand */
  lua_lock(L);
  if (op != LUA_OPUNM) /* all other operations expect two operands */
    api_checknelems(L, 2);
  else {  /* for unary minus, add fake 2nd operand */
    api_checknelems(L, 1);
    setobjs2s(L, L->top, L->top - 1);
    L->top++;
  }
  o1 = L->top - 2;
  o2 = L->top - 1;
  if (ttisnumber(o1) && ttisnumber(o2)) {
    setnvalue(o1, luaO_arith(op, nvalue(o1), nvalue(o2)));
  }
  else
    luaV_arith(L, o1, o1, o2, cast(TMS, op - LUA_OPADD + TM_ADD));
  L->top--;
  lua_unlock(L);
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movl %esi, %r8d
movq %rdi, %rbx
movq 0x10(%rdi), %r14
cmpl $0x6, %esi
jne 0x775c
movq -0x10(%r14), %rax
movq %rax, (%r14)
movl -0x8(%r14), %eax
movl %eax, 0x8(%r14)
movq 0x10(%rbx), %r14
addq $0x10, %r14
movq %r14, 0x10(%rbx)
cmpl $0x3, -0x18(%r14)
jne 0x778e
cmpl $0x3, -0x8(%r14)
jne 0x778e
movsd -0x20(%r14), %xmm0
movsd -0x10(%r14), %xmm1
movl %r8d, %edi
callq 0xfa52
movsd %xmm0, -0x20(%r14)
movl $0x3, -0x18(%r14)
jmp 0x77a8
leaq -0x20(%r14), %rdx
addq $-0x10, %r14
addl $0x6, %r8d
movq %rbx, %rdi
movq %rdx, %rsi
movq %r14, %rcx
callq 0x179a2
addq $-0x10, 0x10(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O2/bhk[P]tooltree/lua/../opensource/lua-5.2.3/src/lapi.c
// Function: lua_tonumberx
LUA_API lua_Number lua_tonumberx (lua_State *L, int idx, int *isnum) {
  TValue n;
  const TValue *o = index2addr(L, idx);
  if (tonumber(o, &n)) {
    if (isnum) *isnum = 1;
    return nvalue(o);
  }
  else {
    if (isnum) *isnum = 0;
    return 0;
  }
}

// Assembly:
pushq %rbx
subq $0x10, %rsp
movq %rdx, %rbx
callq 0x74b4
cmpl $0x3, 0x8(%rax)
je 0x7882
movq %rsp, %rsi
movq %rax, %rdi
callq 0x16f50
testq %rax, %rax
je 0x7897
testq %rbx, %rbx
je 0x788d
movl $0x1, (%rbx)
movsd (%rax), %xmm0
addq $0x10, %rsp
popq %rbx
retq
xorps %xmm0, %xmm0
testq %rbx, %rbx
je 0x7891
andl $0x0, (%rbx)
jmp 0x7891
// File: /workspace/github_c_makefile_star2_O2/bhk[P]tooltree/lua/../opensource/lua-5.2.3/src/lapi.c
// Function: lua_tointegerx
LUA_API lua_Integer lua_tointegerx (lua_State *L, int idx, int *isnum) {
  TValue n;
  const TValue *o = index2addr(L, idx);
  if (tonumber(o, &n)) {
    lua_Integer res;
    lua_Number num = nvalue(o);
    lua_number2integer(res, num);
    if (isnum) *isnum = 1;
    return res;
  }
  else {
    if (isnum) *isnum = 0;
    return 0;
  }
}

// Assembly:
pushq %rbx
subq $0x10, %rsp
movq %rdx, %rbx
callq 0x74b4
cmpl $0x3, 0x8(%rax)
je 0x78c7
movq %rsp, %rsi
movq %rax, %rdi
callq 0x16f50
testq %rax, %rax
je 0x78dc
cvttsd2si (%rax), %rax
testq %rbx, %rbx
je 0x78d6
pushq $0x1
popq %rcx
movl %ecx, (%rbx)
addq $0x10, %rsp
popq %rbx
retq
xorl %ecx, %ecx
movl $0x0, %eax
testq %rbx, %rbx
jne 0x78d4
jmp 0x78d6
// File: /workspace/github_c_makefile_star2_O2/bhk[P]tooltree/lua/../opensource/lua-5.2.3/src/lapi.c
// Function: lua_tounsignedx
LUA_API lua_Unsigned lua_tounsignedx (lua_State *L, int idx, int *isnum) {
  TValue n;
  const TValue *o = index2addr(L, idx);
  if (tonumber(o, &n)) {
    lua_Unsigned res;
    lua_Number num = nvalue(o);
    lua_number2unsigned(res, num);
    if (isnum) *isnum = 1;
    return res;
  }
  else {
    if (isnum) *isnum = 0;
    return 0;
  }
}

// Assembly:
pushq %rbx
subq $0x20, %rsp
movq %rdx, %rbx
callq 0x74b4
cmpl $0x3, 0x8(%rax)
je 0x790f
leaq 0x10(%rsp), %rsi
movq %rax, %rdi
callq 0x16f50
testq %rax, %rax
je 0x7935
movsd (%rax), %xmm0
addsd 0x169e5(%rip), %xmm0    # 0x1e300
movsd %xmm0, 0x8(%rsp)
movl 0x8(%rsp), %eax
testq %rbx, %rbx
je 0x792f
pushq $0x1
popq %rcx
movl %ecx, (%rbx)
addq $0x20, %rsp
popq %rbx
retq
xorl %ecx, %ecx
movl $0x0, %eax
testq %rbx, %rbx
jne 0x792d
jmp 0x792f
// File: /workspace/github_c_makefile_star2_O2/bhk[P]tooltree/lua/../opensource/lua-5.2.3/src/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)) {
    lua_lock(L);  /* `luaV_tostring' may create a new string */
    if (!luaV_tostring(L, o)) {  /* conversion failed? */
      if (len != NULL) *len = 0;
      lua_unlock(L);
      return NULL;
    }
    luaC_checkGC(L);
    o = index2addr(L, idx);  /* previous call may reallocate the stack */
    lua_unlock(L);
  }
  if (len != NULL) *len = tsvalue(o)->len;
  return svalue(o);
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movq %rdx, %rbx
movl %esi, %ebp
movq %rdi, %r14
callq 0x74b4
movl 0x8(%rax), %ecx
andl $0xf, %ecx
cmpl $0x4, %ecx
je 0x79af
movq %r14, %rdi
movq %rax, %rsi
callq 0x16fa4
testl %eax, %eax
je 0x79ca
movq 0x18(%r14), %rax
cmpq $0x0, 0x18(%rax)
jle 0x79a5
movq %r14, %rdi
callq 0xcd44
movq %r14, %rdi
movl %ebp, %esi
callq 0x74b4
testq %rbx, %rbx
je 0x79be
movq (%rax), %rcx
movq 0x10(%rcx), %rcx
movq %rcx, (%rbx)
movq (%rax), %rax
addq $0x18, %rax
popq %rbx
popq %r14
popq %rbp
retq
testq %rbx, %rbx
je 0x79d3
andq $0x0, (%rbx)
xorl %eax, %eax
jmp 0x79c5
// File: /workspace/github_c_makefile_star2_O2/bhk[P]tooltree/lua/../opensource/lua-5.2.3/src/lapi.c
// Function: lua_rawlen
LUA_API size_t lua_rawlen (lua_State *L, int idx) {
  StkId o = index2addr(L, idx);
  switch (ttypenv(o)) {
    case LUA_TSTRING: return tsvalue(o)->len;
    case LUA_TUSERDATA: return uvalue(o)->len;
    case LUA_TTABLE: return luaH_getn(hvalue(o));
    default: return 0;
  }
}

// Assembly:
pushq %rax
callq 0x74b4
movl 0x8(%rax), %ecx
andl $0xf, %ecx
cmpl $0x7, %ecx
je 0x7a07
cmpl $0x5, %ecx
je 0x79fb
cmpl $0x4, %ecx
jne 0x7a10
movq (%rax), %rax
movq 0x10(%rax), %rax
jmp 0x7a12
movq (%rax), %rdi
callq 0x15fba
cltq
jmp 0x7a12
movq (%rax), %rax
movq 0x20(%rax), %rax
jmp 0x7a12
xorl %eax, %eax
popq %rcx
retq
// File: /workspace/github_c_makefile_star2_O2/bhk[P]tooltree/lua/../opensource/lua-5.2.3/src/lapi.c
// Function: lua_touserdata
LUA_API void *lua_touserdata (lua_State *L, int idx) {
  StkId o = index2addr(L, idx);
  switch (ttypenv(o)) {
    case LUA_TUSERDATA: return (rawuvalue(o) + 1);
    case LUA_TLIGHTUSERDATA: return pvalue(o);
    default: return NULL;
  }
}

// Assembly:
pushq %rax
callq 0x74b4
movl 0x8(%rax), %ecx
andl $0xf, %ecx
cmpl $0x2, %ecx
je 0x7a56
cmpl $0x7, %ecx
jne 0x7a5b
movq (%rax), %rax
addq $0x28, %rax
jmp 0x7a5d
movq (%rax), %rax
jmp 0x7a5d
xorl %eax, %eax
popq %rcx
retq
// File: /workspace/github_c_makefile_star2_O2/bhk[P]tooltree/lua/../opensource/lua-5.2.3/src/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:
    case LUA_TLIGHTUSERDATA:
      return lua_touserdata(L, idx);
    default: return NULL;
  }
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movl %esi, %ebx
movq %rdi, %r14
callq 0x74b4
movq %rax, %rcx
movl 0x8(%rax), %edx
andl $0x3f, %edx
xorl %eax, %eax
leal -0x2(%rdx), %esi
cmpl $0x6, %esi
ja 0x7ab6
leaq 0x16874(%rip), %rdx     # 0x1e310
movslq (%rdx,%rsi,4), %rsi
addq %rdx, %rsi
jmpq *%rsi
movq %r14, %rdi
movl %ebx, %esi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x7a37
cmpl $0x16, %edx
je 0x7ac0
cmpl $0x26, %edx
jne 0x7ac3
movq (%rcx), %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O2/bhk[P]tooltree/lua/../opensource/lua-5.2.3/src/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);
  luaC_checkGC(L);
  ts = luaS_newlstr(L, s, len);
  setsvalue2s(L, L->top, ts);
  api_incr_top(L);
  lua_unlock(L);
  return getstr(ts);
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %rbx
movq 0x18(%rdi), %rax
cmpq $0x0, 0x18(%rax)
jle 0x7b48
movq %rbx, %rdi
callq 0xcd44
movq %rbx, %rdi
movq %r15, %rsi
movq %r14, %rdx
callq 0x13766
movq 0x10(%rbx), %rcx
movq %rax, (%rcx)
movzbl 0x8(%rax), %edx
orl $0x40, %edx
movl %edx, 0x8(%rcx)
addq $0x10, 0x10(%rbx)
addq $0x18, %rax
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/bhk[P]tooltree/lua/../opensource/lua-5.2.3/src/lapi.c
// Function: lua_pushstring
LUA_API const char *lua_pushstring (lua_State *L, const char *s) {
  if (s == NULL) {
    lua_pushnil(L);
    return NULL;
  }
  else {
    TString *ts;
    lua_lock(L);
    luaC_checkGC(L);
    ts = luaS_new(L, s);
    setsvalue2s(L, L->top, ts);
    api_incr_top(L);
    lua_unlock(L);
    return getstr(ts);
  }
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
testq %rsi, %rsi
je 0x7bbf
movq %rsi, %r14
movq 0x18(%rbx), %rax
cmpq $0x0, 0x18(%rax)
jle 0x7b98
movq %rbx, %rdi
callq 0xcd44
movq %rbx, %rdi
movq %r14, %rsi
callq 0x138fd
movq 0x10(%rbx), %rcx
movq %rax, (%rcx)
movzbl 0x8(%rax), %edx
orl $0x40, %edx
movl %edx, 0x8(%rcx)
addq $0x10, 0x10(%rbx)
addq $0x18, %rax
jmp 0x7bd1
movq 0x10(%rbx), %rax
andl $0x0, 0x8(%rax)
addq $0x10, %rax
movq %rax, 0x10(%rbx)
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O2/bhk[P]tooltree/lua/../opensource/lua-5.2.3/src/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 {
    Closure *cl;
    api_checknelems(L, n);
    api_check(L, n <= MAXUPVAL, "upvalue index too large");
    luaC_checkGC(L);
    cl = luaF_newCclosure(L, n);
    cl->c.f = fn;
    L->top -= n;
    while (n--)
      setobj2n(L, &cl->c.upvalue[n], L->top + n);
    setclCvalue(L, L->top, cl);
  }
  api_incr_top(L);
  lua_unlock(L);
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movq %rsi, %r14
movq %rdi, %rbx
testl %edx, %edx
je 0x7d26
movl %edx, %ebp
movq 0x18(%rbx), %rax
cmpq $0x0, 0x18(%rax)
jle 0x7cdd
movq %rbx, %rdi
callq 0xcd44
movq %rbx, %rdi
movl %ebp, %esi
callq 0xbe08
movq %r14, 0x18(%rax)
movslq %ebp, %rdx
movq %rdx, %rsi
shlq $0x4, %rsi
subq %rsi, 0x10(%rbx)
addq $0x10, %rsi
pushq $0x66
popq %rcx
subq $0x1, %rdx
jb 0x7d21
movq 0x10(%rbx), %rdi
movq -0x20(%rsi,%rdi), %r8
movq %r8, (%rax,%rsi)
movl -0x18(%rsi,%rdi), %edi
movl %edi, 0x8(%rax,%rsi)
addq $-0x10, %rsi
jmp 0x7d00
movq %rax, %r14
jmp 0x7d29
pushq $0x16
popq %rcx
movq 0x10(%rbx), %rax
movq %r14, (%rax)
movl %ecx, 0x8(%rax)
addq $0x10, 0x10(%rbx)
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/bhk[P]tooltree/lua/../opensource/lua-5.2.3/src/lapi.c
// Function: lua_getglobal
LUA_API void lua_getglobal (lua_State *L, const char *var) {
  Table *reg = hvalue(&G(L)->l_registry);
  const TValue *gt;  /* global table */
  lua_lock(L);
  gt = luaH_getint(reg, LUA_RIDX_GLOBALS);
  setsvalue2s(L, L->top++, luaS_new(L, var));
  luaV_gettable(L, gt, L->top - 1, L->top - 1);
  lua_unlock(L);
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
movq 0x18(%rdi), %rax
movq 0x40(%rax), %rdi
pushq $0x2
popq %rsi
callq 0x15e44
movq %rax, %r15
movq 0x10(%r14), %r12
leaq 0x10(%r12), %rax
movq %rax, 0x10(%r14)
movq %r14, %rdi
movq %rbx, %rsi
callq 0x138fd
movq %rax, (%r12)
movzbl 0x8(%rax), %eax
orl $0x40, %eax
movl %eax, 0x8(%r12)
movq 0x10(%r14), %rcx
addq $-0x10, %rcx
movq %r14, %rdi
movq %r15, %rsi
movq %rcx, %rdx
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
jmp 0x16ffb
// File: /workspace/github_c_makefile_star2_O2/bhk[P]tooltree/lua/../opensource/lua-5.2.3/src/lapi.c
// Function: lua_getfield
LUA_API void lua_getfield (lua_State *L, int idx, const char *k) {
  StkId t;
  lua_lock(L);
  t = index2addr(L, idx);
  setsvalue2s(L, L->top, luaS_new(L, k));
  api_incr_top(L);
  luaV_gettable(L, t, L->top - 1, L->top - 1);
  lua_unlock(L);
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %rbx
movq %rdi, %r14
callq 0x74b4
movq %rax, %r15
movq 0x10(%r14), %r12
movq %r14, %rdi
movq %rbx, %rsi
callq 0x138fd
movq %rax, (%r12)
movzbl 0x8(%rax), %eax
orl $0x40, %eax
movl %eax, 0x8(%r12)
movq 0x10(%r14), %rcx
leaq 0x10(%rcx), %rax
movq %rax, 0x10(%r14)
movq %r14, %rdi
movq %r15, %rsi
movq %rcx, %rdx
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
jmp 0x16ffb
// File: /workspace/github_c_makefile_star2_O2/bhk[P]tooltree/lua/../opensource/lua-5.2.3/src/lapi.c
// Function: lua_rawgeti
LUA_API void lua_rawgeti (lua_State *L, int idx, int 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);
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movl %edx, %ebx
movq %rdi, %r14
callq 0x74b4
movq (%rax), %rdi
movl %ebx, %esi
callq 0x15e44
movq 0x10(%r14), %rcx
movq (%rax), %rdx
movq %rdx, (%rcx)
movl 0x8(%rax), %eax
movl %eax, 0x8(%rcx)
addq $0x10, 0x10(%r14)
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O2/bhk[P]tooltree/lua/../opensource/lua-5.2.3/src/lapi.c
// Function: lua_rawgetp
LUA_API void 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);
}

// Assembly:
pushq %r14
pushq %rbx
subq $0x18, %rsp
movq %rdx, %rbx
movq %rdi, %r14
callq 0x74b4
leaq 0x8(%rsp), %rsi
movq %rbx, (%rsi)
movl $0x2, 0x8(%rsi)
movq (%rax), %rdi
callq 0x15f09
movq 0x10(%r14), %rcx
movq (%rax), %rdx
movq %rdx, (%rcx)
movl 0x8(%rax), %eax
movl %eax, 0x8(%rcx)
addq $0x10, 0x10(%r14)
addq $0x18, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O2/bhk[P]tooltree/lua/../opensource/lua-5.2.3/src/lapi.c
// Function: lua_getmetatable
LUA_API int lua_getmetatable (lua_State *L, int objindex) {
  const TValue *obj;
  Table *mt = NULL;
  int res;
  lua_lock(L);
  obj = index2addr(L, objindex);
  switch (ttypenv(obj)) {
    case LUA_TTABLE:
      mt = hvalue(obj)->metatable;
      break;
    case LUA_TUSERDATA:
      mt = uvalue(obj)->metatable;
      break;
    default:
      mt = G(L)->mt[ttypenv(obj)];
      break;
  }
  if (mt == NULL)
    res = 0;
  else {
    sethvalue(L, L->top, mt);
    api_incr_top(L);
    res = 1;
  }
  lua_unlock(L);
  return res;
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
callq 0x74b4
movl 0x8(%rax), %ecx
andl $0xf, %ecx
cmpq $0x7, %rcx
je 0x7f93
cmpl $0x5, %ecx
jne 0x7f9c
movq (%rax), %rax
addq $0x10, %rax
jmp 0x7faa
movq 0x18(%rbx), %rax
leaq (%rax,%rcx,8), %rax
addq $0x1a8, %rax            # imm = 0x1A8
movq (%rax), %rax
testq %rax, %rax
je 0x7fca
movq 0x10(%rbx), %rcx
movq %rax, (%rcx)
movl $0x45, 0x8(%rcx)
addq $0x10, 0x10(%rbx)
pushq $0x1
popq %rax
jmp 0x7fcc
xorl %eax, %eax
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O2/bhk[P]tooltree/lua/../opensource/lua-5.2.3/src/lapi.c
// Function: lua_getuservalue
LUA_API void lua_getuservalue (lua_State *L, int idx) {
  StkId o;
  lua_lock(L);
  o = index2addr(L, idx);
  api_check(L, ttisuserdata(o), "userdata expected");
  if (uvalue(o)->env) {
    sethvalue(L, L->top, uvalue(o)->env);
  } else
    setnilvalue(L->top);
  api_incr_top(L);
  lua_unlock(L);
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
callq 0x74b4
movq (%rax), %rax
movq 0x18(%rax), %rcx
movq 0x10(%rbx), %rax
testq %rcx, %rcx
je 0x7ff7
movq %rcx, (%rax)
movl $0x45, 0x8(%rax)
movq 0x10(%rbx), %rax
jmp 0x7ffb
andl $0x0, 0x8(%rax)
addq $0x10, %rax
movq %rax, 0x10(%rbx)
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O2/bhk[P]tooltree/lua/../opensource/lua-5.2.3/src/lapi.c
// Function: lua_setglobal
LUA_API void lua_setglobal (lua_State *L, const char *var) {
  Table *reg = hvalue(&G(L)->l_registry);
  const TValue *gt;  /* global table */
  lua_lock(L);
  api_checknelems(L, 1);
  gt = luaH_getint(reg, LUA_RIDX_GLOBALS);
  setsvalue2s(L, L->top++, luaS_new(L, var));
  luaV_settable(L, gt, L->top - 1, L->top - 2);
  L->top -= 2;  /* pop value and key */
  lua_unlock(L);
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %rbx
movq 0x18(%rdi), %rax
movq 0x40(%rax), %rdi
pushq $0x2
popq %rsi
callq 0x15e44
movq %rax, %r15
movq 0x10(%rbx), %r12
leaq 0x10(%r12), %rax
movq %rax, 0x10(%rbx)
movq %rbx, %rdi
movq %r14, %rsi
callq 0x138fd
movq %rax, (%r12)
movzbl 0x8(%rax), %eax
orl $0x40, %eax
movl %eax, 0x8(%r12)
movq 0x10(%rbx), %rcx
leaq -0x10(%rcx), %rdx
addq $-0x20, %rcx
movq %rbx, %rdi
movq %r15, %rsi
callq 0x171b2
addq $-0x20, 0x10(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/bhk[P]tooltree/lua/../opensource/lua-5.2.3/src/lapi.c
// Function: lua_setfield
LUA_API void lua_setfield (lua_State *L, int idx, const char *k) {
  StkId t;
  lua_lock(L);
  api_checknelems(L, 1);
  t = index2addr(L, idx);
  setsvalue2s(L, L->top++, luaS_new(L, k));
  luaV_settable(L, t, L->top - 1, L->top - 2);
  L->top -= 2;  /* pop value and key */
  lua_unlock(L);
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %r14
movq %rdi, %rbx
callq 0x74b4
movq %rax, %r15
movq 0x10(%rbx), %r12
leaq 0x10(%r12), %rax
movq %rax, 0x10(%rbx)
movq %rbx, %rdi
movq %r14, %rsi
callq 0x138fd
movq %rax, (%r12)
movzbl 0x8(%rax), %eax
orl $0x40, %eax
movl %eax, 0x8(%r12)
movq 0x10(%rbx), %rcx
leaq -0x10(%rcx), %rdx
addq $-0x20, %rcx
movq %rbx, %rdi
movq %r15, %rsi
callq 0x171b2
addq $-0x20, 0x10(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/bhk[P]tooltree/lua/../opensource/lua-5.2.3/src/lapi.c
// Function: lua_rawset
LUA_API void lua_rawset (lua_State *L, int idx) {
  StkId t;
  lua_lock(L);
  api_checknelems(L, 2);
  t = index2addr(L, idx);
  api_check(L, ttistable(t), "table expected");
  setobj2t(L, luaH_set(L, hvalue(t), L->top-2), L->top-1);
  invalidateTMcache(hvalue(t));
  luaC_barrierback(L, gcvalue(t), L->top-1);
  L->top -= 2;
  lua_unlock(L);
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %rbx
callq 0x74b4
movq %rax, %r14
movq 0x10(%rbx), %r15
movq (%rax), %rsi
leaq -0x20(%r15), %rdx
movq %rbx, %rdi
callq 0x159e4
movq -0x10(%r15), %rcx
movq %rcx, (%rax)
movl -0x8(%r15), %ecx
movl %ecx, 0x8(%rax)
movq (%r14), %rax
movb $0x0, 0xa(%rax)
movq 0x10(%rbx), %rax
testb $0x40, -0x8(%rax)
je 0x8164
movq -0x10(%rax), %rcx
testb $0x3, 0x9(%rcx)
je 0x8164
movq (%r14), %rsi
testb $0x4, 0x9(%rsi)
je 0x8164
movq %rbx, %rdi
callq 0xc1db
movq 0x10(%rbx), %rax
addq $-0x20, %rax
movq %rax, 0x10(%rbx)
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/bhk[P]tooltree/lua/../opensource/lua-5.2.3/src/lapi.c
// Function: lua_rawseti
LUA_API void lua_rawseti (lua_State *L, int idx, int n) {
  StkId t;
  lua_lock(L);
  api_checknelems(L, 1);
  t = index2addr(L, idx);
  api_check(L, ttistable(t), "table expected");
  luaH_setint(L, hvalue(t), n, L->top - 1);
  luaC_barrierback(L, gcvalue(t), L->top-1);
  L->top--;
  lua_unlock(L);
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movl %edx, %ebp
movq %rdi, %rbx
callq 0x74b4
movq %rax, %r14
movq (%rax), %rsi
movq 0x10(%rbx), %rcx
addq $-0x10, %rcx
movq %rbx, %rdi
movl %ebp, %edx
callq 0x15983
movq 0x10(%rbx), %rax
testb $0x40, -0x8(%rax)
je 0x81c1
movq -0x10(%rax), %rcx
testb $0x3, 0x9(%rcx)
je 0x81c1
movq (%r14), %rsi
testb $0x4, 0x9(%rsi)
je 0x81c1
movq %rbx, %rdi
callq 0xc1db
movq 0x10(%rbx), %rax
addq $-0x10, %rax
movq %rax, 0x10(%rbx)
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/bhk[P]tooltree/lua/../opensource/lua-5.2.3/src/lapi.c
// Function: lua_rawsetp
LUA_API void lua_rawsetp (lua_State *L, int idx, const void *p) {
  StkId t;
  TValue k;
  lua_lock(L);
  api_checknelems(L, 1);
  t = index2addr(L, idx);
  api_check(L, ttistable(t), "table expected");
  setpvalue(&k, cast(void *, p));
  setobj2t(L, luaH_set(L, hvalue(t), &k), L->top - 1);
  luaC_barrierback(L, gcvalue(t), 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 0x74b4
movq %rax, %r14
movq %rsp, %rdx
movq %r15, (%rdx)
movl $0x2, 0x8(%rdx)
movq 0x10(%rbx), %r15
movq (%rax), %rsi
movq %rbx, %rdi
callq 0x159e4
movq -0x10(%r15), %rcx
movq %rcx, (%rax)
movl -0x8(%r15), %ecx
movl %ecx, 0x8(%rax)
movq 0x10(%rbx), %rax
testb $0x40, -0x8(%rax)
je 0x8238
movq -0x10(%rax), %rcx
testb $0x3, 0x9(%rcx)
je 0x8238
movq (%r14), %rsi
testb $0x4, 0x9(%rsi)
je 0x8238
movq %rbx, %rdi
callq 0xc1db
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_O2/bhk[P]tooltree/lua/../opensource/lua-5.2.3/src/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 (ttypenv(obj)) {
    case LUA_TTABLE: {
      hvalue(obj)->metatable = mt;
      if (mt) {
        luaC_objbarrierback(L, gcvalue(obj), mt);
        luaC_checkfinalizer(L, gcvalue(obj), mt);
      }
      break;
    }
    case LUA_TUSERDATA: {
      uvalue(obj)->metatable = mt;
      if (mt) {
        luaC_objbarrier(L, rawuvalue(obj), mt);
        luaC_checkfinalizer(L, gcvalue(obj), mt);
      }
      break;
    }
    default: {
      G(L)->mt[ttypenv(obj)] = mt;
      break;
    }
  }
  L->top--;
  lua_unlock(L);
  return 1;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %rbx
callq 0x74b4
movq %rax, %r15
movq 0x10(%rbx), %rax
cmpl $0x0, -0x8(%rax)
je 0x826a
movq -0x10(%rax), %r14
jmp 0x826d
xorl %r14d, %r14d
movl 0x8(%r15), %eax
andl $0xf, %eax
cmpq $0x7, %rax
je 0x82a5
cmpl $0x5, %eax
jne 0x82dc
movq (%r15), %rax
movq %r14, 0x10(%rax)
testq %r14, %r14
je 0x82e8
testb $0x3, 0x9(%r14)
movq (%r15), %rsi
je 0x82cf
testb $0x4, 0x9(%rsi)
je 0x82cf
movq %rbx, %rdi
callq 0xc1db
jmp 0x82cc
movq (%r15), %rax
movq %r14, 0x10(%rax)
testq %r14, %r14
je 0x82e8
testb $0x3, 0x9(%r14)
movq (%r15), %rsi
je 0x82cf
testb $0x4, 0x9(%rsi)
je 0x82cf
movq %rbx, %rdi
movq %r14, %rdx
callq 0xc0bc
movq (%r15), %rsi
movq %rbx, %rdi
movq %r14, %rdx
callq 0xc2c8
jmp 0x82e8
movq 0x18(%rbx), %rcx
movq %r14, 0x1a8(%rcx,%rax,8)
addq $-0x10, 0x10(%rbx)
pushq $0x1
popq %rax
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/bhk[P]tooltree/lua/../opensource/lua-5.2.3/src/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, ttisuserdata(o), "userdata expected");
  if (ttisnil(L->top - 1))
    uvalue(o)->env = NULL;
  else {
    api_check(L, ttistable(L->top - 1), "table expected");
    uvalue(o)->env = hvalue(L->top - 1);
    luaC_objbarrier(L, gcvalue(o), hvalue(L->top - 1));
  }
  L->top--;
  lua_unlock(L);
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
callq 0x74b4
movq 0x10(%rbx), %rcx
cmpl $0x0, -0x8(%rcx)
je 0x8335
movq -0x10(%rcx), %rcx
movq (%rax), %rdx
movq %rcx, 0x18(%rdx)
movq 0x10(%rbx), %rcx
movq -0x10(%rcx), %rdx
testb $0x3, 0x9(%rdx)
je 0x833d
movq (%rax), %rsi
testb $0x4, 0x9(%rsi)
je 0x833d
movq %rbx, %rdi
callq 0xc0bc
jmp 0x833d
movq (%rax), %rax
andq $0x0, 0x18(%rax)
addq $-0x10, 0x10(%rbx)
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O2/bhk[P]tooltree/lua/../opensource/lua-5.2.3/src/lapi.c
// Function: lua_callk
LUA_API void lua_callk (lua_State *L, int nargs, int nresults, int ctx,
                        lua_CFunction 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, 1);  /* do the call */
  }
  else  /* no continuation or no yieldable */
    luaD_call(L, func, nresults, 0);  /* 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
xorl %eax, %eax
testq %r8, %r8
je 0x8394
cmpw $0x0, 0x44(%rbx)
jne 0x8394
movq 0x20(%rbx), %rax
movq %r8, 0x38(%rax)
movq 0x20(%rbx), %rax
movl %ecx, 0x30(%rax)
pushq $0x1
popq %rax
movq %rbx, %rdi
movl %ebp, %edx
movl %eax, %ecx
callq 0xb418
cmpl $-0x1, %ebp
jne 0x83b7
movq 0x10(%rbx), %rax
movq 0x20(%rbx), %rcx
cmpq %rax, 0x8(%rcx)
jae 0x83b7
movq %rax, 0x8(%rcx)
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/bhk[P]tooltree/lua/../opensource/lua-5.2.3/src/lapi.c
// Function: lua_pcallk
LUA_API int lua_pcallk (lua_State *L, int nargs, int nresults, int errfunc,
                        int ctx, lua_CFunction 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_allowhook = L->allowhook;
    ci->u.c.old_errfunc = L->errfunc;
    L->errfunc = func;
    /* mark that function may do error recovery */
    ci->callstatus |= CIST_YPCALL;
    luaD_call(L, c.func, nresults, 1);  /* 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
movl %r8d, %r14d
movl %edx, %ebp
movl %esi, %r12d
movq %rdi, %rbx
testl %ecx, %ecx
je 0x83ef
movq %rbx, %rdi
movl %ecx, %esi
callq 0x74b4
movq %rax, %r8
subq 0x38(%rbx), %r8
jmp 0x83f2
xorl %r8d, %r8d
notl %r12d
movslq %r12d, %rcx
shlq $0x4, %rcx
addq 0x10(%rbx), %rcx
movq %rcx, (%rsp)
testq %r15, %r15
je 0x8410
cmpw $0x0, 0x44(%rbx)
je 0x842b
movq %rsp, %rdx
movl %ebp, 0x8(%rdx)
subq 0x38(%rbx), %rcx
leaq 0x86(%rip), %rsi        # 0x84a7
movq %rbx, %rdi
callq 0xb7e3
jmp 0x8483
movq 0x20(%rbx), %r12
movq %r15, 0x38(%r12)
movl %r14d, 0x30(%r12)
movq %rcx, %rax
subq 0x38(%rbx), %rax
movq %rax, 0x28(%r12)
movb 0x49(%rbx), %al
movb %al, 0x48(%r12)
movq 0x78(%rbx), %rax
movq %rax, 0x40(%r12)
movq %r8, 0x78(%rbx)
orb $0x10, 0x22(%r12)
pushq $0x1
popq %rax
movq %rbx, %rdi
movq %rcx, %rsi
movl %ebp, %edx
movl %eax, %ecx
callq 0xb418
andb $-0x11, 0x22(%r12)
movq 0x40(%r12), %rax
movq %rax, 0x78(%rbx)
xorl %eax, %eax
cmpl $-0x1, %ebp
jne 0x849a
movq 0x10(%rbx), %rcx
movq 0x20(%rbx), %rdx
cmpq %rcx, 0x8(%rdx)
jae 0x849a
movq %rcx, 0x8(%rdx)
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq