user: What would the C source look like for the assembly code provided here:

```asm
<sgetpwent>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  push   %r12
  push   %rbx
  sub    $0x60,%rsp
  mov    %rdi,-0x68(%rbp)
  mov    %fs:0x28,%rax
  mov    %rax,-0x18(%rbp)
  xor    %eax,%eax
  mov    -0x68(%rbp),%rax
  mov    %rax,%rdi
  call   <strlen@plt>
  cmp    $0x3ff,%eax
  jbe    L12
  mov    $0x0,%eax
  jmp    L23
L12:
  mov    -0x68(%rbp),%rax
  mov    %rax,%rsi
  lea    D0(%rip),%rax
  mov    %rax,%rdi
  call   <strcpy@plt>
  lea    D0(%rip),%rbx
  mov    $0x0,%r12d
  jmp    L209
L166:
  movslq %r12d,%rax
  mov    %rbx,-0x50(%rbp,%rax,8)
  jmp    L9
L224:
  add    $0x1,%rbx
L9:
  movzbl (%rbx),%eax
  test   %al,%al
  je     L218
  movzbl (%rbx),%eax
  cmp    $0x3a,%al
  jne    L224
L218:
  movzbl (%rbx),%eax
  test   %al,%al
  je     L73
  mov    %rbx,%rax
  lea    0x1(%rax),%rbx
  movb   $0x0,(%rax)
  jmp    L114
L73:
  mov    $0x0,%ebx
L114:
  add    $0x1,%r12d
L209:
  cmp    $0x6,%r12d
  jg     L212
  test   %rbx,%rbx
  jne    L166
L212:
  cmp    $0x7,%r12d
  jne    L148
  mov    -0x40(%rbp),%rax
  movzbl (%rax),%eax
  test   %al,%al
  je     L148
  mov    -0x38(%rbp),%rax
  movzbl (%rax),%eax
  test   %al,%al
  jne    L50
L148:
  mov    $0x0,%eax
  jmp    L23
L50:
  mov    -0x50(%rbp),%rax
  mov    %rax,D70(%rip)
  mov    -0x48(%rbp),%rax
  mov    %rax,D63(%rip)
  mov    -0x40(%rbp),%rax
  movzbl (%rax),%eax
  test   %al,%al
  je     L215
  mov    -0x40(%rbp),%rax
  lea    -0x58(%rbp),%rcx
  mov    $0xa,%edx
  mov    %rcx,%rsi
  mov    %rax,%rdi
  call   <strtol@plt>
  mov    %rax,D43(%rip)
  mov    D43(%rip),%rax
  test   %rax,%rax
  jne    L205
  mov    -0x58(%rbp),%rax
  movzbl (%rax),%eax
  test   %al,%al
  je     L205
L215:
  mov    $0x0,%eax
  jmp    L23
L205:
  mov    -0x38(%rbp),%rax
  movzbl (%rax),%eax
  test   %al,%al
  je     L113
  mov    -0x38(%rbp),%rax
  lea    -0x58(%rbp),%rcx
  mov    $0xa,%edx
  mov    %rcx,%rsi
  mov    %rax,%rdi
  call   <strtol@plt>
  mov    %rax,D78(%rip)
  mov    D78(%rip),%rax
  test   %rax,%rax
  jne    L118
  mov    -0x58(%rbp),%rax
  movzbl (%rax),%eax
  test   %al,%al
  je     L118
L113:
  mov    $0x0,%eax
  jmp    L23
L118:
  mov    -0x30(%rbp),%rax
  mov    %rax,D48(%rip)
  mov    -0x28(%rbp),%rax
  mov    %rax,D107(%rip)
  mov    -0x20(%rbp),%rax
  mov    %rax,D67(%rip)
  lea    D70(%rip),%rax
L23:
  mov    -0x18(%rbp),%rdx
  sub    %fs:0x28,%rdx
  je     L31
  call   <__stack_chk_fail@plt>
L31:
  add    $0x60,%rsp
  pop    %rbx
  pop    %r12
  pop    %rbp
  ret
```

assistant: ```c
struct passwd *sgetpwent(const char *buf) {
  static struct passwd pwent;
  static char pwdbuf[1024];
  register int i;
  register char *cp;
  char *ep;
  char *fields[7];
  if (strlen(buf) >= sizeof pwdbuf)
    return 0;
  strcpy(pwdbuf, buf);
  for (cp = pwdbuf, i = 0; i < 7 && cp; i++) {
    fields[i] = cp;
    while (*cp && *cp != ':')
      ++cp;
    if (*cp)
      *cp++ = '\0';
    else
      cp = 0;
  }
  if (i != 7 || *fields[2] == '\0' || *fields[3] == '\0')
    return 0;
  pwent.pw_name = fields[0];
  pwent.pw_passwd = fields[1];
  if (fields[2][0] == '\0' || ((pwent.pw_uid = strtol(fields[2], &ep, 10)) == 0 && *ep)) {
    return 0;
  }
  if (fields[3][0] == '\0' || ((pwent.pw_gid = strtol(fields[3], &ep, 10)) == 0 && *ep)) {
    return 0;
  }
  pwent.pw_gecos = fields[4];
  pwent.pw_dir = fields[5];
  pwent.pw_shell = fields[6];
  return &pwent;
}
```