LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_cpp_makefile_star2_O2/benjibc[P]json-universal-container/./boost_file/boost/unordered/detail/table.hpp
// Function: boost::unordered::detail::table<boost::unordered::detail::map<std::allocator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const, JSON>>, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, JSON, boost::hash<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>, std::equal_to<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>>>::calculate_max_load()
std::size_t calculate_max_load()
        {
            using namespace std;
    
            // From 6.3.1/13:
            // Only resize when size >= mlf_ * count
            return boost::unordered::detail::double_to_size(ceil(
                    static_cast<double>(this->mlf_) *
                    static_cast<double>(this->bucket_count_)
                ));

        }

// Assembly:
pushq %rax
cvtss2sd 0x1c(%rdi), %xmm1
movsd 0x8(%rdi), %xmm2
unpcklps 0x1b26(%rip), %xmm2     # xmm2 = xmm2[0],mem[0],xmm2[1],mem[1]
subpd 0x1b2e(%rip), %xmm2     # 0x7060
movapd %xmm2, %xmm0
unpckhpd %xmm2, %xmm0            # xmm0 = xmm0[1],xmm2[1]
addsd %xmm2, %xmm0
mulsd %xmm1, %xmm0
callq 0x2040
cvttsd2si %xmm0, %rax
movq %rax, %rcx
movapd %xmm0, %xmm1
subsd 0x1b15(%rip), %xmm1     # 0x7070
sarq $0x3f, %rcx
cvttsd2si %xmm1, %rdx
andq %rcx, %rdx
orq %rax, %rdx
ucomisd 0x1b06(%rip), %xmm0     # 0x7078
pushq $-0x1
popq %rax
cmovbq %rdx, %rax
popq %rcx
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/benjibc[P]json-universal-container/./boost_file/boost/unordered/detail/unique.hpp
// Function: boost::unordered::detail::table_impl<boost::unordered::detail::map<std::allocator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const, JSON>>, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, JSON, boost::hash<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>, std::equal_to<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>>>::rehash_impl(unsigned long)
void rehash_impl(std::size_t num_buckets)
        {
            BOOST_ASSERT(this->size_);

            buckets dst(this->node_alloc(), num_buckets);
            dst.create_buckets();

            previous_pointer src_start = this->get_previous_start();
            previous_pointer dst_start = dst.get_previous_start();

            dst_start->next_ = src_start->next_;
            src_start->next_ = link_pointer();
            dst.size_ = this->size_;
            this->size_ = 0;

            previous_pointer prev = dst.get_previous_start();
            while (prev->next_)
                prev = place_in_bucket(dst, prev);

            // Swap the new nodes back into the container and setup the
            // variables.
            dst.swap(*this); // no throw
        }

// Assembly:
pushq %r14
pushq %rbx
subq $0x28, %rsp
cmpq $0x0, 0x10(%rdi)
je 0x5619
movq %rdi, %rbx
leaq 0x8(%rsp), %rdi
andq $0x0, (%rdi)
movq %rsi, 0x8(%rdi)
andq $0x0, 0x10(%rdi)
callq 0x54b2
movq (%rbx), %rcx
movq 0x8(%rbx), %rdx
leaq 0x8(%rsp), %r14
movq (%r14), %rax
movq 0x8(%r14), %rsi
leaq (%rax,%rsi,8), %rax
movq (%rcx,%rdx,8), %rsi
movq %rsi, (%rax)
andq $0x0, (%rcx,%rdx,8)
movq 0x10(%rbx), %rcx
movq %rcx, 0x10(%r14)
andq $0x0, 0x10(%rbx)
cmpq $0x0, (%rax)
je 0x55eb
movq %r14, %rdi
movq %rax, %rsi
callq 0x5744
jmp 0x55d8
leaq 0x8(%rsp), %rdi
movq (%rdi), %rax
movq (%rbx), %rcx
movq %rcx, (%rdi)
movq %rax, (%rbx)
movups 0x8(%rbx), %xmm0
movups 0x8(%rdi), %xmm1
movups %xmm0, 0x8(%rdi)
movups %xmm1, 0x8(%rbx)
callq 0x57a2
addq $0x28, %rsp
popq %rbx
popq %r14
retq
leaq 0x257c(%rip), %rdi      # 0x7b9c
leaq 0x2378(%rip), %rsi      # 0x799f
leaq 0x23a0(%rip), %rcx      # 0x79ce
movl $0x2d7, %edx            # imm = 0x2D7
callq 0x2100
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
callq 0x57a2
movq %rbx, %rdi
callq 0x2250
nop
// File: /workspace/github_cpp_makefile_star2_O2/benjibc[P]json-universal-container/./boost_file/boost/unordered/detail/buckets.hpp
// Function: boost::unordered::detail::mix64_policy<unsigned long>::new_bucket_count(unsigned long)
static inline SizeT new_bucket_count(SizeT min) {
            if (min <= 4) return 4;
            --min;
            min |= min >> 1;
            min |= min >> 2;
            min |= min >> 4;
            min |= min >> 8;
            min |= min >> 16;
            min |= min >> 32;
            return min + 1;
        }

