LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_cpp_makefile_star2_O3/wandernauta[P]ttasks/TodoList.cpp
// Function: TodoList::erase(int)
void TodoList::erase(int num) {
  if (tasks.count(num)) {
    std::cout << "Erased #" << num << ": " << tasks[num] << std::endl;
    tasks.erase(num);
    write();
  } else {
    std::cerr << "There is no task #" << num << "." << std::endl;
  }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movl %esi, %ebp
movl %esi, 0x4(%rsp)
movq 0x10(%rdi), %rax
testq %rax, %rax
je 0x32d5
movq %rdi, %rbx
leaq 0x8(%rdi), %rdx
movq %rdx, %rcx
xorl %esi, %esi
cmpl %ebp, 0x20(%rax)
setl %sil
cmovgeq %rax, %rcx
movq 0x10(%rax,%rsi,8), %rax
testq %rax, %rax
jne 0x32b4
cmpq %rdx, %rcx
je 0x32d5
cmpl %ebp, 0x20(%rcx)
jle 0x3342
movq 0x3d14(%rip), %rbx      # 0x6ff0
leaq 0xf20(%rip), %rsi       # 0x4203
movl $0x12, %edx
movq %rbx, %rdi
callq 0x2230
movq %rbx, %rdi
movl %ebp, %esi
callq 0x2320
movq %rax, %rbx
leaq 0xdb2(%rip), %rsi       # 0x40b6
movl $0x1, %edx
movq %rax, %rdi
callq 0x2230
movq (%rbx), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x21c0
movsbl %al, %esi
movq %rbx, %rdi
callq 0x2030
movq %rax, %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0x2140
movq 0x3c87(%rip), %r14      # 0x6fd0
leaq 0xeaa(%rip), %rsi       # 0x41fa
movl $0x8, %edx
movq %r14, %rdi
callq 0x2230
movq %r14, %rdi
movl %ebp, %esi
callq 0x2320
movq %rax, %r15
leaq 0xe86(%rip), %rsi       # 0x41f7
movl $0x2, %edx
movq %rax, %rdi
callq 0x2230
leaq 0x4(%rsp), %r14
movq %rbx, %rdi
movq %r14, %rsi
callq 0x36c2
movq (%rax), %rsi
movq 0x8(%rax), %rdx
movq %r15, %rdi
callq 0x2230
movq %rax, %r15
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %r15, %rdi
movl $0xa, %esi
callq 0x21c0
movsbl %al, %esi
movq %r15, %rdi
callq 0x2030
movq %rax, %rdi
callq 0x2140
movq %rbx, %rdi
movq %r14, %rsi
callq 0x3e4e
movq %rbx, %rdi
movq %rax, %rsi
callq 0x3ecc
movq %rbx, %rdi
callq 0x3154
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/wandernauta[P]ttasks/TodoList.cpp
// Function: TodoList::get[abi:cxx11](int)
std::string TodoList::get(int num) {
  std::ostringstream oss;
  oss << num;
  oss << ". ";
  oss << tasks[num];
  return oss.str();
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x188, %rsp            # imm = 0x188
movl %edx, %ebp
movq %rsi, %r14
movq %rdi, %rbx
movl %edx, 0xc(%rsp)
leaq 0x10(%rsp), %r15
movq %r15, %rdi
callq 0x2280
movq %r15, %rdi
movl %ebp, %esi
callq 0x2320
leaq 0xd32(%rip), %rsi       # 0x4159
leaq 0x10(%rsp), %rdi
movl $0x2, %edx
callq 0x2230
leaq 0xc(%rsp), %rsi
movq %r14, %rdi
callq 0x36c2
movq (%rax), %rsi
movq 0x8(%rax), %rdx
leaq 0x10(%rsp), %rdi
callq 0x2230
leaq 0x18(%rsp), %rsi
movq %rbx, %rdi
callq 0x22f0
movq 0x3b60(%rip), %rsi      # 0x6fc8
leaq 0x10(%rsp), %rdi
callq 0x2100
leaq 0x80(%rsp), %rdi
callq 0x20a0
movq %rbx, %rax
addq $0x188, %rsp            # imm = 0x188
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
movq 0x3b2e(%rip), %rsi      # 0x6fc8
leaq 0x10(%rsp), %rdi
callq 0x2100
leaq 0x80(%rsp), %rdi
callq 0x20a0
movq %rbx, %rdi
callq 0x2330
nop
// File: /workspace/github_cpp_makefile_star2_O3/wandernauta[P]ttasks/TodoList.cpp
// Function: TodoList::reorder()
void TodoList::reorder() {
  int i = 1;
  tmap tnew;
  tmap::iterator it;

  for (it = tasks.begin(); it != tasks.end(); ++it) {
    tnew[i] = it->second;
    i++;
  }

  tasks = tnew;
  write();
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x40, %rsp
movq %rdi, %rbx
movl $0x1, 0xc(%rsp)
leaq 0x18(%rsp), %rax
movl $0x0, (%rax)
xorl %ecx, %ecx
movq %rcx, 0x8(%rax)
movq %rax, 0x10(%rax)
movq %rax, 0x18(%rax)
movq %rcx, 0x20(%rax)
movq 0x18(%rdi), %r14
leaq 0x8(%rdi), %r13
cmpq %r13, %r14
je 0x3613
leaq 0x10(%rsp), %r15
leaq 0xc(%rsp), %r12
movq %r15, %rdi
movq %r12, %rsi
callq 0x36c2
leaq 0x28(%r14), %rsi
movq %rax, %rdi
callq 0x2110
incl 0xc(%rsp)
movq %r14, %rdi
callq 0x2150
movq %rax, %r14
cmpq %r13, %rax
jne 0x35e8
leaq 0x10(%rsp), %rsi
movq %rbx, %rdi
callq 0x3846
movq %rbx, %rdi
callq 0x3154
leaq 0x10(%rsp), %rdi
callq 0x29b2
addq $0x40, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
jmp 0x3642
movq %rax, %rbx
leaq 0x10(%rsp), %rdi
callq 0x29b2
movq %rbx, %rdi
callq 0x2330
nop
// File: /workspace/github_cpp_makefile_star2_O3/nishalkulkarni[P]fluid-wm/util.cpp
// Function: XConfigureWindowValueMaskToString[abi:cxx11](unsigned long)
std::string XConfigureWindowValueMaskToString(unsigned long value_mask)
{
    std::vector<std::string> masks;
    if (value_mask & CWX) {
        masks.emplace_back("X");
    }
    if (value_mask & CWY) {
        masks.emplace_back("Y");
    }
    if (value_mask & CWWidth) {
        masks.emplace_back("Width");
    }
    if (value_mask & CWHeight) {
        masks.emplace_back("Height");
    }
    if (value_mask & CWBorderWidth) {
        masks.emplace_back("BorderWidth");
    }
    if (value_mask & CWSibling) {
        masks.emplace_back("Sibling");
    }
    if (value_mask & CWStackMode) {
        masks.emplace_back("StackMode");
    }
    return Join(masks, "|");
}

// Assembly:
pushq %r14
pushq %rbx
subq $0x38, %rsp
movq %rsi, %r14
movq %rdi, %rbx
xorps %xmm0, %xmm0
movaps %xmm0, (%rsp)
movq $0x0, 0x10(%rsp)
testb $0x1, %r14b
je 0x4551
leaq 0x5f42(%rip), %rsi      # 0xa48b
movq %rsp, %rdi
callq 0x4d2a
testb $0x2, %r14b
je 0x4566
leaq 0x5f2f(%rip), %rsi      # 0xa48d
movq %rsp, %rdi
callq 0x4d2a
testb $0x4, %r14b
je 0x457b
leaq 0x5f29(%rip), %rsi      # 0xa49c
movq %rsp, %rdi
callq 0x4d88
testb $0x8, %r14b
je 0x4590
leaq 0x5f07(%rip), %rsi      # 0xa48f
movq %rsp, %rdi
callq 0x4de6
testb $0x10, %r14b
je 0x45a5
leaq 0x5ef9(%rip), %rsi      # 0xa496
movq %rsp, %rdi
callq 0x4e44
testb $0x20, %r14b
je 0x45ba
leaq 0x5ef0(%rip), %rsi      # 0xa4a2
movq %rsp, %rdi
callq 0x4ea2
testb $0x40, %r14b
je 0x45cf
leaq 0x5ee3(%rip), %rsi      # 0xa4aa
movq %rsp, %rdi
callq 0x4f00
leaq 0x28(%rsp), %r14
movq %r14, -0x10(%r14)
leaq 0x5ed5(%rip), %rsi      # 0xa4b4
leaq 0x5ecf(%rip), %rdx      # 0xa4b5
leaq 0x18(%rsp), %rdi
callq 0x62f8
movq %rsp, %rsi
leaq 0x18(%rsp), %rdx
movq %rbx, %rdi
callq 0x4f5d
movq 0x18(%rsp), %rdi
cmpq %r14, %rdi
je 0x4617
movq 0x28(%rsp), %rsi
incq %rsi
callq 0x3250
movq %rsp, %rdi
callq 0x5020
movq %rbx, %rax
addq $0x38, %rsp
popq %rbx
popq %r14
retq
movq %rax, %rbx
movq 0x18(%rsp), %rdi
cmpq %r14, %rdi
je 0x464b
movq 0x28(%rsp), %rsi
incq %rsi
callq 0x3250
jmp 0x464b
jmp 0x4648
movq %rax, %rbx
movq %rsp, %rdi
callq 0x5020
movq %rbx, %rdi
callq 0x3430
// File: /workspace/github_cpp_makefile_star2_O3/nishalkulkarni[P]fluid-wm/./util.hpp
// Function: std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> Join<std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>>>(std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>> const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)
::std::string Join(const Container& container, const ::std::string& delimiter)
{
    ::std::ostringstream out;
    for (auto i = container.cbegin(); i != container.cend(); ++i) {
        if (i != container.cbegin()) {
            out << delimiter;
        }
        out << *i;
    }
    return out.str();
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x180, %rsp            # imm = 0x180
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %rbx
leaq 0x8(%rsp), %rdi
callq 0x3300
movq (%r15), %r13
cmpq 0x8(%r15), %r13
je 0x4fbc
leaq 0x8(%rsp), %r12
cmpq (%r15), %r13
je 0x4fa2
movq (%r14), %rsi
movq 0x8(%r14), %rdx
movq %r12, %rdi
callq 0x32a0
movq (%r13), %rsi
movq 0x8(%r13), %rdx
movq %r12, %rdi
callq 0x32a0
addq $0x20, %r13
cmpq 0x8(%r15), %r13
jne 0x4f8e
leaq 0x10(%rsp), %rsi
movq %rbx, %rdi
callq 0x33c0
movq 0xa000(%rip), %rsi      # 0xefd0
leaq 0x8(%rsp), %rdi
callq 0x3110
leaq 0x78(%rsp), %rdi
callq 0x30a0
movq %rbx, %rax
addq $0x180, %rsp            # imm = 0x180
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
jmp 0x4ffa
movq %rax, %rbx
movq 0x9fcc(%rip), %rsi      # 0xefd0
leaq 0x8(%rsp), %rdi
callq 0x3110
leaq 0x78(%rsp), %rdi
callq 0x30a0
movq %rbx, %rdi
callq 0x3430
// File: /workspace/github_cpp_makefile_star2_O3/nishalkulkarni[P]fluid-wm/bsp.cpp
// Function: Node::split_node(unsigned long)
std::tuple<Node*, Node*> Node::split_node(Window new_window)
{
    Node* left_child = new Node();
    Node* right_child = new Node();

    left_child->set_window(this->window);
    right_child->set_window(new_window);

    int split_width = this->width, split_height = this->height;
    int split_x = this->x, split_y = this->y;
    if (this->width >= this->height) {
        split_width /= 2;
        split_x += split_width;
        left_child->set_dimensions(split_width, this->height, this->x, this->y);
        right_child->set_dimensions(this->width - split_width, this->height, split_x, this->y);
    } else if (this->width < this->height) {
        split_height /= 2;
        split_y += split_height;
        left_child->set_dimensions(this->width, split_height, this->x, this->y);
        right_child->set_dimensions(this->width, this->height - split_height, this->x, split_y);
    }

    set_children(left_child, right_child);

    return std::make_tuple(left_child, right_child);
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %r12
movq %rsi, %r14
movq %rdi, %rbx
movl $0x28, %edi
callq 0x3230
movq %rax, %r15
xorps %xmm0, %xmm0
movups %xmm0, 0x18(%rax)
movl $0x28, %edi
callq 0x3230
xorps %xmm0, %xmm0
movups %xmm0, 0x18(%rax)
movq 0x10(%r14), %rcx
movq %rcx, 0x10(%r15)
movq %r12, 0x10(%rax)
movl (%r14), %esi
movl 0x4(%r14), %edi
movl 0x8(%r14), %ecx
movl 0xc(%r14), %edx
cmpl %edi, %esi
jge 0x705f
movl %edi, %r8d
shrl $0x1f, %r8d
addl %edi, %r8d
sarl %r8d
leal (%rdx,%r8), %r9d
movl %edi, %r11d
subl %r8d, %r11d
movl %r8d, %edi
movl %esi, %r10d
movl %ecx, %r8d
jmp 0x707f
movl %esi, %r9d
shrl $0x1f, %r9d
addl %esi, %r9d
sarl %r9d
leal (%rcx,%r9), %r8d
movl %esi, %r10d
subl %r9d, %r10d
movl %r9d, %esi
movl %edi, %r11d
movl %edx, %r9d
movl %esi, (%r15)
movl %edi, 0x4(%r15)
movl %ecx, 0x8(%r15)
movl %edx, 0xc(%r15)
movl %r10d, (%rax)
movl %r11d, 0x4(%rax)
movl %r8d, 0x8(%rax)
movl %r9d, 0xc(%rax)
movq %r15, 0x18(%r14)
movq %rax, 0x20(%r14)
movq %rax, (%rbx)
movq %r15, 0x8(%rbx)
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/nishalkulkarni[P]fluid-wm/bsp.cpp
// Function: BSP::find_node(unsigned long)
Node* BSP::find_node(Window w)
{
    if (root == nullptr) {
        std::cout << "No root window present\n";
    }
    Node* res = find_node_util(w, root);
    if (res == nullptr) {
        std::cout << "Window not found\n";
    }
    return res;
}

// Assembly:
pushq %rbx
movq (%rdi), %rax
testq %rax, %rax
jne 0x7173
movq %rdi, %rbx
movq 0x7e79(%rip), %rdi      # 0xefd8
leaq 0x3a5f(%rip), %rsi      # 0xabc5
movl $0x17, %edx
callq 0x32a0
movq (%rbx), %rax
movq 0x20(%rax), %rcx
movq 0x18(%rax), %rdx
orq %rcx, %rdx
je 0x7189
movq %rcx, %rax
movq 0x20(%rcx), %rcx
jmp 0x7177
popq %rbx
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/nishalkulkarni[P]fluid-wm/bsp.cpp
// Function: BSP::create_node(unsigned long)
std::tuple<Node*, Node*> BSP::create_node(Window w)
{
    Node* current = find_node(w);
    if (current == nullptr) {
        std::cout << "Cannot create new window\n";
        return std::make_tuple(nullptr, nullptr);
    } else {
        return current->split_node(w);
    }
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdx, %r14
movq %rdi, %rbx
movq %rsi, %rdi
callq 0x714c
testq %rax, %rax
je 0x71b3
movq %rbx, %rdi
movq %rax, %rsi
movq %r14, %rdx
callq 0x6fe8
jmp 0x71d1
movq 0x7e1e(%rip), %rdi      # 0xefd8
leaq 0x3a1c(%rip), %rsi      # 0xabdd
movl $0x19, %edx
callq 0x32a0
xorps %xmm0, %xmm0
movups %xmm0, (%rbx)
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_cpp_makefile_star2_O3/nishalkulkarni[P]fluid-wm/bsp.cpp
// Function: BSP::find_to_delete_node(unsigned long, Node*)
std::tuple<Node*, Node*> BSP::find_to_delete_node(Window w, Node* current)
{
    if (current == nullptr) {
        std::cout << "Node to delete not found.\n";
        return std::make_tuple(nullptr, nullptr);
    }

    if (current->is_leaf() && current == root && current->get_window() == w) {
        return std::make_tuple(current, nullptr);
    }

    if (current->is_leaf() == false && current->get_left_child()->is_leaf()
        && current->get_left_child()->get_window() == w) {
        return std::make_tuple(current->get_left_child(), current);
    } else if (current->is_leaf() == false && current->get_right_child()->is_leaf()
        && current->get_right_child()->get_window() == w) {
        return std::make_tuple(current->get_right_child(), current);
    } else {
        Node* foundWindow;
        Node* foundParentWindow;
        std::tie(foundWindow, foundParentWindow) = find_to_delete_node(w, current->get_right_child());
        if (foundWindow == nullptr && foundParentWindow == nullptr) {
            std::tie(foundWindow, foundParentWindow) = find_to_delete_node(w, current->get_left_child());
        }
        return std::make_tuple(foundWindow, foundParentWindow);
    }
    return std::make_tuple(nullptr, nullptr);
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x10, %rsp
movq %rdi, %rbx
testq %rcx, %rcx
je 0x7226
movq %rcx, %r14
movq %rdx, %r15
movq %rsi, %r12
movq 0x18(%rcx), %rax
movq 0x20(%rcx), %rcx
movq %rcx, %rdx
orq %rax, %rdx
jne 0x7246
cmpq %r14, (%r12)
jne 0x7274
cmpq %r15, 0x10(%r14)
jne 0x7274
movq $0x0, (%rbx)
movq %r14, 0x8(%rbx)
jmp 0x72b8
movq 0x7dab(%rip), %rdi      # 0xefd8
leaq 0x39c3(%rip), %rsi      # 0xabf7
movl $0x1a, %edx
callq 0x32a0
xorps %xmm0, %xmm0
movups %xmm0, (%rbx)
jmp 0x72b8
movq 0x20(%rax), %rdx
orq 0x18(%rax), %rdx
jne 0x725f
cmpq %r15, 0x10(%rax)
jne 0x725f
movq %r14, (%rbx)
movq %rax, 0x8(%rbx)
jmp 0x72b8
movq 0x20(%rcx), %rax
orq 0x18(%rcx), %rax
jne 0x7274
cmpq %r15, 0x10(%rcx)
jne 0x7274
movq %r14, (%rbx)
jmp 0x72b4
movq %rsp, %r13
movq %r13, %rdi
movq %r12, %rsi
movq %r15, %rdx
callq 0x71dc
movq (%r13), %rax
movq 0x8(%r13), %rcx
movq %rax, %rdx
orq %rcx, %rdx
jne 0x72b1
movq 0x18(%r14), %rcx
movq %rsp, %r14
movq %r14, %rdi
movq %r12, %rsi
movq %r15, %rdx
callq 0x71dc
movq (%r14), %rax
movq 0x8(%r14), %rcx
movq %rax, (%rbx)
movq %rcx, 0x8(%rbx)
movq %rbx, %rax
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/nishalkulkarni[P]fluid-wm/bsp.cpp
// Function: BSP::delete_node(unsigned long)
std::tuple<Node*, Node*> BSP::delete_node(Window w)
{
    Node* foundWindow;
    Node* foundParentWindow;
    std::tie(foundWindow, foundParentWindow) = find_to_delete_node(w, root);

    if (foundWindow == nullptr && foundParentWindow == nullptr) {
        std::cout << "No node found :((.\n";
        return std::make_tuple(nullptr, nullptr);
    } else if (foundWindow != nullptr && foundParentWindow == nullptr) {
        delete root;
        root = nullptr;
        return std::make_tuple(nullptr, nullptr);
    } else {
        if (foundWindow == foundParentWindow->get_left_child()) {
            delete foundWindow;
            foundParentWindow = foundParentWindow->get_right_child();
        } else if (foundWindow == foundParentWindow->get_right_child()) {
            delete foundWindow;
            foundParentWindow = foundParentWindow->get_left_child();
        }
    }

    return std::make_tuple(nullptr, nullptr);
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq %rsi, %r14
movq %rdi, %rbx
movq (%rsi), %rcx
movq %rsp, %r15
movq %r15, %rdi
callq 0x71dc
movq (%r15), %rax
movq 0x8(%r15), %rdi
movq %rdi, %rcx
orq %rax, %rcx
jne 0x7310
movq 0x7cdb(%rip), %rdi      # 0xefd8
leaq 0x390e(%rip), %rsi      # 0xac12
movl $0x13, %edx
callq 0x32a0
jmp 0x734f
testq %rax, %rax
sete %cl
testq %rdi, %rdi
setne %dl
andb %cl, %dl
cmpb $0x1, %dl
jne 0x7339
movq (%r14), %rdi
movl $0x28, %esi
callq 0x3250
movq $0x0, (%r14)
jmp 0x734f
cmpq 0x18(%rax), %rdi
je 0x7345
cmpq 0x20(%rax), %rdi
jne 0x734f
movl $0x28, %esi
callq 0x3250
xorps %xmm0, %xmm0
movups %xmm0, (%rbx)
movq %rbx, %rax
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O3/nishalkulkarni[P]fluid-wm/bsp.cpp
// Function: BSP::display_tree_util(Node*)
void BSP::display_tree_util(Node* current)
{
    if (current->get_left_child() != nullptr) {
        display_tree_util(current->get_left_child());
    }
    if (current->get_right_child() != nullptr) {
        display_tree_util(current->get_right_child());
    }
    current->print();
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
movq 0x18(%rsi), %rsi
testq %rsi, %rsi
je 0x737d
movq %r14, %rdi
callq 0x7362
movq 0x20(%rbx), %rsi
testq %rsi, %rsi
je 0x738e
movq %r14, %rdi
callq 0x7362
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x6f22
nop
// File: /workspace/github_cpp_makefile_star2_O3/nishalkulkarni[P]fluid-wm/master_stack.cpp
// Function: MasterStack::erase(unsigned long)
void MasterStack::erase(Window w)
{
    std::vector<Window>::iterator pos = find(stack.begin(), stack.end(), w);
    if (pos == stack.end()) {
        std::cout << "Error: Window not found\n";
        return;
    }
    stack.erase(pos);
}

// Assembly:
pushq %rbx
subq $0x10, %rsp
movq %rdi, %rbx
leaq 0x8(%rsp), %rdx
movq %rsi, (%rdx)
movq (%rdi), %rdi
movq 0x8(%rbx), %rsi
callq 0x76cf
movq 0x8(%rbx), %rdx
cmpq %rdx, %rax
je 0x7441
leaq 0x8(%rax), %rsi
cmpq %rdx, %rsi
je 0x7437
subq %rsi, %rdx
movq %rax, %rdi
callq 0x33d0
movq 0x8(%rbx), %rdx
addq $-0x8, %rdx
movq %rdx, 0x8(%rbx)
jmp 0x7459
movq 0x7b90(%rip), %rdi      # 0xefd8
leaq 0x37d7(%rip), %rsi      # 0xac26
movl $0x18, %edx
callq 0x32a0
addq $0x10, %rsp
popq %rbx
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/nishalkulkarni[P]fluid-wm/master_stack.cpp
// Function: MasterStack::swapMaster(unsigned long)
void MasterStack::swapMaster(Window stack_window)
{
    std::vector<Window>::iterator posCurrent = find(stack.begin(), stack.end(), stack[0]);
    std::vector<Window>::iterator posStack = find(stack.begin(), stack.end(), stack_window);
    if (posCurrent == stack.end() || posStack == stack.end()) {
        std::cout << "Error: Window not found\n";
        return;
    }
    std::swap(*posCurrent, *posStack);
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq %rdi, %r14
leaq 0x8(%rsp), %r15
movq %rsi, (%r15)
movq (%rdi), %rdi
movq 0x8(%r14), %rsi
movq %rdi, %rdx
callq 0x76cf
movq %rax, %rbx
movq (%r14), %rdi
movq 0x8(%r14), %rsi
movq %r15, %rdx
callq 0x76cf
movq 0x8(%r14), %rcx
cmpq %rcx, %rbx
sete %dl
cmpq %rcx, %rax
sete %cl
orb %dl, %cl
cmpb $0x1, %cl
jne 0x74c6
movq 0x7b25(%rip), %rdi      # 0xefd8
leaq 0x376c(%rip), %rsi      # 0xac26
movl $0x18, %edx
callq 0x32a0
jmp 0x74d2
movq (%rbx), %rcx
movq (%rax), %rdx
movq %rdx, (%rbx)
movq %rcx, (%rax)
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O3/nishalkulkarni[P]fluid-wm/priority_queue.cpp
// Function: PriorityQueue::heapify_down(int)
void PriorityQueue::heapify_down(int i)
{
    int left = LEFT(i);
    int right = RIGHT(i);

    int smallest = i;

    if (left < queueSize() && window[left].first < window[i].first)
        smallest = left;

    if (right < queueSize() && window[right].first < window[smallest].first)
        smallest = right;

    if (smallest != i) {
        std::swap(window[i], window[smallest]);
        heapify_down(smallest);
    }
}

// Assembly:
movq (%rdi), %rax
movq 0x8(%rdi), %rcx
subq %rax, %rcx
shrq $0x4, %rcx
leal 0x1(,%rsi,2), %r8d
movslq %esi, %rdx
movl %esi, %edi
cmpl %ecx, %r8d
jge 0x77d7
movslq %r8d, %rdi
shlq $0x4, %rdi
movl (%rax,%rdi), %edi
movq %rdx, %r9
shlq $0x4, %r9
cmpl (%rax,%r9), %edi
jl 0x77d4
movl %esi, %r8d
movl %r8d, %edi
leal 0x2(,%rsi,2), %r8d
cmpl %ecx, %r8d
jge 0x7802
movslq %r8d, %r9
shlq $0x4, %r9
movl (%rax,%r9), %r9d
movslq %edi, %r10
shlq $0x4, %r10
cmpl (%rax,%r10), %r9d
jl 0x77ff
movl %edi, %r8d
movl %r8d, %edi
cmpl %esi, %edi
je 0x783c
shlq $0x4, %rdx
movslq %edi, %rsi
shlq $0x4, %rsi
movl (%rax,%rdx), %r8d
movl (%rax,%rsi), %r9d
movl %r9d, (%rax,%rdx)
movl %r8d, (%rax,%rsi)
movq 0x8(%rax,%rdx), %r8
movq 0x8(%rax,%rsi), %r9
movq %r9, 0x8(%rax,%rdx)
movq %r8, 0x8(%rax,%rsi)
movl %edi, %esi
jmp 0x77a8
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/nishalkulkarni[P]fluid-wm/priority_queue.cpp
// Function: PriorityQueue::insert(unsigned long)
void PriorityQueue::insert(Window w)
{
    numWindows += 1;
    priority[w] = numWindows;
    window.push_back({ numWindows, w });

    int index = queueSize() - 1;
    heapify_up(index);
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
subq $0x20, %rsp
movq %rdi, %rbx
leaq 0x18(%rsp), %r14
movq %rsi, (%r14)
movl 0x50(%rdi), %ebp
incl %ebp
movl %ebp, 0x50(%rdi)
addq $0x18, %rdi
movq %r14, %rsi
callq 0x7bcc
movl %ebp, (%rax)
movl 0x50(%rbx), %eax
movl %eax, 0x8(%rsp)
movq (%r14), %rax
movq %rax, 0x10(%rsp)
movq 0x8(%rbx), %rsi
cmpq 0x10(%rbx), %rsi
je 0x7942
movups 0x8(%rsp), %xmm0
movups %xmm0, (%rsi)
movq 0x8(%rbx), %rsi
addq $0x10, %rsi
movq %rsi, 0x8(%rbx)
jmp 0x7953
leaq 0x8(%rsp), %rdx
movq %rbx, %rdi
callq 0x7e80
movq 0x8(%rbx), %rsi
subq (%rbx), %rsi
shrq $0x4, %rsi
decl %esi
movq %rbx, %rdi
callq 0x784a
addq $0x20, %rsp
popq %rbx
popq %r14
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/nishalkulkarni[P]fluid-wm/priority_queue.cpp
// Function: PriorityQueue::swapPriority(unsigned long, unsigned long)
void PriorityQueue::swapPriority(Window a,Window b){
    if(!priority.count(a) || !priority.count(b)){
        std::cout << "Swap window not found" << std::endl;
        return;
    }

    int temp = priority[a];
    priority[a] = priority[b];
    priority[b] = temp;

}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x10, %rsp
movq %rdi, %rbx
leaq 0x8(%rsp), %rax
movq %rsi, (%rax)
movq %rdx, (%rsp)
addq $0x18, %rbx
movq %rbx, %rdi
movq %rax, %rsi
callq 0x7fc0
testq %rax, %rax
je 0x7ae7
movq %rsp, %rsi
movq %rbx, %rdi
callq 0x7fc0
testq %rax, %rax
je 0x7ae7
leaq 0x8(%rsp), %r14
movq %rbx, %rdi
movq %r14, %rsi
callq 0x7bcc
movl (%rax), %ebp
movq %rsp, %r15
movq %rbx, %rdi
movq %r15, %rsi
callq 0x7bcc
movl (%rax), %r12d
movq %rbx, %rdi
movq %r14, %rsi
callq 0x7bcc
movl %r12d, (%rax)
movq %rbx, %rdi
movq %r15, %rsi
callq 0x7bcc
movl %ebp, (%rax)
jmp 0x7b29
movq 0x74ea(%rip), %rbx      # 0xefd8
leaq 0x316b(%rip), %rsi      # 0xac60
movl $0x15, %edx
movq %rbx, %rdi
callq 0x32a0
movq (%rbx), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x3220
movsbl %al, %esi
movq %rbx, %rdi
callq 0x3040
movq %rax, %rdi
callq 0x3180
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/nishalkulkarni[P]fluid-wm/fluid_wm.cpp
// Function: WindowManager::Create()
std::unique_ptr<WindowManager> WindowManager::Create()
{
    Display* display = XOpenDisplay(nullptr);
    if (display == nullptr) {
        std::cout << "Failed to open X display " << XDisplayName(nullptr) << std::endl;
        return nullptr;
    }
    std::unique_ptr<WindowManager> wmInstance(new WindowManager(display));
    return wmInstance;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %rbx
xorl %edi, %edi
callq 0x3310
testq %rax, %rax
je 0x8050
movq %rax, %r15
movl $0x78, %edi
callq 0x3230
movq %rax, %r14
movq %rax, %rdi
movq %r15, %rsi
callq 0x80fc
jmp 0x80d8
movq 0x6f81(%rip), %r14      # 0xefd8
leaq 0x2cba(%rip), %rsi      # 0xad18
movl $0x19, %edx
movq %r14, %rdi
callq 0x32a0
xorl %edi, %edi
callq 0x33a0
testq %rax, %rax
je 0x8096
movq %rax, %r15
movq %rax, %rdi
callq 0x30e0
movq 0x6f4f(%rip), %rdi      # 0xefd8
movq %r15, %rsi
movq %rax, %rdx
callq 0x32a0
jmp 0x80ae
movq (%r14), %rax
movq -0x18(%rax), %rax
leaq (%r14,%rax), %rdi
movl 0x20(%r14,%rax), %esi
orl $0x1, %esi
callq 0x3400
movq (%r14), %rax
movq -0x18(%rax), %rdi
addq %r14, %rdi
movl $0xa, %esi
callq 0x3220
movsbl %al, %esi
movq %r14, %rdi
callq 0x3040
movq %rax, %rdi
callq 0x3180
xorl %r14d, %r14d
movq %r14, (%rbx)
movq %rbx, %rax
popq %rbx
popq %r14
popq %r15
retq
movq %rax, %rbx
movl $0x78, %esi
movq %r14, %rdi
callq 0x3250
movq %rbx, %rdi
callq 0x3430
// File: /workspace/github_cpp_makefile_star2_O3/nishalkulkarni[P]fluid-wm/fluid_wm.cpp
// Function: WindowManager::OnXError(_XDisplay*, XErrorEvent*)
int WindowManager::OnXError(Display* display, XErrorEvent* e)
{
    const int MAX_ERROR_TEXT_LENGTH = 1024;
    char error_text[MAX_ERROR_TEXT_LENGTH];
    XGetErrorText(display, e->error_code, error_text, sizeof(error_text));

    std::cout << "Received X error:\n"
              << "    Request: " << int(e->request_code)
              << " - " << XRequestCodeToString(e->request_code) << "\n"
              << "    Error code: " << int(e->error_code)
              << " - " << error_text << "\n"
              << "    Resource ID: " << e->resourceid << "\n";
    return 0;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x420, %rsp            # imm = 0x420
movq %rsi, %rbx
movzbl 0x20(%rsi), %esi
leaq 0x20(%rsp), %rdx
movl $0x400, %ecx            # imm = 0x400
callq 0x3330
movq 0x6a8d(%rip), %r14      # 0xefd8
leaq 0x2cda(%rip), %rsi      # 0xb22c
movl $0x12, %edx
movq %r14, %rdi
callq 0x32a0
leaq 0x2cd9(%rip), %rsi      # 0xb23f
movl $0xd, %edx
movq %r14, %rdi
callq 0x32a0
movzbl 0x21(%rbx), %esi
movq %r14, %rdi
callq 0x3410
movq %rax, %r14
leaq 0x2cc4(%rip), %rsi      # 0xb24d
movl $0x3, %edx
movq %rax, %rdi
callq 0x32a0
movzbl 0x21(%rbx), %esi
movq %rsp, %r15
movq %r15, %rdi
callq 0x465b
movq (%r15), %rsi
movq 0x8(%r15), %rdx
movq %r14, %rdi
callq 0x32a0
movq %rax, %r14
leaq 0x2b5d(%rip), %rsi      # 0xb11b
movl $0x1, %edx
movq %rax, %rdi
callq 0x32a0
leaq 0x2c7f(%rip), %rsi      # 0xb251
movl $0x10, %edx
movq %r14, %rdi
callq 0x32a0
movzbl 0x20(%rbx), %esi
movq %r14, %rdi
callq 0x3410
movq %rax, %r14
leaq 0x2c58(%rip), %rsi      # 0xb24d
movl $0x3, %edx
movq %rax, %rdi
callq 0x32a0
leaq 0x20(%rsp), %r15
movq %r15, %rdi
callq 0x30e0
movq %r14, %rdi
movq %r15, %rsi
movq %rax, %rdx
callq 0x32a0
leaq 0x2af7(%rip), %rsi      # 0xb11b
movl $0x1, %edx
movq %r14, %rdi
callq 0x32a0
leaq 0x2c2a(%rip), %rsi      # 0xb262
movl $0x11, %edx
movq %r14, %rdi
callq 0x32a0
movq 0x10(%rbx), %rsi
movq %r14, %rdi
callq 0x3170
leaq 0x2ac3(%rip), %rsi      # 0xb11b
movl $0x1, %edx
movq %rax, %rdi
callq 0x32a0
leaq 0x10(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x8680
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x3250
xorl %eax, %eax
addq $0x420, %rsp            # imm = 0x420
popq %rbx
popq %r14
popq %r15
retq
movq %rax, %rbx
leaq 0x10(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x86ad
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x3250
movq %rbx, %rdi
callq 0x3430
nop
// File: /workspace/github_cpp_makefile_star2_O3/nishalkulkarni[P]fluid-wm/fluid_wm.cpp
// Function: WindowManager::OnUnmapNotify(XUnmapEvent const&)
void WindowManager::OnUnmapNotify(const XUnmapEvent& e)
{
    if (!clients_.count(e.window)) {
        std::cout << "Ignore UnmapNotify for non-client window " << e.window;
        return;
    }

    if (e.event == root_) {
        std::cout << "Ignore UnmapNotify for reparented pre-existing window "
                  << e.window;
        return;
    }

    Unframe(e.window);
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rsi, %r15
movq %rdi, %r14
addq $0x10, %rdi
leaq 0x28(%rsi), %rbx
movq %rbx, %rsi
callq 0x9382
testq %rax, %rax
je 0x8c1f
movq 0x20(%r15), %rax
cmpq 0x8(%r14), %rax
jne 0x8c4a
movq 0x63c7(%rip), %r14      # 0xefd8
leaq 0x23a6(%rip), %rsi      # 0xafbe
movl $0x36, %edx
jmp 0x8c32
movq 0x63b2(%rip), %r14      # 0xefd8
leaq 0x2367(%rip), %rsi      # 0xaf94
movl $0x29, %edx
movq %r14, %rdi
callq 0x32a0
movq (%rbx), %rsi
movq %r14, %rdi
popq %rbx
popq %r14
popq %r15
jmp 0x3170
movq (%rbx), %rsi
movq %r14, %rdi
popq %rbx
popq %r14
popq %r15
jmp 0x9196
// File: /workspace/github_cpp_makefile_star2_O3/nishalkulkarni[P]fluid-wm/fluid_wm.cpp
// Function: WindowManager::OnConfigureRequest(XConfigureRequestEvent const&)
void WindowManager::OnConfigureRequest(const XConfigureRequestEvent& e)
{
    XWindowChanges changes;
    // Copy fields from e to changes.
    changes.x = e.x;
    changes.y = e.y;
    changes.width = e.width;
    changes.height = e.height;
    changes.border_width = e.border_width;
    changes.sibling = e.above;
    changes.stack_mode = e.detail;
    if (clients_.count(e.window)) {
        const Window frame = clients_[e.window];
        XConfigureWindow(display_, frame, e.value_mask, &changes);
        std::cout << "Resize [" << frame << "] to " << Size<int>(e.width, e.height);
    }
    XConfigureWindow(display_, e.window, e.value_mask, &changes);
    std::cout << "Resize " << e.window << " to " << Size<int>(e.width, e.height);
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x38, %rsp
movq %rsi, %rbx
movq %rdi, %r14
movups 0x30(%rsi), %xmm0
movaps %xmm0, 0x10(%rsp)
movl 0x40(%rsi), %eax
movl %eax, 0x20(%rsp)
movq 0x48(%rsi), %rax
movq %rax, 0x28(%rsp)
movl 0x50(%rsi), %eax
movl %eax, 0x30(%rsp)
leaq 0x10(%rdi), %r15
leaq 0x28(%rsi), %r12
movq %r15, %rdi
movq %r12, %rsi
callq 0x9382
testq %rax, %rax
je 0x8d3f
movq %r15, %rdi
movq %r12, %rsi
callq 0x9670
movq (%rax), %r15
movq (%r14), %rdi
movl 0x58(%rbx), %edx
leaq 0x10(%rsp), %rcx
movq %r15, %rsi
callq 0x3260
movq 0x62e3(%rip), %r12      # 0xefd8
leaq 0x22f9(%rip), %rsi      # 0xaff5
movl $0x8, %edx
movq %r12, %rdi
callq 0x32a0
movq %r12, %rdi
movq %r15, %rsi
callq 0x3170
movq %rax, %r15
leaq 0x22e0(%rip), %rsi      # 0xaffe
movl $0x5, %edx
movq %rax, %rdi
callq 0x32a0
movq 0x38(%rbx), %rax
leaq 0x8(%rsp), %rsi
movq %rax, (%rsi)
movq %r15, %rdi
callq 0x929c
movq (%r14), %rdi
movq 0x28(%rbx), %rsi
movl 0x58(%rbx), %edx
leaq 0x10(%rsp), %rcx
callq 0x3260
movq 0x627e(%rip), %r14      # 0xefd8
leaq 0x22a3(%rip), %rsi      # 0xb004
movl $0x7, %edx
movq %r14, %rdi
callq 0x32a0
movq 0x28(%rbx), %rsi
movq %r14, %rdi
callq 0x3170
movq %rax, %r14
leaq 0x227b(%rip), %rsi      # 0xafff
movl $0x4, %edx
movq %rax, %rdi
callq 0x32a0
movq 0x38(%rbx), %rax
leaq 0x8(%rsp), %rsi
movq %rax, (%rsi)
movq %r14, %rdi
callq 0x929c
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/nishalkulkarni[P]fluid-wm/fluid_wm.cpp
// Function: WindowManager::OnButtonPress(XButtonEvent const&)
void WindowManager::OnButtonPress(const XButtonEvent& e)
{
    assert(clients_.count(e.window));
    const Window frame = clients_[e.window];

    drag_start_pos_ = Position<int>(e.x_root, e.y_root);

    Window returned_root;
    int x, y;
    unsigned width, height, border_width, depth;
    assert(XGetGeometry(
        display_,
        frame,
        &returned_root,
        &x, &y,
        &width, &height,
        &border_width,
        &depth));
    drag_start_frame_pos_ = Position<int>(x, y);
    drag_start_frame_size_ = Size<int>(width, height);

    XRaiseWindow(display_, frame);
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rsi, %r15
movq %rdi, %rbx
leaq 0x10(%rdi), %r14
leaq 0x20(%rsi), %r12
movq %r14, %rdi
movq %r12, %rsi
callq 0x9382
testq %rax, %rax
je 0x8e71
movq %r14, %rdi
movq %r12, %rsi
callq 0x9670
movq (%rax), %r14
movq 0x48(%r15), %rax
movq %rax, 0x50(%rbx)
movq (%rbx), %rdi
subq $0x8, %rsp
leaq 0x20(%rsp), %rax
leaq 0x24(%rsp), %r10
leaq 0x10(%rsp), %r11
leaq 0x28(%rsp), %rdx
leaq 0x1c(%rsp), %rcx
leaq 0x18(%rsp), %r8
leaq 0x14(%rsp), %r9
movq %r14, %rsi
pushq %rax
pushq %r10
pushq %r11
callq 0x3360
addq $0x20, %rsp
testl %eax, %eax
je 0x8e90
movl 0x14(%rsp), %eax
movl 0x10(%rsp), %ecx
shlq $0x20, %rcx
orq %rax, %rcx
movq %rcx, 0x58(%rbx)
movl 0xc(%rsp), %eax
movl 0x8(%rsp), %ecx
shlq $0x20, %rcx
orq %rax, %rcx
movq %rcx, 0x60(%rbx)
movq (%rbx), %rdi
movq %r14, %rsi
callq 0x3290
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
leaq 0x2194(%rip), %rdi      # 0xb00c
leaq 0x1f68(%rip), %rsi      # 0xade7
leaq 0x219f(%rip), %rcx      # 0xb025
movl $0x13b, %edx            # imm = 0x13B
callq 0x3160
leaq 0x21c6(%rip), %rdi      # 0xb05d
leaq 0x1f49(%rip), %rsi      # 0xade7
leaq 0x2180(%rip), %rcx      # 0xb025
movl $0x14a, %edx            # imm = 0x14A
callq 0x3160
nop
// File: /workspace/github_cpp_makefile_star2_O3/nishalkulkarni[P]fluid-wm/fluid_wm.cpp
// Function: WindowManager::OnMotionNotify(XMotionEvent const&)
void WindowManager::OnMotionNotify(const XMotionEvent& e)
{
    assert(clients_.count(e.window));
    const Window frame = clients_[e.window];
    const Position<int> drag_pos(e.x_root, e.y_root);
    const Vector2D<int> delta = drag_pos - drag_start_pos_;

    if (e.state & Button1Mask) {
        // alt + left button: Move window.
        const Position<int> dest_frame_pos = drag_start_frame_pos_ + delta;
        XMoveWindow(
            display_,
            frame,
            dest_frame_pos.x, dest_frame_pos.y);
    } else if (e.state & Button3Mask) {
        // alt + right button: Resize window.
        // Window dimensions cannot be negative.
        const Vector2D<int> size_delta(
            std::max(delta.x, -drag_start_frame_size_.width),
            std::max(delta.y, -drag_start_frame_size_.height));
        const Size<int> dest_frame_size = drag_start_frame_size_ + size_delta;
        // 1. Resize frame.
        XResizeWindow(
            display_,
            frame,
            dest_frame_size.width, dest_frame_size.height);
        // 2. Resize client window.
        XResizeWindow(
            display_,
            e.window,
            dest_frame_size.width, dest_frame_size.height);
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rsi, %r15
movq %rdi, %rbx
leaq 0x10(%rdi), %r12
leaq 0x20(%rsi), %r14
movq %r12, %rdi
movq %r14, %rsi
callq 0x9382
testq %rax, %rax
je 0x8f6d
movq %r12, %rdi
movq %r14, %rsi
callq 0x9670
movq (%rax), %rsi
movl 0x48(%r15), %edx
movl 0x4c(%r15), %ecx
subl 0x50(%rbx), %edx
movl 0x50(%r15), %eax
subl 0x54(%rbx), %ecx
btl $0x8, %eax
jb 0x8f11
btl $0xa, %eax
jb 0x8f27
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
addl 0x58(%rbx), %edx
addl 0x5c(%rbx), %ecx
movq (%rbx), %rdi
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0x31f0
movl 0x60(%rbx), %eax
movl %eax, %ebp
negl %ebp
cmpl %ebp, %edx
cmovgl %edx, %ebp
movl 0x64(%rbx), %edx
movl %edx, %r15d
negl %r15d
cmpl %r15d, %ecx
cmovgl %ecx, %r15d
addl %eax, %ebp
addl %edx, %r15d
movq (%rbx), %rdi
movl %ebp, %edx
movl %r15d, %ecx
callq 0x3350
movq (%rbx), %rdi
movq (%r14), %rsi
movl %ebp, %edx
movl %r15d, %ecx
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0x3350
leaq 0x2098(%rip), %rdi      # 0xb00c
leaq 0x1e6c(%rip), %rsi      # 0xade7
leaq 0x213a(%rip), %rcx      # 0xb0bc
movl $0x155, %edx            # imm = 0x155
callq 0x3160
// File: /workspace/github_cpp_makefile_star2_O3/nishalkulkarni[P]fluid-wm/fluid_wm.cpp
// Function: WindowManager::Unframe(unsigned long)
void WindowManager::Unframe(Window w)
{
    assert(clients_.count(w));

    const Window frame = clients_[w];
    XUnmapWindow(display_, frame);
    XReparentWindow(
        display_,
        w,
        root_,
        0, 0);
    XRemoveFromSaveSet(display_, w);
    XDestroyWindow(display_, frame);

    clients_.erase(w);

    std::cout << "Unframed window " << w << " [" << frame << "]";
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %r12
movq %rsp, %rax
movq %rsi, (%rax)
leaq 0x10(%rdi), %r15
movq %r15, %rdi
movq %rax, %rsi
callq 0x9382
testq %rax, %rax
je 0x927d
movq %rsp, %r14
movq %r15, %rdi
movq %r14, %rsi
callq 0x9670
movq (%rax), %rbx
movq (%r12), %rdi
movq %rbx, %rsi
callq 0x3370
movq (%r14), %rsi
movq (%r12), %rdi
movq 0x8(%r12), %rdx
xorl %ecx, %ecx
xorl %r8d, %r8d
callq 0x3030
movq (%r12), %rdi
movq (%r14), %rsi
callq 0x3450
movq (%r12), %rdi
movq %rbx, %rsi
callq 0x33b0
movq %r15, %rdi
movq %r14, %rsi
callq 0x9728
movq 0x5dbc(%rip), %r15      # 0xefd8
leaq 0x1d5e(%rip), %rsi      # 0xaf81
movl $0x10, %edx
movq %r15, %rdi
callq 0x32a0
movq (%r14), %rsi
movq %r15, %rdi
callq 0x3170
movq %rax, %r14
leaq 0x1db6(%rip), %rsi      # 0xaffb
movl $0x2, %edx
movq %rax, %rdi
callq 0x32a0
movq %r14, %rdi
movq %rbx, %rsi
callq 0x3170
leaq 0x1d2e(%rip), %rsi      # 0xaf92
movl $0x1, %edx
movq %rax, %rdi
callq 0x32a0
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
leaq 0x1bc1(%rip), %rdi      # 0xae45
leaq 0x1b5c(%rip), %rsi      # 0xade7
leaq 0x1ccb(%rip), %rcx      # 0xaf5d
movl $0xf4, %edx
callq 0x3160
// File: /workspace/github_cpp_makefile_star2_O3/nishalkulkarni[P]fluid-wm/main.cpp
// Function: main
int main(int argc, char** argv)
{

    /* std::unique_ptr<WindowManager> window_manager = std::make_unique<WindowManager>(WindowManager::Create()); */
    std::unique_ptr<WindowManager> window_manager(WindowManager::Create());
    if (!window_manager) {
        std::cout << "Failed to initialize window manager.";
        return EXIT_FAILURE;
    }
    std::cout<<"Window manager running"<<std::endl;
    window_manager->Run();

    return EXIT_SUCCESS;
}

// Assembly:
pushq %rbx
subq $0x10, %rsp
leaq 0x8(%rsp), %rbx
movq %rbx, %rdi
callq 0x801c
cmpq $0x0, (%rbx)
je 0x998c
movq 0x5699(%rip), %rbx      # 0xefd8
leaq 0x1953(%rip), %rsi      # 0xb299
movl $0x16, %edx
movq %rbx, %rdi
callq 0x32a0
movq (%rbx), %rax
addq -0x18(%rax), %rbx
movq %rbx, %rdi
movl $0xa, %esi
callq 0x3220
movsbl %al, %esi
movq 0x5667(%rip), %rdi      # 0xefd8
callq 0x3040
movq %rax, %rdi
callq 0x3180
xorl %ebx, %ebx
movq 0x8(%rsp), %rdi
callq 0x81d8
jmp 0x99a9
movl $0x1, %ebx
movq 0x5640(%rip), %rdi      # 0xefd8
leaq 0x18d5(%rip), %rsi      # 0xb274
movl $0x24, %edx
callq 0x32a0
leaq 0x8(%rsp), %rdi
callq 0x99d0
movl %ebx, %eax
addq $0x10, %rsp
popq %rbx
retq
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
callq 0x99d0
movq %rbx, %rdi
callq 0x3430
// File: /workspace/github_cpp_makefile_star2_O3/havluj[P]spreadsheet/src/CTable.cpp
// Function: CTable::getValue[abi:cxx11](int, int) const
std::string CTable::getValue(int row, int col) const {
    std::string returnValue;

    auto it = m_database.find(std::make_pair(row, col));
    if (it != m_database.end()) {
	  returnValue = it->second->getValueAsString();
    }

    return returnValue;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x20, %rsp
movq %rsi, %r14
movq %rdi, %rbx
leaq 0x10(%rdi), %r15
movq %r15, (%rdi)
movq $0x0, 0x8(%rdi)
movb $0x0, 0x10(%rdi)
leaq 0x38(%rsi), %rdi
shlq $0x20, %rcx
movl %edx, %eax
orq %rcx, %rax
movq %rsp, %rsi
movq %rax, (%rsi)
callq 0x68c6
addq $0x40, %r14
cmpq %r14, %rax
je 0x5d18
movq 0x28(%rax), %rsi
movq (%rsi), %rax
movq %rsp, %rdi
callq *0x28(%rax)
movq %rsp, %r14
movq %rbx, %rdi
movq %r14, %rsi
callq 0x4380
movq (%r14), %rdi
leaq 0x10(%rsp), %rax
cmpq %rax, %rdi
je 0x5d18
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x42d0
movq %rbx, %rax
addq $0x20, %rsp
popq %rbx
popq %r14
popq %r15
retq
jmp 0x5d27
movq %rax, %r14
movq (%rbx), %rdi
cmpq %r15, %rdi
je 0x5d3d
movq (%r15), %rsi
incq %rsi
callq 0x42d0
movq %r14, %rdi
callq 0x45a0
nop
// File: /workspace/github_cpp_makefile_star2_O3/havluj[P]spreadsheet/src/CTable.cpp
// Function: CTable::getCell(int, int) const
CCell * CTable::getCell(int row, int col) const {
    std::string returnValue;

    auto it = m_database.find(std::make_pair(row, col));
    if (it != m_database.end()) {
	  return it->second;
    } else {
	  throw std::logic_error("ERR: empty cell");
    }
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x30, %rsp
movq %rdi, %rbx
leaq 0x18(%rsp), %r15
movq %r15, -0x10(%r15)
movq $0x0, -0x8(%r15)
movb $0x0, (%r15)
addq $0x38, %rdi
shlq $0x20, %rdx
movl %esi, %eax
orq %rdx, %rax
leaq 0x28(%rsp), %rsi
movq %rax, (%rsi)
callq 0x68c6
addq $0x40, %rbx
cmpq %rbx, %rax
je 0x5db2
movq 0x28(%rax), %rbx
movq 0x8(%rsp), %rdi
cmpq %r15, %rdi
je 0x5da5
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x42d0
movq %rbx, %rax
addq $0x30, %rsp
popq %rbx
popq %r14
popq %r15
retq
movl $0x10, %edi
callq 0x4150
movq %rax, %r14
leaq 0x86ba(%rip), %rsi      # 0xe480
movq %rax, %rdi
callq 0x4430
movq 0xd203(%rip), %rsi      # 0x12fd8
movq 0xd1e4(%rip), %rdx      # 0x12fc0
movq %r14, %rdi
callq 0x4560
jmp 0x5df3
movq %rax, %rbx
movq %r14, %rdi
callq 0x4210
jmp 0x5df6
movq %rax, %rbx
movq 0x8(%rsp), %rdi
cmpq %r15, %rdi
je 0x5e0d
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x42d0
movq %rbx, %rdi
callq 0x45a0
nop
// File: /workspace/github_cpp_makefile_star2_O3/havluj[P]spreadsheet/src/CTable.cpp
// Function: CTable::getExpression[abi:cxx11](int, int) const
std::string CTable::getExpression(int row, int col) const {
    std::string returnValue;

    auto it = m_database.find(std::make_pair(row, col));
    if (it != m_database.end()) {
	  returnValue = it->second->getExpression();
    }

    return returnValue;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x20, %rsp
movq %rsi, %r14
movq %rdi, %rbx
leaq 0x10(%rdi), %r15
movq %r15, (%rdi)
movq $0x0, 0x8(%rdi)
movb $0x0, 0x10(%rdi)
leaq 0x38(%rsi), %rdi
shlq $0x20, %rcx
movl %edx, %eax
orq %rcx, %rax
movq %rsp, %rsi
movq %rax, (%rsi)
callq 0x68c6
addq $0x40, %r14
cmpq %r14, %rax
je 0x5e8e
movq 0x28(%rax), %rsi
movq (%rsi), %rax
movq %rsp, %rdi
callq *0x30(%rax)
movq %rsp, %r14
movq %rbx, %rdi
movq %r14, %rsi
callq 0x4380
movq (%r14), %rdi
leaq 0x10(%rsp), %rax
cmpq %rax, %rdi
je 0x5e8e
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x42d0
movq %rbx, %rax
addq $0x20, %rsp
popq %rbx
popq %r14
popq %r15
retq
jmp 0x5e9d
movq %rax, %r14
movq (%rbx), %rdi
cmpq %r15, %rdi
je 0x5eb3
movq (%r15), %rsi
incq %rsi
callq 0x42d0
movq %r14, %rdi
callq 0x45a0
nop
// File: /workspace/github_cpp_makefile_star2_O3/havluj[P]spreadsheet/src/CEquation.cpp
// Function: CEquation::update(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>)
std::set<std::pair<int, int>> CEquation::update(std::string exp) {
    m_error = false;

    m_affectedBy.clear();
    m_expression = exp;

    compute();

    return m_affectedBy;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %rbx
movq %rsi, %r14
movq %rdi, %r15
movb $0x0, 0x58(%rsi)
leaq 0x88(%rsi), %r12
movq %r12, %rdi
callq 0x5fee
leaq 0x8(%r14), %rdi
movq %rbx, %rsi
callq 0x4190
movq %r14, %rdi
callq 0x6bb6
movq %r15, %rdi
movq %r12, %rsi
callq 0x601c
movq %r15, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O3/havluj[P]spreadsheet/src/CEquation.cpp
// Function: CEquation::compute()
void CEquation::compute() {
    std::string s = replaceOtherCells(m_expression);
    if (!m_error) {
	  CExpressionParser parser(s);

	  if (!parser.MatchingParetheses()) {
		m_error = true;
		m_errorMsg = "ERR: mismatched parentheses or empty input";
	  } else {
		std::vector<std::string> RPN;

		if (parser.InfixToRPN(RPN)) {
		    std::string str_result;
		    if (parser.Evaluate(RPN, str_result)) {
			  m_value = string_to_double(str_result);
		    }
		} else {
		    m_error = true;
		    m_errorMsg = "ERR: mismatched parentheses";
		}
	  }
    }
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0xa0, %rsp
movq %rdi, %rbx
leaq 0x70(%rsp), %r15
movq %r15, -0x10(%r15)
movq 0x8(%rdi), %rsi
movq 0x10(%rdi), %rdx
addq %rsi, %rdx
leaq 0x60(%rsp), %r14
movq %r14, %rdi
callq 0x5370
leaq 0x80(%rsp), %rdi
movq %rbx, %rsi
movq %r14, %rdx
callq 0x6f8a
movq 0x60(%rsp), %rdi
cmpq %r15, %rdi
je 0x6c10
movq 0x70(%rsp), %rsi
incq %rsi
callq 0x42d0
cmpb $0x0, 0x58(%rbx)
jne 0x6d18
movq %rsp, %rdi
leaq 0x80(%rsp), %rsi
callq 0xa984
movq %rsp, %rdi
callq 0xa9c8
testb %al, %al
je 0x6cab
xorps %xmm0, %xmm0
leaq 0x40(%rsp), %rsi
movaps %xmm0, (%rsi)
movq $0x0, 0x10(%rsi)
movq %rsp, %rdi
callq 0xc3ca
testb %al, %al
je 0x6cd0
leaq 0x30(%rsp), %r14
movq %r14, -0x10(%r14)
movq $0x0, -0x8(%r14)
movb $0x0, (%r14)
movq %rsp, %rdi
leaq 0x40(%rsp), %rsi
leaq 0x20(%rsp), %rdx
callq 0xb6a6
testb %al, %al
je 0x6c92
leaq 0x20(%rsp), %rsi
callq 0x6ef0
movsd %xmm0, 0x80(%rbx)
movq 0x20(%rsp), %rdi
cmpq %r14, %rdi
je 0x6cf3
movq 0x30(%rsp), %rsi
incq %rsi
callq 0x42d0
jmp 0x6cf3
movb $0x1, 0x58(%rbx)
movq 0x68(%rbx), %rdx
addq $0x60, %rbx
leaq 0x7915(%rip), %rcx      # 0xe5d3
movl $0x2a, %r8d
movq %rbx, %rdi
xorl %esi, %esi
callq 0x44a0
jmp 0x6cfd
movb $0x1, 0x58(%rbx)
movq 0x68(%rbx), %rdx
addq $0x60, %rbx
leaq 0x791b(%rip), %rcx      # 0xe5fe
movl $0x1b, %r8d
movq %rbx, %rdi
xorl %esi, %esi
callq 0x44a0
leaq 0x40(%rsp), %rdi
callq 0x8328
leaq 0x10(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x6d18
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x42d0
leaq 0x90(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x6d39
movq 0x90(%rsp), %rsi
incq %rsi
callq 0x42d0
addq $0xa0, %rsp
popq %rbx
popq %r14
popq %r15
retq
movq %rax, %rbx
movq 0x20(%rsp), %rdi
cmpq %r14, %rdi
je 0x6d65
movq 0x30(%rsp), %rsi
incq %rsi
callq 0x42d0
jmp 0x6d65
movq %rax, %rbx
leaq 0x40(%rsp), %rdi
callq 0x8328
jmp 0x6d79
movq %rax, %rbx
jmp 0x6d94
movq %rax, %rbx
leaq 0x10(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x6d94
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x42d0
leaq 0x90(%rsp), %r15
movq -0x10(%r15), %rdi
jmp 0x6daa
movq %rax, %rbx
movq 0x60(%rsp), %rdi
cmpq %r15, %rdi
je 0x6dba
movq (%r15), %rsi
incq %rsi
callq 0x42d0
movq %rbx, %rdi
callq 0x45a0
// File: /workspace/github_cpp_makefile_star2_O3/havluj[P]spreadsheet/src/CEquation.cpp
// Function: CEquation::getValue() const
double CEquation::getValue() const {
    if (m_error) {
	  throw std::logic_error(m_errorMsg);
    } else {
	  return m_value;
    }
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %r14
cmpb $0x1, 0x58(%rdi)
je 0x6dea
movsd 0x80(%r14), %xmm0
addq $0x8, %rsp
popq %rbx
popq %r14
retq
movl $0x10, %edi
callq 0x4150
movq %rax, %rbx
addq $0x60, %r14
movq %rax, %rdi
movq %r14, %rsi
callq 0x4450
movq 0xc1cb(%rip), %rsi      # 0x12fd8
movq 0xc1ac(%rip), %rdx      # 0x12fc0
movq %rbx, %rdi
callq 0x4560
movq %rax, %r14
movq %rbx, %rdi
callq 0x4210
movq %r14, %rdi
callq 0x45a0
nop
// File: /workspace/github_cpp_makefile_star2_O3/havluj[P]spreadsheet/src/CEquation.cpp
// Function: CEquation::getValueAsString[abi:cxx11]() const
std::string CEquation::getValueAsString() const {
    if (m_error) {
	  return m_errorMsg;
    } else {
	  std::ostringstream out;
	  out << std::setprecision(3) << m_value;
	  return out.str();
    }
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x180, %rsp            # imm = 0x180
movq %rsi, %r14
movq %rdi, %rbx
cmpb $0x1, 0x58(%rsi)
jne 0x6e64
leaq 0x10(%rbx), %rax
movq %rax, (%rbx)
movq 0x60(%r14), %rsi
movq 0x68(%r14), %rdx
addq %rsi, %rdx
movq %rbx, %rdi
callq 0x5370
jmp 0x6eba
leaq 0x8(%rsp), %r15
movq %r15, %rdi
callq 0x43f0
movq (%r15), %rax
movq -0x18(%rax), %rax
movq $0x3, 0x10(%rsp,%rax)
movsd 0x80(%r14), %xmm0
movq %r15, %rdi
callq 0x44e0
leaq 0x10(%rsp), %rsi
movq %rbx, %rdi
callq 0x44d0
movq 0xc10a(%rip), %rsi      # 0x12fb0
leaq 0x8(%rsp), %rdi
callq 0x4180
leaq 0x78(%rsp), %rdi
callq 0x40d0
movq %rbx, %rax
addq $0x180, %rsp            # imm = 0x180
popq %rbx
popq %r14
popq %r15
retq
movq %rax, %rbx
movq 0xc0dc(%rip), %rsi      # 0x12fb0
leaq 0x8(%rsp), %rdi
callq 0x4180
leaq 0x78(%rsp), %rdi
callq 0x40d0
movq %rbx, %rdi
callq 0x45a0
// File: /workspace/github_cpp_makefile_star2_O3/havluj[P]spreadsheet/src/CEquation.cpp
// Function: CEquation::string_to_double(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)
double CEquation::string_to_double(const std::string& s) {
    std::istringstream i(s);
    double x;
    if (!(i >> x))
	  return 0;
    return x;
}

// Assembly:
pushq %rbx
subq $0x190, %rsp            # imm = 0x190
leaq 0x10(%rsp), %rbx
movq %rbx, %rdi
movl $0x8, %edx
callq 0x4530
leaq 0x8(%rsp), %rsi
movq %rbx, %rdi
callq 0x41c0
movq (%rax), %rcx
movq -0x18(%rcx), %rcx
testb $0x5, 0x20(%rax,%rcx)
je 0x6f2a
xorps %xmm0, %xmm0
jmp 0x6f30
movsd 0x8(%rsp), %xmm0
movsd %xmm0, (%rsp)
movq 0xc06c(%rip), %rsi      # 0x12fa8
leaq 0x10(%rsp), %rdi
callq 0x4420
leaq 0x88(%rsp), %rdi
callq 0x40d0
movsd (%rsp), %xmm0
addq $0x190, %rsp            # imm = 0x190
popq %rbx
retq
movq %rax, %rbx
movq 0xc03d(%rip), %rsi      # 0x12fa8
leaq 0x10(%rsp), %rdi
callq 0x4420
leaq 0x88(%rsp), %rdi
callq 0x40d0
movq %rbx, %rdi
callq 0x45a0