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

```asm
<check_index_source>:
  endbr64
  push   %r15
  lea    D8(%rip),%r8
  xor    %eax,%eax
  push   %r14
  mov    %rdi,%r14
  mov    $0x1,%edi
  push   %r13
  mov    %edx,%r13d
  mov    $0x19d,%edx
  push   %r12
  lea    D158(%rip),%r12
  push   %rbp
  lea    D21(%rip),%rbp
  mov    %r12,%rcx
  push   %rbx
  mov    %rsi,%rbx
  mov    %rbp,%rsi
  sub    $0x18,%rsp
  call   <debug_@plt>
  mov    %r14,%r9
  mov    %r12,%rcx
  mov    $0x1a0,%edx
  lea    D102(%rip),%r8
  mov    %rbp,%rsi
  mov    $0x3,%edi
  xor    %eax,%eax
  call   <debug_@plt>
  mov    %rbx,%r9
  mov    %r12,%rcx
  mov    $0x1a1,%edx
  lea    D116(%rip),%r8
  mov    %rbp,%rsi
  mov    $0x3,%edi
  xor    %eax,%eax
  call   <debug_@plt>
  mov    $0x1a2,%edx
  mov    %r13d,%r9d
  mov    %r12,%rcx
  lea    D58(%rip),%r8
  mov    %rbp,%rsi
  mov    $0x3,%edi
  xor    %eax,%eax
  call   <debug_@plt>
  mov    %rbx,%rdi
  call   <strlen@plt>
  lea    -0x1(%r13),%edx
  cmp    %rdx,%rax
  je     L90
  xor    %r13d,%r13d
  test   %rax,%rax
  jne    L170
  jmp    L95
  nopl   0x0(%rax)
L36:
  add    $0x1,%r13
  cmp    %r13,%rax
  je     L95
L170:
  movzbl (%rbx,%r13,1),%edx
  cmp    $0x20,%dl
  je     L36
  cmp    $0x9,%dl
  je     L36
  mov    $0x3,%edi
  xor    %eax,%eax
  mov    %r12,%rcx
  mov    $0x1b0,%edx
  lea    D87(%rip),%r8
  mov    %rbp,%rsi
  call   <debug_@plt>
  mov    %rbx,%rdi
  call   <strlen@plt>
  cmp    %rax,%r13
  je     L95
  add    %rbx,%r13
  sub    $0x8,%rsp
  mov    %r12,%rcx
  mov    $0x1bb,%edx
  movzbl 0x0(%r13),%r9d
  mov    %rbp,%rsi
  mov    $0x3,%edi
  xor    %eax,%eax
  lea    D39(%rip),%r8
  push   %r9
  call   <debug_@plt>
  movzbl 0x0(%r13),%edx
  pop    %rax
  pop    %rcx
  cmp    $0x23,%dl
  je     L175
  mov    $0x1,%eax
  cmp    $0x2f,%dl
  jne    L50
  mov    %rbx,%rdi
  call   <strlen@plt>
  test   %rax,%rax
  je     L181
  mov    %rbx,%r13
  xor    %r14d,%r14d
  nopl   0x0(%rax)
L108:
  cmpb   $0x23,0x0(%r13)
  je     L15
L105:
  add    $0x1,%r14
  add    $0x1,%r13
  cmp    %r14,%rax
  ja     L108
L181:
  lea    D36(%rip),%r8
  mov    %r12,%rcx
  mov    %rbp,%rsi
  xor    %eax,%eax
  mov    $0x1dc,%edx
  mov    $0x1,%edi
  call   <debug_@plt>
  xor    %eax,%eax
L50:
  add    $0x18,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
  nopl   0x0(%rax,%rax,1)
L15:
  lea    D107(%rip),%r8
  mov    %r12,%rcx
  mov    %rbp,%rsi
  xor    %eax,%eax
  mov    $0x1cb,%edx
  mov    $0x3,%edi
  call   <debug_@plt>
  lea    -0x1(%r14),%eax
  movb   $0x0,0x0(%r13)
  test   %eax,%eax
  jle    L61
  lea    -0x2(%r13),%rdx
  lea    -0x2(%r14),%eax
  sub    %rax,%rdx
  lea    -0x1(%r13),%r15
  mov    %rdx,0x8(%rsp)
  jmp    L183
  nopl   0x0(%rax)
L32:
  lea    D154(%rip),%r8
  mov    %r12,%rcx
  mov    %rbp,%rsi
  xor    %eax,%eax
  mov    $0x1d2,%edx
  mov    $0x3,%edi
  sub    $0x1,%r15
  call   <debug_@plt>
  movb   $0x0,0x1(%r15)
  cmp    0x8(%rsp),%r15
  je     L61
L183:
  movzbl (%r15),%r9d
  lea    D42(%rip),%r8
  mov    %r12,%rcx
  xor    %eax,%eax
  mov    $0x1d0,%edx
  mov    %rbp,%rsi
  mov    $0x3,%edi
  call   <debug_@plt>
  movzbl (%r15),%eax
  cmp    $0x20,%al
  je     L32
  cmp    $0x9,%al
  je     L32
L61:
  mov    %rbx,%rdi
  call   <strlen@plt>
  jmp    L105
  nopl   0x0(%rax)
L95:
  lea    D144(%rip),%r8
  mov    %r12,%rcx
  mov    $0x1b6,%edx
L9:
  mov    %rbp,%rsi
  mov    $0x3,%edi
  xor    %eax,%eax
  call   <debug_@plt>
  add    $0x18,%rsp
  mov    $0x1,%eax
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
  nopw   0x0(%rax,%rax,1)
L90:
  mov    %r13d,%esi
  lea    D86(%rip),%rdi
  xor    %eax,%eax
  call   <error_@plt>
  lea    D151(%rip),%rdi
  xor    %eax,%eax
  call   <error_@plt>
  add    $0x18,%rsp
  mov    $0xffffffff,%eax
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
L175:
  lea    D34(%rip),%r8
  mov    %r12,%rcx
  mov    $0x1bf,%edx
  jmp    L9
```

