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    $0x1000,%rsp
  orq    $0x0,(%rsp)
  sub    $0x8,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,-0x38(%rbp)
  xor    %eax,%eax
  lea    -0x1010(%rbp),%rax
  mov    %rax,%rsi
  lea    D36(%rip),%rax
  mov    %rax,%rdi
  call   <scanf@plt>
  jmp    L14
L43:
  mov    %rsp,%rax
  mov    %rax,%rbx
  lea    -0x100c(%rbp),%rax
  mov    %rax,%rsi
  lea    D36(%rip),%rax
  mov    %rax,%rdi
  call   <scanf@plt>
  mov    -0x100c(%rbp),%eax
  movslq %eax,%rdx
  sub    $0x1,%rdx
  mov    %rdx,-0x1000(%rbp)
  movslq %eax,%rdx
  mov    %rdx,%r12
  mov    $0x0,%r13d
  movslq %eax,%rdx
  mov    %rdx,%r14
  mov    $0x0,%r15d
  cltq
  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,%rax
  mov    %rax,%rcx
  and    $0xfffffffffffff000,%rcx
  mov    %rsp,%rdx
  sub    %rcx,%rdx
L45:
  cmp    %rdx,%rsp
  je     L144
  sub    $0x1000,%rsp
  orq    $0x0,0xff8(%rsp)
  jmp    L45
L144:
  mov    %rax,%rdx
  and    $0xfff,%edx
  sub    %rdx,%rsp
  mov    %rax,%rdx
  and    $0xfff,%edx
  test   %rdx,%rdx
  je     L128
  and    $0xfff,%eax
  sub    $0x8,%rax
  add    %rsp,%rax
  orq    $0x0,(%rax)
L128:
  mov    %rsp,%rax
  add    $0x3,%rax
  shr    $0x2,%rax
  shl    $0x2,%rax
  mov    %rax,-0xff8(%rbp)
  mov    -0x100c(%rbp),%eax
  movslq %eax,%rdx
  sub    $0x1,%rdx
  mov    %rdx,-0xff0(%rbp)
  movslq %eax,%rdx
  mov    %rdx,-0x1020(%rbp)
  movq   $0x0,-0x1018(%rbp)
  movslq %eax,%rdx
  mov    %rdx,-0x1030(%rbp)
  movq   $0x0,-0x1028(%rbp)
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    $0x10,%eax
  sub    $0x1,%rax
  add    %rdx,%rax
  mov    $0x10,%edi
  mov    $0x0,%edx
  div    %rdi
  imul   $0x10,%rax,%rax
  mov    %rax,%rcx
  and    $0xfffffffffffff000,%rcx
  mov    %rsp,%rdx
  sub    %rcx,%rdx
L67:
  cmp    %rdx,%rsp
  je     L116
  sub    $0x1000,%rsp
  orq    $0x0,0xff8(%rsp)
  jmp    L67
L116:
  mov    %rax,%rdx
  and    $0xfff,%edx
  sub    %rdx,%rsp
  mov    %rax,%rdx
  and    $0xfff,%edx
  test   %rdx,%rdx
  je     L54
  and    $0xfff,%eax
  sub    $0x8,%rax
  add    %rsp,%rax
  orq    $0x0,(%rax)
L54:
  mov    %rsp,%rax
  add    $0x3,%rax
  shr    $0x2,%rax
  shl    $0x2,%rax
  mov    %rax,-0xfe8(%rbp)
  movl   $0x0,-0x1008(%rbp)
  jmp    L205
