// File: Manca[P]algorithms1/./assignment5.hpp
// Function: assignment5::loadGraphAndInit(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)
void loadGraphAndInit(const string& fileName)
    {
        // load from file
        ifstream file(fileName, ios::in);
        
        if (file.is_open())
        {
            std::string rawInput;
            int vertex;
            while (getline(file, rawInput))
            {
                std::istringstream is(rawInput);
                
                is >> vertex;
                // read the pairs of dest, weight
                int dest, weight;
                char comma;
                while (is >> dest >> comma >> weight)
                {
                    _G[vertex].push_back(make_pair(dest, weight));
                }
            }
            file.close();
        }
        
        // init shortest paths array
        _shortest_paths = std::vector<int>(_G.size() + 1,1000000); // we start with vertex 1
        _shortest_paths[1] = 0; // path to itself is 0
        
        // init processed_so_far array
        _processed_so_far.push_back(1); // first vertex is in X initially
        
    }

// Assembly:
subq $0x478, %rsp            # imm = 0x478
movq %rdi, 0x470(%rsp)
movq 0x470(%rsp), %rsi
leaq 0x268(%rsp), %rdi
movq %rdi, 0x68(%rsp)
movl $0x8, %edx
callq 0x22c0
movq 0x68(%rsp), %rdi
callq 0x22b0
movb %al, 0x73(%rsp)
jmp 0x5dde
movb 0x73(%rsp), %al
testb $0x1, %al
jne 0x5deb
jmp 0x5fd6
leaq 0x238(%rsp), %rdi
callq 0x2260
leaq 0x268(%rsp), %rdi
leaq 0x238(%rsp), %rsi
callq 0x2050
movq %rax, 0x60(%rsp)
jmp 0x5e14
movq 0x60(%rsp), %rdi
movq (%rdi), %rax
movq -0x18(%rax), %rax
addq %rax, %rdi
callq 0x2210
movb %al, 0x5f(%rsp)
jmp 0x5e2e
movb 0x5f(%rsp), %al
testb $0x1, %al
jne 0x5e3b
jmp 0x5fa6
leaq 0xb0(%rsp), %rdi
leaq 0x238(%rsp), %rsi
movl $0x8, %edx
callq 0x22f0
jmp 0x5e57
leaq 0xb0(%rsp), %rdi
leaq 0x234(%rsp), %rsi
callq 0x2120
jmp 0x5e6e
jmp 0x5e70
leaq 0xb0(%rsp), %rdi
leaq 0xac(%rsp), %rsi
callq 0x2120
movq %rax, 0x50(%rsp)
jmp 0x5e8c
movq 0x50(%rsp), %rdi
leaq 0xa7(%rsp), %rsi
callq 0x2220
movq %rax, 0x48(%rsp)
jmp 0x5ea5
movq 0x48(%rsp), %rdi
leaq 0xa8(%rsp), %rsi
callq 0x2120
movq %rax, 0x40(%rsp)
jmp 0x5ebe
movq 0x40(%rsp), %rdi
movq (%rdi), %rax
movq -0x18(%rax), %rax
addq %rax, %rdi
callq 0x2210
movb %al, 0x3f(%rsp)
jmp 0x5ed8
movb 0x3f(%rsp), %al
testb $0x1, %al
jne 0x5ee5
jmp 0x5f94
leaq 0x1e354(%rip), %rdi     # 0x24240
leaq 0x234(%rsp), %rsi
callq 0x8c60
movq %rax, 0x30(%rsp)
jmp 0x5f00
leaq 0xac(%rsp), %rdi
leaq 0xa8(%rsp), %rsi
callq 0x8d80
movq %rax, 0x28(%rsp)
jmp 0x5f1c
movq 0x30(%rsp), %rdi
movq 0x28(%rsp), %rax
movq %rax, 0x9c(%rsp)
leaq 0x9c(%rsp), %rsi
callq 0x8d50
jmp 0x5f3d
jmp 0x5e70
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x260(%rsp)
movl %eax, 0x25c(%rsp)
jmp 0x60b4
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x260(%rsp)
movl %eax, 0x25c(%rsp)
jmp 0x5fc4
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x260(%rsp)
movl %eax, 0x25c(%rsp)
leaq 0xb0(%rsp), %rdi
callq 0x20d0
jmp 0x5fc4
leaq 0xb0(%rsp), %rdi
callq 0x20d0
jmp 0x5df8
leaq 0x268(%rsp), %rdi
callq 0x2060
jmp 0x5fb5
leaq 0x238(%rsp), %rdi
callq 0x2130
jmp 0x5fd6
leaq 0x238(%rsp), %rdi
callq 0x2130
jmp 0x60b4
leaq 0x1e263(%rip), %rdi     # 0x24240
callq 0x8db0
incq %rax
movq %rax, 0x18(%rsp)
movl $0xf4240, 0x7c(%rsp)    # imm = 0xF4240
leaq 0x7b(%rsp), %rdi
movq %rdi, 0x20(%rsp)
callq 0x83d0
movq 0x18(%rsp), %rsi
movq 0x20(%rsp), %rcx
leaq 0x80(%rsp), %rdi
leaq 0x7c(%rsp), %rdx
callq 0x86a0
jmp 0x601f
leaq 0x1e24a(%rip), %rdi     # 0x24270
movq %rdi, 0x10(%rsp)
leaq 0x80(%rsp), %rsi
movq %rsi, 0x8(%rsp)
callq 0x8720
movq 0x8(%rsp), %rdi
callq 0x8300
leaq 0x7b(%rsp), %rdi
callq 0x8470
movq 0x10(%rsp), %rdi
movl $0x1, %esi
callq 0x84b0
movl $0x0, (%rax)
movl $0x1, 0x74(%rsp)
leaq 0x1e213(%rip), %rdi     # 0x24288
leaq 0x74(%rsp), %rsi
callq 0x8dc0
jmp 0x6081
leaq 0x268(%rsp), %rdi
callq 0x2080
addq $0x478, %rsp            # imm = 0x478
retq
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x260(%rsp)
movl %eax, 0x25c(%rsp)
leaq 0x7b(%rsp), %rdi
callq 0x8470
leaq 0x268(%rsp), %rdi
callq 0x2080
movq 0x260(%rsp), %rdi
callq 0x2330
nop