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

```asm
<main>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  lea    -0x3d5000(%rsp),%r11
L68:
  sub    $0x1000,%rsp
  orq    $0x0,(%rsp)
  cmp    %r11,%rsp
  jne    L68
  sub    $0x778,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,0x3d5768(%rsp)
  xor    %eax,%eax
  mov    %rsp,%rsi
  lea    D20(%rip),%rdi
  call   <scanf@plt>
  lea    0x3ec4(%rsp),%rdx
  lea    0x3d6708(%rsp),%rsi
  mov    $0x0,%ecx
L176:
  movl   $0x0,0x10(%rsp,%rcx,1)
  movl   $0x0,0xfc0(%rsp,%rcx,1)
  lea    -0xfa4(%rdx),%rax
L102:
  movl   $0x0,(%rax)
  add    $0x4,%rax
  cmp    %rdx,%rax
  jne    L102
  add    $0xfa4,%rdx
  add    $0x4,%rcx
  cmp    %rsi,%rdx
  jne    L176
  cmpl   $0x0,(%rsp)
  jle    L81
  mov    $0x0,%r12d
  lea    0x8(%rsp),%r15
  lea    0x4(%rsp),%r14
  lea    D42(%rip),%r13
  lea    D20(%rip),%rbp
  jmp    L13
L133:
  add    $0x1,%r12
  cmp    %r12d,(%rsp)
  jle    L81
L13:
  mov    %r15,%rdx
  mov    %r14,%rsi
  mov    %r13,%rdi
  mov    $0x0,%eax
  call   <scanf@plt>
  mov    0x4(%rsp),%eax
  mov    %eax,0x1f70(%rsp,%r12,4)
  cmpl   $0x0,0x8(%rsp)
  jle    L133
  mov    $0x0,%ebx
L161:
  lea    0xc(%rsp),%rsi
  mov    %rbp,%rdi
  mov    $0x0,%eax
  call   <scanf@plt>
  movslq 0xc(%rsp),%rdx
  movslq 0x4(%rsp),%rax
  imul   $0x3e9,%rax,%rax
  add    %rdx,%rax
  movl   $0x1,0x2f20(%rsp,%rax,4)
  add    $0x1,%ebx
  cmp    %ebx,0x8(%rsp)
  jg     L161
  jmp    L133
L81:
  movl   $0x1,0xfc0(%rsp)
  movl   $0x1,0x10(%rsp)
  lea    0x10(%rsp),%rdx
  lea    0x2f20(%rsp),%rbx
  mov    %rbx,%rsi
  mov    $0x0,%edi
  call   <dfs@plt>
  lea    0xfc0(%rsp),%rdx
  mov    %rbx,%rsi
  mov    $0x0,%edi
  call   <rdfs@plt>
  cmpl   $0x0,(%rsp)
  jle    L191
  mov    $0x0,%ebx
  mov    $0x1,%eax
  lea    D47(%rip),%r12
  jmp    L175
L132:
  mov    (%rsp),%edx
  add    $0x1,%rbx
  cmp    %ebx,%edx
  jle    L151
L175:
  mov    0x1f70(%rsp,%rbx,4),%esi
  movslq %esi,%rdx
  mov    0xfc0(%rsp,%rdx,4),%ebp
  test   %ebp,%ebp
  jne    L132
  mov    %r12,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  mov    %ebp,%eax
  jmp    L132
L151:
  test   %edx,%edx
  jle    L113
  mov    $0x0,%ebx
  lea    D56(%rip),%r12
  jmp    L20
L91:
  add    $0x1,%rbx
  cmp    %ebx,(%rsp)
  jle    L113
L20:
  mov    0x1f70(%rsp,%rbx,4),%esi
  movslq %esi,%rdx
  mov    0x10(%rsp,%rdx,4),%ebp
  test   %ebp,%ebp
  jne    L91
  mov    %r12,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  mov    %ebp,%eax
  jmp    L91
L113:
  test   %eax,%eax
  jne    L191
L197:
  mov    0x3d5768(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L159
  mov    $0x0,%eax
  add    $0x3d5778,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
L191:
  lea    D44(%rip),%rdi
  call   <puts@plt>
  jmp    L197
L159:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: extract_symbolic_data
arguments: tag: D20
data_type: string
name: extract_symbolic_data
arguments: tag: D42
data_type: string
name: extract_symbolic_data
arguments: tag: D47
data_type: string
name: extract_symbolic_data
arguments: tag: D56
data_type: string
name: extract_symbolic_data
arguments: tag: D44
data_type: string

tool: D20: %d

tool: D42: %d%d

tool: D47: TRAPPED %d


tool: D56: UNREACHABLE %d


tool: D44: NO PROBLEMS

assistant: ```c
int main() {
  int i, j, n, s, t, u, G[1001][1001], v[1001], r[1001], p[1001];
  scanf("%d", &n);
  for (i = 0; i < 1001; i++) {
    v[i] = 0;
    r[i] = 0;
    for (j = 0; j < 1001; j++)
      G[i][j] = 0;
  }
  for (i = 0; i < n; i++) {
    scanf("%d%d", &s, &t);
    p[i] = s;
    for (j = 0; j < t; j++) {
      scanf("%d", &u);
      G[s][u] = 1;
    }
  }
  v[0] = r[0] = 1;
  dfs(0, G, v);
  rdfs(0, G, r);
  int ok = 1;
  for (i = 0; i < n; i++) {
    if (!r[p[i]]) {
      printf("TRAPPED %d\n", p[i]);
      ok = 0;
    }
  }
  for (i = 0; i < n; i++) {
    if (!v[p[i]]) {
      printf("UNREACHABLE %d\n", p[i]);
      ok = 0;
    }
  }
  if (ok)
    printf("NO PROBLEMS\n");
  return 0;
}
```