// File: yogesh1q2w[P]Dynamic-Graph-Algorithms/MST.cpp
// Function: MST::build_static_MST()
void MST::build_static_MST() {
	priority_queue< pair<int,int>, vector <pair<int,int>> , greater<pair<int,int>> > pq; 
    int src = 0;
    vector<int> key(vertices.size(), INF); 
  	vector<int> parent(vertices.size(), -1); 
  	vector<bool> inMST(vertices.size(), false); 
  	pq.push(make_pair(0, src)); 
    key[src] = 0; 
    while(!pq.empty()) { 
    	int u = pq.top().second; 
        pq.pop(); 
  		inMST[u] = true;
        for(auto &i:adj_list[u]) {
            int v = i.first; 
            int weight = i.second; 
  		    if(inMST[v] == false && key[v] > weight) { 
                key[v] = weight; 
                pq.push(make_pair(key[v], v)); 
                parent[v] = u; 
        	} 
        } 
    } 
	for(int i = 1; i < vertices.size(); ++i) {
		min_spf[0].link(i, parent[i]);
		add_edge_level(i, parent[i], 0, true);
	}
	for(auto &u:adj_list) {
		for(auto &v:u.second) {
			if(parent[u.first] != v.first && parent[v.first] != u.first) 
				add_edge_level(u.first, v.first , 0, false);
		}
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x210, %rsp            # imm = 0x210
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x170(%rbp)
leaq -0x28(%rbp), %rdi
callq 0x14ed0
movq -0x170(%rbp), %rdi
movl $0x0, -0x2c(%rbp)
addq $0x38, %rdi
callq 0x14f00
movq %rax, -0x168(%rbp)
movl $0x3f3f3f3f, -0x4c(%rbp) # imm = 0x3F3F3F3F
leaq -0x4d(%rbp), %rdi
movq %rdi, -0x160(%rbp)
callq 0x14f20
movq -0x168(%rbp), %rsi
movq -0x160(%rbp), %rcx
leaq -0x48(%rbp), %rdi
leaq -0x4c(%rbp), %rdx
callq 0x14f40
jmp 0x14315
leaq -0x4d(%rbp), %rdi
callq 0x14fc0
movq -0x170(%rbp), %rdi
addq $0x38, %rdi
callq 0x14f00
movq %rax, -0x180(%rbp)
movl $0xffffffff, -0x7c(%rbp) # imm = 0xFFFFFFFF
leaq -0x7d(%rbp), %rdi
movq %rdi, -0x178(%rbp)
callq 0x14f20
movq -0x180(%rbp), %rsi
movq -0x178(%rbp), %rcx
leaq -0x78(%rbp), %rdi
leaq -0x7c(%rbp), %rdx
callq 0x14f40
jmp 0x14369
leaq -0x7d(%rbp), %rdi
callq 0x14fc0
movq -0x170(%rbp), %rdi
addq $0x38, %rdi
callq 0x14f00
movq %rax, -0x190(%rbp)
movb $0x0, -0xa9(%rbp)
leaq -0xaa(%rbp), %rdi
movq %rdi, -0x188(%rbp)
callq 0x14fe0
movq -0x190(%rbp), %rsi
movq -0x188(%rbp), %rcx
leaq -0xa8(%rbp), %rdi
leaq -0xa9(%rbp), %rdx
callq 0x15000
jmp 0x143c6
leaq -0xaa(%rbp), %rdi
callq 0x15080
movl $0x0, -0xb8(%rbp)
leaq -0xb8(%rbp), %rdi
leaq -0x2c(%rbp), %rsi
callq 0x150f0
movq %rax, -0x198(%rbp)
jmp 0x143f5
movq -0x198(%rbp), %rax
movq %rax, -0xb4(%rbp)
leaq -0x28(%rbp), %rdi
leaq -0xb4(%rbp), %rsi
callq 0x150a0
jmp 0x14415
movslq -0x2c(%rbp), %rsi
leaq -0x48(%rbp), %rdi
callq 0x15120
movl $0x0, (%rax)
leaq -0x28(%rbp), %rdi
callq 0x15140
movb %al, -0x199(%rbp)
jmp 0x14439
movb -0x199(%rbp), %al
xorb $-0x1, %al
testb $0x1, %al
jne 0x1444a
jmp 0x14718
leaq -0x28(%rbp), %rdi
callq 0x15160
movq %rax, -0x1a8(%rbp)
jmp 0x1445c
movq -0x1a8(%rbp), %rax
movl 0x4(%rax), %eax
movl %eax, -0xbc(%rbp)
leaq -0x28(%rbp), %rdi
callq 0x15180
jmp 0x14477
movslq -0xbc(%rbp), %rsi
leaq -0xa8(%rbp), %rdi
callq 0x151d0
movq %rdx, -0x1b8(%rbp)
movq %rax, -0x1b0(%rbp)
jmp 0x1449a
movq -0x1b8(%rbp), %rax
movq -0x1b0(%rbp), %rcx
movq %rcx, -0xd0(%rbp)
movq %rax, -0xc8(%rbp)
leaq -0xd0(%rbp), %rdi
movl $0x1, %esi
callq 0x15230
movq -0x170(%rbp), %rdi
subq $-0x80, %rdi
leaq -0xbc(%rbp), %rsi
callq 0x14b50
movq %rax, -0x1c0(%rbp)
jmp 0x144e7
movq -0x1c0(%rbp), %rax
movq %rax, -0xd8(%rbp)
movq -0xd8(%rbp), %rdi
callq 0x15280
movq %rax, -0xe0(%rbp)
movq -0xd8(%rbp), %rdi
callq 0x152b0
movq %rax, -0xe8(%rbp)
leaq -0xe0(%rbp), %rdi
leaq -0xe8(%rbp), %rsi
callq 0x152e0
testb $0x1, %al
jne 0x14537
jmp 0x14713
leaq -0xe0(%rbp), %rdi
callq 0x15320
movq %rax, -0xf0(%rbp)
movq -0xf0(%rbp), %rax
movl (%rax), %eax
movl %eax, -0xf4(%rbp)
movq -0xf0(%rbp), %rax
movl 0x4(%rax), %eax
movl %eax, -0xf8(%rbp)
movslq -0xf4(%rbp), %rsi
leaq -0xa8(%rbp), %rdi
callq 0x151d0
movq %rdx, -0x1d0(%rbp)
movq %rax, -0x1c8(%rbp)
jmp 0x1458c
movq -0x1d0(%rbp), %rax
movq -0x1c8(%rbp), %rcx
movq %rcx, -0x108(%rbp)
movq %rax, -0x100(%rbp)
leaq -0x108(%rbp), %rdi
callq 0x15340
andb $0x1, %al
movzbl %al, %ecx
xorl %eax, %eax
cmpl $0x0, %ecx
movb %al, -0x1d1(%rbp)
jne 0x145e7
movslq -0xf4(%rbp), %rsi
leaq -0x48(%rbp), %rdi
callq 0x15120
movl (%rax), %eax
cmpl -0xf8(%rbp), %eax
setg %al
movb %al, -0x1d1(%rbp)
movb -0x1d1(%rbp), %al
testb $0x1, %al
jne 0x145f6
jmp 0x14700
movl -0xf8(%rbp), %eax
movl %eax, -0x1ec(%rbp)
movslq -0xf4(%rbp), %rsi
leaq -0x48(%rbp), %rdi
movq %rdi, -0x1e8(%rbp)
callq 0x15120
movl -0x1ec(%rbp), %ecx
movq -0x1e8(%rbp), %rdi
movl %ecx, (%rax)
movslq -0xf4(%rbp), %rsi
callq 0x15120
movq %rax, %rdi
leaq -0xf4(%rbp), %rsi
callq 0x3520
movq %rax, -0x1e0(%rbp)
jmp 0x1464c
movq -0x1e0(%rbp), %rax
movq %rax, -0x110(%rbp)
leaq -0x28(%rbp), %rdi
leaq -0x110(%rbp), %rsi
callq 0x150a0
jmp 0x1466c
movl -0xbc(%rbp), %eax
movl %eax, -0x1f0(%rbp)
movslq -0xf4(%rbp), %rsi
leaq -0x78(%rbp), %rdi
callq 0x15120
movl -0x1f0(%rbp), %ecx
movl %ecx, (%rax)
jmp 0x14700
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x58(%rbp)
movl %eax, -0x5c(%rbp)
leaq -0x4d(%rbp), %rdi
callq 0x14fc0
jmp 0x14988
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x58(%rbp)
movl %eax, -0x5c(%rbp)
leaq -0x7d(%rbp), %rdi
callq 0x14fc0
jmp 0x1497f
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x58(%rbp)
movl %eax, -0x5c(%rbp)
leaq -0xaa(%rbp), %rdi
callq 0x15080
jmp 0x14976
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x58(%rbp)
movl %eax, -0x5c(%rbp)
leaq -0xa8(%rbp), %rdi
callq 0x15480
jmp 0x14976
jmp 0x14702
leaq -0xe0(%rbp), %rdi
callq 0x15370
jmp 0x1451b
jmp 0x14428
movl $0x1, -0x114(%rbp)
movq -0x170(%rbp), %rdi
movslq -0x114(%rbp), %rax
movq %rax, -0x1f8(%rbp)
addq $0x38, %rdi
callq 0x14f00
movq %rax, %rcx
movq -0x1f8(%rbp), %rax
cmpq %rcx, %rax
jae 0x147e8
movq -0x170(%rbp), %rdi
addq $0x68, %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0xaad0
movq %rax, -0x208(%rbp)
movl -0x114(%rbp), %eax
movl %eax, -0x1fc(%rbp)
movslq %eax, %rsi
leaq -0x78(%rbp), %rdi
callq 0x15120
movq -0x208(%rbp), %rdi
movl -0x1fc(%rbp), %esi
movl (%rax), %edx
callq 0x2f30
jmp 0x1479c
movl -0x114(%rbp), %eax
movl %eax, -0x20c(%rbp)
movslq %eax, %rsi
leaq -0x78(%rbp), %rdi
callq 0x15120
movq -0x170(%rbp), %rdi
movl -0x20c(%rbp), %esi
movl (%rax), %edx
xorl %ecx, %ecx
movl $0x1, %r8d
callq 0x13420
jmp 0x147d2
jmp 0x147d4
movl -0x114(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x114(%rbp)
jmp 0x14722
movq -0x170(%rbp), %rax
addq $0x80, %rax
movq %rax, -0x120(%rbp)
movq -0x120(%rbp), %rdi
callq 0x15390
movq %rax, -0x128(%rbp)
movq -0x120(%rbp), %rdi
callq 0x153c0
movq %rax, -0x130(%rbp)
leaq -0x128(%rbp), %rdi
leaq -0x130(%rbp), %rsi
callq 0x153f0
testb $0x1, %al
jne 0x1483e
jmp 0x14946
leaq -0x128(%rbp), %rdi
callq 0x15420
movq %rax, -0x138(%rbp)
movq -0x138(%rbp), %rax
addq $0x8, %rax
movq %rax, -0x140(%rbp)
movq -0x140(%rbp), %rdi
callq 0x15280
movq %rax, -0x148(%rbp)
movq -0x140(%rbp), %rdi
callq 0x152b0
movq %rax, -0x150(%rbp)
leaq -0x148(%rbp), %rdi
leaq -0x150(%rbp), %rsi
callq 0x152e0
testb $0x1, %al
jne 0x148a5
jmp 0x14933
leaq -0x148(%rbp), %rdi
callq 0x15320
movq %rax, -0x158(%rbp)
movq -0x138(%rbp), %rax
movslq (%rax), %rsi
leaq -0x78(%rbp), %rdi
callq 0x15120
movl (%rax), %eax
movq -0x158(%rbp), %rcx
cmpl (%rcx), %eax
je 0x14920
movq -0x158(%rbp), %rax
movslq (%rax), %rsi
leaq -0x78(%rbp), %rdi
callq 0x15120
movl (%rax), %eax
movq -0x138(%rbp), %rcx
cmpl (%rcx), %eax
je 0x14920
movq -0x170(%rbp), %rdi
movq -0x138(%rbp), %rax
movl (%rax), %esi
movq -0x158(%rbp), %rax
movl (%rax), %edx
xorl %r8d, %r8d
movl %r8d, %ecx
callq 0x13420
jmp 0x1491e
jmp 0x14920
jmp 0x14922
leaq -0x148(%rbp), %rdi
callq 0x15370
jmp 0x14889
jmp 0x14935
leaq -0x128(%rbp), %rdi
callq 0x15450
jmp 0x14822
leaq -0xa8(%rbp), %rdi
callq 0x15480
leaq -0x78(%rbp), %rdi
callq 0x154a0
leaq -0x48(%rbp), %rdi
callq 0x154a0
leaq -0x28(%rbp), %rdi
callq 0x15500
addq $0x210, %rsp            # imm = 0x210
popq %rbp
retq
leaq -0x78(%rbp), %rdi
callq 0x154a0
leaq -0x48(%rbp), %rdi
callq 0x154a0
leaq -0x28(%rbp), %rdi
callq 0x15500
movq -0x58(%rbp), %rdi
callq 0x2250
nopw (%rax,%rax)