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

```asm
<ini_parse_file>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x4a8,%rsp
  mov    %rdi,%r13
  mov    %rsi,(%rsp)
  mov    %rdx,0x8(%rsp)
  mov    %fs:0x28,%rax
  mov    %rax,0x498(%rsp)
  xor    %eax,%eax
  movq   $0x0,0x10(%rsp)
  movq   $0x0,0x18(%rsp)
  movq   $0x0,0x20(%rsp)
  movq   $0x0,0x28(%rsp)
  movq   $0x0,0x30(%rsp)
  movq   $0x0,0x38(%rsp)
  movq   $0x0,0x40(%rsp)
  movq   $0x0,0x48(%rsp)
  movq   $0x0,0x50(%rsp)
  movq   $0x0,0x58(%rsp)
  movq   $0x0,0x60(%rsp)
  movq   $0x0,0x68(%rsp)
  movq   $0x0,0x70(%rsp)
  movq   $0x0,0x78(%rsp)
  movq   $0x0,0x80(%rsp)
  movq   $0x0,0x88(%rsp)
  mov    $0x0,%r15d
  mov    $0x0,%ebp
  lea    0x90(%rsp),%r12
L18:
  mov    %r13,%rdx
  mov    $0x400,%esi
  mov    %r12,%rdi
  call   <fgets@plt>
  test   %rax,%rax
  je     L146
  add    $0x1,%ebp
  mov    %r12,%rdi
  call   <rstrip@plt>
  mov    %rax,%rdi
  call   <lskip@plt>
  mov    %rax,%rbx
  movzbl (%rax),%eax
  cmp    $0x3b,%al
  je     L18
  cmp    $0x23,%al
  je     L18
  cmp    $0x5b,%al
  je     L89
  test   %al,%al
  je     L18
  mov    $0x3d,%esi
  mov    %rbx,%rdi
  call   <find_char_or_comment@plt>
  mov    %rax,%r14
  cmpb   $0x3d,(%rax)
  jne    L105
L151:
  movb   $0x0,(%r14)
  mov    %rbx,%rdi
  call   <rstrip@plt>
  mov    %rax,%rbx
  lea    0x1(%r14),%rdi
  call   <lskip@plt>
  mov    %rax,%r14
  mov    $0x0,%esi
  mov    %rax,%rdi
  call   <find_char_or_comment@plt>
  cmpb   $0x3b,(%rax)
  je     L127
L75:
  mov    %r14,%rdi
  call   <rstrip@plt>
  lea    0x50(%rsp),%rdi
  mov    $0x40,%edx
  mov    %rbx,%rsi
  call   <strncpy0@plt>
  lea    0x10(%rsp),%rsi
  mov    %r14,%rcx
  mov    %rbx,%rdx
  mov    0x8(%rsp),%rdi
  mov    (%rsp),%rax
  call   *%rax
  or     %r15d,%eax
  cmove  %ebp,%r15d
  jmp    L18
L89:
  add    $0x1,%rbx
  mov    $0x5d,%esi
  mov    %rbx,%rdi
  call   <find_char_or_comment@plt>
  cmpb   $0x5d,(%rax)
  je     L138
  test   %r15d,%r15d
  cmove  %ebp,%r15d
  jmp    L18
L138:
  movb   $0x0,(%rax)
  lea    0x10(%rsp),%rdi
  mov    $0x40,%edx
  mov    %rbx,%rsi
  call   <strncpy0@plt>
  movb   $0x0,0x50(%rsp)
  jmp    L18
L105:
  mov    $0x3a,%esi
  mov    %rbx,%rdi
  call   <find_char_or_comment@plt>
  mov    %rax,%r14
  movzbl (%rax),%eax
  cmp    $0x3d,%al
  je     L151
  cmp    $0x3a,%al
  je     L151
  test   %r15d,%r15d
  cmove  %ebp,%r15d
  jmp    L18
L127:
  movb   $0x0,(%rax)
  jmp    L75
L146:
  mov    0x498(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L140
  mov    %r15d,%eax
  add    $0x4a8,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
L140:
  call   <__stack_chk_fail@plt>
```

assistant: ```c
int ini_parse_file(FILE *file, int (*handler)(void *, const char *, const char *, const char *), void *user) {
  char line[1024];
  char section[64] = "";
  char prev_name[64] = "";
  char *start;
  char *end;
  char *name;
  char *value;
  int lineno = 0;
  int error = 0;
  while (fgets(line, sizeof(line), file) != NULL) {
    lineno++;
    start = lskip(rstrip(line));
    if (*start == ';' || *start == '#') {
    } else if (*start == '[') {
      end = find_char_or_comment(start + 1, ']');
      if (*end == ']') {
        *end = '\0';
        strncpy0(section, start + 1, sizeof(section));
        *prev_name = '\0';
      } else if (!error) {
        error = lineno;
      }
    } else if (*start && *start != ';') {
      end = find_char_or_comment(start, '=');
      if (*end != '=') {
        end = find_char_or_comment(start, ':');
      }
      if (*end == '=' || *end == ':') {
        *end = '\0';
        name = rstrip(start);
        value = lskip(end + 1);
        end = find_char_or_comment(value, '\0');
        if (*end == ';')
          *end = '\0';
        rstrip(value);
        strncpy0(prev_name, name, sizeof(prev_name));
        if (!handler(user, section, name, value) && !error)
          error = lineno;
      } else if (!error) {
        error = lineno;
      }
    }
  }
  return error;
}
```