// File: yogesh1q2w[P]Dynamic-Graph-Algorithms/SPT.cpp
// Function: SPT::build_static_SPT()
void SPT::build_static_SPT() {

    dist.resize(vertices.size());
    fill(dist.begin(),dist.end(),INF);
    spt.resize(vertices.size());
    fill(spt.begin(),spt.end(),make_pair(-1,-1));
    priority_queue<pair<int,int>, vector <pair<int,int>> , greater<pair<int,int>> > pq; 
    pq.push(make_pair(0, source)); 
    dist[source] = 0; 
    spt[source] = make_pair(-1,-1);
  
    while (!pq.empty()) 
    {
        int u = pq.top().second; 
        pq.pop(); 
  
        for (auto &v : adj[u]) 
        {
            int wt = weight[make_pair(u,v)]; 
  
            if (dist[v] > dist[u] + wt) 
            {
                dist[v] = dist[u] + wt;
                spt[v] = make_pair(u,wt);
                pq.push(make_pair(dist[v], v));
            }
        } 
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x160, %rsp            # imm = 0x160
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rdi
movq %rdi, -0xe0(%rbp)
movq %rdi, %rax
addq $0xf8, %rax
movq %rax, -0xf8(%rbp)
addq $0x40, %rdi
movq %rdi, -0xf0(%rbp)
callq 0x14f00
movq -0xf8(%rbp), %rdi
movq %rax, %rsi
callq 0x1ff20
movq -0xf8(%rbp), %rdi
callq 0x1fff0
movq -0xf8(%rbp), %rdi
movq %rax, -0x10(%rbp)
callq 0x20020
movq %rax, -0x18(%rbp)
movl $0x3f3f3f3f, -0x1c(%rbp) # imm = 0x3F3F3F3F
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
leaq -0x1c(%rbp), %rdx
callq 0x1ffb0
movq -0xf0(%rbp), %rdi
movq -0xe0(%rbp), %rax
addq $0xe0, %rax
movq %rax, -0xe8(%rbp)
callq 0x14f00
movq -0xe8(%rbp), %rdi
movq %rax, %rsi
callq 0x20050
movq -0xe8(%rbp), %rdi
callq 0x15280
movq -0xe8(%rbp), %rdi
movq %rax, -0x28(%rbp)
callq 0x152b0
movq %rax, -0x30(%rbp)
movl $0xffffffff, -0x3c(%rbp) # imm = 0xFFFFFFFF
movl $0xffffffff, -0x40(%rbp) # imm = 0xFFFFFFFF
leaq -0x3c(%rbp), %rdi
leaq -0x40(%rbp), %rsi
callq 0x20120
movq %rax, -0x38(%rbp)
movq -0x28(%rbp), %rdi
movq -0x30(%rbp), %rsi
leaq -0x38(%rbp), %rdx
callq 0x200e0
leaq -0x60(%rbp), %rdi
callq 0x14ed0
movq -0xe0(%rbp), %rsi
movl $0x0, -0x6c(%rbp)
leaq -0x6c(%rbp), %rdi
callq 0x150f0
movq %rax, -0xd8(%rbp)
jmp 0x1d919
movq -0xd8(%rbp), %rax
movq %rax, -0x68(%rbp)
leaq -0x60(%rbp), %rdi
leaq -0x68(%rbp), %rsi
callq 0x150a0
jmp 0x1d933
movq -0xe0(%rbp), %rax
movq %rax, %rdi
addq $0xf8, %rdi
movslq (%rax), %rsi
callq 0x15120
movl $0x0, (%rax)
movl $0xffffffff, -0x88(%rbp) # imm = 0xFFFFFFFF
movl $0xffffffff, -0x8c(%rbp) # imm = 0xFFFFFFFF
leaq -0x88(%rbp), %rdi
leaq -0x8c(%rbp), %rsi
callq 0x20120
movq %rax, -0x100(%rbp)
jmp 0x1d982
movq -0xe0(%rbp), %rax
movq -0x100(%rbp), %rcx
movq %rcx, -0x84(%rbp)
movq %rax, %rdi
addq $0xe0, %rdi
movslq (%rax), %rsi
callq 0x20150
movq %rax, %rdi
leaq -0x84(%rbp), %rsi
callq 0x1cec0
leaq -0x60(%rbp), %rdi
callq 0x15140
movb %al, -0x101(%rbp)
jmp 0x1d9c9
movb -0x101(%rbp), %al
xorb $-0x1, %al
testb $0x1, %al
jne 0x1d9da
jmp 0x1dc77
leaq -0x60(%rbp), %rdi
callq 0x15160
movq %rax, -0x110(%rbp)
jmp 0x1d9ec
movq -0x110(%rbp), %rax
movl 0x4(%rax), %eax
movl %eax, -0x90(%rbp)
leaq -0x60(%rbp), %rdi
callq 0x15180
jmp 0x1da07
movq -0xe0(%rbp), %rdi
addq $0x70, %rdi
leaq -0x90(%rbp), %rsi
callq 0x1fe50
movq %rax, -0x118(%rbp)
jmp 0x1da27
movq -0x118(%rbp), %rax
movq %rax, -0x98(%rbp)
movq -0x98(%rbp), %rdi
callq 0x1fff0
movq %rax, -0xa0(%rbp)
movq -0x98(%rbp), %rdi
callq 0x20020
movq %rax, -0xa8(%rbp)
leaq -0xa0(%rbp), %rdi
leaq -0xa8(%rbp), %rsi
callq 0x20170
testb $0x1, %al
jne 0x1da77
jmp 0x1dc72
leaq -0xa0(%rbp), %rdi
callq 0x201b0
movq %rax, %rcx
movq -0xe0(%rbp), %rax
movq %rcx, -0xb0(%rbp)
addq $0x8, %rax
movq %rax, -0x128(%rbp)
movq -0xb0(%rbp), %rsi
leaq -0x90(%rbp), %rdi
callq 0x3520
movq %rax, -0x120(%rbp)
jmp 0x1dabb
movq -0x128(%rbp), %rdi
movq -0x120(%rbp), %rax
movq %rax, -0xbc(%rbp)
leaq -0xbc(%rbp), %rsi
callq 0x14aa0
movq %rax, -0x130(%rbp)
jmp 0x1dae5
movq -0xe0(%rbp), %rdi
movq -0x130(%rbp), %rax
movl (%rax), %eax
movl %eax, -0xb4(%rbp)
addq $0xf8, %rdi
movq -0xb0(%rbp), %rax
movslq (%rax), %rsi
callq 0x15120
movq -0xe0(%rbp), %rdi
movl (%rax), %eax
movl %eax, -0x134(%rbp)
addq $0xf8, %rdi
movslq -0x90(%rbp), %rsi
callq 0x15120
movq %rax, %rcx
movl -0x134(%rbp), %eax
movl (%rcx), %ecx
addl -0xb4(%rbp), %ecx
cmpl %ecx, %eax
jle 0x1dc5f
movq -0xe0(%rbp), %rdi
addq $0xf8, %rdi
movq %rdi, -0x150(%rbp)
movslq -0x90(%rbp), %rsi
callq 0x15120
movq -0x150(%rbp), %rdi
movl (%rax), %eax
movl -0xb4(%rbp), %ecx
addl %ecx, %eax
movl %eax, -0x144(%rbp)
movq -0xb0(%rbp), %rax
movslq (%rax), %rsi
callq 0x15120
movl -0x144(%rbp), %ecx
movl %ecx, (%rax)
leaq -0x90(%rbp), %rdi
leaq -0xb4(%rbp), %rsi
callq 0x3520
movq %rax, -0x140(%rbp)
jmp 0x1dbb7
movq -0xe0(%rbp), %rdi
movq -0x140(%rbp), %rax
movq %rax, -0xc4(%rbp)
addq $0xe0, %rdi
movq -0xb0(%rbp), %rax
movslq (%rax), %rsi
callq 0x20150
movq %rax, %rdi
leaq -0xc4(%rbp), %rsi
callq 0x1cec0
movq -0xe0(%rbp), %rdi
addq $0xf8, %rdi
movq -0xb0(%rbp), %rax
movslq (%rax), %rsi
callq 0x15120
movq %rax, %rdi
movq -0xb0(%rbp), %rsi
callq 0x3520
movq %rax, -0x158(%rbp)
jmp 0x1dc26
movq -0x158(%rbp), %rax
movq %rax, -0xcc(%rbp)
leaq -0x60(%rbp), %rdi
leaq -0xcc(%rbp), %rsi
callq 0x150a0
jmp 0x1dc46
jmp 0x1dc5f
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x78(%rbp)
movl %eax, -0x7c(%rbp)
leaq -0x60(%rbp), %rdi
callq 0x15500
jmp 0x1dc89
jmp 0x1dc61
leaq -0xa0(%rbp), %rdi
callq 0x201d0
jmp 0x1da5b
jmp 0x1d9b8
leaq -0x60(%rbp), %rdi
callq 0x15500
addq $0x160, %rsp            # imm = 0x160
popq %rbp
retq
movq -0x78(%rbp), %rdi
callq 0x2250
nopw %cs:(%rax,%rax)