// File: /workspace/github_c_makefile_star2_O0/MAGI003769[P]EE450-Socket-Project/serverC.c
// Function: dijkstra
float dijkstra(int V, float graph[V][V], int src, int target, char *path, int *vtx_set) 
{ 
      
    // The output array. dist[i] 
    // will hold the shortest 
    // distance from src to i 
    float dist[V];  
  
    // sptSet[i] will true if vertex 
    // i is included / in shortest 
    // path tree or shortest distance  
    // from src to i is finalized 
    bool sptSet[V]; 
  
    // Parent array to store 
    // shortest path tree 
    int parent[V]; 
  
    // Initialize all distances as  
    // INFINITE and stpSet[] as false 
    for (int i = 0; i < V; i++) 
    { 
        parent[src] = -1; 
        dist[i] = FLT_MAX; 
        sptSet[i] = false; 
    } 
  
    // Distance of source vertex  
    // from itself is always 0 
    dist[src] = 0; 
  
    // Find shortest path 
    // for all vertices 
    for (int count = 0; count < V - 1; count++) 
    { 
        // Pick the minimum distance 
        // vertex from the set of 
        // vertices not yet processed.  
        // u is always equal to src 
        // in first iteration. 
        int u = minDistance(dist, sptSet, V); 
  
        // Mark the picked vertex  
        // as processed 
        sptSet[u] = true; 
  
        // Update dist value of the  
        // adjacent vertices of the 
        // picked vertex. 
        for (int v = 0; v < V; v++) 
  
            // Update dist[v] only if is 
            // not in sptSet, there is 
            // an edge from u to v, and  
            // total weight of path from 
            // src to v through u is smaller 
            // than current value of 
            // dist[v] 
            if (!sptSet[v] && graph[u][v] && 
                dist[u] + graph[u][v] < dist[v]) 
            { 
                parent[v] = u; 
                dist[v] = dist[u] + graph[u][v]; 
            }  
    } 
  
    // print the constructed 
    // distance array 
    //printSolution(src, dist, V, parent); 
    //selectivePrintSolution(target, dist, parent);

    get_path2(path, src, target, parent, vtx_set);

    return dist[target];
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x80, %rsp
movl %edi, -0x4(%rbp)
movq %rsi, -0x10(%rbp)
movl %edx, -0x14(%rbp)
movl %ecx, -0x18(%rbp)
movq %r8, -0x20(%rbp)
movq %r9, -0x28(%rbp)
movl -0x4(%rbp), %eax
movq %rax, -0x78(%rbp)
movq %rsp, %rcx
movq %rcx, -0x30(%rbp)
leaq 0xf(,%rax,4), %rdx
andq $-0x10, %rdx
movq %rsp, %rcx
subq %rdx, %rcx
movq %rcx, -0x70(%rbp)
movq %rcx, %rsp
movq %rax, -0x38(%rbp)
movl -0x4(%rbp), %eax
movq %rax, %rdx
addq $0xf, %rdx
andq $-0x10, %rdx
movq %rsp, %rcx
subq %rdx, %rcx
movq %rcx, -0x68(%rbp)
movq %rcx, %rsp
movq %rax, -0x40(%rbp)
movl -0x4(%rbp), %eax
leaq 0xf(,%rax,4), %rdx
andq $-0x10, %rdx
movq %rsp, %rcx
subq %rdx, %rcx
movq %rcx, -0x60(%rbp)
movq %rcx, %rsp
movq %rax, -0x48(%rbp)
movl $0x0, -0x4c(%rbp)
movl -0x4c(%rbp), %eax
cmpl -0x4(%rbp), %eax
jge 0x1a04
movq -0x68(%rbp), %rax
movq -0x70(%rbp), %rcx
movq -0x60(%rbp), %rdx
movslq -0x14(%rbp), %rsi
movl $0xffffffff, (%rdx,%rsi,4) # imm = 0xFFFFFFFF
movslq -0x4c(%rbp), %rdx
movss 0x1618(%rip), %xmm0     # 0x3004
movss %xmm0, (%rcx,%rdx,4)
movslq -0x4c(%rbp), %rcx
movb $0x0, (%rax,%rcx)
movl -0x4c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x4c(%rbp)
jmp 0x19c1
movq -0x70(%rbp), %rax
movslq -0x14(%rbp), %rcx
xorps %xmm0, %xmm0
movss %xmm0, (%rax,%rcx,4)
movl $0x0, -0x50(%rbp)
movl -0x50(%rbp), %eax
movl -0x4(%rbp), %ecx
subl $0x1, %ecx
cmpl %ecx, %eax
jge 0x1b3d
movq -0x68(%rbp), %rsi
movq -0x70(%rbp), %rdi
movl -0x4(%rbp), %edx
callq 0x16e0
movl %eax, %ecx
movq -0x68(%rbp), %rax
movl %ecx, -0x54(%rbp)
movslq -0x54(%rbp), %rcx
movb $0x1, (%rax,%rcx)
movl $0x0, -0x58(%rbp)
movl -0x58(%rbp), %eax
cmpl -0x4(%rbp), %eax
jge 0x1b2d
movq -0x68(%rbp), %rax
movslq -0x58(%rbp), %rcx
testb $0x1, (%rax,%rcx)
jne 0x1b1d
movq -0x78(%rbp), %rdx
movq -0x10(%rbp), %rax
movslq -0x54(%rbp), %rcx
imulq %rdx, %rcx
shlq $0x2, %rcx
addq %rcx, %rax
movslq -0x58(%rbp), %rcx
movss (%rax,%rcx,4), %xmm0
xorps %xmm1, %xmm1
ucomiss %xmm1, %xmm0
jne 0x1a9e
jp 0x1a9e
jmp 0x1b1d
movq -0x70(%rbp), %rax
movq -0x78(%rbp), %rsi
movslq -0x54(%rbp), %rcx
movss (%rax,%rcx,4), %xmm1
movq -0x10(%rbp), %rcx
movslq -0x54(%rbp), %rdx
imulq %rsi, %rdx
shlq $0x2, %rdx
addq %rdx, %rcx
movslq -0x58(%rbp), %rdx
addss (%rcx,%rdx,4), %xmm1
movslq -0x58(%rbp), %rcx
movss (%rax,%rcx,4), %xmm0
ucomiss %xmm1, %xmm0
jbe 0x1b1d
movq -0x70(%rbp), %rax
movq -0x78(%rbp), %rsi
movq -0x60(%rbp), %rcx
movl -0x54(%rbp), %edi
movslq -0x58(%rbp), %rdx
movl %edi, (%rcx,%rdx,4)
movslq -0x54(%rbp), %rcx
movss (%rax,%rcx,4), %xmm0
movq -0x10(%rbp), %rcx
movslq -0x54(%rbp), %rdx
imulq %rsi, %rdx
shlq $0x2, %rdx
addq %rdx, %rcx
movslq -0x58(%rbp), %rdx
addss (%rcx,%rdx,4), %xmm0
movslq -0x58(%rbp), %rcx
movss %xmm0, (%rax,%rcx,4)
jmp 0x1b1f
movl -0x58(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x58(%rbp)
jmp 0x1a54
jmp 0x1b2f
movl -0x50(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x50(%rbp)
jmp 0x1a1b
movq -0x60(%rbp), %rcx
movq -0x20(%rbp), %rdi
movl -0x14(%rbp), %esi
movl -0x18(%rbp), %edx
movq -0x28(%rbp), %r8
callq 0x18d0
movq -0x70(%rbp), %rax
movslq -0x18(%rbp), %rcx
movss (%rax,%rcx,4), %xmm0
movq -0x30(%rbp), %rax
movq %rax, %rsp
movq %rbp, %rsp
popq %rbp
retq
nopl (%rax)