// File: /workspace/github_cpp_makefile_star2_O2/Manca[P]algorithms1/./assignment4.hpp
// Function: assignment4::computeSCC(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)
void computeSCC(const string& fileName)
    {
        cout << "***** ASSIGNMENT4 MAIN TEST CASE *****" << endl;
        // load from file
        Graph G, Grev;
        ifstream file(fileName, ios::in);
        for (int i = 1; i < NUM_NODES; i++)
        {
            G[i] = std::vector<int>();
            Grev[i] = std::vector<int>();
        }
        
        cout << "Reading file..." << endl;
        std::chrono::steady_clock::time_point start = std::chrono::steady_clock::now();
        if (file.is_open())
        {
            std::string rawInput;
            int tail, head;
            while (getline(file, rawInput))
            {
                std::istringstream is(rawInput);

                is >> tail;
                is >> head;
                
                G[tail].push_back(head);
                Grev[head].push_back(tail);
            }
            file.close();
        }
        std::chrono::steady_clock::time_point end = std::chrono::steady_clock::now();
        std::cout << "Done. Time took to read the whole file and construct two graphs: "
        << std::chrono::duration_cast<std::chrono::milliseconds>(end - start).count()
        << "ms.\n";
        
        // initialize global vars
        _seen       = seenList(G.size() + 1, 0);
        _times      = timesList(G.size() + 1, 0);
        _leaders    = leadersList(G.size() + 1, 0);
 
        DFSLoop(Grev);
        
        Graph newGraph = constructNewGraph(G, _times);
        DFSLoop(newGraph);
        
        sort(_leaders.begin(), _leaders.end());
        std::vector<SCC> SCCs;
        int el = _leaders[1];
        int elCnt = 1;
        for (size_t i = 2; i < _leaders.size(); i++)
        {
            if (_leaders[i] == el)
                elCnt++;
            else
            {
                SCC scc;
                scc.leader = el;
                scc.numNodes = elCnt;
                SCCs.push_back(scc);
                
                el = _leaders[i];
                elCnt = 1;
            }
        }
        // last SCC
        SCC scc;
        scc.leader = el;
        scc.numNodes = elCnt;
        SCCs.push_back(scc);
        
        cout << " Total number of SCCs is: " << SCCs.size() << endl << "Top 5 are: " << endl;
        
        // Let's just sort them in descending order by number of components
        sort(SCCs.begin(), SCCs.end(), compareByNumSCCs);
        
        for (int i = 0; i < 5; i++)
        {
            cout << "SCC with leader " << SCCs[i].leader << " has " << SCCs[i].numNodes << " nodes." << endl;
        }
        
        // Correct result is: 434821,968,459,313,211
        assert(SCCs[0].numNodes == 434821);
        assert(SCCs[1].numNodes == 968);
        assert(SCCs[2].numNodes == 459);
        assert(SCCs[3].numNodes == 313);
        assert(SCCs[4].numNodes == 211);
    }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x428, %rsp            # imm = 0x428
