// File: /workspace/github_cpp_makefile_star2_O2/Manca[P]algorithms2/./assignment1.hpp
// Function: assignment1::prims_algorithm::run_algorithm(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)
void run_algorithm(const std::string& inputFile)
        {
            std::vector<Edge> edges;
            Graph g;

            std::ifstream file(inputFile, std::ios::in);

            if (file.is_open())
            {
                PROFILE("Read file for Prim's algo");
                int num_nodes, num_edges;
                file >> num_nodes >> num_edges;

                int snode, dnode, cost;
                while (file >> snode >> dnode >> cost)
                {
                    Edge e = std::make_tuple(snode, dnode, cost);
                    edges.push_back(e);

                    g[snode].push_back(std::make_tuple(snode, dnode, cost));
                    g[dnode].push_back(std::make_tuple(dnode, snode, cost));

                }
                file.close();
                PROFILE_STOP();

                // Compute Prim's Minimum Spanning Tree
                PROFILE("Prim's algorithm");
                long long total_cost = prims_algorithm(g);
                PROFILE_STOP();
                std::cout << "Total cost of Prim's MST is: " << total_cost << std::endl;

                assert(total_cost == -3612829);
            }
        }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x298, %rsp            # imm = 0x298
movq %rdi, %rsi
xorps %xmm0, %xmm0
movaps %xmm0, 0x40(%rsp)
andq $0x0, 0x50(%rsp)
leaq 0x68(%rsp), %rax
andl $0x0, (%rax)
andq $0x0, 0x8(%rax)
movq %rax, 0x10(%rax)
movq %rax, 0x18(%rax)
andq $0x0, 0x20(%rax)
leaq 0x90(%rsp), %rdi
pushq $0x8
popq %rdx
callq 0x2320
leaq 0x108(%rsp), %rdi
callq 0x20c0
testb %al, %al
je 0x2ff7
callq 0x725c
movq %rax, %rbx
leaq 0xa3e0(%rip), %rsi      # 0xd223
leaq 0x18(%rsp), %rdi
leaq 0xc(%rsp), %rdx
callq 0x2120
leaq 0x18(%rsp), %rsi
movq %rbx, %rdi
callq 0x72a6
leaq 0x18(%rsp), %rdi
callq 0x2150
leaq 0x90(%rsp), %rdi
leaq 0x3c(%rsp), %rsi
callq 0x21a0
leaq 0x38(%rsp), %rsi
movq %rax, %rdi
callq 0x21a0
leaq 0x8(%rsp), %r14
leaq 0x4(%rsp), %r15
movq %rsp, %r12
leaq 0x18(%rsp), %rbp
leaq 0x60(%rsp), %r13
leaq 0xc(%rsp), %rbx
leaq 0x90(%rsp), %rdi
movq %r14, %rsi
callq 0x21a0
movq %rax, %rdi
movq %r15, %rsi
callq 0x21a0
movq %rax, %rdi
movq %r12, %rsi
callq 0x21a0
movq (%rax), %rcx
movq -0x18(%rcx), %rcx
testb $0x5, 0x20(%rax,%rcx)
jne 0x2f5f
movl (%rsp), %eax
movl %eax, 0x18(%rsp)
movl 0x4(%rsp), %eax
movl %eax, 0x1c(%rsp)
movl 0x8(%rsp), %eax
movl %eax, 0x20(%rsp)
leaq 0x40(%rsp), %rdi
movq %rbp, %rsi
callq 0x7192
movq %r13, %rdi
movq %r14, %rsi
callq 0x7144
movl (%rsp), %ecx
movl %ecx, 0xc(%rsp)
movl 0x4(%rsp), %ecx
movl %ecx, 0x10(%rsp)
movl 0x8(%rsp), %ecx
movl %ecx, 0x14(%rsp)
movq %rax, %rdi
movq %rbx, %rsi
callq 0xa436
movq %r13, %rdi
movq %r15, %rsi
callq 0x7144
movl (%rsp), %ecx
movl %ecx, 0xc(%rsp)
movl 0x8(%rsp), %ecx
movl %ecx, 0x10(%rsp)
movl 0x4(%rsp), %ecx
movl %ecx, 0x14(%rsp)
movq %rax, %rdi
movq %rbx, %rsi
callq 0xa436
jmp 0x2ea4
leaq 0x90(%rsp), %rdi
callq 0x2090
callq 0x725c
movq %rax, %rdi
callq 0x72c8
callq 0x725c
movq %rax, %rbx
leaq 0xa2b5(%rip), %rsi      # 0xd23d
leaq 0x18(%rsp), %rdi
leaq 0xc(%rsp), %rdx
callq 0x2120
leaq 0x18(%rsp), %rsi
movq %rbx, %rdi
callq 0x72a6
leaq 0x18(%rsp), %rdi
callq 0x2150
leaq 0x60(%rsp), %rdi
callq 0x2a4a
movq %rax, %rbx
callq 0x725c
movq %rax, %rdi
callq 0x72c8
movq 0x13009(%rip), %rdi     # 0x15fd8
leaq 0xa278(%rip), %rsi      # 0xd24e
callq 0x2230
movq %rax, %rdi
movq %rbx, %rsi
callq 0x2110
movq %rax, %rdi
callq 0x2160
cmpq $-0x37209d, %rbx        # imm = 0xFFC8DF63
jne 0x302a
leaq 0x90(%rsp), %rdi
callq 0x20e0
leaq 0x60(%rsp), %rdi
callq 0x8002
leaq 0x40(%rsp), %rdi
callq 0x9d3e
addq $0x298, %rsp            # imm = 0x298
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0xa23b(%rip), %rdi      # 0xd26c
leaq 0xa0fc(%rip), %rsi      # 0xd134
leaq 0xa244(%rip), %rcx      # 0xd283
movl $0x126, %edx            # imm = 0x126
callq 0x21b0
jmp 0x304d
jmp 0x3071
movq %rax, %rbx
leaq 0x18(%rsp), %rdi
callq 0x2150
jmp 0x3074
jmp 0x3071
jmp 0x3071
jmp 0x3071
movq %rax, %rbx
jmp 0x3081
jmp 0x3071
jmp 0x3071
jmp 0x3071
jmp 0x3071
jmp 0x3071
movq %rax, %rbx
leaq 0x90(%rsp), %rdi
callq 0x20e0
leaq 0x60(%rsp), %rdi
callq 0x8002
leaq 0x40(%rsp), %rdi
callq 0x9d3e
movq %rbx, %rdi
callq 0x2380