user: 请将这段汇编代码片段转换成等效的C代码:

```asm
<dijsktra>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x678,%rsp
  mov    %edx,0xc(%rsp)
  mov    %fs:0x28,%rax
  mov    %rax,0x668(%rsp)
  xor    %eax,%eax
  test   %esi,%esi
  jle    L153
  lea    0x20(%rsp),%rbp
  lea    -0x1(%rsi),%edx
  mov    %rdi,%r13
  mov    %esi,%ebx
  mov    %rbp,%rax
  lea    0x24(%rsp,%rdx,4),%rdx
  nopl   0x0(%rax)
L36:
  movl   $0x270f,(%rax)
  add    $0x4,%rax
  cmp    %rdx,%rax
  jne    L36
  mov    %ebx,%r12d
  lea    0x1b0(%rsp),%rax
  mov    $0xff,%esi
  shl    $0x2,%r12
  mov    %rax,%rdi
  mov    %rax,0x18(%rsp)
  mov    %r12,%rdx
  call   <memset@plt>
  lea    0x340(%rsp),%rcx
  mov    %r12,%rdx
  xor    %esi,%esi
  mov    %rcx,%rdi
  movslq %ebx,%r12
  call   <memset@plt>
  xor    %r8d,%r8d
  mov    %rax,%rcx
  movslq 0xc(%rsp),%rax
  movl   $0x0,0x20(%rsp,%rax,4)
  mov    %eax,0x1b0(%rsp,%rax,4)
  nopl   (%rax)
L119:
  test   %ebx,%ebx
  jle    L153
  xor    %eax,%eax
  xor    %edi,%edi
  mov    $0x270f,%esi
  nopl   0x0(%rax)
L12:
  mov    0x0(%rbp,%rax,4),%edx
  cmp    %esi,%edx
  jge    L102
  mov    (%rcx,%rax,4),%r11d
  test   %r11d,%r11d
  cmove  %eax,%edi
  cmove  %edx,%esi
L102:
  add    $0x1,%rax
  cmp    %r12,%rax
  jne    L12
  movslq %edi,%r9
  movl   $0x1,0x340(%rsp,%r9,4)
  lea    (%r9,%r9,4),%rax
  lea    (%rax,%rax,4),%rsi
  xor    %eax,%eax
  shl    $0x4,%rsi
  add    %r13,%rsi
  xchg   %ax,%ax
L170:
  mov    (%rsi,%rax,4),%edx
  add    0x20(%rsp,%r9,4),%edx
  cmp    0x0(%rbp,%rax,4),%edx
  jge    L49
  mov    (%rcx,%rax,4),%r10d
  test   %r10d,%r10d
  jne    L49
  mov    %edx,0x0(%rbp,%rax,4)
  mov    0x18(%rsp),%rdx
  mov    %edi,(%rdx,%rax,4)
L49:
  add    $0x1,%rax
  cmp    %r12,%rax
  jne    L170
  add    $0x1,%r8d
  cmp    %r8d,%ebx
  jge    L119
  lea    0x4d0(%rsp),%rax
  xor    %r15d,%r15d
  lea    D6(%rip),%r13
  mov    %rax,0x10(%rsp)
  lea    D14(%rip),%r14
  jmp    L169
L96:
  add    $0x1,%r15
  cmp    %r12,%r15
  je     L153
  cs nopw 0x0(%rax,%rax,1)
L169:
  mov    %r15d,%edx
  cmp    %r15d,0xc(%rsp)
  je     L96
  mov    0xc(%rsp),%ebx
  mov    0x0(%rbp,%r15,4),%ecx
  lea    D0(%rip),%rdi
  xor    %eax,%eax
  mov    %ebx,%esi
  call   <printf@plt>
  mov    0x10(%rsp),%rdi
  xor    %eax,%eax
  mov    $0x32,%ecx
  rep stos %rax,%es:(%rdi)
  mov    0x18(%rsp),%rax
  mov    %r15d,0x4d0(%rsp)
  movslq (%rax,%r15,4),%rax
  cmp    %eax,%ebx
  je     L79
  mov    $0x1,%edx
L64:
  mov    0x10(%rsp),%rcx
  movslq %edx,%rbx
  mov    %eax,(%rcx,%rdx,4)
  movslq 0x1b0(%rsp,%rax,4),%rax
  add    $0x1,%rdx
  cmp    0xc(%rsp),%eax
  jne    L64
  lea    0x1(%rbx),%eax
L28:
  mov    0xc(%rsp),%ecx
  cltq
  mov    %r13,%rdi
  mov    %ecx,0x4d0(%rsp,%rax,4)
  mov    %ecx,%esi
  xor    %eax,%eax
  call   <printf@plt>
  mov    0x10(%rsp),%rax
  lea    (%rax,%rbx,4),%rbx
  lea    0x4cc(%rsp),%rax
  mov    %rax,(%rsp)
L6:
  mov    %r14,%rdi
  xor    %eax,%eax
  sub    $0x4,%rbx
  call   <printf@plt>
  mov    0x4(%rbx),%esi
  mov    %r13,%rdi
  xor    %eax,%eax
  call   <printf@plt>
  cmp    (%rsp),%rbx
  jne    L6
  mov    $0xa,%edi
  add    $0x1,%r15
  call   <putchar@plt>
  cmp    %r12,%r15
  jne    L169
L153:
  mov    0x668(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L1
  add    $0x678,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
L79:
  mov    $0x1,%eax
  xor    %ebx,%ebx
  jmp    L28
L1:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: unpack_data
arguments: label: D6
type_infered: string
name: unpack_data
arguments: label: D14
type_infered: string
name: unpack_data
arguments: label: D0
type_infered: string

tool: D6: %d 

tool: D14: -> 

tool: D0: Path %d to %d : cost : %d : Path : 

assistant: ```c
void dijsktra(int cost[100][100], int N, int source) {
  int dist[100], predecessor[100], visited[100];
  int i, count;
  for (i = 0; i < N; i++) {
    dist[i] = 9999;
    predecessor[i] = -1;
    visited[i] = 0;
  }
  dist[source] = 0;
  predecessor[source] = source;
  count = 0;
  while (count <= N) {
    int min = 9999, u = 0;
    for (i = 0; i < N; i++) {
      if (dist[i] < min && !visited[i]) {
        min = dist[i];
        u = i;
      }
    }
    visited[u] = 1;
    for (i = 0; i < N; i++) {
      if (dist[u] + cost[u][i] < dist[i] && !visited[i]) {
        dist[i] = dist[u] + cost[u][i];
        predecessor[i] = u;
      }
    }
    count++;
  }
  for (i = 0; i < N; i++) {
    if (i != source) {
      printf("Path %d to %d : cost : %d : Path : ", source, i, dist[i]);
      int path[100] = {0}, top = -1, j = i;
      path[++top] = i;
      while (predecessor[j] != source) {
        j = predecessor[j];
        path[++top] = j;
      }
      path[++top] = source;
      while (top != -1) {
        printf("%d ", path[top--]);
        if (top != -1)
          printf("-> ");
      }
      printf("\n");
    }
  }
}
```