user: 请将这段汇编代码片段转换成等效的C代码:

```asm
<nss_shadow_parse>:
  endbr64
  push   %rbx
  sub    $0x20,%rsp
  mov    %rdi,%rbx
  mov    %rsi,0x8(%rsp)
  mov    %fs:0x28,%rdx
  mov    %rdx,0x18(%rsp)
  xor    %edx,%edx
  mov    %rsi,(%rdi)
L253:
  mov    0x8(%rsp),%rax
  cmpb   $0x3a,(%rax)
  je     L34
  lea    0x1(%rax),%rdx
  mov    %rdx,0x8(%rsp)
  cmpb   $0x0,(%rax)
  jne    L253
  mov    $0xffffffff,%eax
L106:
  mov    0x18(%rsp),%rdx
  sub    %fs:0x28,%rdx
  jne    L76
  add    $0x20,%rsp
  pop    %rbx
  ret
L34:
  lea    0x1(%rax),%rdx
  mov    %rdx,0x8(%rsp)
  movb   $0x0,(%rax)
  mov    (%rbx),%rdx
  mov    $0xffffffff,%eax
  cmpb   $0x0,(%rdx)
  je     L106
  mov    0x8(%rsp),%rax
  mov    %rax,0x8(%rbx)
L94:
  mov    0x8(%rsp),%rax
  cmpb   $0x3a,(%rax)
  je     L234
  lea    0x1(%rax),%rdx
  mov    %rdx,0x8(%rsp)
  cmpb   $0x0,(%rax)
  jne    L94
  mov    $0xffffffff,%eax
  jmp    L106
L234:
  lea    0x1(%rax),%rdx
  mov    %rdx,0x8(%rsp)
  movb   $0x0,(%rax)
  mov    0x8(%rsp),%rdi
  cmpb   $0x0,(%rdi)
  jne    L220
L211:
  mov    $0xffffffff,%eax
  jmp    L106
L220:
  lea    0x10(%rsp),%rsi
  mov    $0xa,%edx
  call   <strtoul@plt>
  mov    %rax,0x10(%rbx)
  mov    0x10(%rsp),%rdi
  cmpb   $0x3a,(%rdi)
  jne    L211
  cmp    0x8(%rsp),%rdi
  mov    $0xffffffffffffffff,%rdx
  cmove  %rdx,%rax
  mov    %rax,0x10(%rbx)
  mov    %rdi,0x8(%rsp)
  cmpb   $0x0,(%rdi)
  jne    L239
L69:
  mov    $0xffffffff,%eax
  jmp    L106
L239:
  lea    0x10(%rsp),%rsi
  mov    $0xa,%edx
  call   <strtoul@plt>
  mov    %rax,0x18(%rbx)
  mov    0x10(%rsp),%rdi
  cmpb   $0x3a,(%rdi)
  jne    L69
  cmp    0x8(%rsp),%rdi
  mov    $0xffffffffffffffff,%rdx
  cmove  %rdx,%rax
  mov    %rax,0x18(%rbx)
  mov    %rdi,0x8(%rsp)
  cmpb   $0x0,(%rdi)
  jne    L244
L146:
  mov    $0xffffffff,%eax
  jmp    L106
L244:
  lea    0x10(%rsp),%rsi
  mov    $0xa,%edx
  call   <strtoul@plt>
  mov    %rax,0x20(%rbx)
  mov    0x10(%rsp),%rdi
  cmpb   $0x3a,(%rdi)
  jne    L146
  cmp    0x8(%rsp),%rdi
  mov    $0xffffffffffffffff,%rdx
  cmove  %rdx,%rax
  mov    %rax,0x20(%rbx)
  mov    %rdi,0x8(%rsp)
  cmpb   $0x0,(%rdi)
  jne    L6
L152:
  mov    $0xffffffff,%eax
  jmp    L106
L6:
  lea    0x10(%rsp),%rsi
  mov    $0xa,%edx
  call   <strtoul@plt>
  mov    %rax,0x28(%rbx)
  mov    0x10(%rsp),%rdi
  cmpb   $0x3a,(%rdi)
  jne    L152
  cmp    0x8(%rsp),%rdi
  mov    $0xffffffffffffffff,%rdx
  cmove  %rdx,%rax
  mov    %rax,0x28(%rbx)
  mov    %rdi,0x8(%rsp)
  cmpb   $0x0,(%rdi)
  jne    L96
L47:
  mov    $0xffffffff,%eax
  jmp    L106
L96:
  lea    0x10(%rsp),%rsi
  mov    $0xa,%edx
  call   <strtoul@plt>
  mov    %rax,0x30(%rbx)
  mov    0x10(%rsp),%rdi
  cmpb   $0x3a,(%rdi)
  jne    L47
  cmp    0x8(%rsp),%rdi
  mov    $0xffffffffffffffff,%rdx
  cmove  %rdx,%rax
  mov    %rax,0x30(%rbx)
  mov    %rdi,0x8(%rsp)
  cmpb   $0x0,(%rdi)
  jne    L45
L275:
  mov    $0xffffffff,%eax
  jmp    L106
L45:
  lea    0x10(%rsp),%rsi
  mov    $0xa,%edx
  call   <strtoul@plt>
  mov    %rax,0x38(%rbx)
  mov    0x10(%rsp),%rdi
  cmpb   $0x3a,(%rdi)
  jne    L275
  cmp    0x8(%rsp),%rdi
  mov    $0xffffffffffffffff,%rdx
  cmove  %rdx,%rax
  mov    %rax,0x38(%rbx)
  mov    %rdi,0x8(%rsp)
  cmpb   $0x0,(%rdi)
  jne    L105
  movq   $0xffffffffffffffff,0x40(%rbx)
  mov    $0x1,%eax
  jmp    L106
L105:
  lea    0x8(%rsp),%rsi
  mov    $0xa,%edx
  call   <strtoul@plt>
  mov    %rax,0x40(%rbx)
  mov    0x8(%rsp),%rax
  cmpb   $0x1,(%rax)
  sbb    %eax,%eax
  and    $0x2,%eax
  sub    $0x1,%eax
  jmp    L106
L76:
  call   <__stack_chk_fail@plt>
```

