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

```asm
<main>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbx
  sub    $0xb8,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,-0x38(%rbp)
  xor    %eax,%eax
  lea    -0x9c(%rbp),%rax
  mov    %rax,%rsi
  lea    D13(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <scanf@plt>
  movl   $0x0,-0x88(%rbp)
  jmp    L25
L201:
  mov    %rsp,%rax
  mov    %rax,%rbx
  lea    -0x94(%rbp),%rax
  lea    -0x98(%rbp),%rcx
  mov    %rax,%rdx
  mov    %rcx,%rsi
  lea    D27(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <scanf@plt>
  mov    -0x94(%rbp),%edx
  movslq %edx,%rax
  sub    $0x1,%rax
  mov    %rax,-0x68(%rbp)
  movslq %edx,%rax
  mov    %rax,%r12
  mov    $0x0,%r13d
  movslq %edx,%rax
  mov    %rax,%r14
  mov    $0x0,%r15d
  movslq %edx,%rax
  lea    0x0(,%rax,4),%rdx
  mov    $0x10,%eax
  sub    $0x1,%rax
  add    %rdx,%rax
  mov    $0x10,%esi
  mov    $0x0,%edx
  div    %rsi
  imul   $0x10,%rax,%rdx
  mov    %rdx,%rax
  and    $0xfffffffffffff000,%rax
  mov    %rsp,%rcx
  sub    %rax,%rcx
L96:
  cmp    %rcx,%rsp
  je     L83
  sub    $0x1000,%rsp
  orq    $0x0,0xff8(%rsp)
  jmp    L96
L83:
  mov    %rdx,%rax
  and    $0xfff,%eax
  sub    %rax,%rsp
  mov    %rdx,%rax
  and    $0xfff,%eax
  test   %rax,%rax
  je     L99
  mov    %rdx,%rax
  and    $0xfff,%eax
  sub    $0x8,%rax
  add    %rsp,%rax
  orq    $0x0,(%rax)
L99:
  mov    %rsp,%rax
  add    $0x3,%rax
  shr    $0x2,%rax
  shl    $0x2,%rax
  mov    %rax,-0x60(%rbp)
  mov    -0x94(%rbp),%edx
  movslq %edx,%rax
  sub    $0x1,%rax
  mov    %rax,-0x58(%rbp)
  movslq %edx,%rax
  mov    %rax,-0xb0(%rbp)
  movq   $0x0,-0xa8(%rbp)
  movslq %edx,%rax
  mov    %rax,-0xc0(%rbp)
  movq   $0x0,-0xb8(%rbp)
  movslq %edx,%rax
  lea    0x0(,%rax,4),%rdx
  mov    $0x10,%eax
  sub    $0x1,%rax
  add    %rdx,%rax
  mov    $0x10,%esi
  mov    $0x0,%edx
  div    %rsi
  imul   $0x10,%rax,%rdx
  mov    %rdx,%rax
  and    $0xfffffffffffff000,%rax
  mov    %rsp,%rcx
  sub    %rax,%rcx
L55:
  cmp    %rcx,%rsp
  je     L259
  sub    $0x1000,%rsp
  orq    $0x0,0xff8(%rsp)
  jmp    L55
L259:
  mov    %rdx,%rax
  and    $0xfff,%eax
  sub    %rax,%rsp
  mov    %rdx,%rax
  and    $0xfff,%eax
  test   %rax,%rax
  je     L82
  mov    %rdx,%rax
  and    $0xfff,%eax
  sub    $0x8,%rax
  add    %rsp,%rax
  orq    $0x0,(%rax)
L82:
  mov    %rsp,%rax
  add    $0x3,%rax
  shr    $0x2,%rax
  shl    $0x2,%rax
  mov    %rax,-0x50(%rbp)
  movl   $0x0,-0x84(%rbp)
  jmp    L238
L159:
  lea    -0x8c(%rbp),%rax
  lea    -0x90(%rbp),%rcx
  mov    %rax,%rdx
  mov    %rcx,%rsi
  lea    D27(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <scanf@plt>
  mov    -0x90(%rbp),%ecx
  mov    -0x60(%rbp),%rdx
  mov    -0x84(%rbp),%eax
  cltq
  mov    %ecx,(%rdx,%rax,4)
  mov    -0x8c(%rbp),%ecx
  mov    -0x50(%rbp),%rdx
  mov    -0x84(%rbp),%eax
  cltq
  mov    %ecx,(%rdx,%rax,4)
  addl   $0x1,-0x84(%rbp)
L238:
  mov    -0x94(%rbp),%eax
  cmp    %eax,-0x84(%rbp)
  jl     L159
  lea    -0x8c(%rbp),%rax
  mov    %rax,%rsi
  lea    D13(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <scanf@plt>
  mov    -0x98(%rbp),%eax
  add    $0x1,%eax
  mov    %eax,-0x70(%rbp)
  mov    -0x70(%rbp),%edx
  movslq %edx,%rax
  sub    $0x1,%rax
  mov    %rax,-0x48(%rbp)
  movslq %edx,%rax
  mov    %rax,-0xd0(%rbp)
  movq   $0x0,-0xc8(%rbp)
  movslq %edx,%rax
  mov    %rax,-0xe0(%rbp)
  movq   $0x0,-0xd8(%rbp)
  movslq %edx,%rax
  lea    0x0(,%rax,4),%rdx
  mov    $0x10,%eax
  sub    $0x1,%rax
  add    %rdx,%rax
  mov    $0x10,%esi
  mov    $0x0,%edx
  div    %rsi
  imul   $0x10,%rax,%rdx
  mov    %rdx,%rax
  and    $0xfffffffffffff000,%rax
  mov    %rsp,%rcx
  sub    %rax,%rcx
L329:
  cmp    %rcx,%rsp
  je     L140
  sub    $0x1000,%rsp
  orq    $0x0,0xff8(%rsp)
  jmp    L329
L140:
  mov    %rdx,%rax
  and    $0xfff,%eax
  sub    %rax,%rsp
  mov    %rdx,%rax
  and    $0xfff,%eax
  test   %rax,%rax
  je     L279
  mov    %rdx,%rax
  and    $0xfff,%eax
  sub    $0x8,%rax
  add    %rsp,%rax
  orq    $0x0,(%rax)
L279:
  mov    %rsp,%rax
  add    $0x3,%rax
  shr    $0x2,%rax
  shl    $0x2,%rax
  mov    %rax,-0x40(%rbp)
  movl   $0x0,-0x80(%rbp)
  jmp    L148
L311:
  mov    -0x40(%rbp),%rdx
  mov    -0x80(%rbp),%eax
  cltq
  movl   $0x0,(%rdx,%rax,4)
  addl   $0x1,-0x80(%rbp)
L148:
  mov    -0x80(%rbp),%eax
  cmp    -0x70(%rbp),%eax
  jl     L311
  movl   $0x0,-0x7c(%rbp)
  jmp    L5
L212:
  mov    -0x60(%rbp),%rdx
  mov    -0x7c(%rbp),%eax
  cltq
  mov    (%rdx,%rax,4),%edx
  mov    -0x8c(%rbp),%eax
  cmp    %eax,%edx
  jne    L283
  mov    -0x50(%rbp),%rdx
  mov    -0x7c(%rbp),%eax
  cltq
  mov    (%rdx,%rax,4),%eax
  mov    %eax,%edi
  call   <push@plt>
  mov    -0x50(%rbp),%rdx
  mov    -0x7c(%rbp),%eax
  cltq
  mov    (%rdx,%rax,4),%eax
  mov    -0x40(%rbp),%rdx
  cltq
  movl   $0x6,(%rdx,%rax,4)
L283:
  mov    -0x50(%rbp),%rdx
  mov    -0x7c(%rbp),%eax
  cltq
  mov    (%rdx,%rax,4),%edx
  mov    -0x8c(%rbp),%eax
  cmp    %eax,%edx
  jne    L222
  mov    -0x60(%rbp),%rdx
  mov    -0x7c(%rbp),%eax
  cltq
  mov    (%rdx,%rax,4),%eax
  mov    %eax,%edi
  call   <push@plt>
  mov    -0x60(%rbp),%rdx
  mov    -0x7c(%rbp),%eax
  cltq
  mov    (%rdx,%rax,4),%eax
  mov    -0x40(%rbp),%rdx
  cltq
  movl   $0x6,(%rdx,%rax,4)
L222:
  addl   $0x1,-0x7c(%rbp)
L5:
  mov    -0x94(%rbp),%eax
  cmp    %eax,-0x7c(%rbp)
  jl     L212
L78:
  mov    $0x0,%eax
  call   <pop@plt>
  mov    %eax,-0x6c(%rbp)
  cmpl   $0xffffff9c,-0x6c(%rbp)
  je     L124
  movl   $0x0,-0x78(%rbp)
  jmp    L289
L156:
  mov    -0x60(%rbp),%rdx
  mov    -0x78(%rbp),%eax
  cltq
  mov    (%rdx,%rax,4),%eax
  cmp    %eax,-0x6c(%rbp)
  jne    L135
  mov    -0x50(%rbp),%rdx
  mov    -0x78(%rbp),%eax
  cltq
  mov    (%rdx,%rax,4),%eax
  mov    -0x40(%rbp),%rdx
  cltq
  mov    (%rdx,%rax,4),%eax
  test   %eax,%eax
  jne    L135
  mov    -0x50(%rbp),%rdx
  mov    -0x78(%rbp),%eax
  cltq
  mov    (%rdx,%rax,4),%eax
  mov    %eax,%edi
  call   <push@plt>
  mov    -0x40(%rbp),%rdx
  mov    -0x6c(%rbp),%eax
  cltq
  mov    (%rdx,%rax,4),%ecx
  mov    -0x50(%rbp),%rdx
  mov    -0x78(%rbp),%eax
  cltq
  mov    (%rdx,%rax,4),%eax
  add    $0x6,%ecx
  mov    -0x40(%rbp),%rdx
  cltq
  mov    %ecx,(%rdx,%rax,4)
L135:
  mov    -0x50(%rbp),%rdx
  mov    -0x78(%rbp),%eax
  cltq
  mov    (%rdx,%rax,4),%eax
  cmp    %eax,-0x6c(%rbp)
  jne    L91
  mov    -0x60(%rbp),%rdx
  mov    -0x78(%rbp),%eax
  cltq
  mov    (%rdx,%rax,4),%eax
  mov    -0x40(%rbp),%rdx
  cltq
  mov    (%rdx,%rax,4),%eax
  test   %eax,%eax
  jne    L91
  mov    -0x60(%rbp),%rdx
  mov    -0x78(%rbp),%eax
  cltq
  mov    (%rdx,%rax,4),%eax
  mov    %eax,%edi
  call   <push@plt>
  mov    -0x40(%rbp),%rdx
  mov    -0x6c(%rbp),%eax
  cltq
  mov    (%rdx,%rax,4),%ecx
  mov    -0x60(%rbp),%rdx
  mov    -0x78(%rbp),%eax
  cltq
  mov    (%rdx,%rax,4),%eax
  add    $0x6,%ecx
  mov    -0x40(%rbp),%rdx
  cltq
  mov    %ecx,(%rdx,%rax,4)
L91:
  addl   $0x1,-0x78(%rbp)
L289:
  mov    -0x94(%rbp),%eax
  cmp    %eax,-0x78(%rbp)
  jl     L156
  jmp    L78
L124:
  nop
  movl   $0x1,-0x74(%rbp)
  jmp    L257
L210:
  mov    -0x8c(%rbp),%eax
  cmp    %eax,-0x74(%rbp)
  je     L179
  mov    -0x40(%rbp),%rdx
  mov    -0x74(%rbp),%eax
  cltq
  mov    (%rdx,%rax,4),%eax
  test   %eax,%eax
  jne    L290
  lea    D29(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  jmp    L179
L290:
  mov    -0x40(%rbp),%rdx
  mov    -0x74(%rbp),%eax
  cltq
  mov    (%rdx,%rax,4),%eax
  mov    %eax,%esi
  lea    D59(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
L179:
  addl   $0x1,-0x74(%rbp)
L257:
  mov    -0x74(%rbp),%eax
  cmp    -0x70(%rbp),%eax
  jl     L210
  mov    $0xa,%edi
  call   <putchar@plt>
  mov    %rbx,%rsp
  addl   $0x1,-0x88(%rbp)
L25:
  mov    -0x9c(%rbp),%eax
  cmp    %eax,-0x88(%rbp)
  jl     L201
  mov    $0x0,%eax
  mov    -0x38(%rbp),%rdx
  sub    %fs:0x28,%rdx
  je     L200
  call   <__stack_chk_fail@plt>
L200:
  lea    -0x28(%rbp),%rsp
  pop    %rbx
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  pop    %rbp
  ret
```

