LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_cpp_makefile_star2_O1/sun98[P]Mini-DFS/filetree.cpp
// Function: FileTree::insert_node(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, bool)
bool FileTree::insert_node(const std::string &path, const bool isFile)
{
    TreeNode *parent = nullptr;
    bool isFound = find_node(path, &parent);
    if (isFound)
        return false;

    std::vector<std::string> path_folders = split(path, '/');
    TreeNode *newNode = new TreeNode(path, isFile);
    newNode->parent = parent;
    TreeNode *son = parent->firstSon;
    if (!son)
        parent->firstSon = newNode;
    else
    {
        while (son->nextSibling)
            son = son->nextSibling;
        son->nextSibling = newNode;
    }
    while (son)
        son = son->nextSibling;
    son = newNode;
    return true;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x30, %rsp
movl %edx, %r15d
movq %rsi, %r12
leaq -0x30(%rbp), %rdx
movq $0x0, (%rdx)
callq 0x5242
movl %eax, %ebx
testb %al, %al
jne 0x520f
leaq -0x21(%rbp), %rdx
movb $0x2f, (%rdx)
leaq -0x48(%rbp), %rdi
movq %r12, %rsi
callq 0x5928
movl $0x40, %edi
callq 0x3290
movq %rax, %r14
addq $0x10, %rax
movq %rax, (%r14)
movq (%r12), %rsi
movq 0x8(%r12), %rdx
addq %rsi, %rdx
movq %r14, %rdi
callq 0x4fce
movb %r15b, 0x20(%r14)
xorps %xmm0, %xmm0
movups %xmm0, 0x28(%r14)
movq $0x0, 0x38(%r14)
movq -0x30(%rbp), %rax
movq %rax, 0x28(%r14)
movq 0x30(%rax), %rcx
testq %rcx, %rcx
je 0x51ff
movq %rcx, %rax
movq 0x38(%rcx), %rcx
testq %rcx, %rcx
jne 0x51ed
addq $0x38, %rax
jmp 0x5203
addq $0x30, %rax
movq %r14, (%rax)
leaq -0x48(%rbp), %rdi
callq 0x5412
xorb $0x1, %bl
movl %ebx, %eax
addq $0x30, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
movq %r14, %rdi
callq 0x3270
jmp 0x5231
movq %rax, %rbx
leaq -0x48(%rbp), %rdi
callq 0x5412
movq %rbx, %rdi
callq 0x34a0
// File: /workspace/github_cpp_makefile_star2_O1/sun98[P]Mini-DFS/filetree.cpp
// Function: FileTree::find_node(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, TreeNode**) const
bool FileTree::find_node(const std::string &path, TreeNode **last_node) const
{
    std::vector<std::string> path_folders = split(path, '/');
    TreeNode *node = _root->firstSon;
    *last_node = _root;
    for (const auto &name : path_folders)
    {
        while (node && node->value_ != name)
            node = node->nextSibling;
        if (!node)
            return false;
        *last_node = node;
        node = node->firstSon;
    }
    return true && node->isFile;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movq %rdx, %rbx
movq %rdi, %r14
leaq -0x29(%rbp), %rdx
movb $0x2f, (%rdx)
leaq -0x58(%rbp), %r15
movq %r15, %rdi
callq 0x5928
movq (%r14), %rax
movq 0x30(%rax), %r14
movq %rbx, -0x38(%rbp)
movq %rax, (%rbx)
movq (%r15), %r12
movq 0x8(%r15), %rax
movq %rax, -0x40(%rbp)
cmpq %rax, %r12
sete %r15b
je 0x52e4
testq %r14, %r14
sete %bl
je 0x52c5
movq 0x8(%r12), %r13
movq 0x8(%r14), %rdx
cmpq %r13, %rdx
jne 0x52b9
testq %rdx, %rdx
je 0x52ca
movq (%r12), %rsi
movq (%r14), %rdi
callq 0x32a0
testl %eax, %eax
je 0x52ca
movq 0x38(%r14), %r14
testq %r14, %r14
sete %bl
jne 0x529b
xorl %r14d, %r14d
jmp 0x52d5
movq -0x38(%rbp), %rax
movq %r14, (%rax)
movq 0x30(%r14), %r14
testb $0x1, %bl
jne 0x52e4
addq $0x20, %r12
cmpq -0x40(%rbp), %r12
jmp 0x5288
testb $0x1, %r15b
je 0x52f0
movb 0x20(%r14), %bl
jmp 0x52f2
xorl %ebx, %ebx
leaq -0x58(%rbp), %rdi
callq 0x5412
movl %ebx, %eax
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/sun98[P]Mini-DFS/filetree.cpp
// Function: FileTree::list(TreeNode*, std::map<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::pair<int, int>, std::less<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>, std::allocator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const, std::pair<int, int>>>>&)
void FileTree::list(TreeNode *node, std::map<std::string, std::pair<int, int>> &meta)
{
    static int chunkSize = 2 * 1024 * 1024;
    if (node)
    {
        std::cout << meta[node->value_].first << "\t" << (int)ceil(1.0 * meta[node->value_].second / chunkSize) << "\t\t" << node->value_ << std::endl;
        // std::cout << node->value_ << "\t" << std::endl;
        list(node->firstSon, meta);
        list(node->nextSibling, meta);
    }
}

// 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
leaq 0x3e3e(%rip), %r12      # 0x9168
testq %r14, %r14
je 0x53f3
movq %rbx, %rdi
movq %r14, %rsi
callq 0x5460
movl (%rax), %esi
movq 0x6c81(%rip), %rdi      # 0xbfc8
callq 0x3470
movq %rax, %r13
movl $0x1, %edx
movq %rax, %rdi
leaq 0x3e0b(%rip), %rsi      # 0x9169
callq 0x32e0
movq %rbx, %rdi
movq %r14, %rsi
callq 0x5460
xorps %xmm0, %xmm0
cvtsi2sdl 0x4(%rax), %xmm0
mulsd 0x3de2(%rip), %xmm0     # 0x9160
callq 0x3090
cvttsd2si %xmm0, %esi
movq %r13, %rdi
callq 0x3470
movq %rax, %r13
movl $0x2, %edx
movq %rax, %rdi
movq %r12, %rsi
callq 0x32e0
movq (%r14), %rsi
movq 0x8(%r14), %rdx
movq %r13, %rdi
callq 0x32e0
movq %rax, %r13
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %r13, %rdi
movl $0xa, %esi
callq 0x3280
movsbl %al, %esi
movq %r13, %rdi
callq 0x3040
movq %rax, %rdi
callq 0x31b0
movq 0x30(%r14), %rsi
movq %r15, %rdi
movq %rbx, %rdx
callq 0x530c
movq 0x38(%r14), %r14
jmp 0x532a
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/sun98[P]Mini-DFS/md5.cpp
// Function: split(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, char const&)
std::vector<std::string> split(const std::string &s, const char &delim)
{
  std::stringstream ss(s);
  std::vector<std::string> res;
  std::string str;
  while (std::getline(ss, str, delim))
    if (!str.empty())
      res.push_back(str);
  return res;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x1a8, %rsp            # imm = 0x1A8
movq %rdx, %r14
movq %rdi, %rbx
leaq -0x1d0(%rbp), %r15
movq %r15, %rdi
movl $0x18, %edx
callq 0x3410
xorl %eax, %eax
movq %rax, 0x10(%rbx)
xorps %xmm0, %xmm0
movups %xmm0, (%rbx)
leaq -0x38(%rbp), %r13
movq %r13, -0x10(%r13)
movq %rax, -0x8(%r13)
movb $0x0, (%r13)
leaq -0x48(%rbp), %r12
movsbl (%r14), %edx
movq %r15, %rdi
movq %r12, %rsi
callq 0x34d0
movq (%rax), %rcx
movq -0x18(%rcx), %rcx
testb $0x5, 0x20(%rax,%rcx)
jne 0x59a8
cmpq $0x0, -0x40(%rbp)
je 0x5977
movq %rbx, %rdi
movq %r12, %rsi
callq 0x6468
jmp 0x5977
movq -0x48(%rbp), %rdi
cmpq %r13, %rdi
je 0x59b6
callq 0x3270
movq 0x65eb(%rip), %rsi      # 0xbfa8
leaq -0x1d0(%rbp), %rdi
callq 0x31e0
leaq -0x150(%rbp), %rdi
callq 0x3110
movq %rbx, %rax
addq $0x1a8, %rsp            # imm = 0x1A8
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %r14
movq -0x48(%rbp), %rdi
cmpq %r13, %rdi
je 0x59fb
callq 0x3270
movq %rbx, %rdi
callq 0x5412
movq 0x659e(%rip), %rsi      # 0xbfa8
leaq -0x1d0(%rbp), %rdi
callq 0x31e0
leaq -0x150(%rbp), %rdi
callq 0x3110
movq %r14, %rdi
callq 0x34a0
// File: /workspace/github_cpp_makefile_star2_O1/sun98[P]Mini-DFS/md5.cpp
// Function: MD5::update(unsigned char const*, unsigned long)
MD5 &MD5::update(const unsigned char *input, size_t inputLen)
{
  // compute number of bytes mod 64
  size_t index = (uint32_t)((lo >> 3) & 0x3F);

  // update the message length
  if ((lo += ((uint32_t)inputLen << 3)) < ((uint32_t)inputLen << 3))
    hi++;
  hi += ((uint32_t)inputLen >> 29);

  size_t partLen = 64 - index;

  // update the states using the new message
  size_t i;
  if (inputLen >= partLen)
  {
    memcpy(&buffer[index], input, partLen);
    transform(buffer);

    for (i = partLen; i + BLOCK_SIZE <= inputLen; i += BLOCK_SIZE)
    {
      transform(&input[i]);
    }

    index = 0;
  }
  else
  {
    i = 0;
  }

  // buffer the remainder
  memcpy(&buffer[index], &input[i], inputLen - i);

  return *this;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %rbx
movl 0x60(%rdi), %eax
movl %eax, %r13d
shrl $0x3, %r13d
andl $0x3f, %r13d
leal (,%rdx,8), %ecx
addl %eax, %ecx
movl %ecx, 0x60(%rdi)
jae 0x5a9c
incl 0x64(%rbx)
movl %r14d, %eax
shrl $0x1d, %eax
addl %eax, 0x64(%rbx)
movl $0x40, %r12d
subq %r13, %r12
cmpq %r14, %r12
jbe 0x5ab8
xorl %r12d, %r12d
jmp 0x5afe
leaq (%rbx,%r13), %rdi
movq %r15, %rsi
movq %r12, %rdx
callq 0x3210
movq %rbx, %rdi
movq %rbx, %rsi
callq 0x5b28
movl $0x80, %eax
subq %r13, %rax
cmpq %r14, %rax
ja 0x5afb
movq %r12, %r13
leaq (%r15,%r12), %rsi
movq %rbx, %rdi
callq 0x5b28
addq $0x40, %r12
subq $-0x80, %r13
cmpq %r14, %r13
jbe 0x5adf
xorl %r13d, %r13d
addq %rbx, %r13
addq %r12, %r15
subq %r12, %r14
movq %r13, %rdi
movq %r15, %rsi
movq %r14, %rdx
callq 0x3210
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O1/sun98[P]Mini-DFS/md5.cpp
// Function: MD5::finalize()
MD5 &MD5::finalize()
{
  static uint8_t PADDING[64] = {0};
  PADDING[0] = 0x80;

  if (!finalized)
  {
    // save the length
    uint8_t bits[8];
    memcpy(bits, &lo, 4);
    memcpy(bits + 4, &hi, 4);

    // pad the 1 bit and zeroes
    size_t index = (uint32_t)((lo >> 3) & 0x3f);
    size_t padLen = (index < 56) ? (56 - index) : (120 - index);
    update(PADDING, padLen);

    // append length
    update(bits, 8);

    // store the state
    memcpy(digest, state, 16);

    // wipe out sensitive data
    memset(buffer, 0, sizeof buffer);
    hi = lo = 0;

    finalized = true;
  }

  return *this;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq %rdi, %rbx
movb $-0x80, 0x5fdf(%rip)    # 0xc2c0
cmpb $0x0, 0x68(%rdi)
jne 0x6355
movl 0x60(%rbx), %eax
leaq -0x18(%rbp), %r14
movl %eax, (%r14)
movl 0x64(%rbx), %ecx
movl %ecx, 0x4(%r14)
shrl $0x3, %eax
andl $0x3f, %eax
xorl %edx, %edx
cmpl $0x38, %eax
setae %dl
shll $0x6, %edx
orq $0x38, %rdx
subq %rax, %rdx
leaq 0x5fa9(%rip), %rsi      # 0xc2c0
movq %rbx, %rdi
callq 0x5a66
movl $0x8, %edx
movq %rbx, %rdi
movq %r14, %rsi
callq 0x5a66
movups 0x50(%rbx), %xmm0
movups %xmm0, 0x40(%rbx)
xorps %xmm0, %xmm0
movups %xmm0, (%rbx)
movups %xmm0, 0x10(%rbx)
movups %xmm0, 0x20(%rbx)
movups %xmm0, 0x30(%rbx)
movq $0x0, 0x60(%rbx)
movb $0x1, 0x68(%rbx)
movq %rbx, %rax
addq $0x10, %rsp
popq %rbx
popq %r14
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O1/sun98[P]Mini-DFS/md5.cpp
// Function: MD5::toString[abi:cxx11]() const
string MD5::toString() const
{
  if (!finalized)
    return string("");

  char result[33] = {0};
  for (int i = 0; i < 16; ++i)
    sprintf(result + i * 2, "%02x", digest[i]);

  return string(result);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rdi, %rbx
cmpb $0x0, 0x68(%rsi)
je 0x63e1
movq %rsi, %r14
xorps %xmm0, %xmm0
leaq -0x50(%rbp), %r15
movaps %xmm0, 0x10(%r15)
movaps %xmm0, (%r15)
movb $0x0, 0x20(%r15)
leaq 0x2de5(%rip), %r12      # 0x9180
xorl %r13d, %r13d
movzbl 0x40(%r14,%r13), %edx
movq %r15, %rdi
movq %r12, %rsi
xorl %eax, %eax
callq 0x30a0
incq %r13
addq $0x2, %r15
cmpq $0x10, %r13
jne 0x639e
leaq 0x10(%rbx), %rax
movq %rax, (%rbx)
leaq -0x50(%rbp), %r14
movq %r14, %rdi
callq 0x3140
leaq (%rax,%rbp), %rdx
addq $-0x50, %rdx
movq %rbx, %rdi
movq %r14, %rsi
jmp 0x63f5
leaq 0x10(%rbx), %rax
movq %rax, (%rbx)
leaq 0x2d7b(%rip), %rdx      # 0x916a
movq %rbx, %rdi
movq %rdx, %rsi
callq 0x54e0
movq %rbx, %rax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/sun98[P]Mini-DFS/md5.cpp
// Function: md5(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>)
string md5(const string str)
{
  MD5 md5 = MD5();
  md5.update(str.c_str(), str.size());
  md5.finalize();
  return md5.toString();
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
subq $0x70, %rsp
movq %rdi, %rbx
leaq -0x7c(%rbp), %r14
movq $0x0, 0x60(%r14)
movaps 0x2d43(%rip), %xmm0     # 0x9170
movups %xmm0, 0x50(%r14)
movb $0x0, 0x68(%r14)
movq (%rsi), %rax
movq 0x8(%rsi), %rdx
movq %r14, %rdi
movq %rax, %rsi
callq 0x5a66
movq %r14, %rdi
callq 0x62cc
movq %rbx, %rdi
movq %r14, %rsi
callq 0x6362
movq %rbx, %rax
addq $0x70, %rsp
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/sun98[P]Mini-DFS/namenode.cpp
// Function: NameServer::parse_cmd[abi:cxx11]()
std::vector<std::string> NameServer::parse_cmd()
{
    std::cout << "Mini-DFS> ";
    std::string cmd, tmp;
    std::getline(std::cin, cmd);
    std::vector<std::string> parameters;
    std::stringstream ss(cmd);
    while (ss >> tmp)
        parameters.push_back(tmp);
    return parameters;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x1c8, %rsp            # imm = 0x1C8
movq %rdi, %rbx
movq 0x5272(%rip), %rdi      # 0xbfc8
leaq 0x24e3(%rip), %rsi      # 0x9240
movl $0xa, %edx
callq 0x32e0
leaq -0x38(%rbp), %r12
movq %r12, -0x10(%r12)
xorl %eax, %eax
movq %rax, -0x8(%r12)
movb %al, (%r12)
leaq -0x58(%rbp), %r13
movq %r13, -0x10(%r13)
movq %rax, -0x8(%r13)
movb %al, (%r13)
movq 0x5246(%rip), %rdi      # 0xbfd8
movq (%rdi), %rax
addq -0x18(%rax), %rdi
movl $0xa, %esi
callq 0x3280
movsbl %al, %edx
movq 0x522b(%rip), %rdi      # 0xbfd8
leaq -0x48(%rbp), %rsi
callq 0x34d0
xorps %xmm0, %xmm0
movups %xmm0, (%rbx)
movq $0x0, 0x10(%rbx)
leaq -0x1f0(%rbp), %rdi
leaq -0x48(%rbp), %rsi
movl $0x18, %edx
callq 0x3410
leaq -0x1f0(%rbp), %r14
leaq -0x68(%rbp), %r15
movq %r14, %rdi
movq %r15, %rsi
callq 0x3330
movq (%rax), %rcx
movq -0x18(%rcx), %rcx
testb $0x5, 0x20(%rax,%rcx)
jne 0x6e0a
movq %rbx, %rdi
movq %r15, %rsi
callq 0x6468
jmp 0x6de4
movq 0x5197(%rip), %rsi      # 0xbfa8
leaq -0x1f0(%rbp), %rdi
callq 0x31e0
leaq -0x170(%rbp), %rdi
callq 0x3110
movq -0x68(%rbp), %rdi
cmpq %r13, %rdi
je 0x6e37
callq 0x3270
movq -0x48(%rbp), %rdi
cmpq %r12, %rdi
je 0x6e45
callq 0x3270
movq %rbx, %rax
addq $0x1c8, %rsp            # imm = 0x1C8
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %r14
jmp 0x6e86
movq %rax, %r14
jmp 0x6e8e
movq %rax, %r14
movq 0x513a(%rip), %rsi      # 0xbfa8
leaq -0x1f0(%rbp), %rdi
callq 0x31e0
leaq -0x170(%rbp), %rdi
callq 0x3110
movq %rbx, %rdi
callq 0x5412
movq -0x68(%rbp), %rdi
cmpq %r13, %rdi
je 0x6e9c
callq 0x3270
movq -0x48(%rbp), %rdi
cmpq %r12, %rdi
je 0x6eaa
callq 0x3270
movq %r14, %rdi
callq 0x34a0
// File: /workspace/github_cpp_makefile_star2_O1/sun98[P]Mini-DFS/./md5.h
// Function: std::vector<int, std::allocator<int>> argsort<double>(std::vector<double, std::allocator<double>> const&)
std::vector<int> argsort(const std::vector<T> &vec)
{
    std::vector<int> idx;
    for (int i = 0; i < vec.size(); ++i)
        idx.push_back(i);
    sort(idx.begin(), idx.end(), [&vec](int id1, int id2) { return vec[id1] < vec[id2]; });
    return idx;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x10, %rsp
movq %rsi, %r14
movq %rdi, %rbx
xorps %xmm0, %xmm0
movups %xmm0, (%rdi)
movq $0x0, 0x10(%rdi)
movl $0x0, -0x24(%rbp)
movq 0x8(%rsi), %rax
cmpq (%rsi), %rax
je 0x8148
xorl %eax, %eax
leaq -0x24(%rbp), %r15
movq 0x8(%rbx), %rsi
cmpq 0x10(%rbx), %rsi
je 0x8123
movl %eax, (%rsi)
addq $0x4, %rsi
movq %rsi, 0x8(%rbx)
jmp 0x812e
movq %rbx, %rdi
movq %r15, %rdx
callq 0x8428
movslq -0x24(%rbp), %rax
incq %rax
movl %eax, -0x24(%rbp)
movq 0x8(%r14), %rcx
subq (%r14), %rcx
sarq $0x3, %rcx
cmpq %rax, %rcx
ja 0x810d
movq (%rbx), %r15
movq 0x8(%rbx), %r12
cmpq %r12, %r15
je 0x8187
movq %r12, %rax
subq %r15, %rax
sarq $0x2, %rax
bsrq %rax, %rdx
xorl $0x3f, %edx
addl %edx, %edx
xorq $0x7e, %rdx
movq %r15, %rdi
movq %r12, %rsi
movq %r14, %rcx
callq 0x8560
movq %r15, %rdi
movq %r12, %rsi
movq %r14, %rdx
callq 0x8689
movq %rbx, %rax
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
jmp 0x8199
movq %rax, %r14
movq (%rbx), %rdi
testq %rdi, %rdi
je 0x81a9
callq 0x3270
movq %r14, %rdi
callq 0x34a0
nop
// File: /workspace/github_cpp_makefile_star2_O1/eschwabe[P]interview-practice/src/printlastlines.cpp
// Function: main
int main(int argc, char *argv[])
{
    if(argc < 3) {
        cout << argv[0] << " FILE LINES" << endl;
        return 1;
    }
    PrintLastLines(argv[1],atoi(argv[2]));
    return 0;
}

// Assembly:
pushq %r14
pushq %rbx
subq $0x28, %rsp
movq %rsi, %rbx
cmpl $0x2, %edi
jg 0x2563
movq (%rbx), %rbx
testq %rbx, %rbx
je 0x25ab
movq %rbx, %rdi
callq 0x2060
movq 0x2a82(%rip), %rdi      # 0x4fd8
movq %rbx, %rsi
movq %rax, %rdx
callq 0x2100
jmp 0x25c9
movq 0x8(%rbx), %rsi
leaq 0x8(%rsp), %r14
leaq 0x7(%rsp), %rdx
movq %r14, %rdi
callq 0x263e
movq 0x10(%rbx), %rdi
callq 0x2130
movq %r14, %rdi
movl %eax, %esi
callq 0x22ec
leaq 0x18(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x25a7
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x20f0
xorl %eax, %eax
jmp 0x2610
movq 0x2a26(%rip), %rax      # 0x4fd8
movq (%rax), %rcx
movq -0x18(%rcx), %rcx
leaq (%rax,%rcx), %rdi
movl 0x20(%rax,%rcx), %esi
orl $0x1, %esi
callq 0x2160
movq 0x2a08(%rip), %rbx      # 0x4fd8
leaq 0xa2d(%rip), %rsi       # 0x3004
movl $0xb, %edx
movq %rbx, %rdi
callq 0x2100
movq (%rbx), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x20d0
movsbl %al, %esi
movq %rbx, %rdi
callq 0x2030
movq %rax, %rdi
callq 0x2080
movl $0x1, %eax
addq $0x28, %rsp
popq %rbx
popq %r14
retq
movq %rax, %rbx
leaq 0x18(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x2636
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x20f0
movq %rbx, %rdi
callq 0x2180
// File: /workspace/github_cpp_makefile_star2_O1/statgen[P]statgen/lib/tclap-1.2.0/examples/test8.cpp
// Function: main
int main(int argc, char** argv)
{

	parseOptions(argc,argv);

	cout << "for string we got : " << _stringTest<< endl
		 << "for ulabeled one we got : " << _utest << endl
		 << "for ulabeled two we got : " << _ztest << endl
		 << "for bool B we got : " << _boolTestB << endl;

}

// Assembly:
pushq %rbx
callq 0x475f
movq 0x129c7(%rip), %rbx     # 0x16fd0
leaq 0xca12(%rip), %rsi      # 0x11022
movl $0x14, %edx
movq %rbx, %rdi
callq 0x4200
movq 0x12be4(%rip), %rsi     # 0x17208
movq 0x12be5(%rip), %rdx     # 0x17210
movq %rbx, %rdi
callq 0x4200
movq %rax, %rbx
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x41a0
movsbl %al, %esi
movq %rbx, %rdi
callq 0x4030
movq %rax, %rdi
callq 0x4140
movq %rax, %rbx
leaq 0xc9d0(%rip), %rsi      # 0x11037
movl $0x1a, %edx
movq %rax, %rdi
callq 0x4200
movq 0x12bad(%rip), %rsi     # 0x17228
movq 0x12bae(%rip), %rdx     # 0x17230
movq %rbx, %rdi
callq 0x4200
movq %rax, %rbx
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x41a0
movsbl %al, %esi
movq %rbx, %rdi
callq 0x4030
movq %rax, %rdi
callq 0x4140
movq %rax, %rbx
leaq 0xc994(%rip), %rsi      # 0x11052
movl $0x1a, %edx
movq %rax, %rdi
callq 0x4200
movq 0x12b76(%rip), %rsi     # 0x17248
movq 0x12b77(%rip), %rdx     # 0x17250
movq %rbx, %rdi
callq 0x4200
movq %rax, %rbx
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x41a0
movsbl %al, %esi
movq %rbx, %rdi
callq 0x4030
movq %rax, %rdi
callq 0x4140
movq %rax, %rbx
leaq 0xc958(%rip), %rsi      # 0x1106d
movl $0x14, %edx
movq %rax, %rdi
callq 0x4200
movzbl 0x12ad8(%rip), %esi     # 0x17201
movq %rbx, %rdi
callq 0x42d0
movq %rax, %rbx
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x41a0
movsbl %al, %esi
movq %rbx, %rdi
callq 0x4030
movq %rax, %rdi
callq 0x4140
xorl %eax, %eax
popq %rbx
retq
// File: /workspace/github_cpp_makefile_star2_O1/statgen[P]statgen/lib/tclap-1.2.0/examples/../include/tclap/UnlabeledMultiArg.h
// Function: TCLAP::UnlabeledMultiArg<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>::processArg(int*, 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>>>>&)
bool UnlabeledMultiArg<T>::processArg(int *i, std::vector<std::string>& args) 
{

	if ( _hasBlanks( args[*i] ) )
		return false;

	// never ignore an unlabeled multi arg


	// always take the first value, regardless of the start string 
	_extractValue( args[(*i)] );

	/*
	// continue taking args until we hit the end or a start string 
	while ( (unsigned int)(*i)+1 < args.size() &&
			args[(*i)+1].find_first_of( Arg::flagStartString() ) != 0 &&
            args[(*i)+1].find_first_of( Arg::nameStartString() ) != 0 ) 
		_extractValue( args[++(*i)] );
	*/

	_alreadySet = true;

	return true;
}

// Assembly:
pushq %rbp
pushq %rbx
pushq %rax
movq %rdi, %rbx
movslq (%rsi), %rax
movq (%rdx), %rcx
shlq $0x5, %rax
leaq (%rcx,%rax), %rsi
movq 0x8(%rcx,%rax), %rax
cmpq $0x2, %rax
setae %bpl
jb 0xfe73
movq (%rsi), %rcx
movb $0x1, %bpl
cmpb $0x7, 0x1(%rcx)
je 0xfe73
movl $0x2, %edi
movq %rdi, %rdx
cmpq %rdi, %rax
je 0xfe6c
leaq 0x1(%rdx), %rdi
cmpb $0x7, (%rcx,%rdx)
jne 0xfe5a
cmpq %rdx, %rax
seta %bpl
testb %bpl, %bpl
jne 0xfe87
movq %rbx, %rdi
callq 0xceb4
movb $0x1, 0x91(%rbx)
xorb $0x1, %bpl
movl %ebp, %eax
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/statgen[P]statgen/lib/tclap-1.2.0/examples/../include/tclap/UnlabeledMultiArg.h
// Function: TCLAP::UnlabeledMultiArg<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>::operator==(TCLAP::Arg const&) const
bool UnlabeledMultiArg<T>::operator==(const Arg& a) const
{
	if ( _name == a.getName() || _description == a.getDescription() )
		return true;
	else
		return false;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x20, %rsp
movq %rsi, %r14
movq %rdi, %rbx
movq 0x30(%rdi), %rdx
cmpq 0x30(%rsi), %rdx
jne 0xfeca
testq %rdx, %rdx
je 0xfecf
movq 0x28(%r14), %rsi
movq 0x28(%rbx), %rdi
callq 0x41d0
testl %eax, %eax
sete %r12b
jmp 0xfed2
xorl %r12d, %r12d
jmp 0xfed2
movb $0x1, %r12b
movb $0x1, %bpl
testb %r12b, %r12b
jne 0xff0e
movq %rsp, %r15
movq %r15, %rdi
movq %r14, %rsi
callq 0xa656
movq 0x50(%rbx), %rdx
cmpq 0x8(%r15), %rdx
jne 0xff0c
testq %rdx, %rdx
je 0xff0e
movq (%rsp), %rsi
movq 0x48(%rbx), %rdi
callq 0x41d0
testl %eax, %eax
sete %bpl
jmp 0xff0e
xorl %ebp, %ebp
testb %r12b, %r12b
jne 0xff2e
leaq 0x10(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0xff2e
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x41c0
movl %ebp, %eax
addq $0x20, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O1/smilingthax[P]cttrie/test_getindex.cpp
// Function: main
int main(int argc,char **argv)
{
  test1(index_list<1,0,1>(),[&](){
    printf("1 %d\n",argc);
  },[&](){
    printf("2\n");
  },[&](){
    printf("3\n");
  });

//  printf("%s\n",pack_tools::get_index<0>("The","other","thing"));
  test2<0,1,1,2>("The","other","thing");
  printf("\n");

  return 0;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movl %edi, %ebx
leaq 0xeb5(%rip), %r14       # 0x201e
movq %r14, %rdi
callq 0x1050
leaq 0xe9c(%rip), %rdi       # 0x2014
movl %ebx, %esi
xorl %eax, %eax
callq 0x1030
movq %r14, %rdi
callq 0x1050
leaq 0xe74(%rip), %rdi       # 0x2004
leaq 0xe71(%rip), %rsi       # 0x2008
leaq 0xe70(%rip), %rdx       # 0x200e
callq 0x11b7
movl $0xa, %edi
callq 0x1040
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_cpp_makefile_star2_O1/deepaktabraham[P]BPlus-Tree/src/tree.cpp
// Function: BPlusTree::Search_Path(Node*, float, std::stack<Node*, std::deque<Node*, std::allocator<Node*>>>*)
void BPlusTree :: Search_Path(Node* node, float key, stack<Node*>* path)
{
	// push node to stack
        path->push(node);

	// check if the node pushed to stack is an internal node
	if(!node->Get_IsLeaf())
        {
		// search for the given key in the current node
		vector<float> keys = node->Get_Keys();
		vector<Node*> children = node->Get_Children();
                vector<float>::iterator index = lower_bound(keys.begin(), keys.end(), key);

		// check if key is found
		if(key == keys[index - keys.begin()])
		{
			// recursively repeat by searching the path through the corresponding right child index
                	Search_Path(children[(index - keys.begin()) + 1], key, path);
		}

		// if key is not found
		else
		{
			// recursively repeat by searching the path through the corresponding left child index
			Search_Path(children[index - keys.begin()], key, path);
		}
        }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
subq $0x40, %rsp
movq %rdx, %rbx
movss %xmm0, -0x1c(%rbp)
movq %rdi, %r14
movq %rsi, -0x18(%rbp)
movq 0x30(%rdx), %rax
movq 0x40(%rdx), %rcx
addq $-0x8, %rcx
cmpq %rcx, %rax
je 0x2d35
movq %rsi, (%rax)
addq $0x8, 0x30(%rbx)
jmp 0x2d41
leaq -0x18(%rbp), %rsi
movq %rbx, %rdi
callq 0x3a9a
movq -0x18(%rbp), %rdi
callq 0x3ec0
testb %al, %al
jne 0x2e04
movq -0x18(%rbp), %rsi
leaq -0x38(%rbp), %rdi
callq 0x3eca
movq -0x18(%rbp), %rsi
movq (%rsi), %rax
leaq -0x50(%rbp), %rdi
callq *0x30(%rax)
movq -0x38(%rbp), %rax
movq -0x30(%rbp), %rdx
subq %rax, %rdx
sarq $0x2, %rdx
movq %rax, %rcx
testq %rdx, %rdx
movss -0x1c(%rbp), %xmm0
jle 0x2dae
movq %rax, %rcx
movq %rdx, %rsi
shrq %rsi
ucomiss (%rcx,%rsi,4), %xmm0
jbe 0x2da6
leaq (%rcx,%rsi,4), %rcx
addq $0x4, %rcx
notq %rsi
addq %rdx, %rsi
movq %rsi, %rdx
testq %rsi, %rsi
jg 0x2d8f
movq %rcx, %rdx
subq %rax, %rdx
sarq $0x2, %rdx
movss (%rcx), %xmm1
ucomiss %xmm0, %xmm1
movq -0x50(%rbp), %rax
jne 0x2dd9
jp 0x2dd9
movq 0x8(%rax,%rdx,8), %rsi
movq %r14, %rdi
movq %rbx, %rdx
callq 0x2d00
jmp 0x2de8
movq (%rax,%rdx,8), %rsi
movq %r14, %rdi
movq %rbx, %rdx
callq 0x2d00
movq -0x50(%rbp), %rdi
testq %rdi, %rdi
je 0x2df6
callq 0x2150
movq -0x38(%rbp), %rdi
testq %rdi, %rdi
je 0x2e04
callq 0x2150
addq $0x40, %rsp
popq %rbx
popq %r14
popq %rbp
retq
jmp 0x2e0f
movq %rax, %rbx
movq -0x50(%rbp), %rdi
testq %rdi, %rdi
je 0x2e25
callq 0x2150
jmp 0x2e25
movq %rax, %rbx
movq -0x38(%rbp), %rdi
testq %rdi, %rdi
je 0x2e33
callq 0x2150
movq %rbx, %rdi
callq 0x22a0
nop
// File: /workspace/github_cpp_makefile_star2_O1/deepaktabraham[P]BPlus-Tree/src/tree.cpp
// Function: BPlusTree::Destroy(Node*)
void BPlusTree :: Destroy(Node* node)
{
	// recursively repeat the function to delete all the nodes level by level, starting with the leaf nodes
	if (!node->Get_IsLeaf())
	{
  	        vector<Node*> children = node->Get_Children();
                for(vector<Node*>::iterator index = children.begin(); index != children.end(); index++)
                {
                        Destroy(*index);
        	}
	}
	delete(node);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x20, %rsp
movq %rsi, %rbx
movq %rdi, %r14
movq %rsi, %rdi
callq 0x3ec0
testb %al, %al
jne 0x2e9a
movq (%rbx), %rax
leaq -0x38(%rbp), %r15
movq %r15, %rdi
movq %rbx, %rsi
callq *0x30(%rax)
movq (%r15), %r12
cmpq 0x8(%r15), %r12
je 0x2e8c
movq (%r12), %rsi
movq %r14, %rdi
callq 0x2e3c
addq $0x8, %r12
cmpq -0x30(%rbp), %r12
jne 0x2e76
movq -0x38(%rbp), %rdi
testq %rdi, %rdi
je 0x2e9a
callq 0x2150
leaq 0x5dd7(%rip), %rax      # 0x8c78
movq %rax, (%rbx)
movq 0x10(%rbx), %rdi
testq %rdi, %rdi
je 0x2eb2
callq 0x2150
movq %rbx, %rdi
callq 0x2150
addq $0x20, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
movq -0x38(%rbp), %rdi
testq %rdi, %rdi
je 0x2ed8
callq 0x2150
movq %rbx, %rdi
callq 0x22a0
// File: /workspace/github_cpp_makefile_star2_O1/deepaktabraham[P]BPlus-Tree/src/internalnode.cpp
// Function: InternalNode::Insert(float, Node*)
void InternalNode :: Insert(float key, Node* rightChild)
{
	// insert key in to suitable position in the given internal node
	vector<float>::iterator index = lower_bound(keys.begin(), keys.end(), key);
	keys.insert(index, key);

	// insert right child in the immediately next index in the children vector
	index = lower_bound(keys.begin(), keys.end(), key);
	children.insert(children.begin() + (index - keys.begin() + 1), rightChild);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
subq $0x18, %rsp
movq %rdi, %rbx
movss %xmm0, -0xc(%rbp)
movq %rsi, -0x18(%rbp)
addq $0x10, %rdi
movq 0x10(%rbx), %rsi
movq 0x18(%rbx), %rcx
subq %rsi, %rcx
sarq $0x2, %rcx
testq %rcx, %rcx
jle 0x3ffd
movq %rcx, %rax
shrq %rax
ucomiss (%rsi,%rax,4), %xmm0
jbe 0x3ff5
leaq (%rsi,%rax,4), %rsi
addq $0x4, %rsi
notq %rax
addq %rcx, %rax
movq %rax, %rcx
testq %rax, %rax
jg 0x3fde
leaq -0xc(%rbp), %rdx
callq 0x4236
movq 0x10(%rbx), %rax
movq 0x18(%rbx), %rdx
subq %rax, %rdx
sarq $0x2, %rdx
movq %rax, %rcx
testq %rdx, %rdx
jle 0x4047
movss -0xc(%rbp), %xmm0
movq %rax, %rcx
movq %rdx, %rsi
shrq %rsi
ucomiss (%rcx,%rsi,4), %xmm0
jbe 0x403f
leaq (%rcx,%rsi,4), %rcx
addq $0x4, %rcx
notq %rsi
addq %rdx, %rsi
movq %rsi, %rdx
testq %rsi, %rsi
jg 0x4028
movq 0x28(%rbx), %rdx
addq $0x28, %rbx
subq %rax, %rcx
leaq (%rdx,%rcx,2), %rsi
addq $0x8, %rsi
leaq -0x18(%rbp), %rdx
movq %rbx, %rdi
callq 0x42ca
addq $0x18, %rsp
popq %rbx
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O1/deepaktabraham[P]BPlus-Tree/src/internalnode.cpp
// Function: InternalNode::Insert(float, Node*, Node*)
void InternalNode :: Insert(float key, Node* leftChild, Node* rightChild)
{
	// insert key, left child and right child
	keys.push_back(key);
	children.push_back(leftChild);
	children.push_back(rightChild);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
subq $0x20, %rsp
movq %rdi, %rbx
movss %xmm0, -0x14(%rbp)
movq %rsi, -0x28(%rbp)
movq %rdx, -0x20(%rbp)
movq 0x18(%rdi), %rsi
cmpq 0x20(%rdi), %rsi
je 0x40a1
movss %xmm0, (%rsi)
addq $0x4, %rsi
movq %rsi, 0x18(%rbx)
jmp 0x40ae
leaq 0x10(%rbx), %rdi
leaq -0x14(%rbp), %rdx
callq 0x43cc
leaq 0x28(%rbx), %r14
movq 0x30(%rbx), %rsi
cmpq 0x38(%rbx), %rsi
je 0x40ca
movq -0x28(%rbp), %rax
movq %rax, (%rsi)
addq $0x8, 0x30(%rbx)
jmp 0x40d6
leaq -0x28(%rbp), %rdx
movq %r14, %rdi
callq 0x44ea
movq 0x30(%rbx), %rsi
cmpq 0x38(%rbx), %rsi
je 0x40ee
movq -0x20(%rbp), %rax
movq %rax, (%rsi)
addq $0x8, 0x30(%rbx)
jmp 0x40fa
leaq -0x20(%rbp), %rdx
movq %r14, %rdi
callq 0x44ea
addq $0x20, %rsp
popq %rbx
popq %r14
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O1/deepaktabraham[P]BPlus-Tree/src/internalnode.cpp
// Function: InternalNode::Split(float*)
Node* InternalNode :: Split(float* keyToParent)
{
	int length = keys.size();

	// create a new right internal node
	InternalNode* rightNode = new InternalNode;

	// key to be moved up to the parent is the middle element in the current internal node
	*keyToParent = keys[length/2];

	// Copy the second half of the current internal node excluding the middle element to the 
	// new right internal node. Erase the second half of the current internal node including 
	// the middle element, and thus current internal node becomes the left internal node.
	rightNode->keys.assign(keys.begin() + (length/2 + 1), keys.end());
	rightNode->children.assign(children.begin() + (length/2 + 1), children.end());
	keys.erase(keys.begin() + length/2, keys.end());
	children.erase(children.begin() + (length/2 + 1), children.end());

	// return the new right internal node
	return rightNode;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rsi, -0x38(%rbp)
movq %rdi, %rbx
movq 0x10(%rdi), %r12
movq 0x18(%rdi), %r13
movq %r13, -0x40(%rbp)
subq %r12, %r13
shrq $0x2, %r13
movl $0x40, %edi
callq 0x2170
movq %rax, %r14
leaq 0x10(%rax), %rdi
xorps %xmm0, %xmm0
movups %xmm0, 0x10(%rax)
xorl %eax, %eax
movq %rax, 0x20(%r14)
leaq 0x4b8c(%rip), %rcx      # 0x8ce0
movq %rcx, (%r14)
leaq 0x28(%r14), %rcx
movq %rcx, -0x30(%rbp)
movups %xmm0, 0x28(%r14)
movq %rax, 0x38(%r14)
movb $0x0, 0x8(%r14)
movl %r13d, %eax
shrl $0x1f, %eax
addl %r13d, %eax
sarl %eax
movslq %eax, %r15
leaq (,%r15,4), %r13
leaq (%r12,%r15,4), %rsi
addq $0x4, %rsi
movss -0x4(%rsi), %xmm0
movq -0x38(%rbp), %rax
movss %xmm0, (%rax)
leaq 0x1(%r15), %r12
movq -0x40(%rbp), %rdx
callq 0x4624
leaq 0x8(,%r15,8), %rsi
addq 0x28(%rbx), %rsi
movq 0x30(%rbx), %rdx
movq -0x30(%rbp), %rdi
callq 0x4720
addq 0x10(%rbx), %r13
movq 0x18(%rbx), %rax
cmpq %rax, %r13
je 0x41e1
movq 0x18(%rbx), %rcx
movq %rcx, %rdx
subq %rax, %rdx
addq %rdx, %r13
cmpq %r13, %rcx
je 0x41e1
movq %r13, 0x18(%rbx)
shlq $0x3, %r12
addq 0x28(%rbx), %r12
movq 0x30(%rbx), %rax
cmpq %rax, %r12
je 0x4208
movq 0x30(%rbx), %rcx
movq %rcx, %rdx
subq %rax, %rdx
addq %rdx, %r12
cmpq %r12, %rcx
je 0x4208
movq %r12, 0x30(%rbx)
movq %r14, %rax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/deepaktabraham[P]BPlus-Tree/src/leafnode.cpp
// Function: LeafNode::Insert(float, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>)
void LeafNode :: Insert(float key, string value)
{
	// search for the key in the given leaf node
	vector<float>::iterator index = lower_bound(keys.begin(), keys.end(), key);

	// check if inserting a duplicate value for an existing key
	if((0 != keys.size()) && (key == keys[index - keys.begin()]))
	{
		// add the duplicate value for the given key
		values[index - keys.begin()].push_back(value);
	}

	// if inserting a new key and value
	else
	{
		// insert the new key
		keys.insert(index, key);

		//insert the corresponding value
		vector<string> newValue;
		newValue.push_back(value);
		index = lower_bound(keys.begin(), keys.end(), key);	
		values.insert(values.begin() + (index - keys.begin()), newValue);
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
subq $0x20, %rsp
movq %rsi, %r14
movq %rdi, %rbx
movss %xmm0, -0x14(%rbp)
movq 0x10(%rdi), %rax
movq 0x18(%rdi), %rcx
movq %rcx, %rdx
subq %rax, %rdx
sarq $0x2, %rdx
movq %rax, %rsi
testq %rdx, %rdx
jle 0x48a3
movq %rax, %rsi
movq %rdx, %rdi
shrq %rdi
ucomiss (%rsi,%rdi,4), %xmm0
jbe 0x489b
leaq (%rsi,%rdi,4), %rsi
addq $0x4, %rsi
notq %rdi
addq %rdx, %rdi
movq %rdi, %rdx
testq %rdi, %rdi
jg 0x4884
cmpq %rax, %rcx
je 0x48d6
movss (%rsi), %xmm1
ucomiss %xmm0, %xmm1
jne 0x48d6
jp 0x48d6
subq %rax, %rsi
shrq $0x2, %rsi
leaq (%rsi,%rsi,2), %rdi
shlq $0x3, %rdi
addq 0x38(%rbx), %rdi
movq %r14, %rsi
addq $0x20, %rsp
popq %rbx
popq %r14
popq %rbp
jmp 0x4ae8
leaq 0x10(%rbx), %rdi
leaq -0x14(%rbp), %rdx
callq 0x4236
xorps %xmm0, %xmm0
leaq -0x30(%rbp), %rdi
movaps %xmm0, (%rdi)
movq $0x0, 0x10(%rdi)
movq %r14, %rsi
callq 0x4ae8
movq 0x10(%rbx), %rax
movq 0x18(%rbx), %rdx
subq %rax, %rdx
sarq $0x2, %rdx
movq %rax, %rcx
testq %rdx, %rdx
jle 0x493e
movss -0x14(%rbp), %xmm0
movq %rax, %rcx
movq %rdx, %rsi
shrq %rsi
ucomiss (%rcx,%rsi,4), %xmm0
jbe 0x4936
leaq (%rcx,%rsi,4), %rcx
addq $0x4, %rcx
notq %rsi
addq %rdx, %rsi
movq %rsi, %rdx
testq %rsi, %rsi
jg 0x491f
subq %rax, %rcx
shrq $0x2, %rcx
leaq (%rcx,%rcx,2), %rsi
shlq $0x3, %rsi
addq 0x38(%rbx), %rsi
addq $0x38, %rbx
leaq -0x30(%rbp), %rdx
movq %rbx, %rdi
callq 0x4b34
leaq -0x30(%rbp), %rdi
callq 0x3e70
addq $0x20, %rsp
popq %rbx
popq %r14
popq %rbp
retq
jmp 0x4975
movq %rax, %rbx
leaq -0x30(%rbp), %rdi
callq 0x3e70
movq %rbx, %rdi
callq 0x22a0
nop
// File: /workspace/github_cpp_makefile_star2_O1/deepaktabraham[P]BPlus-Tree/src/leafnode.cpp
// Function: LeafNode::Split(float*)
Node* LeafNode :: Split(float* keyToParent)
{
	// create a new right leaf node
	LeafNode* rightNode = new LeafNode;

	// key to be moved up to the parent is the middle element in the current leaf node
	*keyToParent = keys[keys.size()/2];

	// Copy the second half of the current leaf node to the new right leaf node. Erase the second
	// half of the current leaf node, and thus the current leaf node becomes the left leaf node.
	rightNode->keys.assign(keys.begin() + keys.size()/2, keys.end());
	rightNode->values.assign(values.begin() + values.size()/2, values.end());
	keys.erase(keys.begin() + keys.size()/2, keys.end());
	values.erase(values.begin() + values.size()/2, values.end());

	// link the leaf nodes to form a doubly linked list
	rightNode->next = next;
	rightNode->prev = this;
	next = rightNode;
	(rightNode->next)->prev = rightNode;

	// return the right leaf node
	return rightNode;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %r15
movq %rdi, %rbx
movl $0x50, %edi
callq 0x2170
movq %rax, %r14
leaq 0x10(%rax), %rdi
xorps %xmm0, %xmm0
movups %xmm0, 0x10(%rax)
xorl %eax, %eax
movq %rax, 0x20(%r14)
leaq 0x438d(%rip), %rcx      # 0x8d50
movq %rcx, (%r14)
leaq 0x38(%r14), %r12
movups %xmm0, 0x38(%r14)
movq %rax, 0x48(%r14)
movb $0x1, 0x8(%r14)
movq %r14, 0x28(%r14)
movq %r14, 0x30(%r14)
movq 0x10(%rbx), %rax
movq 0x18(%rbx), %rdx
movq %rdx, %rcx
subq %rax, %rcx
sarq %rcx
andq $-0x4, %rcx
leaq (%rax,%rcx), %rsi
movss (%rax,%rcx), %xmm0
movss %xmm0, (%r15)
callq 0x4624
leaq 0x38(%rbx), %r15
movq 0x38(%rbx), %rax
movq 0x40(%rbx), %rdx
movq %rdx, %rcx
subq %rax, %rcx
sarq $0x3, %rcx
movabsq $-0x5555555555555555, %r13 # imm = 0xAAAAAAAAAAAAAAAB
imulq %r13, %rcx
shrq %rcx
leaq (%rcx,%rcx,2), %rcx
leaq (%rax,%rcx,8), %rsi
movq %r12, %rdi
callq 0x52f4
movq 0x10(%rbx), %rdx
movq 0x18(%rbx), %rcx
movq %rcx, %rax
subq %rdx, %rax
sarq %rax
andq $-0x4, %rax
addq %rdx, %rax
cmpq %rcx, %rax
je 0x4a72
movq 0x18(%rbx), %rdx
movq %rdx, %rsi
subq %rcx, %rsi
addq %rsi, %rax
cmpq %rax, %rdx
je 0x4a72
movq %rax, 0x18(%rbx)
movq 0x38(%rbx), %rax
movq 0x40(%rbx), %rdx
movq %rdx, %rcx
subq %rax, %rcx
sarq $0x3, %rcx
imulq %r13, %rcx
shrq %rcx
leaq (%rcx,%rcx,2), %rcx
leaq (%rax,%rcx,8), %rsi
movq %r15, %rdi
callq 0x57d6
movq 0x30(%rbx), %rax
movq %rax, 0x30(%r14)
movq %rbx, 0x28(%r14)
movq %r14, 0x30(%rbx)
movq %r14, 0x28(%rax)
movq %r14, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O1/xocoder[P]m_kcptun/src/kcp_remote.cpp
// Function: remote_kcpin_create(tun_remote_t*)
static int
_remote_kcpin_create(tun_remote_t *tun) {
   ikcp_allocator(kcp_malloc, kcp_free);

   tun->kcpin = ikcp_create(tun->kcpconv, tun);
   if (tun->kcpin == NULL) {
      cerr << "Fail to create kcp in !" << endl;
      return 0;
   }

   ikcp_setoutput(tun->kcpin, _remote_kcpin_callback);
   ikcp_nodelay(tun->kcpin, tun->conf->nodelay, tun->conf->interval, tun->conf->resend, tun->conf->nc);
   ikcp_wndsize(tun->kcpin, tun->conf->snd_wndsize, tun->conf->rcv_wndsize);
   ikcp_setmtu(tun->kcpin, tun->conf->mtu);

   if (tun->conf->fast == 3) {
      tun->kcpin->rx_minrto = 20;
   } else if (tun->conf->fast == 2) {
      tun->kcpin->rx_minrto = 40;
   }
   return 1;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movq %rdi, %rbx
leaq -0x94e(%rip), %rdi      # 0x8338
leaq -0x93f(%rip), %rsi      # 0x834e
callq 0x25fc
movl 0x50(%rbx), %edi
movq %rbx, %rsi
callq 0x26d3
movq %rax, 0x48(%rbx)
testq %rax, %rax
je 0x8d31
leaq 0x1ce(%rip), %rsi       # 0x8e7f
movq %rax, %rdi
callq 0x2a21
movq 0x48(%rbx), %rdi
movq 0x78(%rbx), %rax
movl 0x130(%rax), %esi
movl 0x134(%rax), %edx
movl 0x138(%rax), %ecx
movl 0x13c(%rax), %r8d
callq 0x3e7b
movq 0x48(%rbx), %rdi
movq 0x78(%rbx), %rax
movl 0x128(%rax), %edx
movl 0x12c(%rax), %esi
callq 0x3ecc
movq 0x48(%rbx), %rdi
movq 0x78(%rbx), %rax
movl 0x140(%rax), %esi
callq 0x3dda
movq 0x78(%rbx), %rax
movl 0x144(%rax), %ecx
movl $0x1, %eax
cmpl $0x2, %ecx
je 0x8d77
cmpl $0x3, %ecx
jne 0x8d82
movq 0x48(%rbx), %rcx
movl $0x14, 0x34(%rcx)
jmp 0x8d82
movq 0x72b8(%rip), %rbx      # 0xfff0
leaq 0x332b(%rip), %rsi      # 0xc06a
movl $0x17, %edx
movq %rbx, %rdi
callq 0x22d0
movq (%rbx), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x2260
movsbl %al, %esi
movq %rbx, %rdi
callq 0x2040
movq %rax, %rdi
callq 0x21c0
xorl %eax, %eax
jmp 0x8d82
movq 0x48(%rbx), %rcx
movl $0x28, 0x34(%rcx)
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/xocoder[P]m_kcptun/src/kcp_remote.cpp
// Function: remote_kcpin_reset(tun_remote_t*, unsigned int)
static void
_remote_kcpin_reset(tun_remote_t *tun, uint32_t kcpconv) {
   
   cout << "udp & kcp reset " << kcpconv << endl;
   tun->kcpconv = kcpconv;

   _remote_kcpin_destroy(tun);
   _remote_kcpin_create(tun);

   while (skt_count(tun->session_lst) > 0) {
      session_unit_t *u = (session_unit_t*)skt_popf(tun->session_lst);
      mnet_chann_close(u->tcp);
      session_destroy(NULL, u);
   }
   skt_destroy(tun->session_lst);
   tun->session_lst = skt_create();
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movl %esi, %r14d
movq %rdi, %rbx
movq 0x7207(%rip), %r15      # 0xffd0
leaq 0x3289(%rip), %rsi      # 0xc059
movl $0x10, %edx
movq %r15, %rdi
callq 0x22d0
movl %r14d, %esi
movq %r15, %rdi
callq 0x21b0
movq %rax, %r15
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %r15, %rdi
movl $0xa, %esi
callq 0x2260
movsbl %al, %esi
movq %r15, %rdi
callq 0x2040
movq %rax, %rdi
callq 0x21c0
movl %r14d, 0x50(%rbx)
movq 0x48(%rbx), %rdi
testq %rdi, %rdi
je 0x8e2c
callq 0x285a
movq $0x0, 0x48(%rbx)
movq %rbx, %rdi
callq 0x8c76
movq 0x58(%rbx), %rdi
callq 0x6de5
testl %eax, %eax
jle 0x8e62
movq 0x58(%rbx), %rdi
callq 0x7079
movq %rax, %r14
movq 0x8(%rax), %rdi
callq 0x463a
xorl %edi, %edi
movq %r14, %rsi
callq 0x84da
jmp 0x8e34
movq 0x58(%rbx), %rdi
callq 0x6d60
callq 0x6cb0
movq %rax, 0x58(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/tokuhirom[P]nanouri/t/../nanouri.hpp
// Function: nanouri::escape_uri(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)
static NANOURI_DECLARE std::string escape_uri(const std::string &src) {
  std::string dst;
  dst.reserve(src.size() * 3 + 1);
  for (unsigned int i = 0; i < src.size(); i++) {
    if (nanouri_isuric((unsigned char) src[i])) {
      dst += '%';
      dst += nanouri_hex_char((src[i] >> 4) & 0x0f);
      dst += nanouri_hex_char(src[i] & 0x0f);
    } else {
      dst += src[i];
    }
  }
  return dst;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rsi, %r14
movq %rdi, %rbx
leaq 0x10(%rdi), %r15
movq %r15, (%rdi)
movq $0x0, 0x8(%rdi)
movb $0x0, 0x10(%rdi)
movq 0x8(%rsi), %rax
leaq (%rax,%rax,2), %rsi
incq %rsi
callq 0x2190
cmpq $0x0, 0x8(%r14)
je 0x24e4
movl $0x1, %ebp
xorl %r12d, %r12d
movq (%r14), %rax
movzbl (%rax,%r12), %edi
callq 0x32e8
testl %eax, %eax
je 0x24c7
movq %rbx, %rdi
movl $0x25, %esi
callq 0x20f0
movq (%r14), %rax
movzbl (%rax,%r12), %edi
shrl $0x4, %edi
callq 0x32f6
movsbl %al, %esi
movq %rbx, %rdi
callq 0x20f0
movq (%r14), %rax
movzbl (%rax,%r12), %edi
andl $0xf, %edi
callq 0x32f6
jmp 0x24ce
movq (%r14), %rax
movb (%rax,%r12), %al
movsbl %al, %esi
movq %rbx, %rdi
callq 0x20f0
movl %ebp, %r12d
incl %ebp
cmpq %r12, 0x8(%r14)
ja 0x247c
movq %rbx, %rax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
jmp 0x24f2
movq %rax, %r14
movq (%rbx), %rdi
cmpq %r15, %rdi
je 0x2508
movq (%r15), %rsi
incq %rsi
callq 0x2120
movq %r14, %rdi
callq 0x21c0
// File: /workspace/github_cpp_makefile_star2_O1/tokuhirom[P]nanouri/t/../nanouri.hpp
// Function: nanouri::unescape_uri(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)
static NANOURI_DECLARE std::string unescape_uri(const std::string &src) {
  std::string dst;
  dst.reserve(src.size() * 3 + 1);
  for (unsigned int i = 0; i < src.size(); i++) {
    if (src[i] == '%') {
      unsigned char c;
      if (src[++i] != '\0') {
        c = unhex(src[i]) << 4;
      }
      if (src[++i] != '\0') {
        c += unhex(src[i]);
      }
      dst += c;
    } else {
      dst += src[i];
    }
  }
  return dst;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %rbx
leaq 0x10(%rdi), %r15
movq %r15, (%rdi)
movq $0x0, 0x8(%rdi)
movb $0x0, 0x10(%rdi)
movq 0x8(%rsi), %rax
leaq (%rax,%rax,2), %rsi
incq %rsi
callq 0x2190
cmpq $0x0, 0x8(%r14)
je 0x25d5
xorl %r12d, %r12d
movl $0xd0, %ebp
movq (%r14), %rax
movb (%rax,%r12), %cl
cmpb $0x25, %cl
jne 0x25c1
leal 0x1(%r12), %ecx
movb (%rax,%rcx), %cl
testb %cl, %cl
je 0x2586
leal -0x30(%rcx), %edx
xorl %esi, %esi
cmpb $0xa, %dl
setae %sil
leal (%rsi,%rsi,8), %r13d
addb %cl, %r13b
shlb $0x4, %r13b
addl $0x2, %r12d
movb (%rax,%r12), %al
testb %al, %al
je 0x25b3
leal -0x30(%rax), %ecx
leal -0x41(%rax), %edx
cmpb $0x6, %dl
setb %dl
shlb $0x5, %dl
addb $-0x57, %dl
cmpb $0xa, %cl
movzbl %dl, %ecx
cmovbl %ebp, %ecx
addb %al, %r13b
addb %cl, %r13b
movsbl %r13b, %esi
movq %rbx, %rdi
callq 0x20f0
jmp 0x25cc
movsbl %cl, %esi
movq %rbx, %rdi
callq 0x20f0
incl %r12d
cmpq %r12, 0x8(%r14)
ja 0x2557
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x25eb
jmp 0x25eb
movq %rax, %r14
movq (%rbx), %rdi
cmpq %r15, %rdi
je 0x2601
movq (%r15), %rsi
incq %rsi
callq 0x2120
movq %r14, %rdi
callq 0x21c0
// File: /workspace/github_cpp_makefile_star2_O1/tokuhirom[P]nanouri/t/nanotap.h
// Function: void is<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>>, char const*)
inline NANOTAP_DECLARE void is(T got, T expected, const char *msg) {
    if (got == expected) {
        ok(true, msg);
    } else {
        ok(false, msg);
        std::cout << "  # got      : " << got << std::endl;
        std::cout << "  # expected : " << expected << std::endl;
    }
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdx, %r15
movq %rsi, %rbx
movq %rdi, %r14
movq 0x8(%rdi), %rdx
cmpq 0x8(%rsi), %rdx
jne 0x27da
testq %rdx, %rdx
je 0x28b1
movq (%rbx), %rsi
movq (%r14), %rdi
callq 0x2130
testl %eax, %eax
je 0x28b1
movl 0x392c(%rip), %edx      # 0x610c
incl %edx
movl %edx, 0x3924(%rip)      # 0x610c
testq %r15, %r15
leaq 0x1831(%rip), %rcx      # 0x4023
cmovneq %r15, %rcx
leaq 0x1807(%rip), %rdi      # 0x4004
leaq 0x180c(%rip), %rsi      # 0x4010
xorl %eax, %eax
callq 0x2040
movq 0x37be(%rip), %r15      # 0x5fd0
leaq 0x18ac(%rip), %rsi      # 0x40c5
movl $0xf, %edx
movq %r15, %rdi
callq 0x2140
movq (%r14), %rsi
movq 0x8(%r14), %rdx
movq %r15, %rdi
callq 0x2140
movq %rax, %r14
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %r14, %rdi
movl $0xa, %esi
callq 0x2110
movsbl %al, %esi
movq %r14, %rdi
callq 0x2030
movq %rax, %rdi
callq 0x20a0
leaq 0x186f(%rip), %rsi      # 0x40d5
movl $0xf, %edx
movq %r15, %rdi
callq 0x2140
movq (%rbx), %rsi
movq 0x8(%rbx), %rdx
movq %r15, %rdi
callq 0x2140
movq %rax, %rbx
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x2110
movsbl %al, %esi
movq %rbx, %rdi
callq 0x2030
movq %rax, %rdi
popq %rbx
popq %r14
popq %r15
jmp 0x20a0
movl 0x3855(%rip), %edx      # 0x610c
incl %edx
testq %r15, %r15
leaq 0x1760(%rip), %rcx      # 0x4023
cmovneq %r15, %rcx
movl %edx, 0x383f(%rip)      # 0x610c
leaq 0x1730(%rip), %rdi      # 0x4004
leaq 0x1739(%rip), %rsi      # 0x4014
xorl %eax, %eax
popq %rbx
popq %r14
popq %r15
jmp 0x2040