L98:
  mov    -0x1008(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0xff8(%rbp),%rax
  add    %rdx,%rax
  mov    %rax,%rsi
  lea    D36(%rip),%rax
  mov    %rax,%rdi
  call   <scanf@plt>
  addl   $0x1,-0x1008(%rbp)
L205:
  mov    -0x100c(%rbp),%eax
  cmp    %eax,-0x1008(%rbp)
  jl     L98
  movl   $0x0,-0x1008(%rbp)
  jmp    L174
L154:
  mov    -0x1008(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0xfe8(%rbp),%rax
  add    %rdx,%rax
  mov    %rax,%rsi
  lea    D36(%rip),%rax
  mov    %rax,%rdi
  call   <scanf@plt>
  addl   $0x1,-0x1008(%rbp)
L174:
  mov    -0x100c(%rbp),%eax
  cmp    %eax,-0x1008(%rbp)
  jl     L154
  movl   $0x0,-0x1008(%rbp)
  jmp    L124
L182:
  mov    -0x1008(%rbp),%eax
  cltq
  movl   $0x0,-0xfe0(%rbp,%rax,4)
  addl   $0x1,-0x1008(%rbp)
L124:
  cmpl   $0x3e7,-0x1008(%rbp)
  jle    L182
  movl   $0x0,-0x1008(%rbp)
  jmp    L39
L21:
  mov    -0xff8(%rbp),%rax
  mov    -0x1008(%rbp),%edx
  movslq %edx,%rdx
  mov    (%rax,%rdx,4),%eax
  mov    %eax,-0x1004(%rbp)
  jmp    L155
L60:
  mov    -0x1004(%rbp),%eax
  sub    $0x1,%eax
  movslq %eax,%rdx
  mov    -0xfe0(%rbp,%rdx,4),%edx
  add    $0x1,%edx
  cltq
  mov    %edx,-0xfe0(%rbp,%rax,4)
  addl   $0x1,-0x1004(%rbp)
L155:
  mov    -0xfe8(%rbp),%rax
  mov    -0x1008(%rbp),%edx
  movslq %edx,%rdx
  mov    (%rax,%rdx,4),%eax
  cmp    %eax,-0x1004(%rbp)
  jl     L60
  addl   $0x1,-0x1008(%rbp)
L39:
  mov    -0x100c(%rbp),%eax
  cmp    %eax,-0x1008(%rbp)
  jl     L21
  movl   $0x0,-0x1004(%rbp)
  mov    -0x1004(%rbp),%eax
  mov    %eax,-0x1008(%rbp)
  jmp    L95
L25:
  mov    -0x1008(%rbp),%eax
  cltq
  mov    -0xfe0(%rbp,%rax,4),%eax
  cmp    %eax,-0x1004(%rbp)
  jge    L49
  mov    -0x1008(%rbp),%eax
  cltq
  mov    -0xfe0(%rbp,%rax,4),%eax
  mov    %eax,-0x1004(%rbp)
L49:
  addl   $0x1,-0x1008(%rbp)
L95:
  cmpl   $0x3e7,-0x1008(%rbp)
  jle    L25
  mov    -0x1004(%rbp),%eax
  mov    %eax,%esi
  lea    D48(%rip),%rax
  mov    %rax,%rdi
  call   <printf@plt>
  mov    %rbx,%rsp
L14:
  mov    -0x1010(%rbp),%eax
  lea    -0x1(%rax),%edx
  mov    %edx,-0x1010(%rbp)
  test   %eax,%eax
  jne    L43
  mov    $0x0,%eax
  mov    -0x38(%rbp),%rdx
  sub    %fs:0x28,%rdx
  je     L123
  call   <__stack_chk_fail@plt>
L123:
  lea    -0x28(%rbp),%rsp
  pop    %rbx
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  pop    %rbp
  ret
```

tool_calls: name: unpack_data
arguments: data_tag: D36
type: string
name: unpack_data
arguments: data_tag: D48
type: string

tool: D36: %d

tool: D48: %d


assistant: ```c
int main() {
  int t, n, g[1000], i, j;
  scanf("%d", &t);
  while (t--) {
    scanf("%d", &n);
    int a[n], d[n];
    for (i = 0; i < n; ++i)
      scanf("%d", &a[i]);
    for (i = 0; i < n; ++i)
      scanf("%d", &d[i]);
    for (i = 0; i < 1000; ++i)
      g[i] = 0;
    for (i = 0; i < n; ++i)
      for (j = a[i]; j < d[i]; ++j)
        g[j - 1]++;
    for (i = j = 0; i < 1000; ++i)
      if (g[i] > j)
        j = g[i];
    printf("%d\n", j);
  }
  return 0;
}
```