LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: frolosofsky[P]pbft/pbft_types.cpp
// Function: Node::unlink(unsigned long, bool)
bool Node::unlink(uintptr_t node, bool release_link) {
    auto it = _links.find(node);
    if(it == _links.end())
        return false;
    if(release_link) {
        auto link_ptr = it->second.lock();
        assert(link_ptr != nullptr);
        link_ptr->release(id());
    }
    _links.erase(it);
    return true;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x70, %rsp
movb %dl, %al
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
andb $0x1, %al
movb %al, -0x19(%rbp)
movq -0x10(%rbp), %rdi
movq %rdi, -0x68(%rbp)
addq $0x18, %rdi
leaq -0x18(%rbp), %rsi
callq 0x2f90
movq -0x68(%rbp), %rdi
movq %rax, -0x28(%rbp)
addq $0x18, %rdi
callq 0x2ff0
movq %rax, -0x30(%rbp)
leaq -0x28(%rbp), %rdi
leaq -0x30(%rbp), %rsi
callq 0x2fc0
testb $0x1, %al
jne 0x24b4
jmp 0x24bd
movb $0x0, -0x1(%rbp)
jmp 0x257b
testb $0x1, -0x19(%rbp)
je 0x255a
leaq -0x28(%rbp), %rdi
callq 0x3020
movq %rax, %rsi
addq $0x8, %rsi
leaq -0x40(%rbp), %rdi
callq 0x3040
leaq -0x40(%rbp), %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0x3070
testb $0x1, %al
jne 0x24f3
jmp 0x24f5
jmp 0x2514
leaq 0xcb5c(%rip), %rdi      # 0xf058
leaq 0xcb0c(%rip), %rsi      # 0xf00f
movl $0x16, %edx
leaq 0xcb5d(%rip), %rcx      # 0xf06c
callq 0x20c0
leaq -0x40(%rbp), %rdi
callq 0x30a0
movq -0x68(%rbp), %rdi
movq %rax, -0x70(%rbp)
callq 0x2390
movq -0x70(%rbp), %rdi
movq %rax, %rsi
callq 0x2590
jmp 0x2538
leaq -0x40(%rbp), %rdi
callq 0x30c0
jmp 0x255a
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
leaq -0x40(%rbp), %rdi
callq 0x30c0
jmp 0x2586
movq -0x68(%rbp), %rdi
addq $0x18, %rdi
movq -0x28(%rbp), %rax
movq %rax, -0x58(%rbp)
movq -0x58(%rbp), %rsi
callq 0x30e0
movq %rax, -0x60(%rbp)
movb $0x1, -0x1(%rbp)
movb -0x1(%rbp), %al
andb $0x1, %al
addq $0x70, %rsp
popq %rbp
retq
movq -0x48(%rbp), %rdi
callq 0x21e0
nop
// File: frolosofsky[P]pbft/pbft_types.cpp
// Function: Link::release(unsigned long)
void Link::release(uintptr_t src_id) {
    auto d = get_dst(src_id);
    assert(d.src.node_id == src_id);
    d.src.node.reset();
    auto dst_node = d.dst.node.lock();
    if(dst_node != nullptr)
        dst_node->unlink(src_id);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
callq 0x29c0
movq %rax, -0x20(%rbp)
movq %rdx, -0x18(%rbp)
movq -0x20(%rbp), %rax
movq (%rax), %rax
cmpq -0x10(%rbp), %rax
jne 0x25c4
jmp 0x25e3
leaq 0xcb85(%rip), %rdi      # 0xf150
leaq 0xca3d(%rip), %rsi      # 0xf00f
movl $0x4f, %edx
leaq 0xcb8a(%rip), %rcx      # 0xf168
callq 0x20c0
movq -0x20(%rbp), %rdi
addq $0x8, %rdi
callq 0x33d0
movq -0x18(%rbp), %rsi
addq $0x8, %rsi
leaq -0x30(%rbp), %rdi
callq 0x3410
leaq -0x30(%rbp), %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0x3440
testb $0x1, %al
jne 0x2614
jmp 0x2649
leaq -0x30(%rbp), %rdi
callq 0x32c0
movq %rax, %rdi
movq -0x10(%rbp), %rsi
movl $0x1, %edx
callq 0x2460
jmp 0x2630
jmp 0x2649
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x38(%rbp)
movl %eax, -0x3c(%rbp)
leaq -0x30(%rbp), %rdi
callq 0x3470
jmp 0x2658
leaq -0x30(%rbp), %rdi
callq 0x3470
addq $0x40, %rsp
popq %rbp
retq
movq -0x38(%rbp), %rdi
callq 0x21e0
nopw %cs:(%rax,%rax)
// File: frolosofsky[P]pbft/pbft_types.cpp
// Function: Node::send_to(unsigned long, Message&&)
bool Node::send_to(uintptr_t node, Message &&msg) {
    auto it = _links.find(node);
    if(it == _links.end())
        return false;
    auto link_ptr = it->second.lock();
    assert(link_ptr != nullptr);
    return link_ptr->send(node, std::move(msg));
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x60, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq -0x10(%rbp), %rdi
movq %rdi, -0x58(%rbp)
addq $0x18, %rdi
leaq -0x18(%rbp), %rsi
callq 0x2f90
movq -0x58(%rbp), %rdi
movq %rax, -0x28(%rbp)
addq $0x18, %rdi
callq 0x2ff0
movq %rax, -0x30(%rbp)
leaq -0x28(%rbp), %rdi
leaq -0x30(%rbp), %rsi
callq 0x2fc0
testb $0x1, %al
jne 0x26c1
jmp 0x26ca
movb $0x0, -0x1(%rbp)
jmp 0x275f
leaq -0x28(%rbp), %rdi
callq 0x3020
movq %rax, %rsi
addq $0x8, %rsi
leaq -0x40(%rbp), %rdi
callq 0x3040
leaq -0x40(%rbp), %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0x3070
testb $0x1, %al
jne 0x26f6
jmp 0x26f8
jmp 0x2717
leaq 0xc959(%rip), %rdi      # 0xf058
leaq 0xc909(%rip), %rsi      # 0xf00f
movl $0x22, %edx
leaq 0xc97d(%rip), %rcx      # 0xf08f
callq 0x20c0
leaq -0x40(%rbp), %rdi
callq 0x30a0
movq %rax, %rdi
movq -0x18(%rbp), %rsi
movq -0x20(%rbp), %rdx
callq 0x2780
movb %al, -0x59(%rbp)
jmp 0x2735
movb -0x59(%rbp), %al
andb $0x1, %al
movb %al, -0x1(%rbp)
leaq -0x40(%rbp), %rdi
callq 0x30c0
jmp 0x275f
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
leaq -0x40(%rbp), %rdi
callq 0x30c0
jmp 0x276a
movb -0x1(%rbp), %al
andb $0x1, %al
addq $0x60, %rsp
popq %rbp
retq
movq -0x48(%rbp), %rdi
callq 0x21e0
nopw %cs:(%rax,%rax)
// File: frolosofsky[P]pbft/pbft_types.cpp
// Function: Link::send(unsigned long, Message&&)
bool Link::send(uintptr_t dst_id, Message &&msg) {
    auto d = get_dst(dst_id);
    assert(d.src.node_id == dst_id);
    if(d.src.node.expired())
        return false; // just drop the message
    d.src.inbox.push_back(std::move(msg));
    return true;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
callq 0x29c0
movq %rax, -0x30(%rbp)
movq %rdx, -0x28(%rbp)
movq -0x30(%rbp), %rax
movq (%rax), %rax
cmpq -0x18(%rbp), %rax
jne 0x27b8
jmp 0x27d7
leaq 0xc9c7(%rip), %rdi      # 0xf186
leaq 0xc849(%rip), %rsi      # 0xf00f
movl $0x5e, %edx
leaq 0xc9cc(%rip), %rcx      # 0xf19e
callq 0x20c0
movq -0x30(%rbp), %rdi
addq $0x8, %rdi
callq 0x3490
testb $0x1, %al
jne 0x27ea
jmp 0x27f0
movb $0x0, -0x1(%rbp)
jmp 0x2805
movq -0x30(%rbp), %rdi
addq $0x18, %rdi
movq -0x20(%rbp), %rsi
callq 0x34c0
movb $0x1, -0x1(%rbp)
movb -0x1(%rbp), %al
andb $0x1, %al
addq $0x30, %rsp
popq %rbp
retq
// File: frolosofsky[P]pbft/pbft_types.cpp
// Function: Node::broadcast(Message&&)
void Node::broadcast(Message &&msg) {
    for(auto &l : _links) {
        auto link_ptr = l.second.lock();
        assert(link_ptr != nullptr);
        link_ptr->send(l.first, Message(msg));
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x90, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rax
addq $0x18, %rax
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rdi
callq 0x3120
movq %rax, -0x20(%rbp)
movq -0x18(%rbp), %rdi
callq 0x2ff0
movq %rax, -0x28(%rbp)
leaq -0x20(%rbp), %rdi
leaq -0x28(%rbp), %rsi
callq 0x3150
testb $0x1, %al
jne 0x285f
jmp 0x2924
leaq -0x20(%rbp), %rdi
callq 0x3180
movq %rax, -0x30(%rbp)
movq -0x30(%rbp), %rsi
addq $0x8, %rsi
leaq -0x40(%rbp), %rdi
callq 0x3040
leaq -0x40(%rbp), %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0x3070
testb $0x1, %al
jne 0x2890
jmp 0x2892
jmp 0x28b1
leaq 0xc7bf(%rip), %rdi      # 0xf058
leaq 0xc76f(%rip), %rsi      # 0xf00f
movl $0x29, %edx
leaq 0xc80d(%rip), %rcx      # 0xf0b9
callq 0x20c0
leaq -0x40(%rbp), %rdi
callq 0x30a0
movq %rax, %rdi
movq -0x30(%rbp), %rax
movq (%rax), %rsi
movq -0x10(%rbp), %rax
movl 0x30(%rax), %ecx
movl %ecx, -0x50(%rbp)
movups (%rax), %xmm0
movups 0x10(%rax), %xmm1
movups 0x20(%rax), %xmm2
movaps %xmm2, -0x60(%rbp)
movaps %xmm1, -0x70(%rbp)
movaps %xmm0, -0x80(%rbp)
leaq -0x80(%rbp), %rdx
callq 0x2780
jmp 0x28f0
leaq -0x40(%rbp), %rdi
callq 0x30c0
leaq -0x20(%rbp), %rdi
callq 0x31a0
jmp 0x2849
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x88(%rbp)
movl %eax, -0x8c(%rbp)
leaq -0x40(%rbp), %rdi
callq 0x30c0
jmp 0x292d
addq $0x90, %rsp
popq %rbp
retq
movq -0x88(%rbp), %rdi
callq 0x21e0
nopl (%rax)
// File: frolosofsky[P]pbft/pbft_types.cpp
// Function: Link::get_dst(unsigned long)
Link::Destinations Link::get_dst(uintptr_t id) {
    if(first.node_id == id) {
        return {first, second};
    } else if (second.node_id == id) {
        return {second, first};
    } else {
        assert(not("Unreachable"));
    }
    return {first, second};
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x18(%rbp)
movq %rsi, -0x20(%rbp)
movq -0x18(%rbp), %rax
movq %rax, -0x28(%rbp)
movq (%rax), %rax
cmpq -0x20(%rbp), %rax
jne 0x29f3
movq -0x28(%rbp), %rax
movq %rax, -0x10(%rbp)
addq $0x30, %rax
movq %rax, -0x8(%rbp)
jmp 0x2a35
movq -0x28(%rbp), %rax
movq 0x30(%rax), %rax
cmpq -0x20(%rbp), %rax
jne 0x2a16
movq -0x28(%rbp), %rax
movq %rax, %rcx
addq $0x30, %rcx
movq %rcx, -0x10(%rbp)
movq %rax, -0x8(%rbp)
jmp 0x2a35
leaq 0xc6f4(%rip), %rdi      # 0xf111
leaq 0xc5eb(%rip), %rsi      # 0xf00f
movl $0x3a, %edx
leaq 0xc6f4(%rip), %rcx      # 0xf124
callq 0x20c0
movq -0x10(%rbp), %rax
movq -0x8(%rbp), %rdx
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: frolosofsky[P]pbft/pbft_types.cpp
// Function: Link::make(std::shared_ptr<Node> const&, std::shared_ptr<Node> const&)
std::shared_ptr<Link> Link::make(std::shared_ptr<Node> const &first, std::shared_ptr<Node> const &second) {
    if(first == nullptr || second == nullptr || first == second || first->has_link(second->id()) || second->has_link(first->id()))
        return nullptr;
    std::shared_ptr<Link> ptr(new Link(first, second)); // std::make_shared requires public c-tor
    first->link(second->id(), ptr);
    second->link(first->id(), ptr);
    return ptr;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x70, %rsp
movq %rdi, -0x40(%rbp)
movq %rdi, %rax
movq %rax, -0x38(%rbp)
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq -0x10(%rbp), %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0x3250
testb $0x1, %al
jne 0x2b04
movq -0x18(%rbp), %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0x3250
testb $0x1, %al
jne 0x2b04
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
callq 0x3280
testb $0x1, %al
jne 0x2b04
movq -0x10(%rbp), %rdi
callq 0x32c0
movq %rax, -0x48(%rbp)
movq -0x18(%rbp), %rdi
callq 0x32c0
movq %rax, %rdi
callq 0x2390
movq -0x48(%rbp), %rdi
movq %rax, %rsi
callq 0x2410
testb $0x1, %al
jne 0x2b04
movq -0x18(%rbp), %rdi
callq 0x32c0
movq %rax, -0x50(%rbp)
movq -0x10(%rbp), %rdi
callq 0x32c0
movq %rax, %rdi
callq 0x2390
movq -0x50(%rbp), %rdi
movq %rax, %rsi
callq 0x2410
testb $0x1, %al
jne 0x2b04
jmp 0x2b16
movq -0x40(%rbp), %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0x32e0
jmp 0x2bf4
movb $0x0, -0x19(%rbp)
movl $0x60, %edi
callq 0x2120
movq %rax, %rdi
movq %rdi, %rax
movq %rax, -0x58(%rbp)
movq -0x10(%rbp), %rsi
movq -0x18(%rbp), %rdx
callq 0x3300
jmp 0x2b3d
movq -0x40(%rbp), %rdi
movq -0x58(%rbp), %rsi
callq 0x3360
movq -0x10(%rbp), %rdi
callq 0x32c0
movq %rax, -0x60(%rbp)
movq -0x18(%rbp), %rdi
callq 0x32c0
movq %rax, %rdi
callq 0x2390
movq -0x60(%rbp), %rdi
movq -0x40(%rbp), %rdx
movq %rax, %rsi
callq 0x23a0
jmp 0x2b7a
movq -0x18(%rbp), %rdi
callq 0x32c0
movq %rax, -0x68(%rbp)
movq -0x10(%rbp), %rdi
callq 0x32c0
movq %rax, %rdi
callq 0x2390
movq -0x68(%rbp), %rdi
movq -0x40(%rbp), %rdx
movq %rax, %rsi
callq 0x23a0
jmp 0x2baa
movb $0x1, -0x19(%rbp)
testb $0x1, -0x19(%rbp)
jne 0x2bf2
jmp 0x2be9
movq -0x58(%rbp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x28(%rbp)
movl %eax, -0x2c(%rbp)
movl $0x60, %esi
callq 0x2130
jmp 0x2bfe
movq -0x40(%rbp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x28(%rbp)
movl %eax, -0x2c(%rbp)
callq 0x30c0
jmp 0x2bfe
movq -0x40(%rbp), %rdi
callq 0x30c0
jmp 0x2bf4
movq -0x38(%rbp), %rax
addq $0x70, %rsp
popq %rbp
retq
movq -0x28(%rbp), %rdi
callq 0x21e0
nopw (%rax,%rax)
// File: frolosofsky[P]pbft/pbft_types.cpp
// Function: Link::process_messages(unsigned long, Link::Mailbox&)
void Link::process_messages(uintptr_t src, Mailbox &dst) {
    for(auto it = dst.inbox.begin(); it != dst.inbox.end(); ) {
        if(it->deliver_timeout > 0) {
            --it->deliver_timeout;
            ++it;
        } else {
            auto node_ptr = dst.node.lock();
            if(node_ptr == nullptr) {
                dst.inbox.clear();
                return;
            }
            node_ptr->put(src, std::move(*it));
            it = dst.inbox.erase(it);
        }
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x80, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq -0x18(%rbp), %rdi
addq $0x18, %rdi
callq 0x3500
movq %rax, -0x20(%rbp)
movq -0x18(%rbp), %rdi
addq $0x18, %rdi
callq 0x3560
movq %rax, -0x28(%rbp)
leaq -0x20(%rbp), %rdi
leaq -0x28(%rbp), %rsi
callq 0x3530
testb $0x1, %al
jne 0x2d8f
jmp 0x2e93
leaq -0x20(%rbp), %rdi
callq 0x3590
cmpl $0x0, 0x30(%rax)
jle 0x2dbe
leaq -0x20(%rbp), %rdi
callq 0x3590
movl 0x30(%rax), %ecx
addl $-0x1, %ecx
movl %ecx, 0x30(%rax)
leaq -0x20(%rbp), %rdi
callq 0x35b0
jmp 0x2e8e
movq -0x18(%rbp), %rsi
addq $0x8, %rsi
leaq -0x38(%rbp), %rdi
callq 0x3410
leaq -0x38(%rbp), %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0x3250
testb $0x1, %al
jne 0x2de2
jmp 0x2df8
movq -0x18(%rbp), %rdi
addq $0x18, %rdi
callq 0x35d0
movl $0x1, -0x3c(%rbp)
jmp 0x2e61
leaq -0x38(%rbp), %rdi
callq 0x32c0
movq %rax, -0x70(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x68(%rbp)
leaq -0x20(%rbp), %rdi
callq 0x3600
movq -0x70(%rbp), %rdi
movq -0x68(%rbp), %rsi
movq %rax, %rdx
callq 0x2940
jmp 0x2e28
movq -0x18(%rbp), %rax
addq $0x18, %rax
movq %rax, -0x78(%rbp)
leaq -0x60(%rbp), %rdi
leaq -0x20(%rbp), %rsi
callq 0x3670
movq -0x78(%rbp), %rdi
movq -0x60(%rbp), %rsi
callq 0x3620
movq %rax, -0x58(%rbp)
movq -0x58(%rbp), %rax
movq %rax, -0x20(%rbp)
movl $0x0, -0x3c(%rbp)
leaq -0x38(%rbp), %rdi
callq 0x3470
movl -0x3c(%rbp), %eax
testl %eax, %eax
je 0x2e75
jmp 0x2e73
jmp 0x2e93
jmp 0x2e8e
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
leaq -0x38(%rbp), %rdi
callq 0x3470
jmp 0x2e9c
jmp 0x2d68
addq $0x80, %rsp
popq %rbp
retq
movq -0x48(%rbp), %rdi
callq 0x21e0
nopw %cs:(%rax,%rax)
nop
// File: frolosofsky[P]pbft/main.cpp
// Function: Simulator::run()
void run() {
        constexpr int ticks_limit = 10000;
        int c = 0;
        while(not(_actions.size() == 0 && _client->ready()) && c < ticks_limit) {
            tick();
            ++c;
        }
        std::cout << "Simulation has taken " << c << " ticks" << std::endl;
    }

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x18(%rbp)
movl $0x2710, -0xc(%rbp)     # imm = 0x2710
movl $0x0, -0x10(%rbp)
movq -0x18(%rbp), %rdi
addq $0x40, %rdi
callq 0xdd70
cmpq $0x0, %rax
jne 0x63c2
movq -0x18(%rbp), %rdi
callq 0xdda0
movq %rax, %rdi
callq 0xddc0
movb %al, %cl
xorl %eax, %eax
testb $0x1, %cl
movb %al, -0x19(%rbp)
jne 0x63cf
cmpl $0x2710, -0x10(%rbp)    # imm = 0x2710
setl %al
movb %al, -0x19(%rbp)
movb -0x19(%rbp), %al
testb $0x1, %al
jne 0x63d8
jmp 0x63ec
movq -0x18(%rbp), %rdi
callq 0xdde0
movl -0x10(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x10(%rbp)
jmp 0x6392
movq 0x12be5(%rip), %rdi     # 0x18fd8
leaq 0x91a6(%rip), %rsi      # 0xf5a0
callq 0x2110
movq %rax, %rdi
movl -0x10(%rbp), %esi
callq 0x21d0
movq %rax, %rdi
leaq 0x91a2(%rip), %rsi      # 0xf5b6
callq 0x2110
movq %rax, %rdi
movq 0x12b9d(%rip), %rsi     # 0x18fc0
callq 0x2150
addq $0x20, %rsp
popq %rbp
retq
nop
// File: frolosofsky[P]pbft/main.cpp
// Function: ClientNode::action(Message::OpRequestMessage&&, int)
void action(Message::OpRequestMessage &&msg, int answers) {
        std::cout << "Send " << msg << std::endl;
        broadcast(std::move(msg)); // don't care. only primary node should process it
        _actual_answers = 0;
        _expected_answers = answers;
    }

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0xa0, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movl %edx, -0x14(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x90(%rbp)
movq 0xae70(%rip), %rdi      # 0x18fd8
leaq 0x144e(%rip), %rsi      # 0xf5bd
callq 0x2110
movq %rax, -0x98(%rbp)
movq -0x10(%rbp), %rsi
leaq -0x50(%rbp), %rdi
callq 0x8c10
movq -0x98(%rbp), %rdi
leaq -0x50(%rbp), %rsi
callq 0x83e0
movq %rax, %rdi
movq 0xae1e(%rip), %rsi      # 0x18fc0
callq 0x2150
movq -0x10(%rbp), %rsi
leaq -0x88(%rbp), %rdi
callq 0xe370
movq -0x90(%rbp), %rdi
leaq -0x88(%rbp), %rsi
callq 0x2810
movq -0x90(%rbp), %rax
movl $0x0, 0x64(%rax)
movl -0x14(%rbp), %ecx
movl %ecx, 0x60(%rax)
addq $0xa0, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: frolosofsky[P]pbft/./crypto.h
// Function: digest(Message const&)
inline Digest digest(Message const &msg) {
    switch(msg.type) {
    case Message::Type::Write:
        return digest(msg.data.write);
    case Message::Type::Read:
        return digest(msg.data.read);
    case Message::Type::WriteAck:
        return digest(msg.data.write_ack);
    case Message::Type::ReadAck:
        return digest(msg.data.read_ack);
    default:
        std::cout << msg << std::endl;
        assert(not("Unreachable"));
    }
    return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movq -0x10(%rbp), %rax
movl (%rax), %eax
movq %rax, -0x18(%rbp)
subq $0x3, %rax
ja 0x885c
movq -0x18(%rbp), %rax
leaq 0x6a7d(%rip), %rcx      # 0xf284
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movq -0x10(%rbp), %rdi
addq $0x8, %rdi
callq 0x88b0
movq %rax, -0x8(%rbp)
jmp 0x889a
movq -0x10(%rbp), %rdi
addq $0x8, %rdi
callq 0x88d0
movq %rax, -0x8(%rbp)
jmp 0x889a
movq -0x10(%rbp), %rdi
addq $0x8, %rdi
callq 0x88f0
movq %rax, -0x8(%rbp)
jmp 0x889a
movq -0x10(%rbp), %rdi
addq $0x8, %rdi
callq 0x8910
movq %rax, -0x8(%rbp)
jmp 0x889a
movq -0x10(%rbp), %rsi
movq 0x10771(%rip), %rdi     # 0x18fd8
callq 0x83e0
movq %rax, %rdi
movq 0x1074a(%rip), %rsi     # 0x18fc0
callq 0x2150
leaq 0x688f(%rip), %rdi      # 0xf111
leaq 0x6b68(%rip), %rsi      # 0xf3f1
movl $0x26, %edx
leaq 0x6b67(%rip), %rcx      # 0xf3fc
callq 0x20c0
movq -0x8(%rbp), %rax
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
nop
// File: frolosofsky[P]pbft/./pbft_types.h
// Function: Message::Data::Data(Message::OpResponseMessage&&)
Data(OpResponseMessage &&msg) {
            switch(msg.type) {
            case Type::WriteAck:
                write_ack = std::move(msg.data.write_ack);
                break;
            case Type::ReadAck:
                read_ack = std::move(msg.data.read_ack);
                break;
            case Type::Write:
            case Type::Read:
            case Type::Response:
            case Type::Prepare:
            case Type::PrePrepare:
            case Type::Commit:
                assert(not("Unreachable"));
            }
        }

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x20(%rbp)
movq -0x10(%rbp), %rax
movl (%rax), %eax
movl %eax, -0x14(%rbp)
testl %eax, %eax
je 0x89ac
jmp 0x8957
movl -0x14(%rbp), %eax
subl $0x1, %eax
je 0x8982
jmp 0x8961
movl -0x14(%rbp), %eax
subl $0x2, %eax
je 0x89ac
jmp 0x896b
movl -0x14(%rbp), %eax
subl $0x3, %eax
je 0x899b
jmp 0x8975
movl -0x14(%rbp), %eax
addl $-0x4, %eax
subl $0x4, %eax
jb 0x89ac
jmp 0x89cb
movq -0x20(%rbp), %rax
movq -0x10(%rbp), %rcx
movq 0x8(%rcx), %rdx
movq %rdx, (%rax)
movq 0x10(%rcx), %rcx
movq %rcx, 0x8(%rax)
jmp 0x89cb
movq -0x20(%rbp), %rax
movq -0x10(%rbp), %rcx
movq 0x8(%rcx), %rcx
movq %rcx, (%rax)
jmp 0x89cb
leaq 0x675e(%rip), %rdi      # 0xf111
leaq 0x6a61(%rip), %rsi      # 0xf41b
movl $0x77, %edx
leaq 0x6a64(%rip), %rcx      # 0xf42a
callq 0x20c0
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
nopl (%rax,%rax)
// File: frolosofsky[P]pbft/./pbft_types.h
// Function: Message::Data::Data(Message::OpRequestMessage&&)
Data(OpRequestMessage &&msg) {
            switch(msg.type) {
            case Type::Write:
                write = std::move(msg.data.write);
                break;
            case Type::Read:
                read = std::move(msg.data.read);
                break;
            case Type::WriteAck:
            case Type::ReadAck:
            case Type::Response:
            case Type::Prepare:
            case Type::PrePrepare:
            case Type::Commit:
                assert(not("Unreachable"));
            }
        }

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x20(%rbp)
movq -0x10(%rbp), %rax
movl (%rax), %eax
movq %rax, -0x18(%rbp)
subq $0x7, %rax
ja 0x8ceb
movq -0x18(%rbp), %rax
leaq 0x65f1(%rip), %rcx      # 0xf294
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movq -0x20(%rbp), %rax
movq -0x10(%rbp), %rcx
movl 0x8(%rcx), %ecx
movl %ecx, (%rax)
jmp 0x8ceb
movq -0x20(%rbp), %rax
movq -0x10(%rbp), %rcx
movq 0x8(%rcx), %rcx
movq %rcx, (%rax)
jmp 0x8ceb
leaq 0x643e(%rip), %rdi      # 0xf111
leaq 0x6741(%rip), %rsi      # 0xf41b
movl $0x66, %edx
leaq 0x67d3(%rip), %rcx      # 0xf4b9
callq 0x20c0
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
nopl (%rax,%rax)
// File: frolosofsky[P]pbft/./pbft.h
// Function: PBFTNode::on_tick()
void on_tick() override {
        auto inbox = take_inbox();
        for(auto &mm : inbox) {
            auto const s = mm.first;
            auto &m = mm.second;
            switch(m.type) {
            case Message::Type::Write:
                process(s, std::move(m.data.write));
                break;
            case Message::Type::Read:
                process(s, std::move(m.data.read));
                break;
            case Message::Type::PrePrepare:
                process(s, std::move(m.data.preprepare));
                break;
            case Message::Type::Prepare:
                process(s, std::move(m.data.prepare));
                break;
            case Message::Type::Commit:
                process(s, std::move(m.data.commit));
                break;
            case Message::Type::WriteAck:
            case Message::Type::ReadAck:
            case Message::Type::Response:
                assert(not("Unreachable"));
            }
        }
    }

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x70, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rsi
movq %rsi, -0x68(%rbp)
leaq -0x20(%rbp), %rdi
callq 0x8260
leaq -0x20(%rbp), %rax
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rdi
callq 0x82c0
movq %rax, -0x30(%rbp)
movq -0x28(%rbp), %rdi
callq 0x50e0
movq %rax, -0x38(%rbp)
leaq -0x30(%rbp), %rdi
leaq -0x38(%rbp), %rsi
callq 0x82f0
testb $0x1, %al
jne 0xa545
jmp 0xa65a
leaq -0x30(%rbp), %rdi
callq 0x8320
movq %rax, -0x40(%rbp)
movq -0x40(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x48(%rbp)
movq -0x40(%rbp), %rax
addq $0x8, %rax
movq %rax, -0x50(%rbp)
movq -0x50(%rbp), %rax
movl (%rax), %eax
movq %rax, -0x70(%rbp)
subq $0x7, %rax
ja 0xa64a
movq -0x70(%rbp), %rax
leaq 0x4d2c(%rip), %rcx      # 0xf2b4
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movq -0x68(%rbp), %rdi
movq -0x48(%rbp), %rsi
movq -0x50(%rbp), %rdx
addq $0x8, %rdx
callq 0xa770
jmp 0xa5a8
jmp 0xa64a
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x58(%rbp)
movl %eax, -0x5c(%rbp)
leaq -0x20(%rbp), %rdi
callq 0x7f80
jmp 0xa669
movq -0x68(%rbp), %rdi
movq -0x48(%rbp), %rsi
movq -0x50(%rbp), %rdx
addq $0x8, %rdx
callq 0xa7f0
jmp 0xa5de
jmp 0xa64a
movq -0x68(%rbp), %rdi
movq -0x48(%rbp), %rsi
movq -0x50(%rbp), %rdx
addq $0x8, %rdx
callq 0xa870
jmp 0xa5f7
jmp 0xa64a
movq -0x68(%rbp), %rdi
movq -0x48(%rbp), %rsi
movq -0x50(%rbp), %rdx
addq $0x8, %rdx
callq 0xa930
jmp 0xa610
jmp 0xa64a
movq -0x68(%rbp), %rdi
movq -0x48(%rbp), %rsi
movq -0x50(%rbp), %rdx
addq $0x8, %rdx
callq 0xa9e0
jmp 0xa629
jmp 0xa64a
leaq 0x4adf(%rip), %rdi      # 0xf111
leaq 0x4ec9(%rip), %rsi      # 0xf502
movl $0xa1, %edx
leaq 0x4ee4(%rip), %rcx      # 0xf529
callq 0x20c0
jmp 0xa64c
leaq -0x30(%rbp), %rdi
callq 0x85f0
jmp 0xa52f
leaq -0x20(%rbp), %rdi
callq 0x7f80
addq $0x70, %rsp
popq %rbp
retq
movq -0x58(%rbp), %rdi
callq 0x21e0
nopw %cs:(%rax,%rax)
nopl (%rax)
// File: frolosofsky[P]pbft/./pbft.h
// Function: PBFTNode::process(unsigned long, Message::WriteOpRequest&&)
void process(uintptr_t sender, Message::WriteOpRequest &&msg) {
        if(_role != Role::Primary)
            return; // only primary reacts on client requests. Change-view in TODO
        auto p = prepreare(sender, std::move(msg));
        if(_state.preprepare(p.view, p.req_id))
            broadcast(std::move(p));
    }

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x80, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x80(%rbp)
cmpl $0x0, 0x74(%rax)
je 0xa797
jmp 0xa7df
movq -0x80(%rbp), %rsi
movq -0x10(%rbp), %rdx
movq -0x18(%rbp), %rcx
leaq -0x40(%rbp), %rdi
callq 0xaa60
movq -0x80(%rbp), %rdi
addq $0x60, %rdi
movl -0x20(%rbp), %esi
movl -0x1c(%rbp), %edx
callq 0xaaf0
testb $0x1, %al
jne 0xa7c5
jmp 0xa7df
leaq -0x78(%rbp), %rdi
leaq -0x40(%rbp), %rsi
callq 0xaba0
movq -0x80(%rbp), %rdi
leaq -0x78(%rbp), %rsi
callq 0x2810
addq $0x80, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: frolosofsky[P]pbft/./pbft.h
// Function: PBFTNode::process(unsigned long, Message::ReadOpRequest&&)
void process(uintptr_t sender, Message::ReadOpRequest &&msg) {
        if(_role != Role::Primary)
            return; // only primary reacts on client requests. Change-view in TODO
        auto p = prepreare(sender, std::move(msg));
        if(_state.preprepare(p.view, p.req_id))
            broadcast(std::move(p));
    }

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x80, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x80(%rbp)
cmpl $0x0, 0x74(%rax)
je 0xa817
jmp 0xa85f
movq -0x80(%rbp), %rsi
movq -0x10(%rbp), %rdx
movq -0x18(%rbp), %rcx
leaq -0x40(%rbp), %rdi
callq 0xac50
movq -0x80(%rbp), %rdi
addq $0x60, %rdi
movl -0x20(%rbp), %esi
movl -0x1c(%rbp), %edx
callq 0xaaf0
testb $0x1, %al
jne 0xa845
jmp 0xa85f
leaq -0x78(%rbp), %rdi
leaq -0x40(%rbp), %rsi
callq 0xaba0
movq -0x80(%rbp), %rdi
leaq -0x78(%rbp), %rsi
callq 0x2810
addq $0x80, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: frolosofsky[P]pbft/./pbft.h
// Function: PBFTNode::process(unsigned long, Message::PrePrepare&&)
void process(uintptr_t sender[[gnu::unused]], Message::PrePrepare &&msg) {
        if(_role == Role::Primary)
            return; // only replicas react on preprepare
        if(!verify_message(msg))
            return;
        if(_state.preprepare(msg.view, msg.req_id) && _state.prepare(msg.view, msg.req_id))
            broadcast(prepare(std::move(msg)));
    }

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x80, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x80(%rbp)
cmpl $0x0, 0x74(%rax)
jne 0xa89a
jmp 0xa91a
movq -0x80(%rbp), %rdi
movq -0x18(%rbp), %rsi
callq 0xace0
testb $0x1, %al
jne 0xa8ad
jmp 0xa91a
movq -0x80(%rbp), %rdi
addq $0x60, %rdi
movq -0x18(%rbp), %rax
movl 0x20(%rax), %esi
movq -0x18(%rbp), %rax
movl 0x24(%rax), %edx
callq 0xaaf0
testb $0x1, %al
jne 0xa8ce
jmp 0xa91a
movq -0x80(%rbp), %rdi
addq $0x60, %rdi
movq -0x18(%rbp), %rax
movl 0x20(%rax), %esi
movq -0x18(%rbp), %rax
movl 0x24(%rax), %edx
callq 0xadb0
testb $0x1, %al
jne 0xa8ef
jmp 0xa91a
movq -0x80(%rbp), %rsi
movq -0x18(%rbp), %rdx
leaq -0x78(%rbp), %rdi
callq 0xae60
leaq -0x50(%rbp), %rdi
leaq -0x78(%rbp), %rsi
callq 0xae90
movq -0x80(%rbp), %rdi
leaq -0x50(%rbp), %rsi
callq 0x2810
addq $0x80, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
nopl (%rax)
// File: frolosofsky[P]pbft/./pbft.h
// Function: PBFTNode::process(unsigned long, Message::Prepare&&)
void process(uintptr_t sender[[gnu::unused]], Message::Prepare &&msg) {
        if(!verify_message(msg))
            return;
        if(_state.prepare(msg.view, msg.req_id) && _state.commit(msg.view, msg.req_id))
            broadcast(commit(std::move(msg)));
    }

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x80, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq -0x8(%rbp), %rdi
movq %rdi, -0x80(%rbp)
movq -0x18(%rbp), %rsi
callq 0xaf30
testb $0x1, %al
jne 0xa95e
jmp 0xa9cb
movq -0x80(%rbp), %rdi
addq $0x60, %rdi
movq -0x18(%rbp), %rax
movl 0x20(%rax), %esi
movq -0x18(%rbp), %rax
movl 0x24(%rax), %edx
callq 0xadb0
testb $0x1, %al
jne 0xa97f
jmp 0xa9cb
movq -0x80(%rbp), %rdi
addq $0x60, %rdi
movq -0x18(%rbp), %rax
movl 0x20(%rax), %esi
movq -0x18(%rbp), %rax
movl 0x24(%rax), %edx
callq 0xb000
testb $0x1, %al
jne 0xa9a0
jmp 0xa9cb
movq -0x80(%rbp), %rsi
movq -0x18(%rbp), %rdx
leaq -0x78(%rbp), %rdi
callq 0xb0b0
leaq -0x50(%rbp), %rdi
leaq -0x78(%rbp), %rsi
callq 0xb0e0
movq -0x80(%rbp), %rdi
leaq -0x50(%rbp), %rsi
callq 0x2810
addq $0x80, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
nop
// File: frolosofsky[P]pbft/./pbft.h
// Function: PBFTNode::process(unsigned long, Message::Commit&&)
void process(uintptr_t sender[[gnu::unused]], Message::Commit &&msg) {
        if(!verify_message(msg))
            return;
        if(_state.commit(msg.view, msg.req_id) && _state.state() == State::Type::Committed)
            success(msg.client, msg.msg);
    }

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq -0x8(%rbp), %rdi
movq %rdi, -0x20(%rbp)
movq -0x18(%rbp), %rsi
callq 0xb180
testb $0x1, %al
jne 0xaa0b
jmp 0xaa53
movq -0x20(%rbp), %rdi
addq $0x60, %rdi
movq -0x18(%rbp), %rax
movl 0x20(%rax), %esi
movq -0x18(%rbp), %rax
movl 0x24(%rax), %edx
callq 0xb000
testb $0x1, %al
jne 0xaa2c
jmp 0xaa53
movq -0x20(%rbp), %rdi
addq $0x60, %rdi
callq 0xb250
cmpl $0x5, %eax
jne 0xaa53
movq -0x20(%rbp), %rdi
movq -0x18(%rbp), %rax
movq 0x18(%rax), %rsi
movq -0x18(%rbp), %rdx
callq 0xb260
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax)
// File: frolosofsky[P]pbft/./pbft.h
// Function: State::preprepare(unsigned int, unsigned int)
bool preprepare(uint32_t view, uint32_t req_id) {
        switch(_state) {
        case Type::Init:
            _view = view;
            _req_id = req_id;
            _approves = 1;
            _state = Type::PrePrepare;
            return true;
        case Type::PrePrepare:
        case Type::Prepare:
        case Type::Prepared:
        case Type::Commit:
        case Type::Committed:
            if(_view == view && _req_id == req_id - 1) {
                _view = view;
                _req_id = req_id;
                _approves = 1;
                _state = Type::PrePrepare;
                return true;
            }
            return false;
        }
        return false; // happy gcc
    }

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x10(%rbp)
movl %esi, -0x14(%rbp)
movl %edx, -0x18(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x28(%rbp)
movl (%rax), %eax
movl %eax, -0x1c(%rbp)
testl %eax, %eax
je 0xab1d
jmp 0xab11
movl -0x1c(%rbp), %eax
decl %eax
subl $0x5, %eax
jb 0xab40
jmp 0xab86
movq -0x28(%rbp), %rax
movl -0x14(%rbp), %ecx
movl %ecx, 0x8(%rax)
movl -0x18(%rbp), %ecx
movl %ecx, 0xc(%rax)
movl $0x1, 0x4(%rax)
movl $0x1, (%rax)
movb $0x1, -0x1(%rbp)
jmp 0xab8a
movq -0x28(%rbp), %rax
movl 0x8(%rax), %eax
cmpl -0x14(%rbp), %eax
jne 0xab80
movq -0x28(%rbp), %rax
movl 0xc(%rax), %eax
movl -0x18(%rbp), %ecx
subl $0x1, %ecx
cmpl %ecx, %eax
jne 0xab80
movq -0x28(%rbp), %rax
movl -0x14(%rbp), %ecx
movl %ecx, 0x8(%rax)
movl -0x18(%rbp), %ecx
movl %ecx, 0xc(%rax)
movl $0x1, 0x4(%rax)
movl $0x1, (%rax)
movb $0x1, -0x1(%rbp)
jmp 0xab8a
movb $0x0, -0x1(%rbp)
jmp 0xab8a
movb $0x0, -0x1(%rbp)
movb -0x1(%rbp), %al
andb $0x1, %al
popq %rbp
retq
nopw %cs:(%rax,%rax)
nopl (%rax,%rax)
// File: frolosofsky[P]pbft/./pbft.h
// Function: State::prepare(unsigned int, unsigned int)
bool prepare(uint32_t view, uint32_t req_id) {
        if(_view != view || _req_id != req_id)
            return false;
        switch(_state) {
        case Type::Init:
            return false;
        case Type::PrePrepare:
            _state = Type::Prepare;
            _approves = 0;
            FALLTHROUGH;
        case Type::Prepare:
            ++_approves;
            if(_approves >= _f * 2) {
                _state = Type::Prepared;
                _approves = 1;
            }
            return true;
        case Type::Prepared:
        case Type::Commit:
        case Type::Committed:
            return false;
        }
        return false; // happy gcc
    }

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x10(%rbp)
movl %esi, -0x14(%rbp)
movl %edx, -0x18(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x20(%rbp)
movl 0x8(%rax), %eax
cmpl -0x14(%rbp), %eax
jne 0xadda
movq -0x20(%rbp), %rax
movl 0xc(%rax), %eax
cmpl -0x18(%rbp), %eax
je 0xade0
movb $0x0, -0x1(%rbp)
jmp 0xae55
movq -0x20(%rbp), %rax
movl (%rax), %eax
movq %rax, -0x28(%rbp)
subq $0x5, %rax
ja 0xae51
movq -0x28(%rbp), %rax
leaq 0x44d9(%rip), %rcx      # 0xf2d4
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movb $0x0, -0x1(%rbp)
jmp 0xae55
movq -0x20(%rbp), %rax
movl $0x2, (%rax)
movl $0x0, 0x4(%rax)
movq -0x20(%rbp), %rcx
movl 0x4(%rcx), %eax
addl $0x1, %eax
movl %eax, 0x4(%rcx)
movl 0x4(%rcx), %eax
movl 0x10(%rcx), %ecx
shll %ecx
cmpl %ecx, %eax
jl 0xae45
movq -0x20(%rbp), %rax
movl $0x3, (%rax)
movl $0x1, 0x4(%rax)
movb $0x1, -0x1(%rbp)
jmp 0xae55
movb $0x0, -0x1(%rbp)
jmp 0xae55
movb $0x0, -0x1(%rbp)
movb -0x1(%rbp), %al
andb $0x1, %al
popq %rbp
retq
nopl (%rax)
// File: frolosofsky[P]pbft/./pbft.h
// Function: PBFTNode::success(unsigned long, Message::OpRequestMessage const&)
void success(uintptr_t client, Message::OpRequestMessage const &msg) {
        if(_success_strategy == nullptr)
            return;
        auto answer = _success_strategy->accept(msg);
        auto sig = signature(digest(answer), id());
        send_to(client, Message::Response{std::move(answer), sig});
    }

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0xe0, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq -0x8(%rbp), %rdi
movq %rdi, -0xd0(%rbp)
addq $0x90, %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0xb370
testb $0x1, %al
jne 0xb298
jmp 0xb29d
jmp 0xb361
movq -0xd0(%rbp), %rdi
addq $0x90, %rdi
callq 0xb3a0
movq %rax, %rsi
movq -0x18(%rbp), %rdx
movq (%rsi), %rax
leaq -0x30(%rbp), %rdi
callq *0x10(%rax)
leaq -0x70(%rbp), %rdi
leaq -0x30(%rbp), %rsi
callq 0x8380
leaq -0x70(%rbp), %rdi
callq 0x87e0
movq -0xd0(%rbp), %rdi
movq %rax, -0xe0(%rbp)
callq 0x2390
movq -0xe0(%rbp), %rdi
movq %rax, %rsi
callq 0xabe0
movq %rax, -0x38(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0xd8(%rbp)
movq -0x30(%rbp), %rax
movq %rax, -0xc8(%rbp)
movq -0x28(%rbp), %rax
movq %rax, -0xc0(%rbp)
movq -0x20(%rbp), %rax
movq %rax, -0xb8(%rbp)
movq -0x38(%rbp), %rax
movq %rax, -0xb0(%rbp)
leaq -0xa8(%rbp), %rdi
leaq -0xc8(%rbp), %rsi
callq 0xb3c0
movq -0xd0(%rbp), %rdi
movq -0xd8(%rbp), %rsi
leaq -0xa8(%rbp), %rdx
callq 0x2670
addq $0xe0, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: frolosofsky[P]pbft/main.cpp
// Function: PBFT_DB::accept(Message::OpRequestMessage const&)
Message::OpResponseMessage accept(Message::OpRequestMessage const &msg) override {
        switch(msg.type) {
        case Message::Type::Write:
            return accept(msg.data.write);
        case Message::Type::Read:
            return accept(msg.data.read);
        case Message::Type::WriteAck:
        case Message::Type::ReadAck:
        case Message::Type::Response:
        case Message::Type::PrePrepare:
        case Message::Type::Prepare:
        case Message::Type::Commit:
            assert(not("Unreachable"));
        }
        return Message::ReadOpResponse{false, 0}; // happy gcc
    }

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movq %rdi, -0x50(%rbp)
movq %rdi, -0x48(%rbp)
movq %rsi, -0x8(%rbp)
movq %rdx, -0x10(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x40(%rbp)
movq -0x10(%rbp), %rax
movl (%rax), %eax
movq %rax, -0x38(%rbp)
subq $0x7, %rax
ja 0xbd2e
movq -0x38(%rbp), %rax
leaq 0x3649(%rip), %rcx      # 0xf304
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movq -0x40(%rbp), %rdi
movq -0x10(%rbp), %rsi
addq $0x8, %rsi
callq 0xc030
movq -0x50(%rbp), %rdi
movb %al, -0x20(%rbp)
movq %rdx, -0x18(%rbp)
leaq -0x20(%rbp), %rsi
callq 0xc080
jmp 0xbd46
movq -0x40(%rbp), %rdi
movq -0x10(%rbp), %rsi
addq $0x8, %rsi
callq 0xc0b0
movq -0x50(%rbp), %rdi
movq %rax, -0x28(%rbp)
leaq -0x28(%rbp), %rsi
callq 0xc130
jmp 0xbd46
leaq 0x33fb(%rip), %rdi      # 0xf111
leaq 0x36a8(%rip), %rsi      # 0xf3c5
movl $0x14, %edx
leaq 0x3821(%rip), %rcx      # 0xf54a
callq 0x20c0
movq -0x50(%rbp), %rdi
movb $0x0, -0x30(%rbp)
movl $0x0, -0x2c(%rbp)
leaq -0x30(%rbp), %rsi
callq 0xc130
movq -0x48(%rbp), %rax
addq $0x50, %rsp
popq %rbp
retq
// File: frolosofsky[P]pbft/main.cpp
// Function: PBFT_DB::accept(Message::ReadOpRequest const&)
Message::ReadOpResponse accept(Message::ReadOpRequest const &msg) {
        int value = 0;
        bool success = false;
        if(msg.index < _data.size()) {
            value = _data[msg.index];
            success = true;
        }
        return Message::ReadOpResponse{success, value};
    }

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq -0x10(%rbp), %rdi
movq %rdi, -0x30(%rbp)
movl $0x0, -0x1c(%rbp)
movb $0x0, -0x1d(%rbp)
movq -0x18(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x28(%rbp)
addq $0x8, %rdi
callq 0xc1d0
movq %rax, %rcx
movq -0x28(%rbp), %rax
cmpq %rcx, %rax
jae 0xc110
movq -0x30(%rbp), %rdi
addq $0x8, %rdi
movq -0x18(%rbp), %rax
movq (%rax), %rsi
callq 0xc8b0
movl (%rax), %eax
movl %eax, -0x1c(%rbp)
movb $0x1, -0x1d(%rbp)
movb -0x1d(%rbp), %al
andb $0x1, %al
movb %al, -0x8(%rbp)
movl -0x1c(%rbp), %eax
movl %eax, -0x4(%rbp)
movq -0x8(%rbp), %rax
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: frolosofsky[P]pbft/main.cpp
// Function: Simulator::tick()
void tick() {
        for(auto &l : _links)
            l->on_tick();
        for(auto &n : _nodes)
            if(n != nullptr)
                n->on_tick();
        if(_client->ready() && _actions.size() > 0) {
            _client->action(std::move(_actions.front()), alive_nodes());
            _actions.erase(_actions.begin());
        }
        _client->on_tick();
    }

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x80, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x68(%rbp)
addq $0x28, %rax
movq %rax, -0x10(%rbp)
movq -0x10(%rbp), %rdi
callq 0xd140
movq %rax, -0x18(%rbp)
movq -0x10(%rbp), %rdi
callq 0xcf30
movq %rax, -0x20(%rbp)
leaq -0x18(%rbp), %rdi
leaq -0x20(%rbp), %rsi
callq 0xe010
testb $0x1, %al
jne 0xde2c
jmp 0xde55
leaq -0x18(%rbp), %rdi
callq 0xe050
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rdi
callq 0x30a0
movq %rax, %rdi
callq 0x2d00
leaq -0x18(%rbp), %rdi
callq 0xe070
jmp 0xde19
movq -0x68(%rbp), %rax
addq $0x10, %rax
movq %rax, -0x30(%rbp)
movq -0x30(%rbp), %rdi
callq 0x9570
movq %rax, -0x38(%rbp)
movq -0x30(%rbp), %rdi
callq 0x9360
movq %rax, -0x40(%rbp)
leaq -0x38(%rbp), %rdi
leaq -0x40(%rbp), %rsi
callq 0xe090
testb $0x1, %al
jne 0xde8e
jmp 0xdecd
leaq -0x38(%rbp), %rdi
callq 0xe0d0
movq %rax, -0x48(%rbp)
movq -0x48(%rbp), %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0xe0f0
testb $0x1, %al
jne 0xdeae
jmp 0xdec0
movq -0x48(%rbp), %rdi
callq 0x6f10
movq %rax, %rdi
movq (%rdi), %rax
callq *0x10(%rax)
jmp 0xdec2
leaq -0x38(%rbp), %rdi
callq 0xe120
jmp 0xde7b
movq -0x68(%rbp), %rdi
callq 0xdda0
movq %rax, %rdi
callq 0xddc0
testb $0x1, %al
jne 0xdee7
jmp 0xdf6a
movq -0x68(%rbp), %rdi
addq $0x40, %rdi
callq 0xdd70
cmpq $0x0, %rax
jbe 0xdf6a
movq -0x68(%rbp), %rdi
callq 0xdda0
movq -0x68(%rbp), %rdi
movq %rax, -0x80(%rbp)
addq $0x40, %rdi
callq 0xe1f0
movq -0x68(%rbp), %rdi
movq %rax, -0x78(%rbp)
callq 0xe220
movq -0x80(%rbp), %rdi
movq -0x78(%rbp), %rsi
movl %eax, %edx
callq 0xe140
movq -0x68(%rbp), %rdi
movq %rdi, %rax
addq $0x40, %rax
movq %rax, -0x70(%rbp)
addq $0x40, %rdi
callq 0xe300
movq %rax, -0x58(%rbp)
leaq -0x50(%rbp), %rdi
leaq -0x58(%rbp), %rsi
callq 0xe330
movq -0x70(%rbp), %rdi
movq -0x50(%rbp), %rsi
callq 0xe2b0
movq %rax, -0x60(%rbp)
movq -0x68(%rbp), %rdi
callq 0xdda0
movq %rax, %rdi
movq (%rdi), %rax
callq *0x10(%rax)
addq $0x80, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
nop
// File: frolosofsky[P]pbft/main.cpp
// Function: Simulator::alive_nodes()
int alive_nodes() {
        int c = 0;
        for(auto const &n : _nodes)
            if(n != nullptr)
                ++c;
        return c;
    }

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movl $0x0, -0xc(%rbp)
addq $0x10, %rax
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rdi
callq 0x9570
movq %rax, -0x20(%rbp)
movq -0x18(%rbp), %rdi
callq 0x9360
movq %rax, -0x28(%rbp)
leaq -0x20(%rbp), %rdi
leaq -0x28(%rbp), %rsi
callq 0xe090
testb $0x1, %al
jne 0xe26c
jmp 0xe2a2
leaq -0x20(%rbp), %rdi
callq 0xe0d0
movq %rax, -0x30(%rbp)
movq -0x30(%rbp), %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0xe0f0
testb $0x1, %al
jne 0xe28c
jmp 0xe295
movl -0xc(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xc(%rbp)
jmp 0xe297
leaq -0x20(%rbp), %rdi
callq 0xe120
jmp 0xe259
movl -0xc(%rbp), %eax
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: cphinton42[P]hinton-language/src/basic.cpp
// Function: libc_alloc_func(void*, Allocator_Mode, void*, unsigned long, unsigned long)
void *libc_alloc_func(void *data, Allocator_Mode mode, void *old_ptr, u64 old_size, u64 new_size)
{
    if(mode == Allocator_Mode::alloc)
    {
        byte *memory = (byte*)malloc(new_size);
#ifdef USE_DEBUG_MEMORY_PATTERN
        fill_memory(memory, MEMORY_PATTERN, new_size);
#endif
        return (void*)memory;
    }
    else if(mode == Allocator_Mode::resize)
    {
        byte *memory = (byte*)realloc(old_ptr, new_size);
#ifdef USE_DEBUG_MEMORY_PATTERN
        if(new_size > old_size)
        {
            byte *start = memory + old_size;
            fill_memory(start, MEMORY_PATTERN, new_size-old_size);
        }
#endif
        return (void*)memory;
    }
    else if(mode == Allocator_Mode::dealloc)
    {
        free(old_ptr);
        return nullptr;
    }
    
    assert(false);
    return nullptr;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x10(%rbp)
movl %esi, -0x14(%rbp)
movq %rdx, -0x20(%rbp)
movq %rcx, -0x28(%rbp)
movq %r8, -0x30(%rbp)
cmpl $0x0, -0x14(%rbp)
jne 0x33e8
movq -0x30(%rbp), %rdi
callq 0x30c0
movq %rax, -0x38(%rbp)
movq -0x38(%rbp), %rax
movq %rax, -0x8(%rbp)
jmp 0x3445
cmpl $0x1, -0x14(%rbp)
jne 0x3409
movq -0x20(%rbp), %rdi
movq -0x30(%rbp), %rsi
callq 0x30e0
movq %rax, -0x40(%rbp)
movq -0x40(%rbp), %rax
movq %rax, -0x8(%rbp)
jmp 0x3445
cmpl $0x2, -0x14(%rbp)
jne 0x3422
movq -0x20(%rbp), %rdi
callq 0x30b0
movq $0x0, -0x8(%rbp)
jmp 0x3445
jmp 0x3424
jmp 0x3426
leaq 0x169f5(%rip), %rdi     # 0x19e22
leaq 0x16a38(%rip), %rsi     # 0x19e6c
movl $0x1f, %edx
leaq 0x16a3a(%rip), %rcx     # 0x19e7a
callq 0x3080
movq -0x8(%rbp), %rax
addq $0x40, %rsp
popq %rbp
retq
nop
// File: cphinton42[P]hinton-language/src/ast.cpp
// Function: construct_ast_(AST*, AST_Type, unsigned long, unsigned long)
AST* construct_ast_(AST *new_ast, AST_Type type, u64 line_number, u64 line_offset)
{
    new_ast->type = type;
    new_ast->flags = 0;
    new_ast->s = next_serial++;
    new_ast->line_number = line_number;
    new_ast->line_offset = line_offset;
    return new_ast;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movw %si, %ax
movq %rdi, -0x8(%rbp)
movw %ax, -0xa(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movw -0xa(%rbp), %cx
movq -0x8(%rbp), %rax
movw %cx, (%rax)
movq -0x8(%rbp), %rax
movw $0x0, 0x2(%rax)
movl 0x1c04e(%rip), %ecx     # 0x1fc90
movl %ecx, %eax
addl $0x1, %eax
movl %eax, 0x1c043(%rip)     # 0x1fc90
movq -0x8(%rbp), %rax
movl %ecx, 0x4(%rax)
movq -0x18(%rbp), %rax
movl %eax, %ecx
movq -0x8(%rbp), %rax
movl %ecx, 0x8(%rax)
movq -0x20(%rbp), %rax
movl %eax, %ecx
movq -0x8(%rbp), %rax
movl %ecx, 0xc(%rax)
movq -0x8(%rbp), %rax
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: cphinton42[P]hinton-language/src/ast.cpp
// Function: print_dot(Print_Buffer*, Array<Decl_AST*>)
void print_dot(Print_Buffer *pb, Array<Decl_AST*> decls)
{
    print_buf(pb, "digraph decls {\n");
    
    for(u64 i = 0; i < decls.count; ++i)
    {
        print_dot_rec(pb, decls[i]);
    }
    
    print_buf(pb, "}\n");
    flush_buffer(pb);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rsi, -0x10(%rbp)
movq %rdx, -0x8(%rbp)
movq %rdi, -0x18(%rbp)
movq -0x18(%rbp), %rdi
leaq 0x161b9(%rip), %rsi     # 0x19e58
movb $0x0, %al
callq 0x3d10
movq $0x0, -0x20(%rbp)
movq -0x20(%rbp), %rax
cmpq -0x10(%rbp), %rax
jae 0x3ce7
movq -0x18(%rbp), %rax
movq %rax, -0x28(%rbp)
movq -0x20(%rbp), %rsi
leaq -0x10(%rbp), %rdi
callq 0x16fb0
movq -0x28(%rbp), %rdi
movq (%rax), %rsi
callq 0x3db0
movq -0x20(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x20(%rbp)
jmp 0x3cae
movq -0x18(%rbp), %rdi
leaq 0x16177(%rip), %rsi     # 0x19e69
movb $0x0, %al
callq 0x3d10
movq -0x18(%rbp), %rdi
callq 0x48b0
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: cphinton42[P]hinton-language/src/io.cpp
// Function: flush_buffer(Print_Buffer*)
void flush_buffer(Print_Buffer *pb)
{
    assert(pb->fd >= 0);
    assert(pb->buffer.data);
    
    if(pb->buffer.count)
    {
        // TODO: handle error and/or return error code ?
        s64 result = write(pb->fd, pb->buffer.data, pb->buffer.count);
        pb->buffer.count = 0;
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
cmpl $0x0, (%rax)
jl 0x48c7
jmp 0x48e6
leaq 0x159f6(%rip), %rdi     # 0x1a2c4
leaq 0x159bb(%rip), %rsi     # 0x1a290
movl $0x91, %edx
leaq 0x159ef(%rip), %rcx     # 0x1a2d0
callq 0x3080
movq -0x8(%rbp), %rax
cmpq $0x0, 0x10(%rax)
je 0x48f3
jmp 0x4912
leaq 0x159f8(%rip), %rdi     # 0x1a2f2
leaq 0x1598f(%rip), %rsi     # 0x1a290
movl $0x92, %edx
leaq 0x159c3(%rip), %rcx     # 0x1a2d0
callq 0x3080
movq -0x8(%rbp), %rax
cmpq $0x0, 0x8(%rax)
je 0x4948
movq -0x8(%rbp), %rax
movl (%rax), %edi
movq -0x8(%rbp), %rax
movq 0x10(%rax), %rsi
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rdx
callq 0x3040
movq %rax, -0x10(%rbp)
movq -0x8(%rbp), %rax
movq $0x0, 0x8(%rax)
addq $0x10, %rsp
popq %rbp
retq
nop
// File: cphinton42[P]hinton-language/src/check.cpp
// Function: make_typecheck_job(Expr_AST*, AST*, unsigned int)
Job make_typecheck_job(Expr_AST *type, AST *ast, u32 stage)
{
    Job result;
    result.type = Job_Type::typecheck;
    result.stage = stage;
    result.typecheck.type = type;
    result.typecheck.ast = ast;
    return result;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, %rax
movq %rsi, -0x8(%rbp)
movq %rdx, -0x10(%rbp)
movl %ecx, -0x14(%rbp)
movl $0x0, (%rdi)
movl -0x14(%rbp), %ecx
movl %ecx, 0x4(%rdi)
movq -0x8(%rbp), %rcx
movq %rcx, 0x8(%rdi)
movq -0x10(%rbp), %rcx
movq %rcx, 0x10(%rdi)
popq %rbp
retq