// File: /workspace/github_cpp_makefile_star2_O2/frolosofsky[P]pbft/main.cpp
// Function: Simulator::init_nodes(int, int)
void init_nodes(int f, int n) {
        _client = std::make_shared<ClientNode>();
        for(int i = 0; i < n; ++i) {
            _nodes.emplace_back(std::make_shared<PBFTNode>(i == 0 ? PBFTNode::Role::Primary : PBFTNode::Role::Replica, f));
            _nodes[i]->set_primary(_nodes[0]);
            _nodes[i]->set_success_startegy(std::make_unique<PBFT_DB>());
            _links.emplace_back(Link::make(_client, _nodes[i]));
        }
        for(size_t i = 0; i < _nodes.size() - 1; ++i) {
            for(size_t j = i + 1; j < _nodes.size(); ++j) {
                _links.emplace_back(Link::make(_nodes[i], _nodes[j]));
            }
        }

    }

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x68, %rsp
movl %edx, %r15d
movq %rdi, %rbx
leaq -0x4c(%rbp), %rax
movl %esi, (%rax)
leaq -0x38(%rbp), %r13
movq %r13, %rdi
callq 0x3911
movq %rbx, %rdi
movq %r13, %rsi
callq 0x439c
leaq -0x30(%rbp), %rdi
callq 0x2a9c
leaq 0x10(%rbx), %rax
movq %rax, -0x70(%rbp)
movq %rbx, -0x48(%rbp)
leaq 0x28(%rbx), %rax
movq %rax, -0x68(%rbp)
xorl %r12d, %r12d
testl %r15d, %r15d
cmovlel %r12d, %r15d
shlq $0x4, %r15
movq %r15, -0x40(%rbp)
leaq -0x60(%rbp), %r15
cmpq %r12, -0x40(%rbp)
je 0x3786
xorl %eax, %eax
testq %r12, %r12
setne %al
movl %eax, -0x60(%rbp)
movq %r13, %rdi
movq %r15, %r14
movq %r15, %rsi
leaq -0x4c(%rbp), %rdx
callq 0x396b
movq -0x70(%rbp), %rbx
movq %rbx, %rdi
movq %r13, %rsi
callq 0x392e
leaq -0x30(%rbp), %rdi
callq 0x2a9c
movq (%rbx), %rsi
movq (%rsi,%r12), %r15
movq %r13, %rdi
callq 0x4fc8
subq $-0x80, %r15
movq %r15, %rdi
movq %r13, %rsi
callq 0x4fa2
leaq -0x30(%rbp), %rdi
callq 0x2a9c
movq (%rbx), %rax
movq (%rax,%r12), %rbx
movq %r13, %rdi
callq 0x398d
movq -0x38(%rbp), %rax
andq $0x0, -0x38(%rbp)
movq 0x90(%rbx), %rdi
movq %rax, 0x90(%rbx)
testq %rdi, %rdi
je 0x3723
movq (%rdi), %rax
callq *0x8(%rax)
movq -0x38(%rbp), %rdi
testq %rdi, %rdi
je 0x3723
movq (%rdi), %rax
callq *0x8(%rax)
movq %r14, %r15
movq %r14, %rdi
movq -0x48(%rbp), %rbx
movq %rbx, %rsi
callq 0x54d8
movq 0x10(%rbx), %rsi
addq %r12, %rsi
leaq -0x80(%rbp), %rbx
movq %rbx, %rdi
callq 0x4fc8
movq %r13, %rdi
movq %r14, %rsi
movq %rbx, %rdx
callq 0x2790
movq -0x68(%rbp), %rdi
movq %r13, %rsi
callq 0x39e4
leaq -0x30(%rbp), %rdi
callq 0x2a9c
leaq -0x78(%rbp), %rdi
callq 0x2a9c
leaq -0x58(%rbp), %rdi
callq 0x2a9c
addq $0x10, %r12
jmp 0x367d
movq -0x48(%rbp), %rax
movq 0x10(%rax), %rsi
movq 0x18(%rax), %rax
pushq $0x10
popq %rbx
xorl %edx, %edx
leaq -0x38(%rbp), %r14
movq %rax, %rcx
subq %rsi, %rcx
sarq $0x4, %rcx
decq %rcx
cmpq %rcx, %rdx
jae 0x3873
leaq 0x1(%rdx), %r13
shlq $0x4, %rdx
movq %rbx, -0x90(%rbp)
movq %rbx, %r15
movq %r13, -0x88(%rbp)
movq %r13, %rbx
movq %rdx, -0x40(%rbp)
movq %rax, %rcx
subq %rsi, %rcx
sarq $0x4, %rcx
cmpq %rcx, %rbx
jae 0x385c
addq %rdx, %rsi
leaq -0x60(%rbp), %r12
movq %r12, %rdi
callq 0x4fc8
movq -0x70(%rbp), %rax
movq (%rax), %rsi
movq %r15, %r13
addq %r15, %rsi
leaq -0x80(%rbp), %r15
movq %r15, %rdi
callq 0x4fc8
movq %r14, %rdi
movq %r12, %rsi
movq %r15, %rdx
callq 0x2790
movq -0x68(%rbp), %rdi
movq %r14, %rsi
callq 0x39e4
leaq -0x30(%rbp), %rdi
callq 0x2a9c
leaq -0x78(%rbp), %rdi
callq 0x2a9c
leaq -0x58(%rbp), %rdi
callq 0x2a9c
incq %rbx
movq -0x48(%rbp), %rax
movq 0x10(%rax), %rsi
movq 0x18(%rax), %rax
movq %r13, %r15
addq $0x10, %r15
movq -0x40(%rbp), %rdx
jmp 0x37d1
movq -0x90(%rbp), %rbx
addq $0x10, %rbx
movq -0x88(%rbp), %rdx
jmp 0x379b
addq $0x68, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
leaq -0x30(%rbp), %rdi
jmp 0x38ad
jmp 0x389d
jmp 0x388f
movq %rax, %rbx
leaq -0x30(%rbp), %rdi
callq 0x2a9c
jmp 0x38a0
movq %rax, %rbx
leaq -0x78(%rbp), %rdi
callq 0x2a9c
leaq -0x58(%rbp), %rdi
callq 0x2a9c
movq %rbx, %rdi
callq 0x21c0