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

```asm
<main>:
  endbr64
  push   %r13
  lea    D17(%rip),%rdi
  push   %r12
  push   %rbp
  push   %rbx
  mov    $0x1,%ebx
  sub    $0x148,%rsp
  movdqa D45(%rip),%xmm0
  mov    %fs:0x28,%rax
  mov    %rax,0x138(%rsp)
  xor    %eax,%eax
  mov    D45(%rip),%rax
  lea    0x30(%rsp),%r12
  movl   $0x9,0x24(%rsp)
  movups %xmm0,0x14(%rsp)
  movdqa D126(%rip),%xmm0
  lea    0xb0(%rsp),%rbp
  mov    %rax,0x74(%rsp)
  mov    D142(%rip),%rax
  movups %xmm0,0x54(%rsp)
  movdqa D155(%rip),%xmm0
  mov    %rax,0xa4(%rsp)
  xor    %eax,%eax
  movups %xmm0,0x64(%rsp)
  movapd D135(%rip),%xmm0
  movups %xmm0,0xe8(%rsp)
  movapd D96(%rip),%xmm0
  movups %xmm0,0xf8(%rsp)
  movapd D144(%rip),%xmm0
  movups %xmm0,0x108(%rsp)
  movapd D108(%rip),%xmm0
  movups %xmm0,0x118(%rsp)
  movapd D79(%rip),%xmm0
  movups %xmm0,0x128(%rsp)
  movdqa D76(%rip),%xmm0
  movups %xmm0,0x84(%rsp)
  movdqa D78(%rip),%xmm0
  movups %xmm0,0x94(%rsp)
  call   <printf@plt>
  lea    0xc(%rsp),%rsi
  lea    D136(%rip),%rdi
  call   <scanf@plt>
  lea    0x50(%rsp),%rsi
  mov    %r12,%r9
  mov    %rbp,%r8
  lea    0xe0(%rsp),%rcx
  lea    0x80(%rsp),%rdx
  lea    0x10(%rsp),%rdi
  push   $0x5
  mov    0x14(%rsp),%eax
  push   %rax
  call   <bellman_ford@plt>
  lea    D97(%rip),%rdi
  mov    %eax,%r13d
  xor    %eax,%eax
  call   <printf@plt>
  mov    %r13d,%esi
  lea    D81(%rip),%rdi
  xor    %eax,%eax
  call   <printf@plt>
  lea    D71(%rip),%r13
  pop    %rax
  pop    %rdx
L8:
  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    L8
  mov    0x138(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L2
  add    $0x148,%rsp
  xor    %eax,%eax
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  ret
L2:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: unpack_data
arguments: label: D17
data_type: string
name: unpack_data
arguments: label: D45
data_type: byte[16]
name: unpack_data
arguments: label: D126
data_type: byte[16]
name: unpack_data
arguments: label: D142
data_type: byte[8]
name: unpack_data
arguments: label: D155
data_type: byte[16]
name: unpack_data
arguments: label: D135
data_type: f64[2]
name: unpack_data
arguments: label: D96
data_type: f64[2]
name: unpack_data
arguments: label: D144
data_type: byte[16]
name: unpack_data
arguments: label: D108
data_type: byte[16]
name: unpack_data
arguments: label: D79
data_type: f64[2]
name: unpack_data
arguments: label: D76
data_type: byte[16]
name: unpack_data
arguments: label: D78
data_type: byte[16]
name: unpack_data
arguments: label: D136
data_type: string
name: unpack_data
arguments: label: D97
data_type: string
name: unpack_data
arguments: label: D81
data_type: string
name: unpack_data
arguments: label: D71
data_type: string

tool: D17: Enter source node: 

tool: {"D45": [0x01,0x00,0x00,0x00,0x03,0x00,0x00,0x00,0x06,0x00,0x00,0x00,0x07,0x00,0x00,0x00]}

tool: {"D126": [0x02,0x00,0x00,0x00,0x04,0x00,0x00,0x00,0x03,0x00,0x00,0x00,0x04,0x00,0x00,0x00]}

tool: {"D142": [0x0a,0x00,0x00,0x00,0x00,0x00,0x00,0x00]}

tool: {"D155": [0x05,0x00,0x00,0x00,0x02,0x00,0x00,0x00,0x03,0x00,0x00,0x00,0x05,0x00,0x00,0x00]}

tool: {"D135": [6.0,7.0]}

tool: {"D96": [5.0,8.0]}

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

tool: {"D108": [0x00,0x00,0x00,0x00,0x00,0x00,0x08,0xc0,0x00,0x00,0x00,0x00,0x00,0x00,0x22,0x40]}

tool: {"D79": [2.0,7.0]}

tool: {"D76": [0x02,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x04,0x00,0x00,0x00,0x05,0x00,0x00,0x00]}

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

tool: D136: %d

tool: D97: bellman_ford returns 

tool: D81: %d



tool: D71: %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;
}
```