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

```asm
<main>:
  endbr64
  push   %r14
  lea    D2(%rip),%rdi
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x220,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,0x218(%rsp)
  xor    %eax,%eax
  lea    0x10(%rsp),%rdx
  lea    0xc(%rsp),%rsi
  call   <scanf@plt>
  mov    0xc(%rsp),%r8d
  test   %r8d,%r8d
  jle    L269
  mov    %r8d,%r11d
  mov    %r8d,%r12d
  movdqa D21(%rip),%xmm3
  movdqa D34(%rip),%xmm2
  and    $0xfffffffc,%r11d
  lea    0x1(%r8),%ebx
  lea    -0x1(%r8),%ebp
  shr    $0x2,%r12d
  movdqa D5(%rip),%xmm4
  lea    0xac(%rsp),%rdi
  lea    0x1(%r11),%r13d
  mov    $0x1,%edx
  mov    $0x3b9ac9ff,%r10d
  xor    %r9d,%r9d
  nopw   0x0(%rax,%rax,1)
L7:
  cmp    $0x2,%ebp
  jbe    L373
  movd   %edx,%xmm5
  pshufd $0x0,%xmm5,%xmm0
  movdqa %xmm0,%xmm1
  pcmpeqd %xmm3,%xmm1
  pandn  %xmm2,%xmm1
  movups %xmm1,(%rdi)
  cmp    $0x1,%r12d
  jbe    L28
  pcmpeqd %xmm4,%xmm0
  pandn  %xmm2,%xmm0
  movups %xmm0,0x10(%rdi)
L28:
  mov    %r13d,%eax
  cmp    %r8d,%r11d
  je     L493
L331:
  movslq %edx,%rsi
  cmp    %eax,%edx
  mov    %r9d,%r14d
  movslq %eax,%rcx
  lea    (%rsi,%rsi,4),%rsi
  cmovne %r10d,%r14d
  add    %rsi,%rsi
  add    %rsi,%rcx
  mov    %r14d,0x80(%rsp,%rcx,4)
  lea    0x1(%rax),%ecx
  cmp    %ecx,%r8d
  jl     L493
  cmp    %ecx,%edx
  mov    %r9d,%r14d
  movslq %ecx,%rcx
  cmovne %r10d,%r14d
  add    %rsi,%rcx
  add    $0x2,%eax
  mov    %r14d,0x80(%rsp,%rcx,4)
  cmp    %eax,%r8d
  jl     L493
  cmp    %eax,%edx
  mov    %r9d,%ecx
  cltq
  cmovne %r10d,%ecx
  add    %rax,%rsi
  mov    %ecx,0x80(%rsp,%rsi,4)
L493:
  add    $0x1,%edx
  add    $0x28,%rdi
  cmp    %ebx,%edx
  jne    L7
  mov    0x10(%rsp),%eax
  test   %eax,%eax
  jle    L435
L636:
  mov    $0x1,%ebx
  lea    0x1c(%rsp),%r14
  lea    0x18(%rsp),%r13
  lea    0x14(%rsp),%r12
  lea    D47(%rip),%rbp
  nopw   0x0(%rax,%rax,1)
L456:
  mov    %r13,%rdx
  mov    %r14,%rcx
  mov    %r12,%rsi
  mov    %rbp,%rdi
  xor    %eax,%eax
  add    $0x1,%ebx
  call   <scanf@plt>
  movslq 0x14(%rsp),%rax
  movslq 0x18(%rsp),%rdx
  lea    (%rax,%rax,4),%rax
  lea    (%rdx,%rax,2),%rax
  mov    0x1c(%rsp),%edx
  mov    %edx,0x80(%rsp,%rax,4)
  cmp    %ebx,0x10(%rsp)
  jge    L456
L435:
  mov    0xc(%rsp),%ebx
  test   %ebx,%ebx
  jle    L297
  movslq %ebx,%r12
  lea    0x24(%rsp),%rdi
  lea    0xac(%rsp),%rsi
  shl    $0x2,%r12
  mov    %r12,%rdx
  call   <memcpy@plt>
  lea    0x54(%rsp),%rdi
  mov    %r12,%rdx
  xor    %esi,%esi
  call   <memset@plt>
  movl   $0x1,0x54(%rsp)
  cmp    $0x1,%ebx
  je     L618
  xor    %esi,%esi
  mov    $0x1,%ecx
  mov    $0x9,%edi
  jmp    L199
  nopw   0x0(%rax,%rax,1)
L649:
  mov    $0x1,%esi
L277:
  mov    0x58(%rsp),%edx
  test   %edx,%edx
  jne    L135
  mov    0x28(%rsp),%edx
  cmp    %eax,%edx
  jge    L135
  mov    %edx,%eax
  mov    $0x2,%esi
L135:
  cmp    $0x2,%ebx
  je     L665
  mov    0x5c(%rsp),%r12d
  test   %r12d,%r12d
  jne    L179
  mov    0x2c(%rsp),%edx
  cmp    %edx,%eax
  jle    L179
  mov    %edx,%eax
  mov    $0x3,%esi
L179:
  cmp    $0x3,%ebx
  je     L665
  mov    0x60(%rsp),%ebp
  test   %ebp,%ebp
  jne    L211
  mov    0x30(%rsp),%edx
  cmp    %edx,%eax
  jle    L211
  mov    %edx,%eax
  mov    $0x4,%esi
L211:
  cmp    $0x4,%ebx
  je     L665
  mov    0x64(%rsp),%r11d
  test   %r11d,%r11d
  jne    L343
  mov    0x34(%rsp),%edx
  cmp    %edx,%eax
  jle    L343
  mov    %edx,%eax
  mov    $0x5,%esi
L343:
  cmp    $0x5,%ebx
  je     L665
  mov    0x68(%rsp),%r10d
  test   %r10d,%r10d
  jne    L177
  mov    0x38(%rsp),%edx
  cmp    %edx,%eax
  jle    L177
  mov    %edx,%eax
  mov    $0x6,%esi
L177:
  cmp    $0x6,%ebx
  je     L665
  mov    0x6c(%rsp),%r9d
  test   %r9d,%r9d
  jne    L440
  mov    0x3c(%rsp),%edx
  cmp    %edx,%eax
  jle    L440
  mov    %edx,%eax
  mov    $0x7,%esi
L440:
  cmp    $0x7,%ebx
  je     L665
  mov    0x70(%rsp),%r8d
  test   %r8d,%r8d
  jne    L253
  mov    0x40(%rsp),%edx
  cmp    %edx,%eax
  jle    L253
  mov    %edx,%eax
  mov    $0x8,%esi
L253:
  cmp    $0x8,%ebx
  je     L665
  mov    0x74(%rsp),%r14d
  test   %r14d,%r14d
  jne    L665
  cmp    %eax,0x44(%rsp)
  cmovl  %edi,%esi
L665:
  movslq %esi,%rax
  lea    (%rax,%rax,4),%rdx
  movl   $0x1,0x50(%rsp,%rax,4)
  mov    0x84(%rsp,%rdx,8),%edx
  cmp    $0x3b9ac9fe,%edx
  jg     L498
  add    0x20(%rsp,%rax,4),%edx
  cmp    %edx,0x24(%rsp)
  jle    L498
  mov    %edx,0x24(%rsp)
L498:
  lea    (%rax,%rax,4),%rdx
  mov    0x88(%rsp,%rdx,8),%edx
  cmp    $0x3b9ac9fe,%edx
  jg     L520
  add    0x20(%rsp,%rax,4),%edx
  cmp    0x28(%rsp),%edx
  jge    L520
  mov    %edx,0x28(%rsp)
L520:
  cmp    $0x2,%ebx
  je     L75
  lea    (%rax,%rax,4),%rdx
  mov    0x8c(%rsp,%rdx,8),%edx
  cmp    $0x3b9ac9fe,%edx
  jg     L57
  add    0x20(%rsp,%rax,4),%edx
  cmp    0x2c(%rsp),%edx
  jge    L57
  mov    %edx,0x2c(%rsp)
L57:
  cmp    $0x3,%ebx
  je     L75
  lea    (%rax,%rax,4),%rdx
  mov    0x90(%rsp,%rdx,8),%edx
  cmp    $0x3b9ac9fe,%edx
  jg     L36
  add    0x20(%rsp,%rax,4),%edx
  cmp    %edx,0x30(%rsp)
  jle    L36
  mov    %edx,0x30(%rsp)
L36:
  cmp    $0x4,%ebx
  je     L75
  lea    (%rax,%rax,4),%rdx
  mov    0x94(%rsp,%rdx,8),%edx
  cmp    $0x3b9ac9fe,%edx
  jg     L540
  add    0x20(%rsp,%rax,4),%edx
  cmp    %edx,0x34(%rsp)
  jle    L540
  mov    %edx,0x34(%rsp)
L540:
  cmp    $0x5,%ebx
  je     L75
  lea    (%rax,%rax,4),%rdx
  mov    0x98(%rsp,%rdx,8),%edx
  cmp    $0x3b9ac9fe,%edx
  jg     L381
  add    0x20(%rsp,%rax,4),%edx
  cmp    %edx,0x38(%rsp)
  jle    L381
  mov    %edx,0x38(%rsp)
L381:
  cmp    $0x6,%ebx
  je     L75
  lea    (%rax,%rax,4),%rdx
  mov    0x9c(%rsp,%rdx,8),%edx
  cmp    $0x3b9ac9fe,%edx
  jg     L18
  add    0x20(%rsp,%rax,4),%edx
  cmp    %edx,0x3c(%rsp)
  jle    L18
  mov    %edx,0x3c(%rsp)
L18:
  cmp    $0x7,%ebx
  je     L75
  lea    (%rax,%rax,4),%rdx
  mov    0xa0(%rsp,%rdx,8),%edx
  cmp    $0x3b9ac9fe,%edx
  jg     L634
  add    0x20(%rsp,%rax,4),%edx
  cmp    %edx,0x40(%rsp)
  jle    L634
  mov    %edx,0x40(%rsp)
L634:
  cmp    $0x8,%ebx
  je     L75
  lea    (%rax,%rax,4),%rdx
  mov    0xa4(%rsp,%rdx,8),%edx
  cmp    $0x3b9ac9fe,%edx
  jg     L75
  add    0x20(%rsp,%rax,4),%edx
  cmp    %edx,0x44(%rsp)
  jle    L75
  mov    %edx,0x44(%rsp)
  nopw   0x0(%rax,%rax,1)
L75:
  add    $0x1,%ecx
  cmp    %ebx,%ecx
  jge    L618
L199:
  mov    0x54(%rsp),%r13d
  mov    $0x3b9ac9ff,%eax
  test   %r13d,%r13d
  jne    L277
  mov    0x24(%rsp),%eax
  cmp    $0x3b9ac9fe,%eax
  jle    L649
  mov    $0x3b9ac9ff,%eax
  jmp    L277
  nopl   0x0(%rax,%rax,1)
L618:
  mov    $0x1,%ebx
  lea    0x20(%rsp),%r12
  lea    D44(%rip),%rbp
  nopl   0x0(%rax)
L613:
  mov    (%r12,%rbx,4),%esi
  mov    %rbp,%rdi
  add    $0x1,%rbx
  call   <printf@plt>
  cmp    %ebx,0xc(%rsp)
  jge    L613
L297:
  xor    %eax,%eax
  call   <getchar@plt>
  mov    0x218(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L446
  add    $0x220,%rsp
  xor    %eax,%eax
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  ret
  nopw   0x0(%rax,%rax,1)
L373:
  mov    $0x1,%eax
  jmp    L331
L269:
  cmpl   $0x0,0x10(%rsp)
  jg     L636
  jmp    L297
L446:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: retrieve_data
arguments: data_label: D2
datatype: string
name: retrieve_data
arguments: data_label: D21
datatype: byte[16]
name: retrieve_data
arguments: data_label: D34
datatype: byte[16]
name: retrieve_data
arguments: data_label: D5
datatype: byte[16]
name: retrieve_data
arguments: data_label: D47
datatype: string
name: retrieve_data
arguments: data_label: D44
datatype: string

tool: D2: %d %d

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

tool: {"D34": [0xff,0xc9,0x9a,0x3b,0xff,0xc9,0x9a,0x3b,0xff,0xc9,0x9a,0x3b,0xff,0xc9,0x9a,0x3b]}

tool: {"D5": [0x05,0x00,0x00,0x00,0x06,0x00,0x00,0x00,0x07,0x00,0x00,0x00,0x08,0x00,0x00,0x00]}

tool: D47: %d %d %d

tool: D44: %d 

assistant: ```c
int main(int argc, const char *argv[]) {
  int e[10][10], dis[10], book[10], i, j, n, m, t1, t2, t3, u, v, min;
  u = 0;
  int inf = 999999999;
  scanf("%d %d", &n, &m);
  for (i = 1; i <= n; i++) {
    for (j = 1; j <= n; j++) {
      if (i == j) {
        e[i][j] = 0;
      } else {
        e[i][j] = inf;
      }
    }
  }
  for (i = 1; i <= m; i++) {
    scanf("%d %d %d", &t1, &t2, &t3);
    e[t1][t2] = t3;
  }
  for (i = 1; i <= n; i++) {
    dis[i] = e[1][i];
  }
  for (i = 1; i <= n; i++) {
    book[i] = 0;
  }
  book[1] = 1;
  for (i = 1; i < n; i++) {
    min = inf;
    for (j = 1; j <= n; j++) {
      if (book[j] == 0 && dis[j] < min) {
        min = dis[j];
        u = j;
      }
    }
    book[u] = 1;
    for (v = 1; v <= n; v++) {
      if (e[u][v] < inf) {
        if (dis[v] > dis[u] + e[u][v]) {
          dis[v] = dis[u] + e[u][v];
        }
      }
    }
  }
  for (i = 1; i <= n; i++) {
    printf("%d ", dis[i]);
  }
  getchar();
  return 0;
}
```