// Assembly:
cmpq $0x5, %rdi
jae 0x5658
pushq $0x4
popq %rax
retq
decq %rdi
movq %rdi, %rax
shrq %rax
orq %rdi, %rax
movq %rax, %rcx
shrq $0x2, %rcx
orq %rax, %rcx
movq %rcx, %rax
shrq $0x4, %rax
orq %rcx, %rax
movq %rax, %rcx
shrq $0x8, %rcx
orq %rax, %rcx
movq %rcx, %rdx
shrq $0x10, %rdx
orq %rcx, %rdx
movq %rdx, %rax
shrq $0x20, %rax
orq %rdx, %rax
incq %rax
retq
// File: /workspace/github_cpp_makefile_star2_O2/benjibc[P]json-universal-container/./boost_file/boost/unordered/detail/allocate.hpp
// Function: void boost::unordered::detail::array_constructor<std::allocator<boost::unordered::detail::ptr_bucket>>::construct<boost::unordered::detail::ptr_bucket>(boost::unordered::detail::ptr_bucket const&, unsigned long)
void construct(V const& v, std::size_t l)
        {
            BOOST_ASSERT(!ptr_);
            length_ = l;
            ptr_ = traits::allocate(alloc_, length_);
            pointer end = ptr_ + static_cast<std::ptrdiff_t>(length_);
            for(constructed_ = ptr_; constructed_ != end; ++constructed_)
                traits::construct(alloc_, boost::addressof(*constructed_), v);
        }

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
cmpq $0x0, 0x8(%rdi)
jne 0x56e7
movq %rsi, %rbx
movq %rdi, %r14
movq %rdx, 0x18(%rdi)
movq (%rdi), %rdi
movq %rdx, %rsi
callq 0x5714
movq %rax, 0x8(%r14)
movq 0x18(%r14), %rcx
leaq (%rax,%rcx,8), %rcx
movq %rax, 0x10(%r14)
cmpq %rcx, %rax
je 0x56df
movq (%rbx), %rdx
movq %rdx, (%rax)
movq 0x10(%r14), %rax
addq $0x8, %rax
jmp 0x56c6
addq $0x8, %rsp
popq %rbx
popq %r14
retq
leaq 0x2183(%rip), %rdi      # 0x7871
leaq 0x2182(%rip), %rsi      # 0x7877
leaq 0x21ac(%rip), %rcx      # 0x78a8
movl $0x4bf, %edx            # imm = 0x4BF
callq 0x2100
// File: /workspace/github_cpp_makefile_star2_O2/benjibc[P]json-universal-container/./boost_file/boost/unordered/detail/buckets.hpp
// Function: boost::unordered::detail::buckets<std::allocator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const, JSON>>, boost::unordered::detail::ptr_bucket, boost::unordered::detail::ptr_node<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const, JSON>>, boost::unordered::detail::mix64_policy<unsigned long>>::delete_buckets()
void delete_buckets()
        {
            if(this->buckets_) {
                previous_pointer prev = this->get_previous_start();

                while(prev->next_) {
                    node_pointer n = static_cast<node_pointer>(prev->next_);
                    prev->next_ = n->next_;
                    delete_node(iterator(n));
                }

                delete_extra_node(prev);

                bucket_pointer end = this->get_bucket(this->bucket_count_ + 1);
                for(bucket_pointer it = this->buckets_; it != end; ++it)
                {
                    bucket_allocator_traits::destroy(bucket_alloc(),
                        boost::addressof(*it));
                }

                bucket_allocator_traits::deallocate(bucket_alloc(),
                    this->buckets_, this->bucket_count_ + 1);
    
                this->buckets_ = bucket_pointer();
            }

            BOOST_ASSERT(!this->size_);
        }

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %rbx
movq (%rdi), %r14
testq %r14, %r14
je 0x57f0
movq 0x8(%rbx), %r15
movq (%r14,%r15,8), %rsi
testq %rsi, %rsi
je 0x57e4
movq (%rsi), %rax
addq $-0x50, %rsi
movq %rax, (%r14,%r15,8)
movq %rbx, %rdi
callq 0x581c
jmp 0x57c6
movq (%rbx), %rdi
callq 0x2180
andq $0x0, (%rbx)
cmpq $0x0, 0x10(%rbx)
jne 0x57fd
popq %rbx
popq %r14
popq %r15
retq
leaq 0x2397(%rip), %rdi      # 0x7b9b
leaq 0x1bf5(%rip), %rsi      # 0x7400
leaq 0x2396(%rip), %rcx      # 0x7ba8
movl $0x342, %edx            # imm = 0x342
callq 0x2100
// File: /workspace/github_cpp_makefile_star2_O2/benjibc[P]json-universal-container/./boost_file/boost/container/vector.hpp
// Function: boost::container::vector<JSON, std::allocator<JSON>>::vector(unsigned long)
explicit vector(size_type n)
      :  base_t()
   {
      //Allocate
      size_type real_cap;
      std::pair<pointer, bool> ret =
         this->allocation_command(allocate_new, n, n, real_cap, this->members_.m_start);
      T *new_mem = container_detail::to_raw_pointer(ret.first);
      //Anti-exception rollback
      typename value_traits::ArrayDeallocator scoped_alloc(new_mem, this->alloc(), real_cap);
      //Default constructor
      container_detail::default_construct_aux_proxy<A, T*> proxy(this->alloc(), n);
      proxy.uninitialized_copy_remaining_to(new_mem);
      //All ok, commit
      this->members_.m_start = ret.first;
      this->members_.m_size  = n;
      this->members_.m_capacity = real_cap;
      scoped_alloc.release();
   }

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x30, %rsp
movq %rsi, %r14
movq %rdi, %rbx
xorps %xmm0, %xmm0
movups %xmm0, (%rdi)
andq $0x0, 0x10(%rdi)
xorl %edx, %edx
callq 0x4e94
movq %rax, %r15
movq %rax, (%rsp)
movq %rbx, 0x8(%rsp)
movq %r14, 0x10(%rsp)
leaq 0x645b(%rip), %rax      # 0xbd10
leaq 0x18(%rsp), %rdi
movq %rax, (%rdi)
movq %rbx, 0x8(%rdi)
movq %r14, 0x10(%rdi)
movq %r15, %rsi
callq 0x590e
movq %r15, (%rbx)
movq %r14, 0x8(%rbx)
movq %r14, 0x10(%rbx)
movq %rsp, %rdi
andq $0x0, (%rdi)
callq 0x4f94
addq $0x30, %rsp
popq %rbx
popq %r14
popq %r15
retq
movq %rax, %r14
movq %rsp, %rdi
callq 0x4f94
jmp 0x58fe
movq %rax, %r14
movq %rbx, %rdi
callq 0x3842
movq %r14, %rdi
callq 0x2250
// File: /workspace/github_cpp_makefile_star2_O2/benjibc[P]json-universal-container/./boost_file/boost/container/detail/advanced_insert_int.hpp
// Function: boost::container::container_detail::default_construct_aux_proxy<std::allocator<JSON>, JSON*>::uninitialized_copy_some_and_update(JSON*, long, bool)
virtual void uninitialized_copy_some_and_update(Iterator pos, difference_type division_count, bool first_n)
   {
      size_type new_count;
      if(first_n){
         new_count = division_count;
      }
      else{
         BOOST_ASSERT(difference_type(this->count_)>= division_count);
         new_count = this->count_ - division_count;
      }
      this->priv_uninitialized_copy(pos, new_count);
   }

