// File: /workspace/github_cpp_makefile_star2_O1/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), %r13
cmpq %rbx, %r13
je 0x3f26
cmpl $0x4, 0x18(%r13)
je 0x3dd9
jae 0x3f15
jmp 0x3f57
movl 0x20(%r13), %eax
movl %eax, -0x80(%rbp)
cmpl $0x7, %eax
ja 0x3e09
movq 0x28(%r13), %rcx
cmpl $0x1, %eax
je 0x3dfd
cmpl $0x3, %eax
jne 0x3f76
movq %rcx, -0x78(%rbp)
jmp 0x3e09
movq 0x30(%r13), %rdx
movq %rcx, -0x78(%rbp)
movq %rdx, -0x70(%rbp)
movl $0x0, -0x50(%rbp)
cmpl $0x3, %eax
ja 0x3f95
movl %eax, %eax
leaq 0x2442(%rip), %rcx      # 0x6264
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movslq -0x78(%rbp), %r14
jmp 0x3e62
movq -0x78(%rbp), %r14
movabsq $0x2000000000000000, %rax # imm = 0x2000000000000000
jmp 0x3e5f
movslq -0x74(%rbp), %r14
movabsq $0x3000000000000000, %rax # imm = 0x3000000000000000
jmp 0x3e5f
movq -0x70(%rbp), %r14
movabsq $0x1000000000000000, %rax # imm = 0x1000000000000000
addq %rax, %r14
movq 0x10(%r13), %rax
movq 0x38(%r13), %rbx
shrq %rax
subq %rax, %rbx
cmpq %rbx, %r14
leaq 0x25e7(%rip), %r15      # 0x6461
leaq 0x25d7(%rip), %rax      # 0x6458
cmoveq %rax, %r15
movq 0x10(%r13), %rsi
movq 0x6148(%rip), %rdi      # 0x9fd8
callq 0x20d0
movq %rax, %r12
movl $0x4, %edx
movq %rax, %rdi
leaq 0x25c4(%rip), %rsi      # 0x646b
callq 0x2160
leaq 0x18(%r13), %rsi
movq %r12, %rdi
callq 0x407f
movq %rax, %r12
movl $0x4, %edx
movq %rax, %rdi
leaq 0x25a6(%rip), %rsi      # 0x6470
callq 0x2160
xorl %edx, %edx
cmpq %rbx, %r14
sete %dl
xorq $0x9, %rdx
movq %r12, %rdi
movq %r15, %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 (%r13), %r13
leaq -0x48(%rbp), %rax
cmpq %rax, %r13
jne 0x3dc7
movq -0x48(%rbp), %rdi
leaq -0x48(%rbp), %r14
cmpq %r14, %rdi
je 0x3f48
movq (%rdi), %rbx
movl $0x50, %esi
callq 0x2140
movq %rbx, %rdi
cmpq %r14, %rbx
jne 0x3f33
addq $0x58, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x21b3(%rip), %rdi      # 0x6111
leaq 0x2510(%rip), %rsi      # 0x6475
leaq 0x2512(%rip), %rcx      # 0x647e
movl $0x47, %edx
callq 0x20c0
leaq 0x2194(%rip), %rdi      # 0x6111
leaq 0x2547(%rip), %rsi      # 0x64cb
leaq 0x254f(%rip), %rcx      # 0x64da
movl $0x77, %edx
callq 0x20c0
movq 0x603c(%rip), %rdi      # 0x9fd8
leaq -0x80(%rbp), %rsi
callq 0x407f
movq %rax, %rdi
callq 0x2090
leaq 0x215d(%rip), %rdi      # 0x6111
leaq 0x24e6(%rip), %rsi      # 0x64a1
leaq 0x24ea(%rip), %rcx      # 0x64ac
movl $0x26, %edx
callq 0x20c0
jmp 0x3fce
movq %rax, %r14
movq -0x48(%rbp), %rdi
leaq -0x48(%rbp), %r15
cmpq %r15, %rdi
je 0x3ff3
movq (%rdi), %rbx
movl $0x50, %esi
callq 0x2140
movq %rbx, %rdi
cmpq %r15, %rbx
jne 0x3fde
movq %r14, %rdi
callq 0x21f0
nop