LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O3/gplessis[P]dotdeb-redis/deps/lua/src/liolib.c
// Function: f_seek
static int f_seek (lua_State *L) {
  static const int mode[] = {SEEK_SET, SEEK_CUR, SEEK_END};
  static const char *const modenames[] = {"set", "cur", "end", NULL};
  FILE *f = tofile(L);
  int op = luaL_checkoption(L, 2, "cur", modenames);
  long offset = luaL_optlong(L, 3, 0);
  op = fseek(f, offset, mode[op]);
  if (op)
    return pushresult(L, 0, NULL);  /* error */
  else {
    lua_pushinteger(L, ftell(f));
    return 1;
  }
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movq %rdi, %rbx
callq 0x1638b
movq %rax, %r14
leaq 0x6712(%rip), %rdx      # 0x1c93a
leaq 0x10661(%rip), %rcx     # 0x26890
movq %rbx, %rdi
movl $0x2, %esi
callq 0x10a3a
movl %eax, %ebp
movq %rbx, %rdi
movl $0x3, %esi
xorl %edx, %edx
callq 0x10dbc
movslq %ebp, %rcx
leaq 0x6769(%rip), %rdx      # 0x1c9c0
movl (%rdx,%rcx,4), %edx
movq %r14, %rdi
movq %rax, %rsi
callq 0x43d0
testl %eax, %eax
je 0x16279
movq %rbx, %rdi
xorl %esi, %esi
xorl %edx, %edx
popq %rbx
popq %r14
popq %rbp
jmp 0x163ff
movq %r14, %rdi
callq 0x42d0
movq %rbx, %rdi
movq %rax, %rsi
callq 0x5c40
movl $0x1, %eax
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/gplessis[P]dotdeb-redis/deps/lua/src/liolib.c
// Function: io_gc
static int io_gc (lua_State *L) {
  FILE *f = *tofilep(L);
  /* ignore closed files */
  if (f != NULL)
    aux_close(L);
  return 0;
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
leaq 0x6595(%rip), %rdx      # 0x1c8b9
movl $0x1, %esi
callq 0x10bcd
cmpq $0x0, (%rax)
je 0x1633c
movq %rbx, %rdi
callq 0x163ca
xorl %eax, %eax
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O3/gplessis[P]dotdeb-redis/deps/lua/src/liolib.c
// Function: io_tostring
static int io_tostring (lua_State *L) {
  FILE *f = *tofilep(L);
  if (f == NULL)
    lua_pushliteral(L, "file (closed)");
  else
    lua_pushfstring(L, "file (%p)", f);
  return 1;
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
leaq 0x656e(%rip), %rdx      # 0x1c8b9
movl $0x1, %esi
callq 0x10bcd
movq (%rax), %rdx
testq %rdx, %rdx
je 0x16370
leaq 0x65f0(%rip), %rsi      # 0x1c954
movq %rbx, %rdi
xorl %eax, %eax
callq 0x5d2f
jmp 0x16384
leaq 0x65cf(%rip), %rsi      # 0x1c946
movl $0xd, %edx
movq %rbx, %rdi
callq 0x5c5a
movl $0x1, %eax
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O3/gplessis[P]dotdeb-redis/deps/lua/src/liolib.c
// Function: tofile
static FILE *tofile (lua_State *L) {
  FILE **f = tofilep(L);
  if (*f == NULL)
    luaL_error(L, "attempt to use a closed file");
  return *f;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
leaq 0x6520(%rip), %rdx      # 0x1c8b9
movl $0x1, %esi
callq 0x10bcd
movq %rax, %r14
movq (%rax), %rax
testq %rax, %rax
jne 0x163c2
leaq 0x6523(%rip), %rsi      # 0x1c8d8
movq %rbx, %rdi
xorl %eax, %eax
callq 0x108d7
movq (%r14), %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O3/gplessis[P]dotdeb-redis/deps/lua/src/liolib.c
// Function: pushresult
static int pushresult (lua_State *L, int i, const char *filename) {
  int en = errno;  /* calls to Lua API may change this value */
  if (i) {
    lua_pushboolean(L, 1);
    return 1;
  }
  else {
    lua_pushnil(L);
    if (filename)
      lua_pushfstring(L, "%s: %s", filename, strerror(en));
    else
      lua_pushfstring(L, "%s", strerror(en));
    lua_pushinteger(L, en);
    return 3;
  }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdx, %r15
movl %esi, %ebp
movq %rdi, %rbx
callq 0x4070
testl %ebp, %ebp
je 0x1642b
movl $0x1, %ebp
movq %rbx, %rdi
movl $0x1, %esi
callq 0x5e7d
jmp 0x16480
movslq (%rax), %r14
movq %rbx, %rdi
callq 0x5c17
movl %r14d, %edi
callq 0x4510
testq %r15, %r15
je 0x1645c
leaq 0x5bc7(%rip), %rsi      # 0x1c011
movq %rbx, %rdi
movq %r15, %rdx
movq %rax, %rcx
xorl %eax, %eax
callq 0x5d2f
jmp 0x16470
leaq 0x6d09(%rip), %rsi      # 0x1d16c
movq %rbx, %rdi
movq %rax, %rdx
xorl %eax, %eax
callq 0x5d2f
movq %rbx, %rdi
movq %r14, %rsi
callq 0x5c40
movl $0x3, %ebp
movl %ebp, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/gplessis[P]dotdeb-redis/deps/lua/src/liolib.c
// Function: io_readline
static int io_readline (lua_State *L) {
  FILE *f = *(FILE **)lua_touserdata(L, lua_upvalueindex(1));
  int sucess;
  if (f == NULL)  /* file is already closed? */
    luaL_error(L, "file is already closed");
  sucess = read_line(L, f);
  if (ferror(f))
    return luaL_error(L, "%s", strerror(errno));
  if (sucess) return 1;
  else {  /* EOF */
    if (lua_toboolean(L, lua_upvalueindex(2))) {  /* generator created file? */
      lua_settop(L, 0);
      lua_pushvalue(L, lua_upvalueindex(1));
      aux_close(L);  /* close it */
    }
    return 0;
  }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movl $0xffffd8ed, %esi       # imm = 0xFFFFD8ED
callq 0x5b7b
movq (%rax), %r14
testq %r14, %r14
je 0x164e4
movq %rbx, %rdi
movq %r14, %rsi
jmp 0x164fa
leaq 0x6412(%rip), %rsi      # 0x1c8fd
movq %rbx, %rdi
xorl %eax, %eax
callq 0x108d7
movq %rbx, %rdi
xorl %esi, %esi
callq 0x16581
movl %eax, %r15d
movq %r14, %rdi
callq 0x40c0
testl %eax, %eax
je 0x16538
callq 0x4070
movl (%rax), %edi
callq 0x4510
leaq 0x6c4b(%rip), %rsi      # 0x1d16c
movq %rbx, %rdi
movq %rax, %rdx
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0x108d7
movl $0x1, %ebp
testl %r15d, %r15d
jne 0x16574
movq %rbx, %rdi
movl $0xffffd8ec, %esi       # imm = 0xFFFFD8EC
callq 0x5a62
xorl %ebp, %ebp
testl %eax, %eax
je 0x16574
movq %rbx, %rdi
xorl %esi, %esi
callq 0x54e9
movq %rbx, %rdi
movl $0xffffd8ed, %esi       # imm = 0xFFFFD8ED
callq 0x582a
movq %rbx, %rdi
callq 0x163ca
movl %ebp, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/gplessis[P]dotdeb-redis/deps/lua/src/liolib.c
// Function: read_line
static int read_line (lua_State *L, FILE *f) {
  luaL_Buffer b;
  luaL_buffinit(L, &b);
  for (;;) {
    size_t l;
    char *p = luaL_prepbuffer(&b);
    if (fgets(p, LUAL_BUFFERSIZE, f) == NULL) {  /* eof? */
      luaL_pushresult(&b);  /* close buffer */
      return (lua_objlen(L, -1) > 0);  /* check whether read something */
    }
    l = strlen(p);
    if (l == 0 || p[l-1] != '\n')
      luaL_addsize(&b, l);
    else {
      luaL_addsize(&b, l - 1);  /* do not include `eol' */
      luaL_pushresult(&b);  /* close buffer */
      return 1;  /* read at least an `eol' */
    }
  }
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x2018, %rsp           # imm = 0x2018
movq %rsi, %r14
movq %rdi, %rbx
movq %rsp, %r15
movq %r15, %rsi
callq 0x1121c
movq %r15, %rdi
callq 0x112d0
movq %rax, %r15
movq %rax, %rdi
movl $0x2000, %esi           # imm = 0x2000
movq %r14, %rdx
callq 0x4250
testq %rax, %rax
je 0x165fc
movq %rsp, %r12
movq %r15, %rdi
callq 0x4140
testq %rax, %rax
je 0x165d8
cmpb $0xa, -0x1(%r15,%rax)
je 0x1661e
addq %rax, (%rsp)
movq %r12, %rdi
callq 0x112d0
movq %rax, %r15
movq %rax, %rdi
movl $0x2000, %esi           # imm = 0x2000
movq %r14, %rdx
callq 0x4250
testq %rax, %rax
jne 0x165c3
movq %rsp, %rdi
callq 0x112b2
movq %rbx, %rdi
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
callq 0x5af9
movq %rax, %rcx
xorl %eax, %eax
testq %rcx, %rcx
setne %al
jmp 0x16631
decq %rax
movq %rsp, %rdi
addq %rax, (%rdi)
callq 0x112b2
movl $0x1, %eax
addq $0x2018, %rsp           # imm = 0x2018
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/gplessis[P]dotdeb-redis/deps/lua/src/liolib.c
// Function: read_chars
static int read_chars (lua_State *L, FILE *f, size_t n) {
  size_t rlen;  /* how much to read */
  size_t nr;  /* number of chars actually read */
  luaL_Buffer b;
  luaL_buffinit(L, &b);
  rlen = LUAL_BUFFERSIZE;  /* try to read that much each time */
  do {
    char *p = luaL_prepbuffer(&b);
    if (rlen > n) rlen = n;  /* cannot read more than asked */
    nr = fread(p, sizeof(char), rlen, f);
    luaL_addsize(&b, nr);
    n -= nr;  /* still have to read `n' chars */
  } while (n > 0 && nr == rlen);  /* until end of count or eof */
  luaL_pushresult(&b);  /* close buffer */
  return (n == 0 || lua_objlen(L, -1) > 0);
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x2020, %rsp           # imm = 0x2020
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %rbx
leaq 0x8(%rsp), %r12
movq %r12, %rsi
callq 0x1121c
movl $0x2000, %r13d          # imm = 0x2000
movq %r12, %rdi
callq 0x112d0
cmpq %r14, %r13
cmovaeq %r14, %r13
movl $0x1, %esi
movq %rax, %rdi
movq %r13, %rdx
movq %r15, %rcx
callq 0x40d0
addq %rax, 0x8(%rsp)
subq %rax, %r14
cmpq %r13, %rax
jne 0x16870
testq %r14, %r14
jne 0x1683c
leaq 0x8(%rsp), %rdi
callq 0x112b2
testq %r14, %r14
je 0x16899
movq %rbx, %rdi
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
callq 0x5af9
movq %rax, %rcx
xorl %eax, %eax
testq %rcx, %rcx
setne %al
jmp 0x1689e
movl $0x1, %eax
addq $0x2020, %rsp           # imm = 0x2020
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/gplessis[P]dotdeb-redis/deps/lua/src/liolib.c
// Function: g_write
static int g_write (lua_State *L, FILE *f, int arg) {
  int nargs = lua_gettop(L) - 1;
  int status = 1;
  for (; nargs--; arg++) {
    if (lua_type(L, arg) == LUA_TNUMBER) {
      /* optimization: could be done exactly as for strings */
      status = status &&
          fprintf(f, LUA_NUMBER_FMT, lua_tonumber(L, arg)) > 0;
    }
    else {
      size_t l;
      const char *s = luaL_checklstring(L, arg, &l);
      status = status && (fwrite(s, sizeof(char), l, f) == l);
    }
  }
  return pushresult(L, status, NULL);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %edx, %ebp
movq %rsi, %r14
movq %rdi, %rbx
callq 0x54dc
movl %eax, %r15d
movl $0x1, %r12d
decl %r15d
je 0x1694f
movq %rsp, %r13
movq %rbx, %rdi
movl %ebp, %esi
callq 0x584a
cmpl $0x3, %eax
jne 0x16912
testl %r12d, %r12d
je 0x16945
movq %rbx, %rdi
movl %ebp, %esi
callq 0x5a04
movq %r14, %rdi
leaq 0x5580(%rip), %rsi      # 0x1be80
movb $0x1, %al
callq 0x42c0
xorl %r12d, %r12d
testl %eax, %eax
setg %r12b
jmp 0x16948
movq %rbx, %rdi
movl %ebp, %esi
movq %r13, %rdx
callq 0x10b24
testl %r12d, %r12d
je 0x16945
movq (%rsp), %rdx
movl $0x1, %esi
movq %rax, %rdi
movq %r14, %rcx
callq 0x44e0
xorl %r12d, %r12d
cmpq (%rsp), %rax
sete %r12b
jmp 0x16948
xorl %r12d, %r12d
incl %ebp
decl %r15d
jne 0x168d8
movq %rbx, %rdi
movl %r12d, %esi
xorl %edx, %edx
callq 0x163ff
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/gplessis[P]dotdeb-redis/deps/lua/src/liolib.c
// Function: io_lines
static int io_lines (lua_State *L) {
  if (lua_isnoneornil(L, 1)) {  /* no arguments? */
    /* will iterate over default input */
    lua_rawgeti(L, LUA_ENVIRONINDEX, IO_INPUT);
    return f_lines(L);
  }
  else {
    const char *filename = luaL_checkstring(L, 1);
    FILE **pf = newfile(L);
    *pf = fopen(filename, "r");
    if (*pf == NULL)
      fileerror(L, 1, filename);
    aux_lines(L, lua_gettop(L), 1);
    return 1;
  }
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %rbx
movl $0x1, %esi
callq 0x584a
movq %rbx, %rdi
testl %eax, %eax
jle 0x16a16
movl $0x1, %esi
xorl %edx, %edx
callq 0x10b24
movq %rax, %r14
movq %rbx, %rdi
callq 0x16d4d
movq %rax, %r15
leaq 0x64f5(%rip), %rsi      # 0x1cedc
movq %r14, %rdi
callq 0x4430
movq %rax, (%r15)
testq %rax, %rax
jne 0x16a02
movq %rbx, %rdi
movq %r14, %rsi
callq 0x16d94
movq %rbx, %rdi
callq 0x54dc
movq %rbx, %rdi
movl %eax, %esi
movl $0x1, %edx
jmp 0x16a37
movl $0xffffd8ef, %esi       # imm = 0xFFFFD8EF
movl $0x1, %edx
callq 0x5f73
movq %rbx, %rdi
callq 0x1638b
movq %rbx, %rdi
movl $0x1, %esi
xorl %edx, %edx
callq 0x1648d
movl $0x1, %eax
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/gplessis[P]dotdeb-redis/deps/lua/src/liolib.c
// Function: io_open
static int io_open (lua_State *L) {
  const char *filename = luaL_checkstring(L, 1);
  const char *mode = luaL_optstring(L, 2, "r");
  FILE **pf = newfile(L);
  *pf = fopen(filename, mode);
  return (*pf == NULL) ? pushresult(L, 0, filename) : 1;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
movl $0x1, %esi
xorl %edx, %edx
callq 0x10b24
movq %rax, %r14
leaq 0x6474(%rip), %rdx      # 0x1cedc
movq %rbx, %rdi
movl $0x2, %esi
xorl %ecx, %ecx
callq 0x10acb
movq %rax, %r15
movq %rbx, %rdi
callq 0x16d4d
movq %rax, %r12
movq %r14, %rdi
movq %r15, %rsi
callq 0x4430
movq %rax, (%r12)
testq %rax, %rax
je 0x16aaa
movl $0x1, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
movq %rbx, %rdi
xorl %esi, %esi
movq %r14, %rdx
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
jmp 0x163ff
// File: /workspace/github_c_makefile_star2_O3/gplessis[P]dotdeb-redis/deps/lua/src/liolib.c
// Function: io_popen
static int io_popen (lua_State *L) {
  const char *filename = luaL_checkstring(L, 1);
  const char *mode = luaL_optstring(L, 2, "r");
  FILE **pf = newfile(L);
  *pf = lua_popen(L, filename, mode);
  return (*pf == NULL) ? pushresult(L, 0, filename) : 1;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %rbx
movl $0x1, %esi
xorl %edx, %edx
callq 0x10b24
movq %rax, %r14
leaq 0x63e3(%rip), %rdx      # 0x1cedc
movq %rbx, %rdi
movl $0x2, %esi
xorl %ecx, %ecx
callq 0x10acb
movq %rbx, %rdi
callq 0x16d4d
movq %rax, %r15
leaq 0x5e74(%rip), %rsi      # 0x1c98e
movq %rbx, %rdi
xorl %eax, %eax
callq 0x108d7
movq $0x0, (%r15)
movq %rbx, %rdi
xorl %esi, %esi
movq %r14, %rdx
popq %rbx
popq %r14
popq %r15
jmp 0x163ff
// File: /workspace/github_c_makefile_star2_O3/gplessis[P]dotdeb-redis/deps/lua/src/liolib.c
// Function: io_type
static int io_type (lua_State *L) {
  void *ud;
  luaL_checkany(L, 1);
  ud = lua_touserdata(L, 1);
  lua_getfield(L, LUA_REGISTRYINDEX, LUA_FILEHANDLE);
  if (ud == NULL || !lua_getmetatable(L, 1) || !lua_rawequal(L, -2, -1))
    lua_pushnil(L);  /* not a file */
  else if (*((FILE **)ud) == NULL)
    lua_pushliteral(L, "closed file");
  else
    lua_pushliteral(L, "file");
  return 1;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movl $0x1, %esi
callq 0x10cb3
movq %rbx, %rdi
movl $0x1, %esi
callq 0x5b7b
movq %rax, %r14
leaq 0x5cf9(%rip), %rdx      # 0x1c8b9
movq %rbx, %rdi
movl $0xffffd8f0, %esi       # imm = 0xFFFFD8F0
callq 0x5eef
testq %r14, %r14
je 0x16c0d
movq %rbx, %rdi
movl $0x1, %esi
callq 0x5ff9
testl %eax, %eax
je 0x16c0d
movq %rbx, %rdi
movl $0xfffffffe, %esi       # imm = 0xFFFFFFFE
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
callq 0x5916
testl %eax, %eax
je 0x16c0d
cmpq $0x0, (%r14)
je 0x16c17
leaq 0x5cea(%rip), %rsi      # 0x1c8f0
movl $0x4, %edx
jmp 0x16c23
movq %rbx, %rdi
callq 0x5c17
jmp 0x16c2b
leaq 0x5ccb(%rip), %rsi      # 0x1c8e9
movl $0xb, %edx
movq %rbx, %rdi
callq 0x5c5a
movl $0x1, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O3/gplessis[P]dotdeb-redis/deps/lua/src/liolib.c
// Function: getiofile
static FILE *getiofile (lua_State *L, int findex) {
  FILE *f;
  lua_rawgeti(L, LUA_ENVIRONINDEX, findex);
  f = *(FILE **)lua_touserdata(L, -1);
  if (f == NULL)
    luaL_error(L, "standard %s file is closed", fnames[findex - 1]);
  return f;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movl %esi, %r15d
movq %rdi, %rbx
movl $0xffffd8ef, %esi       # imm = 0xFFFFD8EF
movl %r15d, %edx
callq 0x5f73
movq %rbx, %rdi
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
callq 0x5b7b
movq (%rax), %r14
testq %r14, %r14
jne 0x16ca6
decl %r15d
leaq 0x5d4a(%rip), %rax      # 0x1c9d8
movslq (%rax,%r15,4), %rdx
addq %rax, %rdx
leaq 0x5cd7(%rip), %rsi      # 0x1c973
movq %rbx, %rdi
xorl %eax, %eax
callq 0x108d7
movq %r14, %rax
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/gplessis[P]dotdeb-redis/deps/lua/src/liolib.c
// Function: g_iofile
static int g_iofile (lua_State *L, int f, const char *mode) {
  if (!lua_isnoneornil(L, 1)) {
    const char *filename = lua_tostring(L, 1);
    if (filename) {
      FILE **pf = newfile(L);
      *pf = fopen(filename, mode);
      if (*pf == NULL)
        fileerror(L, 1, filename);
    }
    else {
      tofile(L);  /* check that it's a valid file handle */
      lua_pushvalue(L, 1);
    }
    lua_rawseti(L, LUA_ENVIRONINDEX, f);
  }
  /* return current value */
  lua_rawgeti(L, LUA_ENVIRONINDEX, f);
  return 1;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %rdx, %r15
movl %esi, %ebx
movq %rdi, %r14
movl $0x1, %esi
callq 0x584a
testl %eax, %eax
jle 0x16d35
movq %r14, %rdi
movl $0x1, %esi
xorl %edx, %edx
callq 0x5a88
testq %rax, %rax
je 0x16d11
movq %rax, %r12
movq %r14, %rdi
callq 0x16d4d
movq %rax, %r13
movq %r12, %rdi
movq %r15, %rsi
callq 0x4430
movq %rax, (%r13)
testq %rax, %rax
jne 0x16d26
movq %r14, %rdi
movq %r12, %rsi
callq 0x16d94
jmp 0x16d26
movq %r14, %rdi
callq 0x1638b
movq %r14, %rdi
movl $0x1, %esi
callq 0x582a
movq %r14, %rdi
movl $0xffffd8ef, %esi       # imm = 0xFFFFD8EF
movl %ebx, %edx
callq 0x618f
movq %r14, %rdi
movl $0xffffd8ef, %esi       # imm = 0xFFFFD8EF
movl %ebx, %edx
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
jmp 0x5f73
// File: /workspace/github_c_makefile_star2_O3/gplessis[P]dotdeb-redis/deps/lua/src/liolib.c
// Function: newfile
static FILE **newfile (lua_State *L) {
  FILE **pf = (FILE **)lua_newuserdata(L, sizeof(FILE *));
  *pf = NULL;  /* file handle is currently `closed' */
  luaL_getmetatable(L, LUA_FILEHANDLE);
  lua_setmetatable(L, -2);
  return pf;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movl $0x8, %esi
callq 0x669d
movq %rax, %r14
movq $0x0, (%rax)
leaq 0x5b4a(%rip), %rdx      # 0x1c8b9
movq %rbx, %rdi
movl $0xffffd8f0, %esi       # imm = 0xFFFFD8F0
callq 0x5eef
movq %rbx, %rdi
movl $0xfffffffe, %esi       # imm = 0xFFFFFFFE
callq 0x61fe
movq %r14, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O3/gplessis[P]dotdeb-redis/deps/lua/src/lmathlib.c
// Function: luaopen_math
LUALIB_API int luaopen_math (lua_State *L) {
  luaL_register(L, LUA_MATHLIBNAME, mathlib);
  lua_pushnumber(L, PI);
  lua_setfield(L, -2, "pi");
  lua_pushnumber(L, HUGE_VAL);
  lua_setfield(L, -2, "huge");
#if defined(LUA_COMPAT_MOD)
  lua_getfield(L, -1, "fmod");
  lua_setfield(L, -2, "mod");
#endif
  return 1;
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
leaq 0x525f(%rip), %rsi      # 0x1c052
leaq 0xfad6(%rip), %rdx      # 0x268d0
callq 0x10ebd
movsd 0x5bd9(%rip), %xmm0     # 0x1c9e0
movq %rbx, %rdi
callq 0x5c2b
leaq 0x5bfa(%rip), %rdx      # 0x1ca10
movq %rbx, %rdi
movl $0xfffffffe, %esi       # imm = 0xFFFFFFFE
callq 0x60cb
movsd 0x5bbd(%rip), %xmm0     # 0x1c9e8
movq %rbx, %rdi
callq 0x5c2b
leaq 0x5bd9(%rip), %rdx      # 0x1ca13
movq %rbx, %rdi
movl $0xfffffffe, %esi       # imm = 0xFFFFFFFE
callq 0x60cb
leaq 0x5bca(%rip), %rdx      # 0x1ca18
movq %rbx, %rdi
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
callq 0x5eef
leaq 0x4e5c(%rip), %rdx      # 0x1bcbe
movq %rbx, %rdi
movl $0xfffffffe, %esi       # imm = 0xFFFFFFFE
callq 0x60cb
movl $0x1, %eax
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O3/gplessis[P]dotdeb-redis/deps/lua/src/lmathlib.c
// Function: math_frexp
static int math_frexp (lua_State *L) {
  int e;
  lua_pushnumber(L, frexp(luaL_checknumber(L, 1), &e));
  lua_pushinteger(L, e);
  return 2;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movl $0x1, %esi
callq 0x10ce6
leaq 0x4(%rsp), %r14
movq %r14, %rdi
callq 0x4260
movq %rbx, %rdi
callq 0x5c2b
movslq (%r14), %rsi
movq %rbx, %rdi
callq 0x5c40
movl $0x2, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O3/gplessis[P]dotdeb-redis/deps/lua/src/lmathlib.c
// Function: math_modf
static int math_modf (lua_State *L) {
  double ip;
  double fp = modf(luaL_checknumber(L, 1), &ip);
  lua_pushnumber(L, ip);
  lua_pushnumber(L, fp);
  return 2;
}

// Assembly:
pushq %r14
pushq %rbx
subq $0x18, %rsp
movq %rdi, %rbx
movl $0x1, %esi
callq 0x10ce6
leaq 0x10(%rsp), %r14
movq %r14, %rdi
callq 0x4180
movsd %xmm0, 0x8(%rsp)
movsd (%r14), %xmm0
movq %rbx, %rdi
callq 0x5c2b
movq %rbx, %rdi
movsd 0x8(%rsp), %xmm0
callq 0x5c2b
movl $0x2, %eax
addq $0x18, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O3/gplessis[P]dotdeb-redis/deps/lua/src/lmathlib.c
// Function: math_random
static int math_random (lua_State *L) {
  /* the `%' avoids the (rare) case of r==1, and is needed also because on
     some systems (SunOS!) `rand()' may return a value larger than RAND_MAX */
  lua_Number r = (lua_Number)(rand()%RAND_MAX) / (lua_Number)RAND_MAX;
  switch (lua_gettop(L)) {  /* check number of arguments */
    case 0: {  /* no arguments */
      lua_pushnumber(L, r);  /* Number between 0 and 1 */
      break;
    }
    case 1: {  /* only upper limit */
      int u = luaL_checkint(L, 1);
      luaL_argcheck(L, 1<=u, 1, "interval is empty");
      lua_pushnumber(L, floor(r*u)+1);  /* int between 1 and `u' */
      break;
    }
    case 2: {  /* lower and upper limits */
      int l = luaL_checkint(L, 1);
      int u = luaL_checkint(L, 2);
      luaL_argcheck(L, l<=u, 2, "interval is empty");
      lua_pushnumber(L, floor(r*(u-l+1))+l);  /* int between `l' and `u' */
      break;
    }
    default: return luaL_error(L, "wrong number of arguments");
  }
  return 1;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq %rdi, %rbx
callq 0x4560
cltq
movq %rax, %rcx
shlq $0x1e, %rcx
addq %rax, %rcx
movq %rcx, %rdx
shrq $0x3f, %rdx
sarq $0x3d, %rcx
addl %edx, %ecx
addl %ecx, %eax
shll $0x1f, %ecx
addl %eax, %ecx
cvtsi2sd %ecx, %xmm0
divsd 0x56e1(%rip), %xmm0     # 0x1c9f8
movsd %xmm0, 0x8(%rsp)
movq %rbx, %rdi
callq 0x54dc
cmpl $0x2, %eax
je 0x1738c
cmpl $0x1, %eax
je 0x17345
testl %eax, %eax
jne 0x173ff
movq %rbx, %rdi
movsd 0x8(%rsp), %xmm0
jmp 0x173eb
movq %rbx, %rdi
movl $0x1, %esi
callq 0x10d74
movq %rax, %r14
testl %r14d, %r14d
jg 0x1736e
leaq 0x5731(%rip), %rdx      # 0x1ca92
movq %rbx, %rdi
movl $0x1, %esi
callq 0x10820
cvtsi2sd %r14d, %xmm1
movsd 0x8(%rsp), %xmm0
mulsd %xmm1, %xmm0
callq 0x4480
addsd 0x452e(%rip), %xmm0     # 0x1b8b8
jmp 0x173e8
movq %rbx, %rdi
movl $0x1, %esi
callq 0x10d74
movq %rax, %r14
movq %rbx, %rdi
movl $0x2, %esi
callq 0x10d74
movq %rax, %r15
subl %r14d, %r15d
jge 0x173c5
leaq 0x56da(%rip), %rdx      # 0x1ca92
movq %rbx, %rdi
movl $0x2, %esi
callq 0x10820
incl %r15d
cvtsi2sd %r15d, %xmm1
movsd 0x8(%rsp), %xmm0
mulsd %xmm1, %xmm0
callq 0x4480
xorps %xmm1, %xmm1
cvtsi2sd %r14d, %xmm1
addsd %xmm1, %xmm0
movq %rbx, %rdi
callq 0x5c2b
movl $0x1, %eax
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
retq
leaq 0x569e(%rip), %rsi      # 0x1caa4
movq %rbx, %rdi
xorl %eax, %eax
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
jmp 0x108d7
// File: /workspace/github_c_makefile_star2_O3/gplessis[P]dotdeb-redis/deps/lua/src/loslib.c
// Function: getfield
static int getfield (lua_State *L, const char *key, int d) {
  int res;
  lua_getfield(L, -1, key);
  if (lua_isnumber(L, -1))
    res = (int)lua_tointeger(L, -1);
  else {
    if (d < 0)
      return luaL_error(L, "field " LUA_QS " missing in date table", key);
    res = d;
  }
  lua_pop(L, 1);
  return res;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movl %edx, %r14d
movq %rsi, %r15
movq %rdi, %rbx
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
movq %r15, %rdx
callq 0x5eef
movq %rbx, %rdi
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
callq 0x58a3
testl %eax, %eax
je 0x17bad
movq %rbx, %rdi
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
callq 0x5a33
movq %rax, %r14
jmp 0x17bb2
testl %r14d, %r14d
js 0x17bc8
movq %rbx, %rdi
movl $0xfffffffe, %esi       # imm = 0xFFFFFFFE
callq 0x54e9
movl %r14d, %eax
popq %rbx
popq %r14
popq %r15
retq
leaq 0x4f84(%rip), %rsi      # 0x1cb53
movq %rbx, %rdi
movq %r15, %rdx
xorl %eax, %eax
popq %rbx
popq %r14
popq %r15
jmp 0x108d7
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O3/gplessis[P]dotdeb-redis/deps/lua/src/ltablib.c
// Function: foreach
static int foreach (lua_State *L) {
  luaL_checktype(L, 1, LUA_TTABLE);
  luaL_checktype(L, 2, LUA_TFUNCTION);
  lua_pushnil(L);  /* first key */
  while (lua_next(L, 1)) {
    lua_pushvalue(L, 2);  /* function */
    lua_pushvalue(L, -3);  /* key */
    lua_pushvalue(L, -3);  /* value */
    lua_call(L, 2, 1);
    if (!lua_isnil(L, -1))
      return 1;
    lua_pop(L, 2);  /* remove value and result */
  }
  return 0;
}

// Assembly:
pushq %rbp
pushq %rbx
pushq %rax
movq %rdi, %rbx
movl $0x1, %esi
movl $0x5, %edx
callq 0x10c7f
movq %rbx, %rdi
movl $0x2, %esi
movl $0x6, %edx
callq 0x10c7f
movq %rbx, %rdi
callq 0x5c17
movq %rbx, %rdi
movl $0x1, %esi
callq 0x65c3
xorl %ebp, %ebp
testl %eax, %eax
je 0x17d9a
movq %rbx, %rdi
movl $0x2, %esi
callq 0x582a
movq %rbx, %rdi
movl $0xfffffffd, %esi       # imm = 0xFFFFFFFD
callq 0x582a
movq %rbx, %rdi
movl $0xfffffffd, %esi       # imm = 0xFFFFFFFD
callq 0x582a
movq %rbx, %rdi
movl $0x2, %esi
movl $0x1, %edx
callq 0x6305
movq %rbx, %rdi
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
callq 0x584a
testl %eax, %eax
jne 0x17d95
movq %rbx, %rdi
movl $0xfffffffd, %esi       # imm = 0xFFFFFFFD
callq 0x54e9
movq %rbx, %rdi
movl $0x1, %esi
callq 0x65c3
jmp 0x17d2b
movl $0x1, %ebp
movl %ebp, %eax
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/gplessis[P]dotdeb-redis/deps/lua/src/ltablib.c
// Function: foreachi
static int foreachi (lua_State *L) {
  int i;
  int n = aux_getn(L, 1);
  luaL_checktype(L, 2, LUA_TFUNCTION);
  for (i=1; i <= n; i++) {
    lua_pushvalue(L, 2);  /* function */
    lua_pushinteger(L, i);  /* 1st argument */
    lua_rawgeti(L, 1, i);  /* 2nd argument */
    lua_call(L, 2, 1);
    if (!lua_isnil(L, -1))
      return 1;
    lua_pop(L, 1);  /* remove nil result */
  }
  return 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movl $0x1, %esi
movl $0x5, %edx
callq 0x10c7f
movq %rbx, %rdi
movl $0x1, %esi
callq 0x5af9
movq %rax, %r14
movq %rbx, %rdi
movl $0x2, %esi
movl $0x6, %edx
callq 0x10c7f
testl %r14d, %r14d
jle 0x17e51
incl %r14d
movl $0x1, %r15d
movl $0x1, %ebp
movq %rbx, %rdi
movl $0x2, %esi
callq 0x582a
movq %rbx, %rdi
movq %r15, %rsi
callq 0x5c40
movq %rbx, %rdi
movl $0x1, %esi
movl %r15d, %edx
callq 0x5f73
movq %rbx, %rdi
movl $0x2, %esi
movl $0x1, %edx
callq 0x6305
movq %rbx, %rdi
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
callq 0x584a
testl %eax, %eax
jne 0x17e53
movq %rbx, %rdi
movl $0xfffffffe, %esi       # imm = 0xFFFFFFFE
callq 0x54e9
incq %r15
cmpq %r15, %r14
jne 0x17df1
xorl %ebp, %ebp
movl %ebp, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/gplessis[P]dotdeb-redis/deps/lua/src/ltablib.c
// Function: maxn
static int maxn (lua_State *L) {
  lua_Number max = 0;
  luaL_checktype(L, 1, LUA_TTABLE);
  lua_pushnil(L);  /* first key */
  while (lua_next(L, 1)) {
    lua_pop(L, 1);  /* remove value */
    if (lua_type(L, -1) == LUA_TNUMBER) {
      lua_Number v = lua_tonumber(L, -1);
      if (v > max) max = v;
    }
  }
  lua_pushnumber(L, max);
  return 1;
}

// Assembly:
pushq %rbx
subq $0x10, %rsp
movq %rdi, %rbx
movl $0x1, %esi
movl $0x5, %edx
callq 0x10c7f
movq %rbx, %rdi
callq 0x5c17
movq %rbx, %rdi
movl $0x1, %esi
callq 0x65c3
xorpd %xmm0, %xmm0
testl %eax, %eax
je 0x17f17
movsd %xmm0, 0x8(%rsp)
movq %rbx, %rdi
movl $0xfffffffe, %esi       # imm = 0xFFFFFFFE
callq 0x54e9
movq %rbx, %rdi
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
callq 0x584a
cmpl $0x3, %eax
jne 0x17f04
movq %rbx, %rdi
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
callq 0x5a04
maxsd 0x8(%rsp), %xmm0
movsd %xmm0, 0x8(%rsp)
movq %rbx, %rdi
movl $0x1, %esi
callq 0x65c3
testl %eax, %eax
jne 0x17ecc
jmp 0x17f1d
movsd %xmm0, 0x8(%rsp)
movq %rbx, %rdi
movsd 0x8(%rsp), %xmm0
callq 0x5c2b
movl $0x1, %eax
addq $0x10, %rsp
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O3/gplessis[P]dotdeb-redis/deps/lua/src/ltablib.c
// Function: tinsert
static int tinsert (lua_State *L) {
  int e = aux_getn(L, 1) + 1;  /* first empty element */
  int pos;  /* where to insert new element */
  switch (lua_gettop(L)) {
    case 2: {  /* called with only 2 arguments */
      pos = e;  /* insert new element at the end */
      break;
    }
    case 3: {
      int i;
      pos = luaL_checkint(L, 2);  /* 2nd argument is the position */
      if (pos > e) e = pos;  /* `grow' array if necessary */
      for (i = e; i > pos; i--) {  /* move up elements */
        lua_rawgeti(L, 1, i-1);
        lua_rawseti(L, 1, i);  /* t[i] = t[i-1] */
      }
      break;
    }
    default: {
      return luaL_error(L, "wrong number of arguments to " LUA_QL("insert"));
    }
  }
  luaL_setn(L, 1, e);  /* new size */
  lua_rawseti(L, 1, pos);  /* t[pos] = v */
  return 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movl $0x1, %esi
movl $0x5, %edx
callq 0x10c7f
movq %rbx, %rdi
movl $0x1, %esi
callq 0x5af9
movq %rax, %r14
movq %rbx, %rdi
callq 0x54dc
cmpl $0x2, %eax
je 0x17fb7
cmpl $0x3, %eax
jne 0x17fda
movq %rbx, %rdi
movl $0x2, %esi
callq 0x10d74
movq %rax, %r15
cmpl %r15d, %r14d
jl 0x17fbd
leal 0x1(%r14), %ebp
movq %rbx, %rdi
movl $0x1, %esi
movl %r14d, %edx
callq 0x5f73
movq %rbx, %rdi
movl $0x1, %esi
movl %ebp, %edx
callq 0x618f
leal -0x1(%r14), %eax
cmpl %r15d, %r14d
movl %eax, %r14d
jg 0x17f86
jmp 0x17fbd
incl %r14d
movl %r14d, %r15d
movq %rbx, %rdi
movl $0x1, %esi
movl %r15d, %edx
callq 0x618f
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
leaq 0x4c38(%rip), %rsi      # 0x1cc19
movq %rbx, %rdi
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0x108d7
// File: /workspace/github_c_makefile_star2_O3/gplessis[P]dotdeb-redis/deps/lua/src/ltablib.c
// Function: tremove
static int tremove (lua_State *L) {
  int e = aux_getn(L, 1);
  int pos = luaL_optint(L, 2, e);
  if (!(1 <= pos && pos <= e))  /* position is outside bounds? */
   return 0;  /* nothing to remove */
  luaL_setn(L, 1, e - 1);  /* t.n = n-1 */
  lua_rawgeti(L, 1, pos);  /* result = t[pos] */
  for ( ;pos<e; pos++) {
    lua_rawgeti(L, 1, pos+1);
    lua_rawseti(L, 1, pos);  /* t[pos] = t[pos+1] */
  }
  lua_pushnil(L);
  lua_rawseti(L, 1, e);  /* t[e] = nil */
  return 1;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rdi, %rbx
movl $0x1, %esi
movl $0x5, %edx
callq 0x10c7f
movq %rbx, %rdi
movl $0x1, %esi
callq 0x5af9
movq %rax, %r14
movslq %r14d, %r12
movq %rbx, %rdi
movl $0x2, %esi
movq %r12, %rdx
callq 0x10dbc
movq %rax, %r15
testl %r15d, %r15d
setle %al
cmpl %r12d, %r15d
setg %cl
xorl %ebp, %ebp
orb %al, %cl
jne 0x180a5
movl $0x1, %ebp
movq %rbx, %rdi
movl $0x1, %esi
movl %r15d, %edx
callq 0x5f73
cmpl %r14d, %r15d
jge 0x1808d
leal 0x1(%r15), %r12d
movq %rbx, %rdi
movl $0x1, %esi
movl %r12d, %edx
callq 0x5f73
movq %rbx, %rdi
movl $0x1, %esi
movl %r15d, %edx
callq 0x618f
movl %r12d, %r15d
cmpl %r12d, %r14d
jne 0x18061
movq %rbx, %rdi
callq 0x5c17
movq %rbx, %rdi
movl $0x1, %esi
movl %r14d, %edx
callq 0x618f
movl %ebp, %eax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/gplessis[P]dotdeb-redis/deps/lua/src/ltablib.c
// Function: setn
static int setn (lua_State *L) {
  luaL_checktype(L, 1, LUA_TTABLE);
#ifndef luaL_setn
  luaL_setn(L, 1, luaL_checkint(L, 2));
#else
  luaL_error(L, LUA_QL("setn") " is obsolete");
#endif
  lua_pushvalue(L, 1);
  return 1;
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
movl $0x1, %esi
movl $0x5, %edx
callq 0x10c7f
leaq 0x4b75(%rip), %rsi      # 0x1cc3f
movq %rbx, %rdi
xorl %eax, %eax
callq 0x108d7
movq %rbx, %rdi
movl $0x1, %esi
callq 0x582a
movl $0x1, %eax
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O3/gplessis[P]dotdeb-redis/deps/lua/src/ltablib.c
// Function: sort_comp
static int sort_comp (lua_State *L, int a, int b) {
  if (!lua_isnil(L, 2)) {  /* function? */
    int res;
    lua_pushvalue(L, 2);
    lua_pushvalue(L, a-1);  /* -1 to compensate function */
    lua_pushvalue(L, b-2);  /* -2 to compensate function and `a' */
    lua_call(L, 2, 1);
    res = lua_toboolean(L, -1);
    lua_pop(L, 1);
    return res;
  }
  else  /* a < b? */
    return lua_lessthan(L, a, b);
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movl %edx, %ebp
movl %esi, %r14d
movq %rdi, %rbx
movl $0x2, %esi
callq 0x584a
testl %eax, %eax
je 0x185c2
movq %rbx, %rdi
movl $0x2, %esi
callq 0x582a
decl %r14d
movq %rbx, %rdi
movl %r14d, %esi
callq 0x582a
addl $-0x2, %ebp
movq %rbx, %rdi
movl %ebp, %esi
callq 0x582a
movq %rbx, %rdi
movl $0x2, %esi
movl $0x1, %edx
callq 0x6305
movq %rbx, %rdi
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
callq 0x5a62
movl %eax, %ebp
movq %rbx, %rdi
movl $0xfffffffe, %esi       # imm = 0xFFFFFFFE
callq 0x54e9
movl %ebp, %eax
popq %rbx
popq %r14
popq %rbp
retq
movq %rbx, %rdi
movl %r14d, %esi
movl %ebp, %edx
popq %rbx
popq %r14
popq %rbp
jmp 0x59b9
nop
// File: /workspace/github_c_makefile_star2_O3/gplessis[P]dotdeb-redis/deps/lua/src/lstrlib.c
// Function: luaopen_string
LUALIB_API int luaopen_string (lua_State *L) {
  luaL_register(L, LUA_STRLIBNAME, strlib);
#if defined(LUA_COMPAT_GFIND)
  lua_getfield(L, -1, "gmatch");
  lua_setfield(L, -2, "gfind");
#endif
  createmetatable(L);
  return 1;
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
leaq 0x4b4c(%rip), %rsi      # 0x1d12b
leaq 0xe65a(%rip), %rdx      # 0x26c40
callq 0x10ebd
leaq 0x4722(%rip), %rdx      # 0x1cd14
movq %rbx, %rdi
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
callq 0x5eef
leaq 0x4715(%rip), %rdx      # 0x1cd1b
movq %rbx, %rdi
movl $0xfffffffe, %esi       # imm = 0xFFFFFFFE
callq 0x60cb
movq %rbx, %rdi
xorl %esi, %esi
movl $0x1, %edx
callq 0x5fa8
leaq 0x4b79(%rip), %rsi      # 0x1d1a2
movq %rbx, %rdi
xorl %edx, %edx
callq 0x5c5a
movq %rbx, %rdi
movl $0xfffffffe, %esi       # imm = 0xFFFFFFFE
callq 0x582a
movq %rbx, %rdi
movl $0xfffffffe, %esi       # imm = 0xFFFFFFFE
callq 0x61fe
movq %rbx, %rdi
movl $0xfffffffe, %esi       # imm = 0xFFFFFFFE
callq 0x54e9
movq %rbx, %rdi
movl $0xfffffffe, %esi       # imm = 0xFFFFFFFE
callq 0x582a
leaq 0x3612(%rip), %rdx      # 0x1bc80
movq %rbx, %rdi
movl $0xfffffffe, %esi       # imm = 0xFFFFFFFE
callq 0x60cb
movq %rbx, %rdi
movl $0xfffffffe, %esi       # imm = 0xFFFFFFFE
callq 0x54e9
movl $0x1, %eax
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O3/gplessis[P]dotdeb-redis/deps/lua/src/lstrlib.c
// Function: str_byte
static int str_byte (lua_State *L) {
  size_t l;
  const char *s = luaL_checklstring(L, 1, &l);
  ptrdiff_t posi = posrelat(luaL_optinteger(L, 2, 1), l);
  ptrdiff_t pose = posrelat(luaL_optinteger(L, 3, posi), l);
  int n, i;
  if (posi <= 0) posi = 1;
  if ((size_t)pose > l) pose = l;
  if (posi > pose) return 0;  /* empty interval; return no values */
  n = (int)(pose -  posi + 1);
  if (posi + n <= pose)  /* overflow? */
    luaL_error(L, "string slice too long");
  luaL_checkstack(L, n, "string slice too long");
  for (i=0; i<n; i++)
    lua_pushinteger(L, uchar(s[posi+i-1]));
  return n;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq %rsp, %r12
movl $0x1, %esi
movq %r12, %rdx
callq 0x10b24
movq %rax, %r15
movl $0x1, %ebp
movl $0x1, %edx
movq %rbx, %rdi
movl $0x2, %esi
callq 0x10dbc
movq (%r12), %rcx
incq %rcx
movq %rax, %r13
sarq $0x3f, %r13
andq %rcx, %r13
addq %rax, %r13
xorl %r14d, %r14d
testq %r13, %r13
movl $0x0, %edx
cmovgq %r13, %rdx
movq %rbx, %rdi
movl $0x3, %esi
callq 0x10dbc
movq (%r12), %rdx
leaq 0x1(%rdx), %rsi
movq %rax, %rcx
sarq $0x3f, %rcx
andq %rsi, %rcx
addq %rax, %rcx
testq %rcx, %rcx
cmovleq %r14, %rcx
cmpq $0x2, %r13
cmovlq %rbp, %r13
cmpq %rdx, %rcx
cmovaeq %rdx, %rcx
cmpq %r13, %rcx
jb 0x1878a
movl %ecx, %r12d
subl %r13d, %r12d
leal 0x1(%r12), %r14d
movslq %r14d, %rax
addq %r13, %rax
cmpq %rcx, %rax
jg 0x1874e
leaq 0x4609(%rip), %rsi      # 0x1cd4d
movq %rbx, %rdi
xorl %eax, %eax
callq 0x108d7
leaq 0x45f8(%rip), %rdx      # 0x1cd4d
movq %rbx, %rdi
movl %r14d, %esi
callq 0x10c49
cmpl $0x7ffffffe, %r12d      # imm = 0x7FFFFFFE
ja 0x1878a
addq %r13, %r15
decq %r15
movl %r14d, %r12d
xorl %r13d, %r13d
movzbl (%r15,%r13), %esi
movq %rbx, %rdi
callq 0x5c40
incq %r13
cmpq %r13, %r12
jne 0x18775
movl %r14d, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/gplessis[P]dotdeb-redis/deps/lua/src/lstrlib.c
// Function: str_char
static int str_char (lua_State *L) {
  int n = lua_gettop(L);  /* number of arguments */
  int i;
  luaL_Buffer b;
  luaL_buffinit(L, &b);
  for (i=1; i<=n; i++) {
    int c = luaL_checkint(L, i);
    luaL_argcheck(L, uchar(c) == c, i, "invalid value");
    luaL_addchar(&b, uchar(c));
  }
  luaL_pushresult(&b);
  return 1;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x2018, %rsp           # imm = 0x2018
movq %rdi, %rbx
callq 0x54dc
movl %eax, %r14d
movq %rsp, %rsi
movq %rbx, %rdi
callq 0x1121c
testl %r14d, %r14d
jle 0x18837
leaq 0x2018(%rsp), %r15
negl %r14d
movl $0x1, %r13d
leaq 0x4583(%rip), %r12      # 0x1cd63
movq %rbx, %rdi
movl %r13d, %esi
callq 0x10d74
movq %rax, %rbp
testl $0xffffff00, %ebp       # imm = 0xFFFFFF00
je 0x18804
movq %rbx, %rdi
movl %r13d, %esi
movq %r12, %rdx
callq 0x10820
movq (%rsp), %rax
cmpq %r15, %rax
jb 0x18819
movq %rsp, %rdi
callq 0x112d0
movq (%rsp), %rax
leaq 0x1(%rax), %rcx
movq %rcx, (%rsp)
movb %bpl, (%rax)
leal (%r14,%r13), %eax
incl %eax
movl %r13d, %ecx
incl %ecx
movl %ecx, %r13d
cmpl $0x1, %eax
jne 0x187e0
movq %rsp, %rdi
callq 0x112b2
movl $0x1, %eax
addq $0x2018, %rsp           # imm = 0x2018
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/gplessis[P]dotdeb-redis/deps/lua/src/lstrlib.c
// Function: str_dump
static int str_dump (lua_State *L) {
  luaL_Buffer b;
  luaL_checktype(L, 1, LUA_TFUNCTION);
  lua_settop(L, 1);
  luaL_buffinit(L,&b);
  if (lua_dump(L, writer, &b) != 0)
    luaL_error(L, "unable to dump given function");
  luaL_pushresult(&b);
  return 1;
}

// Assembly:
pushq %r14
pushq %rbx
subq $0x2018, %rsp           # imm = 0x2018
movq %rdi, %rbx
movl $0x1, %esi
movl $0x6, %edx
callq 0x10c7f
movq %rbx, %rdi
movl $0x1, %esi
callq 0x54e9
movq %rsp, %r14
movq %rbx, %rdi
movq %r14, %rsi
callq 0x1121c
leaq 0xd19(%rip), %rsi       # 0x195ad
movq %rbx, %rdi
movq %r14, %rdx
callq 0x64bf
testl %eax, %eax
je 0x188b4
leaq 0x44c7(%rip), %rsi      # 0x1cd71
movq %rbx, %rdi
xorl %eax, %eax
callq 0x108d7
movq %rsp, %rdi
callq 0x112b2
movl $0x1, %eax
addq $0x2018, %rsp           # imm = 0x2018
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O3/gplessis[P]dotdeb-redis/deps/lua/src/lstrlib.c
// Function: str_len
static int str_len (lua_State *L) {
  size_t l;
  luaL_checklstring(L, 1, &l);
  lua_pushinteger(L, l);
  return 1;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq %rsp, %r14
movl $0x1, %esi
movq %r14, %rdx
callq 0x10b24
movq (%r14), %rsi
movq %rbx, %rdi
callq 0x5c40
movl $0x1, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O3/gplessis[P]dotdeb-redis/deps/lua/src/lstrlib.c
// Function: str_lower
static int str_lower (lua_State *L) {
  size_t l;
  size_t i;
  luaL_Buffer b;
  const char *s = luaL_checklstring(L, 1, &l);
  luaL_buffinit(L, &b);
  for (i=0; i<l; i++)
    luaL_addchar(&b, tolower(uchar(s[i])));
  luaL_pushresult(&b);
  return 1;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x2020, %rsp           # imm = 0x2020
movq %rdi, %r14
movq %rsp, %r15
movl $0x1, %esi
movq %r15, %rdx
callq 0x10b24
movq %rax, %rbx
leaq 0x8(%rsp), %rsi
movq %r14, %rdi
callq 0x1121c
cmpq $0x0, (%r15)
je 0x1930f
leaq 0x2020(%rsp), %r15
xorl %r12d, %r12d
leaq 0x8(%rsp), %r14
movq 0x8(%rsp), %r13
cmpq %r15, %r13
jb 0x192e9
movq %r14, %rdi
callq 0x112d0
movq 0x8(%rsp), %r13
callq 0x4570
movq (%rax), %rax
movzbl (%rbx,%r12), %ecx
movb (%rax,%rcx,4), %al
leaq 0x1(%r13), %rcx
movq %rcx, 0x8(%rsp)
movb %al, (%r13)
incq %r12
cmpq (%rsp), %r12
jb 0x192d2
leaq 0x8(%rsp), %rdi
callq 0x112b2
movl $0x1, %eax
addq $0x2020, %rsp           # imm = 0x2020
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/gplessis[P]dotdeb-redis/deps/lua/src/lstrlib.c
// Function: str_rep
static int str_rep (lua_State *L) {
  size_t l;
  luaL_Buffer b;
  const char *s = luaL_checklstring(L, 1, &l);
  int n = luaL_checkint(L, 2);
  luaL_buffinit(L, &b);
  while (n-- > 0)
    luaL_addlstring(&b, s, l);
  luaL_pushresult(&b);
  return 1;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x2020, %rsp           # imm = 0x2020
movq %rdi, %r15
movq %rsp, %rdx
movl $0x1, %esi
callq 0x10b24
movq %rax, %rbx
movq %r15, %rdi
movl $0x2, %esi
callq 0x10d74
movq %rax, %r14
leaq 0x8(%rsp), %rsi
movq %r15, %rdi
callq 0x1121c
testl %r14d, %r14d
jle 0x19397
incl %r14d
leaq 0x8(%rsp), %r15
movq (%rsp), %rdx
movq %r15, %rdi
movq %rbx, %rsi
callq 0x1122f
decl %r14d
cmpl $0x1, %r14d
ja 0x1937f
leaq 0x8(%rsp), %rdi
callq 0x112b2
movl $0x1, %eax
addq $0x2020, %rsp           # imm = 0x2020
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/gplessis[P]dotdeb-redis/deps/lua/src/lstrlib.c
// Function: str_reverse
static int str_reverse (lua_State *L) {
  size_t l;
  luaL_Buffer b;
  const char *s = luaL_checklstring(L, 1, &l);
  luaL_buffinit(L, &b);
  while (l--) luaL_addchar(&b, s[l]);
  luaL_pushresult(&b);
  return 1;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x2020, %rsp           # imm = 0x2020
movq %rdi, %r14
movq %rsp, %r15
movl $0x1, %esi
movq %r15, %rdx
callq 0x10b24
movq %rax, %rbx
leaq 0x8(%rsp), %rsi
movq %r14, %rdi
callq 0x1121c
movq (%r15), %rax
subq $0x1, %rax
movq %rax, (%r15)
jb 0x19432
leaq 0x2020(%rsp), %r15
leaq 0x8(%rsp), %r14
movq 0x8(%rsp), %rcx
cmpq %r15, %rcx
jb 0x19416
movq %r14, %rdi
callq 0x112d0
movq (%rsp), %rax
movq 0x8(%rsp), %rcx
movb (%rbx,%rax), %al
leaq 0x1(%rcx), %rdx
movq %rdx, 0x8(%rsp)
movb %al, (%rcx)
movq (%rsp), %rax
subq $0x1, %rax
movq %rax, (%rsp)
jae 0x193fb
leaq 0x8(%rsp), %rdi
callq 0x112b2
movl $0x1, %eax
addq $0x2020, %rsp           # imm = 0x2020
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/gplessis[P]dotdeb-redis/deps/lua/src/lstrlib.c
// Function: str_sub
static int str_sub (lua_State *L) {
  size_t l;
  const char *s = luaL_checklstring(L, 1, &l);
  ptrdiff_t start = posrelat(luaL_checkinteger(L, 2), l);
  ptrdiff_t end = posrelat(luaL_optinteger(L, 3, -1), l);
  if (start < 1) start = 1;
  if (end > (ptrdiff_t)l) end = (ptrdiff_t)l;
  if (start <= end)
    lua_pushlstring(L, s+start-1, end-start+1);
  else lua_pushliteral(L, "");
  return 1;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq %rsp, %r15
movl $0x1, %esi
movq %r15, %rdx
callq 0x10b24
movq %rax, %r14
movq %rbx, %rdi
movl $0x2, %esi
callq 0x10d74
movq (%r15), %rcx
incq %rcx
movq %rax, %r12
sarq $0x3f, %r12
andq %rcx, %r12
addq %rax, %r12
movq %rbx, %rdi
movl $0x3, %esi
movq $-0x1, %rdx
callq 0x10dbc
movq (%r15), %rcx
leaq 0x1(%rcx), %rdx
movq %rax, %rsi
sarq $0x3f, %rsi
andq %rdx, %rsi
addq %rax, %rsi
xorl %edx, %edx
testq %rsi, %rsi
cmovgq %rsi, %rdx
cmpq $0x2, %r12
movl $0x1, %eax
cmovgeq %r12, %rax
cmpq %rcx, %rdx
cmovgeq %rcx, %rdx
subq %rax, %rdx
jge 0x194e4
leaq 0x3cc5(%rip), %rsi      # 0x1d1a2
movq %rbx, %rdi
xorl %edx, %edx
jmp 0x194f1
leaq (%r14,%rax), %rsi
decq %rsi
incq %rdx
movq %rbx, %rdi
callq 0x5c5a
movl $0x1, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/gplessis[P]dotdeb-redis/deps/lua/src/lstrlib.c
// Function: str_upper
static int str_upper (lua_State *L) {
  size_t l;
  size_t i;
  luaL_Buffer b;
  const char *s = luaL_checklstring(L, 1, &l);
  luaL_buffinit(L, &b);
  for (i=0; i<l; i++)
    luaL_addchar(&b, toupper(uchar(s[i])));
  luaL_pushresult(&b);
  return 1;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x2020, %rsp           # imm = 0x2020
movq %rdi, %r14
movq %rsp, %r15
movl $0x1, %esi
movq %r15, %rdx
callq 0x10b24
movq %rax, %rbx
leaq 0x8(%rsp), %rsi
movq %r14, %rdi
callq 0x1121c
cmpq $0x0, (%r15)
je 0x1958d
leaq 0x2020(%rsp), %r15
xorl %r12d, %r12d
leaq 0x8(%rsp), %r14
movq 0x8(%rsp), %r13
cmpq %r15, %r13
jb 0x19567
movq %r14, %rdi
callq 0x112d0
movq 0x8(%rsp), %r13
callq 0x4030
movq (%rax), %rax
movzbl (%rbx,%r12), %ecx
movb (%rax,%rcx,4), %al
leaq 0x1(%r13), %rcx
movq %rcx, 0x8(%rsp)
movb %al, (%r13)
incq %r12
cmpq (%rsp), %r12
jb 0x19550
leaq 0x8(%rsp), %rdi
callq 0x112b2
movl $0x1, %eax
addq $0x2020, %rsp           # imm = 0x2020
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/gplessis[P]dotdeb-redis/deps/lua/src/lstrlib.c
// Function: classend
static const char *classend (MatchState *ms, const char *p) {
  switch (*p++) {
    case L_ESC: {
      if (*p == '\0')
        luaL_error(ms->L, "malformed pattern (ends with " LUA_QL("%%") ")");
      return p+1;
    }
    case '[': {
      if (*p == '^') p++;
      do {  /* look for a `]' */
        if (*p == '\0')
          luaL_error(ms->L, "malformed pattern (missing " LUA_QL("]") ")");
        if (*(p++) == L_ESC && *p != '\0')
          p++;  /* skip escapes (e.g. `%]') */
      } while (*p != ']');
      return p+1;
    }
    default: {
      return p;
    }
  }
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rsi, %r15
movq %rdi, %r14
leaq 0x1(%rsi), %rbx
movzbl (%rsi), %eax
cmpl $0x5b, %eax
je 0x19cc3
cmpl $0x25, %eax
jne 0x19d16
cmpb $0x0, (%rbx)
jne 0x19cba
movq 0x10(%r14), %rdi
leaq 0x3147(%rip), %rsi      # 0x1cdfa
xorl %eax, %eax
callq 0x108d7
addq $0x2, %r15
movq %r15, %rbx
jmp 0x19d16
leaq 0x2(%r15), %rax
xorl %ecx, %ecx
cmpb $0x5e, 0x1(%r15)
sete %cl
cmoveq %rax, %rbx
movb 0x1(%rcx,%r15), %al
leaq 0x313c(%rip), %r15      # 0x1ce1d
testb %al, %al
jne 0x19cf5
movq 0x10(%r14), %rdi
movq %r15, %rsi
xorl %eax, %eax
callq 0x108d7
movb (%rbx), %al
leaq 0x1(%rbx), %rcx
cmpb $0x25, %al
jne 0x19d0a
cmpb $0x0, 0x1(%rbx)
je 0x19d0a
addq $0x2, %rbx
movq %rbx, %rcx
movq %rcx, %rbx
movb (%rcx), %al
cmpb $0x5d, %al
jne 0x19ce1
incq %rbx
movq %rbx, %rax
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/gplessis[P]dotdeb-redis/deps/lua/src/lstrlib.c
// Function: singlematch
static int singlematch (int c, const char *p, const char *ep) {
  switch (*p) {
    case '.': return 1;  /* matches any char */
    case L_ESC: return match_class(c, uchar(*(p+1)));
    case '[': return matchbracketclass(c, p, ep-1);
    default:  return (uchar(*p) == c);
  }
}

// Assembly:
movzbl (%rsi), %ecx
cmpl $0x5b, %ecx
je 0x19dd1
cmpl $0x2e, %ecx
je 0x19dcb
cmpl $0x25, %ecx
jne 0x19dd9
movzbl 0x1(%rsi), %esi
jmp 0x19e5f
movl $0x1, %eax
retq
decq %rdx
jmp 0x19d1f
xorl %eax, %eax
cmpl %edi, %ecx
sete %al
retq
// File: /workspace/github_c_makefile_star2_O3/gplessis[P]dotdeb-redis/deps/lua/src/lstrlib.c
// Function: max_expand
static const char *max_expand (MatchState *ms, const char *s,
                                 const char *p, const char *ep) {
  ptrdiff_t i = 0;  /* counts maximum expand for item */
  while ((s+i)<ms->src_end && singlematch(uchar(*(s+i)), p, ep))
    i++;
  /* keeps trying to match with the maximum repetitions */
  while (i>=0) {
    const char *res = match(ms, (s+i), ep+1);
    if (res) return res;
    i--;  /* else didn't match; reduce 1 repetition to try again */
  }
  return NULL;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rcx, %rbx
movq %rsi, %r14
movq %rdi, %r15
movq 0x8(%rdi), %rbp
subq %rsi, %rbp
jbe 0x19e25
movq %rdx, %r12
xorl %r13d, %r13d
movzbl (%r14,%r13), %edi
movq %r12, %rsi
movq %rbx, %rdx
callq 0x19db0
testl %eax, %eax
je 0x19e28
incq %r13
cmpq %r13, %rbp
jne 0x19e04
movq %rbp, %r13
jmp 0x19e28
xorl %r13d, %r13d
incq %rbx
xorl %r12d, %r12d
testq %r13, %r13
js 0x19e4d
leaq (%r14,%r13), %rsi
movq %r15, %rdi
movq %rbx, %rdx
callq 0x1980e
decq %r13
testq %rax, %rax
je 0x19e2e
movq %rax, %r12
movq %r12, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq