LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_cpp_makefile_star2_O1/Andrea-Guerrieri[P]LEOSoC/examples/testapplication.cpp
// Function: main
int main ( int argc, char *argv[] )
{
        
    leosoc_init( TEST_ID );
    
    leosoc_create ( 0, &input_data, &output_data );
    leosoc_create ( 1, &input_data, &output_data );
    leosoc_create ( 2, &input_data, &output_data );
    
    leosoc_join ( 0, TIMEOUT );
    
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movl $0x1, %edi
callq 0x404682
leaq 0x1f143f(%rip), %rbx    # 0x5f5cf8
leaq 0x1f143c(%rip), %r14    # 0x5f5cfc
xorl %edi, %edi
movq %rbx, %rsi
movq %r14, %rdx
callq 0x404718
movl $0x1, %edi
movq %rbx, %rsi
movq %r14, %rdx
callq 0x404718
movl $0x2, %edi
movq %rbx, %rsi
movq %r14, %rdx
callq 0x404718
xorl %edi, %edi
movl $0x5, %esi
callq 0x40477e
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
nopw %cs:(%rax,%rax)
nopl (%rax)
// File: /workspace/github_cpp_makefile_star2_O1/jaudoux[P]countTags/src/countTags.cpp
// Function: join(std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>> const&, char const*)
std::string join( const std::vector<std::string>& elements, const char* const separator)
{
  switch (elements.size())
  {
    case 0:
      return "";
    case 1:
      return elements[0];
    default:
      std::ostringstream os;
      std::copy(elements.begin(), elements.end()-1, std::ostream_iterator<std::string>(os, separator));
      os << *elements.rbegin();
      return os.str();
  }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x188, %rsp            # imm = 0x188
movq %rdi, %rbx
movq (%rsi), %rax
movq 0x8(%rsi), %rcx
subq %rax, %rcx
sarq $0x5, %rcx
cmpq $0x1, %rcx
je 0x2587
testq %rcx, %rcx
jne 0x25a5
leaq 0x10(%rbx), %rax
movq %rax, (%rbx)
leaq 0x4b7b(%rip), %rdx      # 0x70f2
movq %rbx, %rdi
movq %rdx, %rsi
callq 0x4172
jmp 0x2637
leaq 0x10(%rbx), %rcx
movq %rcx, (%rbx)
movq (%rax), %rsi
movq 0x8(%rax), %rdx
addq %rsi, %rdx
movq %rbx, %rdi
callq 0x40e2
jmp 0x2637
movq %rdx, %r12
movq %rsi, %r14
leaq 0x10(%rsp), %r13
movq %r13, %rdi
callq 0x2240
movq (%r14), %r15
movq 0x8(%r14), %rbp
movq %r13, (%rsp)
movq %r12, 0x8(%rsp)
subq %r15, %rbp
addq $-0x20, %rbp
sarq $0x5, %rbp
testq %rbp, %rbp
jle 0x25f6
incq %rbp
movq %rsp, %r12
movq %r12, %rdi
movq %r15, %rsi
callq 0x4202
addq $0x20, %r15
decq %rbp
cmpq $0x1, %rbp
jg 0x25de
movq 0x8(%r14), %rax
movq -0x20(%rax), %rsi
movq -0x18(%rax), %rdx
leaq 0x10(%rsp), %rdi
callq 0x21c0
leaq 0x18(%rsp), %rsi
movq %rbx, %rdi
callq 0x22b0
movq 0x79a0(%rip), %rsi      # 0x9fc0
leaq 0x10(%rsp), %rdi
callq 0x20e0
leaq 0x80(%rsp), %rdi
callq 0x2090
movq %rbx, %rax
addq $0x188, %rsp            # imm = 0x188
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x2650
jmp 0x2650
movq %rax, %rbx
movq 0x7966(%rip), %rsi      # 0x9fc0
leaq 0x10(%rsp), %rdi
callq 0x20e0
leaq 0x80(%rsp), %rdi
callq 0x2090
movq %rbx, %rdi
callq 0x2310
// File: /workspace/github_cpp_makefile_star2_O1/jaudoux[P]countTags/src/countTags.cpp
// Function: Arg::Numeric(option::Option const&, bool)
static option::ArgStatus Numeric(const option::Option& option, bool msg)
  {
    char* endptr = 0;
    if (option.arg != 0 && strtol(option.arg, &endptr, 10)){};
    if (endptr != option.arg && *endptr == 0)
      return option::ARG_OK;

    if (msg) printError("Option '", option, "' requires a numeric argument\n");
    return option::ARG_ILLEGAL;
  }

// Assembly:
pushq %rbp
pushq %rbx
pushq %rax
movl %esi, %ebp
movq %rdi, %rbx
movq $0x0, (%rsp)
movq 0x20(%rdi), %rdi
testq %rdi, %rdi
je 0x3812
movq %rsp, %rsi
movl $0xa, %edx
callq 0x2250
movq (%rsp), %rcx
cmpq 0x20(%rbx), %rcx
je 0x3834
xorl %eax, %eax
cmpb $0x0, (%rcx)
setne %cl
testb %bpl, %cl
jne 0x3845
movb %cl, %al
leal 0x1(,%rax,2), %eax
jmp 0x383e
movl $0x3, %eax
testb %bpl, %bpl
jne 0x3845
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
leaq 0x39f2(%rip), %rdi      # 0x723e
leaq 0x39f4(%rip), %rdx      # 0x7247
movq %rbx, %rsi
callq 0x2360
movl $0x3, %eax
jmp 0x383e
// File: /workspace/github_cpp_makefile_star2_O1/jaudoux[P]countTags/src/optionparser.h
// Function: option::Parser::streqabbr(char const*, char const*, long long)
static bool streqabbr(const char* st1, const char* st2, long long min)
  {
    const char* st1start = st1;
    while (*st1 != 0 && (*st1 == *st2))
    {
      ++st1;
      ++st2;
    }

    return (*st1 == 0 || (min > 0 && (st1 - st1start) >= min)) && (*st2 == 0 || *st2 == '=');
  }

// Assembly:
movb (%rdi), %cl
testb %cl, %cl
sete %al
je 0x3e1c
cmpb (%rsi), %cl
jne 0x3e06
incq %rsi
movq %rdi, %rcx
movb 0x1(%rcx), %r9b
testb %r9b, %r9b
sete %al
je 0x3e1c
incq %rcx
leaq 0x1(%rsi), %r8
cmpb (%rsi), %r9b
movq %r8, %rsi
je 0x3de3
decq %r8
movq %r8, %rsi
jmp 0x3e09
movq %rdi, %rcx
testb %al, %al
jne 0x3e1c
xorl %eax, %eax
testq %rdx, %rdx
jle 0x3e2a
subq %rdi, %rcx
cmpq %rdx, %rcx
jl 0x3e2a
movb (%rsi), %al
testb %al, %al
sete %cl
cmpb $0x3d, %al
sete %al
orb %cl, %al
retq
nop
// File: /workspace/github_cpp_makefile_star2_O1/jaudoux[P]countTags/src/optionparser.h
// Function: option::Option::init(option::Descriptor const*, char const*, char const*)
void init(const Descriptor* desc_, const char* name_, const char* arg_)
  {
    desc = desc_;
    name = name_;
    arg = arg_;
    prev_ = tag(this);
    next_ = tag(this);
    namelen = 0;
    if (name == 0)
      return;
    namelen = 1;
    if (name[0] != '-')
      return;
    while (name[namelen] != 0 && name[namelen] != '=')
      ++namelen;
  }

// Assembly:
movq %rsi, 0x10(%rdi)
movq %rdx, 0x18(%rdi)
movq %rcx, 0x20(%rdi)
movq %rdi, %rax
orq $0x1, %rax
movq %rax, 0x8(%rdi)
movq %rax, (%rdi)
movl $0x0, 0x28(%rdi)
testq %rdx, %rdx
je 0x3e7d
movl $0x1, 0x28(%rdi)
cmpb $0x2d, (%rdx)
jne 0x3e7d
movslq 0x28(%rdi), %rax
addq %rax, %rdx
incl %eax
movzbl (%rdx), %ecx
testl %ecx, %ecx
je 0x3e7d
cmpl $0x3d, %ecx
je 0x3e7d
movl %eax, 0x28(%rdi)
incq %rdx
incl %eax
jmp 0x3e67
retq
// File: /workspace/github_cpp_makefile_star2_O1/jaudoux[P]countTags/src/optionparser.h
// Function: option::Parser::StoreOptionAction::perform(option::Option&)
bool perform(Option& option)
  {
    if (bufmax < 0 || parser.op_count < bufmax)
    {
      if (parser.op_count == 0x7fffffff)
        return false; // overflow protection: don't accept number of options that doesn't fit signed int

      buffer[parser.op_count] = option;
      int idx = buffer[parser.op_count].desc->index;
      if (options[idx])
        options[idx].append(buffer[parser.op_count]);
      else
        options[idx] = buffer[parser.op_count];
      ++parser.op_count;
    }
    return true; // NOTE: an option that is discarded because of a full buffer is not fatal
  }

// Assembly:
pushq %rbx
movq %rdi, %rbx
movl 0x20(%rdi), %ecx
testl %ecx, %ecx
js 0x3e97
movq 0x8(%rbx), %rdx
movb $0x1, %al
cmpl %ecx, (%rdx)
jge 0x3f5d
movq 0x8(%rbx), %rax
movslq (%rax), %rax
cmpq $0x7fffffff, %rax       # imm = 0x7FFFFFFF
jne 0x3ead
xorl %eax, %eax
jmp 0x3f5d
leaq (%rax,%rax,2), %rdi
shlq $0x4, %rdi
addq 0x18(%rbx), %rdi
movq 0x10(%rsi), %rax
movq 0x18(%rsi), %rdx
movq 0x20(%rsi), %rcx
movq %rax, %rsi
callq 0x3e2c
movq 0x18(%rbx), %rdx
movq 0x8(%rbx), %rax
movq 0x10(%rbx), %rcx
movslq (%rax), %rax
leaq (%rax,%rax,2), %rsi
shlq $0x4, %rsi
leaq (%rdx,%rsi), %rax
movq 0x10(%rdx,%rsi), %rsi
movslq (%rsi), %rdx
leaq (%rdx,%rdx,2), %rdx
shlq $0x4, %rdx
leaq (%rcx,%rdx), %rdi
testq %rcx, %rcx
je 0x3f48
cmpq $0x0, 0x10(%rcx,%rdx)
je 0x3f48
movq %rdi, %rcx
movq 0x8(%rcx), %rcx
testb $0x1, %cl
je 0x3f0c
movq %rdi, %rdx
movq 0x8(%rdi), %rdi
testb $0x1, %dil
je 0x3f15
testq %rsi, %rsi
cmoveq %rsi, %rax
andq $-0x2, %rcx
movq %rax, (%rcx)
movq %rcx, 0x8(%rax)
movq %rdx, %rcx
orq $0x1, %rcx
movq %rcx, (%rax)
orq $0x1, %rax
movq %rax, 0x8(%rdx)
jmp 0x3f55
movq 0x18(%rax), %rdx
movq 0x20(%rax), %rcx
callq 0x3e2c
movq 0x8(%rbx), %rax
incl (%rax)
movb $0x1, %al
popq %rbx
retq
nop
// File: /workspace/github_cpp_makefile_star2_O1/jaudoux[P]countTags/src/optionparser.h
// Function: option::PrintUsageImplementation::LinePartIterator::nextTable()
bool nextTable()
    {
      // If this is NOT the first time nextTable() is called after the constructor,
      // then skip to the next table break (i.e. a Descriptor with help == 0)
      if (rowdesc != 0)
      {
        while (tablestart->help != 0 && tablestart->shortopt != 0)
          ++tablestart;
      }

      // Find the next table after the break (if any)
      while (tablestart->help == 0 && tablestart->shortopt != 0)
        ++tablestart;

      restartTable();
      return rowstart != 0;
    }

// Assembly:
cmpq $0x0, 0x8(%rdi)
je 0x47ca
movq (%rdi), %rax
cmpq $0x0, 0x20(%rax)
je 0x47ca
addq $0x28, %rax
cmpq $0x0, -0x20(%rax)
je 0x47ca
movq %rax, (%rdi)
cmpq $0x0, 0x20(%rax)
leaq 0x28(%rax), %rax
jne 0x47b5
movq (%rdi), %rax
movq 0x20(%rax), %rcx
testq %rcx, %rcx
jne 0x47fe
cmpq $0x0, 0x8(%rax)
je 0x47fe
addq $0x28, %rax
movq %rax, %rdx
movq %rdx, %rax
movq 0x20(%rdx), %rcx
testq %rcx, %rcx
jne 0x47fb
leaq 0x28(%rax), %rdx
cmpq $0x0, 0x8(%rax)
jne 0x47e4
movq %rax, (%rdi)
movq %rax, 0x8(%rdi)
movq %rcx, 0x10(%rdi)
movq $0x0, 0x18(%rdi)
testq %rcx, %rcx
setne %al
retq
nop
// File: /workspace/github_cpp_makefile_star2_O1/jaudoux[P]countTags/src/optionparser.h
// Function: option::PrintUsageImplementation::LinePartIterator::next()
bool next()
    {
      if (ptr == 0)
        return false;

      if (col == -1)
      {
        col = 0;
        update_length();
        return true;
      }

      ptr += len;
      while (true)
      {
        switch (*ptr)
        {
          case '\v':
            upmax(max_line_in_block, ++line_in_block);
            ++ptr;
            break;
          case '\t':
            if (!hit_target_line) // if previous column did not have the targetline
            { // then "insert" a 0-length part
              update_length();
              hit_target_line = true;
              return true;
            }

            hit_target_line = false;
            line_in_block = 0;
            ++col;
            ++ptr;
            break;
          case 0:
          case '\n':
            if (!hit_target_line) // if previous column did not have the targetline
            { // then "insert" a 0-length part
              update_length();
              hit_target_line = true;
              return true;
            }

            if (++target_line_in_block > max_line_in_block)
            {
              update_length();
              return false;
            }

            hit_target_line = false;
            line_in_block = 0;
            col = 0;
            ptr = rowstart;
            continue;
          default:
            ++ptr;
            continue;
        } // switch

        if (line_in_block == target_line_in_block)
        {
          update_length();
          hit_target_line = true;
          return true;
        }
      } // while
    }

// Assembly:
movq 0x18(%rdi), %rdx
testq %rdx, %rdx
je 0x48f3
pushq %rbx
movq %rdi, %rbx
cmpl $-0x1, 0x20(%rdi)
je 0x48f6
movslq 0x24(%rbx), %rax
addq %rax, %rdx
movq %rdx, 0x18(%rbx)
movl 0x20(%rbx), %edi
movq 0x10(%rbx), %rax
movb 0x38(%rbx), %r9b
movl 0x34(%rbx), %esi
movl 0x2c(%rbx), %ecx
movl 0x30(%rbx), %r8d
movzbl (%rdx), %r10d
cmpl $0x9, %r10d
jg 0x4884
testl %r10d, %r10d
je 0x488a
cmpl $0x9, %r10d
jne 0x48bb
testb $0x1, %r9b
je 0x48e5
movb $0x0, 0x38(%rbx)
movl $0x0, 0x30(%rbx)
incl %edi
movl %edi, 0x20(%rbx)
xorl %r8d, %r8d
xorl %r9d, %r9d
jmp 0x48d5
cmpl $0xa, %r10d
jne 0x48b5
testb $0x1, %r9b
je 0x48e5
leal 0x1(%rsi), %edi
movl %edi, 0x34(%rbx)
cmpl %ecx, %esi
jge 0x4909
movb $0x0, 0x38(%rbx)
xorl %r8d, %r8d
movl %r8d, 0x30(%rbx)
movl %r8d, 0x20(%rbx)
movq %rax, %rdx
movl %edi, %esi
xorl %r9d, %r9d
xorl %edi, %edi
jmp 0x48be
cmpl $0xb, %r10d
je 0x48c4
incq %rdx
movq %rdx, 0x18(%rbx)
jmp 0x4851
incl %r8d
movl %r8d, 0x30(%rbx)
cmpl %r8d, %ecx
cmovlel %r8d, %ecx
movl %ecx, 0x2c(%rbx)
incq %rdx
movq %rdx, 0x18(%rbx)
cmpl %esi, %r8d
jne 0x4851
movq %rbx, %rdi
callq 0x4ca2
movb $0x1, 0x38(%rbx)
jmp 0x4905
xorl %eax, %eax
retq
movl $0x0, 0x20(%rbx)
movq %rbx, %rdi
callq 0x4ca2
movb $0x1, %al
jmp 0x4913
movq %rbx, %rdi
callq 0x4ca2
xorl %eax, %eax
popq %rbx
retq
nop
// File: /workspace/github_cpp_makefile_star2_O1/jaudoux[P]countTags/src/optionparser.h
// Function: option::PrintUsageImplementation::indent(option::PrintUsageImplementation::IStringWriter&, int&, int)
static void indent(IStringWriter& write, int& x, int want_x)
  {
    int indent = want_x - x;
    if (indent < 0)
    {
      write("\n", 1);
      indent = want_x;
    }

    if (indent > 0)
    {
      char space = ' ';
      for (int i = 0; i < indent; ++i)
        write(&space, 1);
      x = want_x;
    }
  }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x10, %rsp
movl %edx, %ebx
movq %rsi, %r14
movq %rdi, %r15
movl %edx, %ebp
subl (%rsi), %ebp
jns 0x4946
movq (%r15), %rax
leaq 0x292a(%rip), %rsi      # 0x7264
movq %r15, %rdi
movl $0x1, %edx
callq *(%rax)
movl %ebx, %ebp
testl %ebp, %ebp
jle 0x496b
leaq 0xf(%rsp), %r12
movb $0x20, (%r12)
movq (%r15), %rax
movq %r15, %rdi
movq %r12, %rsi
movl $0x1, %edx
callq *(%rax)
decl %ebp
jne 0x4954
movl %ebx, (%r14)
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/jaudoux[P]countTags/src/optionparser.h
// Function: option::PrintUsageImplementation::LinePartIterator::update_length()
void update_length()
    {
      screenlen = 0;
      for (len = 0; ptr[len] != 0 && ptr[len] != '\v' && ptr[len] != '\t' && ptr[len] != '\n'; ++len)
      {
        ++screenlen;
        unsigned ch = (unsigned char) ptr[len];
        if (ch > 0xC1) // everything <= 0xC1 (yes, even 0xC1 itself) is not a valid UTF-8 start byte
        {
          // int __builtin_clz (unsigned int x)
          // Returns the number of leading 0-bits in x, starting at the most significant bit
          unsigned mask = (unsigned) -1 >> __builtin_clz(ch ^ 0xff);
          ch = ch & mask; // mask out length bits, we don't verify their correctness
          while (((unsigned char) ptr[len + 1] ^ 0x80) <= 0x3F) // while next byte is continuation byte
          {
            ch = (ch << 6) ^ (unsigned char) ptr[len + 1] ^ 0x80; // add continuation to char code
            ++len;
          }
          // ch is the decoded unicode code point
          if (ch >= 0x1100 && isWideChar(ch)) // the test for 0x1100 is here to avoid the function call in the Latin case
            ++screenlen;
        }
      }
    }

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movq %rdi, %rbx
movl $0x0, 0x28(%rdi)
xorl %ecx, %ecx
movl $0x80, %ebp
movl $0xe01, %r14d           # imm = 0xE01
movl %ecx, 0x24(%rbx)
movq 0x18(%rbx), %rax
movslq %ecx, %rcx
movzbl (%rax,%rcx), %edx
cmpl $0xb, %edx
ja 0x4cd6
btl %edx, %r14d
jb 0x4d4f
incl 0x28(%rbx)
movzbl (%rax,%rcx), %edi
cmpl $0xc2, %edi
jb 0x4d45
movl %edi, %ecx
xorl $0xff, %ecx
bsrl %ecx, %ecx
notl %ecx
shll %cl, %edi
shrl %cl, %edi
movslq 0x24(%rbx), %rsi
movzbl 0x1(%rax,%rsi), %ecx
movl %ecx, %edx
xorl $0x80, %edx
cmpl $0x3f, %edx
ja 0x4d31
leal 0x1(%rsi), %edx
addq %rsi, %rax
addq $0x2, %rax
shll $0x6, %edi
xorl %ecx, %edi
xorl %ebp, %edi
movl %edx, 0x24(%rbx)
movzbl (%rax), %ecx
movl %ecx, %esi
xorl %ebp, %esi
incl %edx
incq %rax
cmpl $0x40, %esi
jb 0x4d16
cmpl $0x1100, %edi           # imm = 0x1100
jb 0x4d45
callq 0x4d54
testb %al, %al
je 0x4d45
incl 0x28(%rbx)
movl 0x24(%rbx), %ecx
incl %ecx
jmp 0x4cbd
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/jaudoux[P]countTags/src/optionparser.h
// Function: option::PrintUsageImplementation::LineWrapper::write_one_line(option::PrintUsageImplementation::IStringWriter&)
void write_one_line(IStringWriter& write)
    {
      if (wrote_something) // if we already wrote something, we need to start a new line
      {
        write("\n", 1);
        int _ = 0;
        indent(write, _, x);
      }

      if (!buf_empty())
      {
        buf_next();
        write(datbuf[tail], lenbuf[tail]);
      }

      wrote_something = true;
    }

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %rbx
cmpb $0x1, 0xd0(%rdi)
jne 0x4e38
movq (%r14), %rax
leaq 0x244f(%rip), %rsi      # 0x7264
movq %r14, %rdi
movl $0x1, %edx
callq *(%rax)
leaq 0x4(%rsp), %rsi
movl $0x0, (%rsi)
movl 0xc0(%rbx), %edx
movq %r14, %rdi
callq 0x4916
movl 0xcc(%rbx), %eax
incl %eax
andl $0xf, %eax
cmpl 0xc8(%rbx), %eax
je 0x4e63
movl %eax, 0xcc(%rbx)
movl %eax, %eax
movq 0x40(%rbx,%rax,8), %rsi
movl (%rbx,%rax,4), %edx
movq (%r14), %rax
movq %r14, %rdi
callq *(%rax)
movb $0x1, 0xd0(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_cpp_makefile_star2_O1/jaudoux[P]countTags/src/CountsTable.cpp
// Function: CountsTable::getCount(unsigned long, unsigned int)
uint32_t CountsTable::getCount(uint64_t kmer, uint sample_id) {
  std::unordered_map<uint64_t,uint32_t*>::iterator it_counts = tags_counts.find(kmer);
  // If the tag is already in the hash, we set the count for this->sample
  if(it_counts != tags_counts.end()) {
    return it_counts->second[sample_id];
  } else {
    return 0;
  }
}

// Assembly:
pushq %rbx
movl %edx, %ecx
movq (%rdi), %r8
movq 0x8(%rdi), %r9
xorl %r11d, %r11d
movq %rsi, %rax
xorl %edx, %edx
divq %r9
movq (%r8,%rdx,8), %rax
testq %rax, %rax
je 0x5ac2
movq (%rax), %r10
movq %rax, %r11
cmpq %rsi, 0x8(%r10)
je 0x5ac2
movq %rdx, %rdi
movq %r10, %rbx
movq (%r10), %r10
testq %r10, %r10
je 0x5abf
movq 0x8(%r10), %r8
movq %r8, %rax
xorl %edx, %edx
divq %r9
movl $0x0, %r11d
cmpq %rdi, %rdx
jne 0x5ac2
movq %rbx, %r11
cmpq %rsi, %r8
jne 0x5a93
jmp 0x5ac2
xorl %r11d, %r11d
xorl %eax, %eax
testq %r11, %r11
je 0x5ace
movq (%r11), %rdx
jmp 0x5ad0
xorl %edx, %edx
testq %rdx, %rdx
je 0x5ade
movq 0x10(%rdx), %rax
movl %ecx, %ecx
movl (%rax,%rcx,4), %eax
popq %rbx
retq
// File: /workspace/github_cpp_makefile_star2_O1/jaudoux[P]countTags/src/CountsTable.cpp
// Function: CountsTable::setCount(unsigned long, unsigned int, unsigned int)
void CountsTable::setCount(uint64_t kmer, uint sample_id, uint value) {
  std::unordered_map<uint64_t,uint32_t*>::iterator it_counts = tags_counts.find(kmer);
  // If the tag is already in the hash, we set the count for this->sample
  if(it_counts != tags_counts.end()) {
    it_counts->second[sample_id] = value;
  // Otherwise we create a new entry
  } else {
    uint32_t * tag_counts = new uint32_t[this->nb_samples]();
    tag_counts[sample_id] = value;
    tags_counts[kmer] = tag_counts;
  }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x10, %rsp
movl %ecx, %ebx
movl %edx, %ebp
movq %rdi, %r14
movq %rsi, 0x8(%rsp)
movq (%rdi), %rdi
movq 0x8(%r14), %r8
xorl %r10d, %r10d
movq %rsi, %rax
xorl %edx, %edx
divq %r8
movq (%rdi,%rdx,8), %rax
testq %rax, %rax
je 0x5c49
movq (%rax), %r9
movq %rax, %r10
cmpq %rsi, 0x8(%r9)
je 0x5c49
movq %rdx, %rcx
movq %r9, %r11
movq (%r9), %r9
testq %r9, %r9
je 0x5c46
movq 0x8(%r9), %rdi
movq %rdi, %rax
xorl %edx, %edx
divq %r8
movl $0x0, %r10d
cmpq %rcx, %rdx
jne 0x5c49
movq %r11, %r10
cmpq %rsi, %rdi
jne 0x5c1a
jmp 0x5c49
xorl %r10d, %r10d
testq %r10, %r10
je 0x5c53
movq (%r10), %rax
jmp 0x5c55
xorl %eax, %eax
testq %rax, %rax
je 0x5c65
movq 0x10(%rax), %rax
movl %ebp, %ecx
movl %ebx, (%rax,%rcx,4)
jmp 0x5c9b
movl 0x50(%r14), %r15d
shlq $0x2, %r15
movq %r15, %rdi
callq 0x2030
movq %rax, %r12
movq %rax, %rdi
xorl %esi, %esi
movq %r15, %rdx
callq 0x20f0
movl %ebp, %eax
movl %ebx, (%r12,%rax,4)
leaq 0x8(%rsp), %rsi
movq %r14, %rdi
callq 0x63cc
movq %r12, (%rax)
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/jaudoux[P]countTags/src/CountsTable.cpp
// Function: CountsTable::printCounts(char)
void CountsTable::printCounts(char sep) {
  char *tag_seq = new char[this->kmer_length];
  std::unordered_map<uint64_t,uint32_t*>::iterator it_counts;

  /* Print Headers */
  std::cout << "tag";
  for (int s = 0; s < this->nb_samples; ++s) {
    std::cout << sep << this->sample_names[s];
  }
  std::cout << std::endl;

  /* Print Counts */
  for (it_counts = tags_counts.begin(); it_counts != tags_counts.end(); ++it_counts) {
    intToDNA(it_counts->first,this->kmer_length,tag_seq);
    std::cout << tag_seq;
    for (int s = 0; s < this->nb_samples; ++s) {
      std::cout << "\t" << it_counts->second[s];
    }
    std::cout << std::endl;
  }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %esi, %ebp
movq %rdi, %rbx
movl 0x54(%rdi), %edi
callq 0x2030
movq %rax, %r14
movq 0x4160(%rip), %r15      # 0x9fc8
leaq 0x1273(%rip), %rsi      # 0x70e2
movl $0x3, %edx
movq %r15, %rdi
callq 0x21c0
cmpl $0x0, 0x50(%rbx)
je 0x5eca
movl $0x8, %r12d
xorl %r13d, %r13d
movb %bpl, 0x7(%rsp)
movl $0x1, %edx
movq 0x412c(%rip), %rdi      # 0x9fc8
leaq 0x7(%rsp), %rsi
callq 0x21c0
movq 0x38(%rbx), %rcx
movq -0x8(%rcx,%r12), %rsi
movq (%rcx,%r12), %rdx
movq %rax, %rdi
callq 0x21c0
incq %r13
movl 0x50(%rbx), %eax
addq $0x20, %r12
cmpq %rax, %r13
jb 0x5e8b
movq (%r15), %rax
movq -0x18(%rax), %rdi
addq %r15, %rdi
movl $0xa, %esi
callq 0x2160
movsbl %al, %esi
movq %r15, %rdi
callq 0x2040
movq %rax, %rdi
callq 0x2110
movq 0x10(%rbx), %r13
testq %r13, %r13
je 0x5fad
leaq 0x11ec(%rip), %r12      # 0x70f1
movl 0x54(%rbx), %eax
testq %rax, %rax
je 0x5f31
movq 0x8(%r13), %rdx
leal (,%rdx,8), %ecx
movl $0x54474341, %esi       # imm = 0x54474341
shrl %cl, %esi
decq %rax
movl %eax, %ecx
movb %sil, (%r14,%rcx)
shrq $0x2, %rdx
testq %rax, %rax
jne 0x5f11
movq %r14, %rdi
callq 0x20c0
movq %r15, %rdi
movq %r14, %rsi
movq %rax, %rdx
callq 0x21c0
cmpl $0x0, 0x50(%rbx)
je 0x5f79
xorl %ebp, %ebp
movl $0x1, %edx
movq %r15, %rdi
movq %r12, %rsi
callq 0x21c0
movq 0x10(%r13), %rax
movl (%rax,%rbp,4), %esi
movq %r15, %rdi
callq 0x2100
incq %rbp
movl 0x50(%rbx), %eax
cmpq %rax, %rbp
jb 0x5f4f
movq (%r15), %rax
movq -0x18(%rax), %rdi
addq %r15, %rdi
movl $0xa, %esi
callq 0x2160
movsbl %al, %esi
movq %r15, %rdi
callq 0x2040
movq %rax, %rdi
callq 0x2110
movq (%r13), %r13
testq %r13, %r13
jne 0x5f05
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/jaudoux[P]countTags/src/dna.h
// Function: DNAtoInt(char const*, unsigned int, bool)
inline uint64_t DNAtoInt(const char *dna, uint32_t dna_length, bool stranded = false){
  uint64_t dna_int = 0;
  for (uint32_t i = 0; i< dna_length ; i++){
    dna_int <<= 2;
    dna_int |= convNuc(dna[i]);
  }
  // If the conversion is not "strand-specific" we calculate the reverse DNA it
  // and return the one that has the smallest value
  if(!stranded) {
    uint64_t rev_comp = intRevcomp(dna_int,dna_length);
    if(rev_comp < dna_int) {
      return rev_comp;
    }
  }
  return dna_int;
}

// Assembly:
pushq %rbx
testl %esi, %esi
je 0x6031
movl %esi, %eax
xorl %ecx, %ecx
movabsq $0x100000001, %r9       # imm = 0x100000001
movabsq $0x1000000010, %r10     # imm = 0x1000000010
movabsq $0x2000000020000, %r11  # imm = 0x2000000020000
xorl %r8d, %r8d
movzbl (%rdi,%rcx), %ebx
addl $-0x43, %ebx
cmpl $0x31, %ebx
ja 0x602d
btq %rbx, %r9
jb 0x6017
btq %rbx, %r10
jb 0x6010
btq %rbx, %r11
movl $0x0, %ebx
jae 0x601c
movl $0x3, %ebx
jmp 0x601c
movl $0x2, %ebx
jmp 0x601c
movl $0x1, %ebx
shlq $0x2, %r8
orq %rbx, %r8
incq %rcx
cmpq %rcx, %rax
jne 0x5fe6
jmp 0x6034
xorl %ebx, %ebx
jmp 0x601c
xorl %r8d, %r8d
testb %dl, %dl
jne 0x608b
leal (%rsi,%rsi), %ecx
movq $-0x1, %rax
movq $-0x1, %rdx
shlq %cl, %rdx
cmpl $0x20, %esi
notq %rdx
cmoveq %rax, %rdx
testl %esi, %esi
je 0x6084
xorq %r8, %rdx
movl $0x3, %edi
xorl %eax, %eax
xorl %ecx, %ecx
shlq $0x2, %rax
movq %rdi, %r9
andq %rdx, %r9
shrq %cl, %r9
orq %r9, %rax
shlq $0x2, %rdi
addq $0x2, %rcx
decl %esi
jne 0x6066
jmp 0x6086
xorl %eax, %eax
cmpq %r8, %rax
jb 0x608e
movq %r8, %rax
popq %rbx
retq
// File: /workspace/github_cpp_makefile_star2_O1/kuszmaul[P]6886/timers.cc
// Function: loop()
double loop(void) {
    for (size_t t = 0; t < N; t++) {
        for (size_t j = 0; j < N; j++) {
            x[j] += sin(x[j]);
        }
    }
    double sum = 0;
    for (size_t j = 0; j < N; j++) {
        sum += x[j];
    }
    return sum;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
xorl %r14d, %r14d
leaq 0x2e3f(%rip), %rbx      # 0x4080
xorl %r15d, %r15d
movsd (%r15,%rbx), %xmm0
callq 0x1040
addsd (%r15,%rbx), %xmm0
movsd %xmm0, (%r15,%rbx)
addq $0x8, %r15
cmpq $0x800, %r15            # imm = 0x800
jne 0x1244
incq %r14
cmpq $0x100, %r14            # imm = 0x100
jne 0x1241
xorpd %xmm0, %xmm0
xorl %eax, %eax
addsd (%rax,%rbx), %xmm0
addq $0x8, %rax
cmpq $0x800, %rax            # imm = 0x800
jne 0x127a
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O1/kuszmaul[P]6886/timers.cc
// Function: timeit_gettimeofday()
void timeit_gettimeofday(void) {
    struct timeval start, end;
    printf("gettimeofday:\n");
    statistics stats;
    for (int trial = 0; trial < n_trials; trial++) {
        init();
        gettimeofday(&start, NULL);
        loop();
        gettimeofday(&end,   NULL);
        double tim = tdiff_timeval(&start, &end);
        stats.measurement(tim);
        printf(" %12.9fs\n", tim);
    }
    stats.print();
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x48, %rsp
leaq 0xe2c(%rip), %rdi       # 0x20cf
callq 0x1090
xorpd %xmm3, %xmm3
cmpl $0x0, 0x2db5(%rip)      # 0x4068
xorpd %xmm4, %xmm4
xorpd %xmm0, %xmm0
xorpd %xmm1, %xmm1
xorpd %xmm2, %xmm2
jle 0x13ea
movsd %xmm0, 0x20(%rsp)
xorl %r12d, %r12d
leaq 0x38(%rsp), %rbx
leaq 0x28(%rsp), %r14
leaq 0xd3d(%rip), %r15       # 0x2020
movsd %xmm0, 0x10(%rsp)
movsd %xmm1, 0x18(%rsp)
movsd %xmm0, 0x8(%rsp)
callq 0x11f6
movq %rbx, %rdi
xorl %esi, %esi
callq 0x10a0
callq 0x1232
movq %r14, %rdi
xorl %esi, %esi
callq 0x10a0
movq 0x28(%rsp), %rax
movq 0x30(%rsp), %rcx
subq 0x38(%rsp), %rax
xorps %xmm1, %xmm1
cvtsi2sd %rax, %xmm1
subq 0x40(%rsp), %rcx
xorps %xmm0, %xmm0
cvtsi2sd %rcx, %xmm0
mulsd 0xcc9(%rip), %xmm0      # 0x2008
addsd %xmm1, %xmm0
movapd %xmm0, %xmm2
movapd %xmm0, %xmm1
testq %r12, %r12
je 0x1364
movapd %xmm0, %xmm2
minsd 0x18(%rsp), %xmm2
movapd %xmm0, %xmm1
maxsd 0x8(%rsp), %xmm1
movsd %xmm2, 0x18(%rsp)
movsd %xmm1, 0x8(%rsp)
movsd 0x10(%rsp), %xmm1
addsd %xmm0, %xmm1
movsd %xmm1, 0x10(%rsp)
movapd %xmm0, %xmm1
mulsd %xmm0, %xmm1
movsd 0x20(%rsp), %xmm2
addsd %xmm1, %xmm2
movsd %xmm2, 0x20(%rsp)
incq %r12
movq %r15, %rdi
movb $0x1, %al
callq 0x1030
movsd 0x18(%rsp), %xmm3
movsd 0x8(%rsp), %xmm2
movapd %xmm2, %xmm0
movapd %xmm3, %xmm1
cmpl %r12d, 0x2ca8(%rip)     # 0x4068
jg 0x12e9
xorps %xmm1, %xmm1
cvtsi2sd %r12, %xmm1
subsd %xmm3, %xmm2
mulsd 0xc3e(%rip), %xmm2      # 0x2018
movsd 0x10(%rsp), %xmm4
movsd 0x20(%rsp), %xmm0
xorpd %xmm3, %xmm3
divsd %xmm1, %xmm4
divsd %xmm1, %xmm0
movapd %xmm4, %xmm1
mulsd %xmm4, %xmm1
subsd %xmm1, %xmm0
ucomisd %xmm3, %xmm0
jb 0x140d
xorps %xmm1, %xmm1
sqrtsd %xmm0, %xmm1
jmp 0x142e
movsd %xmm4, 0x10(%rsp)
movsd %xmm2, 0x8(%rsp)
callq 0x1070
movsd 0x8(%rsp), %xmm2
movsd 0x10(%rsp), %xmm4
movapd %xmm0, %xmm1
divsd %xmm4, %xmm2
leaq 0xc61(%rip), %rdi       # 0x209a
movapd %xmm4, %xmm0
movb $0x3, %al
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
jmp 0x1030
// File: /workspace/github_cpp_makefile_star2_O1/kuszmaul[P]6886/timers.cc
// Function: timeit_clock_gettime(int, char const*)
void timeit_clock_gettime(clockid_t clk_id, const char *string) {
    struct timespec start, end;
    printf("%s\n", string);
    statistics stats;
    for (int trial = 0; trial < n_trials; trial++) {
        init();
        clock_gettime(clk_id, &start);
        loop();
        clock_gettime(clk_id, &end);
        double tim = tdiff_timespec(&start, &end);
        stats.measurement(tim);
        printf(" %12.9fs\n", tim);
    }
    stats.print();
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x40, %rsp
movl %edi, %ebx
movq %rsi, %rdi
callq 0x1090
xorpd %xmm3, %xmm3
cmpl $0x0, 0x2bf7(%rip)      # 0x4068
xorpd %xmm4, %xmm4
xorpd %xmm0, %xmm0
xorpd %xmm1, %xmm1
xorpd %xmm2, %xmm2
jle 0x15a4
movsd %xmm0, 0x18(%rsp)
xorl %r13d, %r13d
leaq 0x30(%rsp), %r14
leaq 0x20(%rsp), %r15
leaq 0xb7f(%rip), %r12       # 0x2020
movsd %xmm0, 0x8(%rsp)
movsd %xmm1, 0x10(%rsp)
movsd %xmm0, (%rsp)
callq 0x11f6
movl %ebx, %edi
movq %r14, %rsi
callq 0x1080
callq 0x1232
movl %ebx, %edi
movq %r15, %rsi
callq 0x1080
movq 0x20(%rsp), %rax
movq 0x28(%rsp), %rcx
subq 0x30(%rsp), %rax
xorps %xmm1, %xmm1
cvtsi2sd %rax, %xmm1
subq 0x38(%rsp), %rcx
xorps %xmm0, %xmm0
cvtsi2sd %rcx, %xmm0
mulsd 0xb14(%rip), %xmm0      # 0x2010
addsd %xmm1, %xmm0
movapd %xmm0, %xmm2
movapd %xmm0, %xmm1
testq %r13, %r13
je 0x1520
movapd %xmm0, %xmm2
minsd 0x10(%rsp), %xmm2
movapd %xmm0, %xmm1
maxsd (%rsp), %xmm1
movsd %xmm2, 0x10(%rsp)
movsd %xmm1, (%rsp)
movsd 0x8(%rsp), %xmm1
addsd %xmm0, %xmm1
movsd %xmm1, 0x8(%rsp)
movapd %xmm0, %xmm1
mulsd %xmm0, %xmm1
movsd 0x18(%rsp), %xmm2
addsd %xmm1, %xmm2
movsd %xmm2, 0x18(%rsp)
incq %r13
movq %r12, %rdi
movb $0x1, %al
callq 0x1030
movsd 0x10(%rsp), %xmm3
movsd (%rsp), %xmm2
movapd %xmm2, %xmm0
movapd %xmm3, %xmm1
cmpl %r13d, 0x2aee(%rip)     # 0x4068
jg 0x14a7
xorps %xmm1, %xmm1
cvtsi2sd %r13, %xmm1
subsd %xmm3, %xmm2
mulsd 0xa84(%rip), %xmm2      # 0x2018
movsd 0x8(%rsp), %xmm4
movsd 0x18(%rsp), %xmm0
xorpd %xmm3, %xmm3
divsd %xmm1, %xmm4
divsd %xmm1, %xmm0
movapd %xmm4, %xmm1
mulsd %xmm4, %xmm1
subsd %xmm1, %xmm0
ucomisd %xmm3, %xmm0
jb 0x15c7
xorps %xmm1, %xmm1
sqrtsd %xmm0, %xmm1
jmp 0x15e6
movsd %xmm4, 0x8(%rsp)
movsd %xmm2, (%rsp)
callq 0x1070
movsd (%rsp), %xmm2
movsd 0x8(%rsp), %xmm4
movapd %xmm0, %xmm1
divsd %xmm4, %xmm2
leaq 0xaa9(%rip), %rdi       # 0x209a
movapd %xmm4, %xmm0
movb $0x3, %al
callq 0x1030
addq $0x40, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O1/kuszmaul[P]6886/timers.cc
// Function: main
int main(int argc __attribute__((unused)), const char *argv[] __attribute__((unused))) {

    timeit_gettimeofday();
    CGT(REALTIME);
    CGT(MONOTONIC);
    CGT(REALTIME_COARSE);
    CGT(MONOTONIC);
    CGT(MONOTONIC_COARSE);
    CGT(MONOTONIC_RAW);
    CGT(BOOTTIME);
    CGT(PROCESS_CPUTIME_ID);
    CGT(THREAD_CPUTIME_ID);
    return 0;
}

// Assembly:
pushq %rbx
callq 0x1291
leaq 0xa13(%rip), %rsi       # 0x202a
xorl %edi, %edi
callq 0x144f
leaq 0xa0e(%rip), %rbx       # 0x2033
movl $0x1, %edi
movq %rbx, %rsi
callq 0x144f
leaq 0xa04(%rip), %rsi       # 0x203d
movl $0x5, %edi
callq 0x144f
movl $0x1, %edi
movq %rbx, %rsi
callq 0x144f
leaq 0x9f6(%rip), %rsi       # 0x204d
movl $0x6, %edi
callq 0x144f
leaq 0x9f6(%rip), %rsi       # 0x205e
movl $0x4, %edi
callq 0x144f
leaq 0x9f3(%rip), %rsi       # 0x206c
movl $0x7, %edi
callq 0x144f
leaq 0x9eb(%rip), %rsi       # 0x2075
movl $0x2, %edi
callq 0x144f
leaq 0x9ed(%rip), %rsi       # 0x2088
movl $0x3, %edi
callq 0x144f
xorl %eax, %eax
popq %rbx
retq
// File: /workspace/github_cpp_makefile_star2_O1/lszp[P]SmallWebServer/timer/lst_timer.cpp
// Function: sort_timer_lst::add_timer(util_timer*)
void sort_timer_lst::add_timer(util_timer *timer)
{
    if (!timer)
    {
        return;
    }
    if (!head)
    {
        head = tail = timer;
        return;
    }
    if (timer->expire < head->expire)
    {
        timer->next = head;
        head->prev = timer;
        head = timer;
        return;
    }
    add_timer(timer, head);
}

// Assembly:
testq %rsi, %rsi
je 0x3f84
movq (%rdi), %rax
testq %rax, %rax
je 0x3f7d
movq (%rsi), %rcx
cmpq (%rax), %rcx
jge 0x3f5b
movq %rax, 0x20(%rsi)
movq %rsi, 0x18(%rax)
jmp 0x3f81
movq %rax, %rdx
movq 0x20(%rax), %rax
testq %rax, %rax
je 0x3f85
cmpq (%rax), %rcx
jge 0x3f5b
movq %rsi, 0x20(%rdx)
movq %rax, 0x20(%rsi)
movq %rsi, 0x18(%rax)
movq %rdx, 0x18(%rsi)
retq
movq %rsi, 0x8(%rdi)
movq %rsi, (%rdi)
retq
movq %rsi, 0x20(%rdx)
movq %rdx, 0x18(%rsi)
movq $0x0, 0x20(%rsi)
movq %rsi, 0x8(%rdi)
retq
// File: /workspace/github_cpp_makefile_star2_O1/lszp[P]SmallWebServer/timer/lst_timer.cpp
// Function: sort_timer_lst::adjust_timer(util_timer*)
void sort_timer_lst::adjust_timer(util_timer *timer)
{
    if (!timer)
    {
        return;
    }
    util_timer *tmp = timer->next;
    if (!tmp || (timer->expire < tmp->expire))
    {
        return;
    }
    if (timer == head)
    {
        head = head->next;
        head->prev = NULL;
        timer->next = NULL;
        add_timer(timer, head);
    }
    else
    {
        timer->prev->next = timer->next;
        timer->next->prev = timer->prev;
        add_timer(timer, timer->next);
    }
}

// Assembly:
testq %rsi, %rsi
je 0x4081
movq 0x20(%rsi), %rcx
testq %rcx, %rcx
je 0x4081
movq (%rsi), %rax
cmpq (%rcx), %rax
jl 0x4081
movq (%rdi), %rdx
cmpq %rsi, %rdx
je 0x4030
movq 0x18(%rsi), %r8
movq %rcx, 0x20(%r8)
movq 0x20(%rsi), %rdx
movq %r8, 0x18(%rdx)
movq %rdx, %rcx
movq 0x20(%rdx), %rdx
testq %rdx, %rdx
je 0x4063
cmpq (%rdx), %rax
jge 0x400e
movq %rsi, 0x20(%rcx)
movq %rdx, 0x20(%rsi)
movq %rsi, 0x18(%rdx)
movq %rcx, 0x18(%rsi)
retq
movq 0x20(%rdx), %rcx
movq %rcx, (%rdi)
xorl %edx, %edx
movq %rdx, 0x18(%rcx)
movq %rdx, 0x20(%rsi)
movq %rcx, %rdx
movq 0x20(%rcx), %rcx
testq %rcx, %rcx
je 0x406d
cmpq (%rcx), %rax
jge 0x4041
movq %rsi, 0x20(%rdx)
movq %rcx, 0x20(%rsi)
movq %rsi, 0x18(%rcx)
movq %rdx, 0x18(%rsi)
retq
movq %rsi, 0x20(%rcx)
movq %rcx, 0x18(%rsi)
jmp 0x4075
movq %rsi, 0x20(%rdx)
movq %rdx, 0x18(%rsi)
movq $0x0, 0x20(%rsi)
movq %rsi, 0x8(%rdi)
retq
// File: /workspace/github_cpp_makefile_star2_O1/lszp[P]SmallWebServer/timer/lst_timer.cpp
// Function: sort_timer_lst::del_timer(util_timer*)
void sort_timer_lst::del_timer(util_timer *timer)
{
    if (!timer)
    {
        return;
    }
    if ((timer == head) && (timer == tail))
    {
        delete timer;
        head = NULL;
        tail = NULL;
        return;
    }
    if (timer == head)
    {
        head = head->next;
        head->prev = NULL;
        delete timer;
        return;
    }
    if (timer == tail)
    {
        tail = tail->prev;
        tail->next = NULL;
        delete timer;
        return;
    }
    timer->prev->next = timer->next;
    timer->next->prev = timer->prev;
    delete timer;
}

// Assembly:
pushq %rbx
testq %rsi, %rsi
je 0x4102
movq %rsi, %rax
movq %rdi, %rbx
movq (%rdi), %rcx
cmpq %rsi, %rcx
je 0x40b5
movq 0x8(%rbx), %rcx
cmpq %rax, %rcx
je 0x40d1
movq 0x18(%rax), %rcx
movq 0x20(%rax), %rdx
movq %rdx, 0x20(%rcx)
movq 0x20(%rax), %rdx
movq %rcx, 0x18(%rdx)
jmp 0x40e1
cmpq %rax, 0x8(%rbx)
je 0x40ef
cmpq %rax, %rcx
jne 0x4096
movq 0x20(%rcx), %rcx
movq %rcx, (%rbx)
movq $0x0, 0x18(%rcx)
jmp 0x40e1
movq 0x18(%rcx), %rcx
movq %rcx, 0x8(%rbx)
movq $0x0, 0x20(%rcx)
movl $0x28, %esi
movq %rax, %rdi
popq %rbx
jmp 0x3430
movl $0x28, %esi
movq %rax, %rdi
callq 0x3430
xorps %xmm0, %xmm0
movups %xmm0, (%rbx)
popq %rbx
retq
// File: /workspace/github_cpp_makefile_star2_O1/lszp[P]SmallWebServer/timer/lst_timer.cpp
// Function: sort_timer_lst::tick()
void sort_timer_lst::tick()
{
    if (!head)
    {
        return;
    }
    
    time_t cur = time(NULL);
    util_timer *tmp = head;
    while (tmp)
    {
        if (cur < tmp->expire)
        {
            break;
        }
        tmp->cb_func(tmp->user_data);
        head = tmp->next;
        if (head)
        {
            head->prev = NULL;
        }
        delete tmp;
        tmp = head;
    }
}

// Assembly:
cmpq $0x0, (%rdi)
je 0x415f
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %rbx
xorl %edi, %edi
callq 0x33d0
movq (%rbx), %r15
testq %r15, %r15
je 0x415a
movq %rax, %r14
cmpq (%r15), %r14
jl 0x415a
movq 0x10(%r15), %rdi
callq *0x8(%r15)
movq 0x20(%r15), %rax
movq %rax, (%rbx)
testq %rax, %rax
je 0x4145
movq $0x0, 0x18(%rax)
movl $0x28, %esi
movq %r15, %rdi
callq 0x3430
movq (%rbx), %r15
testq %r15, %r15
jne 0x4124
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O1/lszp[P]SmallWebServer/timer/lst_timer.cpp
// Function: Utils::setnonblocking(int)
int Utils::setnonblocking(int fd)
{
    int old_option = fcntl(fd, F_GETFL);  // fcntl 针对文件描述符提供控制。fd 是被参数cmd操作的描述符，F_GETFL返回正的进程ID
    int new_option = old_option | O_NONBLOCK;
    fcntl(fd, F_SETFL, new_option);
    return old_option;
}

// Assembly:
pushq %rbp
pushq %rbx
pushq %rax
movl %esi, %ebx
movl %esi, %edi
movl $0x3, %esi
xorl %eax, %eax
callq 0x3280
movl %eax, %ebp
movl %eax, %edx
orl $0x800, %edx            # imm = 0x800
movl %ebx, %edi
movl $0x4, %esi
xorl %eax, %eax
callq 0x3280
movl %ebp, %eax
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/lszp[P]SmallWebServer/timer/lst_timer.cpp
// Function: Utils::addfd(int, int, bool, int)
void Utils::addfd(int epollfd, int fd, bool one_shot, int TRIGMode)
{
    epoll_event event;
    event.data.fd = fd;

    if (1 == TRIGMode)
        event.events = EPOLLIN | EPOLLET | EPOLLRDHUP;  
        // 常用事件类型：EPOLLIN:文件描述符可读；EPOLLOUT:可写；EPOLLPRI:文件描述符有紧急数据可读；EPOLLERR：发生错误；EPOLLHUP:被挂断；EPOLLET:文件描述符有事发生。
    else
        event.events = EPOLLIN | EPOLLRDHUP;

    if (one_shot)
        event.events |= EPOLLONESHOT;
        // et模式需要循环读取，当在读取过程中，有新事件到达时，可能触发其他线程处理这个socket，这就乱了。EPOLL_ONESHOT就是用来避免这种情况，一个线程处理完一个socket数据
        // 也就是触发 EAGAIN errno时候，应该重置 EPOLL_ONESHOT 的 flag ，这时，新到的事件就可以重新进入触发流程了。
        // EPOLL_ONESHOT 原理：每次触发事件后，将事件注册从fd上删除，就不会再被追踪到，下次需要epoll_ctl的EPOLL_CTL_MOD来手动添加。

    epoll_ctl(epollfd, EPOLL_CTL_ADD, fd, &event);  // 该函数用于控制epoll文件描述符上的事件，可以注册事件（EPOLL_CTL_ADD）、修改事件（EPOLL_CTL_MOD）、删除事件（EPOLL_CTL_DEL）
    setnonblocking(fd);
}

// Assembly:
pushq %rbx
subq $0x10, %rsp
movl %edx, %ebx
movl %esi, %edi
leaq 0x4(%rsp), %rax
movl %edx, 0x4(%rax)
xorl %edx, %edx
cmpl $0x1, %r8d
setne %dl
shll $0x1f, %edx
shll $0x1e, %ecx
addl %edx, %ecx
addl $0x80002001, %ecx       # imm = 0x80002001
movl %ecx, (%rax)
movl $0x1, %esi
movl %ebx, %edx
movq %rax, %rcx
callq 0x35b0
movl %ebx, %edi
movl $0x3, %esi
xorl %eax, %eax
callq 0x3280
orl $0x800, %eax            # imm = 0x800
movl %ebx, %edi
movl $0x4, %esi
movl %eax, %edx
xorl %eax, %eax
callq 0x3280
addq $0x10, %rsp
popq %rbx
retq
// File: /workspace/github_cpp_makefile_star2_O1/lszp[P]SmallWebServer/timer/lst_timer.cpp
// Function: Utils::sig_handler(int)
void Utils::sig_handler(int sig)
{
    //为保证函数的可重入性，保留原来的errno
    int save_errno = errno;
    int msg = sig;
    send(u_pipefd[1], (char *)&msg, 1, 0);
    errno = save_errno;
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
subq $0x10, %rsp
movl %edi, %ebx
callq 0x3060
movq %rax, %r14
movl (%rax), %ebp
leaq 0xc(%rsp), %rsi
movl %ebx, (%rsi)
movq 0xa236(%rip), %rax      # 0xe458
movl 0x4(%rax), %edi
movl $0x1, %edx
xorl %ecx, %ecx
callq 0x31f0
movl %ebp, (%r14)
addq $0x10, %rsp
popq %rbx
popq %r14
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O1/lszp[P]SmallWebServer/timer/lst_timer.cpp
// Function: Utils::addsig(int, void (*)(int), bool)
void Utils::addsig(int sig, void(handler)(int), bool restart)
{
    struct sigaction sa;
    memset(&sa, '\0', sizeof(sa));
    sa.sa_handler = handler;
    if (restart)
        sa.sa_flags |= SA_RESTART;
    sigfillset(&sa.sa_mask);  // 将所有信号付给 sa_mask信号集中
    assert(sigaction(sig, &sa, NULL) != -1);  // sigaction()会依参数signum指定的信号编号来设置该信号的处理函数。参数signum可以指定SIGKILL和SIGSTOP以外的所有信号。
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x98, %rsp
movl %ecx, %ebp
movq %rdx, %r14
movl %esi, %ebx
movq %rsp, %r15
movl $0x98, %edx
movq %r15, %rdi
xorl %esi, %esi
callq 0x3260
movq %r14, (%r15)
testl %ebp, %ebp
je 0x4273
orb $0x10, 0x8b(%rsp)
leaq 0x8(%rsp), %rdi
callq 0x3110
movq %rsp, %rsi
movl %ebx, %edi
xorl %edx, %edx
callq 0x3550
cmpl $-0x1, %eax
je 0x429c
addq $0x98, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
leaq 0x5da2(%rip), %rdi      # 0xa045
leaq 0x5dbb(%rip), %rsi      # 0xa065
leaq 0x5dc8(%rip), %rcx      # 0xa079
movl $0xcc, %edx
callq 0x32d0
nop
// File: /workspace/github_cpp_makefile_star2_O1/lszp[P]SmallWebServer/timer/lst_timer.cpp
// Function: cb_func(client_data*)
void cb_func(client_data *user_data)
{
    epoll_ctl(Utils::u_epollfd, EPOLL_CTL_DEL, user_data->sockfd, 0);
    assert(user_data);
    close(user_data->sockfd);
    http_conn::m_user_count--;
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
movl 0xa15c(%rip), %edi      # 0xe460
movl 0x10(%rbx), %edx
movl $0x2, %esi
xorl %ecx, %ecx
callq 0x35b0
testq %rbx, %rbx
je 0x432b
movl 0x10(%rbx), %edi
callq 0x37b0
leaq 0xa1a1(%rip), %rax      # 0xe4c8
decl (%rax)
popq %rbx
retq
leaq 0x5d74(%rip), %rdi      # 0xa0a6
leaq 0x5d2c(%rip), %rsi      # 0xa065
leaq 0x5d70(%rip), %rcx      # 0xa0b0
movl $0xe3, %edx
callq 0x32d0
nop
// File: /workspace/github_cpp_makefile_star2_O1/lszp[P]SmallWebServer/http/http_conn.cpp
// Function: http_conn::initmysql_result(connection_pool*)
void http_conn::initmysql_result(connection_pool *connPool)
{
    //先从连接池中取一个连接
    MYSQL *mysql = NULL;
    connectionRAII mysqlcon(&mysql, connPool);

    //在user表中检索username，passwd数据，浏览器端输入
    if (mysql_query(mysql, "SELECT username,passwd FROM user"))  // 查询成功，返回0，否则，返回非零。
    {
        LOG_ERROR("SELECT error:%s\n", mysql_error(mysql));
    }

    //从表中检索完整的结果集
    MYSQL_RES *result = mysql_store_result(mysql);

    //返回结果集中的列数
    int num_fields = mysql_num_fields(result);

    //返回所有字段结构的数组
    MYSQL_FIELD *fields = mysql_fetch_fields(result);

    //从结果集中获取下一行，将对应的用户名和密码，存入map中
    while (MYSQL_ROW row = mysql_fetch_row(result))
    {
        string temp1(row[0]);
        string temp2(row[1]);
        users[temp1] = temp2;
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x68, %rsp
movq %rsi, %rdx
movq %rdi, %rbx
leaq 0x10(%rsp), %r14
movq $0x0, (%r14)
leaq 0x58(%rsp), %rdi
movq %r14, %rsi
callq 0x79b6
movq (%r14), %rdi
leaq 0x5e98(%rip), %rsi      # 0xa21b
callq 0x32e0
testl %eax, %eax
je 0x43cd
cmpl $0x0, 0xe38(%rbx)
jne 0x43cd
callq 0x629e
movq %rax, %rbx
movq 0x10(%rsp), %rdi
callq 0x3190
leaq 0x5e8e(%rip), %rdx      # 0xa23c
movq %rbx, %rdi
movl $0x3, %esi
movq %rax, %rcx
xorl %eax, %eax
callq 0x6df4
callq 0x629e
movq %rax, %rdi
callq 0x7216
movq 0x10(%rsp), %rdi
callq 0x3230
movq %rax, %rbx
movq %rax, %rdi
callq 0x3660
movq %rbx, %rdi
callq 0x3480
leaq 0x38(%rsp), %r14
leaq 0x18(%rsp), %r15
leaq 0xf(%rsp), %r12
leaq 0xa098(%rip), %r13      # 0xe498
movq %rbx, %rdi
callq 0x3440
movq %rax, %rbp
testq %rax, %rax
je 0x4485
movq (%rbp), %rsi
movq %r14, %rdi
movq %r15, %rdx
callq 0x630e
movq 0x8(%rbp), %rsi
movq %r15, %rdi
movq %r12, %rdx
callq 0x630e
movq %r13, %rdi
movq %r14, %rsi
callq 0x634c
movq %rax, %rdi
movq %r15, %rsi
callq 0x3250
movq 0x18(%rsp), %rdi
leaq 0x28(%rsp), %rax
cmpq %rax, %rdi
je 0x4460
movq 0x28(%rsp), %rsi
incq %rsi
callq 0x3430
movq 0x38(%rsp), %rdi
leaq 0x48(%rsp), %rax
cmpq %rax, %rdi
je 0x447c
movq 0x48(%rsp), %rsi
incq %rsi
callq 0x3430
testq %rbp, %rbp
jne 0x4400
leaq 0x58(%rsp), %rdi
callq 0x79dc
addq $0x68, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x44ad
jmp 0x44ad
jmp 0x44ad
jmp 0x44ad
jmp 0x44ad
movq %rax, %rbx
jmp 0x44d1
movq %rax, %rbx
jmp 0x44ed
movq %rax, %rbx
movq 0x18(%rsp), %rdi
leaq 0x28(%rsp), %rax
cmpq %rax, %rdi
je 0x44d1
movq 0x28(%rsp), %rsi
incq %rsi
callq 0x3430
movq 0x38(%rsp), %rdi
leaq 0x48(%rsp), %rax
cmpq %rax, %rdi
je 0x44ed
movq 0x48(%rsp), %rsi
incq %rsi
callq 0x3430
leaq 0x58(%rsp), %rdi
callq 0x79dc
movq %rbx, %rdi
callq 0x36e0
nop
// File: /workspace/github_cpp_makefile_star2_O1/lszp[P]SmallWebServer/http/http_conn.cpp
// Function: setnonblocking(int)
int setnonblocking(int fd)
{
    int old_option = fcntl(fd, F_GETFL);
    int new_option = old_option | O_NONBLOCK;
    fcntl(fd, F_SETFL, new_option);
    return old_option;
}

// Assembly:
pushq %rbp
pushq %rbx
pushq %rax
movl %edi, %ebx
movl $0x3, %esi
xorl %eax, %eax
callq 0x3280
movl %eax, %ebp
movl %eax, %edx
orl $0x800, %edx            # imm = 0x800
movl %ebx, %edi
movl $0x4, %esi
xorl %eax, %eax
callq 0x3280
movl %ebp, %eax
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/lszp[P]SmallWebServer/http/http_conn.cpp
// Function: addfd(int, int, bool, int)
void addfd(int epollfd, int fd, bool one_shot, int TRIGMode)
{
    epoll_event event;
    event.data.fd = fd;

    if (1 == TRIGMode)
        event.events = EPOLLIN | EPOLLET | EPOLLRDHUP;
    else
        event.events = EPOLLIN | EPOLLRDHUP;

    if (one_shot)
        event.events |= EPOLLONESHOT;
    epoll_ctl(epollfd, EPOLL_CTL_ADD, fd, &event);
    setnonblocking(fd);
}

// Assembly:
pushq %rbx
subq $0x10, %rsp
movl %esi, %ebx
leaq 0x4(%rsp), %rax
movl %esi, 0x4(%rax)
xorl %esi, %esi
cmpl $0x1, %ecx
setne %sil
shll $0x1f, %esi
shll $0x1e, %edx
leal (%rsi,%rdx), %ecx
addl $0x80002001, %ecx       # imm = 0x80002001
movl %ecx, (%rax)
movl $0x1, %esi
movl %ebx, %edx
movq %rax, %rcx
callq 0x35b0
movl %ebx, %edi
movl $0x3, %esi
xorl %eax, %eax
callq 0x3280
orl $0x800, %eax            # imm = 0x800
movl %ebx, %edi
movl $0x4, %esi
movl %eax, %edx
xorl %eax, %eax
callq 0x3280
addq $0x10, %rsp
popq %rbx
retq
// File: /workspace/github_cpp_makefile_star2_O1/lszp[P]SmallWebServer/http/http_conn.cpp
// Function: http_conn::close_conn(bool)
void http_conn::close_conn(bool real_close)
{
    if (real_close && (m_sockfd != -1))
    {
        printf("close %d\n", m_sockfd);
        removefd(m_epollfd, m_sockfd);
        m_sockfd = -1;
        m_user_count--;
    }
}

// Assembly:
testl %esi, %esi
je 0x48bb
pushq %rbp
pushq %rbx
pushq %rax
movq %rdi, %rbx
movl 0x14(%rdi), %esi
cmpl $-0x1, %esi
je 0x48b5
leaq 0x59e3(%rip), %rdi      # 0xa266
xorl %eax, %eax
callq 0x3070
movl 0x9bb0(%rip), %edi      # 0xe440
movl 0x14(%rbx), %ebp
movl $0x2, %esi
movl %ebp, %edx
xorl %ecx, %ecx
callq 0x35b0
movl %ebp, %edi
callq 0x37b0
movl $0xffffffff, 0x14(%rbx) # imm = 0xFFFFFFFF
decl 0x9c13(%rip)            # 0xe4c8
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/lszp[P]SmallWebServer/http/http_conn.cpp
// Function: http_conn::init(int, sockaddr_in const&, char*, int, int, int, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>)
void http_conn::init(int sockfd, const sockaddr_in &addr, char *root, int SQLVerify, int TRIGMode,
                     int close_log, string user, string passwd, string sqlname)
{
    m_sockfd = sockfd;
    m_address = addr;

    addfd(m_epollfd, sockfd, true, m_TRIGMode);
    m_user_count++;

    //当浏览器出现连接重置时，可能是网站根目录出错或http响应格式出错或者访问的文件中内容完全为空
    doc_root = root;
    m_SQLVerify = SQLVerify;
    m_TRIGMode = TRIGMode;
    m_close_log = close_log;

    strcpy(sql_user, user.c_str());
    strcpy(sql_passwd, passwd.c_str());
    strcpy(sql_name, sqlname.c_str());

    init();
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movl %r9d, %ebp
movl %r8d, %r14d
movq %rcx, %r15
movq %rdi, %rbx
movq 0x68(%rsp), %rax
movq %rax, 0x10(%rsp)
movq 0x60(%rsp), %rax
movq %rax, 0x8(%rsp)
movq 0x58(%rsp), %r12
movl 0x50(%rsp), %r13d
movl %esi, 0x14(%rdi)
movups (%rdx), %xmm0
movups %xmm0, 0x18(%rdi)
movl 0x9b3c(%rip), %edi      # 0xe440
movl 0xe34(%rbx), %ecx
movl $0x1, %edx
callq 0x47b6
incl 0x9bae(%rip)            # 0xe4c8
movq %r15, 0xdf8(%rbx)
movl %r14d, 0xe30(%rbx)
movl %ebp, 0xe34(%rbx)
movl %r13d, 0xe38(%rbx)
leaq 0xe3c(%rbx), %rdi
movq (%r12), %rsi
callq 0x33f0
leaq 0xea0(%rbx), %rdi
movq 0x8(%rsp), %rax
movq (%rax), %rsi
callq 0x33f0
leaq 0xf04(%rbx), %rdi
movq 0x10(%rsp), %rax
movq (%rax), %rsi
callq 0x33f0
movq $0x0, 0xdf0(%rbx)
xorl %eax, %eax
movl %eax, 0xde4(%rbx)
leaq 0x28(%rbx), %rdi
xorps %xmm0, %xmm0
movups %xmm0, (%rbx)
movl %eax, 0x10(%rbx)
movl $0xcfd, %edx            # imm = 0xCFD
xorl %esi, %esi
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x3260
nop