// File: /workspace/github_cpp_makefile_star2_O3/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, %r14
leaq -0x48(%rbp), %rbx
movq %rbx, 0x8(%rbx)
movq %rbx, (%rbx)
movq $0x0, 0x10(%rbx)
leaq 0x48(%rdi), %rsi
movq %rbx, %rdi
callq 0x2200
movq 0x58(%r14), %rax
movq 0x10(%rbx), %rcx
movq %r14, -0x30(%rbp)
movq %rcx, 0x58(%r14)
movq %rax, 0x10(%rbx)
movq (%rbx), %r14
cmpq %rbx, %r14
je 0x3d3c
cmpl $0x4, 0x18(%r14)
je 0x3c37
jae 0x3d28
jmp 0x3d6c
movl 0x20(%r14), %eax
movl %eax, -0x80(%rbp)
cmpl $0x7, %eax
ja 0x3daa
cmpl $0x1, %eax
je 0x3c65
cmpl $0x3, %eax
jne 0x3d8b
movslq 0x2c(%r14), %r15
movabsq $0x3000000000000000, %rax # imm = 0x3000000000000000
jmp 0x3c73
movq 0x30(%r14), %r15
movabsq $0x1000000000000000, %rax # imm = 0x1000000000000000
addq %rax, %r15
movq 0x10(%r14), %rsi
movq 0x38(%r14), %rbx
movq %rsi, %rax
shrq %rax
subq %rax, %rbx
cmpq %rbx, %r15
leaq 0x279c(%rip), %r13      # 0x642d
leaq 0x278c(%rip), %rax      # 0x6424
cmoveq %rax, %r13
movq 0x6335(%rip), %rdi      # 0x9fd8
callq 0x20d0
movq %rax, %r12
movl $0x4, %edx
movq %rax, %rdi
leaq 0x277d(%rip), %rsi      # 0x6437
callq 0x2160
leaq 0x18(%r14), %rsi
movq %r12, %rdi
callq 0x3e9b
movq %rax, %r12
movl $0x4, %edx
movq %rax, %rdi
leaq 0x275f(%rip), %rsi      # 0x643c
callq 0x2160
xorl %edx, %edx
cmpq %rbx, %r15
sete %dl
xorq $0x9, %rdx
movq %r12, %rdi
movq %r13, %rsi
callq 0x2160
movq (%r12), %rax
movq -0x18(%rax), %rdi
addq %r12, %rdi
movl $0xa, %esi
callq 0x2120
movsbl %al, %esi
movq %r12, %rdi
callq 0x2030
movq %rax, %rdi
callq 0x20e0
movq -0x30(%rbp), %rax
incl 0x64(%rax)
movq (%r14), %r14
leaq -0x48(%rbp), %rax
cmpq %rax, %r14
jne 0x3c25
movq -0x48(%rbp), %r14
leaq -0x48(%rbp), %r15
cmpq %r15, %r14
je 0x3d5d
movq (%r14), %rbx
movl $0x50, %esi
movq %r14, %rdi
callq 0x2140
movq %rbx, %r14
cmpq %r15, %rbx
jne 0x3d45
addq $0x58, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x239e(%rip), %rdi      # 0x6111
leaq 0x26c7(%rip), %rsi      # 0x6441
leaq 0x26c9(%rip), %rcx      # 0x644a
movl $0x47, %edx
callq 0x20c0
leaq 0x237f(%rip), %rdi      # 0x6111
leaq 0x26fe(%rip), %rsi      # 0x6497
leaq 0x2706(%rip), %rcx      # 0x64a6
movl $0x77, %edx
callq 0x20c0
leaq -0x80(%rbp), %rsi
movl $0x0, 0x30(%rsi)
movq 0x621c(%rip), %rdi      # 0x9fd8
callq 0x3e9b
movq %rax, %rdi
callq 0x2090
leaq 0x2341(%rip), %rdi      # 0x6111
leaq 0x2696(%rip), %rsi      # 0x646d
leaq 0x269a(%rip), %rcx      # 0x6478
movl $0x26, %edx
callq 0x20c0
jmp 0x3dea
movq %rax, %r14
movq -0x48(%rbp), %rdi
leaq -0x48(%rbp), %r15
cmpq %r15, %rdi
je 0x3e0f
movq (%rdi), %rbx
movl $0x50, %esi
callq 0x2140
movq %rbx, %rdi
cmpq %r15, %rbx
jne 0x3dfa
movq %r14, %rdi
callq 0x21f0
nop