// Assembly:
movq %rdx, %rax
testl %ecx, %ecx
je 0x594d
movq %rax, %rdx
jmp 0x59f8
movq 0x10(%rdi), %rdx
subq %rax, %rdx
jl 0x595b
jmp 0x59f8
pushq %rax
leaq 0x2582(%rip), %rdi      # 0x7ee5
leaq 0x2489(%rip), %rsi      # 0x7df3
leaq 0x25a3(%rip), %rcx      # 0x7f14
pushq $0x7e
popq %rdx
callq 0x2100
nop
// File: /workspace/github_cpp_makefile_star2_O2/benjibc[P]json-universal-container/./boost_file/boost/container/detail/advanced_insert_int.hpp
// Function: boost::container::container_detail::default_construct_aux_proxy<std::allocator<JSON>, JSON*>::copy_some_and_update(JSON*, long, bool)
virtual void copy_some_and_update(Iterator , difference_type division_count, bool first_n)
   {
      BOOST_ASSERT(this->count_ == 0);
      size_type new_count;
      if(first_n){
         new_count = division_count;
      }
      else{
         BOOST_ASSERT(difference_type(this->count_)>= division_count);
         new_count = this->count_ - division_count;
      }
      //This function should never called with a count different to zero
      BOOST_ASSERT(new_count == 0);
      (void)new_count;
   }

// Assembly:
pushq %rax
cmpq $0x0, 0x10(%rdi)
jne 0x5995
testb %cl, %cl
jne 0x598e
testq %rdx, %rdx
jg 0x59d3
negq %rdx
testq %rdx, %rdx
jne 0x59b4
popq %rax
retq
leaq 0x2445(%rip), %rdi      # 0x7de1
leaq 0x2450(%rip), %rsi      # 0x7df3
leaq 0x271f(%rip), %rcx      # 0x80c9
movl $0x86, %edx
callq 0x2100
leaq 0x27de(%rip), %rdi      # 0x8199
leaq 0x2431(%rip), %rsi      # 0x7df3
leaq 0x2700(%rip), %rcx      # 0x80c9
movl $0x90, %edx
callq 0x2100
leaq 0x250b(%rip), %rdi      # 0x7ee5
leaq 0x2412(%rip), %rsi      # 0x7df3
leaq 0x26e1(%rip), %rcx      # 0x80c9
movl $0x8c, %edx
callq 0x2100
// File: /workspace/github_cpp_makefile_star2_O2/benjibc[P]json-universal-container/./boost_file/boost/container/detail/advanced_insert_int.hpp
// Function: boost::container::container_detail::default_construct_aux_proxy<std::allocator<JSON>, JSON*>::priv_uninitialized_copy(JSON*, unsigned long)
void priv_uninitialized_copy(Iterator p, const size_type n)
   {
      BOOST_ASSERT(n <= this->count_);
      Iterator orig_p = p;
      size_type i = 0;
      try{
         for(; i < n; ++i, ++p){
            alloc_traits::construct(this->a_, container_detail::to_raw_pointer(&*p));
         }
      }
      catch(...){
         while(i--){
            alloc_traits::destroy(this->a_, container_detail::to_raw_pointer(&*orig_p++));
         }
         throw;
      }
      this->count_ -= n;
   }

// Assembly:
pushq %rax
movq 0x10(%rdi), %rax
subq %rdx, %rax
jb 0x5a1b
addq $0x28, %rsi
subq $0x1, %rdx
jb 0x5a15
andl $0x0, (%rsi)
addq $0x30, %rsi
jmp 0x5a06
movq %rax, 0x10(%rdi)
popq %rax
retq
leaq 0x25d0(%rip), %rdi      # 0x7ff2
leaq 0x23ca(%rip), %rsi      # 0x7df3
leaq 0x25d4(%rip), %rcx      # 0x8004
movl $0x97, %edx
callq 0x2100
// File: /workspace/github_cpp_makefile_star2_O2/benjibc[P]json-universal-container/./boost_file/boost/container/vector.hpp
// Function: boost::container::container_detail::vector_alloc_holder<std::allocator<JSON>>::prot_deallocate()
void prot_deallocate()
   {
      if(!this->members_.m_capacity)   return;
      this->alloc().deallocate(this->members_.m_start, this->members_.m_capacity);
      this->members_.m_start     = 0;
      this->members_.m_size      = 0;
      this->members_.m_capacity  = 0;
   }

// Assembly:
cmpq $0x0, 0x10(%rdi)
je 0x5a71
pushq %rbx
movq %rdi, %rbx
movq (%rdi), %rdi
callq 0x2180
xorps %xmm0, %xmm0
movups %xmm0, (%rbx)
andq $0x0, 0x10(%rbx)
popq %rbx
retq
// File: /workspace/github_cpp_makefile_star2_O2/benjibc[P]json-universal-container/./boost_file/boost/unordered/detail/buckets.hpp
// Function: void boost::unordered::detail::node_constructor<std::allocator<boost::unordered::detail::ptr_node<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const, JSON>>>>::construct_value2<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const, JSON>&>(std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const, JSON>&)
void construct_value2(BOOST_FWD_REF(A0) a0)
        {
            BOOST_ASSERT(node_ && !constructed_);

            boost::unordered::detail::construct_node(alloc_,
                boost::addressof(*node_),
                BOOST_UNORDERED_EMPLACE_ARGS1(boost::forward<A0>(a0)));

            constructed_ = true;
            node_->init(static_cast<typename node::link_pointer>(node_));
        }