tool_calls: name: disassemble_data
arguments: label: D13
data_type: string
name: disassemble_data
arguments: label: D27
data_type: string
name: disassemble_data
arguments: label: D29
data_type: string
name: disassemble_data
arguments: label: D59
data_type: string

tool: D13: %i

tool: D27: %i %i

tool: D29: -1 

tool: D59: %d 

assistant: ```c
int main() {
  int q;
  scanf("%i", &q);
  for (int a0 = 0; a0 < q; a0++) {
    int n;
    int m;
    scanf("%i %i", &n, &m);
    int edl[m], edr[m];
    for (int a1 = 0; a1 < m; a1++) {
      int u;
      int v;
      scanf("%i %i", &u, &v);
      edl[a1] = u;
      edr[a1] = v;
    }
    int s;
    scanf("%i", &s);
    int r = n + 1;
    int a[r];
    for (int i = 0; i < r; i++)
      a[i] = 0;
    for (int i = 0; i < m; i++) {
      if (edl[i] == s) {
        push(edr[i]);
        a[edr[i]] = 6;
      }
      if (edr[i] == s) {
        push(edl[i]);
        a[edl[i]] = 6;
      }
    }
    while (1) {
      int get = pop();
      if (get == -100)
        break;
      for (int i = 0; i < m; i++) {
        if (edl[i] == get) {
          if (a[edr[i]] == 0) {
            push(edr[i]);
            a[edr[i]] = a[get] + 6;
          }
        }
        if (edr[i] == get) {
          if (a[edl[i]] == 0) {
            push(edl[i]);
            a[edl[i]] = a[get] + 6;
          }
        }
      }
    }
    for (int i = 1; i < r; i++) {
      if (i != s) {
        if (a[i] == 0)
          printf("-1 ");
        else
          printf("%d ", a[i]);
      }
    }
    printf("\n");
  }
  return 0;
}
```