LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O0/bhk[P]tooltree/lua/../opensource/lua-5.2.3/src/llex.c
// Function: luaX_newstring
TString *luaX_newstring (LexState *ls, const char *str, size_t l) {
  lua_State *L = ls->L;
  TValue *o;  /* entry for `str' */
  TString *ts = luaS_newlstr(L, str, l);  /* create new string */
  setsvalue2s(L, L->top++, ts);  /* temporarily anchor it in stack */
  o = luaH_set(L, ls->fs->h, L->top - 1);
  if (ttisnil(o)) {  /* not in use yet? (see 'addK') */
    /* boolean value does not need GC barrier;
       table has no metatable, so it does not need to invalidate cache */
    setbvalue(o, 1);  /* t[string] = true */
    luaC_checkGC(L);
  }
  else {  /* string already present */
    ts = rawtsvalue(keyfromval(o));  /* re-use value previously stored */
  }
  L->top--;  /* remove string from stack */
  return ts;
}

// Assembly:
subq $0x48, %rsp
movq %rdi, 0x40(%rsp)
movq %rsi, 0x38(%rsp)
movq %rdx, 0x30(%rsp)
movq 0x40(%rsp), %rax
movq 0x38(%rax), %rax
movq %rax, 0x28(%rsp)
movq 0x28(%rsp), %rdi
movq 0x38(%rsp), %rsi
movq 0x30(%rsp), %rdx
callq 0x20780
movq %rax, 0x18(%rsp)
movq 0x28(%rsp), %rcx
movq 0x10(%rcx), %rax
movq %rax, %rdx
addq $0x10, %rdx
movq %rdx, 0x10(%rcx)
movq %rax, 0x10(%rsp)
movq 0x18(%rsp), %rax
movq %rax, 0x8(%rsp)
movq 0x8(%rsp), %rcx
movq 0x10(%rsp), %rax
movq %rcx, (%rax)
movq 0x8(%rsp), %rax
movzbl 0x8(%rax), %ecx
orl $0x40, %ecx
movq 0x10(%rsp), %rax
movl %ecx, 0x8(%rax)
movq 0x28(%rsp), %rdi
movq 0x40(%rsp), %rax
movq 0x30(%rax), %rax
movq 0x8(%rax), %rsi
movq 0x28(%rsp), %rax
movq 0x10(%rax), %rdx
addq $-0x10, %rdx
callq 0x24890
movq %rax, 0x20(%rsp)
movq 0x20(%rsp), %rax
cmpl $0x0, 0x8(%rax)
jne 0x324dc
movq 0x20(%rsp), %rax
movq %rax, (%rsp)
movq (%rsp), %rax
movl $0x1, (%rax)
movq (%rsp), %rax
movl $0x1, 0x8(%rax)
movq 0x28(%rsp), %rax
movq 0x18(%rax), %rax
cmpq $0x0, 0x18(%rax)
jle 0x324da
movq 0x28(%rsp), %rdi
callq 0x13f90
jmp 0x324ea
movq 0x20(%rsp), %rax
movq 0x10(%rax), %rax
movq %rax, 0x18(%rsp)
movq 0x28(%rsp), %rax
movq 0x10(%rax), %rcx
addq $-0x10, %rcx
movq %rcx, 0x10(%rax)
movq 0x18(%rsp), %rax
addq $0x48, %rsp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/bhk[P]tooltree/lua/../opensource/lua-5.2.3/src/llex.c
// Function: luaX_setinput
void luaX_setinput (lua_State *L, LexState *ls, ZIO *z, TString *source,
                    int firstchar) {
  ls->decpoint = '.';
  ls->L = L;
  ls->current = firstchar;
  ls->lookahead.token = TK_EOS;  /* no look-ahead token */
  ls->z = z;
  ls->fs = NULL;
  ls->linenumber = 1;
  ls->lastline = 1;
  ls->source = source;
  ls->envn = luaS_new(L, LUA_ENV);  /* create env name */
  luaS_fix(ls->envn);  /* never collect this name */
  luaZ_resizebuffer(ls->L, ls->buff, LUA_MINBUFFER);  /* initialize buffer */
}

// Assembly:
subq $0x28, %rsp
movq %rdi, 0x20(%rsp)
movq %rsi, 0x18(%rsp)
movq %rdx, 0x10(%rsp)
movq %rcx, 0x8(%rsp)
movl %r8d, 0x4(%rsp)
movq 0x18(%rsp), %rax
movb $0x2e, 0x68(%rax)
movq 0x20(%rsp), %rcx
movq 0x18(%rsp), %rax
movq %rcx, 0x38(%rax)
movl 0x4(%rsp), %ecx
movq 0x18(%rsp), %rax
movl %ecx, (%rax)
movq 0x18(%rsp), %rax
movl $0x11e, 0x20(%rax)      # imm = 0x11E
movq 0x10(%rsp), %rcx
movq 0x18(%rsp), %rax
movq %rcx, 0x40(%rax)
movq 0x18(%rsp), %rax
movq $0x0, 0x30(%rax)
movq 0x18(%rsp), %rax
movl $0x1, 0x4(%rax)
movq 0x18(%rsp), %rax
movl $0x1, 0x8(%rax)
movq 0x8(%rsp), %rcx
movq 0x18(%rsp), %rax
movq %rcx, 0x58(%rax)
movq 0x20(%rsp), %rdi
leaq 0x33df(%rip), %rsi      # 0x35987
callq 0x209f0
movq %rax, %rcx
movq 0x18(%rsp), %rax
movq %rcx, 0x60(%rax)
movq 0x18(%rsp), %rax
movq 0x60(%rax), %rax
movzbl 0x9(%rax), %ecx
orl $0x20, %ecx
movb %cl, 0x9(%rax)
movq 0x18(%rsp), %rax
movq 0x38(%rax), %rdi
movq 0x18(%rsp), %rax
movq 0x48(%rax), %rax
movq (%rax), %rsi
movq 0x18(%rsp), %rax
movq 0x48(%rax), %rax
movq 0x10(%rax), %rdx
shlq $0x0, %rdx
movl $0x20, %ecx
callq 0x18170
movq %rax, %rcx
movq 0x18(%rsp), %rax
movq 0x48(%rax), %rax
movq %rcx, (%rax)
movq 0x18(%rsp), %rax
movq 0x48(%rax), %rax
movq $0x20, 0x10(%rax)
addq $0x28, %rsp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/bhk[P]tooltree/lua/../opensource/lua-5.2.3/src/llex.c
// Function: txtToken
static const char *txtToken (LexState *ls, int token) {
  switch (token) {
    case TK_NAME:
    case TK_STRING:
    case TK_NUMBER:
      save(ls, '\0');
      return luaO_pushfstring(ls->L, LUA_QS, luaZ_buffer(ls->buff));
    default:
      return luaX_token2str(ls, token);
  }
}

// Assembly:
subq $0x18, %rsp
movq %rdi, 0x8(%rsp)
movl %esi, 0x4(%rsp)
movl 0x4(%rsp), %eax
addl $0xfffffee1, %eax       # imm = 0xFFFFFEE1
subl $0x2, %eax
ja 0x33163
jmp 0x3312d
movq 0x8(%rsp), %rdi
xorl %esi, %esi
callq 0x33180
movq 0x8(%rsp), %rax
movq 0x38(%rax), %rdi
movq 0x8(%rsp), %rax
movq 0x48(%rax), %rax
movq (%rax), %rdx
leaq 0x30c5(%rip), %rsi      # 0x3621a
movb $0x0, %al
callq 0x1a1b0
movq %rax, 0x10(%rsp)
jmp 0x33176
movq 0x8(%rsp), %rdi
movl 0x4(%rsp), %esi
callq 0x32220
movq %rax, 0x10(%rsp)
movq 0x10(%rsp), %rax
addq $0x18, %rsp
retq
// File: /workspace/github_c_makefile_star2_O0/bhk[P]tooltree/lua/../opensource/lua-5.2.3/src/llex.c
// Function: inclinenumber
static void inclinenumber (LexState *ls) {
  int old = ls->current;
  lua_assert(currIsNewline(ls));
  next(ls);  /* skip `\n' or `\r' */
  if (currIsNewline(ls) && ls->current != old)
    next(ls);  /* skip `\n\r' or `\r\n' */
  if (++ls->linenumber >= MAX_INT)
    luaX_syntaxerror(ls, "chunk has too many lines");
}

// Assembly:
subq $0x18, %rsp
movq %rdi, 0x10(%rsp)
movq 0x10(%rsp), %rax
movl (%rax), %eax
movl %eax, 0xc(%rsp)
movq 0x10(%rsp), %rax
movq 0x40(%rax), %rcx
movq (%rcx), %rax
movq %rax, %rdx
addq $-0x1, %rdx
movq %rdx, (%rcx)
cmpq $0x0, %rax
jbe 0x332d1
movq 0x10(%rsp), %rax
movq 0x40(%rax), %rcx
movq 0x8(%rcx), %rax
movq %rax, %rdx
addq $0x1, %rdx
movq %rdx, 0x8(%rcx)
movzbl (%rax), %eax
movl %eax, 0x8(%rsp)
jmp 0x332e3
movq 0x10(%rsp), %rax
movq 0x40(%rax), %rdi
callq 0x2c3a0
movl %eax, 0x8(%rsp)
movl 0x8(%rsp), %ecx
movq 0x10(%rsp), %rax
movl %ecx, (%rax)
movq 0x10(%rsp), %rax
cmpl $0xa, (%rax)
je 0x33302
movq 0x10(%rsp), %rax
cmpl $0xd, (%rax)
jne 0x33369
movq 0x10(%rsp), %rax
movl (%rax), %eax
cmpl 0xc(%rsp), %eax
je 0x33369
movq 0x10(%rsp), %rax
movq 0x40(%rax), %rcx
movq (%rcx), %rax
movq %rax, %rdx
addq $-0x1, %rdx
movq %rdx, (%rcx)
cmpq $0x0, %rax
jbe 0x3334c
movq 0x10(%rsp), %rax
movq 0x40(%rax), %rcx
movq 0x8(%rcx), %rax
movq %rax, %rdx
addq $0x1, %rdx
movq %rdx, 0x8(%rcx)
movzbl (%rax), %eax
movl %eax, 0x4(%rsp)
jmp 0x3335e
movq 0x10(%rsp), %rax
movq 0x40(%rax), %rdi
callq 0x2c3a0
movl %eax, 0x4(%rsp)
movl 0x4(%rsp), %ecx
movq 0x10(%rsp), %rax
movl %ecx, (%rax)
movq 0x10(%rsp), %rcx
movl 0x4(%rcx), %eax
addl $0x1, %eax
movl %eax, 0x4(%rcx)
cmpl $0x7ffffffd, %eax       # imm = 0x7FFFFFFD
jl 0x3338f
movq 0x10(%rsp), %rdi
leaq 0x4afa(%rip), %rsi      # 0x37e84
callq 0x32300
addq $0x18, %rsp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/bhk[P]tooltree/lua/../opensource/lua-5.2.3/src/llex.c
// Function: check_next
static int check_next (LexState *ls, const char *set) {
  if (ls->current == '\0' || !strchr(set, ls->current))
    return 0;
  save_and_next(ls);
  return 1;
}

// Assembly:
subq $0x28, %rsp
movq %rdi, 0x18(%rsp)
movq %rsi, 0x10(%rsp)
movq 0x18(%rsp), %rax
cmpl $0x0, (%rax)
je 0x33cdf
movq 0x10(%rsp), %rdi
movq 0x18(%rsp), %rax
movl (%rax), %esi
callq 0x7190
cmpq $0x0, %rax
jne 0x33ce9
movl $0x0, 0x24(%rsp)
jmp 0x33d5c
movq 0x18(%rsp), %rdi
movq 0x18(%rsp), %rax
movl (%rax), %esi
callq 0x33180
movq 0x18(%rsp), %rax
movq 0x40(%rax), %rcx
movq (%rcx), %rax
movq %rax, %rdx
addq $-0x1, %rdx
movq %rdx, (%rcx)
cmpq $0x0, %rax
jbe 0x33d37
movq 0x18(%rsp), %rax
movq 0x40(%rax), %rcx
movq 0x8(%rcx), %rax
movq %rax, %rdx
addq $0x1, %rdx
movq %rdx, 0x8(%rcx)
movzbl (%rax), %eax
movl %eax, 0xc(%rsp)
jmp 0x33d49
movq 0x18(%rsp), %rax
movq 0x40(%rax), %rdi
callq 0x2c3a0
movl %eax, 0xc(%rsp)
movl 0xc(%rsp), %ecx
movq 0x18(%rsp), %rax
movl %ecx, (%rax)
movl $0x1, 0x24(%rsp)
movl 0x24(%rsp), %eax
addq $0x28, %rsp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/bhk[P]tooltree/lua/../opensource/lua-5.2.3/src/llex.c
// Function: read_numeral
static void read_numeral (LexState *ls, SemInfo *seminfo) {
  const char *expo = "Ee";
  int first = ls->current;
  lua_assert(lisdigit(ls->current));
  save_and_next(ls);
  if (first == '0' && check_next(ls, "Xx"))  /* hexadecimal? */
    expo = "Pp";
  for (;;) {
    if (check_next(ls, expo))  /* exponent part? */
      check_next(ls, "+-");  /* optional exponent sign */
    if (lisxdigit(ls->current) || ls->current == '.')
      save_and_next(ls);
    else  break;
  }
  save(ls, '\0');
  buffreplace(ls, '.', ls->decpoint);  /* follow locale for decimal point */
  if (!buff2d(ls->buff, &seminfo->r))  /* format error? */
    trydecpoint(ls, seminfo); /* try to update decimal point separator */
}

// Assembly:
subq $0x28, %rsp
movq %rdi, 0x20(%rsp)
movq %rsi, 0x18(%rsp)
leaq 0x41a5(%rip), %rax      # 0x37f2a
movq %rax, 0x10(%rsp)
movq 0x20(%rsp), %rax
movl (%rax), %eax
movl %eax, 0xc(%rsp)
movq 0x20(%rsp), %rdi
movq 0x20(%rsp), %rax
movl (%rax), %esi
callq 0x33180
movq 0x20(%rsp), %rax
movq 0x40(%rax), %rcx
movq (%rcx), %rax
movq %rax, %rdx
addq $-0x1, %rdx
movq %rdx, (%rcx)
cmpq $0x0, %rax
jbe 0x33de3
movq 0x20(%rsp), %rax
movq 0x40(%rax), %rcx
movq 0x8(%rcx), %rax
movq %rax, %rdx
addq $0x1, %rdx
movq %rdx, 0x8(%rcx)
movzbl (%rax), %eax
movl %eax, 0x8(%rsp)
jmp 0x33df5
movq 0x20(%rsp), %rax
movq 0x40(%rax), %rdi
callq 0x2c3a0
movl %eax, 0x8(%rsp)
movl 0x8(%rsp), %ecx
movq 0x20(%rsp), %rax
movl %ecx, (%rax)
cmpl $0x30, 0xc(%rsp)
jne 0x33e29
movq 0x20(%rsp), %rdi
leaq 0x411a(%rip), %rsi      # 0x37f2d
callq 0x33cb0
cmpl $0x0, %eax
je 0x33e29
leaq 0x410c(%rip), %rax      # 0x37f30
movq %rax, 0x10(%rsp)
jmp 0x33e2b
movq 0x20(%rsp), %rdi
movq 0x10(%rsp), %rsi
callq 0x33cb0
cmpl $0x0, %eax
je 0x33e50
movq 0x20(%rsp), %rdi
leaq 0x40e8(%rip), %rsi      # 0x37f33
callq 0x33cb0
movq 0x20(%rsp), %rax
movl (%rax), %eax
addl $0x1, %eax
movslq %eax, %rcx
leaq 0x38bc(%rip), %rax      # 0x37720
movzbl (%rax,%rcx), %eax
andl $0x10, %eax
cmpl $0x0, %eax
jne 0x33e7a
movq 0x20(%rsp), %rax
cmpl $0x2e, (%rax)
jne 0x33ee7
movq 0x20(%rsp), %rdi
movq 0x20(%rsp), %rax
movl (%rax), %esi
callq 0x33180
movq 0x20(%rsp), %rax
movq 0x40(%rax), %rcx
movq (%rcx), %rax
movq %rax, %rdx
addq $-0x1, %rdx
movq %rdx, (%rcx)
cmpq $0x0, %rax
jbe 0x33ec8
movq 0x20(%rsp), %rax
movq 0x40(%rax), %rcx
movq 0x8(%rcx), %rax
movq %rax, %rdx
addq $0x1, %rdx
movq %rdx, 0x8(%rcx)
movzbl (%rax), %eax
movl %eax, 0x4(%rsp)
jmp 0x33eda
movq 0x20(%rsp), %rax
movq 0x40(%rax), %rdi
callq 0x2c3a0
movl %eax, 0x4(%rsp)
movl 0x4(%rsp), %ecx
movq 0x20(%rsp), %rax
movl %ecx, (%rax)
jmp 0x33ee9
jmp 0x33eee
jmp 0x33e2b
movq 0x20(%rsp), %rdi
xorl %esi, %esi
callq 0x33180
movq 0x20(%rsp), %rdi
movq 0x20(%rsp), %rax
movl $0x2e, %esi
movsbl 0x68(%rax), %edx
callq 0x34240
movq 0x20(%rsp), %rax
movq 0x48(%rax), %rax
movq (%rax), %rdi
movq 0x20(%rsp), %rax
movq 0x48(%rax), %rax
movq 0x8(%rax), %rsi
subq $0x1, %rsi
movq 0x18(%rsp), %rdx
callq 0x19870
cmpl $0x0, %eax
jne 0x33f4d
movq 0x20(%rsp), %rdi
movq 0x18(%rsp), %rsi
callq 0x342c0
addq $0x28, %rsp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/bhk[P]tooltree/lua/../opensource/lua-5.2.3/src/llex.c
// Function: readhexaesc
static int readhexaesc (LexState *ls) {
  int c[3], i;  /* keep input for error message */
  int r = 0;  /* result accumulator */
  c[0] = 'x';  /* for error message */
  for (i = 1; i < 3; i++) {  /* read two hexadecimal digits */
    c[i] = next(ls);
    if (!lisxdigit(c[i]))
      escerror(ls, c, i + 1, "hexadecimal digit expected");
    r = (r << 4) + luaO_hexavalue(c[i]);
  }
  return r;
}

// Assembly:
subq $0x28, %rsp
movq %rdi, 0x20(%rsp)
movl $0x0, 0xc(%rsp)
movl $0x78, 0x14(%rsp)
movl $0x1, 0x10(%rsp)
cmpl $0x3, 0x10(%rsp)
jge 0x34063
movq 0x20(%rsp), %rax
movq 0x40(%rax), %rcx
movq (%rcx), %rax
movq %rax, %rdx
addq $-0x1, %rdx
movq %rdx, (%rcx)
cmpq $0x0, %rax
jbe 0x33fc9
movq 0x20(%rsp), %rax
movq 0x40(%rax), %rcx
movq 0x8(%rcx), %rax
movq %rax, %rdx
addq $0x1, %rdx
movq %rdx, 0x8(%rcx)
movzbl (%rax), %eax
movl %eax, 0x8(%rsp)
jmp 0x33fdb
movq 0x20(%rsp), %rax
movq 0x40(%rax), %rdi
callq 0x2c3a0
movl %eax, 0x8(%rsp)
movl 0x8(%rsp), %ecx
movq 0x20(%rsp), %rax
movl %ecx, (%rax)
movslq 0x10(%rsp), %rax
movl %ecx, 0x14(%rsp,%rax,4)
movslq 0x10(%rsp), %rax
movl 0x14(%rsp,%rax,4), %eax
addl $0x1, %eax
movslq %eax, %rcx
leaq 0x371b(%rip), %rax      # 0x37720
movzbl (%rax,%rcx), %eax
andl $0x10, %eax
cmpl $0x0, %eax
jne 0x3402e
movq 0x20(%rsp), %rdi
leaq 0x14(%rsp), %rsi
movl 0x10(%rsp), %edx
addl $0x1, %edx
leaq 0x3ecd(%rip), %rcx      # 0x37ef6
callq 0x34070
movl 0xc(%rsp), %eax
shll $0x4, %eax
movl %eax, 0x4(%rsp)
movslq 0x10(%rsp), %rax
movl 0x14(%rsp,%rax,4), %edi
callq 0x19820
movl %eax, %ecx
movl 0x4(%rsp), %eax
addl %ecx, %eax
movl %eax, 0xc(%rsp)
movl 0x10(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x10(%rsp)
jmp 0x33f81
movl 0xc(%rsp), %eax
addq $0x28, %rsp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/bhk[P]tooltree/lua/../opensource/lua-5.2.3/src/llex.c
// Function: escerror
static void escerror (LexState *ls, int *c, int n, const char *msg) {
  int i;
  luaZ_resetbuffer(ls->buff);  /* prepare error message */
  save(ls, '\\');
  for (i = 0; i < n && c[i] != EOZ; i++)
    save(ls, c[i]);
  lexerror(ls, msg, TK_STRING);
}

// Assembly:
subq $0x28, %rsp
movq %rdi, 0x20(%rsp)
movq %rsi, 0x18(%rsp)
movl %edx, 0x14(%rsp)
movq %rcx, 0x8(%rsp)
movq 0x20(%rsp), %rax
movq 0x48(%rax), %rax
movq $0x0, 0x8(%rax)
movq 0x20(%rsp), %rdi
movl $0x5c, %esi
callq 0x33180
movl $0x0, 0x4(%rsp)
movl 0x4(%rsp), %ecx
xorl %eax, %eax
cmpl 0x14(%rsp), %ecx
movb %al, 0x3(%rsp)
jge 0x340d4
movq 0x18(%rsp), %rax
movslq 0x4(%rsp), %rcx
cmpl $-0x1, (%rax,%rcx,4)
setne %al
movb %al, 0x3(%rsp)
movb 0x3(%rsp), %al
testb $0x1, %al
jne 0x340de
jmp 0x34102
movq 0x20(%rsp), %rdi
movq 0x18(%rsp), %rax
movslq 0x4(%rsp), %rcx
movl (%rax,%rcx,4), %esi
callq 0x33180
movl 0x4(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x4(%rsp)
jmp 0x340af
movq 0x20(%rsp), %rdi
movq 0x8(%rsp), %rsi
movl $0x121, %edx            # imm = 0x121
callq 0x32330
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/bhk[P]tooltree/lua/../opensource/lua-5.2.3/src/llex.c
// Function: readdecesc
static int readdecesc (LexState *ls) {
  int c[3], i;
  int r = 0;  /* result accumulator */
  for (i = 0; i < 3 && lisdigit(ls->current); i++) {  /* read up to 3 digits */
    c[i] = ls->current;
    r = 10*r + c[i] - '0';
    next(ls);
  }
  if (r > UCHAR_MAX)
    escerror(ls, c, i, "decimal escape too large");
  return r;
}

// Assembly:
subq $0x28, %rsp
movq %rdi, 0x20(%rsp)
movl $0x0, 0xc(%rsp)
movl $0x0, 0x10(%rsp)
xorl %eax, %eax
cmpl $0x3, 0x10(%rsp)
movb %al, 0xb(%rsp)
jge 0x3416b
movq 0x20(%rsp), %rax
movl (%rax), %eax
addl $0x1, %eax
movslq %eax, %rcx
leaq 0x35c6(%rip), %rax      # 0x37720
movzbl (%rax,%rcx), %eax
andl $0x2, %eax
cmpl $0x0, %eax
setne %al
movb %al, 0xb(%rsp)
movb 0xb(%rsp), %al
testb $0x1, %al
jne 0x34178
jmp 0x34207
movq 0x20(%rsp), %rax
movl (%rax), %ecx
movslq 0x10(%rsp), %rax
movl %ecx, 0x14(%rsp,%rax,4)
imull $0xa, 0xc(%rsp), %eax
movslq 0x10(%rsp), %rcx
addl 0x14(%rsp,%rcx,4), %eax
subl $0x30, %eax
movl %eax, 0xc(%rsp)
movq 0x20(%rsp), %rax
movq 0x40(%rax), %rcx
movq (%rcx), %rax
movq %rax, %rdx
addq $-0x1, %rdx
movq %rdx, (%rcx)
cmpq $0x0, %rax
jbe 0x341da
movq 0x20(%rsp), %rax
movq 0x40(%rax), %rcx
movq 0x8(%rcx), %rax
movq %rax, %rdx
addq $0x1, %rdx
movq %rdx, 0x8(%rcx)
movzbl (%rax), %eax
movl %eax, 0x4(%rsp)
jmp 0x341ec
movq 0x20(%rsp), %rax
movq 0x40(%rax), %rdi
callq 0x2c3a0
movl %eax, 0x4(%rsp)
movl 0x4(%rsp), %ecx
movq 0x20(%rsp), %rax
movl %ecx, (%rax)
movl 0x10(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x10(%rsp)
jmp 0x34139
cmpl $0xff, 0xc(%rsp)
jle 0x3422b
movq 0x20(%rsp), %rdi
leaq 0x14(%rsp), %rsi
movl 0x10(%rsp), %edx
leaq 0x3ceb(%rip), %rcx      # 0x37f11
callq 0x34070
movl 0xc(%rsp), %eax
addq $0x28, %rsp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/bhk[P]tooltree/lua/../opensource/lua-5.2.3/src/llex.c
// Function: buffreplace
static void buffreplace (LexState *ls, char from, char to) {
  size_t n = luaZ_bufflen(ls->buff);
  char *p = luaZ_buffer(ls->buff);
  while (n--)
    if (p[n] == from) p[n] = to;
}

// Assembly:
movb %dl, %al
movb %sil, %cl
movq %rdi, -0x8(%rsp)
movb %cl, -0x9(%rsp)
movb %al, -0xa(%rsp)
movq -0x8(%rsp), %rax
movq 0x48(%rax), %rax
movq 0x8(%rax), %rax
movq %rax, -0x18(%rsp)
movq -0x8(%rsp), %rax
movq 0x48(%rax), %rax
movq (%rax), %rax
movq %rax, -0x20(%rsp)
movq -0x18(%rsp), %rax
movq %rax, %rcx
addq $-0x1, %rcx
movq %rcx, -0x18(%rsp)
cmpq $0x0, %rax
je 0x342b6
movq -0x20(%rsp), %rax
movq -0x18(%rsp), %rcx
movsbl (%rax,%rcx), %eax
movsbl -0x9(%rsp), %ecx
cmpl %ecx, %eax
jne 0x342b4
movb -0xa(%rsp), %dl
movq -0x20(%rsp), %rax
movq -0x18(%rsp), %rcx
movb %dl, (%rax,%rcx)
jmp 0x34275
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/bhk[P]tooltree/lua/../opensource/lua-5.2.3/src/llex.c
// Function: trydecpoint
static void trydecpoint (LexState *ls, SemInfo *seminfo) {
  char old = ls->decpoint;
  ls->decpoint = getlocaledecpoint();
  buffreplace(ls, old, ls->decpoint);  /* try new decimal separator */
  if (!buff2d(ls->buff, &seminfo->r)) {
    /* format error with correct decimal point: no more options */
    buffreplace(ls, ls->decpoint, '.');  /* undo change (for error message) */
    lexerror(ls, "malformed number", TK_NUMBER);
  }
}

// Assembly:
subq $0x18, %rsp
movq %rdi, 0x10(%rsp)
movq %rsi, 0x8(%rsp)
movq 0x10(%rsp), %rax
movb 0x68(%rax), %al
movb %al, 0x7(%rsp)
callq 0x7120
movq (%rax), %rax
movb (%rax), %cl
movq 0x10(%rsp), %rax
movb %cl, 0x68(%rax)
movq 0x10(%rsp), %rdi
movb 0x7(%rsp), %cl
movq 0x10(%rsp), %rax
movsbl %cl, %esi
movsbl 0x68(%rax), %edx
callq 0x34240
movq 0x10(%rsp), %rax
movq 0x48(%rax), %rax
movq (%rax), %rdi
movq 0x10(%rsp), %rax
movq 0x48(%rax), %rax
movq 0x8(%rax), %rsi
subq $0x1, %rsi
movq 0x8(%rsp), %rdx
callq 0x19870
cmpl $0x0, %eax
jne 0x34360
movq 0x10(%rsp), %rdi
movq 0x10(%rsp), %rax
movl $0x2e, %edx
movsbl 0x68(%rax), %esi
callq 0x34240
movq 0x10(%rsp), %rdi
leaq 0x3be0(%rip), %rsi      # 0x37f36
movl $0x11f, %edx            # imm = 0x11F
callq 0x32330
addq $0x18, %rsp
retq
// File: /workspace/github_c_makefile_star2_O0/ulisses[P]ftp-client-server/./checksum.h
// Function: addCksum
char *addCksum(unsigned int chksum, char *msg) {
        char *msgCk = (char *)malloc(sizeof(char)*strlen(msg)+4);

        sprintf(msgCk,"%x",(int)chksum);
        msg = strcat(msg,msgCk);

        return msg;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movl %edi, -0x4(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x10(%rbp), %rdi
callq 0x1070
movq %rax, %rdi
shlq $0x0, %rdi
addq $0x4, %rdi
callq 0x1130
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rdi
movl -0x4(%rbp), %edx
leaq 0x1caa(%rip), %rsi      # 0x3004
movb $0x0, %al
callq 0x11b0
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
callq 0x11a0
movq %rax, -0x10(%rbp)
movq -0x10(%rbp), %rax
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/ulisses[P]ftp-client-server/./checksum.h
// Function: checksum
int checksum(char *msg) {
        int  sum, i, n = strlen(msg);

        for(sum = 0, i = 0; i < n; i+=2) {
                sum += msg[i]*256 + msg[i+1];
        }

    sum = (sum >> 16) + (sum & 0xFFFF);
    sum += sum >> 16;

    return ((unsigned short) ~sum);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rdi
callq 0x1070
movl %eax, -0x14(%rbp)
movl $0x0, -0xc(%rbp)
movl $0x0, -0x10(%rbp)
movl -0x10(%rbp), %eax
cmpl -0x14(%rbp), %eax
jge 0x13e1
movq -0x8(%rbp), %rax
movslq -0x10(%rbp), %rcx
movsbl (%rax,%rcx), %eax
shll $0x8, %eax
movq -0x8(%rbp), %rcx
movl -0x10(%rbp), %edx
addl $0x1, %edx
movslq %edx, %rdx
movsbl (%rcx,%rdx), %ecx
addl %ecx, %eax
addl -0xc(%rbp), %eax
movl %eax, -0xc(%rbp)
movl -0x10(%rbp), %eax
addl $0x2, %eax
movl %eax, -0x10(%rbp)
jmp 0x13a6
movl -0xc(%rbp), %eax
sarl $0x10, %eax
movl -0xc(%rbp), %ecx
andl $0xffff, %ecx           # imm = 0xFFFF
addl %ecx, %eax
movl %eax, -0xc(%rbp)
movl -0xc(%rbp), %eax
sarl $0x10, %eax
addl -0xc(%rbp), %eax
movl %eax, -0xc(%rbp)
movl -0xc(%rbp), %eax
xorl $-0x1, %eax
movzwl %ax, %eax
addq $0x20, %rsp
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O0/ulisses[P]ftp-client-server/./geradorErro.h
// Function: myrand
int myrand(int a, int b) {
        int r, ret = 0;

        srand( (unsigned int) time(NULL));

        r = rand();

        if(a<b) {
                b++;
                ret = (r % (b-a)) + a;
        }

        return ret;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movl %edi, -0x4(%rbp)
movl %esi, -0x8(%rbp)
movl $0x0, -0x10(%rbp)
xorl %eax, %eax
movl %eax, %edi
callq 0x1110
movl %eax, %edi
callq 0x10e0
callq 0x1200
movl %eax, -0xc(%rbp)
movl -0x4(%rbp), %eax
cmpl -0x8(%rbp), %eax
jge 0x1460
movl -0x8(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x8(%rbp)
movl -0xc(%rbp), %eax
movl -0x8(%rbp), %ecx
subl -0x4(%rbp), %ecx
cltd
idivl %ecx
addl -0x4(%rbp), %edx
movl %edx, -0x10(%rbp)
movl -0x10(%rbp), %eax
addq $0x10, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/ulisses[P]ftp-client-server/./geradorErro.h
// Function: inicializa
void inicializa() {
        int i;

        for(i=0; i< MAX; i++) {
                buff[i]=NULL;
        }

        for(i = 0; i < MAX; i++)
                indexx[i] = VAZIO;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movl $0x0, -0x4(%rbp)
cmpl $0x64, -0x4(%rbp)
jge 0x14bf
movslq -0x4(%rbp), %rcx
leaq 0x3ca4(%rip), %rax      # 0x5150
movq $0x0, (%rax,%rcx,8)
movl -0x4(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x4(%rbp)
jmp 0x149b
movl $0x0, -0x4(%rbp)
cmpl $0x64, -0x4(%rbp)
jge 0x14e9
movslq -0x4(%rbp), %rcx
leaq 0x3f99(%rip), %rax      # 0x5470
movl $0xffffffff, (%rax,%rcx,4) # imm = 0xFFFFFFFF
movl -0x4(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x4(%rbp)
jmp 0x14c6
popq %rbp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/ulisses[P]ftp-client-server/./geradorErro.h
// Function: popula
void popula(int pErro, int pPerda) {
        int rErro, rPerda;

        inicializa();
        nrActual=0;
        ocupados=0;
        perdidos=0;

        while(ocupados!=pErro) {
                rErro = myrand(0,MAX);
                if(indexx[rErro] == VAZIO) {
                        indexx[rErro] = ERRO;
                        ocupados++;
                }
        }
        while(perdidos!=pPerda) {
                rPerda = myrand(0,MAX);
                if(indexx[rPerda] == VAZIO) {
                        indexx[rPerda] = PERDIDO;
                        perdidos++;
                }
        }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movl %edi, -0x4(%rbp)
movl %esi, -0x8(%rbp)
callq 0x1490
movl $0x0, 0x3c37(%rip)      # 0x5144
movl $0x0, 0x3c29(%rip)      # 0x5140
movl $0x0, 0x3c27(%rip)      # 0x5148
movl 0x3c19(%rip), %eax      # 0x5140
cmpl -0x4(%rbp), %eax
je 0x156f
xorl %edi, %edi
movl $0x64, %esi
callq 0x1410
movl %eax, -0xc(%rbp)
movslq -0xc(%rbp), %rcx
leaq 0x3f2a(%rip), %rax      # 0x5470
cmpl $-0x1, (%rax,%rcx,4)
jne 0x156d
movslq -0xc(%rbp), %rcx
leaq 0x3f19(%rip), %rax      # 0x5470
movl $0x1, (%rax,%rcx,4)
movl 0x3bdc(%rip), %eax      # 0x5140
addl $0x1, %eax
movl %eax, 0x3bd3(%rip)      # 0x5140
jmp 0x1521
jmp 0x1571
movl 0x3bd1(%rip), %eax      # 0x5148
cmpl -0x8(%rbp), %eax
je 0x15bf
xorl %edi, %edi
movl $0x64, %esi
callq 0x1410
movl %eax, -0x10(%rbp)
movslq -0x10(%rbp), %rcx
leaq 0x3eda(%rip), %rax      # 0x5470
cmpl $-0x1, (%rax,%rcx,4)
jne 0x15bd
movslq -0x10(%rbp), %rcx
leaq 0x3ec9(%rip), %rax      # 0x5470
movl $0x2, (%rax,%rcx,4)
movl 0x3b94(%rip), %eax      # 0x5148
addl $0x1, %eax
movl %eax, 0x3b8b(%rip)      # 0x5148
jmp 0x1571
addq $0x10, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/ulisses[P]ftp-client-server/./geradorErro.h
// Function: insereErro
char *insereErro(int pErro, int pPerda, char *msg) {
        char *ret = (char *) malloc(sizeof(char)*strlen(msg));

        if((perdidos == 0 && ocupados==0) || nrActual == MAX)
                popula(pErro, pPerda);
        if(indexx[nrActual] == ERRO) { //preencher com erro
                        buff[nrActual] = altera(msg);
                        ret = strcpy(ret, buff[nrActual]);
        }
        if(indexx[nrActual] == PERDIDO) { //preencher vazio
                        buff[nrActual] = NULL;
                        ret = NULL;
        }
        if(indexx[nrActual] == VAZIO) { //preencher normal
                        buff[nrActual] = msg;
                        ret = strcpy(ret, buff[nrActual]);
        }
        nrActual++;

        return ret;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movl %edi, -0x4(%rbp)
movl %esi, -0x8(%rbp)
movq %rdx, -0x10(%rbp)
movq -0x10(%rbp), %rdi
callq 0x1070
movq %rax, %rdi
shlq $0x0, %rdi
callq 0x1130
movq %rax, -0x18(%rbp)
cmpl $0x0, 0x3b46(%rip)      # 0x5148
jne 0x160d
cmpl $0x0, 0x3b35(%rip)      # 0x5140
je 0x1616
cmpl $0x64, 0x3b30(%rip)     # 0x5144
jne 0x1621
movl -0x4(%rbp), %edi
movl -0x8(%rbp), %esi
callq 0x14f0
movslq 0x3b1c(%rip), %rcx      # 0x5144
leaq 0x3e41(%rip), %rax      # 0x5470
cmpl $0x1, (%rax,%rcx,4)
jne 0x1672
movq -0x10(%rbp), %rdi
callq 0x1470
movq %rax, %rdx
movslq 0x3afc(%rip), %rcx      # 0x5144
leaq 0x3b01(%rip), %rax      # 0x5150
movq %rdx, (%rax,%rcx,8)
movq -0x18(%rbp), %rdi
movslq 0x3ae6(%rip), %rcx      # 0x5144
leaq 0x3aeb(%rip), %rax      # 0x5150
movq (%rax,%rcx,8), %rsi
callq 0x1050
movq %rax, -0x18(%rbp)
movslq 0x3acb(%rip), %rcx      # 0x5144
leaq 0x3df0(%rip), %rax      # 0x5470
cmpl $0x2, (%rax,%rcx,4)
jne 0x16a4
movslq 0x3ab7(%rip), %rcx      # 0x5144
leaq 0x3abc(%rip), %rax      # 0x5150
movq $0x0, (%rax,%rcx,8)
movq $0x0, -0x18(%rbp)
movslq 0x3a99(%rip), %rcx      # 0x5144
leaq 0x3dbe(%rip), %rax      # 0x5470
cmpl $-0x1, (%rax,%rcx,4)
jne 0x16ed
movq -0x10(%rbp), %rdx
movslq 0x3a81(%rip), %rcx      # 0x5144
leaq 0x3a86(%rip), %rax      # 0x5150
movq %rdx, (%rax,%rcx,8)
movq -0x18(%rbp), %rdi
movslq 0x3a6b(%rip), %rcx      # 0x5144
leaq 0x3a70(%rip), %rax      # 0x5150
movq (%rax,%rcx,8), %rsi
callq 0x1050
movq %rax, -0x18(%rbp)
movl 0x3a51(%rip), %eax      # 0x5144
addl $0x1, %eax
movl %eax, 0x3a48(%rip)      # 0x5144
movq -0x18(%rbp), %rax
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/ulisses[P]ftp-client-server/./datagrama.h
// Function: initDatagrama
Datagrama *initDatagrama(){
	Datagrama *novo = (Datagrama *)malloc(sizeof(struct segmento));
	novo->ack = novo->seq = novo->win_size = novo->flags = novo->len = novo->cksum = 0;
	strcpy(novo->data, "c");
	return novo;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movl $0xe0, %edi
callq 0x1130
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
movl $0x0, 0x14(%rax)
movq -0x8(%rbp), %rax
movl $0x0, 0x8(%rax)
movq -0x8(%rbp), %rax
movl $0x0, 0x10(%rax)
movq -0x8(%rbp), %rax
movl $0x0, 0xc(%rax)
movq -0x8(%rbp), %rax
movl $0x0, (%rax)
movq -0x8(%rbp), %rax
movl $0x0, 0x4(%rax)
movq -0x8(%rbp), %rdi
addq $0x18, %rdi
leaq 0x1881(%rip), %rsi      # 0x3007
callq 0x1050
movq -0x8(%rbp), %rax
addq $0x10, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/ulisses[P]ftp-client-server/./datagrama.h
// Function: demuxDatagrama
Datagrama *demuxDatagrama(char *buffer){
	int res;
	Datagrama *novo = (Datagrama *) malloc(sizeof(struct segmento));
	res = sscanf(buffer, "%d %d %d %d %d %d %[^ ]", &novo->seq, &novo->ack, &novo->len, &novo->win_size, &novo->flags, &novo->cksum,novo->data);
	if(res< 7){ 
		free(novo); 
		return NULL;
	}
	else {
		int i, diff = (strlen(buffer)) - novo->len;
		for(i = 0; i < novo->len && i< TAM; i++) novo->data[i] = buffer[diff + i];
		novo->data[i] = '\0';
		return novo;
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movq %rdi, -0x10(%rbp)
movl $0xe0, %edi
callq 0x1130
movq %rax, -0x20(%rbp)
movq -0x10(%rbp), %rdi
movq -0x20(%rbp), %rdx
movq -0x20(%rbp), %rcx
addq $0x4, %rcx
movq -0x20(%rbp), %r8
addq $0x8, %r8
movq -0x20(%rbp), %r9
addq $0xc, %r9
movq -0x20(%rbp), %r11
addq $0x10, %r11
movq -0x20(%rbp), %r10
addq $0x14, %r10
movq -0x20(%rbp), %rax
addq $0x18, %rax
leaq 0x1810(%rip), %rsi      # 0x3009
movq %r11, (%rsp)
movq %r10, 0x8(%rsp)
movq %rax, 0x10(%rsp)
movb $0x0, %al
callq 0x1140
movl %eax, -0x14(%rbp)
cmpl $0x7, -0x14(%rbp)
jge 0x182d
movq -0x20(%rbp), %rdi
callq 0x1030
movq $0x0, -0x8(%rbp)
jmp 0x18ae
movq -0x10(%rbp), %rdi
callq 0x1070
movq -0x20(%rbp), %rcx
movslq 0x8(%rcx), %rcx
subq %rcx, %rax
movl %eax, -0x28(%rbp)
movl $0x0, -0x24(%rbp)
movl -0x24(%rbp), %ecx
movq -0x20(%rbp), %rdx
xorl %eax, %eax
cmpl 0x8(%rdx), %ecx
movb %al, -0x29(%rbp)
jge 0x1869
cmpl $0xc8, -0x24(%rbp)
setl %al
movb %al, -0x29(%rbp)
movb -0x29(%rbp), %al
testb $0x1, %al
jne 0x1872
jmp 0x1899
movq -0x10(%rbp), %rax
movl -0x28(%rbp), %ecx
addl -0x24(%rbp), %ecx
movslq %ecx, %rcx
movb (%rax,%rcx), %dl
movq -0x20(%rbp), %rax
movslq -0x24(%rbp), %rcx
movb %dl, 0x18(%rax,%rcx)
movl -0x24(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x24(%rbp)
jmp 0x184b
movq -0x20(%rbp), %rax
movslq -0x24(%rbp), %rcx
movb $0x0, 0x18(%rax,%rcx)
movq -0x20(%rbp), %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x50, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/ulisses[P]ftp-client-server/./datagrama.h
// Function: muxDatagrama
char *muxDatagrama(Datagrama *novo){
	if(novo){
	char *buffer = (char *)malloc(sizeof(char)*(TAM+24));
	sprintf(buffer, "%d %d %d %d %d %d %s", novo->seq, novo->ack, novo->len, novo->win_size, novo->flags, novo->cksum, novo->data);
	return buffer;
	}
	else return NULL;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
cmpq $0x0, -0x10(%rbp)
je 0x1940
movl $0xe0, %edi
callq 0x1130
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rdi
movq -0x10(%rbp), %rax
movl (%rax), %edx
movq -0x10(%rbp), %rax
movl 0x4(%rax), %ecx
movq -0x10(%rbp), %rax
movl 0x8(%rax), %r8d
movq -0x10(%rbp), %rax
movl 0xc(%rax), %r9d
movq -0x10(%rbp), %rax
movl 0x10(%rax), %r11d
movq -0x10(%rbp), %rax
movl 0x14(%rax), %r10d
movq -0x10(%rbp), %rax
addq $0x18, %rax
leaq 0x1700(%rip), %rsi      # 0x3021
movl %r11d, (%rsp)
movl %r10d, 0x8(%rsp)
movq %rax, 0x10(%rsp)
movb $0x0, %al
callq 0x11b0
movq -0x18(%rbp), %rax
movq %rax, -0x8(%rbp)
jmp 0x1948
movq $0x0, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/ulisses[P]ftp-client-server/./datagrama.h
// Function: mostraFlagsActivas
void mostraFlagsActivas(int flags){
	if(flags & FL_SYN) printf("FL_SYN\n");
	if(flags & FL_ACK) printf("FL_ACK\n");
	if(flags & FL_FIN) printf("FL_FIN\n");
	if(flags & FL_GET) printf("FL_GET\n");
	if(flags & FL_ERRO) printf("FL_ERRO\n");
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movl %edi, -0x4(%rbp)
movl -0x4(%rbp), %eax
andl $0x1, %eax
cmpl $0x0, %eax
je 0x1984
leaq 0x16b9(%rip), %rdi      # 0x3036
movb $0x0, %al
callq 0x1090
movl -0x4(%rbp), %eax
andl $0x2, %eax
cmpl $0x0, %eax
je 0x199d
leaq 0x16a8(%rip), %rdi      # 0x303e
movb $0x0, %al
callq 0x1090
movl -0x4(%rbp), %eax
andl $0x4, %eax
cmpl $0x0, %eax
je 0x19b6
leaq 0x1697(%rip), %rdi      # 0x3046
movb $0x0, %al
callq 0x1090
movl -0x4(%rbp), %eax
andl $0x8, %eax
cmpl $0x0, %eax
je 0x19cf
leaq 0x1686(%rip), %rdi      # 0x304e
movb $0x0, %al
callq 0x1090
movl -0x4(%rbp), %eax
andl $0x10, %eax
cmpl $0x0, %eax
je 0x19e8
leaq 0x1675(%rip), %rdi      # 0x3056
movb $0x0, %al
callq 0x1090
addq $0x10, %rsp
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/ulisses[P]ftp-client-server/./datagrama.h
// Function: mostraDatagrama
void mostraDatagrama(Datagrama *data){
if(data){
	printf("Ack: %d\n", data->ack);
	printf("Seq: %d\n", data->seq);
	printf("Len: %d\n", data->len);
	printf("Win_size: %d\n", data->win_size);
	printf("checksum: %d\n", data->cksum);
	mostraFlagsActivas(data->flags);
	printf("Data:%s", data->data);
	}
	else printf("Formato desconhecido");
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
cmpq $0x0, -0x8(%rbp)
je 0x1a93
movq -0x8(%rbp), %rax
movl 0x4(%rax), %esi
leaq 0x164a(%rip), %rdi      # 0x305f
movb $0x0, %al
callq 0x1090
movq -0x8(%rbp), %rax
movl (%rax), %esi
leaq 0x163f(%rip), %rdi      # 0x3068
movb $0x0, %al
callq 0x1090
movq -0x8(%rbp), %rax
movl 0x8(%rax), %esi
leaq 0x1633(%rip), %rdi      # 0x3071
movb $0x0, %al
callq 0x1090
movq -0x8(%rbp), %rax
movl 0xc(%rax), %esi
leaq 0x1627(%rip), %rdi      # 0x307a
movb $0x0, %al
callq 0x1090
movq -0x8(%rbp), %rax
movl 0x14(%rax), %esi
leaq 0x1620(%rip), %rdi      # 0x3088
movb $0x0, %al
callq 0x1090
movq -0x8(%rbp), %rax
movl 0x10(%rax), %edi
callq 0x1960
movq -0x8(%rbp), %rsi
addq $0x18, %rsi
leaq 0x160c(%rip), %rdi      # 0x3096
movb $0x0, %al
callq 0x1090
jmp 0x1aa1
leaq 0x1604(%rip), %rdi      # 0x309e
movb $0x0, %al
callq 0x1090
addq $0x10, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/ulisses[P]ftp-client-server/./datagrama.h
// Function: readFile
int readFile(int file, int nbytes, char *buffer){
	int n, i = 0;
	n = 1;
	while(i < nbytes && n > 0){
	n = read(file, &(buffer[i]), 1);
	i++;
	}
	buffer[i] = '\0';
	return i;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movl %edi, -0x4(%rbp)
movl %esi, -0x8(%rbp)
movq %rdx, -0x10(%rbp)
movl $0x0, -0x18(%rbp)
movl $0x1, -0x14(%rbp)
movl -0x18(%rbp), %ecx
xorl %eax, %eax
cmpl -0x8(%rbp), %ecx
movb %al, -0x19(%rbp)
jge 0x1ae7
cmpl $0x0, -0x14(%rbp)
setg %al
movb %al, -0x19(%rbp)
movb -0x19(%rbp), %al
testb $0x1, %al
jne 0x1af0
jmp 0x1b16
movl -0x4(%rbp), %edi
movq -0x10(%rbp), %rsi
movslq -0x18(%rbp), %rax
addq %rax, %rsi
movl $0x1, %edx
callq 0x10d0
movl %eax, -0x14(%rbp)
movl -0x18(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x18(%rbp)
jmp 0x1ad0
movq -0x10(%rbp), %rax
movslq -0x18(%rbp), %rcx
movb $0x0, (%rax,%rcx)
movl -0x18(%rbp), %eax
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/ulisses[P]ftp-client-server/./datagrama.h
// Function: parteFicheiro
Datagrama *parteFicheiro(int fich, int nbytes, int seq){
	int length, bytesRead = 0;
	Datagrama *novo = initDatagrama();
	
	if(nbytes < TAM){
		length = nbytes;
	}else length = TAM;
		
	bytesRead = readFile(fich, length, novo->data);
	
	if(bytesRead == length){
	//numero de bytes lidos
		novo->seq = seq + bytesRead;
		novo->ack = 0;
		novo->len = strlen(novo->data);
		novo->win_size = 1;
		return novo;
	}
	else {
		novo->seq = seq + bytesRead;
		if(strlen(novo->data)==1) strcpy(novo->data,"c");
		novo->len = strlen(novo->data);
		novo->flags = FL_FIN;
		return novo;
		}
			
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movl %edi, -0xc(%rbp)
movl %esi, -0x10(%rbp)
movl %edx, -0x14(%rbp)
movl $0x0, -0x1c(%rbp)
callq 0x1720
movq %rax, -0x28(%rbp)
cmpl $0xc8, -0x10(%rbp)
jge 0x1b62
movl -0x10(%rbp), %eax
movl %eax, -0x18(%rbp)
jmp 0x1b69
movl $0xc8, -0x18(%rbp)
movl -0xc(%rbp), %edi
movl -0x18(%rbp), %esi
movq -0x28(%rbp), %rdx
addq $0x18, %rdx
callq 0x1ab0
movl %eax, -0x1c(%rbp)
movl -0x1c(%rbp), %eax
cmpl -0x18(%rbp), %eax
jne 0x1bc9
movl -0x14(%rbp), %ecx
addl -0x1c(%rbp), %ecx
movq -0x28(%rbp), %rax
movl %ecx, (%rax)
movq -0x28(%rbp), %rax
movl $0x0, 0x4(%rax)
movq -0x28(%rbp), %rdi
addq $0x18, %rdi
callq 0x1070
movl %eax, %ecx
movq -0x28(%rbp), %rax
movl %ecx, 0x8(%rax)
movq -0x28(%rbp), %rax
movl $0x1, 0xc(%rax)
movq -0x28(%rbp), %rax
movq %rax, -0x8(%rbp)
jmp 0x1c25
movl -0x14(%rbp), %ecx
addl -0x1c(%rbp), %ecx
movq -0x28(%rbp), %rax
movl %ecx, (%rax)
movq -0x28(%rbp), %rdi
addq $0x18, %rdi
callq 0x1070
cmpq $0x1, %rax
jne 0x1bfc
movq -0x28(%rbp), %rdi
addq $0x18, %rdi
leaq 0x1410(%rip), %rsi      # 0x3007
callq 0x1050
movq -0x28(%rbp), %rdi
addq $0x18, %rdi
callq 0x1070
movl %eax, %ecx
movq -0x28(%rbp), %rax
movl %ecx, 0x8(%rax)
movq -0x28(%rbp), %rax
movl $0x4, 0x10(%rax)
movq -0x28(%rbp), %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x30, %rsp
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/ulisses[P]ftp-client-server/clientec2.c
// Function: transfereFich
int transfereFich(int te, int tp, int sock, char *file, int destBuffer, ConState *con ,struct sockaddr_in *from, int fromlen){
	int trans, f, fin,  seq = 0;
	char *buffer;
	Datagrama *enviar;
	if((f = open(file, O_RDONLY))< 0){ //Ocorreu um erro na abertura do ficheiro. Possivelmente não existe
		enviar = initDatagrama();
		enviar->flags = (FL_ERRO | FL_FIN);
		buffer = muxDatagrama(enviar);
		free(enviar);
		sendto(sock,buffer,strlen(buffer), 0, (struct sockaddr *)from, fromlen);
		free(buffer);
		perror("open");
		return -1;
	}
	else {
		fin  = 0;
		trans = 1;
		while(!fin && trans){
			enviar = parteFicheiro(f, destBuffer, seq); //Segmento com atenção ao buffer do cliente
			enviar->cksum = checksum(enviar->data);     //Calcula o cksum da informação e junta ao segmento
			seq = enviar->seq;
			
			fin = (enviar->flags & FL_FIN);
			buffer = muxDatagrama(enviar);
			
			trans = sendMsg(te, tp, sock, buffer, con, seq, from, &fromlen);
			free(enviar);
			free(buffer);
		}
	return fin;
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x70, %rsp
movl 0x18(%rbp), %eax
movq 0x10(%rbp), %rax
movl %edi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movl %edx, -0x10(%rbp)
movq %rcx, -0x18(%rbp)
movl %r8d, -0x1c(%rbp)
movq %r9, -0x28(%rbp)
movl $0x0, -0x38(%rbp)
movq -0x18(%rbp), %rdi
xorl %esi, %esi
movb $0x0, %al
callq 0x1160
movl %eax, -0x30(%rbp)
cmpl $0x0, %eax
jge 0x1fcb
callq 0x1720
movq %rax, -0x48(%rbp)
movq -0x48(%rbp), %rax
movl $0x14, 0x10(%rax)
movq -0x48(%rbp), %rdi
callq 0x18c0
movq %rax, -0x40(%rbp)
movq -0x48(%rbp), %rdi
callq 0x1030
movl -0x10(%rbp), %eax
movl %eax, -0x54(%rbp)
movq -0x40(%rbp), %rax
movq %rax, -0x50(%rbp)
movq -0x40(%rbp), %rdi
callq 0x1070
movl -0x54(%rbp), %edi
movq -0x50(%rbp), %rsi
movq %rax, %rdx
movq 0x10(%rbp), %r8
movl 0x18(%rbp), %r9d
xorl %ecx, %ecx
callq 0x10b0
movq -0x40(%rbp), %rdi
callq 0x1030
leaq 0x113a(%rip), %rdi      # 0x30f4
callq 0x1180
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x2090
movl $0x0, -0x34(%rbp)
movl $0x1, -0x2c(%rbp)
xorl %eax, %eax
cmpl $0x0, -0x34(%rbp)
movb %al, -0x55(%rbp)
jne 0x1fee
cmpl $0x0, -0x2c(%rbp)
setne %al
movb %al, -0x55(%rbp)
movb -0x55(%rbp), %al
testb $0x1, %al
jne 0x1ffa
jmp 0x208a
movl -0x30(%rbp), %edi
movl -0x1c(%rbp), %esi
movl -0x38(%rbp), %edx
callq 0x1b30
movq %rax, -0x48(%rbp)
movq -0x48(%rbp), %rdi
addq $0x18, %rdi
callq 0x1380
movl %eax, %ecx
movq -0x48(%rbp), %rax
movl %ecx, 0x14(%rax)
movq -0x48(%rbp), %rax
movl (%rax), %eax
movl %eax, -0x38(%rbp)
movq -0x48(%rbp), %rax
movl 0x10(%rax), %eax
andl $0x4, %eax
movl %eax, -0x34(%rbp)
movq -0x48(%rbp), %rdi
callq 0x18c0
movq %rax, -0x40(%rbp)
movl -0x8(%rbp), %edi
movl -0xc(%rbp), %esi
movl -0x10(%rbp), %edx
movq -0x40(%rbp), %rcx
movq -0x28(%rbp), %r8
movl -0x38(%rbp), %r9d
movq 0x10(%rbp), %r10
leaq 0x18(%rbp), %rax
movq %r10, (%rsp)
movq %rax, 0x8(%rsp)
callq 0x1c30
movl %eax, -0x2c(%rbp)
movq -0x48(%rbp), %rdi
callq 0x1030
movq -0x40(%rbp), %rdi
callq 0x1030
jmp 0x1fd9
movl -0x34(%rbp), %eax
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x70, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/ulisses[P]ftp-client-server/clientec2.c
// Function: enviaPedido
int enviaPedido(int sock, char *buffer, struct sockaddr_in *servidor,int te, int tp){
	if(!buffer){
		printf("erro no comando\n");
		return 0;
	}else {
		n = sendto(sock,buffer, strlen(buffer),0,(struct sockaddr *)servidor ,(socklen_t)length);
              	if (n < 0) { 
              		perror("Sendto");
              		exit(1);
              	}
            	return 1;	
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movl %edi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movl %ecx, -0x1c(%rbp)
movl %r8d, -0x20(%rbp)
cmpq $0x0, -0x10(%rbp)
jne 0x2b88
leaq 0x5c4(%rip), %rdi       # 0x313c
movb $0x0, %al
callq 0x1090
movl $0x0, -0x4(%rbp)
jmp 0x2be7
movl -0x8(%rbp), %eax
movl %eax, -0x2c(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x28(%rbp)
movq -0x10(%rbp), %rdi
callq 0x1070
movl -0x2c(%rbp), %edi
movq -0x28(%rbp), %rsi
movq %rax, %rdx
movq -0x18(%rbp), %r8
movl 0x2a5c(%rip), %r9d      # 0x5610
xorl %ecx, %ecx
callq 0x10b0
movl %eax, 0x2a63(%rip)      # 0x5624
cmpl $0x0, 0x2a5c(%rip)      # 0x5624
jge 0x2be0
leaq 0x53d(%rip), %rdi       # 0x310e
callq 0x1180
movl $0x1, %edi
callq 0x11c0
movl $0x1, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x30, %rsp
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O0/ulisses[P]ftp-client-server/clientec2.c
// Function: contem
Flag *contem(char **argv, char *token) {
        Flag *flag = NULL;
        int i;

        for(i=0; argv[i]!=NULL; i++) {
                if(strcasecmp(argv[i], token) == 0) { /* encontrei */
                        flag = (Flag *) malloc(sizeof(Flag));
                        flag->bool = 1;
                        flag->pos = i;
                        return flag;
                }
        }
        return flag;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq $0x0, -0x20(%rbp)
movl $0x0, -0x24(%rbp)
movq -0x10(%rbp), %rax
movslq -0x24(%rbp), %rcx
cmpq $0x0, (%rax,%rcx,8)
je 0x2ea1
movq -0x10(%rbp), %rax
movslq -0x24(%rbp), %rcx
movq (%rax,%rcx,8), %rdi
movq -0x18(%rbp), %rsi
callq 0x1040
cmpl $0x0, %eax
jne 0x2e94
movl $0x8, %edi
callq 0x1130
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rax
movl $0x1, (%rax)
movl -0x24(%rbp), %ecx
movq -0x20(%rbp), %rax
movl %ecx, 0x4(%rax)
movq -0x20(%rbp), %rax
movq %rax, -0x8(%rbp)
jmp 0x2ea9
jmp 0x2e96
movl -0x24(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x24(%rbp)
jmp 0x2e3f
movq -0x20(%rbp), %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/ulisses[P]ftp-client-server/clientec2.c
// Function: main
int main(int args, char **argv) {
        Flag *tp = NULL;
        Flag *te = NULL;

        if((tp = contem(argv,"-tp"))==NULL) {
                errorMsg();
                exit(2);
        }

        if((te = contem(argv,"-te"))==NULL) {
                errorMsg();
                exit(3);
        }

        if(tp->bool && te->bool && args >5) {//a alterar aquando da programação da camada da aplicação
                cliente(atoi(argv[te->pos+1]),atoi(argv[tp->pos+1]), argv[5], argv[4]);
                /*Datagrama *teste = trataPedido(pedido);
                if(teste) mostraDatagrama(teste);
                free(teste);*/
        }
        return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movl $0x0, -0x4(%rbp)
movl %edi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq $0x0, -0x18(%rbp)
movq $0x0, -0x20(%rbp)
movq -0x10(%rbp), %rdi
leaq 0x2ae(%rip), %rsi       # 0x319f
callq 0x2e20
movq %rax, -0x18(%rbp)
cmpq $0x0, %rax
jne 0x2f0f
callq 0x2e00
movl $0x2, %edi
callq 0x11c0
movq -0x10(%rbp), %rdi
leaq 0x289(%rip), %rsi       # 0x31a3
callq 0x2e20
movq %rax, -0x20(%rbp)
cmpq $0x0, %rax
jne 0x2f38
callq 0x2e00
movl $0x3, %edi
callq 0x11c0
movq -0x18(%rbp), %rax
cmpl $0x0, (%rax)
je 0x2fa1
movq -0x20(%rbp), %rax
cmpl $0x0, (%rax)
je 0x2fa1
cmpl $0x5, -0x8(%rbp)
jle 0x2fa1
movq -0x10(%rbp), %rax
movq -0x20(%rbp), %rcx
movl 0x4(%rcx), %ecx
addl $0x1, %ecx
movslq %ecx, %rcx
movq (%rax,%rcx,8), %rdi
callq 0x1190
movl %eax, -0x24(%rbp)
movq -0x10(%rbp), %rax
movq -0x18(%rbp), %rcx
movl 0x4(%rcx), %ecx
addl $0x1, %ecx
movslq %ecx, %rcx
movq (%rax,%rcx,8), %rdi
callq 0x1190
movl -0x24(%rbp), %edi
movl %eax, %esi
movq -0x10(%rbp), %rax
movq 0x28(%rax), %rdx
movq -0x10(%rbp), %rax
movq 0x20(%rax), %rcx
callq 0x2bf0
xorl %eax, %eax
addq $0x30, %rsp
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O0/wjmelements[P]evm/tst/uint256.c
// Function: test_bits
void test_bits() {
    uint256_t a;
    clear256(&a);
    assert(bits256(&a) == 0);

    LOWER(LOWER(a)) = 1;
    assert(bits256(&a) == 1);

    LOWER(UPPER(a)) = 1;
    assert(bits128(&UPPER(a)) == 1);
    assert(bits256(&a) == 129);

    UPPER(UPPER(a)) = 0xff00000000000000;
    assert(bits128(&UPPER(a)) == 128);
    assert(bits256(&a) == 256);

    UPPER(UPPER(a)) = 0x7f00000000000000;
    assert(bits128(&UPPER(a)) == 127);
    assert(bits256(&a) == 255);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
leaq -0x20(%rbp), %rdi
callq 0x35f0
leaq -0x20(%rbp), %rdi
callq 0x4050
cmpl $0x0, %eax
jne 0x19d1
jmp 0x19f0
leaq 0x5cee(%rip), %rdi      # 0x76c6
leaq 0x565c(%rip), %rsi      # 0x703b
movl $0x58, %edx
leaq 0x5cec(%rip), %rcx      # 0x76d7
callq 0x1030
movq $0x1, -0x8(%rbp)
leaq -0x20(%rbp), %rdi
callq 0x4050
cmpl $0x1, %eax
jne 0x1a08
jmp 0x1a27
leaq 0x5cd9(%rip), %rdi      # 0x76e8
leaq 0x5625(%rip), %rsi      # 0x703b
movl $0x5b, %edx
leaq 0x5cb5(%rip), %rcx      # 0x76d7
callq 0x1030
movq $0x1, -0x18(%rbp)
leaq -0x20(%rbp), %rdi
callq 0x3fd0
cmpl $0x1, %eax
jne 0x1a3f
jmp 0x1a5e
leaq 0x5cb3(%rip), %rdi      # 0x76f9
leaq 0x55ee(%rip), %rsi      # 0x703b
movl $0x5e, %edx
leaq 0x5c7e(%rip), %rcx      # 0x76d7
callq 0x1030
leaq -0x20(%rbp), %rdi
callq 0x4050
cmpl $0x81, %eax
jne 0x1a70
jmp 0x1a8f
leaq 0x5c9a(%rip), %rdi      # 0x7711
leaq 0x55bd(%rip), %rsi      # 0x703b
movl $0x5f, %edx
leaq 0x5c4d(%rip), %rcx      # 0x76d7
callq 0x1030
movabsq $-0x100000000000000, %rax # imm = 0xFF00000000000000
movq %rax, -0x20(%rbp)
leaq -0x20(%rbp), %rdi
callq 0x3fd0
cmpl $0x80, %eax
jne 0x1aaf
jmp 0x1ace
leaq 0x5c6e(%rip), %rdi      # 0x7724
leaq 0x557e(%rip), %rsi      # 0x703b
movl $0x62, %edx
leaq 0x5c0e(%rip), %rcx      # 0x76d7
callq 0x1030
leaq -0x20(%rbp), %rdi
callq 0x4050
cmpl $0x100, %eax            # imm = 0x100
jne 0x1ae0
jmp 0x1aff
leaq 0x5c57(%rip), %rdi      # 0x773e
leaq 0x554d(%rip), %rsi      # 0x703b
movl $0x63, %edx
leaq 0x5bdd(%rip), %rcx      # 0x76d7
callq 0x1030
movabsq $0x7f00000000000000, %rax # imm = 0x7F00000000000000
movq %rax, -0x20(%rbp)
leaq -0x20(%rbp), %rdi
callq 0x3fd0
cmpl $0x7f, %eax
jne 0x1b1d
jmp 0x1b3c
leaq 0x5c2d(%rip), %rdi      # 0x7751
leaq 0x5510(%rip), %rsi      # 0x703b
movl $0x66, %edx
leaq 0x5ba0(%rip), %rcx      # 0x76d7
callq 0x1030
leaq -0x20(%rbp), %rdi
callq 0x4050
cmpl $0xff, %eax
jne 0x1b4e
jmp 0x1b6d
leaq 0x5c16(%rip), %rdi      # 0x776b
leaq 0x54df(%rip), %rsi      # 0x703b
movl $0x67, %edx
leaq 0x5b6f(%rip), %rcx      # 0x76d7
callq 0x1030
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/wjmelements[P]evm/tst/uint256.c
// Function: main
int main() {
    test_bitwise();
    test_bits();
    test_math();
    test_shiftar();
    test_exp();
    test_signextend();
    test_mulmod();
    return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movl $0x0, -0x4(%rbp)
callq 0x1150
callq 0x19b0
callq 0x1b80
callq 0x1ed0
callq 0x2700
callq 0x2a30
callq 0x2f10
xorl %eax, %eax
addq $0x10, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/wjmelements[P]evm/src/uint256.c
// Function: readUint64BE
static uint64_t readUint64BE(const uint8_t *buffer) {
    return (((uint64_t)buffer[0]) << 56) | (((uint64_t)buffer[1]) << 48) |
           (((uint64_t)buffer[2]) << 40) | (((uint64_t)buffer[3]) << 32) |
           (((uint64_t)buffer[4]) << 24) | (((uint64_t)buffer[5]) << 16) |
           (((uint64_t)buffer[6]) << 8) | (((uint64_t)buffer[7]));
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movzbl (%rax), %eax
shlq $0x38, %rax
movq -0x8(%rbp), %rcx
movzbl 0x1(%rcx), %ecx
shlq $0x30, %rcx
orq %rcx, %rax
movq -0x8(%rbp), %rcx
movzbl 0x2(%rcx), %ecx
shlq $0x28, %rcx
orq %rcx, %rax
movq -0x8(%rbp), %rcx
movzbl 0x3(%rcx), %ecx
shlq $0x20, %rcx
orq %rcx, %rax
movq -0x8(%rbp), %rcx
movzbl 0x4(%rcx), %ecx
shlq $0x18, %rcx
orq %rcx, %rax
movq -0x8(%rbp), %rcx
movzbl 0x5(%rcx), %ecx
shlq $0x10, %rcx
orq %rcx, %rax
movq -0x8(%rbp), %rcx
movzbl 0x6(%rcx), %ecx
shlq $0x8, %rcx
orq %rcx, %rax
movq -0x8(%rbp), %rcx
movzbl 0x7(%rcx), %ecx
orq %rcx, %rax
popq %rbp
retq
nopw (%rax,%rax)