user: Please show me the C implementation that matches the assembly code listed below:

```asm
<ini_parse_file>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x4e0,%rsp
  mov    %rdi,-0x4c8(%rbp)
  mov    %rsi,-0x4d0(%rbp)
  mov    %rdx,-0x4d8(%rbp)
  mov    %fs:0x28,%rax
  mov    %rax,-0x8(%rbp)
  xor    %eax,%eax
  movq   $0x0,-0x490(%rbp)
  movq   $0x0,-0x488(%rbp)
  movq   $0x0,-0x480(%rbp)
  movq   $0x0,-0x478(%rbp)
  movq   $0x0,-0x470(%rbp)
  movq   $0x0,-0x468(%rbp)
  movq   $0x0,-0x460(%rbp)
  movq   $0x0,-0x458(%rbp)
  movq   $0x0,-0x450(%rbp)
  movq   $0x0,-0x448(%rbp)
  movq   $0x0,-0x440(%rbp)
  movq   $0x0,-0x438(%rbp)
  movq   $0x0,-0x430(%rbp)
  movq   $0x0,-0x428(%rbp)
  movq   $0x0,-0x420(%rbp)
  movq   $0x0,-0x418(%rbp)
  movl   $0x0,-0x4b8(%rbp)
  movl   $0x0,-0x4b4(%rbp)
  jmp    L54
L186:
  addl   $0x1,-0x4b8(%rbp)
  lea    -0x410(%rbp),%rax
  mov    %rax,%rdi
  call   <rstrip@plt>
  mov    %rax,%rdi
  call   <lskip@plt>
  mov    %rax,-0x4a8(%rbp)
  mov    -0x4a8(%rbp),%rax
  movzbl (%rax),%eax
  cmp    $0x3b,%al
  je     L54
  mov    -0x4a8(%rbp),%rax
  movzbl (%rax),%eax
  cmp    $0x23,%al
  je     L54
  mov    -0x4a8(%rbp),%rax
  movzbl (%rax),%eax
  cmp    $0x5b,%al
  jne    L39
  mov    -0x4a8(%rbp),%rax
  add    $0x1,%rax
  mov    $0x5d,%esi
  mov    %rax,%rdi
  call   <find_char_or_comment@plt>
  mov    %rax,-0x4b0(%rbp)
  mov    -0x4b0(%rbp),%rax
  movzbl (%rax),%eax
  cmp    $0x5d,%al
  jne    L78
  mov    -0x4b0(%rbp),%rax
  movb   $0x0,(%rax)
  mov    -0x4a8(%rbp),%rax
  lea    0x1(%rax),%rcx
  lea    -0x490(%rbp),%rax
  mov    $0x40,%edx
  mov    %rcx,%rsi
  mov    %rax,%rdi
  call   <strncpy0@plt>
  movb   $0x0,-0x450(%rbp)
  jmp    L54
L78:
  cmpl   $0x0,-0x4b4(%rbp)
  jne    L54
  mov    -0x4b8(%rbp),%eax
  mov    %eax,-0x4b4(%rbp)
  jmp    L54
L39:
  mov    -0x4a8(%rbp),%rax
  movzbl (%rax),%eax
  test   %al,%al
  je     L54
  mov    -0x4a8(%rbp),%rax
  movzbl (%rax),%eax
  cmp    $0x3b,%al
  je     L54
  mov    -0x4a8(%rbp),%rax
  mov    $0x3d,%esi
  mov    %rax,%rdi
  call   <find_char_or_comment@plt>
  mov    %rax,-0x4b0(%rbp)
  mov    -0x4b0(%rbp),%rax
  movzbl (%rax),%eax
  cmp    $0x3d,%al
  je     L96
  mov    -0x4a8(%rbp),%rax
  mov    $0x3a,%esi
  mov    %rax,%rdi
  call   <find_char_or_comment@plt>
  mov    %rax,-0x4b0(%rbp)
L96:
  mov    -0x4b0(%rbp),%rax
  movzbl (%rax),%eax
  cmp    $0x3d,%al
  je     L47
  mov    -0x4b0(%rbp),%rax
  movzbl (%rax),%eax
  cmp    $0x3a,%al
  jne    L43
L47:
  mov    -0x4b0(%rbp),%rax
  movb   $0x0,(%rax)
  mov    -0x4a8(%rbp),%rax
  mov    %rax,%rdi
  call   <rstrip@plt>
  mov    %rax,-0x4a0(%rbp)
  mov    -0x4b0(%rbp),%rax
  add    $0x1,%rax
  mov    %rax,%rdi
  call   <lskip@plt>
  mov    %rax,-0x498(%rbp)
  mov    -0x498(%rbp),%rax
  mov    $0x0,%esi
  mov    %rax,%rdi
  call   <find_char_or_comment@plt>
  mov    %rax,-0x4b0(%rbp)
  mov    -0x4b0(%rbp),%rax
  movzbl (%rax),%eax
  cmp    $0x3b,%al
  jne    L129
  mov    -0x4b0(%rbp),%rax
  movb   $0x0,(%rax)
L129:
  mov    -0x498(%rbp),%rax
  mov    %rax,%rdi
  call   <rstrip@plt>
  mov    -0x4a0(%rbp),%rcx
  lea    -0x450(%rbp),%rax
  mov    $0x40,%edx
  mov    %rcx,%rsi
  mov    %rax,%rdi
  call   <strncpy0@plt>
  mov    -0x498(%rbp),%rcx
  mov    -0x4a0(%rbp),%rdx
  lea    -0x490(%rbp),%rsi
  mov    -0x4d8(%rbp),%rax
  mov    -0x4d0(%rbp),%r8
  mov    %rax,%rdi
  call   *%r8
  test   %eax,%eax
  jne    L54
  cmpl   $0x0,-0x4b4(%rbp)
  jne    L54
  mov    -0x4b8(%rbp),%eax
  mov    %eax,-0x4b4(%rbp)
  jmp    L54
L43:
  cmpl   $0x0,-0x4b4(%rbp)
  jne    L54
  mov    -0x4b8(%rbp),%eax
  mov    %eax,-0x4b4(%rbp)
L54:
  mov    -0x4c8(%rbp),%rdx
  lea    -0x410(%rbp),%rax
  mov    $0x400,%esi
  mov    %rax,%rdi
  call   <fgets@plt>
  test   %rax,%rax
  jne    L186
  mov    -0x4b4(%rbp),%eax
  mov    -0x8(%rbp),%rdx
  sub    %fs:0x28,%rdx
  je     L108
  call   <__stack_chk_fail@plt>
L108:
  leave
  ret
```

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;
}
```