// Assembly:
pushq %rbx
movq %rdi, %rbx
movq 0x8(%rdi), %rdi
testq %rdi, %rdi
je 0x64ea
cmpb $0x1, 0x10(%rbx)
je 0x64ea
callq 0x6508
movb $0x1, 0x10(%rbx)
popq %rbx
retq
leaq 0xef8(%rip), %rdi       # 0x73e9
leaq 0xf08(%rip), %rsi       # 0x7400
leaq 0x1f20(%rip), %rcx      # 0x841f
pushq $0x54
popq %rdx
callq 0x2100
nop
// File: /workspace/github_cpp_makefile_star2_O2/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
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movl %edx, %r12d
movq %rdi, %r15
leaq -0x40(%rbp), %rax
movq %rsi, (%rax)
leaq 0x18(%rdi), %rbx
movq %rbx, %rdi
movq %rax, %rsi
callq 0x2e8c
movq %rax, %r14
leaq 0x20(%r15), %r13
cmpq %r13, %rax
je 0x243b
testb %r12b, %r12b
je 0x2430
leaq 0x28(%r14), %rsi
leaq -0x38(%rbp), %r12
movq %r12, %rdi
callq 0x2ee8
movq (%r12), %rdi
testq %rdi, %rdi
je 0x2450
movq %r15, %rsi
callq 0x2482
leaq -0x30(%rbp), %rdi
callq 0x2a9c
movq %rbx, %rdi
movq %r14, %rsi
callq 0x2f6a
cmpq %r13, %r14
setne %al
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x3c01(%rip), %rdi      # 0x6058
leaq 0x3bb1(%rip), %rsi      # 0x600f
leaq 0x3c07(%rip), %rcx      # 0x606c
pushq $0x16
popq %rdx
callq 0x20b0
movq %rax, %rbx
leaq -0x30(%rbp), %rdi
callq 0x2a9c
movq %rbx, %rdi
callq 0x21c0
nop
// File: /workspace/github_cpp_makefile_star2_O2/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
pushq %r15
pushq %r14
pushq %rbx
subq $0x18, %rsp
movq %rsi, %rbx
callq 0x2752
cmpq %rbx, (%rax)
jne 0x24e5
movq %rdx, %r14
addq $0x8, %rax
movq %rax, %rdi
callq 0x2a24
addq $0x8, %r14
leaq -0x28(%rbp), %r15
movq %r15, %rdi
movq %r14, %rsi
callq 0x31b0
movq (%r15), %rdi
testq %rdi, %rdi
je 0x24d1
pushq $0x1
popq %rdx
movq %rbx, %rsi
callq 0x23c8
leaq -0x20(%rbp), %rdi
callq 0x2a9c
addq $0x18, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
leaq 0x3c64(%rip), %rdi      # 0x6150
leaq 0x3b1c(%rip), %rsi      # 0x600f
leaq 0x3c6e(%rip), %rcx      # 0x6168
pushq $0x4f
popq %rdx
callq 0x20b0
movq %rax, %rbx
leaq -0x20(%rbp), %rdi
callq 0x2a9c
movq %rbx, %rdi
callq 0x21c0
// File: /workspace/github_cpp_makefile_star2_O2/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
pushq %r14
pushq %rbx
subq $0x20, %rsp
movq %rdx, %rbx
movq %rdi, %r14
leaq -0x18(%rbp), %rax
movq %rsi, (%rax)
addq $0x18, %rdi
movq %rax, %rsi
callq 0x2e8c
addq $0x20, %r14
cmpq %r14, %rax
je 0x2577
addq $0x28, %rax
leaq -0x28(%rbp), %r14
movq %r14, %rdi
movq %rax, %rsi
callq 0x2ee8
movq (%r14), %rdi
testq %rdi, %rdi
je 0x2584
movq -0x18(%rbp), %rsi
movq %rbx, %rdx
callq 0x25b6
movl %eax, %ebx
leaq -0x20(%rbp), %rdi
callq 0x2a9c
jmp 0x2579
xorl %ebx, %ebx
movl %ebx, %eax
addq $0x20, %rsp
popq %rbx
popq %r14
popq %rbp
retq
leaq 0x3acd(%rip), %rdi      # 0x6058
leaq 0x3a7d(%rip), %rsi      # 0x600f
leaq 0x3af6(%rip), %rcx      # 0x608f
pushq $0x22
popq %rdx
callq 0x20b0
movq %rax, %rbx
leaq -0x20(%rbp), %rdi
callq 0x2a9c
movq %rbx, %rdi
callq 0x21c0
nop
// File: /workspace/github_cpp_makefile_star2_O2/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
pushq %r14
pushq %rbx
movq %rdx, %rbx
movq %rsi, %r14
callq 0x2752
cmpq %r14, (%rax)
jne 0x25f7
movq 0x10(%rax), %rcx
testq %rcx, %rcx
je 0x25f0
movl 0x8(%rcx), %ecx
testl %ecx, %ecx
je 0x25f0
addq $0x18, %rax
movq %rax, %rdi
movq %rbx, %rsi
callq 0x2a52
movb $0x1, %al
jmp 0x25f2
xorl %eax, %eax
popq %rbx
popq %r14
popq %rbp
retq
leaq 0x3b88(%rip), %rdi      # 0x6186
leaq 0x3a0a(%rip), %rsi      # 0x600f
leaq 0x3b92(%rip), %rcx      # 0x619e
pushq $0x5e
popq %rdx
callq 0x20b0
// File: /workspace/github_cpp_makefile_star2_O2/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
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x48, %rsp
movq %rsi, %rbx
movq %rdi, %r15
movq 0x30(%rdi), %r12
addq $0x20, %r15
leaq -0x38(%rbp), %r13
leaq -0x70(%rbp), %r14
cmpq %r15, %r12
je 0x2696
leaq 0x28(%r12), %rsi
movq %r13, %rdi
callq 0x2ee8
movq -0x38(%rbp), %rdi
testq %rdi, %rdi
je 0x26a5
movq 0x20(%r12), %rsi
movl 0x30(%rbx), %eax
movl %eax, -0x40(%rbp)
movups (%rbx), %xmm0
movups 0x10(%rbx), %xmm1
movups 0x20(%rbx), %xmm2
movaps %xmm2, -0x50(%rbp)
movaps %xmm1, -0x60(%rbp)
movaps %xmm0, -0x70(%rbp)
movq %r14, %rdx
callq 0x25b6
leaq -0x30(%rbp), %rdi
callq 0x2a9c
movq %r12, %rdi
callq 0x20d0
movq %rax, %r12
jmp 0x263b
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x39ac(%rip), %rdi      # 0x6058
leaq 0x395c(%rip), %rsi      # 0x600f
leaq 0x39ff(%rip), %rcx      # 0x60b9
pushq $0x29
popq %rdx
callq 0x20b0
movq %rax, %rbx
leaq -0x30(%rbp), %rdi
callq 0x2a9c
movq %rbx, %rdi
callq 0x21c0
// File: /workspace/github_cpp_makefile_star2_O2/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:
leaq 0x30(%rdi), %rcx
cmpq %rsi, (%rdi)
jne 0x2763
movq %rdi, %rax
movq %rcx, %rdi
jmp 0x276b
movq %rcx, %rax
cmpq %rsi, (%rcx)
jne 0x276f
movq %rdi, %rdx
retq
pushq %rbp
movq %rsp, %rbp
leaq 0x3997(%rip), %rdi      # 0x6111
leaq 0x388e(%rip), %rsi      # 0x600f
leaq 0x399c(%rip), %rcx      # 0x6124
pushq $0x3a
popq %rdx
callq 0x20b0
// File: /workspace/github_cpp_makefile_star2_O2/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
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rdi, %rbx
movq (%rsi), %rdi
testq %rdi, %rdi
je 0x27d7
movq %rdx, %r15
movq %rsi, %r14
movq (%rdx), %rsi
testq %rsi, %rsi
sete %al
cmpq %rsi, %rdi
sete %cl
orb %al, %cl
jne 0x27d7
callq 0x239a
testb %al, %al
jne 0x27d7
movq (%r15), %rdi
movq (%r14), %rsi
callq 0x239a
testb %al, %al
je 0x27e9
xorps %xmm0, %xmm0
movups %xmm0, (%rbx)
movq %rbx, %rax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
pushq $0x60
popq %rdi
callq 0x2110
movq %rax, %r12
movq %rax, %rdi
movq %r14, %rsi
movq %r15, %rdx
callq 0x29cc
movq %rbx, %rdi
movq %r12, %rsi
callq 0x30c6
movq (%r14), %rdi
movq (%r15), %rsi
movq %rbx, %rdx
callq 0x2356
movq (%r15), %rdi
movq (%r14), %rsi
movq %rbx, %rdx
callq 0x2356
jmp 0x27dd
movq %rax, %r14
pushq $0x60
popq %rsi
movq %r12, %rdi
callq 0x2120
jmp 0x284a
movq %rax, %r14
addq $0x8, %rbx
movq %rbx, %rdi
callq 0x2a9c
movq %r14, %rdi
callq 0x21c0
// File: /workspace/github_cpp_makefile_star2_O2/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
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rdx, %rbx
movq %rsi, %r14
leaq 0x18(%rdx), %r12
movq 0x18(%rdx), %r13
addq $0x8, %rbx
cmpq %r12, %r13
je 0x2998
movl 0x40(%r13), %eax
testl %eax, %eax
jle 0x294e
decl %eax
movl %eax, 0x40(%r13)
movq (%r13), %r13
jmp 0x2935
leaq -0x38(%rbp), %rdi
movq %rbx, %rsi
callq 0x31b0
movq -0x38(%rbp), %r15
testq %r15, %r15
je 0x2982
leaq 0x10(%r13), %rdx
movq %r15, %rdi
movq %r14, %rsi
callq 0x26d6
movq %r12, %rdi
movq %r13, %rsi
callq 0x2a84
movq %rax, %r13
jmp 0x298a
movq %r12, %rdi
callq 0x2a62
leaq -0x30(%rbp), %rdi
callq 0x2a9c
testq %r15, %r15
jne 0x2935
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
leaq -0x30(%rbp), %rdi
callq 0x2a9c
movq %rbx, %rdi
callq 0x21c0
nop
// File: /workspace/github_cpp_makefile_star2_O2/frolosofsky[P]pbft/main.cpp
// Function: main
int main() {
    Simulator sim(1);
    sim.actions({
        Message::WriteOpRequest{1},
        Message::WriteOpRequest{2},
        Message::WriteOpRequest{10},
        Message::ReadOpRequest{0},
        Message::ReadOpRequest{2},
        Message::ReadOpRequest{3},
        });
    sim.run();
    sim.destroy_node(1);
    sim.actions({
        Message::WriteOpRequest{1000},
        Message::WriteOpRequest{1234},
        Message::WriteOpRequest{9876},
        Message::ReadOpRequest{5},
        Message::ReadOpRequest{10},
        Message::ReadOpRequest{3},
        });
    sim.run();
    return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0xd8, %rsp
leaq -0x90(%rbp), %rdi
pushq $0x1
popq %rsi
xorl %edx, %edx
callq 0x346e
leaq -0xf0(%rbp), %rsi
andl $0x0, (%rsi)
movl $0x1, 0x8(%rsi)
andl $0x0, 0x10(%rsi)
pushq $0x2
popq %r15
movl %r15d, 0x18(%rsi)
andl $0x0, 0x20(%rsi)
movl $0xa, 0x28(%rsi)
movl %r15d, 0x30(%rsi)
andq $0x0, 0x38(%rsi)
movl %r15d, 0x40(%rsi)
movq $0x2, 0x48(%rsi)
movl %r15d, 0x50(%rsi)
movq $0x3, 0x58(%rsi)
leaq -0x38(%rbp), %rdi
pushq $0x6
popq %rdx
leaq -0x19(%rbp), %rcx
callq 0x34f8
leaq -0x50(%rbp), %rbx
leaq -0x38(%rbp), %r14
movq %rbx, %rdi
movq %r14, %rsi
callq 0x5580
movq %r14, %rdi
callq 0x55cc
leaq -0x90(%rbp), %rdi
callq 0x3532
leaq -0x90(%rbp), %rdi
pushq $0x1
popq %rsi
callq 0x359c
leaq -0xf0(%rbp), %rsi
andl $0x0, (%rsi)
movl $0x3e8, 0x8(%rsi)       # imm = 0x3E8
andl $0x0, 0x10(%rsi)
movl $0x4d2, 0x18(%rsi)      # imm = 0x4D2
andl $0x0, 0x20(%rsi)
movl $0x2694, 0x28(%rsi)     # imm = 0x2694
movl %r15d, 0x30(%rsi)
movq $0x5, 0x38(%rsi)
movl %r15d, 0x40(%rsi)
movq $0xa, 0x48(%rsi)
movl %r15d, 0x50(%rsi)
movq $0x3, 0x58(%rsi)
leaq -0x38(%rbp), %rdi
pushq $0x6
popq %rdx
leaq -0x19(%rbp), %rcx
callq 0x34f8
movq %rbx, %rdi
movq %r14, %rsi
callq 0x5580
movq %r14, %rdi
callq 0x55cc
leaq -0x90(%rbp), %rdi
callq 0x3532
leaq -0x90(%rbp), %rdi
callq 0x35e0
xorl %eax, %eax
addq $0xd8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
jmp 0x3456
jmp 0x3456
movq %rax, %rbx
leaq -0x90(%rbp), %rdi
callq 0x35e0
movq %rbx, %rdi
callq 0x21c0
nop
// File: /workspace/github_cpp_makefile_star2_O2/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
pushq %r14
pushq %rbx
movq %rdi, %r14
xorl %ebx, %ebx
cmpq $0x0, 0x50(%r14)
jne 0x3550
movq (%r14), %rax
movl 0x60(%rax), %ecx
cmpl 0x64(%rax), %ecx
je 0x3564
cmpl $0x270f, %ebx           # imm = 0x270F
ja 0x3564
movq %r14, %rdi
callq 0x5648
incl %ebx
jmp 0x353e
movq 0x7a6d(%rip), %rdi      # 0xafd8
leaq 0x2ffe(%rip), %rsi      # 0x6570
callq 0x2100
movq %rax, %rdi
movl %ebx, %esi
callq 0x21b0
leaq 0x2ffe(%rip), %rsi      # 0x6586
movq %rax, %rdi
callq 0x2100
movq %rax, %rdi
popq %rbx
popq %r14
popq %rbp
jmp 0x2080
// File: /workspace/github_cpp_makefile_star2_O2/frolosofsky[P]pbft/main.cpp
// Function: ClientNode::on_tick()
void on_tick() override {
        auto inbox = take_inbox();
        for(auto const &m : inbox) {
            switch(m.second.type) {
            case Message::Type::Response: {
                auto const &r = m.second.data.response;
                char const *verified = (verify_message(r.msg, r.sig, m.first) ? "Verified" : "Malformed");
                std::cout << m.first << " -> " << m.second << " :: " << verified  << std::endl;
                ++_actual_answers;
            } break;
            case Message::Type::Write:
            case Message::Type::Read:
            case Message::Type::WriteAck:
            case Message::Type::ReadAck:
                assert(not("Unreachable"));
            case Message::Type::PrePrepare:
            case Message::Type::Prepare:
            case Message::Type::Commit:
                // Client is interconnected with all nodes, here you can debug service
                // messages comming from nodes
                // std::cout << m.first << " -> " << m.second << std::endl;
                break;
            }
        }
    }

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x58, %rsp
movq %rdi, %rbx
leaq -0x40(%rbp), %r12
movq %r12, %rdi
movq %rbx, %rsi
callq 0x3e8e
leaq -0x78(%rbp), %r15
movq %r12, %r14
movq (%r14), %r14
cmpq %r12, %r14
je 0x3d91
cmpl $0x4, 0x18(%r14)
je 0x3d0c
jae 0x3cf2
jmp 0x3da9
leaq 0x20(%r14), %rsi
movq %r15, %rdi
callq 0x3ed8
movq 0x10(%r14), %rdx
movq 0x38(%r14), %rsi
movq %r15, %rdi
callq 0x3eb6
testb %al, %al
leaq 0x2650(%rip), %r13      # 0x6381
leaq 0x2640(%rip), %rax      # 0x6378
cmovneq %rax, %r13
movq 0x10(%r14), %rsi
movq 0x7291(%rip), %rdi      # 0xafd8
callq 0x20c0
movq %rax, %rdi
leaq 0x2635(%rip), %rsi      # 0x638b
callq 0x2100
leaq 0x18(%r14), %rsi
movq %rax, %rdi
callq 0x3f11
movq %rax, %rdi
leaq 0x261f(%rip), %rsi      # 0x6390
callq 0x2100
movq %rax, %rdi
movq %r13, %rsi
callq 0x2100
movq %rax, %rdi
callq 0x2080
incl 0x64(%rbx)
jmp 0x3cf2
leaq -0x40(%rbp), %rdi
callq 0x3e02
addq $0x58, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x2361(%rip), %rdi      # 0x6111
leaq 0x25de(%rip), %rsi      # 0x6395
leaq 0x25e0(%rip), %rcx      # 0x639e
pushq $0x47
popq %rdx
callq 0x20b0
jmp 0x3dc8
movq %rax, %rbx
leaq -0x40(%rbp), %rdi
callq 0x3e02
movq %rbx, %rdi
callq 0x21c0
// File: /workspace/github_cpp_makefile_star2_O2/frolosofsky[P]pbft/./pbft_types.h
// Function: std::ostream& operator<<<std::ostream>(std::ostream&, Message const&)
Stream &operator<<(Stream &os, Message const &m) {
    switch(m.type) {
    case Message::Type::Write:
        return os << "Write{" << m.data.write << "}";
    case Message::Type::Read:
        return os << "Read{" << m.data.read << "}";
    case Message::Type::WriteAck:
        return os << "WriteAck{" << m.data.write_ack << "}";
    case Message::Type::ReadAck:
        return os << "ReadAck{" << m.data.read_ack << "}";
    case Message::Type::Response:
        return os << "Response{" << m.data.response << "}";
    case Message::Type::PrePrepare:
        return os << "PrePrepare{" << m.data.preprepare << "}";
    case Message::Type::Prepare:
        return os << "Prepare{" << m.data.prepare << "}";
    case Message::Type::Commit:
        return os << "Commit{" << m.data.commit << "}";
    }
    return os; // happy gcc
}

// Assembly:
movl (%rsi), %eax
cmpq $0x7, %rax
ja 0x400f
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movq %rsi, %rbx
leaq 0x2337(%rip), %rcx      # 0x6264
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
leaq 0x24e7(%rip), %rsi      # 0x6424
callq 0x2100
addq $0x8, %rbx
movq %rax, %rdi
movq %rbx, %rsi
callq 0x4102
jmp 0x3ffa
leaq 0x24e9(%rip), %rsi      # 0x6446
callq 0x2100
addq $0x8, %rbx
movq %rax, %rdi
movq %rbx, %rsi
callq 0x41ce
jmp 0x3ffa
leaq 0x24b0(%rip), %rsi      # 0x642d
callq 0x2100
addq $0x8, %rbx
movq %rax, %rdi
movq %rbx, %rsi
callq 0x4127
jmp 0x3ffa
leaq 0x24a3(%rip), %rsi      # 0x643d
callq 0x2100
addq $0x8, %rbx
movq %rax, %rdi
movq %rbx, %rsi
callq 0x418e
jmp 0x3ffa
leaq 0x24a5(%rip), %rsi      # 0x645c
jmp 0x3fe6
leaq 0x2473(%rip), %rsi      # 0x6433
callq 0x2100
addq $0x8, %rbx
movq %rax, %rdi
movq %rbx, %rsi
callq 0x414d
jmp 0x3ffa
leaq 0x2473(%rip), %rsi      # 0x6450
jmp 0x3fe6
leaq 0x246d(%rip), %rsi      # 0x6453
callq 0x2100
addq $0x8, %rbx
movq %rax, %rdi
movq %rbx, %rsi
callq 0x422d
leaq 0x242a(%rip), %rsi      # 0x642b
movq %rax, %rdi
addq $0x8, %rsp
popq %rbx
popq %rbp
jmp 0x2100
movq %rdi, %rax
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/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:
movq %rdi, %rsi
movl (%rdi), %eax
cmpq $0x3, %rax
ja 0x408b
leaq 0x2237(%rip), %rcx      # 0x6284
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movslq 0x8(%rsi), %rax
retq
movabsq $0x2000000000000000, %rax # imm = 0x2000000000000000
addq 0x8(%rsi), %rax
retq
movslq 0xc(%rsi), %rcx
movabsq $0x3000000000000000, %rax # imm = 0x3000000000000000
addq %rcx, %rax
retq
movabsq $0x1000000000000000, %rax # imm = 0x1000000000000000
addq 0x10(%rsi), %rax
retq
pushq %rbp
movq %rsp, %rbp
movq 0x6f42(%rip), %rdi      # 0xafd8
callq 0x3f11
movq %rax, %rdi
callq 0x2080
leaq 0x2067(%rip), %rdi      # 0x6111
leaq 0x2310(%rip), %rsi      # 0x63c1
leaq 0x2314(%rip), %rcx      # 0x63cc
pushq $0x26
popq %rdx
callq 0x20b0
// File: /workspace/github_cpp_makefile_star2_O2/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:
movl (%rsi), %eax
cmpl $0x7, %eax
ja 0x40d8
cmpl $0x1, %eax
je 0x40d9
cmpl $0x3, %eax
jne 0x40e1
movq 0x8(%rsi), %rax
movq %rax, (%rdi)
retq
movups 0x8(%rsi), %xmm0
movups %xmm0, (%rdi)
retq
pushq %rbp
movq %rsp, %rbp
leaq 0x2025(%rip), %rdi      # 0x6111
leaq 0x22f8(%rip), %rsi      # 0x63eb
leaq 0x2300(%rip), %rcx      # 0x63fa
pushq $0x77
popq %rdx
callq 0x20b0
// File: /workspace/github_cpp_makefile_star2_O2/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:
movl (%rsi), %eax
cmpq $0x7, %rax
ja 0x42e1
leaq 0x1fc1(%rip), %rcx      # 0x6294
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movl 0x8(%rsi), %eax
movl %eax, (%rdi)
retq
movq 0x8(%rsi), %rax
movq %rax, (%rdi)
retq
pushq %rbp
movq %rsp, %rbp
leaq 0x1e1c(%rip), %rdi      # 0x6111
leaq 0x20ef(%rip), %rsi      # 0x63eb
leaq 0x2186(%rip), %rcx      # 0x6489
pushq $0x66
popq %rdx
callq 0x20b0
nop
// File: /workspace/github_cpp_makefile_star2_O2/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
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x20, %rsp
movq %rdi, %rbx
leaq -0x38(%rbp), %r14
movq %r14, %rdi
movq %rbx, %rsi
callq 0x3e8e
leaq 0x19f8(%rip), %r15      # 0x62b4
movq %r14, %r12
movq (%r12), %r12
cmpq %r14, %r12
je 0x492c
movl 0x18(%r12), %eax
cmpq $0x7, %rax
ja 0x48bf
movq 0x10(%r12), %rsi
movslq (%r15,%rax,4), %rax
addq %r15, %rax
jmpq *%rax
leaq 0x20(%r12), %rdx
movq %rbx, %rdi
callq 0x4976
jmp 0x48bf
leaq 0x20(%r12), %rdx
movq %rbx, %rdi
callq 0x49ec
jmp 0x48bf
leaq 0x20(%r12), %rdx
movq %rbx, %rdi
callq 0x4b78
jmp 0x48bf
leaq 0x20(%r12), %rdx
movq %rbx, %rdi
callq 0x4af2
jmp 0x48bf
leaq 0x20(%r12), %rdx
movq %rbx, %rdi
callq 0x4a62
jmp 0x48bf
leaq -0x38(%rbp), %rdi
callq 0x3e02
addq $0x20, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
leaq 0x17c8(%rip), %rdi      # 0x6111
leaq 0x1b82(%rip), %rsi      # 0x64d2
leaq 0x1ba2(%rip), %rcx      # 0x64f9
movl $0xa1, %edx
callq 0x20b0
movq %rax, %rbx
leaq -0x38(%rbp), %rdi
callq 0x3e02
movq %rbx, %rdi
callq 0x21c0
nop
// File: /workspace/github_cpp_makefile_star2_O2/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:
cmpl $0x0, 0x74(%rdi)
je 0x497d
retq
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
subq $0x60, %rsp
movq %rdx, %rcx
movq %rsi, %rdx
movq %rdi, %rbx
leaq -0x38(%rbp), %r14
movq %r14, %rdi
movq %rbx, %rsi
callq 0x4bc4
leaq 0x60(%rbx), %rdi
movl 0x20(%r14), %esi
movl 0x24(%r14), %edx
callq 0x4c34
testb %al, %al
je 0x49e3
leaq -0x70(%rbp), %rsi
movl $0x5, (%rsi)
movups -0x38(%rbp), %xmm0
movups -0x28(%rbp), %xmm1
movups %xmm0, 0x8(%rsi)
movups %xmm1, 0x18(%rsi)
movq -0x18(%rbp), %rax
movq %rax, 0x28(%rsi)
andl $0x0, 0x30(%rsi)
movq %rbx, %rdi
callq 0x2614
addq $0x60, %rsp
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/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:
cmpl $0x0, 0x74(%rdi)
je 0x49f3
retq
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
subq $0x60, %rsp
movq %rdx, %rcx
movq %rsi, %rdx
movq %rdi, %rbx
leaq -0x38(%rbp), %r14
movq %r14, %rdi
movq %rbx, %rsi
callq 0x4c6e
leaq 0x60(%rbx), %rdi
movl 0x20(%r14), %esi
movl 0x24(%r14), %edx
callq 0x4c34
testb %al, %al
je 0x4a59
leaq -0x70(%rbp), %rsi
movl $0x5, (%rsi)
movups -0x38(%rbp), %xmm0
movups -0x28(%rbp), %xmm1
movups %xmm0, 0x8(%rsi)
movups %xmm1, 0x18(%rsi)
movq -0x18(%rbp), %rax
movq %rax, 0x28(%rsi)
andl $0x0, 0x30(%rsi)
movq %rbx, %rdi
callq 0x2614
addq $0x60, %rsp
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/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:
cmpl $0x0, 0x74(%rdi)
je 0x4af0
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x38, %rsp
movq %rdx, %r14
movq %rdi, %rbx
movq %rdx, %rsi
callq 0x4cee
testb %al, %al
je 0x4ae6
leaq 0x60(%rbx), %r15
movl 0x20(%r14), %esi
movl 0x24(%r14), %edx
movq %r15, %rdi
callq 0x4c34
testb %al, %al
je 0x4ae6
movl 0x20(%r14), %esi
movl 0x24(%r14), %edx
movq %r15, %rdi
callq 0x4d6c
testb %al, %al
je 0x4ae6
movq 0x20(%r14), %rax
leaq -0x50(%rbp), %rsi
movq %rax, 0x28(%rsi)
movups (%r14), %xmm0
movups 0x10(%r14), %xmm1
movups %xmm1, 0x18(%rsi)
movups %xmm0, 0x8(%rsi)
movl $0x6, (%rsi)
andl $0x0, 0x30(%rsi)
movq %rbx, %rdi
callq 0x2614
addq $0x38, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/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
pushq %r15
pushq %r14
pushq %rbx
subq $0x38, %rsp
movq %rdx, %r14
movq %rdi, %rbx
movq %rdx, %rsi
callq 0x4dbc
testb %al, %al
je 0x4b6c
leaq 0x60(%rbx), %r15
movl 0x20(%r14), %esi
movl 0x24(%r14), %edx
movq %r15, %rdi
callq 0x4d6c
testb %al, %al
je 0x4b6c
movl 0x20(%r14), %esi
movl 0x24(%r14), %edx
movq %r15, %rdi
callq 0x4e3a
testb %al, %al
je 0x4b6c
movq 0x20(%r14), %rax
leaq -0x50(%rbp), %rsi
movq %rax, 0x28(%rsi)
movups (%r14), %xmm0
movups 0x10(%r14), %xmm1
movups %xmm1, 0x18(%rsi)
movups %xmm0, 0x8(%rsi)
movl $0x7, (%rsi)
andl $0x0, 0x30(%rsi)
movq %rbx, %rdi
callq 0x2614
addq $0x38, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/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
pushq %r14
pushq %rbx
movq %rdx, %rbx
movq %rdi, %r14
movq %rdx, %rsi
callq 0x4e88
testb %al, %al
je 0x4bbe
leaq 0x60(%r14), %rdi
movl 0x20(%rbx), %esi
movl 0x24(%rbx), %edx
callq 0x4e3a
testb %al, %al
je 0x4bbe
cmpl $0x5, 0x60(%r14)
jne 0x4bbe
movq 0x18(%rbx), %rsi
movq %r14, %rdi
movq %rbx, %rdx
popq %rbx
popq %r14
popq %rbp
jmp 0x4f06
popq %rbx
popq %r14
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/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
xorl %eax, %eax
cmpl %esi, 0x8(%rdi)
jne 0x4db9
cmpl %edx, 0xc(%rdi)
jne 0x4db9
movl (%rdi), %eax
cmpl $0x1, %eax
je 0x4d8f
cmpl $0x2, %eax
jne 0x4db7
movl 0x4(%rdi), %ecx
incl %ecx
jmp 0x4d9a
movl $0x2, (%rdi)
movl $0x1, %ecx
movl %ecx, 0x4(%rdi)
movl 0x10(%rdi), %edx
addl %edx, %edx
movb $0x1, %al
cmpl %edx, %ecx
jl 0x4db9
movabsq $0x100000003, %rcx      # imm = 0x100000003
movq %rcx, (%rdi)
jmp 0x4db9
xorl %eax, %eax
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/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
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x58, %rsp
movq %rsi, %rbx
movq 0x90(%rdi), %rsi
testq %rsi, %rsi
je 0x4f93
movq %rdi, %r14
movq (%rsi), %rax
leaq -0x40(%rbp), %r15
movq %r15, %rdi
callq *0x10(%rax)
leaq -0x78(%rbp), %r12
movq %r12, %rdi
movq %r15, %rsi
callq 0x3ed8
movq %r12, %rdi
callq 0x403b
movq %rax, %r13
movq %r14, %rdi
callq 0x234c
shrq %rax
addq %r13, %rax
movq 0x10(%r15), %rcx
movq %rcx, 0x18(%r12)
movups (%r15), %xmm0
movups %xmm0, 0x8(%r12)
movl $0x4, (%r12)
movq %rax, 0x20(%r12)
andl $0x0, 0x30(%r12)
leaq -0x78(%rbp), %rdx
movq %r14, %rdi
movq %rbx, %rsi
callq 0x2516
addq $0x58, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/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
pushq %rbx
pushq %rax
movq %rdi, %rbx
movl (%rdx), %eax
cmpq $0x7, %rax
ja 0x509a
leaq 0x127e(%rip), %rcx      # 0x62d4
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
addq $0x8, %rdx
movq %rsi, %rdi
movq %rdx, %rsi
callq 0x510e
movl %eax, %ecx
movq %rdx, %rax
movl $0x1, (%rbx)
movb %cl, 0x8(%rbx)
pushq $0x10
jmp 0x5097
addq $0x8, %rdx
movq %rsi, %rdi
movq %rdx, %rsi
callq 0x5138
movl $0x3, (%rbx)
pushq $0x8
popq %rcx
jmp 0x50a5
movl $0x3, (%rbx)
pushq $0x8
popq %rcx
xorl %eax, %eax
movq %rax, (%rbx,%rcx)
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
leaq 0x1057(%rip), %rdi      # 0x6111
leaq 0x12d4(%rip), %rsi      # 0x6395
leaq 0x1452(%rip), %rcx      # 0x651a
pushq $0x14
popq %rdx
callq 0x20b0
// File: /workspace/github_cpp_makefile_star2_O2/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:
movq (%rsi), %rcx
movq 0x8(%rdi), %rax
movq 0x10(%rdi), %rdx
subq %rax, %rdx
sarq $0x2, %rdx
cmpq %rdx, %rcx
jae 0x515d
pushq %rbp
movq %rsp, %rbp
movl (%rax,%rcx,4), %esi
shlq $0x20, %rsi
popq %rbp
jmp 0x515f
xorl %esi, %esi
xorl %eax, %eax
cmpq %rdx, %rcx
setb %al
orq %rsi, %rax
retq
nop