LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O3/gplessis[P]dotdeb-redis/deps/lua/src/lstrlib.c
// Function: gmatch_aux
static int gmatch_aux (lua_State *L) {
  MatchState ms;
  size_t ls;
  const char *s = lua_tolstring(L, lua_upvalueindex(1), &ls);
  const char *p = lua_tostring(L, lua_upvalueindex(2));
  const char *src;
  ms.L = L;
  ms.src_init = s;
  ms.src_end = s+ls;
  for (src = s + (size_t)lua_tointeger(L, lua_upvalueindex(3));
       src <= ms.src_end;
       src++) {
    const char *e;
    ms.level = 0;
    if ((e = match(&ms, src, p)) != NULL) {
      lua_Integer newstart = e-s;
      if (e == src) newstart++;  /* empty match? go at least one position */
      lua_pushinteger(L, newstart);
      lua_replace(L, lua_upvalueindex(3));
      return push_captures(&ms, src, e);
    }
  }
  return 0;  /* not found */
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x228, %rsp            # imm = 0x228
movq %rdi, %rbx
movq %rsp, %r14
movl $0xffffd8ed, %esi       # imm = 0xFFFFD8ED
movq %r14, %rdx
callq 0x5a88
movq %rax, %r12
xorl %ebp, %ebp
movq %rbx, %rdi
movl $0xffffd8ec, %esi       # imm = 0xFFFFD8EC
xorl %edx, %edx
callq 0x5a88
movq %rax, %r13
movq %rbx, 0x18(%rsp)
movq %r12, 0x8(%rsp)
movq (%r14), %r14
leaq (%r12,%r14), %rax
movq %rax, 0x10(%rsp)
movq %rbx, %rdi
movl $0xffffd8eb, %esi       # imm = 0xFFFFD8EB
callq 0x5a33
cmpq %r14, %rax
jg 0x1a116
movq %rax, %r15
addq %r12, %r15
leaq 0x8(%rsp), %r14
movl $0x0, 0x20(%rsp)
movq %r14, %rdi
movq %r15, %rsi
movq %r13, %rdx
callq 0x1980e
testq %rax, %rax
jne 0x1a0dd
incq %r15
cmpq 0x10(%rsp), %r15
jbe 0x1a0b4
xorl %ebp, %ebp
jmp 0x1a116
movq %rax, %rbp
subq %r12, %rax
xorl %esi, %esi
cmpq %rbp, %r15
sete %sil
addq %rax, %rsi
movq %rbx, %rdi
callq 0x5c40
movq %rbx, %rdi
movl $0xffffd8eb, %esi       # imm = 0xFFFFD8EB
callq 0x576b
leaq 0x8(%rsp), %rdi
movq %r15, %rsi
movq %rbp, %rdx
callq 0x19bbc
movl %eax, %ebp
movl %ebp, %eax
addq $0x228, %rsp            # imm = 0x228
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O3/gplessis[P]dotdeb-redis/deps/lua/src/loadlib.c
// Function: gctm
static int gctm (lua_State *L) {
  void **lib = (void **)luaL_checkudata(L, 1, "_LOADLIB");
  if (*lib) ll_unloadlib(*lib);
  *lib = NULL;  /* mark library as closed */
  return 0;
}

// Assembly:
pushq %rax
leaq 0x2c6d(%rip), %rdx      # 0x1cf51
movl $0x1, %esi
callq 0x10bcd
movq $0x0, (%rax)
xorl %eax, %eax
popq %rcx
retq
// File: /workspace/github_c_makefile_star2_O3/gplessis[P]dotdeb-redis/deps/lua/src/loadlib.c
// Function: setpath
static void setpath (lua_State *L, const char *fieldname, const char *envname,
                                   const char *def) {
  const char *path = getenv(envname);
  if (path == NULL)  /* no environment variable? */
    lua_pushstring(L, def);  /* use default */
  else {
    /* replace ";;" by ";AUXMARK;" and then AUXMARK by default path */
    path = luaL_gsub(L, path, LUA_PATHSEP LUA_PATHSEP,
                              LUA_PATHSEP AUXMARK LUA_PATHSEP);
    luaL_gsub(L, path, AUXMARK, def);
    lua_remove(L, -2);
  }
  setprogdir(L);
  lua_setfield(L, -2, fieldname);
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rcx, %r15
movq %rsi, %rbx
movq %rdi, %r14
movq %rdx, %rdi
callq 0x4040
testq %rax, %rax
je 0x1a351
leaq 0x2e7f(%rip), %rdx      # 0x1d19a
leaq 0x2e7b(%rip), %rcx      # 0x1d19d
movq %r14, %rdi
movq %rax, %rsi
callq 0x1112a
leaq 0x2e6d(%rip), %rdx      # 0x1d1a1
movq %r14, %rdi
movq %rax, %rsi
movq %r15, %rcx
callq 0x1112a
movq %r14, %rdi
movl $0xfffffffe, %esi       # imm = 0xFFFFFFFE
callq 0x5640
jmp 0x1a35c
movq %r14, %rdi
movq %r15, %rsi
callq 0x5cb1
movq %r14, %rdi
movl $0xfffffffe, %esi       # imm = 0xFFFFFFFE
movq %rbx, %rdx
popq %rbx
popq %r14
popq %r15
jmp 0x60cb
// File: /workspace/github_c_makefile_star2_O3/gplessis[P]dotdeb-redis/deps/lua/src/loadlib.c
// Function: ll_seeall
static int ll_seeall (lua_State *L) {
  luaL_checktype(L, 1, LUA_TTABLE);
  if (!lua_getmetatable(L, 1)) {
    lua_createtable(L, 0, 1); /* create new metatable */
    lua_pushvalue(L, -1);
    lua_setmetatable(L, 1);
  }
  lua_pushvalue(L, LUA_GLOBALSINDEX);
  lua_setfield(L, -2, "__index");  /* mt.__index = _G */
  return 0;
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
movl $0x1, %esi
movl $0x5, %edx
callq 0x10c7f
movq %rbx, %rdi
movl $0x1, %esi
callq 0x5ff9
testl %eax, %eax
jne 0x1a42c
movq %rbx, %rdi
xorl %esi, %esi
movl $0x1, %edx
callq 0x5fa8
movq %rbx, %rdi
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
callq 0x582a
movq %rbx, %rdi
movl $0x1, %esi
callq 0x61fe
movq %rbx, %rdi
movl $0xffffd8ee, %esi       # imm = 0xFFFFD8EE
callq 0x582a
leaq 0x1840(%rip), %rdx      # 0x1bc80
movq %rbx, %rdi
movl $0xfffffffe, %esi       # imm = 0xFFFFFFFE
callq 0x60cb
xorl %eax, %eax
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O3/gplessis[P]dotdeb-redis/deps/lua/src/loadlib.c
// Function: ll_loadfunc
static int ll_loadfunc (lua_State *L, const char *path, const char *sym) {
  void **reg = ll_register(L, path);
  if (*reg == NULL) *reg = ll_load(L, path);
  if (*reg == NULL)
    return ERRLIB;  /* unable to load library */
  else {
    lua_CFunction f = ll_sym(L, *reg, sym);
    if (f == NULL)
      return ERRFUNC;  /* unable to find function */
    lua_pushcfunction(L, f);
    return 0;  /* return function */
  }
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rsi, %r14
movq %rdi, %rbx
leaq 0x2c22(%rip), %rsi      # 0x1d085
leaq 0x2c20(%rip), %rdx      # 0x1d08a
movq %r14, %rcx
xorl %eax, %eax
callq 0x5d2f
movq %rbx, %rdi
movl $0xffffd8f0, %esi       # imm = 0xFFFFD8F0
callq 0x5ecf
movq %rbx, %rdi
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
callq 0x584a
movq %rbx, %rdi
testl %eax, %eax
je 0x1a4a4
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
callq 0x5b7b
movq %rax, %r15
jmp 0x1a51b
movl $0xfffffffe, %esi       # imm = 0xFFFFFFFE
callq 0x54e9
movl $0x8, %esi
movq %rbx, %rdi
callq 0x669d
movq %rax, %r15
movq $0x0, (%rax)
leaq 0x2a85(%rip), %rdx      # 0x1cf51
movq %rbx, %rdi
movl $0xffffd8f0, %esi       # imm = 0xFFFFD8F0
callq 0x5eef
movq %rbx, %rdi
movl $0xfffffffe, %esi       # imm = 0xFFFFFFFE
callq 0x61fe
leaq 0x2b98(%rip), %rsi      # 0x1d085
leaq 0x2b96(%rip), %rdx      # 0x1d08a
movq %rbx, %rdi
movq %r14, %rcx
xorl %eax, %eax
callq 0x5d2f
movq %rbx, %rdi
movl $0xfffffffe, %esi       # imm = 0xFFFFFFFE
callq 0x582a
movq %rbx, %rdi
movl $0xffffd8f0, %esi       # imm = 0xFFFFD8F0
callq 0x60a4
movq (%r15), %r14
leaq 0x2b6f(%rip), %rsi      # 0x1d094
movl $0x3a, %edx
movq %rbx, %rdi
callq 0x5c5a
movl $0x2, %eax
testq %r14, %r14
jne 0x1a548
movq $0x0, (%r15)
movl $0x1, %eax
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/gplessis[P]dotdeb-redis/deps/lua/src/loadlib.c
// Function: loader_preload
static int loader_preload (lua_State *L) {
  const char *name = luaL_checkstring(L, 1);
  lua_getfield(L, LUA_ENVIRONINDEX, "preload");
  if (!lua_istable(L, -1))
    luaL_error(L, LUA_QL("package.preload") " must be a table");
  lua_getfield(L, -1, name);
  if (lua_isnil(L, -1))  /* not found? */
    lua_pushfstring(L, "\n\tno field package.preload['%s']", name);
  return 1;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movl $0x1, %esi
xorl %edx, %edx
callq 0x10b24
movq %rax, %r14
leaq 0x2af7(%rip), %rdx      # 0x1d062
movq %rbx, %rdi
movl $0xffffd8ef, %esi       # imm = 0xFFFFD8EF
callq 0x5eef
movq %rbx, %rdi
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
callq 0x584a
cmpl $0x5, %eax
je 0x1a59b
leaq 0x2b3e(%rip), %rsi      # 0x1d0cf
movq %rbx, %rdi
xorl %eax, %eax
callq 0x108d7
movq %rbx, %rdi
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
movq %r14, %rdx
callq 0x5eef
movq %rbx, %rdi
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
callq 0x584a
testl %eax, %eax
jne 0x1a5d0
leaq 0x2b2e(%rip), %rsi      # 0x1d0f1
movq %rbx, %rdi
movq %r14, %rdx
xorl %eax, %eax
callq 0x5d2f
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/loadlib.c
// Function: loader_Lua
static int loader_Lua (lua_State *L) {
  const char *filename;
  const char *name = luaL_checkstring(L, 1);
  filename = findfile(L, name, "path");
  if (filename == NULL) return 1;  /* library not found in this path */
  if (luaL_loadfile(L, filename) != 0)
    loaderror(L, filename);
  return 1;  /* library loaded successfully */
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movl $0x1, %esi
xorl %edx, %edx
callq 0x10b24
leaq 0x29ff(%rip), %rdx      # 0x1cff6
movq %rbx, %rdi
movq %rax, %rsi
callq 0x1a740
testq %rax, %rax
je 0x1a624
movq %rax, %r14
movq %rbx, %rdi
movq %rax, %rsi
callq 0x11560
testl %eax, %eax
je 0x1a624
movq %rbx, %rdi
movq %r14, %rsi
callq 0x1a8a4
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/loadlib.c
// Function: loader_C
static int loader_C (lua_State *L) {
  const char *funcname;
  const char *name = luaL_checkstring(L, 1);
  const char *filename = findfile(L, name, "cpath");
  if (filename == NULL) return 1;  /* library not found in this path */
  funcname = mkfuncname(L, name);
  if (ll_loadfunc(L, filename, funcname) != 0)
    loaderror(L, filename);
  return 1;  /* library loaded successfully */
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %rbx
movl $0x1, %esi
xorl %edx, %edx
callq 0x10b24
movq %rax, %r15
leaq 0x29a6(%rip), %rdx      # 0x1cff5
movq %rbx, %rdi
movq %rax, %rsi
callq 0x1a740
testq %rax, %rax
je 0x1a683
movq %rax, %r14
movq %rbx, %rdi
movq %r15, %rsi
callq 0x1a8ec
movq %rbx, %rdi
movq %r14, %rsi
callq 0x1a451
movq %rbx, %rdi
movq %r14, %rsi
callq 0x1a8a4
movl $0x1, %eax
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/gplessis[P]dotdeb-redis/deps/lua/src/loadlib.c
// Function: loader_Croot
static int loader_Croot (lua_State *L) {
  const char *funcname;
  const char *filename;
  const char *name = luaL_checkstring(L, 1);
  const char *p = strchr(name, '.');
  int stat;
  if (p == NULL) return 0;  /* is root */
  lua_pushlstring(L, name, p - name);
  filename = findfile(L, lua_tostring(L, -1), "cpath");
  if (filename == NULL) return 1;  /* root not found */
  funcname = mkfuncname(L, name);
  if ((stat = ll_loadfunc(L, filename, funcname)) != 0) {
    if (stat != ERRFUNC) loaderror(L, filename);  /* real error */
    lua_pushfstring(L, "\n\tno module " LUA_QS " in file " LUA_QS,
                       name, filename);
    return 1;  /* function not found */
  }
  return 1;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %rbx
xorl %r15d, %r15d
movl $0x1, %esi
xorl %edx, %edx
callq 0x10b24
movq %rax, %r14
movq %rax, %rdi
movl $0x2e, %esi
callq 0x4160
testq %rax, %rax
je 0x1a737
subq %r14, %rax
movq %rbx, %rdi
movq %r14, %rsi
movq %rax, %rdx
callq 0x5c5a
movq %rbx, %rdi
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
xorl %edx, %edx
callq 0x5a88
leaq 0x2914(%rip), %rdx      # 0x1cff5
movq %rbx, %rdi
movq %rax, %rsi
callq 0x1a740
testq %rax, %rax
je 0x1a731
movq %rax, %r15
movq %rbx, %rdi
movq %r14, %rsi
callq 0x1a8ec
movq %rbx, %rdi
movq %r15, %rsi
callq 0x1a451
cmpl $0x2, %eax
je 0x1a71a
movq %rbx, %rdi
movq %r15, %rsi
callq 0x1a8a4
leaq 0x2a5b(%rip), %rsi      # 0x1d17c
movq %rbx, %rdi
movq %r14, %rdx
movq %r15, %rcx
xorl %eax, %eax
callq 0x5d2f
movl $0x1, %r15d
movl %r15d, %eax
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/gplessis[P]dotdeb-redis/deps/lua/src/loadlib.c
// Function: findfile
static const char *findfile (lua_State *L, const char *name,
                                           const char *pname) {
  const char *path;
  name = luaL_gsub(L, name, ".", LUA_DIRSEP);
  lua_getfield(L, LUA_ENVIRONINDEX, pname);
  path = lua_tostring(L, -1);
  if (path == NULL)
    luaL_error(L, LUA_QL("package.%s") " must be a string", pname);
  lua_pushliteral(L, "");  /* error accumulator */
  while ((path = pushnexttemplate(L, path)) != NULL) {
    const char *filename;
    filename = luaL_gsub(L, lua_tostring(L, -1), LUA_PATH_MARK, name);
    lua_remove(L, -2);  /* remove path template */
    if (readable(filename))  /* does file exist and is readable? */
      return filename;  /* return that file name */
    lua_pushfstring(L, "\n\tno file " LUA_QS, filename);
    lua_remove(L, -2);  /* remove file name */
    lua_concat(L, 2);  /* add entry to possible error message */
  }
  return NULL;  /* not found */
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %r15
movq %rdi, %rbx
leaq 0x20ed(%rip), %rdx      # 0x1c845
leaq 0x29b3(%rip), %rcx      # 0x1d112
callq 0x1112a
movq %rax, %r14
movq %rbx, %rdi
movl $0xffffd8ef, %esi       # imm = 0xFFFFD8EF
movq %r15, %rdx
callq 0x5eef
movq %rbx, %rdi
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
xorl %edx, %edx
callq 0x5a88
movq %rax, %rbp
testq %rax, %rax
jne 0x1a7a2
leaq 0x297f(%rip), %rsi      # 0x1d114
movq %rbx, %rdi
movq %r15, %rdx
xorl %eax, %eax
callq 0x108d7
leaq 0x29f9(%rip), %rsi      # 0x1d1a2
movq %rbx, %rdi
xorl %edx, %edx
callq 0x5c5a
leaq 0x20be(%rip), %r15      # 0x1c878
leaq 0x271b(%rip), %r12      # 0x1cedc
movzbl (%rbp), %eax
cmpl $0x3b, %eax
je 0x1a7ef
testl %eax, %eax
je 0x1a886
movq %rbp, %rdi
movl $0x3b, %esi
callq 0x4160
testq %rax, %rax
je 0x1a7f4
movq %rax, %r13
movq %rax, %rdx
subq %rbp, %rdx
jmp 0x1a805
incq %rbp
jmp 0x1a7c1
movq %rbp, %rdi
callq 0x4140
movq %rax, %rdx
movq %rax, %r13
addq %rbp, %r13
movq %rbx, %rdi
movq %rbp, %rsi
callq 0x5c5a
movq %rbx, %rdi
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
xorl %edx, %edx
callq 0x5a88
movq %rbx, %rdi
movq %rax, %rsi
movq %r15, %rdx
movq %r14, %rcx
callq 0x1112a
movq %rax, %rbp
movq %rbx, %rdi
movl $0xfffffffe, %esi       # imm = 0xFFFFFFFE
callq 0x5640
movq %rbp, %rdi
movq %r12, %rsi
callq 0x4430
testq %rax, %rax
jne 0x1a88a
movq %rbx, %rdi
leaq 0x28d8(%rip), %rsi      # 0x1d132
movq %rbp, %rdx
xorl %eax, %eax
callq 0x5d2f
movq %rbx, %rdi
movl $0xfffffffe, %esi       # imm = 0xFFFFFFFE
callq 0x5640
movq %rbx, %rdi
movl $0x2, %esi
callq 0x65fa
movq %r13, %rbp
jmp 0x1a7c1
xorl %ebp, %ebp
jmp 0x1a892
movq %rax, %rdi
callq 0x4130
movq %rbp, %rax
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/loadlib.c
// Function: mkfuncname
static const char *mkfuncname (lua_State *L, const char *modname) {
  const char *funcname;
  const char *mark = strchr(modname, *LUA_IGMARK);
  if (mark) modname = mark + 1;
  funcname = luaL_gsub(L, modname, ".", LUA_OFSEP);
  funcname = lua_pushfstring(L, POF"%s", funcname);
  lua_remove(L, -2);  /* remove 'gsub' result */
  return funcname;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %rbx
movq %rsi, %rdi
movl $0x2d, %esi
callq 0x4160
leaq 0x1(%rax), %rsi
testq %rax, %rax
cmoveq %r14, %rsi
leaq 0x1f30(%rip), %rdx      # 0x1c845
leaq 0x2853(%rip), %rcx      # 0x1d16f
movq %rbx, %rdi
callq 0x1112a
leaq 0x2846(%rip), %rsi      # 0x1d171
movq %rbx, %rdi
movq %rax, %rdx
xorl %eax, %eax
callq 0x5d2f
movq %rbx, %rdi
movl $0xfffffffe, %esi       # imm = 0xFFFFFFFE
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x5640
// File: /workspace/github_c_makefile_star2_O3/sebbekarlsson[P]cola/src/ast_node_empty.c
// Function: init_ast_node_empty
ast_node_empty* init_ast_node_empty(token* tok) {
    ast_node_empty* ast;
    ast = calloc(1, sizeof(ast_node_empty));
    ast->tok = tok;
    ast->base.type = AST_TYPE_EMPTY;

    return ast;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movq %rdi, %rbx
movl $0x1, %edi
movl $0x20, %esi
callq 0x10b0
movq %rbx, 0x18(%rax)
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O3/sebbekarlsson[P]cola/src/data_type_utils.c
// Function: name_to_data_type
int name_to_data_type(char* name) {
    if (strcmp(name, "int") == 0) {
        return _DATA_TYPE_INTEGER;
    } else if (strcmp(name, "float") == 0) {
        return _DATA_TYPE_FLOAT;
    } else if (strcmp(name, "void") == 0) {
        return _DATA_TYPE_VOID;
    } else if (strcmp(name, "char") == 0) {
        return _DATA_TYPE_CHAR;
    } else if (strcmp(name, "string") == 0) {
        return _DATA_TYPE_STRING;
    } else if (strcmp(name, "vector") == 0) {
        return _DATA_TYPE_VECTOR;
    } else {
        return -1;
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movq %rdi, %rbx
leaq 0x384c(%rip), %rsi      # 0x5048
callq 0x10c0
testl %eax, %eax
je 0x186d
leaq 0x37f8(%rip), %rsi      # 0x5004
movq %rbx, %rdi
callq 0x10c0
testl %eax, %eax
je 0x1874
leaq 0x37eb(%rip), %rsi      # 0x500a
movq %rbx, %rdi
callq 0x10c0
testl %eax, %eax
je 0x187b
leaq 0x37dd(%rip), %rsi      # 0x500f
movq %rbx, %rdi
callq 0x10c0
testl %eax, %eax
je 0x1882
leaq 0x37cf(%rip), %rsi      # 0x5014
movq %rbx, %rdi
callq 0x10c0
testl %eax, %eax
je 0x1889
leaq 0x37c3(%rip), %rsi      # 0x501b
movq %rbx, %rdi
callq 0x10c0
movl %eax, %ecx
xorl %eax, %eax
negl %ecx
sbbl %eax, %eax
orl $0x2e, %eax
jmp 0x188e
movl $0x29, %eax
jmp 0x188e
movl $0x2a, %eax
jmp 0x188e
movl $0x2b, %eax
jmp 0x188e
movl $0x28, %eax
jmp 0x188e
movl $0x2d, %eax
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O3/sebbekarlsson[P]cola/src/default_scope_initialize.c
// Function: print
ast_node* _print(ss_vector* args) {
    for (int i = 0; i < args->size; i++) {
        ast_node* node = (ast_node*)args->items[i];

        if (node->type == AST_TYPE_INTEGER) {
            ast_node_integer* node_integer = (ast_node_integer*) node;
            printf("%d\n", node_integer->value);
        } else if (node->type == AST_TYPE_FLOAT) {
            ast_node_float* node_float = (ast_node_float*) node;
            printf("%f\n", node_float->value);
        } else if (node->type == AST_TYPE_CHAR) {
            ast_node_char* node_char = (ast_node_char*) node;
            printf("%c\n", node_char->value);
        } else if (node->type == AST_TYPE_STRING) {
            ast_node_string* node_string = (ast_node_string*) node;
            printf("%s\n", node_string->value);
        } else {
            printf("<%d>\n", (int)node->type);
        }
    }

    return (ast_node*) init_ast_node_empty((void*)0);
}

// Assembly:
cmpq $0x0, (%rdi)
je 0x193e
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
leaq 0x376a(%rip), %r14      # 0x5024
leaq 0x3777(%rip), %r12      # 0x5038
leaq 0x3774(%rip), %r13      # 0x503c
xorl %r15d, %r15d
movq 0x8(%rbx), %rax
movq (%rax,%r15,8), %rax
movl (%rax), %esi
leal -0x3(%rsi), %ecx
cmpl $0x3, %ecx
ja 0x191a
movslq (%r14,%rcx,4), %rcx
addq %r14, %rcx
jmpq *%rcx
movl 0x20(%rax), %esi
leaq 0x3744(%rip), %rdi      # 0x5034
jmp 0x1921
movq 0x20(%rax), %rdi
callq 0x1050
jmp 0x1928
movsbl 0x20(%rax), %esi
movq %r13, %rdi
jmp 0x1921
xorps %xmm0, %xmm0
cvtss2sd 0x20(%rax), %xmm0
movq %r12, %rdi
movb $0x1, %al
callq 0x10a0
jmp 0x1928
leaq 0x371f(%rip), %rdi      # 0x5040
xorl %eax, %eax
callq 0x10a0
incq %r15
cmpq %r15, (%rbx)
ja 0x18cb
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
xorl %edi, %edi
jmp 0x1458
// File: /workspace/github_c_makefile_star2_O3/sebbekarlsson[P]cola/src/default_scope_initialize.c
// Function: strlen
ast_node* _strlen(ss_vector* args) {
    ast_node* _node = (ast_node*)args->items[0];

    if (_node->type != AST_TYPE_STRING)
        return (ast_node*) init_ast_node_empty((void*)0); 

    ast_node_string* node_string = (ast_node_string*) _node;

    int length = strlen(node_string->value);

    return (ast_node*) init_ast_node_integer(
        init_token(_INTEGER, ""),
        length
    );
}

// Assembly:
movq 0x8(%rdi), %rax
movq (%rax), %rax
cmpl $0x5, (%rax)
jne 0x1984
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movq 0x20(%rax), %rdi
callq 0x1090
movq %rax, %rbx
leaq 0x39ab(%rip), %rsi      # 0x5315
movl $0x2, %edi
callq 0x48cc
movq %rax, %rdi
movl %ebx, %esi
addq $0x8, %rsp
popq %rbx
popq %rbp
jmp 0x15bc
xorl %edi, %edi
jmp 0x1458
// File: /workspace/github_c_makefile_star2_O3/sebbekarlsson[P]cola/src/default_scope_initialize.c
// Function: strsplit
ast_node* _strsplit(ss_vector* args) {
    ast_node* _node0 = (ast_node*)args->items[0];
    ast_node* _node1 = (ast_node*)args->items[1];

    if (_node0->type != AST_TYPE_STRING)
        return (ast_node*) init_ast_node_empty((void*)0);

    if (_node1->type != AST_TYPE_STRING)
        return (ast_node*) init_ast_node_empty((void*)0);


    ast_node_string* node_string0 = (ast_node_string*) _node0;
    ast_node_string* node_string1 = (ast_node_string*) _node1;

    ss_vector* items = ss_init_vector(sizeof(ast_node));

    char* token;
    token = strtok(node_string0->value, node_string1->value);

    ast_node_string* item_str = init_ast_node_string(
        (void*)0,
        token
    );
    ss_vector_append(items, (ast_node*) item_str);

    while (token != NULL) {
        token = strtok(NULL, node_string1->value);

        if (!token)
            continue;

        ast_node_string* item_str = init_ast_node_string(
            (void*)0,
            token
        );
        ss_vector_append(items, (ast_node*) item_str);
    }

    return (ast_node*) init_ast_node_vector(
        (void*)0,
        _DATA_TYPE_VECTOR,
        items        
    );
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq 0x8(%rdi), %rax
movq (%rax), %r14
cmpl $0x5, (%r14)
jne 0x1a27
movq 0x8(%rax), %r15
cmpl $0x5, (%r15)
jne 0x1a27
movl $0x18, %edi
callq 0x47a4
movq %rax, %rbx
movq 0x20(%r14), %rdi
movq 0x20(%r15), %rsi
callq 0x1120
movq %rax, %r14
xorl %edi, %edi
movq %rax, %rsi
callq 0x165c
movq %rbx, %rdi
movq %rax, %rsi
callq 0x47d8
testq %r14, %r14
jne 0x19fe
jmp 0x1a0e
xorl %edi, %edi
movq %rax, %rsi
callq 0x165c
movq %rbx, %rdi
movq %rax, %rsi
callq 0x47d8
movq 0x20(%r15), %rsi
xorl %edi, %edi
callq 0x1120
testq %rax, %rax
jne 0x19e9
xorl %edi, %edi
movl $0x2e, %esi
movq %rbx, %rdx
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0x176c
xorl %edi, %edi
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0x1458
// File: /workspace/github_c_makefile_star2_O3/sebbekarlsson[P]cola/src/default_scope_initialize.c
// Function: default_scope_initialize
void default_scope_initialize(scope* sc) {

    ss_vector* args = ss_init_vector(sizeof(ast_node));

    ast_node_function_definition* print_definition = init_ast_node_function_definition(
        init_token(_ID, "print"),
        _DATA_TYPE_VOID,
        args,
        (void*)0
    );

    print_definition->call = _print;
    save_function_definition(sc, print_definition);

    ast_node_function_definition* strlen_definition = init_ast_node_function_definition(
        init_token(_ID, "strlen"),
        _DATA_TYPE_INTEGER,
        args,
        (void*)0
    );

    strlen_definition->call = _strlen;
    save_function_definition(sc, strlen_definition);

    ast_node_function_definition* strsplit_definition = init_ast_node_function_definition(
        init_token(_ID, "strsplit"),
        _DATA_TYPE_VECTOR,
        args,
        (void*)0
    );

    strsplit_definition->call = _strsplit;
    save_function_definition(sc, strsplit_definition);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movq %rdi, %rbx
movl $0x18, %edi
callq 0x47a4
movq %rax, %r14
leaq 0x35f0(%rip), %rsi      # 0x5046
movl $0x1, %edi
callq 0x48cc
movq %rax, %rdi
movl $0x2b, %esi
movq %r14, %rdx
xorl %ecx, %ecx
callq 0x152c
leaq -0x1e1(%rip), %rcx      # 0x1898
movq %rcx, 0x38(%rax)
movq %rbx, %rdi
movq %rax, %rsi
callq 0x4669
leaq 0x35bd(%rip), %rsi      # 0x504c
movl $0x1, %edi
callq 0x48cc
movq %rax, %rdi
movl $0x29, %esi
movq %r14, %rdx
xorl %ecx, %ecx
callq 0x152c
leaq -0x16d(%rip), %rcx      # 0x1945
movq %rcx, 0x38(%rax)
movq %rbx, %rdi
movq %rax, %rsi
callq 0x4669
leaq 0x358b(%rip), %rsi      # 0x5053
movl $0x1, %edi
callq 0x48cc
movq %rax, %rdi
movl $0x2e, %esi
movq %r14, %rdx
xorl %ecx, %ecx
callq 0x152c
leaq -0x160(%rip), %rcx      # 0x198b
movq %rcx, 0x38(%rax)
movq %rbx, %rdi
movq %rax, %rsi
popq %rbx
popq %r14
popq %rbp
jmp 0x4669
nop
// File: /workspace/github_c_makefile_star2_O3/sebbekarlsson[P]cola/src/eval.c
// Function: eval_file_contents
int eval_file_contents(char* filename, scope** sc) {
    (*sc) = init_scope();

    default_scope_initialize(*sc);

    char* file_contents = read_file(filename);
    lex_state* lex_state = lex_init(file_contents);
    parse_state* parse_state = parse_init(lex_state);

    ast_node* tree = (ast_node*) parse_parse(parse_state, (void*)0);
    interpret_visit(tree);

    free(tree);
    free(lex_state);
    free(parse_state);
    free(file_contents);

    return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rsi, %rbx
movq %rdi, %r14
xorl %eax, %eax
callq 0x45a4
movq %rax, (%rbx)
movq %rax, %rdi
callq 0x1a38
movq %r14, %rdi
callq 0x2c24
movq %rax, %rbx
movq %rax, %rdi
xorl %eax, %eax
callq 0x2cac
movq %rax, %r14
movq %rax, %rdi
xorl %eax, %eax
callq 0x3624
movq %rax, %r15
movq %rax, %rdi
xorl %esi, %esi
callq 0x43a2
movq %rax, %r12
movq %rax, %rdi
callq 0x1c40
movq %r12, %rdi
callq 0x1030
movq %r14, %rdi
callq 0x1030
movq %r15, %rdi
callq 0x1030
movq %rbx, %rdi
callq 0x1030
xorl %eax, %eax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/sebbekarlsson[P]cola/src/interpret.c
// Function: interpret_visit_compound
ast_node* interpret_visit_compound(ast_node_compound* node) {
    for (int i = 0; i < node->nodes->size; i++) {
        ast_node* child_node = (ast_node*)node->nodes->items[i];

        if (child_node->type == AST_TYPE_RETURN) {
           return interpret_visit(child_node);
        } else { 
            interpret_visit(child_node);
        }
    }

    return (ast_node*) node;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq 0x20(%rdi), %rax
cmpq $0x0, (%rax)
je 0x1dd3
xorl %r14d, %r14d
movq 0x8(%rax), %rax
movq (%rax,%r14,8), %rdi
movl (%rdi), %r15d
callq 0x1c40
cmpl $0x13, %r15d
je 0x1dd0
incq %r14
movq 0x20(%rbx), %rax
cmpq %r14, (%rax)
ja 0x1dac
jmp 0x1dd3
movq %rax, %rbx
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/sebbekarlsson[P]cola/src/interpret.c
// Function: interpret_visit_if
ast_node* interpret_visit_if(ast_node_if* node) {
    int expr_int = 0;
    ast_node* expr = interpret_visit(node->expr);
    if (expr->type == AST_TYPE_INTEGER) {
        ast_node_integer* tmp_ast = (ast_node_integer*) expr;
        expr_int = tmp_ast->value;
        free(tmp_ast);
    }

    if (expr_int) {
        return interpret_visit((ast_node*)node->body);
    } else {
        return interpret_visit((ast_node*)node->elsenode);
    }

    return (ast_node*) init_ast_node_empty(node->tok);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movq %rdi, %rbx
movq 0x20(%rdi), %rdi
callq 0x1c40
cmpl $0x3, (%rax)
jne 0x25ae
movl 0x20(%rax), %r14d
movq %rax, %rdi
callq 0x1030
movl $0x28, %eax
testl %r14d, %r14d
jne 0x25b3
movl $0x30, %eax
movq (%rbx,%rax), %rdi
popq %rbx
popq %r14
popq %rbp
jmp 0x1c40
// File: /workspace/github_c_makefile_star2_O3/sebbekarlsson[P]cola/src/interpret.c
// Function: interpret_visit_else
ast_node* interpret_visit_else(ast_node_else* node) {
    if (node->ifnode) {
        return interpret_visit((ast_node*)node->ifnode);
    } else {
        return interpret_visit((ast_node*)node->body);
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq 0x28(%rdi), %rax
testq %rax, %rax
je 0x25d6
movq %rax, %rdi
popq %rbp
jmp 0x1c40
movq 0x20(%rdi), %rdi
popq %rbp
jmp 0x1c40
// File: /workspace/github_c_makefile_star2_O3/sebbekarlsson[P]cola/src/interpret.c
// Function: interpret_visit_while
ast_node* interpret_visit_while(ast_node_while* node) {
    int expr_int = 0;
    ast_node_integer* tmp_ast = (void*)0;

    ast_node* expr = interpret_visit((ast_node*) node->expr);
    if (expr->type == AST_TYPE_INTEGER) {
        tmp_ast = (ast_node_integer*) expr;
        expr_int = tmp_ast->value;
    }

    while(expr_int) {
        interpret_visit((ast_node*)node->body);

        expr = interpret_visit((ast_node* )node->expr);
        if (expr->type == AST_TYPE_INTEGER) {
            tmp_ast = (ast_node_integer*) expr;
            expr_int = tmp_ast->value;
        }
    }

    // causes undefined behaviour
    //free(tmp_ast);

    return (ast_node*) init_ast_node_empty(node->tok);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movq %rdi, %rbx
movq 0x20(%rdi), %rdi
callq 0x1c40
cmpl $0x3, (%rax)
jne 0x261a
movl 0x20(%rax), %r14d
testl %r14d, %r14d
je 0x261a
movq 0x28(%rbx), %rdi
callq 0x1c40
movq 0x20(%rbx), %rdi
callq 0x1c40
cmpl $0x3, (%rax)
je 0x25f8
jmp 0x25fc
movq 0x18(%rbx), %rdi
popq %rbx
popq %r14
popq %rbp
jmp 0x1458
// File: /workspace/github_c_makefile_star2_O3/sebbekarlsson[P]cola/src/interpret.c
// Function: interpret_visit_vecptr
ast_node* interpret_visit_vecptr(ast_node_vecptr* node) {
    ast_node* target = interpret_visit(node->target);
    ast_node* index = interpret_visit(node->index);

    if (target->type == AST_TYPE_STRING) {
        ast_node_string* target_string = (ast_node_string*) target;
        if (index->type == AST_TYPE_INTEGER) {
            ast_node_integer* index_integer = (ast_node_integer*) index;
            char value = target_string->value[index_integer->value];
            char* strval = char_to_string(value);
            return (ast_node*) init_ast_node_char(init_token(_CHAR, strval), value);
        }
    } else if (target->type == AST_TYPE_VECTOR) {
        ast_node_vector* target_vector = (ast_node_vector*) target;
        if (index->type == AST_TYPE_INTEGER) {
            ast_node_integer* index_integer = (ast_node_integer*) index;
            return (ast_node*) target_vector->vector->items[index_integer->value];
        }
    }

    return (ast_node*) interpret_visit(node->target);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movq %rdi, %rbx
movq 0x20(%rdi), %rdi
callq 0x1c40
movq %rax, %r14
movq 0x28(%rbx), %rdi
callq 0x1c40
movl (%r14), %ecx
cmpl $0x15, %ecx
je 0x29a0
cmpl $0x5, %ecx
jne 0x29ba
cmpl $0x3, (%rax)
jne 0x29ba
movq 0x20(%r14), %rcx
movslq 0x20(%rax), %rax
movsbl (%rcx,%rax), %ebx
movl %ebx, %edi
callq 0x4850
movl $0x26, %edi
movq %rax, %rsi
callq 0x48cc
movq %rax, %rdi
movl %ebx, %esi
popq %rbx
popq %r14
popq %rbp
jmp 0x1370
cmpl $0x3, (%rax)
jne 0x29ba
movq 0x28(%r14), %rcx
movq 0x8(%rcx), %rcx
movslq 0x20(%rax), %rax
movq (%rcx,%rax,8), %rax
popq %rbx
popq %r14
popq %rbp
retq
movq 0x20(%rbx), %rdi
popq %rbx
popq %r14
popq %rbp
jmp 0x1c40
// File: /workspace/github_c_makefile_star2_O3/sebbekarlsson[P]cola/src/interpret.c
// Function: interpret_visit_variable
ast_node* interpret_visit_variable(ast_node_variable* node) {

    ast_node_variable_definition* definition = get_variable_definition(
        (scope*) ast_node_get_scope((ast_node*)node),
        node->tok->value
    );

    if (!definition) {
        // definition not found in the nodes scope, so let's look for it
        // in the global scope.
        definition = get_variable_definition(
            global_scope,
            node->tok->value
        );
    }

    if (definition) {
        ast_node* value = interpret_visit(definition->value);

        return value;
    } else {
        char msg[32];
        sprintf(msg, "could not find definition for: %s", node->tok->value);
        error_in_interpreter(msg);
    }

    return (ast_node*) node;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
subq $0x20, %rsp
movq %rdi, %rbx
callq 0x12b2
movq 0x18(%rbx), %rcx
movq 0x8(%rcx), %rsi
movq %rax, %rdi
callq 0x4685
testq %rax, %rax
jne 0x2a14
leaq 0x56d9(%rip), %rax      # 0x80d8
movq (%rax), %rdi
movq 0x18(%rbx), %rax
movq 0x8(%rax), %rsi
callq 0x4685
testq %rax, %rax
je 0x2a25
movq 0x28(%rax), %rdi
addq $0x20, %rsp
popq %rbx
popq %r14
popq %rbp
jmp 0x1c40
movq 0x18(%rbx), %rax
movq 0x8(%rax), %rdx
leaq 0x27ee(%rip), %rsi      # 0x5222
leaq -0x30(%rbp), %r14
movq %r14, %rdi
xorl %eax, %eax
callq 0x1150
movq %r14, %rdi
callq 0x1b85
movq %rbx, %rax
addq $0x20, %rsp
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/sebbekarlsson[P]cola/src/interpret.c
// Function: interpret_visit_function_call
ast_node* interpret_visit_function_call(ast_node_function_call* node) {
    ast_node_function_definition* definition = get_function_definition(
        (scope*) ast_node_get_scope((ast_node*) node),
        node->tok->value 
    );

    if (!definition) {
        // definition not found in the nodes scope, so let's look for it
        // in the global scope.
        definition = get_function_definition(
            global_scope,
            node->tok->value
        );
    }

    if (definition) {
        ss_vector* visited_args = ss_init_vector(sizeof(ast_node));

        for (int i = 0; i < node->args->size; i++) {
            ss_vector_append(
                visited_args,
                interpret_visit((ast_node*)node->args->items[i])
            );
        }

        if (definition->call) {
            return interpret_visit(definition->call(visited_args));
        }
        return interpret_visit((ast_node*)definition->body);
    } else {
        printf("could not find definition for %s\n", node->tok->value);
        return (void*)0;
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rdi, %rbx
callq 0x12b2
movq 0x18(%rbx), %rcx
movq 0x8(%rcx), %rsi
movq %rax, %rdi
callq 0x46dd
testq %rax, %rax
jne 0x2a9a
leaq 0x5653(%rip), %rax      # 0x80d8
movq (%rax), %rdi
movq 0x18(%rbx), %rax
movq 0x8(%rax), %rsi
callq 0x46dd
testq %rax, %rax
je 0x2b01
movq %rax, %r14
movl $0x18, %edi
callq 0x47a4
movq %rax, %r15
movq 0x20(%rbx), %rax
cmpq $0x0, (%rax)
je 0x2adb
xorl %r12d, %r12d
movq 0x8(%rax), %rax
movq (%rax,%r12,8), %rdi
callq 0x1c40
movq %r15, %rdi
movq %rax, %rsi
callq 0x47d8
incq %r12
movq 0x20(%rbx), %rax
cmpq %r12, (%rax)
ja 0x2ab7
movq 0x38(%r14), %rcx
testq %rcx, %rcx
je 0x2af0
movq %r15, %rdi
xorl %eax, %eax
callq *%rcx
movq %rax, %rdi
jmp 0x2af4
movq 0x30(%r14), %rdi
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0x1c40
movq 0x18(%rbx), %rax
movq 0x8(%rax), %rsi
leaq 0x2744(%rip), %rdi      # 0x5254
xorl %eax, %eax
callq 0x10a0
xorl %eax, %eax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/sebbekarlsson[P]cola/src/interpret.c
// Function: interpret_visit_variable_definition
ast_node* interpret_visit_variable_definition(ast_node_variable_definition* node) {
    node->value = interpret_visit(node->value);

    node->value = interpret_visit(node->value);

    if (
        (node->data_type == _DATA_TYPE_INTEGER && node->value->type != AST_TYPE_INTEGER) ||
        (node->data_type == _DATA_TYPE_FLOAT && node->value->type != AST_TYPE_FLOAT) ||
        (node->data_type == _DATA_TYPE_VOID && node->value->type != AST_TYPE_EMPTY) ||
        (node->data_type == _DATA_TYPE_STRING && node->value->type != AST_TYPE_STRING)
    ) {
        error_in_interpreter("Wrong data_type");
    }

    save_variable_definition(
        (scope*)ast_node_get_scope((
            ast_node*)node
         ),
        node
    );

    return (ast_node*) node;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq 0x28(%rdi), %rdi
callq 0x1c40
movq %rax, 0x28(%rbx)
movq %rax, %rdi
callq 0x1c40
movq %rax, 0x28(%rbx)
movl 0x20(%rbx), %ecx
addl $-0x29, %ecx
cmpl $0x4, %ecx
ja 0x2b77
leaq 0x25ea(%rip), %rdx      # 0x5140
movslq (%rdx,%rcx,4), %rcx
addq %rdx, %rcx
jmpq *%rcx
cmpl $0x3, (%rax)
jne 0x2b6b
jmp 0x2b77
cmpl $0x0, (%rax)
je 0x2b77
leaq 0x2692(%rip), %rdi      # 0x5204
callq 0x1b85
movq %rbx, %rdi
callq 0x12b2
movq %rax, %rdi
movq %rbx, %rsi
callq 0x45ea
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
cmpl $0x4, (%rax)
jne 0x2b6b
jmp 0x2b77
cmpl $0x5, (%rax)
jne 0x2b6b
jmp 0x2b77
// File: /workspace/github_c_makefile_star2_O3/sebbekarlsson[P]cola/src/interpret.c
// Function: interpret_visit_function_definition
ast_node* interpret_visit_function_definition(ast_node_function_definition* node) {
    save_function_definition(
        (scope*)ast_node_get_scope((
                ast_node*)node
         ),
        node
    );

    return (ast_node*) node;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movq %rdi, %rbx
callq 0x12b2
movq %rax, %rdi
movq %rbx, %rsi
callq 0x4669
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/sebbekarlsson[P]cola/src/interpret.c
// Function: interpret_visit_interpreter_instr
ast_node* interpret_visit_interpreter_instr(ast_node_interpreter_instr* node) {
    struct scope* sc = ast_node_get_scope((ast_node*) node);

    int eval_i = eval_file_contents(node->value, (scope**) &sc);
    char eval_s[2]; // string that will hold int
    sprintf(eval_s, "%d", eval_i); // int to string conversion

    return (ast_node*) init_ast_node_integer(
        init_token(_INTEGER, eval_s),
        eval_i
    );
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq %rdi, %rbx
callq 0x12b2
leaq -0x20(%rbp), %rsi
movq %rax, (%rsi)
movq 0x28(%rbx), %rdi
callq 0x1bb8
movl %eax, %ebx
leaq 0x2685(%rip), %rsi      # 0x5276
leaq -0x12(%rbp), %r14
movq %r14, %rdi
movl %eax, %edx
xorl %eax, %eax
callq 0x1150
movl $0x2, %edi
movq %r14, %rsi
callq 0x48cc
movq %rax, %rdi
movl %ebx, %esi
callq 0x15bc
addq $0x10, %rsp
popq %rbx
popq %r14
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O3/sebbekarlsson[P]cola/src/io.c
// Function: read_file
char* read_file(char* filename) {
    char * buffer = 0;
    long length;
    FILE * f = fopen (filename, "rb");

    if (f) {
        fseek (f, 0, SEEK_END);
        length = ftell (f);
        fseek (f, 0, SEEK_SET);
        buffer = calloc (length, length);
        if (buffer)
            fread (buffer, 1, length, f);

        fclose (f);
    }

    return buffer;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
leaq 0x2644(%rip), %rsi      # 0x5279
callq 0x1110
testq %rax, %rax
je 0x2c98
movq %rax, %rbx
movq %rax, %rdi
xorl %esi, %esi
movl $0x2, %edx
callq 0x10f0
movq %rbx, %rdi
callq 0x10d0
movq %rax, %r15
movq %rbx, %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x10f0
movq %r15, %rdi
movq %r15, %rsi
callq 0x10b0
movq %rax, %r14
testq %rax, %rax
je 0x2c8e
movl $0x1, %esi
movq %r14, %rdi
movq %r15, %rdx
movq %rbx, %rcx
callq 0x1060
movq %rbx, %rdi
callq 0x1080
jmp 0x2c9b
xorl %r14d, %r14d
movq %r14, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O3/sebbekarlsson[P]cola/src/lex.c
// Function: lex_parse_string
char* lex_parse_string(lex_state* state) {
    lex_advance(state);

    char* buff;
    char* charstr;

    buff = calloc(2, sizeof(char*));
    charstr = char_to_string(state->current_char);
    strcat(buff, charstr);
    lex_advance(state);
    free(charstr);

    while (state->current_char != '\0') {
        if (state->current_char == '"')
            break;

        buff = realloc(buff, strlen(buff) + ((sizeof(char) * 2) + 1));
        charstr = char_to_string(state->current_char);
        strcat(buff, charstr);
        lex_advance(state);
        free(charstr);
    }

    lex_advance(state);

    return buff;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq (%rdi), %rax
movslq 0xc(%rdi), %rcx
cmpb $0x0, (%rax,%rcx)
je 0x31ac
leaq 0x1(%rcx), %rdx
movl %edx, 0xc(%rbx)
movb 0x1(%rax,%rcx), %r15b
movb %r15b, 0x8(%rbx)
jmp 0x31b0
movb 0x8(%rbx), %r15b
movl $0x2, %edi
movl $0x8, %esi
callq 0x10b0
movq %rax, %r14
movsbl %r15b, %edi
callq 0x4850
movq %rax, %r15
movq %r14, %rdi
movq %rax, %rsi
callq 0x1140
movq (%rbx), %rax
movslq 0xc(%rbx), %rcx
cmpb $0x0, (%rax,%rcx)
jne 0x321b
movq %r15, %rdi
callq 0x1030
movzbl 0x8(%rbx), %r15d
testl %r15d, %r15d
je 0x322e
cmpl $0x22, %r15d
je 0x322e
movq %r14, %rdi
callq 0x1090
leaq 0x3(%rax), %rsi
movq %r14, %rdi
callq 0x1100
movq %rax, %r14
movsbl %r15b, %edi
jmp 0x31c6
movslq %ecx, %rcx
leaq 0x1(%rcx), %rdx
movl %edx, 0xc(%rbx)
movb 0x1(%rax,%rcx), %al
movb %al, 0x8(%rbx)
jmp 0x31e6
movq (%rbx), %rax
movslq 0xc(%rbx), %rcx
cmpb $0x0, (%rax,%rcx)
je 0x3249
leaq 0x1(%rcx), %rdx
movl %edx, 0xc(%rbx)
movb 0x1(%rax,%rcx), %al
movb %al, 0x8(%rbx)
movq %r14, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/sebbekarlsson[P]cola/src/lex.c
// Function: lex_parse_id
char* lex_parse_id(lex_state* state) {
    char* buff;
    char* charstr;

    buff = calloc(2, sizeof(char*));
    charstr = char_to_string(state->current_char);
    strcat(buff, charstr);
    lex_advance(state);
    free(charstr);

    while (isalnum(state->current_char) || state->current_char == '_') {
        buff = realloc(buff, sizeof(buff) + (sizeof(char) * 2));
        charstr = char_to_string(state->current_char);
        strcat(buff, charstr);
        lex_advance(state);
        free(charstr);
    }

    return buff;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rdi, %rbx
movl $0x2, %edi
movl $0x8, %esi
callq 0x10b0
movq %rax, %r14
movsbl 0x8(%rbx), %edi
callq 0x4850
movq %rax, %r15
movq %r14, %rdi
movq %rax, %rsi
callq 0x1140
movq (%rbx), %rax
movslq 0xc(%rbx), %rcx
cmpb $0x0, (%rax,%rcx)
je 0x32a9
leaq 0x1(%rcx), %rdx
movl %edx, 0xc(%rbx)
movb 0x1(%rax,%rcx), %al
movb %al, 0x8(%rbx)
movq %r15, %rdi
callq 0x1030
callq 0x1170
movq %rax, %r15
movsbq 0x8(%rbx), %r12
cmpq $0x5f, %r12
je 0x32d1
movq (%r15), %rax
movzwl (%rax,%r12,2), %eax
andl $0x8, %eax
je 0x331d
movl $0xa, %esi
movq %r14, %rdi
callq 0x1100
movq %rax, %r14
movsbl %r12b, %edi
callq 0x4850
movq %rax, %r12
movq %r14, %rdi
movq %rax, %rsi
callq 0x1140
movq (%rbx), %rax
movslq 0xc(%rbx), %rcx
cmpb $0x0, (%rax,%rcx)
je 0x3313
leaq 0x1(%rcx), %rdx
movl %edx, 0xc(%rbx)
movb 0x1(%rax,%rcx), %al
movb %al, 0x8(%rbx)
movq %r12, %rdi
callq 0x1030
jmp 0x32b9
movq %r14, %rax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/sebbekarlsson[P]cola/src/lex.c
// Function: lex_parse_char
char* lex_parse_char(lex_state* state) {
    lex_advance(state);

    char* buff;
    char* charstr;

    buff = calloc(2, sizeof(char*));
    charstr = char_to_string(state->current_char);
    strcat(buff, charstr);
    lex_advance(state);
    free(charstr);
    int count = 0;

    while (state->current_char != '\0') {
        if (state->current_char == '\'')
            break;

        if (count >= 1)
            error_in_lexer("Characters can only have one character");

        buff = realloc(buff, strlen(buff) + ((sizeof(char) * 2) + 1));
        charstr = char_to_string(state->current_char);
        strcat(buff, charstr);
        lex_advance(state);
        free(charstr);
        count++;
    }

    lex_advance(state);

    return buff;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq (%rdi), %rax
movslq 0xc(%rdi), %rcx
cmpb $0x0, (%rax,%rcx)
je 0x3359
leaq 0x1(%rcx), %rdx
movl %edx, 0xc(%rbx)
movb 0x1(%rax,%rcx), %r15b
movb %r15b, 0x8(%rbx)
jmp 0x335d
movb 0x8(%rbx), %r15b
movl $0x2, %edi
movl $0x8, %esi
callq 0x10b0
movq %rax, %r14
movsbl %r15b, %edi
callq 0x4850
movq %rax, %r15
movq %r14, %rdi
movq %rax, %rsi
callq 0x1140
movq (%rbx), %rax
movslq 0xc(%rbx), %rcx
cmpb $0x0, (%rax,%rcx)
je 0x33a1
leaq 0x1(%rcx), %rdx
movl %edx, 0xc(%rbx)
movb 0x1(%rax,%rcx), %al
movb %al, 0x8(%rbx)
movq %r15, %rdi
callq 0x1030
xorl %r13d, %r13d
leaq 0x1f63(%rip), %r15      # 0x5316
movzbl 0x8(%rbx), %r12d
testl %r12d, %r12d
je 0x3428
cmpl $0x27, %r12d
je 0x3428
subl $0x1, %r13d
jb 0x33d5
movq %r15, %rdi
callq 0x1b1f
movb 0x8(%rbx), %r12b
movq %r14, %rdi
callq 0x1090
leaq 0x3(%rax), %rsi
movq %r14, %rdi
callq 0x1100
movq %rax, %r14
movsbl %r12b, %edi
callq 0x4850
movq %rax, %r12
movq %r14, %rdi
movq %rax, %rsi
callq 0x1140
movq (%rbx), %rax
movslq 0xc(%rbx), %rcx
cmpb $0x0, (%rax,%rcx)
je 0x341e
leaq 0x1(%rcx), %rdx
movl %edx, 0xc(%rbx)
movb 0x1(%rax,%rcx), %al
movb %al, 0x8(%rbx)
movq %r12, %rdi
callq 0x1030
jmp 0x33b3
movq (%rbx), %rax
movslq 0xc(%rbx), %rcx
cmpb $0x0, (%rax,%rcx)
je 0x3443
leaq 0x1(%rcx), %rdx
movl %edx, 0xc(%rbx)
movb 0x1(%rax,%rcx), %al
movb %al, 0x8(%rbx)
movq %r14, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/sebbekarlsson[P]cola/src/lex.c
// Function: lex_parse_number
token* lex_parse_number(lex_state* state) {
    char* buff;
    char* charstr;
    int type = _INTEGER;

    buff = calloc(2, sizeof(char*));
    charstr = char_to_string(state->current_char);
    strcat(buff, charstr);
    lex_advance(state);
    free(charstr);

    while (isdigit(state->current_char)) {
        buff = realloc(buff, sizeof(buff) + (sizeof(char) * 2));
        charstr = char_to_string(state->current_char);
        strcat(buff, charstr);
        lex_advance(state);
        free(charstr);
    }

    // float
    if (state->current_char == '.') {
        buff = realloc(buff, sizeof(buff) + (sizeof(char) * 2));
        charstr = char_to_string(state->current_char);
        strcat(buff, charstr);
        lex_advance(state);

        while (isdigit(state->current_char)) {
            buff = realloc(buff, sizeof(buff) + (sizeof(char) * 2));
            charstr = char_to_string(state->current_char);
            strcat(buff, charstr);
            lex_advance(state);
        }

        free(charstr);

        type = _FLOAT;
    }

    return init_token(type, buff);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %r14
movl $0x2, %edi
movl $0x8, %esi
callq 0x10b0
movq %rax, %rbx
movsbl 0x8(%r14), %edi
callq 0x4850
movq %rax, %r15
movq %rbx, %rdi
movq %rax, %rsi
callq 0x1140
movq (%r14), %rax
movslq 0xc(%r14), %rcx
cmpb $0x0, (%rax,%rcx)
je 0x34ad
leaq 0x1(%rcx), %rdx
movl %edx, 0xc(%r14)
movb 0x1(%rax,%rcx), %al
movb %al, 0x8(%r14)
movq %r15, %rdi
callq 0x1030
callq 0x1170
movq %rax, %r15
movq (%rax), %rax
movsbq 0x8(%r14), %r12
testb $0x8, 0x1(%rax,%r12,2)
je 0x351e
movl $0xa, %esi
movq %rbx, %rdi
callq 0x1100
movq %rax, %rbx
movsbl %r12b, %edi
callq 0x4850
movq %rax, %r12
movq %rbx, %rdi
movq %rax, %rsi
callq 0x1140
movq (%r14), %rax
movslq 0xc(%r14), %rcx
cmpb $0x0, (%rax,%rcx)
je 0x3511
leaq 0x1(%rcx), %rdx
movl %edx, 0xc(%r14)
movb 0x1(%rax,%rcx), %al
movb %al, 0x8(%r14)
movq %r12, %rdi
callq 0x1030
movq (%r15), %rax
jmp 0x34c0
movl $0x2, %edi
cmpb $0x2e, %r12b
jne 0x35a6
movl $0xa, %esi
movq %rbx, %rdi
callq 0x1100
movq %rax, %rbx
movl $0x2e, %edi
callq 0x4850
movq %rax, %r12
movq %rbx, %rdi
movq %rax, %rsi
callq 0x1140
movq (%r14), %rax
movslq 0xc(%r14), %rcx
cmpb $0x0, (%rax,%rcx)
je 0x3571
leaq 0x1(%rcx), %rdx
movl %edx, 0xc(%r14)
movb 0x1(%rax,%rcx), %r13b
movb %r13b, 0x8(%r14)
jmp 0x3575
movb 0x8(%r14), %r13b
movq (%r15), %rax
movsbq %r13b, %rcx
testb $0x8, 0x1(%rax,%rcx,2)
je 0x3599
movl $0xa, %esi
movq %rbx, %rdi
callq 0x1100
movq %rax, %rbx
movsbl %r13b, %edi
jmp 0x353e
movq %r12, %rdi
callq 0x1030
movl $0x27, %edi
movq %rbx, %rsi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x48cc
// File: /workspace/github_c_makefile_star2_O3/sebbekarlsson[P]cola/src/lex.c
// Function: lex_peek_next
char lex_peek_next(lex_state* state, int start) {
    int peek_pos = start;
    char c = '\0';

    while (peek_pos < (int)strlen(state->buffer)) {
        c = state->buffer[peek_pos];

        if (c == '\0' || c == ' ' || c == '\n') {
            peek_pos++;
            continue;
        } else {
            break;
        }
    }

    return c;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movl %esi, %r14d
movq (%rdi), %rbx
movq %rbx, %rdi
callq 0x1090
subl %r14d, %eax
jle 0x3601
movslq %r14d, %rcx
addq %rcx, %rbx
xorl %edx, %edx
movabsq $0x100000401, %rsi      # imm = 0x100000401
movzbl (%rbx,%rdx), %ecx
cmpq $0x20, %rcx
ja 0x3603
btq %rcx, %rsi
jae 0x3603
incq %rdx
cmpl %edx, %eax
jne 0x35e8
jmp 0x3603
xorl %ecx, %ecx
movl %ecx, %eax
popq %rbx
popq %r14
popq %rbp
retq
nop