assistant: ```c
int nss_shadow_parse(struct spwd *result, char *buf, size_t bufl) {
  result->sp_namp = buf;
  while (*buf != ':')
    if (!*buf++)
      return -1;
  *buf++ = '\0';
  if (!result->sp_namp[0])
    return -1;
  result->sp_pwdp = buf;
  while (*buf != ':')
    if (!*buf++)
      return -1;
  *buf++ = '\0';
  {
    char *endp;
    if (!*buf)
      return -1;
    result->sp_lstchg = (long)(strtoul(buf, &endp, 10));
    if (*endp != ':')
      return -1;
    if (endp == buf)
      result->sp_lstchg = (long)(-1);
    buf = endp;
  };
  {
    char *endp;
    if (!*buf)
      return -1;
    result->sp_min = (long)(strtoul(buf, &endp, 10));
    if (*endp != ':')
      return -1;
    if (endp == buf)
      result->sp_min = (long)(-1);
    buf = endp;
  };
  {
    char *endp;
    if (!*buf)
      return -1;
    result->sp_max = (long)(strtoul(buf, &endp, 10));
    if (*endp != ':')
      return -1;
    if (endp == buf)
      result->sp_max = (long)(-1);
    buf = endp;
  };
  {
    char *endp;
    if (!*buf)
      return -1;
    result->sp_warn = (long)(strtoul(buf, &endp, 10));
    if (*endp != ':')
      return -1;
    if (endp == buf)
      result->sp_warn = (long)(-1);
    buf = endp;
  };
  {
    char *endp;
    if (!*buf)
      return -1;
    result->sp_inact = (long)(strtoul(buf, &endp, 10));
    if (*endp != ':')
      return -1;
    if (endp == buf)
      result->sp_inact = (long)(-1);
    buf = endp;
  };
  {
    char *endp;
    if (!*buf)
      return -1;
    result->sp_expire = (long)(strtoul(buf, &endp, 10));
    if (*endp != ':')
      return -1;
    if (endp == buf)
      result->sp_expire = (long)(-1);
    buf = endp;
  };
  if (*buf) {
    result->sp_flag = strtoul(buf, &buf, 10);
    if (*buf)
      return -1;
  } else
    result->sp_flag = ~0ul;
  bufl = bufl;
  return 1;
}
```