LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_cpp_makefile_star2_O1/BGI-Qingdao[P]ExtractNGSReads/utils/seq.cpp
// Function: BGIQD::SEQ::seq::Seq[abi:cxx11](int) const
std::string seq::Seq(int weight ) const
            {
                if( weight < 1 )
                    return atcgs ;
                else
                {
                    std::ostringstream ost;
                    int i = 1 ;
                    for( char c : atcgs)
                    {
                        ost<<c;
                        if( i % weight == 0 || i == (int)atcgs.size() )
                            ost<<'\n';
                        i++ ;
                    }
                    return ost.str();
                }
            }

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x198, %rsp            # imm = 0x198
movq %rsi, %r14
movq %rdi, %rbx
testl %edx, %edx
jle 0x9bbe
movl %edx, %r15d
movq %rbx, -0x40(%rbp)
leaq -0x1b8(%rbp), %rdi
callq 0x4330
movq %r14, -0x38(%rbp)
movq 0x8(%r14), %r14
testq %r14, %r14
je 0x9b8a
movq -0x38(%rbp), %rax
movq (%rax), %r13
xorl %r12d, %r12d
leaq -0x29(%rbp), %rbx
movb (%r13,%r12), %al
movb %al, -0x29(%rbp)
movl $0x1, %edx
leaq -0x1b8(%rbp), %rdi
movq %rbx, %rsi
callq 0x42d0
incq %r12
movl %r12d, %eax
xorl %edx, %edx
divl %r15d
testl %edx, %edx
je 0x9b6d
movq -0x38(%rbp), %rax
cmpl 0x8(%rax), %r12d
jne 0x9b85
movb $0xa, -0x29(%rbp)
movl $0x1, %edx
leaq -0x1b8(%rbp), %rdi
movq %rbx, %rsi
callq 0x42d0
cmpq %r12, %r14
jne 0x9b38
leaq -0x1b0(%rbp), %rsi
movq -0x40(%rbp), %rbx
movq %rbx, %rdi
callq 0x43d0
movq 0x642c(%rip), %rsi      # 0xffd0
leaq -0x1b8(%rbp), %rdi
callq 0x4150
leaq -0x148(%rbp), %rdi
callq 0x40d0
jmp 0x9bd7
leaq 0x10(%rbx), %rax
movq %rax, (%rbx)
movq (%r14), %rsi
movq 0x8(%r14), %rdx
addq %rsi, %rdx
movq %rbx, %rdi
callq 0x6e4c
movq %rbx, %rax
addq $0x198, %rsp            # imm = 0x198
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x9bee
movq %rax, %rbx
movq 0x63d8(%rip), %rsi      # 0xffd0
leaq -0x1b8(%rbp), %rdi
callq 0x4150
leaq -0x148(%rbp), %rdi
callq 0x40d0
movq %rbx, %rdi
callq 0x4450
// File: /workspace/github_cpp_makefile_star2_O1/BGI-Qingdao[P]ExtractNGSReads/utils/stringtools.cpp
// Function: BGIQD::STRING::split(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)
std::vector<std::string>  split( const std::string & str , const std::string & spliter ) 
    {
        std::vector<std::string> ret;
        std::string::size_type pos1 = 0;
        std::string::size_type pos2 = str.find(spliter);
        while( pos2 != str.npos )
        {
            auto item = str.substr( pos1 , pos2-pos1 ) ;
            if( ! item.empty() )
                ret.push_back( item );
            pos1 = pos2 + spliter.length() ;
            pos2 = str.find( spliter , pos1 ) ;
        }
        if( pos1 != str.length() )
        {
            ret.push_back(str.substr(pos1));
        }
        return ret ;
    }

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rdx, %r15
movq %rsi, %r14
xorps %xmm0, %xmm0
movups %xmm0, (%rdi)
movq %rdi, -0x30(%rbp)
movq $0x0, 0x10(%rdi)
movq (%rdx), %rsi
movq 0x8(%rdx), %rcx
xorl %r12d, %r12d
movq %r14, %rdi
xorl %edx, %edx
callq 0x4440
cmpq $-0x1, %rax
je 0x9d58
movq %rax, %r13
xorl %r12d, %r12d
leaq -0x50(%rbp), %rbx
movq %r13, %rcx
subq %r12, %rcx
movq %rbx, %rdi
movq %r14, %rsi
movq %r12, %rdx
callq 0x4290
cmpq $0x0, -0x48(%rbp)
je 0x9d25
movq -0x30(%rbp), %rdi
movq %rbx, %rsi
callq 0xa22a
movq (%r15), %rsi
movq 0x8(%r15), %rcx
movq %r13, %r12
addq %rcx, %r12
movq %r14, %rdi
movq %r12, %rdx
callq 0x4440
movq %rax, %r13
movq -0x50(%rbp), %rdi
leaq -0x40(%rbp), %rax
cmpq %rax, %rdi
je 0x9d52
callq 0x4240
cmpq $-0x1, %r13
jne 0x9cfe
cmpq 0x8(%r14), %r12
je 0x9d93
leaq -0x50(%rbp), %rdi
movq %r14, %rsi
movq %r12, %rdx
movq $-0x1, %rcx
callq 0x4290
leaq -0x50(%rbp), %rsi
movq -0x30(%rbp), %rdi
callq 0x6ee6
leaq -0x40(%rbp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x9d93
callq 0x4240
movq -0x30(%rbp), %rax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
leaq -0x40(%rbp), %rax
movq -0x10(%rax), %rdi
jmp 0x9dc0
jmp 0x9dcc
movq %rax, %rbx
movq -0x50(%rbp), %rdi
leaq -0x40(%rbp), %rax
cmpq %rax, %rdi
je 0x9dcf
callq 0x4240
jmp 0x9dcf
movq %rax, %rbx
movq -0x30(%rbp), %rdi
callq 0x7196
movq %rbx, %rdi
callq 0x4450
// File: /workspace/github_cpp_makefile_star2_O1/BGI-Qingdao[P]ExtractNGSReads/utils/stringtools.cpp
// Function: BGIQD::STRING::split(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, char const&)
std::vector<std::string>  split( const std::string & str , const char& spliter ) 
    {
        std::vector<std::string> ret;
        std::string::size_type pos1 = 0;
        std::string::size_type pos2 = str.find(spliter);
        while( pos2 != str.npos )
        {
            auto item = str.substr( pos1 , pos2-pos1 ) ;
            if( ! item.empty() )
                ret.push_back( item );
            pos1 = pos2 + 1 ;
            pos2 = str.find( spliter , pos1 ) ;
        }
        if( pos1 != str.length() )
        {
            ret.push_back(str.substr(pos1));
        }
        return ret ;
    }

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rdx, %r15
movq %rsi, %r14
xorps %xmm0, %xmm0
movups %xmm0, (%rdi)
movq %rdi, -0x30(%rbp)
movq $0x0, 0x10(%rdi)
movsbl (%rdx), %esi
xorl %r12d, %r12d
movq %r14, %rdi
xorl %edx, %edx
callq 0x4310
cmpq $-0x1, %rax
je 0x9e80
movq %rax, %r13
xorl %r12d, %r12d
leaq -0x50(%rbp), %rbx
movq %r13, %rcx
subq %r12, %rcx
movq %rbx, %rdi
movq %r14, %rsi
movq %r12, %rdx
callq 0x4290
cmpq $0x0, -0x48(%rbp)
je 0x9e50
movq -0x30(%rbp), %rdi
movq %rbx, %rsi
callq 0xa22a
movq %r13, %r12
incq %r12
movsbl (%r15), %esi
movq %r14, %rdi
movq %r12, %rdx
callq 0x4310
movq %rax, %r13
movq -0x50(%rbp), %rdi
leaq -0x40(%rbp), %rax
cmpq %rax, %rdi
je 0x9e7a
callq 0x4240
cmpq $-0x1, %r13
jne 0x9e29
cmpq 0x8(%r14), %r12
je 0x9ebb
leaq -0x50(%rbp), %rdi
movq %r14, %rsi
movq %r12, %rdx
movq $-0x1, %rcx
callq 0x4290
leaq -0x50(%rbp), %rsi
movq -0x30(%rbp), %rdi
callq 0x6ee6
leaq -0x40(%rbp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x9ebb
callq 0x4240
movq -0x30(%rbp), %rax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
leaq -0x40(%rbp), %rax
movq -0x10(%rax), %rdi
jmp 0x9ee8
jmp 0x9ef4
movq %rax, %rbx
movq -0x50(%rbp), %rdi
leaq -0x40(%rbp), %rax
cmpq %rax, %rdi
je 0x9ef7
callq 0x4240
jmp 0x9ef7
movq %rax, %rbx
movq -0x30(%rbp), %rdi
callq 0x7196
movq %rbx, %rdi
callq 0x4450
// File: /workspace/github_cpp_makefile_star2_O1/BGI-Qingdao[P]ExtractNGSReads/utils/stringtools.cpp
// Function: BGIQD::STRING::split(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)
std::vector<std::string>  split( const std::string & str) 
    {
        std::vector<std::string> ret;
        bool nb = false ;
        size_t nb_index = 0;
        for( size_t i = 0 ; i<str.size() ; i++ )
        {
            if( str[i] == ' ' || str[i] == '\n' || str[i] == '\r' || str[i] == '\t' )
            {
                if(nb)
                {
                    ret.push_back(str.substr(nb_index,i-nb_index));
                    nb = false ;
                }
            }
            else
            {
                if( !nb )
                {
                    nb =true ;
                    nb_index = i ;
                }
            }
        }
        if(nb)
        {
            ret.push_back(str.substr(nb_index,str.size() - nb_index));
            nb = false ;
        }
        return ret ;
    }

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rsi, %r14
xorps %xmm0, %xmm0
movups %xmm0, (%rdi)
movq %rdi, -0x30(%rbp)
movq $0x0, 0x10(%rdi)
movq 0x8(%rsi), %rcx
testq %rcx, %rcx
je 0xa0ea
xorl %r13d, %r13d
movabsq $0x100002600, %rbx      # imm = 0x100002600
leaq -0x50(%rbp), %r12
xorl %r15d, %r15d
xorl %eax, %eax
movq (%r14), %rcx
movzbl (%rcx,%r13), %ecx
cmpq $0x20, %rcx
ja 0xa0cb
btq %rcx, %rbx
jae 0xa0cb
testb $0x1, %al
je 0xa0dc
movq %r13, %rcx
subq %r15, %rcx
movq %r12, %rdi
movq %r14, %rsi
movq %r15, %rdx
callq 0x4290
movq -0x30(%rbp), %rdi
movq %r12, %rsi
callq 0x6ee6
movq -0x50(%rbp), %rdi
leaq -0x40(%rbp), %rax
cmpq %rax, %rdi
je 0xa0c7
callq 0x4240
xorl %eax, %eax
jmp 0xa0dc
testb $0x1, %al
movzbl %al, %eax
movl $0x1, %ecx
cmovel %ecx, %eax
cmoveq %r13, %r15
incq %r13
movq 0x8(%r14), %rcx
cmpq %rcx, %r13
jb 0xa07d
jmp 0xa0ef
xorl %eax, %eax
xorl %r15d, %r15d
testb $0x1, %al
je 0xa124
subq %r15, %rcx
leaq -0x50(%rbp), %rdi
movq %r14, %rsi
movq %r15, %rdx
callq 0x4290
leaq -0x50(%rbp), %rsi
movq -0x30(%rbp), %rdi
callq 0x6ee6
leaq -0x40(%rbp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0xa124
callq 0x4240
movq -0x30(%rbp), %rax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %r14
leaq -0x40(%rbp), %rax
movq -0x10(%rax), %rdi
jmp 0xa156
jmp 0xa146
movq %rax, %r14
jmp 0xa160
movq %rax, %r14
movq -0x50(%rbp), %rdi
leaq -0x40(%rbp), %rax
cmpq %rax, %rdi
je 0xa160
callq 0x4240
movq -0x30(%rbp), %rdi
callq 0x7196
movq %r14, %rdi
callq 0x4450
// File: /workspace/github_cpp_makefile_star2_O1/BGI-Qingdao[P]ExtractNGSReads/utils/stringtools.cpp
// Function: BGIQD::STRING::replace_all(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)
void replace_all( std::string &strBig,
            const std::string &strsrc,
            const std::string &strdst )
    {
        std::string::size_type pos = 0;
        std::string::size_type srclen = strsrc.size();
        std::string::size_type dstlen = strdst.size();

        while( (pos=strBig.find(strsrc, pos)) != std::string::npos )
        {
            strBig.replace( pos, srclen, strdst );
            pos += dstlen;
        }
    }

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %rbx
movq %rsi, %r14
movq %rdi, %r15
movq (%rsi), %rsi
movq 0x8(%r14), %r12
movq 0x8(%rdx), %rax
movq %rax, -0x30(%rbp)
xorl %edx, %edx
movq %r12, %rcx
callq 0x4440
cmpq $-0x1, %rax
je 0xa1de
movq %rax, %r13
movq (%rbx), %rcx
movq 0x8(%rbx), %r8
movq %r15, %rdi
movq %r13, %rsi
movq %r12, %rdx
callq 0x42c0
addq -0x30(%rbp), %r13
movq (%r14), %rsi
movq 0x8(%r14), %rcx
movq %r15, %rdi
movq %r13, %rdx
callq 0x4440
movq %rax, %r13
cmpq $-0x1, %rax
jne 0xa1aa
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/kdungs[P]codecon/src/rooms.cc
// Function: query(std::vector<Room, std::allocator<Room>> const&, unsigned int, unsigned int)
auto query(const std::vector<Room>& rooms, unsigned slot, unsigned nslots)
    -> std::vector<std::size_t> {
  auto roomsAvailable = std::vector<std::size_t>{};
  for (auto i = 0ul; i < rooms.size(); ++i) {
    if (rooms[i].available(slot, nslots)) {
      roomsAvailable.emplace_back(i);
    }
  }
  return roomsAvailable;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x10, %rsp
movq %rdi, %rbx
xorl %eax, %eax
movq %rax, 0x10(%rdi)
xorps %xmm0, %xmm0
movups %xmm0, (%rdi)
movq %rax, 0x8(%rsp)
movq (%rsi), %rax
cmpq %rax, 0x8(%rsi)
je 0x23b0
movl %ecx, %ebp
movl %edx, %r14d
movq %rsi, %r15
xorl %edi, %edi
leaq 0x8(%rsp), %r12
shlq $0x5, %rdi
addq %rax, %rdi
movl %r14d, %esi
movl %ebp, %edx
callq 0x28f8
testb %al, %al
je 0x2390
movq 0x8(%rbx), %rsi
cmpq 0x10(%rbx), %rsi
je 0x2385
movq 0x8(%rsp), %rax
movq %rax, (%rsi)
addq $0x8, %rsi
movq %rsi, 0x8(%rbx)
jmp 0x2390
movq %rbx, %rdi
movq %r12, %rdx
callq 0x2c12
movq 0x8(%rsp), %rdi
incq %rdi
movq %rdi, 0x8(%rsp)
movq (%r15), %rax
movq 0x8(%r15), %rcx
subq %rax, %rcx
sarq $0x5, %rcx
cmpq %rcx, %rdi
jb 0x2354
movq %rbx, %rax
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %r14
movq (%rbx), %rdi
testq %rdi, %rdi
je 0x23d7
movq 0x10(%rbx), %rsi
subq %rdi, %rsi
callq 0x2130
movq %r14, %rdi
callq 0x21a0
// File: /workspace/github_cpp_makefile_star2_O1/kdungs[P]codecon/src/rooms.cc
// Function: splitAtDash(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)
auto splitAtDash(const std::string& str) -> std::vector<unsigned> {
  std::vector<unsigned> result;
  std::stringstream ss{str};
  std::string tmp;
  while (getline(ss, tmp, '-')) {
    result.push_back(static_cast<unsigned>(std::stoul(tmp)));
  }
  return result;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x1b8, %rsp            # imm = 0x1B8
movq %rdi, %rbx
xorps %xmm0, %xmm0
movups %xmm0, (%rdi)
movq $0x0, 0x10(%rdi)
leaq 0x30(%rsp), %rdi
movl $0x18, %edx
callq 0x2170
leaq 0x18(%rsp), %rax
movq %rax, -0x10(%rax)
movq $0x0, -0x8(%rax)
movb $0x0, (%rax)
leaq 0x30(%rsp), %r14
leaq 0x8(%rsp), %r15
movq %r14, %rdi
movq %r15, %rsi
movl $0x2d, %edx
callq 0x21b0
movq (%rax), %rcx
movq -0x18(%rcx), %rcx
testb $0x5, 0x20(%rax,%rcx)
jne 0x24c0
movq 0x8(%rsp), %r13
callq 0x2030
movq %rax, %rbp
movl (%rax), %r12d
movl $0x0, (%rax)
movq %r13, %rdi
leaq 0x28(%rsp), %rsi
movl $0xa, %edx
callq 0x2050
cmpq %r13, 0x28(%rsp)
je 0x250f
movl (%rbp), %ecx
testl %ecx, %ecx
je 0x2490
cmpl $0x22, %ecx
jne 0x2494
jmp 0x251b
movl %r12d, (%rbp)
movl %eax, 0x4(%rsp)
movq 0x8(%rbx), %rsi
cmpq 0x10(%rbx), %rsi
je 0x24ae
movl %eax, (%rsi)
addq $0x4, %rsi
movq %rsi, 0x8(%rbx)
jmp 0x242e
movq %rbx, %rdi
leaq 0x4(%rsp), %rdx
callq 0x2d4e
jmp 0x242e
movq 0x8(%rsp), %rdi
leaq 0x18(%rsp), %rax
cmpq %rax, %rdi
je 0x24dc
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x2130
movq 0x2acd(%rip), %rsi      # 0x4fb0
leaq 0x30(%rsp), %rdi
callq 0x20e0
leaq 0xb0(%rsp), %rdi
callq 0x2060
movq %rbx, %rax
addq $0x1b8, %rsp            # imm = 0x1B8
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0xb7a(%rip), %rdi       # 0x3090
callq 0x20b0
leaq 0xb6e(%rip), %rdi       # 0x3090
callq 0x2150
movq %rax, %r14
jmp 0x257a
jmp 0x252e
movq %rax, %r14
jmp 0x2540
movq %rax, %r14
cmpl $0x0, (%rbp)
jne 0x2540
movl %r12d, (%rbp)
movq 0x8(%rsp), %rdi
leaq 0x18(%rsp), %rax
cmpq %rax, %rdi
je 0x255c
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x2130
movq 0x2a4d(%rip), %rsi      # 0x4fb0
leaq 0x30(%rsp), %rdi
callq 0x20e0
leaq 0xb0(%rsp), %rdi
callq 0x2060
movq (%rbx), %rdi
testq %rdi, %rdi
je 0x258e
movq 0x10(%rbx), %rsi
subq %rdi, %rsi
callq 0x2130
movq %r14, %rdi
callq 0x21a0
// File: /workspace/github_cpp_makefile_star2_O1/kdungs[P]codecon/src/rooms.cc
// Function: Room::available(unsigned int, unsigned int) const
auto available(unsigned slot, unsigned nslots) const noexcept -> bool {
    assert(slot + nslots < NUM_SLOTS);
    return std::all_of(std::begin(slots_) + slot,
                       std::begin(slots_) + slot + nslots,
                       [](bool x) { return !x; });
  }

// Assembly:
pushq %rbx
leal (%rdx,%rsi), %eax
cmpl $0x20, %eax
jae 0x291b
movl %esi, %eax
addq %rax, %rdi
movl %edx, %ebx
addq %rdi, %rbx
movq %rbx, %rsi
callq 0x2b00
cmpq %rbx, %rax
sete %al
popq %rbx
retq
leaq 0x710(%rip), %rdi       # 0x3032
leaq 0x723(%rip), %rsi       # 0x304c
leaq 0x729(%rip), %rcx       # 0x3059
movl $0x1a, %edx
callq 0x20c0
movq %rax, %rdi
callq 0x2af5
// File: /workspace/github_cpp_makefile_star2_O1/kdungs[P]codecon/src/rooms.cc
// Function: Room::book(unsigned int, unsigned int)
auto book(unsigned start, unsigned nslots) -> bool {
    assert(start + nslots <= NUM_SLOTS);
    if (std::any_of(std::begin(slots_) + start,
                    std::begin(slots_) + start + nslots,
                    [](bool x) { return x; })) {
      return false;
    }

    std::fill_n(std::begin(slots_) + start, nslots, true);
    return true;
  }

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movl %edx, %r14d
leal (%r14,%rsi), %eax
cmpl $0x21, %eax
jae 0x2ad6
movq %rdi, %rbx
movl %esi, %eax
addq %rax, %rbx
movl %r14d, %r12d
leaq (%rbx,%r12), %r15
movq %rbx, %rdi
movq %r15, %rsi
callq 0x2b89
movq %rax, %r13
cmpq %r15, %rax
setne %al
testl %r14d, %r14d
sete %cl
orb %al, %cl
jne 0x2ac6
movq %rbx, %rdi
movl $0x1, %esi
movq %r12, %rdx
callq 0x20a0
cmpq %r15, %r13
sete %al
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
leaq 0x5b9(%rip), %rdi       # 0x3096
leaq 0x568(%rip), %rsi       # 0x304c
leaq 0x5c7(%rip), %rcx       # 0x30b2
movl $0xe, %edx
callq 0x20c0
// File: /workspace/github_cpp_makefile_star2_O1/vividvilla[P]hackerrank/src/quicksort2.cpp
// Function: main
int main() {
    int n, x;
    vector <int> v;

    cin >> n;
    for (int i = 0; i < n; i++) {
        cin >> x;
        v.push_back(x);
    }

    quickSort(v);

    return 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x28, %rsp
xorps %xmm0, %xmm0
movaps %xmm0, 0x10(%rsp)
movq $0x0, 0x20(%rsp)
movq 0x2afd(%rip), %rdi      # 0x3fe0
leaq 0x8(%rsp), %rsi
callq 0x1060
cmpl $0x0, 0x8(%rsp)
jle 0x1542
xorl %ebp, %ebp
movq 0x2ae3(%rip), %rbx      # 0x3fe0
leaq 0xc(%rsp), %r14
leaq 0x10(%rsp), %r15
movq %rbx, %rdi
movq %r14, %rsi
callq 0x1060
movq 0x18(%rsp), %rsi
cmpq 0x20(%rsp), %rsi
je 0x152f
movl 0xc(%rsp), %eax
movl %eax, (%rsi)
addq $0x4, %rsi
movq %rsi, 0x18(%rsp)
jmp 0x153a
movq %r15, %rdi
movq %r14, %rdx
callq 0x15a4
incl %ebp
cmpl 0x8(%rsp), %ebp
jl 0x1507
leaq 0x10(%rsp), %rdi
movq 0x8(%rdi), %rdx
subq (%rdi), %rdx
shrq $0x2, %rdx
decl %edx
xorl %esi, %esi
callq 0x125c
movq 0x10(%rsp), %rdi
testq %rdi, %rdi
je 0x1572
movq 0x20(%rsp), %rsi
subq %rdi, %rsi
callq 0x10c0
xorl %eax, %eax
addq $0x28, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
jmp 0x1581
movq %rax, %rbx
movq 0x10(%rsp), %rdi
testq %rdi, %rdi
je 0x159b
movq 0x20(%rsp), %rsi
subq %rdi, %rsi
callq 0x10c0
movq %rbx, %rdi
callq 0x1110
nop
// File: /workspace/github_cpp_makefile_star2_O1/grogers0[P]dots_and_boxes/BruteForce.cpp
// Function: brute_force(Board const&)
void brute_force(const Board &oldboard)
{
    std::vector<Edge> edges;

    std::for_each(oldboard.edge_begin(), oldboard.edge_end(), [&] (Edge edge)
            { if (oldboard.is_move_valid(edge)) edges.push_back(edge); });

    std::vector<std::pair<Edge, short>> table;
    table.resize(((unsigned long)1) << oldboard.num_edges(), std::make_pair(Edge(), SHRT_MAX));
    table.back().second = 0; // initialize the final state

    std::sort(edges.begin(), edges.end());
    for (std::vector<Edge>::iterator middle = --edges.end();
            middle != edges.begin(); --middle) {
        do_brute_force_one_level(oldboard, table, edges.begin(), middle, edges.end());
    }

    do_brute_force_one_level(oldboard, table, edges.begin(), edges.begin(), edges.end());
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x48, %rsp
movq %rdi, %rbx
xorps %xmm0, %xmm0
movaps %xmm0, (%rsp)
movq $0x0, 0x10(%rsp)
movl (%rdi), %eax
movl 0x4(%rdi), %ecx
shlq $0x20, %rax
movq %rax, 0x20(%rsp)
movl %ecx, 0x28(%rsp)
xorl %eax, %eax
testb %al, %al
jne 0x473c
movq %rsp, %r14
leaq 0x40(%rsp), %r15
leaq 0x20(%rsp), %r12
movl 0x20(%rsp), %esi
movl %esi, 0x40(%rsp)
movq %rbx, %rdi
callq 0x271c
testb %al, %al
je 0x4721
movq 0x8(%rsp), %rsi
cmpq 0x10(%rsp), %rsi
je 0x4716
movl 0x40(%rsp), %eax
movl %eax, (%rsi)
addq $0x4, 0x8(%rsp)
jmp 0x4721
movq %r14, %rdi
movq %r15, %rdx
callq 0x4278
movq %r12, %rdi
callq 0x4210
movzwl 0x20(%rsp), %eax
cmpw $-0x2, %ax
setb %cl
orb %al, %cl
testb $0x1, %cl
jne 0x46e8
leaq 0x20(%rsp), %rdi
xorps %xmm0, %xmm0
movaps %xmm0, (%rdi)
movq $0x0, 0x10(%rdi)
movl (%rbx), %ecx
movl 0x4(%rbx), %eax
leal 0x1(%rax), %edx
imull %ecx, %edx
incl %ecx
imull %eax, %ecx
addl %edx, %ecx
movl $0x1, %esi
shlq %cl, %rsi
leaq 0x40(%rsp), %rdx
movl $0x0, (%rdx)
movw $0x7fff, 0x4(%rdx)      # imm = 0x7FFF
callq 0x492a
movq 0x28(%rsp), %rax
movw $0x0, -0x4(%rax)
movq (%rsp), %r14
movq 0x8(%rsp), %r15
cmpq %r15, %r14
je 0x47c5
movq %r15, %rax
subq %r14, %rax
sarq $0x2, %rax
bsrq %rax, %rdx
xorl $0x3f, %edx
addl %edx, %edx
xorq $0x7e, %rdx
movq %r14, %rdi
movq %r15, %rsi
callq 0x4e5b
movq %r14, %rdi
movq %r15, %rsi
callq 0x4f0e
movq 0x8(%rsp), %rcx
addq $-0x4, %rcx
leaq 0x20(%rsp), %r14
movq (%rsp), %rdx
movq 0x8(%rsp), %r8
cmpq %rdx, %rcx
je 0x47f5
leaq -0x4(%rcx), %r15
movq %rbx, %rdi
movq %r14, %rsi
callq 0x43bc
movq %r15, %rcx
jmp 0x47d3
leaq 0x20(%rsp), %rsi
movq %rbx, %rdi
movq %rdx, %rcx
callq 0x43bc
movq 0x20(%rsp), %rdi
testq %rdi, %rdi
je 0x481c
movq 0x30(%rsp), %rsi
subq %rdi, %rsi
callq 0x2160
movq (%rsp), %rdi
testq %rdi, %rdi
je 0x4832
movq 0x10(%rsp), %rsi
subq %rdi, %rsi
callq 0x2160
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
jmp 0x4847
jmp 0x4847
movq %rax, %rbx
jmp 0x4861
movq %rax, %rbx
movq 0x20(%rsp), %rdi
testq %rdi, %rdi
je 0x4861
movq 0x30(%rsp), %rsi
subq %rdi, %rsi
callq 0x2160
movq (%rsp), %rdi
testq %rdi, %rdi
je 0x4877
movq 0x10(%rsp), %rsi
subq %rdi, %rsi
callq 0x2160
movq %rbx, %rdi
callq 0x2270
// File: /workspace/github_cpp_makefile_star2_O1/grogers0[P]dots_and_boxes/BruteForce.cpp
// Function: main
int main(int argc, char **argv)
{
    if (argc < 3)
        usage();

    int width = atoi(argv[1]);
    int height = atoi(argv[2]);

    Board board(width, height);
    brute_force(board);
}

// Assembly:
pushq %rbp
pushq %rbx
subq $0x48, %rsp
cmpl $0x2, %edi
jle 0x48f1
movq %rsi, %rbx
movq 0x8(%rsi), %rdi
callq 0x2230
movl %eax, %ebp
movq 0x10(%rbx), %rdi
callq 0x2230
movq %rsp, %rbx
movq %rbx, %rdi
movl %ebp, %esi
movl %eax, %edx
callq 0x254c
movq %rbx, %rdi
callq 0x46a5
movq 0x10(%rsp), %rdi
testq %rdi, %rdi
je 0x48e8
movq 0x30(%rsp), %rsi
subq %rdi, %rsi
callq 0x2160
xorl %eax, %eax
movq %rax, 0x10(%rsp)
movl %eax, 0x18(%rsp)
movq %rax, 0x20(%rsp)
movl %eax, 0x28(%rsp)
movq %rax, 0x30(%rsp)
xorl %eax, %eax
addq $0x48, %rsp
popq %rbx
popq %rbp
retq
leaq 0x1bf9(%rip), %rdi      # 0x64f1
callq 0x2210
movl $0x1, %edi
callq 0x21a0
movq %rax, %rbx
movq 0x10(%rsp), %rsi
testq %rsi, %rsi
je 0x4921
leaq 0x10(%rsp), %rdx
movq %rsp, %rdi
callq 0x23f1
movq %rbx, %rdi
callq 0x2270
nop
// File: /workspace/github_cpp_makefile_star2_O1/grogers0[P]dots_and_boxes/./Board.h
// Function: Edge::operator<(Edge) const
bool operator<(Edge edge) const
    {
        if (dir < edge.dir) return true;
        if (edge.dir < dir) return false;
        if (x < edge.x) return true;
        if (edge.x < x) return false;
        if (y < edge.y) return true;
        if (edge.y < y) return false;
        return false;
    }

// Assembly:
movzwl (%rdi), %ecx
movl %ecx, %edx
andl $0x1, %edx
movl %esi, %edi
andl $0x1, %edi
movb $0x1, %al
cmpl %edx, %edi
ja 0x4bc9
jae 0x4bca
xorl %eax, %eax
retq
movsbl %cl, %edx
shrl %edx
movsbl %sil, %edi
shrl %edi
cmpw %di, %dx
jl 0x4bc9
jg 0x4bc7
movswl %cx, %eax
shrl $0x8, %eax
movswl %si, %ecx
shrl $0x8, %ecx
cmpw %cx, %ax
setl %al
retq
nop
// File: /workspace/github_cpp_makefile_star2_O1/LiuYinCarl[P]headerFileAnalysis/headerFileAnalysis.cpp
// Function: Node::add_child_node(unsigned int)
bool Node::add_child_node(uint32_t id) {
  assert(id > 0);
  // this check is necessary, otherwise there will have 'fake' circle include.
  // for example, Meta's folly code base has a Windows.h,
  // and in this file include another Windows.h which is the Header file of Windows System.
  if (id == node_id) return false;

  child_nodes.push_back(id);
  return true;
}

// Assembly:
pushq %rbp
pushq %rbx
pushq %rax
movl %esi, 0x4(%rsp)
testl %esi, %esi
je 0x4aa3
movl %esi, %ebx
movl (%rdi), %ebp
cmpl %esi, %ebp
je 0x4a97
movq 0x30(%rdi), %rsi
cmpq 0x38(%rdi), %rsi
je 0x4a89
movl %ebx, (%rsi)
addq $0x4, %rsi
movq %rsi, 0x30(%rdi)
jmp 0x4a97
addq $0x28, %rdi
leaq 0x4(%rsp), %rdx
callq 0x6e38
cmpl %ebx, %ebp
setne %al
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
leaq 0x136ae(%rip), %rdi     # 0x18158
leaq 0x136ae(%rip), %rsi     # 0x1815f
leaq 0x13709(%rip), %rcx     # 0x181c1
movl $0x34, %edx
callq 0x4230
// File: /workspace/github_cpp_makefile_star2_O1/LiuYinCarl[P]headerFileAnalysis/headerFileAnalysis.cpp
// Function: Graph::add_node(Node*)
bool Graph::add_node(Node* node) {
  std::string name = node->get_node_name();
  if (node_name_map.count(name) > 0) {
    return false;
  }
  uint32_t node_id = node->get_node_id();
  auto node_iter = node_map.find(node_id);
  assert(node_iter == node_map.end());
  const auto [it, succ] = node_map.insert({node_id, node});
  assert(succ);
  const auto [it2, succ2] = node_name_map.insert({node->get_node_name(), node});
  assert(succ2);

  ++node_count;
  return true;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x48, %rsp
movq %rsi, %r15
movq %rdi, %rbx
leaq 0x38(%rsp), %rbp
movq %rbp, -0x10(%rbp)
movq 0x8(%rsi), %rsi
movq 0x10(%r15), %rdx
addq %rsi, %rdx
leaq 0x28(%rsp), %r14
movq %r14, %rdi
callq 0x6da8
leaq 0x38(%rbx), %r12
movq %r12, %rdi
movq %r14, %rsi
callq 0x6f74
movq %rax, %r14
leaq 0x40(%rbx), %r13
cmpq %r13, %rax
jne 0x4c92
movl (%r15), %eax
movq 0x18(%rbx), %rsi
leaq 0x10(%rbx), %rcx
movq %rcx, %rdx
testq %rsi, %rsi
je 0x4c07
movq %rcx, %rdx
xorl %edi, %edi
cmpl %eax, 0x20(%rsi)
setb %dil
cmovaeq %rsi, %rdx
movq 0x10(%rsi,%rdi,8), %rsi
testq %rsi, %rsi
jne 0x4bf0
movq %rcx, %rsi
cmpq %rcx, %rdx
je 0x4c19
cmpl 0x20(%rdx), %eax
cmovbq %rcx, %rdx
movq %rdx, %rsi
cmpq %rcx, %rsi
jne 0x4cbe
leaq 0x8(%rbx), %rdi
movq %rsp, %rsi
movl %eax, (%rsi)
movq %r15, 0x8(%rsi)
callq 0x6ffe
testb $0x1, %dl
je 0x4cdd
leaq 0x10(%rsp), %rax
movq %rax, -0x10(%rax)
movq 0x8(%r15), %rsi
movq 0x10(%r15), %rdx
addq %rsi, %rdx
movq %rsp, %rdi
callq 0x6da8
movq %rsp, %rsi
movq %r15, 0x20(%rsi)
movq %r12, %rdi
callq 0x7110
movl %edx, %ebp
movq (%rsp), %rdi
leaq 0x10(%rsp), %rax
cmpq %rax, %rdi
je 0x4c85
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x4330
testb $0x1, %bpl
je 0x4cfc
incl (%rbx)
leaq 0x38(%rsp), %rbp
movq 0x28(%rsp), %rdi
cmpq %rbp, %rdi
je 0x4ca9
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x4330
cmpq %r13, %r14
sete %al
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x13520(%rip), %rdi     # 0x181e5
leaq 0x13493(%rip), %rsi     # 0x1815f
leaq 0x1352e(%rip), %rcx     # 0x18201
movl $0x5a, %edx
callq 0x4230
leaq 0x1353a(%rip), %rdi     # 0x1821e
leaq 0x13474(%rip), %rsi     # 0x1815f
leaq 0x1350f(%rip), %rcx     # 0x18201
movl $0x5c, %edx
callq 0x4230
leaq 0x13520(%rip), %rdi     # 0x18223
leaq 0x13455(%rip), %rsi     # 0x1815f
leaq 0x134f0(%rip), %rcx     # 0x18201
movl $0x5e, %edx
callq 0x4230
movq %rax, %rbx
movq (%rsp), %rdi
leaq 0x10(%rsp), %rax
cmpq %rax, %rdi
je 0x4d42
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x4330
jmp 0x4d42
jmp 0x4d3f
jmp 0x4d3f
movq %rax, %rbx
movq 0x28(%rsp), %rdi
leaq 0x38(%rsp), %rax
cmpq %rax, %rdi
je 0x4d5e
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x4330
movq %rbx, %rdi
callq 0x44e0
// File: /workspace/github_cpp_makefile_star2_O1/LiuYinCarl[P]headerFileAnalysis/headerFileAnalysis.cpp
// Function: Graph::check_circle()
Node* Graph::get_node_by_id(uint32_t id) {
  assert(id > 0);
  auto node_iter = node_map.find(id);
  if (node_iter == node_map.end())
    return nullptr;
  else
    return node_iter->second;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
xorps %xmm0, %xmm0
movaps %xmm0, 0x10(%rsp)
movq $0x0, 0x20(%rsp)
movq 0x20(%rdi), %r14
leaq 0x10(%rdi), %r13
cmpq %r13, %r14
je 0x5326
movq %rdi, %rbx
leaq 0x68(%rdi), %r15
leaq 0x98(%rdi), %r12
movl 0x20(%r14), %ebp
movq 0x28(%r14), %rsi
movq %rbx, %rdi
leaq 0x10(%rsp), %rdx
callq 0x500c
movl %ebp, 0xc(%rsp)
movq %r15, %rdi
leaq 0xc(%rsp), %rsi
callq 0x7356
movq %r12, %rdi
callq 0x7632
movq 0x18(%rsp), %rax
cmpq 0x10(%rsp), %rax
jne 0x534c
movq %r14, %rdi
callq 0x4260
movq %rax, %r14
cmpq %r13, %rax
jne 0x52dc
movq 0x10(%rsp), %rdi
testq %rdi, %rdi
je 0x533d
movq 0x20(%rsp), %rsi
subq %rdi, %rsi
callq 0x4330
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x12ffd(%rip), %rdi     # 0x18350
leaq 0x12e05(%rip), %rsi     # 0x1815f
leaq 0x13007(%rip), %rcx     # 0x18368
movl $0xb7, %edx
callq 0x4230
jmp 0x536d
movq %rax, %rbx
movq 0x10(%rsp), %rdi
testq %rdi, %rdi
je 0x5387
movq 0x20(%rsp), %rsi
subq %rdi, %rsi
callq 0x4330
movq %rbx, %rdi
callq 0x44e0
nop
// File: /workspace/github_cpp_makefile_star2_O1/LiuYinCarl[P]headerFileAnalysis/headerFileAnalysis.cpp
// Function: Graph::get_node_by_name(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)
Node* Graph::get_node_by_name(const std::string& name) {
  assert(name.size() > 0);
  auto node_iter = node_name_map.find(name);
  if (node_iter == node_name_map.end())
    return nullptr;
  else
    return node_iter->second;
}

// Assembly:
pushq %rbx
cmpq $0x0, 0x8(%rsi)
je 0x4dfb
movq %rdi, %rbx
addq $0x38, %rdi
callq 0x72cc
addq $0x40, %rbx
cmpq %rbx, %rax
je 0x4df7
movq 0x40(%rax), %rax
jmp 0x4df9
xorl %eax, %eax
popq %rbx
retq
leaq 0x134c5(%rip), %rdi     # 0x182c7
leaq 0x13356(%rip), %rsi     # 0x1815f
leaq 0x1343f(%rip), %rcx     # 0x1824f
movl $0x6e, %edx
callq 0x4230
// File: /workspace/github_cpp_makefile_star2_O1/LiuYinCarl[P]headerFileAnalysis/headerFileAnalysis.cpp
// Function: Graph::add_record(Node*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>&)
bool Graph::add_record(Node* node, std::string& parent_name) {
  assert(node != nullptr);
  assert(parent_name.size() > 0);

  // 1. find parent node. if parent node not exist, create it
  Node* parent_node = get_node_by_name(parent_name);
  if (parent_node == nullptr) {
    parent_node = make_node(parent_name);
    add_node(parent_node);
  }

  // 2. insert node into it's parent node
  parent_node->add_child_node(node->get_node_id());

  return true;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
testq %rsi, %rsi
je 0x4e75
movq %rdx, %r15
cmpq $0x0, 0x8(%rdx)
je 0x4e94
movq %rsi, %rbx
movq %rdi, %r14
movq %r15, %rsi
callq 0x4dd4
movq %rax, %r12
testq %rax, %rax
jne 0x4e5d
movq %r15, %rdi
callq 0x4eb3
movq %rax, %r12
movq %r14, %rdi
movq %rax, %rsi
callq 0x4b86
movl (%rbx), %esi
movq %r12, %rdi
callq 0x4a60
movb $0x1, %al
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
leaq 0x13406(%rip), %rdi     # 0x18282
leaq 0x132dc(%rip), %rsi     # 0x1815f
leaq 0x13408(%rip), %rcx     # 0x18292
movl $0x77, %edx
callq 0x4230
leaq 0x13425(%rip), %rdi     # 0x182c0
leaq 0x132bd(%rip), %rsi     # 0x1815f
leaq 0x133e9(%rip), %rcx     # 0x18292
movl $0x78, %edx
callq 0x4230
// File: /workspace/github_cpp_makefile_star2_O1/LiuYinCarl[P]headerFileAnalysis/./headerFileAnalysis.h
// Function: make_node(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)
static Node* make_node(const std::string& name) {
  assert(name != "");
  uint32_t id = gen_id();
  Node* node = new Node(id, name);
  return node;
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movq %rdi, %rbx
leaq 0x13547(%rip), %rsi     # 0x18408
callq 0x40b0
testl %eax, %eax
je 0x4efa
movl 0x1e878(%rip), %ebp     # 0x23748
incl %ebp
movl %ebp, 0x1e870(%rip)     # 0x23748
movl $0x40, %edi
callq 0x4320
movq %rax, %r14
movq %rax, %rdi
movl %ebp, %esi
movq %rbx, %rdx
callq 0x4912
movq %r14, %rax
popq %rbx
popq %r14
popq %rbp
retq
leaq 0x13684(%rip), %rdi     # 0x18585
leaq 0x13688(%rip), %rsi     # 0x18590
leaq 0x13698(%rip), %rcx     # 0x185a7
movl $0x3e, %edx
callq 0x4230
movq %rax, %rbx
movl $0x40, %esi
movq %r14, %rdi
callq 0x4330
movq %rbx, %rdi
callq 0x44e0
nop
// File: /workspace/github_cpp_makefile_star2_O1/LiuYinCarl[P]headerFileAnalysis/headerFileAnalysis.cpp
// Function: Graph::gen_dot_file()
bool Graph::gen_dot_file() {
  FILE* fp = fopen("include_graph.dot", "w");
  assert(fp != nullptr);
  // gen node define
  Node* tmp_node = nullptr;
  // ratio 图像高:宽
  // splines=false; 使用直线绘图
  fprintf(fp, "digraph {\n\n graph [ratio = 0.5];\n");
  fprintf(fp, "// node define\n");
  for (auto& item : node_map) {
    tmp_node = item.second;
    fprintf(fp, "%d[label=\"%s %d\"];\n",
            item.first,
            tmp_node->get_node_name().c_str(),
            tmp_node->get_child_node_count());
  }

  fprintf(fp, "\n\n");

  // gen line
  for (auto& item : node_map) {
    Node* node = item.second;
    uint32_t self_node_id = item.first;

    for (auto& child_id : node->get_child_nodes()) {
      fprintf(fp, "%d -> %d;\n", child_id, self_node_id);
    }
  }
  fprintf(fp, "\n}");
  fclose(fp);
  return true;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %r14
leaq 0x12fde(%rip), %rdi     # 0x18383
leaq 0x12fe9(%rip), %rsi     # 0x18395
callq 0x43e0
testq %rax, %rax
je 0x54dc
movq %rax, %rbx
leaq 0x12ffc(%rip), %rdi     # 0x183c0
movl $0x21, %esi
movl $0x1, %edx
movq %rax, %rcx
callq 0x4570
leaq 0x13005(%rip), %rdi     # 0x183e2
movl $0xf, %esi
movl $0x1, %edx
movq %rbx, %rcx
callq 0x4570
movq 0x20(%r14), %r15
leaq 0x10(%r14), %r13
cmpq %r13, %r15
je 0x5438
leaq 0x12fef(%rip), %r12     # 0x183f2
movq 0x28(%r15), %rax
movl 0x20(%r15), %edx
movq 0x8(%rax), %rcx
movq 0x30(%rax), %r8
subq 0x28(%rax), %r8
shrq $0x2, %r8
movq %rbx, %rdi
movq %r12, %rsi
xorl %eax, %eax
callq 0x4460
movq %r15, %rdi
callq 0x4260
movq %rax, %r15
cmpq %r13, %rax
jne 0x5403
leaq 0x12fc7(%rip), %rdi     # 0x18406
movl $0x2, %esi
movl $0x1, %edx
movq %rbx, %rcx
callq 0x4570
movq 0x20(%r14), %r14
cmpq %r13, %r14
je 0x54aa
leaq 0x12fa8(%rip), %r15     # 0x18409
movq %r13, (%rsp)
movq 0x28(%r14), %rax
movq 0x28(%rax), %r12
movq 0x30(%rax), %r13
cmpq %r13, %r12
je 0x5496
movl 0x20(%r14), %ebp
movl (%r12), %edx
movq %rbx, %rdi
movq %r15, %rsi
movl %ebp, %ecx
xorl %eax, %eax
callq 0x4460
addq $0x4, %r12
cmpq %r13, %r12
jne 0x547a
movq %r14, %rdi
callq 0x4260
movq %rax, %r14
movq (%rsp), %r13
cmpq %r13, %rax
jne 0x5465
leaq 0x12f63(%rip), %rdi     # 0x18414
movl $0x2, %esi
movl $0x1, %edx
movq %rbx, %rcx
callq 0x4570
movq %rbx, %rdi
callq 0x4310
movb $0x1, %al
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x12eb4(%rip), %rdi     # 0x18397
leaq 0x12c75(%rip), %rsi     # 0x1815f
leaq 0x12eb4(%rip), %rcx     # 0x183a5
movl $0xbd, %edx
callq 0x4230
nop
// File: /workspace/github_cpp_makefile_star2_O1/LiuYinCarl[P]headerFileAnalysis/headerFileAnalysis.cpp
// Function: WalkMan::start()
void WalkMan::start() {
  walk_dir();
  init_headers();
  analysis_file();
  build_graph();

  g.check_circle();
  g.gen_dot_file();

  std::cout << "source files number: " << source_file_paths.size() << std::endl;
  std::cout << "header files number: " << headers.size() << std::endl;
  std::cout << "graph  node  number: " << g.get_node_count() << std::endl;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %rbx
callq 0x57a0
movq %rbx, %rdi
callq 0x5a76
movq %rbx, %rdi
callq 0x6170
movq %rbx, %rdi
callq 0x6218
movq %rbx, %rdi
callq 0x52a2
movq %rbx, %rdi
callq 0x5390
movq 0x1cc4a(%rip), %r14     # 0x22fb8
leaq 0x121a1(%rip), %rsi     # 0x18516
movl $0x15, %edx
movq %r14, %rdi
callq 0x43a0
movq 0xf8(%rbx), %rax
subq 0xf0(%rbx), %rax
sarq $0x3, %rax
movabsq $-0x3333333333333333, %rsi # imm = 0xCCCCCCCCCCCCCCCD
imulq %rax, %rsi
movq %r14, %rdi
callq 0x4240
movq %rax, %r15
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %r15, %rdi
movl $0xa, %esi
callq 0x42f0
movsbl %al, %esi
movq %r15, %rdi
callq 0x4040
movq %rax, %rdi
callq 0x4250
leaq 0x12151(%rip), %rsi     # 0x1852c
movl $0x15, %edx
movq %r14, %rdi
callq 0x43a0
movq 0x130(%rbx), %rsi
movq %r14, %rdi
callq 0x4240
movq %rax, %r15
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %r15, %rdi
movl $0xa, %esi
callq 0x42f0
movsbl %al, %esi
movq %r15, %rdi
callq 0x4040
movq %rax, %rdi
callq 0x4250
leaq 0x1211a(%rip), %rsi     # 0x18542
movl $0x15, %edx
movq %r14, %rdi
callq 0x43a0
movl (%rbx), %esi
movq %r14, %rdi
callq 0x4240
movq %rax, %rbx
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x42f0
movsbl %al, %esi
movq %rbx, %rdi
callq 0x4040
movq %rax, %rdi
popq %rbx
popq %r14
popq %r15
jmp 0x4250
// File: /workspace/github_cpp_makefile_star2_O1/LiuYinCarl[P]headerFileAnalysis/headerFileAnalysis.cpp
// Function: main
int main(int argc, char* argv[]) {
  if (argc != 2) {
    std::cout << "usage: ./headerFileAnalysys path/to/project/" << std::endl;
    exit(0);
  }

  std::string base_dir {argv[1]};

  WalkMan walkMan(base_dir);
  walkMan.start();

  return 0;
}

// Assembly:
pushq %rbx
subq $0x170, %rsp            # imm = 0x170
cmpl $0x2, %edi
jne 0x64d6
movq 0x8(%rsi), %rsi
movq %rsp, %rbx
leaq 0x20(%rsp), %rdx
movq %rbx, %rdi
callq 0x652e
leaq 0x20(%rsp), %rdi
movq %rbx, %rsi
callq 0x55da
leaq 0x20(%rsp), %rdi
callq 0x6332
leaq 0x20(%rsp), %rdi
callq 0x56d0
leaq 0x10(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x64cb
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x4330
xorl %eax, %eax
addq $0x170, %rsp            # imm = 0x170
popq %rbx
retq
movq 0x1cadb(%rip), %rdi     # 0x22fb8
leaq 0x12074(%rip), %rsi     # 0x18558
callq 0x4300
movq %rax, %rdi
callq 0x4170
xorl %edi, %edi
callq 0x43f0
movq %rax, %rbx
leaq 0x20(%rsp), %rdi
callq 0x56d0
jmp 0x650a
movq %rax, %rbx
leaq 0x10(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x6525
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x4330
movq %rbx, %rdi
callq 0x44e0
nop
// File: /workspace/github_cpp_makefile_star2_O1/lrq3000[P]rfrb/./src/raidSystem.cpp
// Function: RaidSystem::RaidSystem(FileHandler*)
RaidSystem::RaidSystem(FileHandler *fileHandler)
{
	handle = fileHandler;
	raidSystem = Raid_unknown;
	stripeSize = -1;
	lostImages = -1;
	raidSystem = Raid_unknown;
	srand(time(NULL));
}

// Assembly:
pushq %rax
xorps %xmm0, %xmm0
movups %xmm0, 0x10(%rdi)
movq $0x0, 0x20(%rdi)
movq %rsi, (%rdi)
movabsq $-0xfffffffb, %rax      # imm = 0xFFFFFFFF00000005
movq %rax, 0x8(%rdi)
movl $0xffffffff, 0x28(%rdi) # imm = 0xFFFFFFFF
xorl %edi, %edi
callq 0x5370
movl %eax, %edi
popq %rax
jmp 0x53a0
nop
// File: /workspace/github_cpp_makefile_star2_O1/lrq3000[P]rfrb/./src/raidSystem.cpp
// Function: RaidSystem::calculateStripeSize()
bool RaidSystem::calculateStripeSize()
{
	int ret = handle->estimateStripeSize();
	if (ret == -1)
		return false;
	this->stripeSize = ret;
	return true;
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
movq (%rdi), %rdi
callq 0x8c34
cmpl $-0x1, %eax
je 0x70dc
movl %eax, 0xc(%rbx)
cmpl $-0x1, %eax
setne %al
popq %rbx
retq
// File: /workspace/github_cpp_makefile_star2_O1/lrq3000[P]rfrb/./src/raidSystem.cpp
// Function: RaidSystem::checkForNull(char*, unsigned long)
bool RaidSystem::checkForNull(char *in, size_t size)
{
	for (size_t i = 0; i < size; ++i)
	{
		if (in[i] > 0)
			return false;
	}
	return true;
}

// Assembly:
testq %rdx, %rdx
sete %al
je 0x7db5
cmpb $0x0, (%rsi)
jle 0x7db6
retq
movl $0x1, %ecx
movq %rcx, %rax
cmpq %rcx, %rdx
je 0x7dcd
leaq 0x1(%rax), %rcx
cmpb $0x0, (%rsi,%rax)
jle 0x7dbb
cmpq %rdx, %rax
setae %al
retq
// File: /workspace/github_cpp_makefile_star2_O1/lrq3000[P]rfrb/./src/raidSystem.cpp
// Function: RaidSystem::checkForEqual(char*, char*, unsigned long)
bool RaidSystem::checkForEqual(char *buf, char *in, size_t size)
{
	unsigned int count = 0;
	for (size_t i = 0; i < size; ++i)
	{
		if (in[i] != buf[i])
			++count;
	}
	//A few errors are tolerated
	if (count > (size/1000))
		return false;

	return true;
}

// Assembly:
movq %rcx, %rax
xorl %ecx, %ecx
testq %rax, %rax
je 0x7dfc
xorl %edi, %edi
movb (%rdx,%rdi), %r8b
xorl %r9d, %r9d
cmpb (%rsi,%rdi), %r8b
setne %r9b
addl %r9d, %ecx
incq %rdi
cmpq %rdi, %rax
jne 0x7de0
movl %ecx, %ecx
shrq $0x3, %rax
movabsq $0x20c49ba5e353f7cf, %rdx # imm = 0x20C49BA5E353F7CF
mulq %rdx
shrq $0x4, %rdx
cmpq %rcx, %rdx
setae %al
retq
// File: /workspace/github_cpp_makefile_star2_O1/lrq3000[P]rfrb/./src/fileHandler.cpp
// Function: FileHandler::addImage(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>)
void FileHandler::addImage(std::string path)
{
	if (inFiles.size()==0)
	{
		maxBufferSize = (BUFLENGTH/1+1)/2*2;
		maxBufferSize = maxBufferSize/BLOCKSIZE;
		maxBufferSize = maxBufferSize*BLOCKSIZE;
		maxBufferSize = std::min(maxBufferSize,256*1024*1024);
		FileReader *a = new FileReader(path,maxBufferSize);
		inFiles.push_back(a);
	}
	else
	{
		FileReader *a = new FileReader(path,maxBufferSize);
		inFiles.push_back(a);
	}
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x50, %rsp
movq %rsi, %r12
movq %rdi, %r14
leaq 0x40(%rdi), %rbx
movq 0x48(%rdi), %rax
cmpq 0x40(%rdi), %rax
je 0x8a20
movl $0x2b8, %edi            # imm = 0x2B8
callq 0x53d0
movq %rax, %r15
leaq 0x20(%rsp), %r13
movq %r13, -0x10(%r13)
movq (%r12), %rsi
movq 0x8(%r12), %rdx
addq %rsi, %rdx
leaq 0x10(%rsp), %rdi
callq 0x7f46
movslq 0x169cc(%rip), %rdx     # 0x1f3d8
leaq 0x10(%rsp), %rsi
movq %r15, %rdi
callq 0x111ae
movq 0x10(%rsp), %rdi
jmp 0x8a6f
movl $0x10000000, 0x169ae(%rip) # imm = 0x10000000
movl $0x2b8, %edi            # imm = 0x2B8
callq 0x53d0
movq %rax, %r15
leaq 0x40(%rsp), %r13
movq %r13, -0x10(%r13)
movq (%r12), %rsi
movq 0x8(%r12), %rdx
addq %rsi, %rdx
leaq 0x30(%rsp), %rdi
callq 0x7f46
movslq 0x1697b(%rip), %rdx     # 0x1f3d8
leaq 0x30(%rsp), %rsi
movq %r15, %rdi
callq 0x111ae
movq 0x30(%rsp), %rdi
cmpq %r13, %rdi
je 0x8a79
callq 0x5390
movq %r15, 0x8(%rsp)
movq 0x48(%r14), %rsi
cmpq 0x50(%r14), %rsi
je 0x8a92
movq %r15, (%rsi)
addq $0x8, 0x48(%r14)
jmp 0x8a9f
leaq 0x8(%rsp), %rdx
movq %rbx, %rdi
callq 0xea8c
addq $0x50, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
movq %rax, %rbx
movq 0x30(%rsp), %rdi
jmp 0x8ac1
jmp 0x8acd
movq %rax, %rbx
movq 0x10(%rsp), %rdi
cmpq %r13, %rdi
je 0x8ad0
callq 0x5390
jmp 0x8ad0
movq %rax, %rbx
movq %r15, %rdi
callq 0x5390
movq %rbx, %rdi
callq 0x5650
// File: /workspace/github_cpp_makefile_star2_O1/lrq3000[P]rfrb/./src/fileReader.cpp
// Function: FileReader::setOffset(unsigned long)
void FileReader::setOffset(size_t off)
{
	offset = off - getGlobalAdress();
	while (static_cast<size_t>(offset)+blockSize > getNumberOfElements())
	{
		reloadBuffer();
		offset = off - getGlobalAdress();
	}
	this->readSize = std::min(blockSize, getNumberOfElements()-offset);
	block = &getBuffer()[offset];
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rsi, %r14
movq %rdi, %rbx
callq 0x12068
movq %r14, %r15
subq %rax, %r15
movq %r15, 0x2a8(%rbx)
addq 0x2b0(%rbx), %r15
movq %rbx, %rdi
callq 0x1201e
movq %rbx, %rdi
cmpq %rax, %r15
jbe 0x112bc
callq 0x112fa
movq %rbx, %rdi
jmp 0x11289
callq 0x1201e
subq 0x2a8(%rbx), %rax
movq 0x2b0(%rbx), %rcx
cmpq %rcx, %rax
cmovaeq %rcx, %rax
movq %rax, 0x2a0(%rbx)
movq %rbx, %rdi
callq 0x1202e
addq 0x2a8(%rbx), %rax
movq %rax, 0x298(%rbx)
popq %rbx
popq %r14
popq %r15
retq
nop
// File: /workspace/github_cpp_makefile_star2_O1/lrq3000[P]rfrb/./src/fileReader.cpp
// Function: FileReader::reloadBuffer()
bool FileReader::reloadBuffer()
{
	bool ret = Buffered_FileReader::reloadBuffer();
	offset = 0;
	block = Buffered_FileReader::getBuffer();
	readSize = std::min(blockSize, Buffered_FileReader::getNumberOfElements()-blockSize);
	return ret;
}

// Assembly:
pushq %rbp
pushq %rbx
pushq %rax
movq %rdi, %rbx
callq 0x11d16
movl %eax, %ebp
movq $0x0, 0x2a8(%rbx)
movq %rbx, %rdi
callq 0x1202e
movq %rax, 0x298(%rbx)
movq %rbx, %rdi
callq 0x1201e
movq 0x2b0(%rbx), %rcx
subq %rcx, %rax
cmpq %rcx, %rax
cmovaeq %rcx, %rax
movq %rax, 0x2a0(%rbx)
movl %ebp, %eax
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/lrq3000[P]rfrb/./src/fileReader.cpp
// Function: FileReader::calcEntropyOfCurrentBlock()
float FileReader::calcEntropyOfCurrentBlock()
{
	float ret = 0.0f;
	unsigned int possibleVals[256]={};
	for (unsigned int i = 0; i < readSize; ++i)
	{
		possibleVals[(unsigned char)block[i]] += 1;
	}
	float tmp;
	if (possibleVals[0] == readSize)
		return 0.0f;
	for (unsigned int i = 0; i < 256; ++i)
	{
		tmp = (float)possibleVals[i]/(float)readSize;
		if (tmp>0)
			ret += -tmp * std::log2(tmp);
	}
	return ret;
}

// Assembly:
pushq %r14
pushq %rbx
subq $0x418, %rsp            # imm = 0x418
movq %rdi, %rbx
leaq 0x10(%rsp), %rdi
movl $0x400, %edx            # imm = 0x400
xorl %esi, %esi
callq 0x51e0
movq 0x2a0(%rbx), %rax
testq %rax, %rax
je 0x113cd
movq 0x298(%rbx), %rcx
xorl %edx, %edx
movzbl (%rcx,%rdx), %esi
incl 0x10(%rsp,%rsi,4)
incq %rdx
movl %edx, %esi
cmpq %rsi, %rax
ja 0x113bb
movl 0x10(%rsp), %ecx
xorps %xmm1, %xmm1
cmpq %rcx, %rax
je 0x11453
xorps %xmm2, %xmm2
xorl %r14d, %r14d
movq 0x2a0(%rbx), %rax
testq %rax, %rax
js 0x113f5
xorps %xmm3, %xmm3
cvtsi2ss %rax, %xmm3
jmp 0x1140d
movq %rax, %rcx
shrq %rcx
andl $0x1, %eax
orq %rcx, %rax
xorps %xmm3, %xmm3
cvtsi2ss %rax, %xmm3
addss %xmm3, %xmm3
movl 0x10(%rsp,%r14,4), %eax
xorps %xmm0, %xmm0
cvtsi2ss %rax, %xmm0
divss %xmm3, %xmm0
ucomiss %xmm2, %xmm0
jbe 0x11447
movss %xmm1, 0xc(%rsp)
movss %xmm0, 0x8(%rsp)
callq 0x54c0
xorps %xmm2, %xmm2
movss 0xc(%rsp), %xmm1
mulss 0x8(%rsp), %xmm0
subss %xmm0, %xmm1
incq %r14
cmpq $0x100, %r14            # imm = 0x100
jne 0x113df
movaps %xmm1, %xmm0
addq $0x418, %rsp            # imm = 0x418
popq %rbx
popq %r14
retq
nop
// File: /workspace/github_cpp_makefile_star2_O1/lrq3000[P]rfrb/./src/fileReader.cpp
// Function: FileReader::emptyBlock()
bool FileReader::emptyBlock()
{
	char *tmp = getBuffer();
	for (size_t i = 0; i < getNumberOfElements(); ++i)
		if (tmp[i] > 0)
			return false;
	return true;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %rbx
callq 0x1202e
movq %rax, %r14
movq %rbx, %rdi
callq 0x1201e
testq %rax, %rax
sete %al
je 0x114a9
cmpb $0x0, (%r14)
jg 0x114a9
movl $0x1, %r15d
movq %rbx, %rdi
callq 0x1201e
cmpq %rax, %r15
setae %al
jae 0x114a9
cmpb $0x0, (%r14,%r15)
leaq 0x1(%r15), %r15
jle 0x1148e
popq %rbx
popq %r14
popq %r15
retq
nop
// File: /workspace/github_cpp_makefile_star2_O1/lrq3000[P]rfrb/./src/fileReader.cpp
// Function: FileReader::findFirstNonemptyBlock()
int64_t FileReader::findFirstNonemptyBlock()
{
	while (newBlock()==true)
	{
		for (size_t j = 0; j < readSize; ++j)
		{
			if (block[j] > 0)
			{
				return (int64_t)getCurrentAdress();
			}
		}
	}
	return -1;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq %rbx, %rdi
callq 0x11538
testb %al, %al
je 0x11522
movq 0x2a0(%rbx), %rax
testq %rax, %rax
setne %bpl
je 0x11517
movq 0x298(%rbx), %rcx
cmpb $0x0, (%rcx)
jg 0x11502
leaq -0x1(%rax), %rdx
xorl %esi, %esi
cmpq %rsi, %rdx
je 0x1151e
leaq 0x1(%rsi), %rdi
cmpb $0x0, 0x1(%rcx,%rsi)
movq %rdi, %rsi
jle 0x114e8
cmpq %rax, %rdi
setb %bpl
movq 0x2a8(%rbx), %r15
movq %rbx, %rdi
callq 0x12068
movq %rax, %r14
addq %r15, %r14
testb %bpl, %bpl
je 0x114ba
jmp 0x11529
xorl %ebp, %ebp
jmp 0x11517
movq $-0x1, %r14
movq %r14, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O1/lrq3000[P]rfrb/./src/fileReader.cpp
// Function: FileReader::newBlock()
bool FileReader::newBlock()
{
	offset += readSize;
	readSize = std::min(getNumberOfElements(), std::min(blockSize, getNumberOfElements()-offset));
	if (readSize == 0)
	{
		bool ret = reloadBuffer();
		block = getBuffer();
		return ret;
	}
	block = &getBuffer()[offset];
	return true;
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movq %rdi, %rbx
movq 0x2a0(%rdi), %rax
addq %rax, 0x2a8(%rdi)
callq 0x1201e
movq %rax, %r14
movq %rbx, %rdi
callq 0x1201e
subq 0x2a8(%rbx), %rax
movq 0x2b0(%rbx), %rcx
cmpq %rcx, %rax
cmovaeq %rcx, %rax
cmpq %r14, %rax
cmovaeq %r14, %rax
movq %rax, 0x2a0(%rbx)
movq %rbx, %rdi
testq %rax, %rax
je 0x11599
callq 0x1202e
addq 0x2a8(%rbx), %rax
movb $0x1, %bpl
jmp 0x115a8
callq 0x112fa
movl %eax, %ebp
movq %rbx, %rdi
callq 0x1202e
movq %rax, 0x298(%rbx)
movl %ebp, %eax
popq %rbx
popq %r14
popq %rbp
retq