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

```asm
<main>:
  endbr64
  push   %r15
  lea    D46(%rip),%rsi
  lea    D5(%rip),%rdi
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x1b8,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,0x1a8(%rsp)
  xor    %eax,%eax
  lea    0x10(%rsp),%r14
  call   <fopen@plt>
  lea    D49(%rip),%rsi
  lea    D25(%rip),%rdi
  mov    %rax,%r13
  call   <fopen@plt>
  mov    %rax,0x8(%rsp)
  nopl   0x0(%rax,%rax,1)
L12:
  mov    %r13,%rdx
  mov    $0xc8,%esi
  mov    %r14,%rdi
  call   <fgets@plt>
  test   %rax,%rax
  je     L112
  mov    %r14,%rsi
  lea    D26(%rip),%rdi
  xor    %r15d,%r15d
  xor    %r12d,%r12d
  call   <printf@plt>
  mov    $0x1,%ebp
  movb   $0x22,0xe0(%rsp)
  mov    $0x1,%ebx
  jmp    L1
  nopw   0x0(%rax,%rax,1)
L39:
  cmp    $0x22,%al
  je     L18
  cmp    $0x20,%al
  jne    L87
  test   %ebp,%ebp
  jne    L87
L42:
  add    $0x1,%r15
L1:
  mov    %r14,%rdi
  call   <strlen@plt>
  cmp    %r15d,%eax
  jle    L64
  movzbl (%r14,%r15,1),%eax
  cmp    $0xa,%al
  je     L106
  cmp    $0x2c,%al
  jne    L39
  cmp    $0x1,%ebp
  jne    L79
  movslq %ebx,%rsi
  add    $0x1,%ebx
  movb   $0x22,0xe0(%rsp,%rsi,1)
L79:
  xor    %ebp,%ebp
  test   %r12d,%r12d
  jne    L83
L87:
  movslq %ebx,%rsi
  add    $0x1,%ebx
  mov    %al,0xe0(%rsp,%rsi,1)
  jmp    L42
  nopl   0x0(%rax,%rax,1)
L18:
  mov    $0x1,%eax
  sub    %r12d,%eax
  mov    %eax,%r12d
  jmp    L42
  nopl   (%rax)
L106:
  movslq %ebx,%rbx
  movb   $0x0,0xe0(%rsp,%rbx,1)
L64:
  mov    0x8(%rsp),%rdi
  lea    0xe0(%rsp),%rdx
  lea    D30(%rip),%rsi
  call   <fprintf@plt>
  jmp    L12
  nopl   0x0(%rax)
L83:
  movslq %ebx,%rax
  xor    %ebp,%ebp
  add    $0x1,%ebx
  movb   $0x2e,0xe0(%rsp,%rax,1)
  jmp    L42
  nopl   (%rax)
L112:
  mov    0x1a8(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L101
  add    $0x1b8,%rsp
  xor    %eax,%eax
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
L101:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: extract_symbolic_data
arguments: data_tag: D46
type_infered: string
name: extract_symbolic_data
arguments: data_tag: D5
type_infered: string
name: extract_symbolic_data
arguments: data_tag: D49
type_infered: string
name: extract_symbolic_data
arguments: data_tag: D25
type_infered: string
name: extract_symbolic_data
arguments: data_tag: D26
type_infered: string
name: extract_symbolic_data
arguments: data_tag: D30
type_infered: string

tool: D46: r

tool: D5: ../brutos/lixo_coletado.csv

tool: D49: w

tool: D25: ../tratados/lixo_coletado.csv

tool: D26: %s


tool: D30: %s,2000


assistant: ```c
int main() {
  char linhaOriginal[200], linhaSaida[200];
  FILE *entrada, *saida;
  int i, j;
  int aspas;
  int nomeCidade;
  entrada = fopen("../brutos/lixo_coletado.csv", "r");
  saida = fopen("../tratados/lixo_coletado.csv", "w");
  while (fgets(linhaOriginal, 200, entrada) != NULL) {
    aspas = 0;
    j = 0;
    nomeCidade = 1;
    printf("%s\n", linhaOriginal);
    linhaSaida[j] = '"';
    j++;
    for (i = 0; i < strlen(linhaOriginal); i++) {
      if (linhaOriginal[i] == '\n') {
        linhaSaida[j] = '\0';
        break;
      }
      if (linhaOriginal[i] == ',' && nomeCidade == 1) {
        nomeCidade = 0;
        linhaSaida[j] = '"';
        j++;
      }
      if (linhaOriginal[i] == '"') {
        if (aspas == 1) {
          aspas = 0;
        } else {
          aspas = 1;
        }
        continue;
      }
      if (aspas && linhaOriginal[i] == ',') {
        linhaSaida[j] = '.';
        j++;
        continue;
      }
      if (linhaOriginal[i] != ' ' || nomeCidade) {
        linhaSaida[j] = linhaOriginal[i];
        j++;
        continue;
      }
    }
    fprintf(saida, "%s,2000\n", linhaSaida);
  }
  return 0;
}
```