// File: /workspace/github_cpp_makefile_star2_O1/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 $0xa8, %rsp
movq %rsi, %r14
movq %rdi, %rbx
leaq 0x8540(%rip), %rax      # 0x17d00
movq %rax, (%rdi)
leaq 0x8(%rdi), %r15
leaq 0x20(%rdi), %rax
movq %rax, 0x58(%rsp)
leaq 0x38(%rdi), %rax
movq %rax, 0x50(%rsp)
leaq 0x50(%rdi), %rax
movq %rax, 0x48(%rsp)
leaq 0x68(%rdi), %rax
movq %rax, 0x40(%rsp)
leaq 0x80(%rdi), %rax
movq %rax, 0x38(%rsp)
leaq 0x98(%rdi), %rax
movq %rax, 0x30(%rsp)
leaq 0xb0(%rdi), %rax
movq %rax, 0x28(%rsp)
leaq 0xc8(%rdi), %rax
movq %rax, 0x20(%rsp)
leaq 0xe0(%rdi), %rax
movq %rax, 0x18(%rsp)
movl $0xf0, %edx
movq %r15, %rdi
xorl %esi, %esi
callq 0x3110
movslq 0x4(%r14), %rsi
movq %r15, 0x60(%rsp)
movq %r15, %rdi
callq 0x87e6
movslq 0x4(%r14), %rsi
movq 0x58(%rsp), %rdi
callq 0x87e6
movslq 0x4(%r14), %rsi
movq 0x50(%rsp), %rdi
callq 0x87e6
movslq 0x4(%r14), %rsi
movq 0x48(%rsp), %rdi
callq 0x87e6
movslq 0x4(%r14), %rsi
movq 0x40(%rsp), %rdi
callq 0x87e6
movslq 0x4(%r14), %rsi
movq 0x38(%rsp), %rdi
callq 0x87e6
movslq 0x4(%r14), %rsi
movq 0x30(%rsp), %rdi
callq 0x87e6
movslq 0x4(%r14), %rsi
movq 0x28(%rsp), %rdi
callq 0x87e6
movslq 0x4(%r14), %rsi
movq 0x20(%rsp), %rdi
callq 0x87e6
movslq 0x4(%r14), %rsi
movq 0x18(%rsp), %rdi
callq 0x87e6
cmpl $0x0, 0x4(%r14)
jle 0xfe12
xorl %ebp, %ebp
leaq 0x83e7(%rip), %r15      # 0x17cc0
movl $0x30, %edi
callq 0x3220
movq %r15, (%rax)
movl %ebp, 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 0xf914
movq %rax, (%rsi)
addq $0x8, 0x10(%rbx)
jmp 0xf923
movq 0x60(%rsp), %rdi
leaq 0x10(%rsp), %rdx
callq 0x9b7a
movl $0x30, %edi
callq 0x3220
movq %r15, (%rax)
movl %ebp, 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 0xf95e
movq %rax, (%rsi)
addq $0x8, 0x28(%rbx)
jmp 0xf96d
movq 0x58(%rsp), %rdi
leaq 0x8(%rsp), %rdx
callq 0x9b7a
movl $0x30, %edi
callq 0x3220
movq %r15, (%rax)
movl %ebp, 0xc(%rax)
movl $0x4, 0x8(%rax)
xorps %xmm0, %xmm0
movups %xmm0, 0x10(%rax)
movups %xmm0, 0x20(%rax)
movq %rax, 0xa0(%rsp)
movq 0x40(%rbx), %rsi
cmpq 0x48(%rbx), %rsi
je 0xf9ab
movq %rax, (%rsi)
addq $0x8, 0x40(%rbx)
jmp 0xf9bd
movq 0x50(%rsp), %rdi
leaq 0xa0(%rsp), %rdx
callq 0x9b7a
movl $0x30, %edi
callq 0x3220
movq %r15, (%rax)
movl %ebp, 0xc(%rax)
movl $0x5, 0x8(%rax)
xorps %xmm0, %xmm0
movups %xmm0, 0x10(%rax)
movups %xmm0, 0x20(%rax)
movq %rax, 0x98(%rsp)
movq 0x58(%rbx), %rsi
cmpq 0x60(%rbx), %rsi
je 0xf9fb
movq %rax, (%rsi)
addq $0x8, 0x58(%rbx)
jmp 0xfa0d
movq 0x48(%rsp), %rdi
leaq 0x98(%rsp), %rdx
callq 0x9b7a
movl $0x30, %edi
callq 0x3220
movq %r15, (%rax)
movl %ebp, 0xc(%rax)
movl $0x4, 0x8(%rax)
xorps %xmm0, %xmm0
movups %xmm0, 0x10(%rax)
movups %xmm0, 0x20(%rax)
movq %rax, 0x90(%rsp)
movq 0x70(%rbx), %rsi
cmpq 0x78(%rbx), %rsi
je 0xfa4b
movq %rax, (%rsi)
addq $0x8, 0x70(%rbx)
jmp 0xfa5d
movq 0x40(%rsp), %rdi
leaq 0x90(%rsp), %rdx
callq 0x9b7a
movl $0x30, %edi
callq 0x3220
movq %r15, (%rax)
movl %ebp, 0xc(%rax)
movl $0x5, 0x8(%rax)
xorps %xmm0, %xmm0
movups %xmm0, 0x10(%rax)
movups %xmm0, 0x20(%rax)
movq %rax, 0x88(%rsp)
movq 0x88(%rbx), %rsi
cmpq 0x90(%rbx), %rsi
je 0xfaa4
movq %rax, (%rsi)
addq $0x8, 0x88(%rbx)
jmp 0xfab6
movq 0x38(%rsp), %rdi
leaq 0x88(%rsp), %rdx
callq 0x9b7a
movl $0x30, %edi
callq 0x3220
movq %r15, (%rax)
movl %ebp, 0xc(%rax)
movl $0x4, 0x8(%rax)
xorps %xmm0, %xmm0
movups %xmm0, 0x10(%rax)
movups %xmm0, 0x20(%rax)
movq %rax, 0x80(%rsp)
movq 0xa0(%rbx), %rsi
cmpq 0xa8(%rbx), %rsi
je 0xfafd
movq %rax, (%rsi)
addq $0x8, 0xa0(%rbx)
jmp 0xfb0f
movq 0x30(%rsp), %rdi
leaq 0x80(%rsp), %rdx
callq 0x9b7a
movl $0x30, %edi
callq 0x3220
movq %r15, (%rax)
movl %ebp, 0xc(%rax)
movl $0x5, 0x8(%rax)
xorps %xmm0, %xmm0
movups %xmm0, 0x10(%rax)
movups %xmm0, 0x20(%rax)
movq %rax, 0x78(%rsp)
movq 0xb8(%rbx), %rsi
cmpq 0xc0(%rbx), %rsi
je 0xfb53
movq %rax, (%rsi)
addq $0x8, 0xb8(%rbx)
jmp 0xfb62
movq 0x28(%rsp), %rdi
leaq 0x78(%rsp), %rdx
callq 0x9b7a
movl $0x30, %edi
callq 0x3220
movq %r15, (%rax)
movl %ebp, 0xc(%rax)
movl $0x4, 0x8(%rax)
xorps %xmm0, %xmm0
movups %xmm0, 0x10(%rax)
movups %xmm0, 0x20(%rax)
movq %rax, 0x70(%rsp)
movq 0xd0(%rbx), %rsi
cmpq 0xd8(%rbx), %rsi
je 0xfba6
movq %rax, (%rsi)
addq $0x8, 0xd0(%rbx)
jmp 0xfbb5
movq 0x20(%rsp), %rdi
leaq 0x70(%rsp), %rdx
callq 0x9b7a
movl $0x30, %edi
callq 0x3220
movq %r15, (%rax)
movl %ebp, 0xc(%rax)
movl $0x5, 0x8(%rax)
xorps %xmm0, %xmm0
movups %xmm0, 0x10(%rax)
movups %xmm0, 0x20(%rax)
movq %rax, 0x68(%rsp)
movq 0xe8(%rbx), %rsi
cmpq 0xf0(%rbx), %rsi
je 0xfbf9
movq %rax, (%rsi)
addq $0x8, 0xe8(%rbx)
jmp 0xfc08
movq 0x18(%rsp), %rdi
leaq 0x68(%rsp), %rdx
callq 0x9b7a
movq 0x8(%rsp), %r12
movq 0x10(%rsp), %r13
movsd 0x28(%r14), %xmm0
movsd %xmm0, (%rsp)
movl $0x50, %edi
callq 0x3220
movq %rax, %rdi
movq %r12, %rsi
movq %r13, %rdx
movsd (%rsp), %xmm0
movl $0x2, %ecx
callq 0xf658
movq 0x10(%rsp), %r12
movq 0xa0(%rsp), %r13
movsd 0x20(%r14), %xmm0
movsd %xmm0, (%rsp)
movl $0x50, %edi
callq 0x3220
movq %rax, %rdi
movq %r12, %rsi
movq %r13, %rdx
movsd (%rsp), %xmm0
movl $0x3, %ecx
callq 0xf658
movq 0x98(%rsp), %r12
movq 0x8(%rsp), %r13
movsd 0x20(%r14), %xmm0
movsd %xmm0, (%rsp)
movl $0x50, %edi
callq 0x3220
movq %rax, %rdi
movq %r12, %rsi
movq %r13, %rdx
movsd (%rsp), %xmm0
movl $0x4, %ecx
callq 0xf658
movq 0x10(%rsp), %r12
movq 0x90(%rsp), %r13
movsd 0x20(%r14), %xmm0
movsd %xmm0, (%rsp)
movl $0x50, %edi
callq 0x3220
movq %rax, %rdi
movq %r12, %rsi
movq %r13, %rdx
movsd (%rsp), %xmm0
movl $0x3, %ecx
callq 0xf658
movq 0x88(%rsp), %r12
movq 0x8(%rsp), %r13
movsd 0x18(%r14), %xmm0
movsd %xmm0, (%rsp)
movl $0x50, %edi
callq 0x3220
movq %rax, %rdi
movq %r12, %rsi
movq %r13, %rdx
movsd (%rsp), %xmm0
movl $0x7, %ecx
callq 0xf658
movq 0x10(%rsp), %r12
movq 0x80(%rsp), %r13
movsd 0x18(%r14), %xmm0
movsd %xmm0, (%rsp)
movl $0x50, %edi
callq 0x3220
movq %rax, %rdi
movq %r12, %rsi
movq %r13, %rdx
movsd (%rsp), %xmm0
movl $0x6, %ecx
callq 0xf658
movq 0x78(%rsp), %r12
movq 0x8(%rsp), %r13
movsd 0x18(%r14), %xmm0
movsd %xmm0, (%rsp)
movl $0x50, %edi
callq 0x3220
movq %rax, %rdi
movq %r12, %rsi
movq %r13, %rdx
movsd (%rsp), %xmm0
movl $0x7, %ecx
callq 0xf658
movq 0x10(%rsp), %r12
movq 0x70(%rsp), %r13
movsd 0x8(%r14), %xmm0
movsd %xmm0, (%rsp)
movl $0x50, %edi
callq 0x3220
movq %rax, %rdi
movq %r12, %rsi
movq %r13, %rdx
movsd (%rsp), %xmm0
movl $0x6, %ecx
callq 0xf658
movq 0x68(%rsp), %r12
movq 0x8(%rsp), %r13
movsd 0x8(%r14), %xmm0
movsd %xmm0, (%rsp)
movl $0x50, %edi
callq 0x3220
movq %rax, %rdi
movq %r12, %rsi
movq %r13, %rdx
movsd (%rsp), %xmm0
movl $0x7, %ecx
callq 0xf658
incl %ebp
cmpl 0x4(%r14), %ebp
jl 0xf8d9
addq $0xa8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0xfe26
movq %rax, %r14
movq 0x18(%rsp), %rax
movq (%rax), %rdi
testq %rdi, %rdi
je 0xfe45
movq 0xf0(%rbx), %rsi
subq %rdi, %rsi
callq 0x3230
movq 0x20(%rsp), %rax
movq (%rax), %rdi
testq %rdi, %rdi
je 0xfe61
movq 0xd8(%rbx), %rsi
subq %rdi, %rsi
callq 0x3230
movq 0x28(%rsp), %rax
movq (%rax), %rdi
testq %rdi, %rdi
je 0xfe7d
movq 0xc0(%rbx), %rsi
subq %rdi, %rsi
callq 0x3230
movq 0x30(%rsp), %rax
movq (%rax), %rdi
testq %rdi, %rdi
je 0xfe99
movq 0xa8(%rbx), %rsi
subq %rdi, %rsi
callq 0x3230
movq 0x38(%rsp), %rax
movq (%rax), %rdi
testq %rdi, %rdi
je 0xfeb5
movq 0x90(%rbx), %rsi
subq %rdi, %rsi
callq 0x3230
movq 0x40(%rsp), %rax
movq (%rax), %rdi
testq %rdi, %rdi
je 0xfece
movq 0x78(%rbx), %rsi
subq %rdi, %rsi
callq 0x3230
movq 0x48(%rsp), %rax
movq (%rax), %rdi
testq %rdi, %rdi
je 0xfee7
movq 0x60(%rbx), %rsi
subq %rdi, %rsi
callq 0x3230
movq 0x50(%rsp), %rax
movq (%rax), %rdi
testq %rdi, %rdi
je 0xff00
movq 0x48(%rbx), %rsi
subq %rdi, %rsi
callq 0x3230
movq 0x58(%rsp), %rax
movq (%rax), %rdi
testq %rdi, %rdi
je 0xff19
movq 0x30(%rbx), %rsi
subq %rdi, %rsi
callq 0x3230
movq 0x60(%rsp), %rax
movq (%rax), %rdi
testq %rdi, %rdi
je 0xff32
movq 0x18(%rbx), %rsi
subq %rdi, %rsi
callq 0x3230
movq %r14, %rdi
callq 0x3370