user: What is the c source code of the assembly code below?

```asm
<__getgrent>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x18,%rsp
  mov    %edi,%r13d
  mov    %fs:0x28,%rax
  mov    %rax,0x8(%rsp)
  xor    %eax,%eax
  lea    D94(%rip),%rbp
  mov    %rsp,%r15
  movabs $0x900000600,%r14
  jmp    L56
L52:
  bt     %rax,%r14
  jae    L164
L56:
  mov    $0x80,%edx
  mov    %rbp,%rsi
  mov    %r13d,%edi
  call   <read@plt>
  mov    %eax,%ebx
  test   %eax,%eax
  jle    L165
  mov    $0xa,%esi
  mov    %rbp,%rdi
  call   <strchr@plt>
  mov    %rax,%r12
  test   %rax,%rax
  je     L47
  lea    0x1(%rax),%rsi
  movslq %ebx,%rbx
  add    %rbp,%rbx
  sub    %rbx,%rsi
  mov    D36(%rip),%rax
  mov    (%rax),%edx
  mov    %r13d,%edi
  call   <lseek@plt>
  movzbl 0x0(%rbp),%eax
  cmp    $0x23,%al
  jbe    L52
L164:
  movb   $0x0,(%r12)
  mov    %rbp,D64(%rip)
  mov    $0x3a,%esi
  mov    %rbp,%rdi
  call   <strchr@plt>
  test   %rax,%rax
  je     L56
  lea    0x1(%rax),%rdi
  movb   $0x0,(%rax)
  mov    %rdi,D80(%rip)
  mov    $0x3a,%esi
  call   <strchr@plt>
  test   %rax,%rax
  je     L56
  lea    0x1(%rax),%rbx
  movb   $0x0,(%rax)
  mov    $0x3a,%esi
  mov    %rbx,%rdi
  call   <strchr@plt>
  mov    %rax,%r12
  test   %rax,%rax
  je     L56
  movb   $0x0,(%rax)
  mov    $0xa,%edx
  mov    %r15,%rsi
  mov    %rbx,%rdi
  call   <strtoul@plt>
  mov    %rax,D71(%rip)
  mov    (%rsp),%rax
  cmpb   $0x0,(%rax)
  jne    L56
  add    $0x1,%r12
  mov    $0x0,%ebx
  lea    D101(%rip),%r13
  jmp    L102
L47:
  mov    $0x80,%edx
  mov    %rbp,%rsi
  mov    %r13d,%edi
  call   <read@plt>
  mov    %eax,%ebx
  test   %eax,%eax
  jle    L85
  mov    $0xa,%esi
  mov    %rbp,%rdi
  call   <strchr@plt>
  test   %rax,%rax
  je     L47
  sub    %rbp,%rax
  movslq %ebx,%rbx
  sub    %rbx,%rax
  lea    0x1(%rax),%rsi
  mov    D36(%rip),%rax
  mov    (%rax),%edx
  mov    %r13d,%edi
  call   <lseek@plt>
  jmp    L56
L17:
  movb   $0x0,(%rax)
  mov    %r12,0x0(%r13,%rbx,8)
  add    $0x1,%rbx
  lea    0x1(%rax),%r12
L102:
  mov    $0x2c,%esi
  mov    %r12,%rdi
  call   <strchr@plt>
  test   %rax,%rax
  jne    L17
  cmpb   $0x0,(%r12)
  jne    L30
  movslq %ebx,%rbp
  lea    D101(%rip),%rax
  movq   $0x0,(%rax,%rbp,8)
L34:
  lea    D101(%rip),%rax
  mov    %rax,D85(%rip)
  lea    D64(%rip),%r12
  jmp    L85
L30:
  lea    D101(%rip),%rdx
  movslq %ebx,%rax
  mov    %r12,(%rdx,%rax,8)
  lea    0x1(%rbx),%eax
  cltq
  movq   $0x0,(%rdx,%rax,8)
  jmp    L34
L165:
  mov    $0x0,%r12d
L85:
  mov    0x8(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L46
  mov    %r12,%rax
  add    $0x18,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
L46:
  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;
}
```