user: 请从给定的汇编指令推导出C源代码:

```asm
<main>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  lea    -0x9000(%rsp),%r11
L78:
  sub    $0x1000,%rsp
  orq    $0x0,(%rsp)
  cmp    %r11,%rsp
  jne    L78
  sub    $0xf88,%rsp
  mov    $0x32,%ecx
  lea    D8(%rip),%r15
  mov    %fs:0x28,%rax
  mov    %rax,0x9f78(%rsp)
  xor    %eax,%eax
  lea    0x1a0(%rsp),%rbp
  mov    %rbp,%rdi
  rep stos %rax,%es:(%rdi)
  lea    D9(%rip),%rdi
  call   <printf@plt>
  lea    0x4(%rsp),%rsi
  mov    %r15,%rdi
  call   <scanf@plt>
  lea    D50(%rip),%rdi
  xor    %eax,%eax
  call   <printf@plt>
  lea    0xc(%rsp),%rsi
  mov    %r15,%rdi
  call   <scanf@plt>
  mov    0xc(%rsp),%eax
  lea    D19(%rip),%rdi
  sub    $0x1,%eax
  cltq
  movl   $0x1,0x1a0(%rsp,%rax,4)
  xor    %eax,%eax
  call   <printf@plt>
  mov    0x4(%rsp),%ecx
  test   %ecx,%ecx
  jle    L53
  xor    %r13d,%r13d
  xor    %ebx,%ebx
  lea    0x330(%rsp),%r14
  nopw   0x0(%rax,%rax,1)
L12:
  movl   $0x0,0x8(%rsp)
  test   %ecx,%ecx
  jle    L139
  movslq %ebx,%rdx
  xor    %eax,%eax
  lea    (%rdx,%rdx,4),%rdx
  lea    (%rdx,%rdx,4),%r12
  shl    $0x2,%r12
  nopl   0x0(%rax)
L161:
  cltq
  mov    %r15,%rdi
  add    %r13,%rax
  lea    (%r14,%rax,4),%rsi
  call   <scanf@plt>
  movslq 0x8(%rsp),%rcx
  lea    (%r12,%rcx,1),%rdx
  mov    %rcx,%rax
  mov    0x330(%rsp,%rdx,4),%esi
  test   %esi,%esi
  jne    L164
  cmp    %ebx,%ecx
  je     L164
  movl   $0x270f,0x330(%rsp,%rdx,4)
L164:
  mov    0xc(%rsp),%edi
  lea    -0x1(%rdi),%edx
  cmp    %ebx,%edx
  jne    L135
  lea    (%r12,%rcx,1),%rdx
  mov    0x330(%rsp,%rdx,4),%edx
  mov    %edx,0x10(%rsp,%rcx,4)
L135:
  mov    0x4(%rsp),%ecx
  add    $0x1,%eax
  mov    %eax,0x8(%rsp)
  cmp    %ecx,%eax
  jl     L161
  add    $0x1,%ebx
  add    $0x64,%r13
  cmp    %ebx,%ecx
  jg     L12
  nopw   0x0(%rax,%rax,1)
L139:
  cmp    $0x1,%ecx
  jle    L53
  mov    $0x1,%r10d
  lea    0x330(%rsp),%r11
  movslq %ecx,%rdi
  lea    0x10(%rsp),%r8
  nop
L19:
  xor    %eax,%eax
  xor    %esi,%esi
  nopl   0x0(%rax)
L4:
  cmpl   $0x1,0x0(%rbp,%rax,4)
  je     L147
  mov    0x10(%rsp,%rsi,4),%ebx
  cmp    %ebx,(%r8,%rax,4)
  jge    L147
  movslq %eax,%rsi
L147:
  add    $0x1,%rax
  cmp    %rdi,%rax
  jne    L4
  movl   $0x1,0x1a0(%rsp,%rsi,4)
  lea    (%rsi,%rsi,4),%rax
  lea    (%rax,%rax,4),%r9
  xor    %eax,%eax
  shl    $0x4,%r9
  add    %r11,%r9
  nopl   0x0(%rax)
L42:
  cmpl   $0x1,0x0(%rbp,%rax,4)
  je     L90
  mov    (%r9,%rax,4),%edx
  add    0x10(%rsp,%rsi,4),%edx
  cmp    %edx,(%r8,%rax,4)
  jle    L90
  mov    %edx,(%r8,%rax,4)
L90:
  add    $0x1,%rax
  cmp    %rdi,%rax
  jne    L42
  add    $0x1,%r10d
  cmp    %ecx,%r10d
  jne    L19
  mov    %r10d,0x8(%rsp)
L53:
  lea    D29(%rip),%rdi
  xor    %eax,%eax
  call   <printf@plt>
  lea    0x8(%rsp),%rsi
  mov    %r15,%rdi
  call   <scanf@plt>
  mov    0x8(%rsp),%eax
  lea    D5(%rip),%rdi
  sub    $0x1,%eax
  cltq
  mov    0x10(%rsp,%rax,4),%esi
  xor    %eax,%eax
  call   <printf@plt>
  mov    0x9f78(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L85
  add    $0x9f88,%rsp
  xor    %eax,%eax
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
L85:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: retrieve_data
arguments: data_label: D8
type: string
name: retrieve_data
arguments: data_label: D9
type: string
name: retrieve_data
arguments: data_label: D50
type: string
name: retrieve_data
arguments: data_label: D19
type: string
name: retrieve_data
arguments: data_label: D29
type: string
name: retrieve_data
arguments: data_label: D5
type: string

tool: D8: %d

tool: D9: 
Enter the no. of vertices 

tool: D50: 
Enter the source vertex 

tool: D19: 
Enter the cost matrix 

tool: D29: 
Enter the final vertex 

tool: D5: 
The shortest distance is %d 

assistant: ```c
int main() {
  int n, i, j, a[100][100], dist[100], src, sel[100] = {0}, min;
  printf("\nEnter the no. of vertices ");
  scanf("%d", &n);
  printf("\nEnter the source vertex ");
  scanf("%d", &src);
  sel[src - 1] = 1;
  printf("\nEnter the cost matrix ");
  for (i = 0; i < n; i++)
    for (j = 0; j < n; j++) {
      scanf("%d", &a[i][j]);
      if (a[i][j] == 0 && i != j)
        a[i][j] = 9999;
      if (i == (src - 1))
        dist[j] = a[i][j];
    }
  for (i = 1; i < n; i++) {
    min = 0;
    for (j = 0; j < n; j++) {
      if (sel[j] != 1 && dist[j] < dist[min]) {
        min = j;
      }
    }
    sel[min] = 1;
    for (j = 0; j < n; j++)
      if (sel[j] != 1 && dist[j] > dist[min] + a[min][j])
        dist[j] = dist[min] + a[min][j];
  }
  printf("\nEnter the final vertex ");
  scanf("%d", &j);
  printf("\nThe shortest distance is %d ", dist[j - 1]);
  return 0;
}
```