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

```asm
<main>:
  endbr64
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x1a8,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,0x198(%rsp)
  xor    %eax,%eax
  mov    D24(%rip),%rax
  mov    %rsp,%r12
  movl   $0x1,0x8(%rsp)
  movl   $0x2,0x30(%rsp)
  lea    0x78(%rsp),%r8
  mov    %r12,%rdx
  mov    %rax,(%rsp)
  mov    D38(%rip),%rax
  movl   $0x0,0x58(%rsp)
  mov    %rax,0x28(%rsp)
  mov    D28(%rip),%rax
  mov    %rax,0x50(%rsp)
  mov    %r12,%rax
L503:
  mov    (%rsp),%esi
  cmp    $0x77359400,%esi
  je     L37
  mov    (%rdx),%ecx
  cmp    $0x77359400,%ecx
  je     L356
  mov    (%rax),%edi
  cmp    $0x77359400,%edi
  je     L271
  add    %ecx,%edi
  cmp    %edi,%esi
  jg     L577
L271:
  mov    0x4(%rsp),%edi
  cmp    $0x77359400,%edi
  je     L99
L536:
  mov    0x4(%rax),%esi
  cmp    $0x77359400,%esi
  je     L528
  add    %ecx,%esi
  cmp    %edi,%esi
  jl     L571
L528:
  mov    0x8(%rsp),%edi
  cmp    $0x77359400,%edi
  je     L531
L453:
  mov    0x8(%rax),%esi
  cmp    $0x77359400,%esi
  je     L531
  add    %ecx,%esi
  cmp    %edi,%esi
  jl     L368
  nopl   0x0(%rax)
L531:
  mov    0x28(%rsp),%esi
  cmp    $0x77359400,%esi
  je     L293
  mov    0x28(%rdx),%ecx
  cmp    $0x77359400,%ecx
  je     L429
  mov    (%rax),%edi
  cmp    $0x77359400,%edi
  je     L295
  add    %ecx,%edi
  cmp    %edi,%esi
  jg     L240
L295:
  mov    0x2c(%rsp),%edi
  cmp    $0x77359400,%edi
  je     L545
L507:
  mov    0x4(%rax),%esi
  cmp    $0x77359400,%esi
  je     L163
  add    %ecx,%esi
  cmp    %esi,%edi
  jg     L570
L163:
  mov    0x30(%rsp),%esi
  cmp    $0x77359400,%esi
  je     L236
L598:
  mov    0x8(%rax),%edi
  cmp    $0x77359400,%edi
  je     L236
  add    %edi,%ecx
  cmp    %ecx,%esi
  jg     L241
  nopl   0x0(%rax)
L236:
  mov    0x50(%rsp),%esi
  cmp    $0x77359400,%esi
  je     L369
  mov    0x50(%rdx),%ecx
  cmp    $0x77359400,%ecx
  je     L23
  mov    (%rax),%edi
  cmp    $0x77359400,%edi
  je     L360
  add    %ecx,%edi
  cmp    %edi,%esi
  jg     L508
L360:
  mov    0x54(%rsp),%edi
  cmp    $0x77359400,%edi
  je     L95
L372:
  mov    0x4(%rax),%esi
  cmp    $0x77359400,%esi
  je     L460
  add    %ecx,%esi
  cmp    %esi,%edi
  jg     L57
L460:
  mov    0x58(%rsp),%esi
  cmp    $0x77359400,%esi
  je     L64
L250:
  mov    0x8(%rax),%edi
  cmp    $0x77359400,%edi
  je     L64
  add    %edi,%ecx
  cmp    %ecx,%esi
  jle    L64
  mov    %ecx,0x58(%rsp)
  nopl   0x0(%rax)
L64:
  add    $0x28,%rax
  add    $0x4,%rdx
  cmp    %r8,%rax
  jne    L503
  xor    %ebp,%ebp
  lea    D16(%rip),%r13
L109:
  xor    %ebx,%ebx
L87:
  mov    (%r12,%rbx,4),%ecx
  mov    %ebx,%edx
  mov    %ebp,%esi
  mov    %r13,%rdi
  add    $0x1,%rbx
  call   <printf@plt>
  cmp    $0x3,%rbx
  jne    L87
  add    $0x1,%ebp
  add    $0x28,%r12
  cmp    $0x3,%ebp
  jne    L109
  mov    0x198(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L300
  add    $0x1a8,%rsp
  xor    %eax,%eax
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  ret
L57:
  mov    %esi,0x54(%rsp)
L95:
  mov    0x58(%rsp),%esi
  cmp    $0x77359400,%esi
  je     L64
  mov    0x50(%rdx),%ecx
  cmp    $0x77359400,%ecx
  jne    L250
  jmp    L64
L508:
  mov    %edi,0x50(%rsp)
L369:
  mov    0x54(%rsp),%edi
  cmp    $0x77359400,%edi
  je     L95
  mov    0x50(%rdx),%ecx
  cmp    $0x77359400,%ecx
  jne    L372
  jmp    L64
L570:
  mov    %esi,0x2c(%rsp)
L545:
  mov    0x30(%rsp),%esi
  cmp    $0x77359400,%esi
  je     L236
  mov    0x28(%rdx),%ecx
  cmp    $0x77359400,%ecx
  jne    L598
  jmp    L236
L240:
  mov    %edi,0x28(%rsp)
L293:
  mov    0x2c(%rsp),%edi
  cmp    $0x77359400,%edi
  je     L545
  mov    0x28(%rdx),%ecx
  cmp    $0x77359400,%ecx
  jne    L507
  jmp    L236
L571:
  mov    %esi,0x4(%rsp)
L99:
  mov    0x8(%rsp),%edi
  cmp    $0x77359400,%edi
  je     L531
  mov    (%rdx),%ecx
  cmp    $0x77359400,%ecx
  jne    L453
  jmp    L531
L577:
  mov    %edi,(%rsp)
L37:
  mov    0x4(%rsp),%edi
  cmp    $0x77359400,%edi
  je     L99
  mov    (%rdx),%ecx
  cmp    $0x77359400,%ecx
  jne    L536
  jmp    L531
  xchg   %ax,%ax
L356:
  cmpl   $0x77359400,0x4(%rsp)
  jne    L531
  jmp    L99
L23:
  cmpl   $0x77359400,0x54(%rsp)
  jne    L64
  jmp    L95
  nopl   0x0(%rax,%rax,1)
L429:
  cmpl   $0x77359400,0x2c(%rsp)
  jne    L236
  jmp    L545
L241:
  mov    %ecx,0x30(%rsp)
  jmp    L236
L368:
  mov    %esi,0x8(%rsp)
  jmp    L531
L300:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: retrieve_data
arguments: label: D24
datatype: byte[8]
name: retrieve_data
arguments: label: D38
datatype: byte[8]
name: retrieve_data
arguments: label: D28
datatype: byte[8]
name: retrieve_data
arguments: label: D16
datatype: string

tool: {"D24": [0x00,0x00,0x00,0x00,0x05,0x00,0x00,0x00]}

tool: {"D38": [0x05,0x00,0x00,0x00,0x00,0x00,0x00,0x00]}

tool: {"D28": [0x01,0x00,0x00,0x00,0x02,0x00,0x00,0x00]}

tool: D16: %d to %d = %d


assistant: ```c
int main() {
  int a[10][10];
  int n = 3;
  a[0][0] = 0;
  a[0][1] = 5;
  a[0][2] = 1;
  a[1][0] = 5;
  a[1][1] = 0;
  a[1][2] = 2;
  a[2][0] = 1;
  a[2][1] = 2;
  a[2][2] = 0;
  int i, j, k;
  int dist[10][10];
  for (i = 0; i < n; i++) {
    for (j = 0; j < n; j++) {
      if (a[i][j] == -1)
        dist[i][j] = 2000000000;
      else
        dist[i][j] = a[i][j];
    }
  }
  for (k = 0; k < n; ++k) {
    for (i = 0; i < n; ++i) {
      for (j = 0; j < n; ++j) {
        if (dist[i][j] != 2000000000 && dist[i][k] != 2000000000 && dist[k][j] != 2000000000) {
          if (dist[i][k] + dist[k][j] < dist[i][j]) {
            dist[i][j] = dist[i][k] + dist[k][j];
          }
        }
      }
    }
  }
  for (i = 0; i < n; ++i) {
    for (j = 0; j < n; ++j) {
      printf("%d to %d = %d\n", i, j, dist[i][j]);
    }
  }
  return 0;
}
```