// File: /workspace/github_cpp_makefile_star2_O2/MechaDragonX[P]CPPCollections/main.cpp
// Function: main
int main() {
    Student rags("Raghav", "Vivek");
    rags.addCourse("math");
    rags.addCourse("cs");
    rags.addCourse("eng");
    std::cout << rags.toString(true) << std::endl;

    Student syke1("Dylan", "Sykes");
    syke1.addCourse("math");
    syke1.addCourse("eng");
    std::cout << syke1.toString(true) << std::endl;

    Student syke2("Mason", "Sykes");
    syke2.addCourse("math");
    syke2.addCourse("cs");
    std::cout << syke2.toString(true) << std::endl;

    Student surnameLacking("Ashley", "Koch");
    surnameLacking.addCourse("math");
    surnameLacking.addCourse("eng");
    std::cout << surnameLacking.toString(true) << std::endl;

    Student knob("Jake", "Knabner");
    knob.addCourse("cs");
    knob.addCourse("eng");
    std::cout << knob.toString(true) << std::endl << std::endl;

    // DoubleLinkedList<Student> collection = doubleLinkedListStuff(rags, syke1, syke2, surnameLacking, knob);
    // LinkedList<Student> collection = linkedListStuff(rags, syke1, syke2, surnameLacking, knob);
    // Queue<Student> collection = queueStuff(rags, syke1, syke2, surnameLacking, knob);
    Stack<Student> collection = stackStuff(rags, syke1, syke2, surnameLacking, knob);

    std::cout << "Is Mason Sykes alive? ";
    bool alive = collection.exists(syke2);
    if(alive)
        std::cout << "Yes" << std::endl;
    else
        std::cout << "No" << std::endl;

    std::cout << "Is the character that didn't have a last name until today (Ashley) alive? ";
    alive = collection.exists(surnameLacking);
    if(alive)
        std::cout << "Yes" << std::endl;
    else
        std::cout << "No" << std::endl;

    // collection.~DoubleLinkedList();
    // if(collection.toString() == "")
    //     std::cout << "All values and deleted and memory deallocated successfully!" << std::endl;
    // else
    //     std::cout << "Oh no! Something bad happened! This could be a memory leak....." << std::endl;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x6e8, %rsp            # imm = 0x6E8
leaq 0x14b8(%rip), %rsi      # 0xb4a1
leaq -0x440(%rbp), %rdi
leaq -0x1a0(%rbp), %rdx
callq 0x36d4
leaq 0x14a5(%rip), %rsi      # 0xb4a8
leaq -0x420(%rbp), %rdi
leaq -0xf0(%rbp), %rdx
callq 0x36d4
leaq -0x498(%rbp), %rdi
leaq -0x440(%rbp), %rsi
leaq -0x420(%rbp), %rdx
callq 0x8b76
leaq -0x420(%rbp), %rdi
callq 0x30a0
leaq -0x440(%rbp), %rdi
callq 0x30a0
leaq 0x145f(%rip), %rsi      # 0xb4ae
leaq -0x400(%rbp), %rdi
leaq -0x1a0(%rbp), %rdx
callq 0x36d4
leaq -0x498(%rbp), %rdi
leaq -0x400(%rbp), %rsi
callq 0x8c96
leaq -0x400(%rbp), %rdi
callq 0x30a0
leaq 0x142b(%rip), %rsi      # 0xb4b3
leaq -0x3e0(%rbp), %rdi
leaq -0x1a0(%rbp), %rdx
callq 0x36d4
leaq -0x498(%rbp), %rdi
leaq -0x3e0(%rbp), %rsi
callq 0x8c96
leaq -0x3e0(%rbp), %rdi
callq 0x30a0
leaq 0x13f5(%rip), %rsi      # 0xb4b6
leaq -0x3c0(%rbp), %rdi
leaq -0x1a0(%rbp), %rdx
callq 0x36d4
leaq -0x498(%rbp), %rdi
leaq -0x3c0(%rbp), %rsi
callq 0x8c96
leaq -0x3c0(%rbp), %rdi
callq 0x30a0
leaq -0x1a0(%rbp), %rdi
leaq -0x498(%rbp), %rsi
pushq $0x1
popq %rdx
callq 0x8d44
movq 0x7ec8(%rip), %rdi      # 0x11fd8
leaq -0x1a0(%rbp), %rsi
callq 0x3120
movq %rax, %rdi
callq 0x30b0
leaq -0x1a0(%rbp), %rdi
callq 0x30a0
leaq 0x1383(%rip), %rsi      # 0xb4ba
leaq -0x3a0(%rbp), %rdi
leaq -0xf0(%rbp), %rdx
callq 0x36d4
leaq 0x136f(%rip), %rsi      # 0xb4c0
leaq -0x380(%rbp), %rdi
leaq -0x98(%rbp), %rdx
callq 0x36d4
leaq -0x1a0(%rbp), %rdi
leaq -0x3a0(%rbp), %rsi
leaq -0x380(%rbp), %rdx
callq 0x8b76
leaq -0x380(%rbp), %rdi
callq 0x30a0
leaq -0x3a0(%rbp), %rdi
callq 0x30a0
leaq 0x1311(%rip), %rsi      # 0xb4ae
leaq -0x360(%rbp), %rdi
leaq -0xf0(%rbp), %rdx
callq 0x36d4
leaq -0x1a0(%rbp), %rdi
leaq -0x360(%rbp), %rsi
callq 0x8c96
leaq -0x360(%rbp), %rdi
callq 0x30a0
leaq 0x12e0(%rip), %rsi      # 0xb4b6
leaq -0x340(%rbp), %rdi
leaq -0xf0(%rbp), %rdx
callq 0x36d4
leaq -0x1a0(%rbp), %rdi
leaq -0x340(%rbp), %rsi
callq 0x8c96
leaq -0x340(%rbp), %rdi
callq 0x30a0
leaq -0xf0(%rbp), %rdi
leaq -0x1a0(%rbp), %rsi
pushq $0x1
popq %rdx
callq 0x8d44
movq 0x7db3(%rip), %rdi      # 0x11fd8
leaq -0xf0(%rbp), %rsi
callq 0x3120
movq %rax, %rdi
callq 0x30b0
leaq -0xf0(%rbp), %rdi
callq 0x30a0
leaq 0x127a(%rip), %rsi      # 0xb4c6
leaq -0x320(%rbp), %rdi
leaq -0x98(%rbp), %rdx
callq 0x36d4
leaq 0x125a(%rip), %rsi      # 0xb4c0
leaq -0x300(%rbp), %rdi
leaq -0x148(%rbp), %rdx
callq 0x36d4
leaq -0xf0(%rbp), %rdi
leaq -0x320(%rbp), %rsi
leaq -0x300(%rbp), %rdx
callq 0x8b76
leaq -0x300(%rbp), %rdi
callq 0x30a0
leaq -0x320(%rbp), %rdi
callq 0x30a0
leaq 0x11fc(%rip), %rsi      # 0xb4ae
leaq -0x2e0(%rbp), %rdi
leaq -0x98(%rbp), %rdx
callq 0x36d4
leaq -0xf0(%rbp), %rdi
leaq -0x2e0(%rbp), %rsi
callq 0x8c96
leaq -0x2e0(%rbp), %rdi
callq 0x30a0
leaq 0x11c8(%rip), %rsi      # 0xb4b3
leaq -0x2c0(%rbp), %rdi
leaq -0x98(%rbp), %rdx
callq 0x36d4
leaq -0xf0(%rbp), %rdi
leaq -0x2c0(%rbp), %rsi
callq 0x8c96
leaq -0x2c0(%rbp), %rdi
callq 0x30a0
leaq -0x98(%rbp), %rdi
leaq -0xf0(%rbp), %rsi
pushq $0x1
popq %rdx
callq 0x8d44
movq 0x7c9e(%rip), %rdi      # 0x11fd8
leaq -0x98(%rbp), %rsi
callq 0x3120
movq %rax, %rdi
callq 0x30b0
leaq -0x98(%rbp), %rdi
callq 0x30a0
leaq 0x116b(%rip), %rsi      # 0xb4cc
leaq -0x2a0(%rbp), %rdi
leaq -0x148(%rbp), %rdx
callq 0x36d4
leaq 0x1158(%rip), %rsi      # 0xb4d3
leaq -0x280(%rbp), %rdi
leaq -0x40(%rbp), %rdx
callq 0x36d4
leaq -0x98(%rbp), %rdi
leaq -0x2a0(%rbp), %rsi
leaq -0x280(%rbp), %rdx
callq 0x8b76
leaq -0x280(%rbp), %rdi
callq 0x30a0
leaq -0x2a0(%rbp), %rdi
callq 0x30a0
leaq 0x10ea(%rip), %rsi      # 0xb4ae
leaq -0x260(%rbp), %rdi
leaq -0x148(%rbp), %rdx
callq 0x36d4
leaq -0x98(%rbp), %rdi
leaq -0x260(%rbp), %rsi
callq 0x8c96
leaq -0x260(%rbp), %rdi
callq 0x30a0
leaq 0x10b9(%rip), %rsi      # 0xb4b6
leaq -0x240(%rbp), %rdi
leaq -0x148(%rbp), %rdx
callq 0x36d4
leaq -0x98(%rbp), %rdi
leaq -0x240(%rbp), %rsi
callq 0x8c96
leaq -0x240(%rbp), %rdi
callq 0x30a0
leaq -0x148(%rbp), %rdi
leaq -0x98(%rbp), %rsi
pushq $0x1
popq %rdx
callq 0x8d44
movq 0x7b8c(%rip), %rdi      # 0x11fd8
leaq -0x148(%rbp), %rsi
callq 0x3120
movq %rax, %rdi
callq 0x30b0
leaq -0x148(%rbp), %rdi
callq 0x30a0
leaq 0x1065(%rip), %rsi      # 0xb4d8
leaq -0x220(%rbp), %rdi
leaq -0x40(%rbp), %rdx
callq 0x36d4
leaq 0x1053(%rip), %rsi      # 0xb4dd
leaq -0x200(%rbp), %rdi
leaq -0x19(%rbp), %rdx
callq 0x36d4
leaq -0x148(%rbp), %rdi
leaq -0x220(%rbp), %rsi
leaq -0x200(%rbp), %rdx
callq 0x8b76
leaq -0x200(%rbp), %rdi
callq 0x30a0
leaq -0x220(%rbp), %rdi
callq 0x30a0
leaq 0xfe0(%rip), %rsi       # 0xb4b3
leaq -0x1e0(%rbp), %rdi
leaq -0x40(%rbp), %rdx
callq 0x36d4
leaq -0x148(%rbp), %rdi
leaq -0x1e0(%rbp), %rsi
callq 0x8c96
leaq -0x1e0(%rbp), %rdi
callq 0x30a0
leaq 0xfad(%rip), %rsi       # 0xb4b6
leaq -0x1c0(%rbp), %rdi
leaq -0x40(%rbp), %rdx
callq 0x36d4
leaq -0x148(%rbp), %rdi
leaq -0x1c0(%rbp), %rsi
callq 0x8c96
leaq -0x1c0(%rbp), %rdi
callq 0x30a0
leaq -0x40(%rbp), %rdi
leaq -0x148(%rbp), %rsi
pushq $0x1
popq %rdx
callq 0x8d44
movq 0x7a86(%rip), %rdi      # 0x11fd8
leaq -0x40(%rbp), %rsi
callq 0x3120
movq %rax, %rdi
callq 0x30b0
movq %rax, %rdi
callq 0x30b0
leaq -0x40(%rbp), %rdi
callq 0x30a0
leaq -0x700(%rbp), %rdi
leaq -0x498(%rbp), %rsi
callq 0x49b4
leaq -0x6a8(%rbp), %rdi
leaq -0x1a0(%rbp), %rsi
callq 0x49b4
leaq -0x650(%rbp), %rdi
leaq -0xf0(%rbp), %rsi
callq 0x49b4
leaq -0x5f8(%rbp), %rdi
leaq -0x98(%rbp), %rsi
callq 0x49b4
leaq -0x5a0(%rbp), %rdi
leaq -0x148(%rbp), %rsi
callq 0x49b4
leaq -0x40(%rbp), %rdi
leaq -0x700(%rbp), %rsi
leaq -0x6a8(%rbp), %rdx
leaq -0x650(%rbp), %rcx
leaq -0x5f8(%rbp), %r8
leaq -0x5a0(%rbp), %r9
callq 0x9e15
leaq -0x5a0(%rbp), %rdi
callq 0x507a
leaq -0x5f8(%rbp), %rdi
callq 0x507a
leaq -0x650(%rbp), %rdi
callq 0x507a
leaq -0x6a8(%rbp), %rdi
callq 0x507a
leaq -0x700(%rbp), %rdi
callq 0x507a
movq 0x7996(%rip), %rdi      # 0x11fd8
leaq 0xe9c(%rip), %rsi       # 0xb4e5
callq 0x3130
leaq -0x548(%rbp), %rdi
leaq -0xf0(%rbp), %rsi
callq 0x49b4
leaq -0x40(%rbp), %rdi
leaq -0x548(%rbp), %rsi
callq 0x88fe
movl %eax, %r14d
leaq -0x548(%rbp), %rdi
callq 0x507a
leaq 0xe75(%rip), %r15       # 0xb4fc
leaq 0xe72(%rip), %rbx       # 0xb500
testb %r14b, %r14b
movq %rbx, %rsi
cmovneq %r15, %rsi
movq 0x7939(%rip), %rdi      # 0x11fd8
callq 0x3130
movq %rax, %rdi
callq 0x30b0
movq 0x7925(%rip), %rdi      # 0x11fd8
leaq 0xe49(%rip), %rsi       # 0xb503
callq 0x3130
leaq -0x4f0(%rbp), %rdi
leaq -0x98(%rbp), %rsi
callq 0x49b4
leaq -0x40(%rbp), %rdi
leaq -0x4f0(%rbp), %rsi
callq 0x88fe
movl %eax, %r14d
leaq -0x4f0(%rbp), %rdi
callq 0x507a
testb %r14b, %r14b
cmovneq %r15, %rbx
movq 0x78d9(%rip), %rdi      # 0x11fd8
movq %rbx, %rsi
callq 0x3130
movq %rax, %rdi
callq 0x30b0
leaq -0x148(%rbp), %rdi
callq 0x507a
leaq -0x98(%rbp), %rdi
callq 0x507a
leaq -0xf0(%rbp), %rdi
callq 0x507a
leaq -0x1a0(%rbp), %rdi
callq 0x507a
leaq -0x498(%rbp), %rdi
callq 0x507a
xorl %eax, %eax
addq $0x6e8, %rsp            # imm = 0x6E8
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
leaq -0x4f0(%rbp), %rdi
jmp 0xa7c1
movq %rax, %rbx
leaq -0x548(%rbp), %rdi
jmp 0xa7c1
movq %rax, %rbx
leaq -0x5a0(%rbp), %rdi
callq 0x507a
jmp 0xa787
movq %rax, %rbx
leaq -0x5f8(%rbp), %rdi
callq 0x507a
jmp 0xa798
movq %rax, %rbx
leaq -0x650(%rbp), %rdi
callq 0x507a
jmp 0xa7a9
movq %rax, %rbx
leaq -0x6a8(%rbp), %rdi
callq 0x507a
jmp 0xa7ba
movq %rax, %rbx
leaq -0x700(%rbp), %rdi
callq 0x507a
jmp 0xa9ba
jmp 0xa9b7
movq %rax, %rbx
leaq -0x1c0(%rbp), %rdi
jmp 0xa9b0
jmp 0xa9b7
movq %rax, %rbx
leaq -0x1e0(%rbp), %rdi
jmp 0xa9b0
jmp 0xa9b7
movq %rax, %rbx
leaq -0x200(%rbp), %rdi
callq 0x30a0
jmp 0xa80c
movq %rax, %rbx
leaq -0x220(%rbp), %rdi
jmp 0xa96f
jmp 0xa83c
jmp 0xa83c
movq %rax, %rbx
leaq -0x240(%rbp), %rdi
jmp 0xa96f
jmp 0xa83c
movq %rax, %rbx
leaq -0x260(%rbp), %rdi
jmp 0xa96f
movq %rax, %rbx
jmp 0xa9c6
movq %rax, %rbx
leaq -0x280(%rbp), %rdi
callq 0x30a0
jmp 0xa858
movq %rax, %rbx
leaq -0x2a0(%rbp), %rdi
jmp 0xa980
jmp 0xa888
jmp 0xa888
movq %rax, %rbx
leaq -0x2c0(%rbp), %rdi
jmp 0xa980
jmp 0xa888
movq %rax, %rbx
leaq -0x2e0(%rbp), %rdi
jmp 0xa980
movq %rax, %rbx
jmp 0xa9d2
movq %rax, %rbx
leaq -0x300(%rbp), %rdi
callq 0x30a0
jmp 0xa8a4
movq %rax, %rbx
leaq -0x320(%rbp), %rdi
jmp 0xa991
jmp 0xa8d4
jmp 0xa8d4
movq %rax, %rbx
leaq -0x340(%rbp), %rdi
jmp 0xa991
jmp 0xa8d4
movq %rax, %rbx
leaq -0x360(%rbp), %rdi
jmp 0xa991
movq %rax, %rbx
jmp 0xa9de
movq %rax, %rbx
leaq -0x380(%rbp), %rdi
callq 0x30a0
jmp 0xa8f0
movq %rax, %rbx
leaq -0x3a0(%rbp), %rdi
jmp 0xa9a2
jmp 0xa92e
jmp 0xa92e
movq %rax, %rbx
leaq -0x3c0(%rbp), %rdi
jmp 0xa9a2
jmp 0xa92e
movq %rax, %rbx
leaq -0x3e0(%rbp), %rdi
jmp 0xa9a2
jmp 0xa92e
movq %rax, %rbx
leaq -0x400(%rbp), %rdi
jmp 0xa9a2
movq %rax, %rbx
jmp 0xa9ea
movq %rax, %rbx
leaq -0x420(%rbp), %rdi
callq 0x30a0
jmp 0xa94a
movq %rax, %rbx
leaq -0x440(%rbp), %rdi
callq 0x30a0
jmp 0xa9f6
movq %rax, %rbx
jmp 0xa9f6
jmp 0xa9b7
movq %rax, %rbx
leaq -0x148(%rbp), %rdi
callq 0x30a0
jmp 0xa9c6
movq %rax, %rbx
leaq -0x98(%rbp), %rdi
callq 0x30a0
jmp 0xa9d2
movq %rax, %rbx
leaq -0xf0(%rbp), %rdi
callq 0x30a0
jmp 0xa9de
movq %rax, %rbx
leaq -0x1a0(%rbp), %rdi
callq 0x30a0
jmp 0xa9ea
movq %rax, %rbx
leaq -0x40(%rbp), %rdi
callq 0x30a0
jmp 0xa9ba
movq %rax, %rbx
leaq -0x148(%rbp), %rdi
callq 0x507a
leaq -0x98(%rbp), %rdi
callq 0x507a
leaq -0xf0(%rbp), %rdi
callq 0x507a
leaq -0x1a0(%rbp), %rdi
callq 0x507a
leaq -0x498(%rbp), %rdi
callq 0x507a
movq %rbx, %rdi
callq 0x31e0