// File: /workspace/github_cpp_makefile_star2_O3/ynilu[P]elastic/auxiliary.cpp
// Function: Aux_graph::Aux_graph(Auxiliary_info&)
Aux_graph::Aux_graph(Auxiliary_info& a_info)
{
    // reserve space for all possible auxiliary nodes
    adding_node_list.reserve(a_info.num_nodes);
    dropping_node_list.reserve(a_info.num_nodes);
    OFDM_WOB_virtual_transmitting_node_list.reserve(a_info.num_nodes);
    OFDM_WOB_virtual_receiving_node_list.reserve(a_info.num_nodes);
    OFDM_WB_virtual_transmitting_node_list.reserve(a_info.num_nodes);
    OFDM_WB_virtual_receiving_node_list.reserve(a_info.num_nodes);
    OFDM_virtual_transmitting_node_list.reserve(a_info.num_nodes);
    OFDM_virtual_receiving_node_list.reserve(a_info.num_nodes);
    OTDM_virtual_transmitting_node_list.reserve(a_info.num_nodes);
    OTDM_virtual_receiving_node_list.reserve(a_info.num_nodes);

    Aux_node* a_node;   // adding node
    Aux_node* d_node;   // dropping node
    Aux_node* OFDM_WOB_v_t_node; // OFDM_WOB virtual transmitting node
    Aux_node* OFDM_WOB_v_r_node; // OFDM_WOB virtual receiving node
    Aux_node* OFDM_WB_v_t_node; // OFDM_WB virtual transmitting node
    Aux_node* OFDM_WB_v_r_node; // OFDM_WB virtual receiving node
    Aux_node* OFDM_v_t_node; // OFDM virtual transmitting node
    Aux_node* OFDM_v_r_node; // OFDM virtual receiving node
    Aux_node* OTDM_v_t_node; // OTDM virtual transmitting node
    Aux_node* OTDM_v_r_node; // OTDM virtual receiving node

    for(int phy_node_i = 0; phy_node_i < a_info.num_nodes; phy_node_i++)
    {
        a_node = create_aux_node(phy_node_i, Aux_node::adding_node);
        adding_node_list.push_back(a_node);
        d_node = create_aux_node(phy_node_i, Aux_node::dropping_node);
        dropping_node_list.push_back(d_node);

        OFDM_WOB_v_t_node = create_aux_node(phy_node_i, Aux_node::virtual_transmitting_node);
        OFDM_WOB_virtual_transmitting_node_list.push_back(OFDM_WOB_v_t_node);
        OFDM_WOB_v_r_node = create_aux_node(phy_node_i, Aux_node::virtual_receiving_node);
        OFDM_WOB_virtual_receiving_node_list.push_back(OFDM_WOB_v_r_node);

        OFDM_WB_v_t_node = create_aux_node(phy_node_i, Aux_node::virtual_transmitting_node);
        OFDM_WB_virtual_transmitting_node_list.push_back(OFDM_WB_v_t_node);
        OFDM_WB_v_r_node = create_aux_node(phy_node_i, Aux_node::virtual_receiving_node);
        OFDM_WB_virtual_receiving_node_list.push_back(OFDM_WB_v_r_node);

        OFDM_v_t_node = create_aux_node(phy_node_i, Aux_node::virtual_transmitting_node);
        OFDM_virtual_transmitting_node_list.push_back(OFDM_v_t_node);
        OFDM_v_r_node = create_aux_node(phy_node_i, Aux_node::virtual_receiving_node);
        OFDM_virtual_receiving_node_list.push_back(OFDM_v_r_node);

        OTDM_v_t_node = create_aux_node(phy_node_i, Aux_node::virtual_transmitting_node);
        OTDM_virtual_transmitting_node_list.push_back(OTDM_v_t_node);
        OTDM_v_r_node = create_aux_node(phy_node_i, Aux_node::virtual_receiving_node);
        OTDM_virtual_receiving_node_list.push_back(OTDM_v_r_node);


        create_aux_link(d_node, a_node, a_info.OEO_weight, Aux_link::grooming_link);

        create_aux_link(a_node, OFDM_WOB_v_t_node, a_info.used_OFDM_transceiver_weight, Aux_link::adding_link);
        create_aux_link(OFDM_WOB_v_r_node, d_node, a_info.used_OFDM_transceiver_weight, Aux_link::dropping_link);

        create_aux_link(a_node, OFDM_WB_v_t_node, a_info.used_OFDM_transceiver_weight, Aux_link::adding_link);
        create_aux_link(OFDM_WB_v_r_node, d_node, a_info.OFDM_transceiver_weight, Aux_link::virtual_dropping_link);

        create_aux_link(a_node, OFDM_v_t_node, a_info.OFDM_transceiver_weight, Aux_link::virtual_adding_link);
        create_aux_link(OFDM_v_r_node, d_node, a_info.OFDM_transceiver_weight, Aux_link::virtual_dropping_link);

        create_aux_link(a_node, OTDM_v_t_node, a_info.transceiver_weight, Aux_link::virtual_adding_link);
        create_aux_link(OTDM_v_r_node, d_node, a_info.transceiver_weight, Aux_link::virtual_dropping_link);
    }

}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x98, %rsp
movq %rsi, %r14
movq %rdi, %rbx
leaq 0x7d8a(%rip), %rax      # 0x17d00
movq %rax, (%rdi)
leaq 0x8(%rdi), %r12
leaq 0x20(%rdi), %rax
movq %rax, 0x48(%rsp)
leaq 0x38(%rdi), %rax
movq %rax, 0x40(%rsp)
leaq 0x50(%rdi), %rax
movq %rax, 0x38(%rsp)
leaq 0x68(%rdi), %rax
movq %rax, 0x30(%rsp)
leaq 0x80(%rdi), %rax
movq %rax, 0x28(%rsp)
leaq 0x98(%rdi), %rax
movq %rax, 0x20(%rsp)
leaq 0xb0(%rdi), %rax
movq %rax, 0x18(%rsp)
leaq 0xc8(%rdi), %rbp
leaq 0xe0(%rdi), %r15
movl $0xf0, %edx
movq %r12, %rdi
xorl %esi, %esi
callq 0x3110
movslq 0x4(%r14), %rsi
movq %r12, 0x50(%rsp)
movq %r12, %rdi
callq 0x8b88
movslq 0x4(%r14), %rsi
movq 0x48(%rsp), %rdi
callq 0x8b88
movslq 0x4(%r14), %rsi
movq 0x40(%rsp), %rdi
callq 0x8b88
movslq 0x4(%r14), %rsi
movq 0x38(%rsp), %rdi
callq 0x8b88
movslq 0x4(%r14), %rsi
movq 0x30(%rsp), %rdi
callq 0x8b88
movslq 0x4(%r14), %rsi
movq 0x28(%rsp), %rdi
callq 0x8b88
movslq 0x4(%r14), %rsi
movq 0x20(%rsp), %rdi
callq 0x8b88
movslq 0x4(%r14), %rsi
movq 0x18(%rsp), %rdi
callq 0x8b88
movslq 0x4(%r14), %rsi
movq %rbp, %rdi
callq 0x8b88
movslq 0x4(%r14), %rsi
movq %r15, %rdi
callq 0x8b88
cmpl $0x0, 0x4(%r14)
jle 0x104ab
xorl %r12d, %r12d
leaq 0x7c3e(%rip), %r13      # 0x17cc0
movl $0x30, %edi
callq 0x3220
movq %r13, (%rax)
movl %r12d, 0xc(%rax)
movl $0x0, 0x8(%rax)
xorps %xmm0, %xmm0
movups %xmm0, 0x10(%rax)
movups %xmm0, 0x20(%rax)
movq %rax, 0x10(%rsp)
movq 0x10(%rbx), %rsi
cmpq 0x18(%rbx), %rsi
je 0x100be
movq %rax, (%rsi)
addq $0x8, 0x10(%rbx)
jmp 0x100cd
movq 0x50(%rsp), %rdi
leaq 0x10(%rsp), %rdx
callq 0xa2ca
movl $0x30, %edi
callq 0x3220
movq %r13, (%rax)
movl %r12d, 0xc(%rax)
movl $0x1, 0x8(%rax)
xorps %xmm0, %xmm0
movups %xmm0, 0x10(%rax)
movups %xmm0, 0x20(%rax)
movq %rax, 0x8(%rsp)
movq 0x28(%rbx), %rsi
cmpq 0x30(%rbx), %rsi
je 0x10109
movq %rax, (%rsi)
addq $0x8, 0x28(%rbx)
jmp 0x10118
movq 0x48(%rsp), %rdi
leaq 0x8(%rsp), %rdx
callq 0xa2ca
movl $0x30, %edi
callq 0x3220
movq %r13, (%rax)
movl %r12d, 0xc(%rax)
movl $0x4, 0x8(%rax)
xorps %xmm0, %xmm0
movups %xmm0, 0x10(%rax)
movups %xmm0, 0x20(%rax)
movq %rax, 0x90(%rsp)
movq 0x40(%rbx), %rsi
cmpq 0x48(%rbx), %rsi
je 0x10157
movq %rax, (%rsi)
addq $0x8, 0x40(%rbx)
jmp 0x10169
movq 0x40(%rsp), %rdi
leaq 0x90(%rsp), %rdx
callq 0xa2ca
movl $0x30, %edi
callq 0x3220
movq %r13, (%rax)
movl %r12d, 0xc(%rax)
movl $0x5, 0x8(%rax)
xorps %xmm0, %xmm0
movups %xmm0, 0x10(%rax)
movups %xmm0, 0x20(%rax)
movq %rax, 0x88(%rsp)
movq 0x58(%rbx), %rsi
cmpq 0x60(%rbx), %rsi
je 0x101a8
movq %rax, (%rsi)
addq $0x8, 0x58(%rbx)
jmp 0x101ba
movq 0x38(%rsp), %rdi
leaq 0x88(%rsp), %rdx
callq 0xa2ca
movl $0x30, %edi
callq 0x3220
movq %r13, (%rax)
movl %r12d, 0xc(%rax)
movl $0x4, 0x8(%rax)
xorps %xmm0, %xmm0
movups %xmm0, 0x10(%rax)
movups %xmm0, 0x20(%rax)
movq %rax, 0x80(%rsp)
movq 0x70(%rbx), %rsi
cmpq 0x78(%rbx), %rsi
je 0x101f9
movq %rax, (%rsi)
addq $0x8, 0x70(%rbx)
jmp 0x1020b
movq 0x30(%rsp), %rdi
leaq 0x80(%rsp), %rdx
callq 0xa2ca
movl $0x30, %edi
callq 0x3220
movq %r13, (%rax)
movl %r12d, 0xc(%rax)
movl $0x5, 0x8(%rax)
xorps %xmm0, %xmm0
movups %xmm0, 0x10(%rax)
movups %xmm0, 0x20(%rax)
movq %rax, 0x78(%rsp)
movq 0x88(%rbx), %rsi
cmpq 0x90(%rbx), %rsi
je 0x10250
movq %rax, (%rsi)
addq $0x8, 0x88(%rbx)
jmp 0x1025f
movq 0x28(%rsp), %rdi
leaq 0x78(%rsp), %rdx
callq 0xa2ca
movl $0x30, %edi
callq 0x3220
movq %r13, (%rax)
movl %r12d, 0xc(%rax)
movl $0x4, 0x8(%rax)
xorps %xmm0, %xmm0
movups %xmm0, 0x10(%rax)
movups %xmm0, 0x20(%rax)
movq %rax, 0x70(%rsp)
movq 0xa0(%rbx), %rsi
cmpq 0xa8(%rbx), %rsi
je 0x102a4
movq %rax, (%rsi)
addq $0x8, 0xa0(%rbx)
jmp 0x102b3
movq 0x20(%rsp), %rdi
leaq 0x70(%rsp), %rdx
callq 0xa2ca
movl $0x30, %edi
callq 0x3220
movq %r13, (%rax)
movl %r12d, 0xc(%rax)
movl $0x5, 0x8(%rax)
xorps %xmm0, %xmm0
movups %xmm0, 0x10(%rax)
movups %xmm0, 0x20(%rax)
movq %rax, 0x68(%rsp)
movq 0xb8(%rbx), %rsi
cmpq 0xc0(%rbx), %rsi
je 0x102f8
movq %rax, (%rsi)
addq $0x8, 0xb8(%rbx)
jmp 0x10307
movq 0x18(%rsp), %rdi
leaq 0x68(%rsp), %rdx
callq 0xa2ca
movl $0x30, %edi
callq 0x3220
movq %r13, (%rax)
movl %r12d, 0xc(%rax)
movl $0x4, 0x8(%rax)
xorps %xmm0, %xmm0
movups %xmm0, 0x10(%rax)
movups %xmm0, 0x20(%rax)
movq %rax, 0x60(%rsp)
movq 0xd0(%rbx), %rsi
cmpq 0xd8(%rbx), %rsi
je 0x1034c
movq %rax, (%rsi)
addq $0x8, 0xd0(%rbx)
jmp 0x10359
movq %rbp, %rdi
leaq 0x60(%rsp), %rdx
callq 0xa2ca
movl $0x30, %edi
callq 0x3220
movq %r13, (%rax)
movl %r12d, 0xc(%rax)
movl $0x5, 0x8(%rax)
xorps %xmm0, %xmm0
movups %xmm0, 0x10(%rax)
movups %xmm0, 0x20(%rax)
movq %rax, 0x58(%rsp)
movq 0xe8(%rbx), %rsi
cmpq 0xf0(%rbx), %rsi
je 0x1039e
movq %rax, (%rsi)
addq $0x8, 0xe8(%rbx)
jmp 0x103ab
movq %r15, %rdi
leaq 0x58(%rsp), %rdx
callq 0xa2ca
movq 0x8(%rsp), %rsi
movq 0x10(%rsp), %rdx
movsd 0x28(%r14), %xmm0
movl $0x2, %ecx
callq 0x105fe
movq 0x10(%rsp), %rsi
movq 0x90(%rsp), %rdx
movsd 0x20(%r14), %xmm0
movl $0x3, %ecx
callq 0x105fe
movq 0x88(%rsp), %rsi
movq 0x8(%rsp), %rdx
movsd 0x20(%r14), %xmm0
movl $0x4, %ecx
callq 0x105fe
movq 0x10(%rsp), %rsi
movq 0x80(%rsp), %rdx
movsd 0x20(%r14), %xmm0
movl $0x3, %ecx
callq 0x105fe
movq 0x78(%rsp), %rsi
movq 0x8(%rsp), %rdx
movsd 0x18(%r14), %xmm0
movl $0x7, %ecx
callq 0x105fe
movq 0x10(%rsp), %rsi
movq 0x70(%rsp), %rdx
movsd 0x18(%r14), %xmm0
movl $0x6, %ecx
callq 0x105fe
movq 0x68(%rsp), %rsi
movq 0x8(%rsp), %rdx
movsd 0x18(%r14), %xmm0
movl $0x7, %ecx
callq 0x105fe
movq 0x10(%rsp), %rsi
movq 0x60(%rsp), %rdx
movsd 0x8(%r14), %xmm0
movl $0x6, %ecx
callq 0x105fe
movq 0x58(%rsp), %rsi
movq 0x8(%rsp), %rdx
movsd 0x8(%r14), %xmm0
movl $0x7, %ecx
callq 0x105fe
incl %r12d
cmpl 0x4(%r14), %r12d
jl 0x10082
addq $0x98, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x104bf
movq %rax, %r14
movq (%r15), %rdi
testq %rdi, %rdi
je 0x104d9
movq 0xf0(%rbx), %rsi
subq %rdi, %rsi
callq 0x3230
movq (%rbp), %rdi
testq %rdi, %rdi
je 0x104f1
movq 0xd8(%rbx), %rsi
subq %rdi, %rsi
callq 0x3230
movq 0x18(%rsp), %rax
movq (%rax), %rdi
testq %rdi, %rdi
je 0x1050d
movq 0xc0(%rbx), %rsi
subq %rdi, %rsi
callq 0x3230
movq 0x20(%rsp), %rax
movq (%rax), %rdi
testq %rdi, %rdi
je 0x10529
movq 0xa8(%rbx), %rsi
subq %rdi, %rsi
callq 0x3230
movq 0x28(%rsp), %rax
movq (%rax), %rdi
testq %rdi, %rdi
je 0x10545
movq 0x90(%rbx), %rsi
subq %rdi, %rsi
callq 0x3230
movq 0x30(%rsp), %rax
movq (%rax), %rdi
testq %rdi, %rdi
je 0x1055e
movq 0x78(%rbx), %rsi
subq %rdi, %rsi
callq 0x3230
movq 0x38(%rsp), %rax
movq (%rax), %rdi
testq %rdi, %rdi
je 0x10577
movq 0x60(%rbx), %rsi
subq %rdi, %rsi
callq 0x3230
movq 0x40(%rsp), %rax
movq (%rax), %rdi
testq %rdi, %rdi
je 0x10590
movq 0x48(%rbx), %rsi
subq %rdi, %rsi
callq 0x3230
movq 0x48(%rsp), %rax
movq (%rax), %rdi
testq %rdi, %rdi
je 0x105a9
movq 0x30(%rbx), %rsi
subq %rdi, %rsi
callq 0x3230
movq 0x50(%rsp), %rax
movq (%rax), %rdi
testq %rdi, %rdi
je 0x105c2
movq 0x18(%rbx), %rsi
subq %rdi, %rsi
callq 0x3230
movq %r14, %rdi
callq 0x3370