// File: /workspace/github_c_makefile_star2_O0/olcaytaner[P]Isell/tests.c
// Function: ranks_from_minimum_spanning_tree
void ranks_from_minimum_spanning_tree(Graphptr mst, matrix distancematrix)
{
 double *path_lengths;
 int j, maxecc, ecc, i, visitorder, root, N;
 maxecc = 0;
 N = mst->nvertices;
 for (i = 0; i < N; i++)
  {
   ecc = eccentricity(mst, i);
   if (ecc > maxecc)
    {
     root = i;
     maxecc = ecc;
    }
  }
 path_lengths = shortest_path(mst, root);
 for (i = 0; i < N; i++)
  {
   if (mst->height[i] < path_lengths[i])
     mst->height[i] = path_lengths[i];
   j = mst->parents[i];
   while (j != -1)
    {
     if (mst->height[j] < path_lengths[i])
       mst->height[j] = path_lengths[i];
     j = mst->parents[j];
    }
  }
 safe_free(path_lengths);
 visitorder = 1;
 height_directed_preorder_traversal(mst, &visitorder, root, distancematrix);
 if (get_parameter_o("displayresulton") == ON)
  {
   printf("Visit Order\n");
   for (i = 0; i < N; i++)
     printf("%d: %d\n", i, mst->visitorder[i]);
  } 
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rsi, -0x10(%rbp)
movq %rdx, -0x8(%rbp)
movq %rdi, -0x18(%rbp)
movl $0x0, -0x28(%rbp)
movq -0x18(%rbp), %rax
movl 0xf46280(%rax), %eax
movl %eax, -0x3c(%rbp)
movl $0x0, -0x30(%rbp)
movl -0x30(%rbp), %eax
cmpl -0x3c(%rbp), %eax
jge 0xd43b7
movq -0x18(%rbp), %rdi
movl -0x30(%rbp), %esi
callq 0x26d40
movl %eax, -0x2c(%rbp)
movl -0x2c(%rbp), %eax
cmpl -0x28(%rbp), %eax
jle 0xd43aa
movl -0x30(%rbp), %eax
movl %eax, -0x38(%rbp)
movl -0x2c(%rbp), %eax
movl %eax, -0x28(%rbp)
jmp 0xd43ac
movl -0x30(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x30(%rbp)
jmp 0xd437f
movq -0x18(%rbp), %rdi
movl -0x38(%rbp), %esi
callq 0x26af0
movq %rax, -0x20(%rbp)
movl $0x0, -0x30(%rbp)
movl -0x30(%rbp), %eax
cmpl -0x3c(%rbp), %eax
jge 0xd4496
movq -0x18(%rbp), %rax
movslq -0x30(%rbp), %rcx
cvtsi2sdl 0xf44340(%rax,%rcx,4), %xmm1
movq -0x20(%rbp), %rax
movslq -0x30(%rbp), %rcx
movsd (%rax,%rcx,8), %xmm0
ucomisd %xmm1, %xmm0
jbe 0xd441a
movq -0x20(%rbp), %rax
movslq -0x30(%rbp), %rcx
cvttsd2si (%rax,%rcx,8), %edx
movq -0x18(%rbp), %rax
movslq -0x30(%rbp), %rcx
movl %edx, 0xf44340(%rax,%rcx,4)
movq -0x18(%rbp), %rax
movslq -0x30(%rbp), %rcx
movl 0xf452e0(%rax,%rcx,4), %eax
movl %eax, -0x24(%rbp)
cmpl $-0x1, -0x24(%rbp)
je 0xd4486
movq -0x18(%rbp), %rax
movslq -0x24(%rbp), %rcx
cvtsi2sdl 0xf44340(%rax,%rcx,4), %xmm1
movq -0x20(%rbp), %rax
movslq -0x30(%rbp), %rcx
movsd (%rax,%rcx,8), %xmm0
ucomisd %xmm1, %xmm0
jbe 0xd4472
movq -0x20(%rbp), %rax
movslq -0x30(%rbp), %rcx
cvttsd2si (%rax,%rcx,8), %edx
movq -0x18(%rbp), %rax
movslq -0x24(%rbp), %rcx
movl %edx, 0xf44340(%rax,%rcx,4)
movq -0x18(%rbp), %rax
movslq -0x24(%rbp), %rcx
movl 0xf452e0(%rax,%rcx,4), %eax
movl %eax, -0x24(%rbp)
jmp 0xd442c
jmp 0xd4488
movl -0x30(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x30(%rbp)
jmp 0xd43ce
movq -0x20(%rbp), %rdi
callq 0x52e80
movl $0x1, -0x34(%rbp)
movq -0x18(%rbp), %rdi
movl -0x38(%rbp), %edx
movq -0x10(%rbp), %rcx
movq -0x8(%rbp), %r8
leaq -0x34(%rbp), %rsi
callq 0xd41e0
leaq 0xeda6(%rip), %rdi      # 0xe326b
callq 0x79440
cmpl $0x1, %eax
jne 0xd4519
leaq 0x19f6b(%rip), %rdi     # 0xee441
movb $0x0, %al
callq 0x4030
movl $0x0, -0x30(%rbp)
movl -0x30(%rbp), %eax
cmpl -0x3c(%rbp), %eax
jge 0xd4517
movl -0x30(%rbp), %esi
movq -0x18(%rbp), %rax
movslq -0x30(%rbp), %rcx
movl 0xf433a0(%rax,%rcx,4), %edx
leaq 0x1803e(%rip), %rdi     # 0xec543
movb $0x0, %al
callq 0x4030
movl -0x30(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x30(%rbp)
jmp 0xd44e4
jmp 0xd4519
addq $0x40, %rsp
popq %rbp
retq
nop