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

```asm
<main>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x550,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,-0x8(%rbp)
  xor    %eax,%eax
  movl   $0x0,-0x544(%rbp)
  movl   $0x0,-0x53c(%rbp)
  lea    -0x210(%rbp),%rax
  mov    $0x64,%edx
  mov    $0x0,%esi
  mov    %rax,%rdi
  call   <memset@plt>
  lea    -0x54c(%rbp),%rax
  mov    %rax,%rsi
  lea    D48(%rip),%rax
  mov    %rax,%rdi
  call   <scanf@plt>
  lea    -0x1a0(%rbp),%rax
  mov    %rax,%rdi
  call   <gets@plt>
  lea    -0x1a0(%rbp),%rax
  lea    D56(%rip),%rdx
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <strtok@plt>
  mov    %rax,-0x538(%rbp)
  mov    -0x538(%rbp),%rax
  mov    %rax,%rdi
  call   <atoi@plt>
  mov    %eax,-0x530(%rbp)
  jmp    L16
L58:
  lea    D56(%rip),%rax
  mov    %rax,%rsi
  mov    $0x0,%edi
  call   <strtok@plt>
  mov    %rax,-0x538(%rbp)
  cmpq   $0x0,-0x538(%rbp)
  je     L16
  addl   $0x1,-0x544(%rbp)
  mov    -0x538(%rbp),%rax
  mov    %rax,%rdi
  call   <atoi@plt>
  mov    -0x544(%rbp),%edx
  movslq %edx,%rdx
  mov    %eax,-0x530(%rbp,%rdx,4)
L16:
  cmpq   $0x0,-0x538(%rbp)
  jne    L58
  lea    -0x548(%rbp),%rax
  mov    %rax,%rsi
  lea    D48(%rip),%rax
  mov    %rax,%rdi
  call   <scanf@plt>
  lea    -0x1a0(%rbp),%rax
  mov    %rax,%rdi
  call   <gets@plt>
  movl   $0x0,-0x544(%rbp)
  lea    -0x1a0(%rbp),%rax
  lea    D56(%rip),%rdx
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <strtok@plt>
  mov    %rax,-0x538(%rbp)
  mov    -0x538(%rbp),%rax
  mov    %rax,%rdi
  call   <atoi@plt>
  mov    %eax,-0x3a0(%rbp)
  jmp    L63
L22:
  lea    D56(%rip),%rax
  mov    %rax,%rsi
  mov    $0x0,%edi
  call   <strtok@plt>
  mov    %rax,-0x538(%rbp)
  cmpq   $0x0,-0x538(%rbp)
  je     L63
  addl   $0x1,-0x544(%rbp)
  mov    -0x538(%rbp),%rax
  mov    %rax,%rdi
  call   <atoi@plt>
  mov    -0x544(%rbp),%edx
  movslq %edx,%rdx
  mov    %eax,-0x3a0(%rbp,%rdx,4)
L63:
  cmpq   $0x0,-0x538(%rbp)
  jne    L22
  movl   $0x0,-0x544(%rbp)
  jmp    L80
L37:
  movl   $0x0,-0x540(%rbp)
  jmp    L32
L54:
  mov    -0x544(%rbp),%eax
  cltq
  mov    -0x3a0(%rbp,%rax,4),%edx
  mov    -0x540(%rbp),%eax
  cltq
  mov    -0x530(%rbp,%rax,4),%eax
  cmp    %eax,%edx
  jne    L98
  mov    -0x544(%rbp),%eax
  cltq
  movzbl -0x210(%rbp,%rax,1),%eax
  test   %al,%al
  jne    L98
  addl   $0x1,-0x53c(%rbp)
  mov    -0x544(%rbp),%eax
  cltq
  movb   $0x1,-0x210(%rbp,%rax,1)
L98:
  addl   $0x1,-0x540(%rbp)
L32:
  mov    -0x54c(%rbp),%eax
  cmp    %eax,-0x540(%rbp)
  jl     L54
  addl   $0x1,-0x544(%rbp)
L80:
  mov    -0x548(%rbp),%eax
  cmp    %eax,-0x544(%rbp)
  jl     L37
  mov    -0x53c(%rbp),%eax
  mov    %eax,%esi
  lea    D48(%rip),%rax
  mov    %rax,%rdi
  call   <printf@plt>
  mov    $0x0,%eax
  mov    -0x8(%rbp),%rdx
  sub    %fs:0x28,%rdx
  je     L81
  call   <__stack_chk_fail@plt>
L81:
  leave
  ret
```

tool_calls: name: read_data
arguments: data_tag: D48
type_infered: string
name: read_data
arguments: data_tag: D56
type_infered: string

tool: D48: %d


tool: D56:  

assistant: ```c
int main() {
  int S[100], T[100];
  char checked[100];
  int n, q;
  int i = 0;
  int j;
  int c = 0;
  char input[400];
  char *p;
  memset(checked, 0, sizeof(checked));
  scanf("%d\n", &n);
  gets(input);
  p = strtok(input, " ");
  S[0] = atoi(p);
  while (p != NULL) {
    p = strtok(NULL, " ");
    if (p != NULL) {
      i++;
      S[i] = atoi(p);
    }
  }
  scanf("%d\n", &q);
  gets(input);
  i = 0;
  p = strtok(input, " ");
  T[0] = atoi(p);
  while (p != NULL) {
    p = strtok(NULL, " ");
    if (p != NULL) {
      i++;
      T[i] = atoi(p);
    }
  }
  for (i = 0; i < q; i++) {
    for (j = 0; j < n; j++) {
      if (T[i] == S[j] && checked[i] == 0) {
        c++;
        checked[i] = 1;
      }
    }
  }
  printf("%d\n", c);
  return 0;
}
```