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

```asm
<main>:
  endbr64
  push   %r13
  lea    D43(%rip),%rdi
  push   %r12
  push   %rbp
  push   %rbx
  mov    $0x1,%ebx
  sub    $0x148,%rsp
  movsd  D22(%rip),%xmm0
  mov    %fs:0x28,%rax
  mov    %rax,0x138(%rsp)
  xor    %eax,%eax
  movl   $0x1,0x14(%rsp)
  lea    0x30(%rsp),%r12
  movabs $0x600000003,%rax
  mov    %rax,0x18(%rsp)
  lea    0xb0(%rsp),%rbp
  movabs $0x900000007,%rax
  mov    %rax,0x20(%rsp)
  movabs $0x400000002,%rax
  mov    %rax,0x54(%rsp)
  add    $0x1,%rax
  mov    %rax,0x5c(%rsp)
  movabs $0x200000005,%rax
  mov    %rax,0x64(%rsp)
  movabs $0x500000003,%rax
  mov    %rax,0x6c(%rsp)
  movabs $0x300000001,%rax
  mov    %rax,0x74(%rsp)
  mov    D47(%rip),%rax
  movsd  %xmm0,0xf0(%rsp)
  mov    %rax,0xe8(%rsp)
  mov    D134(%rip),%rax
  mov    %rax,0xf8(%rsp)
  mov    D104(%rip),%rax
  mov    %rax,0x100(%rsp)
  mov    D85(%rip),%rax
  mov    %rax,0x108(%rsp)
  mov    D78(%rip),%rax
  mov    %rax,0x110(%rsp)
  mov    D80(%rip),%rax
  mov    %rax,0x118(%rsp)
  mov    D14(%rip),%rax
  mov    %rax,0x120(%rsp)
  mov    D9(%rip),%rax
  mov    %rax,0x128(%rsp)
  movabs $0x500000004,%rax
  mov    %rax,0x8c(%rsp)
  xor    %eax,%eax
  movsd  %xmm0,0x130(%rsp)
  movq   $0x2,0x84(%rsp)
  movq   $0x0,0x94(%rsp)
  movq   $0x8,0x9c(%rsp)
  movq   $0xa,0xa4(%rsp)
  call   <printf@plt>
  lea    0xc(%rsp),%rsi
  lea    D86(%rip),%rdi
  call   <scanf@plt>
  lea    0x50(%rsp),%rsi
  mov    %r12,%r9
  mov    %rbp,%r8
  lea    0x80(%rsp),%rdx
  lea    0xe0(%rsp),%rcx
  lea    0x10(%rsp),%rdi
  push   $0x5
  mov    0x14(%rsp),%eax
  push   %rax
  call   <bellman_ford@plt>
  lea    D26(%rip),%rdi
  mov    %eax,%r13d
  xor    %eax,%eax
  call   <printf@plt>
  mov    %r13d,%esi
  lea    D135(%rip),%rdi
  xor    %eax,%eax
  call   <printf@plt>
  lea    D94(%rip),%r13
  pop    %rax
  pop    %rdx
L10:
  mov    (%r12,%rbx,4),%edx
  movsd  0x0(%rbp,%rbx,8),%xmm0
  mov    %ebx,%esi
  mov    %r13,%rdi
  mov    $0x1,%eax
  add    $0x1,%rbx
  call   <printf@plt>
  cmp    $0x6,%rbx
  jne    L10
  mov    0x138(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L1
  add    $0x148,%rsp
  xor    %eax,%eax
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  ret
L1:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: retrieve_data
arguments: label: D43
type_infered: string
name: retrieve_data
arguments: label: D22
type_infered: f64
name: retrieve_data
arguments: label: D47
type_infered: f64
name: retrieve_data
arguments: label: D134
type_infered: f64
name: retrieve_data
arguments: label: D104
type_infered: f64
name: retrieve_data
arguments: label: D85
type_infered: byte[8]
name: retrieve_data
arguments: label: D78
type_infered: byte[8]
name: retrieve_data
arguments: label: D80
type_infered: byte[8]
name: retrieve_data
arguments: label: D14
type_infered: f64
name: retrieve_data
arguments: label: D9
type_infered: f64
name: retrieve_data
arguments: label: D86
type_infered: string
name: retrieve_data
arguments: label: D26
type_infered: string
name: retrieve_data
arguments: label: D135
type_infered: string
name: retrieve_data
arguments: label: D94
type_infered: string

tool: D43: Enter source node: 

tool: D22: 7

tool: D47: 6

tool: D134: 5

tool: D104: 8

tool: {"D85": [0x00,0x00,0x00,0x00,0x00,0x00,0x10,0xc0]}

tool: {"D78": [0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xc0]}

tool: {"D80": [0x00,0x00,0x00,0x00,0x00,0x00,0x08,0xc0]}

tool: D14: 9

tool: D9: 2

tool: D86: %d

tool: D26: bellman_ford returns 

tool: D135: %d



tool: D94: %d: %f  %d


assistant: ```c
int main(void) {
  int first[6], node[11], next[11], pi[6];
  double w[11], d[6];
  int s;
  int i;
  int ok;
  first[1] = 1;
  first[2] = 3;
  first[3] = 6;
  first[4] = 7;
  first[5] = 9;
  node[1] = 2;
  node[2] = 4;
  node[3] = 3;
  node[4] = 4;
  node[5] = 5;
  node[6] = 2;
  node[7] = 3;
  node[8] = 5;
  node[9] = 1;
  node[10] = 3;
  w[1] = 6.0;
  w[2] = 7.0;
  w[3] = 5.0;
  w[4] = 8.0;
  w[5] = -4.0;
  w[6] = -2.0;
  w[7] = -3.0;
  w[8] = 9.0;
  w[9] = 2.0;
  w[10] = 7.0;
  next[1] = 2;
  next[2] = 0;
  next[3] = 4;
  next[4] = 5;
  next[5] = 0;
  next[6] = 0;
  next[7] = 8;
  next[8] = 0;
  next[9] = 10;
  next[10] = 0;
  printf("Enter source node: ");
  scanf("%d", &s);
  ok = bellman_ford(first, node, next, w, d, pi, s, 5);
  printf("bellman_ford returns ");
  printf("%d\n\n", ok);
  for (i = 1; i <= 5; ++i) {
    printf("%d: %f  %d\n", i, d[i], pi[i]);
  }
  return 0;
}
```