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

```asm
<main>:
  endbr64
  push   %rbp
  lea    D9(%rip),%rdi
  mov    %rsp,%rbp
  push   %r15
  push   %r14
  lea    -0x4c(%rbp),%rsi
  push   %r13
  push   %r12
  push   %rbx
  sub    $0x88,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,-0x38(%rbp)
  xor    %eax,%eax
  call   <scanf@plt>
  mov    -0x4c(%rbp),%ebx
  test   %ebx,%ebx
  jle    L205
  lea    -0x44(%rbp),%rax
  movl   $0x0,-0x74(%rbp)
  mov    %rax,-0xa0(%rbp)
  lea    -0x48(%rbp),%rax
  mov    %rax,-0x98(%rbp)
  lea    -0x3c(%rbp),%rax
  mov    %rax,-0x90(%rbp)
  lea    -0x40(%rbp),%rax
  mov    %rax,-0xa8(%rbp)
  nopl   (%rax)
L157:
  mov    -0xa0(%rbp),%rdx
  mov    -0x98(%rbp),%rsi
  lea    D37(%rip),%rdi
  xor    %eax,%eax
  mov    %rsp,-0x88(%rbp)
  call   <scanf@plt>
  movslq -0x44(%rbp),%rax
  mov    %rsp,%rsi
  mov    %rax,%rcx
  lea    0xf(,%rax,4),%rax
  mov    %rax,%rdi
  mov    %rax,%rdx
  and    $0xfffffffffffff000,%rdi
  and    $0xfffffffffffffff0,%rdx
  sub    %rdi,%rsi
  cmp    %rsi,%rsp
  je     L305
L254:
  sub    $0x1000,%rsp
  orq    $0x0,0xff8(%rsp)
  cmp    %rsi,%rsp
  jne    L254
L305:
  and    $0xfff,%edx
  sub    %rdx,%rsp
  test   %rdx,%rdx
  je     L165
  orq    $0x0,-0x8(%rsp,%rdx,1)
L165:
  mov    %rax,%rdx
  mov    %rsp,%rsi
  and    $0xfffffffffffff000,%rax
  mov    %rsp,%r14
  sub    %rax,%rsi
  and    $0xfffffffffffffff0,%rdx
  cmp    %rsi,%rsp
  je     L186
L287:
  sub    $0x1000,%rsp
  orq    $0x0,0xff8(%rsp)
  cmp    %rsi,%rsp
  jne    L287
L186:
  and    $0xfff,%edx
  sub    %rdx,%rsp
  test   %rdx,%rdx
  jne    L285
L232:
  mov    %rsp,%r13
  xor    %ebx,%ebx
  test   %ecx,%ecx
  jle    L237
  mov    -0xa8(%rbp),%r12
  mov    -0x90(%rbp),%r15
  nopl   0x0(%rax,%rax,1)
L88:
  mov    %r15,%rdx
  mov    %r12,%rsi
  lea    D37(%rip),%rdi
  xor    %eax,%eax
  call   <scanf@plt>
  mov    -0x40(%rbp),%eax
  mov    %eax,(%r14,%rbx,4)
  mov    -0x3c(%rbp),%eax
  mov    %eax,0x0(%r13,%rbx,4)
  add    $0x1,%rbx
  cmp    %ebx,-0x44(%rbp)
  jg     L88
L237:
  mov    -0x90(%rbp),%rsi
  lea    D9(%rip),%rdi
  xor    %eax,%eax
  call   <scanf@plt>
  mov    -0x48(%rbp),%eax
  mov    %rsp,%rcx
  mov    %eax,-0x78(%rbp)
  add    $0x1,%eax
  mov    %eax,-0x7c(%rbp)
  cltq
  lea    0xf(,%rax,4),%rax
  mov    %rax,%rdx
  and    $0xfffffffffffff000,%rax
  sub    %rax,%rcx
  and    $0xfffffffffffffff0,%rdx
  cmp    %rcx,%rsp
  je     L90
L105:
  sub    $0x1000,%rsp
  orq    $0x0,0xff8(%rsp)
  cmp    %rcx,%rsp
  jne    L105
L90:
  and    $0xfff,%edx
  sub    %rdx,%rsp
  test   %rdx,%rdx
  je     L30
  orq    $0x0,-0x8(%rsp,%rdx,1)
L30:
  mov    -0x7c(%rbp),%r11d
  mov    %rsp,%r15
  test   %r11d,%r11d
  jle    L241
  mov    -0x78(%rbp),%eax
  xor    %esi,%esi
  mov    %r15,%rdi
  lea    0x4(,%rax,4),%rdx
  call   <memset@plt>
L241:
  mov    -0x44(%rbp),%r10d
  xor    %ebx,%ebx
  mov    %r14,%rdx
  mov    %r13,%rcx
  test   %r10d,%r10d
  jle    L51
  mov    %r15,-0x58(%rbp)
  mov    %r13,%r15
  jmp    L329
  nopl   0x0(%rax,%rax,1)
L249:
  cmp    %eax,%r13d
  je     L122
L188:
  add    $0x1,%rbx
  cmp    %ebx,-0x44(%rbp)
  jle    L384
L329:
  movslq (%r14,%rbx,4),%r12
  mov    -0x3c(%rbp),%eax
  mov    (%r15,%rbx,4),%r13d
  cmp    %eax,%r12d
  jne    L249
  mov    %r13d,%edi
  call   <push@plt>
  mov    -0x58(%rbp),%rdi
  movslq %r13d,%rax
  movl   $0x6,(%rdi,%rax,4)
  mov    -0x3c(%rbp),%eax
  cmp    %eax,%r13d
  jne    L188
L122:
  mov    %r12d,%edi
  add    $0x1,%rbx
  call   <push@plt>
  mov    -0x58(%rbp),%rax
  movl   $0x6,(%rax,%r12,4)
  cmp    %ebx,-0x44(%rbp)
  jg     L329
L384:
  mov    %r15,%rcx
  mov    -0x58(%rbp),%r15
  mov    %r14,%rdx
  nopl   0x0(%rax,%rax,1)
L51:
  xor    %eax,%eax
  mov    %rcx,-0x60(%rbp)
  mov    %rdx,-0x58(%rbp)
  call   <pop@plt>
  mov    %eax,%r12d
  cmp    $0xffffff9c,%eax
  je     L27
  mov    -0x44(%rbp),%r9d
  xor    %ebx,%ebx
  mov    -0x58(%rbp),%rdx
  movslq %eax,%r8
  mov    -0x60(%rbp),%rcx
  test   %r9d,%r9d
  jg     L123
  jmp    L51
  nopl   0x0(%rax,%rax,1)
L56:
  cmp    %r12d,%r14d
  je     L275
L195:
  add    $0x1,%rbx
  cmp    %ebx,-0x44(%rbp)
  jle    L51
L123:
  mov    (%rdx,%rbx,4),%r13d
  mov    (%rcx,%rbx,4),%r14d
  cmp    %r12d,%r13d
  jne    L56
  movslq %r14d,%rsi
  mov    (%r15,%rsi,4),%edi
  test   %edi,%edi
  jne    L56
  mov    %r14d,%edi
  mov    %r8,-0x70(%rbp)
  mov    %rcx,-0x68(%rbp)
  mov    %rdx,-0x60(%rbp)
  mov    %rsi,-0x58(%rbp)
  call   <push@plt>
  mov    -0x70(%rbp),%r8
  mov    -0x58(%rbp),%rsi
  mov    -0x68(%rbp),%rcx
  mov    -0x60(%rbp),%rdx
  mov    (%r15,%r8,4),%eax
  add    $0x6,%eax
  mov    %eax,(%r15,%rsi,4)
  cmp    %r12d,%r14d
  jne    L195
  cs nopw 0x0(%rax,%rax,1)
L275:
  movslq %r13d,%r14
  mov    (%r15,%r14,4),%eax
  test   %eax,%eax
  jne    L195
  mov    %r13d,%edi
  mov    %r8,-0x68(%rbp)
  mov    %rcx,-0x60(%rbp)
  mov    %rdx,-0x58(%rbp)
  call   <push@plt>
  mov    -0x68(%rbp),%r8
  mov    -0x60(%rbp),%rcx
  mov    -0x58(%rbp),%rdx
  mov    (%r15,%r8,4),%eax
  add    $0x6,%eax
  mov    %eax,(%r15,%r14,4)
  jmp    L195
  nopl   0x0(%rax,%rax,1)
L27:
  cmpl   $0x1,-0x7c(%rbp)
  jle    L324
  mov    -0x78(%rbp),%eax
  mov    $0x1,%r14d
  lea    -0x1(%rax),%ebx
  add    $0x2,%rbx
  jmp    L229
  nopl   0x0(%rax,%rax,1)
L72:
  lea    D27(%rip),%rdi
  xor    %eax,%eax
  call   <printf@plt>
L111:
  add    $0x1,%r14
  cmp    %r14,%rbx
  je     L324
L229:
  cmp    %r14d,-0x3c(%rbp)
  je     L111
  mov    (%r15,%r14,4),%esi
  test   %esi,%esi
  je     L72
  lea    D45(%rip),%rdi
  xor    %eax,%eax
  add    $0x1,%r14
  call   <printf@plt>
  cmp    %r14,%rbx
  jne    L229
L324:
  mov    $0xa,%edi
  call   <putchar@plt>
  addl   $0x1,-0x74(%rbp)
  mov    -0x88(%rbp),%rsp
  mov    -0x74(%rbp),%eax
  cmp    %eax,-0x4c(%rbp)
  jg     L157
L205:
  mov    -0x38(%rbp),%rax
  sub    %fs:0x28,%rax
  jne    L334
  lea    -0x28(%rbp),%rsp
  xor    %eax,%eax
  pop    %rbx
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  pop    %rbp
  ret
L285:
  orq    $0x0,-0x8(%rsp,%rdx,1)
  jmp    L232
L334:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: read_data
arguments: label: D9
type_guessed: string
name: read_data
arguments: label: D37
type_guessed: string
name: read_data
arguments: label: D27
type_guessed: string
name: read_data
arguments: label: D45
type_guessed: string

tool: D9: %i

tool: D37: %i %i

tool: D27: -1 

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