user: Converte this assembly snippet into its equivalent C code:

```asm
<dijkstra>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0xb0,%rsp
  mov    %rdi,-0x98(%rbp)
  mov    %esi,-0x9c(%rbp)
  mov    %edx,-0xa0(%rbp)
  mov    %rcx,-0xa8(%rbp)
  mov    %r8,-0xb0(%rbp)
  mov    %fs:0x28,%rax
  mov    %rax,-0x8(%rbp)
  xor    %eax,%eax
  movl   $0x0,-0x80(%rbp)
  jmp    L88
L33:
  mov    -0x80(%rbp),%eax
  cltq
  movl   $0x0,-0x40(%rbp,%rax,4)
  mov    D6(%rip),%rax
  mov    (%rax),%edx
  mov    -0x80(%rbp),%eax
  cltq
  mov    %edx,-0x70(%rbp,%rax,4)
  addl   $0x1,-0x80(%rbp)
L88:
  cmpl   $0xb,-0x80(%rbp)
  jle    L33
  mov    -0x9c(%rbp),%eax
  cltq
  movl   $0x1,-0x40(%rbp,%rax,4)
  mov    -0x9c(%rbp),%eax
  cltq
  movl   $0x0,-0x70(%rbp,%rax,4)
  mov    -0x9c(%rbp),%eax
  mov    %eax,-0x8c(%rbp)
  jmp    L58
L32:
  mov    D6(%rip),%rax
  mov    (%rax),%eax
  mov    %eax,-0x84(%rbp)
  mov    -0x8c(%rbp),%eax
  cltq
  mov    -0x70(%rbp,%rax,4),%eax
  mov    %eax,-0x78(%rbp)
  movl   $0x0,-0x7c(%rbp)
  jmp    L46
L12:
  mov    -0x7c(%rbp),%eax
  cltq
  mov    -0x40(%rbp,%rax,4),%eax
  test   %eax,%eax
  jne    L77
  mov    -0x8c(%rbp),%eax
  movslq %eax,%rdx
  mov    %rdx,%rax
  add    %rax,%rax
  add    %rdx,%rax
  shl    $0x4,%rax
  mov    %rax,%rdx
  mov    -0x98(%rbp),%rax
  add    %rax,%rdx
  mov    -0x7c(%rbp),%eax
  cltq
  mov    (%rdx,%rax,4),%edx
  mov    -0x78(%rbp),%eax
  add    %edx,%eax
  mov    %eax,-0x74(%rbp)
  mov    -0x7c(%rbp),%eax
  cltq
  mov    -0x70(%rbp,%rax,4),%eax
  cmp    %eax,-0x74(%rbp)
  jge    L17
  mov    -0x7c(%rbp),%eax
  cltq
  mov    -0x74(%rbp),%edx
  mov    %edx,-0x70(%rbp,%rax,4)
  mov    -0x7c(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0xb0(%rbp),%rax
  add    %rax,%rdx
  mov    -0x8c(%rbp),%eax
  mov    %eax,(%rdx)
L17:
  mov    -0x7c(%rbp),%eax
  cltq
  mov    -0x70(%rbp,%rax,4),%eax
  cmp    %eax,-0x84(%rbp)
  jle    L77
  mov    -0x7c(%rbp),%eax
  cltq
  mov    -0x70(%rbp,%rax,4),%eax
  mov    %eax,-0x84(%rbp)
  mov    -0x7c(%rbp),%eax
  mov    %eax,-0x88(%rbp)
L77:
  addl   $0x1,-0x7c(%rbp)
L46:
  cmpl   $0xb,-0x7c(%rbp)
  jle    L12
  mov    -0x88(%rbp),%eax
  mov    %eax,-0x8c(%rbp)
  mov    -0x8c(%rbp),%eax
  cltq
  movl   $0x1,-0x40(%rbp,%rax,4)
L58:
  mov    -0x8c(%rbp),%eax
  cmp    -0xa0(%rbp),%eax
  jne    L32
  mov    -0xa0(%rbp),%eax
  cltq
  mov    -0x70(%rbp,%rax,4),%edx
  mov    -0xa8(%rbp),%rax
  mov    %edx,(%rax)
  nop
  mov    -0x8(%rbp),%rax
  sub    %fs:0x28,%rax
  je     L16
  call   <__stack_chk_fail@plt>
L16:
  leave
  ret
```

assistant: ```c
void dijkstra(int weight[12][12], int start, int stop, int *dist, int precede[]) {
  int distance[12], visited[12];
  int current, currentIndex, distanceCount;
  int smalldist, newdist;
  for (int i = 0; i < 12; i++) {
    visited[i] = false;
    distance[i] = INT_MAX;
  }
  visited[start] = true;
  distance[start] = 0;
  current = start;
  while (current != stop) {
    smalldist = INT_MAX;
    distanceCount = distance[current];
    for (int i = 0; i < 12; i++) {
      if (visited[i] == false) {
        newdist = distanceCount + weight[current][i];
        if (newdist < distance[i]) {
          distance[i] = newdist;
          precede[i] = current;
        }
        if (distance[i] < smalldist) {
          smalldist = distance[i];
          currentIndex = i;
        }
      }
    }
    current = currentIndex;
    visited[current] = true;
  }
  *dist = distance[stop];
}
```