movq %rdi, %rbx
movq 0xa730(%rip), %rdi      # 0xdfd8
leaq 0x58a1(%rip), %rsi      # 0x9150
callq 0x21d0
movq %rax, %rdi
callq 0x2100
leaq 0x48(%rsp), %rax
andl $0x0, (%rax)
andq $0x0, 0x8(%rax)
movq %rax, 0x10(%rax)
movq %rax, 0x18(%rax)
andq $0x0, 0x20(%rax)
leaq 0x78(%rsp), %rax
andl $0x0, (%rax)
andq $0x0, 0x8(%rax)
movq %rax, 0x10(%rax)
movq %rax, 0x18(%rax)
andq $0x0, 0x20(%rax)
leaq 0x220(%rsp), %rdi
pushq $0x8
popq %rdx
movq %rbx, %rsi
callq 0x2290
pushq $0x1
popq %rax
xorps %xmm0, %xmm0
leaq 0x40(%rsp), %rbx
leaq 0x10(%rsp), %r14
leaq 0xa0(%rsp), %r15
leaq 0x70(%rsp), %r12
movl %eax, 0x10(%rsp)
cmpl $0xd5cc3, %eax          # imm = 0xD5CC3
jge 0x3997
movaps %xmm0, 0xa0(%rsp)
andq $0x0, 0xb0(%rsp)
movq %rbx, %rdi
movq %r14, %rsi
callq 0x512e
movq %rax, %rdi
movq %r15, %rsi
callq 0x6bbe
movq %r15, %rdi
callq 0x606a
xorps %xmm0, %xmm0
movaps %xmm0, 0xa0(%rsp)
andq $0x0, 0xb0(%rsp)
movq %r12, %rdi
movq %r14, %rsi
callq 0x512e
movq %rax, %rdi
movq %r15, %rsi
callq 0x6bbe
movq %r15, %rdi
callq 0x606a
movl 0x10(%rsp), %eax
incl %eax
xorps %xmm0, %xmm0
jmp 0x3920
movq 0xa63a(%rip), %rdi      # 0xdfd8
leaq 0x57d2(%rip), %rsi      # 0x9177
callq 0x21d0
movq %rax, %rdi
callq 0x2100
callq 0x2230
movq %rax, 0x30(%rsp)
leaq 0x298(%rsp), %rdi
callq 0x2070
testb %al, %al
je 0x3a92
leaq 0x20(%rsp), %rax
movq %rax, -0x10(%rax)
andq $0x0, -0x8(%rax)
movb $0x0, (%rax)
leaq 0x10(%rsp), %r15
leaq 0xa0(%rsp), %r12
leaq 0x8(%rsp), %r13
leaq 0x3c(%rsp), %rbx
leaq 0x40(%rsp), %rbp
leaq 0x70(%rsp), %r14
leaq 0x220(%rsp), %rdi
movq %r15, %rsi
callq 0x2050
movq (%rax), %rcx
movq -0x18(%rcx), %rcx
testb $0x5, 0x20(%rax,%rcx)
jne 0x3a7b
movq %r12, %rdi
movq %r15, %rsi
pushq $0x8
popq %rdx
callq 0x22c0
movq %r12, %rdi
movq %r13, %rsi
callq 0x2140
movq %r12, %rdi
movq %rbx, %rsi
callq 0x2140
movq %rbp, %rdi
movq %r13, %rsi
callq 0x512e
movq %rax, %rdi
movq %rbx, %rsi
callq 0x4ffc
movq %r14, %rdi
movq %rbx, %rsi
callq 0x512e
movq %rax, %rdi
movq %r13, %rsi
callq 0x4ffc
movq %r12, %rdi
callq 0x20f0
jmp 0x3a03
leaq 0x220(%rsp), %rdi
callq 0x2060
leaq 0x10(%rsp), %rdi
callq 0x20e0
callq 0x2230
movq %rax, %rbx
movq 0xa537(%rip), %rdi      # 0xdfd8
leaq 0x56df(%rip), %rsi      # 0x9187
callq 0x21d0
movq %rax, %rdi
subq 0x30(%rsp), %rbx
movl $0xf4240, %ecx          # imm = 0xF4240
movq %rbx, %rax
cqto
idivq %rcx
movq %rax, %rsi
callq 0x21c0
leaq 0x56f8(%rip), %rsi      # 0x91c9
movq %rax, %rdi
callq 0x21d0
movq 0x68(%rsp), %rsi
incq %rsi
leaq 0x10(%rsp), %rdx
andl $0x0, (%rdx)
leaq 0xa0(%rsp), %rdi
leaq 0x8(%rsp), %rcx
callq 0x517c
leaq 0xa6d6(%rip), %rdi      # 0xe1d8
leaq 0xa0(%rsp), %rbx
movq %rbx, %rsi
callq 0x6bbe
movq %rbx, %rdi
callq 0x606a
movq 0x68(%rsp), %rsi
incq %rsi
leaq 0x10(%rsp), %rdx
andl $0x0, (%rdx)
leaq 0xa0(%rsp), %rdi
leaq 0x8(%rsp), %rcx
callq 0x517c
leaq 0xa67d(%rip), %rdi      # 0xe1c0
leaq 0xa0(%rsp), %rbx
movq %rbx, %rsi
callq 0x6bbe
movq %rbx, %rdi
callq 0x606a
movq 0x68(%rsp), %rsi
incq %rsi
leaq 0x10(%rsp), %rdx
andl $0x0, (%rdx)
leaq 0xa0(%rsp), %rdi
leaq 0x8(%rsp), %rcx
callq 0x517c
leaq 0xa66c(%rip), %rdi      # 0xe1f0
leaq 0xa0(%rsp), %rbx
movq %rbx, %rsi
callq 0x6bbe
movq %rbx, %rdi
callq 0x606a
leaq 0x70(%rsp), %rdi
callq 0x2993
leaq 0xa613(%rip), %rdx      # 0xe1c0
leaq 0xa0(%rsp), %rdi
leaq 0x40(%rsp), %rsi
callq 0x2a19
leaq 0xa0(%rsp), %rdi
callq 0x2993
movq 0xa61d(%rip), %rdi      # 0xe1f0
movq 0xa61e(%rip), %rsi      # 0xe1f8
callq 0x6dcd
leaq 0x10(%rsp), %rbx
andq $0x0, 0x10(%rbx)
xorps %xmm0, %xmm0
movaps %xmm0, (%rbx)
movq 0xa5fa(%rip), %rcx      # 0xe1f0
movl 0x4(%rcx), %eax
pushq $0x2
popq %r15
pushq $0x1
popq %rbp
leaq 0x8(%rsp), %r14
movl %ebp, %edx
movq 0xa5ea(%rip), %rsi      # 0xe1f8
subq %rcx, %rsi
sarq $0x2, %rsi
cmpq %rsi, %r15
jae 0x3c49
cmpl %eax, (%rcx,%r15,4)
jne 0x3c24
incl %edx
jmp 0x3c44
movl %eax, 0x8(%rsp)
movl %edx, 0xc(%rsp)
movq %rbx, %rdi
movq %r14, %rsi
callq 0x5220
movq 0xa5b2(%rip), %rcx      # 0xe1f0
movl (%rcx,%r15,4), %eax
movl %ebp, %edx
incq %r15
jmp 0x3c07
leaq 0x8(%rsp), %rsi
movl %eax, (%rsi)
movl %edx, 0x4(%rsi)
leaq 0x10(%rsp), %rdi
callq 0x5220
movq 0xa374(%rip), %rdi      # 0xdfd8
leaq 0x5563(%rip), %rsi      # 0x91ce
callq 0x21d0
movq 0x18(%rsp), %rsi
subq 0x10(%rsp), %rsi
sarq $0x3, %rsi
movq %rax, %rdi
callq 0x2160
movq %rax, %rdi
callq 0x2100
leaq 0x5554(%rip), %rsi      # 0x91e9
movq %rax, %rdi
callq 0x21d0
movq %rax, %rdi
callq 0x2100
movq 0x10(%rsp), %rdi
movq 0x18(%rsp), %rsi
leaq -0x1123(%rip), %rdx     # 0x2b93
callq 0x731d
xorl %r13d, %r13d
movq 0xa313(%rip), %rbx      # 0xdfd8
leaq 0x5436(%rip), %r14      # 0x9102
leaq 0x5440(%rip), %r15      # 0x9113
leaq 0x543f(%rip), %r12      # 0x9119
cmpq $0x5, %r13
je 0x3d31
movq %rbx, %rdi
movq %r14, %rsi
callq 0x21d0
movq 0x10(%rsp), %rcx
movl (%rcx,%r13,8), %esi
movq %rax, %rdi
callq 0x22e0
movq %rax, %rdi
movq %r15, %rsi
callq 0x21d0
movq 0x10(%rsp), %rcx
movl 0x4(%rcx,%r13,8), %esi
movq %rax, %rdi
callq 0x22e0
movq %rax, %rdi
movq %r12, %rsi
callq 0x21d0
movq %rax, %rdi
callq 0x2100
incq %r13
jmp 0x3cda
movq 0x10(%rsp), %rax
cmpl $0x6a285, 0x4(%rax)     # imm = 0x6A285
jne 0x3dbd
cmpl $0x3c8, 0xc(%rax)       # imm = 0x3C8
jne 0x3ddc
cmpl $0x1cb, 0x14(%rax)      # imm = 0x1CB
jne 0x3dfb
cmpl $0x139, 0x1c(%rax)      # imm = 0x139
jne 0x3e1a
cmpl $0xd3, 0x24(%rax)
jne 0x3e39
leaq 0x10(%rsp), %rdi
callq 0x71ce
leaq 0xa0(%rsp), %rdi
callq 0x586e
leaq 0x220(%rsp), %rdi
callq 0x2080
leaq 0x70(%rsp), %rdi
callq 0x586e
leaq 0x40(%rsp), %rdi
callq 0x586e
addq $0x428, %rsp            # imm = 0x428
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x5431(%rip), %rdi      # 0x91f5
leaq 0x5264(%rip), %rsi      # 0x902f
leaq 0x543e(%rip), %rcx      # 0x9210
movl $0x16c, %edx            # imm = 0x16C
callq 0x2150
leaq 0x545a(%rip), %rdi      # 0x923d
leaq 0x5245(%rip), %rsi      # 0x902f
leaq 0x541f(%rip), %rcx      # 0x9210
movl $0x16d, %edx            # imm = 0x16D
callq 0x2150
leaq 0x5453(%rip), %rdi      # 0x9255
leaq 0x5226(%rip), %rsi      # 0x902f
leaq 0x5400(%rip), %rcx      # 0x9210
movl $0x16e, %edx            # imm = 0x16E
callq 0x2150
leaq 0x544c(%rip), %rdi      # 0x926d
leaq 0x5207(%rip), %rsi      # 0x902f
leaq 0x53e1(%rip), %rcx      # 0x9210
movl $0x16f, %edx            # imm = 0x16F
callq 0x2150
leaq 0x5445(%rip), %rdi      # 0x9285
leaq 0x51e8(%rip), %rsi      # 0x902f
leaq 0x53c2(%rip), %rcx      # 0x9210
movl $0x170, %edx            # imm = 0x170
callq 0x2150
jmp 0x3e7b
jmp 0x3e70
jmp 0x3e70
jmp 0x3e70
jmp 0x3e70
movq %rax, %rbx
jmp 0x3ed7
movq %rax, %rbx
jmp 0x3ebd
jmp 0x3e70
jmp 0x3e70
movq %rax, %rbx
jmp 0x3eca
jmp 0x3eb0
jmp 0x3e7b
jmp 0x3eb0
movq %rax, %rbx
jmp 0x3ea4
jmp 0x3e82
movq %rax, %rbx
leaq 0xa0(%rsp), %rdi
callq 0x606a
jmp 0x3eca
movq %rax, %rbx
leaq 0xa0(%rsp), %rdi
callq 0x20f0
leaq 0x10(%rsp), %rdi
callq 0x20e0
jmp 0x3eca
movq %rax, %rbx
leaq 0x10(%rsp), %rdi
callq 0x71ce
leaq 0xa0(%rsp), %rdi
callq 0x586e
leaq 0x220(%rsp), %rdi
callq 0x2080
leaq 0x70(%rsp), %rdi
callq 0x586e
leaq 0x40(%rsp), %rdi
callq 0x586e
movq %rbx, %rdi
callq 0x22f0