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

```asm
<nss_passwd_parse>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x30,%rsp
  mov    %rdi,-0x18(%rbp)
  mov    %rsi,-0x20(%rbp)
  mov    %rdx,-0x28(%rbp)
  mov    %fs:0x28,%rax
  mov    %rax,-0x8(%rbp)
  xor    %eax,%eax
  mov    -0x18(%rbp),%rax
  mov    -0x20(%rbp),%rdx
  mov    %rdx,(%rax)
  jmp    L7
L83:
  mov    -0x20(%rbp),%rax
  lea    0x1(%rax),%rdx
  mov    %rdx,-0x20(%rbp)
  movzbl (%rax),%eax
  test   %al,%al
  jne    L7
  mov    $0xffffffff,%eax
  jmp    L18
L7:
  mov    -0x20(%rbp),%rax
  movzbl (%rax),%eax
  cmp    $0x3a,%al
  jne    L83
  mov    -0x20(%rbp),%rax
  lea    0x1(%rax),%rdx
  mov    %rdx,-0x20(%rbp)
  movb   $0x0,(%rax)
  mov    -0x18(%rbp),%rax
  mov    (%rax),%rax
  movzbl (%rax),%eax
  test   %al,%al
  jne    L6
  mov    $0xffffffff,%eax
  jmp    L18
L6:
  mov    -0x18(%rbp),%rax
  mov    -0x20(%rbp),%rdx
  mov    %rdx,0x8(%rax)
  jmp    L79
L118:
  mov    -0x20(%rbp),%rax
  lea    0x1(%rax),%rdx
  mov    %rdx,-0x20(%rbp)
  movzbl (%rax),%eax
  test   %al,%al
  jne    L79
  mov    $0xffffffff,%eax
  jmp    L18
L79:
  mov    -0x20(%rbp),%rax
  movzbl (%rax),%eax
  cmp    $0x3a,%al
  jne    L118
  mov    -0x20(%rbp),%rax
  lea    0x1(%rax),%rdx
  mov    %rdx,-0x20(%rbp)
  movb   $0x0,(%rax)
  lea    -0x10(%rbp),%rcx
  mov    -0x20(%rbp),%rax
  mov    $0xa,%edx
  mov    %rcx,%rsi
  mov    %rax,%rdi
  call   <strtoul@plt>
  mov    -0x18(%rbp),%rdx
  mov    %rax,0x30(%rdx)
  mov    -0x10(%rbp),%rax
  cmp    %rax,-0x20(%rbp)
  jne    L190
  mov    $0xffffffff,%eax
  jmp    L18
L190:
  mov    -0x10(%rbp),%rax
  lea    0x1(%rax),%rdx
  mov    %rdx,-0x10(%rbp)
  movzbl (%rax),%eax
  cmp    $0x3a,%al
  je     L198
  mov    $0xffffffff,%eax
  jmp    L18
L198:
  mov    -0x10(%rbp),%rax
  mov    %rax,-0x20(%rbp)
  lea    -0x10(%rbp),%rcx
  mov    -0x20(%rbp),%rax
  mov    $0xa,%edx
  mov    %rcx,%rsi
  mov    %rax,%rdi
  call   <strtoul@plt>
  mov    -0x18(%rbp),%rdx
  mov    %rax,0x28(%rdx)
  mov    -0x10(%rbp),%rax
  cmp    %rax,-0x20(%rbp)
  jne    L78
  mov    $0xffffffff,%eax
  jmp    L18
L78:
  mov    -0x10(%rbp),%rax
  lea    0x1(%rax),%rdx
  mov    %rdx,-0x10(%rbp)
  movzbl (%rax),%eax
  cmp    $0x3a,%al
  je     L258
  mov    $0xffffffff,%eax
  jmp    L18
L258:
  mov    -0x10(%rbp),%rax
  mov    %rax,-0x20(%rbp)
  mov    -0x18(%rbp),%rax
  mov    -0x20(%rbp),%rdx
  mov    %rdx,0x10(%rax)
  jmp    L225
L161:
  mov    -0x20(%rbp),%rax
  lea    0x1(%rax),%rdx
  mov    %rdx,-0x20(%rbp)
  movzbl (%rax),%eax
  test   %al,%al
  jne    L225
  mov    $0xffffffff,%eax
  jmp    L18
L225:
  mov    -0x20(%rbp),%rax
  movzbl (%rax),%eax
  cmp    $0x3a,%al
  jne    L161
  mov    -0x20(%rbp),%rax
  lea    0x1(%rax),%rdx
  mov    %rdx,-0x20(%rbp)
  movb   $0x0,(%rax)
  mov    -0x18(%rbp),%rax
  mov    -0x20(%rbp),%rdx
  mov    %rdx,0x18(%rax)
  jmp    L16
L199:
  mov    -0x20(%rbp),%rax
  lea    0x1(%rax),%rdx
  mov    %rdx,-0x20(%rbp)
  movzbl (%rax),%eax
  test   %al,%al
  jne    L16
  mov    $0xffffffff,%eax
  jmp    L18
L16:
  mov    -0x20(%rbp),%rax
  movzbl (%rax),%eax
  cmp    $0x3a,%al
  jne    L199
  mov    -0x20(%rbp),%rax
  lea    0x1(%rax),%rdx
  mov    %rdx,-0x20(%rbp)
  movb   $0x0,(%rax)
  mov    -0x18(%rbp),%rax
  mov    -0x20(%rbp),%rdx
  mov    %rdx,0x20(%rax)
  mov    $0x1,%eax
L18:
  mov    -0x8(%rbp),%rdx
  sub    %fs:0x28,%rdx
  je     L234
  call   <__stack_chk_fail@plt>
L234:
  leave
  ret
```

assistant: ```c
int nss_passwd_parse(struct passwd *result, char *buf, size_t bufl) {
  result->pw_name = buf;
  while (*buf != ':')
    if (!*buf++)
      return -1;
  *buf++ = '\0';
  if (!result->pw_name[0])
    return -1;
  result->pw_passwd = buf;
  while (*buf != ':')
    if (!*buf++)
      return -1;
  *buf++ = '\0';
  {
    char *endp;
    result->pw_uid = (uid_t)(strtoul(buf, &endp, 10));
    if (endp == buf)
      return -1;
    if (*endp++ != ':')
      return -1;
    buf = endp;
  };
  {
    char *endp;
    result->pw_gid = (gid_t)(strtoul(buf, &endp, 10));
    if (endp == buf)
      return -1;
    if (*endp++ != ':')
      return -1;
    buf = endp;
  };
  result->pw_gecos = buf;
  while (*buf != ':')
    if (!*buf++)
      return -1;
  *buf++ = '\0';
  result->pw_dir = buf;
  while (*buf != ':')
    if (!*buf++)
      return -1;
  *buf++ = '\0';
  result->pw_shell = buf;
  bufl = bufl;
  return 1;
}
```