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

```asm
<__getgrent>:
  endbr64
  push   %r14
  push   %r13
  movabs $0xfffffff6fffff9ff,%r13
  push   %r12
  mov    %edi,%r12d
  push   %rbp
  lea    D39(%rip),%rbp
  push   %rbx
  sub    $0x10,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,0x8(%rsp)
  xor    %eax,%eax
  nopl   0x0(%rax)
L43:
  mov    $0x80,%edx
  mov    %rbp,%rsi
  mov    %r12d,%edi
  call   <read@plt>
  movslq %eax,%rbx
  test   %ebx,%ebx
  jle    L119
  mov    $0xa,%esi
  mov    %rbp,%rdi
  call   <strchr@plt>
  mov    %rax,%r14
  test   %rax,%rax
  je     L70
  lea    0x1(%rax),%rsi
  mov    D0(%rip),%rax
  add    %rbp,%rbx
  mov    %r12d,%edi
  sub    %rbx,%rsi
  mov    (%rax),%edx
  call   <lseek@plt>
  movzbl 0x0(%rbp),%eax
  cmp    $0x23,%al
  jbe    L13
L107:
  movb   $0x0,(%r14)
  mov    $0x3a,%esi
  mov    %rbp,%rdi
  mov    %rbp,D77(%rip)
  call   <strchr@plt>
  test   %rax,%rax
  je     L43
  movb   $0x0,(%rax)
  lea    0x1(%rax),%rdi
  mov    $0x3a,%esi
  mov    %rdi,D25(%rip)
  call   <strchr@plt>
  test   %rax,%rax
  je     L43
  movb   $0x0,(%rax)
  lea    0x1(%rax),%r14
  mov    $0x3a,%esi
  mov    %r14,%rdi
  call   <strchr@plt>
  mov    %rax,%rbx
  test   %rax,%rax
  je     L43
  movb   $0x0,(%rax)
  mov    %rsp,%rsi
  mov    $0xa,%edx
  mov    %r14,%rdi
  call   <strtoul@plt>
  mov    %rax,D57(%rip)
  mov    (%rsp),%rax
  cmpb   $0x0,(%rax)
  jne    L43
  add    $0x1,%rbx
  xor    %ebp,%ebp
  lea    D45(%rip),%r13
  jmp    L16
  nopw   0x0(%rax,%rax,1)
L91:
  movb   $0x0,(%rax)
  mov    %rbx,0x0(%r13,%rbp,8)
  add    $0x1,%rbp
  lea    0x1(%rax),%rbx
L16:
  mov    $0x2c,%esi
  mov    %rbx,%rdi
  movslq %ebp,%r12
  call   <strchr@plt>
  test   %rax,%rax
  jne    L91
  cmpb   $0x0,(%rbx)
  jne    L48
  movq   $0x0,0x0(%r13,%r12,8)
L52:
  mov    %r13,D63(%rip)
  lea    D77(%rip),%rax
  jmp    L81
  nopw   0x0(%rax,%rax,1)
L44:
  mov    $0xa,%esi
  mov    %rbp,%rdi
  call   <strchr@plt>
  test   %rax,%rax
  jne    L105
L70:
  mov    $0x80,%edx
  mov    %rbp,%rsi
  mov    %r12d,%edi
  call   <read@plt>
  movslq %eax,%rbx
  test   %ebx,%ebx
  jg     L44
L119:
  xor    %eax,%eax
L81:
  mov    0x8(%rsp),%rdx
  sub    %fs:0x28,%rdx
  jne    L134
  add    $0x10,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  ret
  nopl   0x0(%rax,%rax,1)
L13:
  bt     %rax,%r13
  jae    L43
  jmp    L107
  nop
L105:
  sub    %rbp,%rax
  mov    %r12d,%edi
  sub    %rbx,%rax
  lea    0x1(%rax),%rsi
  mov    D0(%rip),%rax
  mov    (%rax),%edx
  call   <lseek@plt>
  jmp    L43
L48:
  movslq %r12d,%rax
  mov    %rbx,0x0(%r13,%rax,8)
  lea    0x1(%r12),%eax
  cltq
  movq   $0x0,0x0(%r13,%rax,8)
  jmp    L52
L134:
  call   <__stack_chk_fail@plt>
```

assistant: ```c
struct group *__getgrent(int grp_fd) {
  static char line_buff[128];
  static char *members[11];
  static struct group group;
  char *ptr;
  char *field_begin;
  int member_num;
  char *endptr;
  int line_len;
restart:
  if ((line_len = read(grp_fd, line_buff, 128)) <= 0)
    return NULL;
  field_begin = strchr(line_buff, '\n');
  if (field_begin != NULL)
    lseek(grp_fd, (long)(1 + field_begin - (line_buff + line_len)), SEEK_CUR);
  else {
    do {
      if ((line_len = read(grp_fd, line_buff, 128)) <= 0)
        return NULL;
    } while (!(field_begin = strchr(line_buff, '\n')));
    lseek(grp_fd, (long)((field_begin - line_buff) - line_len + 1), SEEK_CUR);
    goto restart;
  }
  if (*line_buff == '#' || *line_buff == ' ' || *line_buff == '\n' || *line_buff == '\t')
    goto restart;
  *field_begin = '\0';
  group.gr_name = line_buff;
  ptr = strchr(line_buff, ':');
  if (ptr == NULL)
    goto restart;
  *ptr++ = '\0';
  group.gr_passwd = ptr;
  ptr = strchr(ptr, ':');
  if (ptr == NULL)
    goto restart;
  *ptr++ = '\0';
  field_begin = ptr;
  ptr = strchr(ptr, ':');
  if (ptr == NULL)
    goto restart;
  *ptr++ = '\0';
  group.gr_gid = (gid_t)strtoul(field_begin, &endptr, 10);
  if (*endptr != '\0')
    goto restart;
  member_num = 0;
  field_begin = ptr;
  while ((ptr = strchr(ptr, ',')) != NULL) {
    *ptr = '\0';
    ptr++;
    members[member_num] = field_begin;
    field_begin = ptr;
    member_num++;
  }
  if (*field_begin == '\0')
    members[member_num] = NULL;
  else {
    members[member_num] = field_begin;
    members[member_num + 1] = NULL;
  }
  group.gr_mem = members;
  return &group;
}
```