// File: Luthaf[P]zeopp/channel.cc
// Function: CHANNEL::print(std::ostream&, bool)
void CHANNEL::print(ostream &out, bool dispNodeInfo){
    out << "Channel info:" << "\n";
    out << "     # Nodes: " << nodes.size() << "\n";
    
    if(dispNodeInfo){
        out << "     Original Node IDs: ";
        for(unsigned int i = 0; i < nodes.size(); i++){
            out << reverseIDMappings.find(i)->second << " ";
        }
        out << "\n";
        
        out << "     New Node IDs: ";
        for(unsigned int i = 0; i < nodes.size(); i++){
            out << i << " ";
        }
        out << "\n";
        
        out << "  New Node info: " << "\n";
        for(unsigned int i = 0; i< nodes.size(); i++){
            nodes.at(i).print();
        }
    }
    
    out << "     # Unit cells:" << unitCells.size() << "\n";
    
    for(unsigned int i = 0; i < unitCells.size(); i++){
        DELTA_POS position = unitCells.at(i);
        vector<int> ucNode = ucNodes.at(i);
        out << "       Unit cell #: " << i  << "\n"
        << "          Displacement: " << position.x << " " << position.y << " " << position.z << "\n"
        << "          New Node ids: ";
        for(unsigned int j = 0; j < ucNode.size(); j++){
            out << ucNode.at(j) << " ";
        }
        out << "\n";
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x120, %rsp            # imm = 0x120
movb %dl, %al
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
andb $0x1, %al
movb %al, -0x11(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x78(%rbp)
movq -0x10(%rbp), %rdi
leaq 0x1334ac(%rip), %rsi    # 0x1fb599
callq 0x5540
movq %rax, %rdi
leaq 0x131529(%rip), %rsi    # 0x1f9625
callq 0x5540
movq -0x10(%rbp), %rdi
leaq 0x13349b(%rip), %rsi    # 0x1fb5a7
callq 0x5540
movq -0x78(%rbp), %rdi
movq %rax, -0x70(%rbp)
addq $0x60, %rdi
callq 0x10100
movq -0x70(%rbp), %rdi
movq %rax, %rsi
callq 0x5160
movq %rax, %rdi
leaq 0x1314ed(%rip), %rsi    # 0x1f9625
callq 0x5540
testb $0x1, -0x11(%rbp)
je 0xc82d3
movq -0x10(%rbp), %rdi
leaq 0x133464(%rip), %rsi    # 0x1fb5b6
callq 0x5540
movl $0x0, -0x18(%rbp)
movq -0x78(%rbp), %rdi
movl -0x18(%rbp), %eax
movq %rax, -0x80(%rbp)
addq $0x60, %rdi
callq 0x10100
movq %rax, %rcx
movq -0x80(%rbp), %rax
cmpq %rcx, %rax
jae 0xc81d6
movq -0x78(%rbp), %rdi
movq -0x10(%rbp), %rax
movq %rax, -0x88(%rbp)
addq $0x30, %rdi
movl -0x18(%rbp), %eax
movl %eax, -0x24(%rbp)
leaq -0x24(%rbp), %rsi
callq 0x102e0
movq %rax, -0x20(%rbp)
leaq -0x20(%rbp), %rdi
callq 0x10350
movq -0x88(%rbp), %rdi
movl 0x4(%rax), %esi
callq 0x58d0
movq %rax, %rdi
leaq 0x1340e8(%rip), %rsi    # 0x1fc2ae
callq 0x5540
movl -0x18(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x18(%rbp)
jmp 0xc815e
movq -0x10(%rbp), %rdi
leaq 0x131444(%rip), %rsi    # 0x1f9625
callq 0x5540
movq -0x10(%rbp), %rdi
leaq 0x1333de(%rip), %rsi    # 0x1fb5cf
callq 0x5540
movl $0x0, -0x28(%rbp)
movq -0x78(%rbp), %rdi
movl -0x28(%rbp), %eax
movq %rax, -0x90(%rbp)
addq $0x60, %rdi
callq 0x10100
movq %rax, %rcx
movq -0x90(%rbp), %rax
cmpq %rcx, %rax
jae 0xc8249
movq -0x10(%rbp), %rdi
movl -0x28(%rbp), %esi
callq 0x56f0
movq %rax, %rdi
leaq 0x134075(%rip), %rsi    # 0x1fc2ae
callq 0x5540
movl -0x28(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x28(%rbp)
jmp 0xc81fd
movq -0x10(%rbp), %rdi
leaq 0x1313d1(%rip), %rsi    # 0x1f9625
callq 0x5540
movq -0x10(%rbp), %rdi
leaq 0x13337f(%rip), %rsi    # 0x1fb5e3
callq 0x5540
movq %rax, %rdi
leaq 0x1313b2(%rip), %rsi    # 0x1f9625
callq 0x5540
movl $0x0, -0x2c(%rbp)
movq -0x78(%rbp), %rdi
movl -0x2c(%rbp), %eax
movq %rax, -0x98(%rbp)
addq $0x60, %rdi
callq 0x10100
movq %rax, %rcx
movq -0x98(%rbp), %rax
cmpq %rcx, %rax
jae 0xc82d1
movq -0x78(%rbp), %rdi
addq $0x60, %rdi
movl -0x2c(%rbp), %eax
movl %eax, %esi
callq 0x10130
movq %rax, %rdi
movq 0x1aacff(%rip), %rsi    # 0x272fc0
callq 0x94640
movl -0x2c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x2c(%rbp)
jmp 0xc827f
jmp 0xc82d3
movq -0x10(%rbp), %rdi
leaq 0x133317(%rip), %rsi    # 0x1fb5f5
callq 0x5540
movq -0x78(%rbp), %rdi
movq %rax, -0xa0(%rbp)
addq $0x90, %rdi
callq 0x706e0
movq -0xa0(%rbp), %rdi
movq %rax, %rsi
callq 0x5160
movq %rax, %rdi
leaq 0x131312(%rip), %rsi    # 0x1f9625
callq 0x5540
movl $0x0, -0x30(%rbp)
movq -0x78(%rbp), %rdi
movl -0x30(%rbp), %eax
movq %rax, -0xa8(%rbp)
addq $0x90, %rdi
callq 0x706e0
movq %rax, %rcx
movq -0xa8(%rbp), %rax
cmpq %rcx, %rax
jae 0xc8577
movq -0x78(%rbp), %rdi
addq $0x90, %rdi
movl -0x30(%rbp), %eax
movl %eax, %esi
callq 0xcd720
movq -0x78(%rbp), %rdi
movl 0x8(%rax), %ecx
movl %ecx, -0x38(%rbp)
movq (%rax), %rax
movq %rax, -0x40(%rbp)
addq $0xa8, %rdi
movl -0x30(%rbp), %eax
movl %eax, %esi
callq 0xaf5b0
movq %rax, %rsi
leaq -0x58(%rbp), %rdi
callq 0xeec0
movq -0x10(%rbp), %rdi
leaq 0x13326e(%rip), %rsi    # 0x1fb608
callq 0x5540
movq %rax, -0xb0(%rbp)
jmp 0xc83a8
movq -0xb0(%rbp), %rdi
movl -0x30(%rbp), %esi
callq 0x56f0
movq %rax, -0xb8(%rbp)
jmp 0xc83c0
movq -0xb8(%rbp), %rdi
leaq 0x131257(%rip), %rsi    # 0x1f9625
callq 0x5540
movq %rax, -0xc0(%rbp)
jmp 0xc83dc
movq -0xc0(%rbp), %rdi
leaq 0x133233(%rip), %rsi    # 0x1fb61d
callq 0x5540
movq %rax, -0xc8(%rbp)
jmp 0xc83f8
movq -0xc8(%rbp), %rdi
movl -0x40(%rbp), %esi
callq 0x58d0
movq %rax, -0xd0(%rbp)
jmp 0xc8410
movq -0xd0(%rbp), %rdi
leaq 0x133e90(%rip), %rsi    # 0x1fc2ae
callq 0x5540
movq %rax, -0xd8(%rbp)
jmp 0xc842c
movq -0xd8(%rbp), %rdi
movl -0x3c(%rbp), %esi
callq 0x58d0
movq %rax, -0xe0(%rbp)
jmp 0xc8444
movq -0xe0(%rbp), %rdi
leaq 0x133e5c(%rip), %rsi    # 0x1fc2ae
callq 0x5540
movq %rax, -0xe8(%rbp)
jmp 0xc8460
movq -0xe8(%rbp), %rdi
movl -0x38(%rbp), %esi
callq 0x58d0
movq %rax, -0xf0(%rbp)
jmp 0xc8478
movq -0xf0(%rbp), %rdi
leaq 0x13119f(%rip), %rsi    # 0x1f9625
callq 0x5540
movq %rax, -0xf8(%rbp)
jmp 0xc8494
movq -0xf8(%rbp), %rdi
leaq 0x133194(%rip), %rsi    # 0x1fb636
callq 0x5540
jmp 0xc84a9
movl $0x0, -0x68(%rbp)
movl -0x68(%rbp), %eax
movq %rax, -0x100(%rbp)
leaq -0x58(%rbp), %rdi
callq 0x10090
movq %rax, %rcx
movq -0x100(%rbp), %rax
cmpq %rcx, %rax
jae 0xc854e
movq -0x10(%rbp), %rax
movq %rax, -0x110(%rbp)
movl -0x68(%rbp), %eax
movl %eax, %esi
leaq -0x58(%rbp), %rdi
callq 0x101d0
movq %rax, -0x108(%rbp)
jmp 0xc84f4
movq -0x110(%rbp), %rdi
movq -0x108(%rbp), %rax
movl (%rax), %esi
callq 0x58d0
movq %rax, -0x118(%rbp)
jmp 0xc8512
movq -0x118(%rbp), %rdi
leaq 0x133d8e(%rip), %rsi    # 0x1fc2ae
callq 0x5540
jmp 0xc8527
jmp 0xc8529
movl -0x68(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x68(%rbp)
jmp 0xc84b0
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x60(%rbp)
movl %eax, -0x64(%rbp)
leaq -0x58(%rbp), %rdi
callq 0xec80
jmp 0xc8580
movq -0x10(%rbp), %rdi
leaq 0x1310cc(%rip), %rsi    # 0x1f9625
callq 0x5540
jmp 0xc8560
leaq -0x58(%rbp), %rdi
callq 0xec80
movl -0x30(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x30(%rbp)
jmp 0xc831f
addq $0x120, %rsp            # imm = 0x120
popq %rbp
retq
movq -0x60(%rbp), %rdi
callq 0x58f0
nopl (%rax)