tool_calls: name: extract_symbolic_data
arguments: label: D8
type_infered: string
name: extract_symbolic_data
arguments: label: D158
type_infered: string
name: extract_symbolic_data
arguments: label: D21
type_infered: string
name: extract_symbolic_data
arguments: label: D102
type_infered: string
name: extract_symbolic_data
arguments: label: D116
type_infered: string
name: extract_symbolic_data
arguments: label: D58
type_infered: string
name: extract_symbolic_data
arguments: label: D87
type_infered: string
name: extract_symbolic_data
arguments: label: D39
type_infered: string
name: extract_symbolic_data
arguments: label: D36
type_infered: string
name: extract_symbolic_data
arguments: label: D107
type_infered: string
name: extract_symbolic_data
arguments: label: D154
type_infered: string
name: extract_symbolic_data
arguments: label: D42
type_infered: string
name: extract_symbolic_data
arguments: label: D144
type_infered: string
name: extract_symbolic_data
arguments: label: D86
type_infered: string
name: extract_symbolic_data
arguments: label: D151
type_infered: string
name: extract_symbolic_data
arguments: label: D34
type_infered: string

tool: D8: <-----------------------[enter]


tool: D158: check_index_source

tool: D21: /scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/tcell2020/autodafe-0.1-osx/refs/heads/master/src/autodafe/file.c

tool: D102: (filename ): "%s"


tool: D116: (temp     ): "%s"


tool: D58: (temp_size): "%d"



tool: D87: space or tab detected, ignore it


tool: D39: the first ascii char of the line is: 0x%02x (%c)


tool: D36: <-----------------------[quit]


tool: D107: comment detected, replaced by NULL


tool: D154: remove extra space


tool: D42: temp[j]: 0x%02x


tool: D144: empty line, ignore it


tool: D86: size of the file too long. (max : %d)


tool: D151: QUITTING!


tool: D34: comment detected, ignore the line


assistant: ```c
int check_index_source(unsigned char *filename, unsigned char *temp, unsigned int temp_size) {
  int i;
  int j;
  debug_(1, "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/tcell2020/autodafe-0.1-osx/refs/heads/master/src/autodafe/file.c", 413, __func__, "<-----------------------[enter]\n");
  debug_(3, "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/tcell2020/autodafe-0.1-osx/refs/heads/master/src/autodafe/file.c", 416, __func__, "(filename ): \"%s\"\n", filename);
  debug_(3, "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/tcell2020/autodafe-0.1-osx/refs/heads/master/src/autodafe/file.c", 417, __func__, "(temp     ): \"%s\"\n", temp);
  debug_(3, "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/tcell2020/autodafe-0.1-osx/refs/heads/master/src/autodafe/file.c", 418, __func__, "(temp_size): \"%d\"\n\n", temp_size);
  if (strlen(temp) == temp_size - 1) {
    error_("size of the file too long. (max : %d)\n", temp_size);
    error_("QUITTING!\n");
    return -1;
  }
  for (i = 0; i < strlen(temp); i++)
    if ((temp[i] != 0x20) && (temp[i] != 0x09)) {
      debug_(3, "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/tcell2020/autodafe-0.1-osx/refs/heads/master/src/autodafe/file.c", 432, __func__, "space or tab detected, ignore it\n");
      break;
    }
  if (i == strlen(temp)) {
    debug_(3, "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/tcell2020/autodafe-0.1-osx/refs/heads/master/src/autodafe/file.c", 438, __func__, "empty line, ignore it\n");
    return 1;
  }
  debug_(3, "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/tcell2020/autodafe-0.1-osx/refs/heads/master/src/autodafe/file.c", 443, __func__, "the first ascii char of the line is: 0x%02x (%c)\n", temp[i], temp[i]);
  if (temp[i] == '#') {
    debug_(3, "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/tcell2020/autodafe-0.1-osx/refs/heads/master/src/autodafe/file.c", 447, __func__, "comment detected, ignore the line\n");
    return 1;
  }
  if (temp[i] != '/') {
    return 1;
  }
  for (i = 0; i < strlen(temp); i++) {
    if (temp[i] == '#') {
      debug_(3, "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/tcell2020/autodafe-0.1-osx/refs/heads/master/src/autodafe/file.c", 459, __func__, "comment detected, replaced by NULL\n");
      temp[i] = '\0';
      for (j = i - 1; j > 0; j--) {
        debug_(3, "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/tcell2020/autodafe-0.1-osx/refs/heads/master/src/autodafe/file.c", 464, __func__, "temp[j]: 0x%02x\n", temp[j]);
        if ((temp[j] == 0x20) || (temp[j] == 0x09)) {
          debug_(3, "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/tcell2020/autodafe-0.1-osx/refs/heads/master/src/autodafe/file.c", 466, __func__, "remove extra space\n");
          temp[j] = '\0';
        } else
          break;
      }
    }
  }
  debug_(1, "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/tcell2020/autodafe-0.1-osx/refs/heads/master/src/autodafe/file.c", 476, __func__, "<-----------------------[quit]\n");
  return 0;
}
```