user: 请将以下的汇编代码转换成C语言代码:

```asm
<__getgrent>:
  endbr64
  push   %r14
  push   %r13
  movabs $0xfffffff6fffff9ff,%r13
  push   %r12
  mov    %edi,%r12d
  push   %rbp
  lea    D78(%rip),%rbp
  push   %rbx
  sub    $0x10,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,0x8(%rsp)
  xor    %eax,%eax
  nopl   0x0(%rax)
L42:
  mov    $0x80,%edx
  mov    %rbp,%rsi
  mov    %r12d,%edi
  call   <read@plt>
  movslq %eax,%rbx
  test   %ebx,%ebx
  jle    L9
  mov    $0xa,%esi
  mov    %rbp,%rdi
  call   <strchr@plt>
  mov    %rax,%r14
  test   %rax,%rax
  je     L152
  lea    0x1(%rax),%rsi
  mov    D28(%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    L93
L137:
  movb   $0x0,(%r14)
  mov    $0x3a,%esi
  mov    %rbp,%rdi
  mov    %rbp,D56(%rip)
  call   <strchr@plt>
  test   %rax,%rax
  je     L42
  movb   $0x0,(%rax)
  lea    0x1(%rax),%rdi
  mov    $0x3a,%esi
  mov    %rdi,D55(%rip)
  call   <strchr@plt>
  test   %rax,%rax
  je     L42
  movb   $0x0,(%rax)
  lea    0x1(%rax),%r14
  mov    $0x3a,%esi
  mov    %r14,%rdi
  call   <strchr@plt>
  mov    %rax,%rbx
  test   %rax,%rax
  je     L42
  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    L42
  add    $0x1,%rbx
  xor    %ebp,%ebp
  lea    D42(%rip),%r13
  jmp    L156
  nopw   0x0(%rax,%rax,1)
L88:
  movb   $0x0,(%rax)
  mov    %rbx,0x0(%r13,%rbp,8)
  add    $0x1,%rbp
  lea    0x1(%rax),%rbx
L156:
  mov    $0x2c,%esi
  mov    %rbx,%rdi
  movslq %ebp,%r12
  call   <strchr@plt>
  test   %rax,%rax
  jne    L88
  cmpb   $0x0,(%rbx)
  jne    L80
  movq   $0x0,0x0(%r13,%r12,8)
L75:
  mov    %r13,D81(%rip)
  lea    D56(%rip),%rax
  jmp    L96
  nopw   0x0(%rax,%rax,1)
L3:
  mov    $0xa,%esi
  mov    %rbp,%rdi
  call   <strchr@plt>
  test   %rax,%rax
  jne    L8
L152:
  mov    $0x80,%edx
  mov    %rbp,%rsi
  mov    %r12d,%edi
  call   <read@plt>
  movslq %eax,%rbx
  test   %ebx,%ebx
  jg     L3
L9:
  xor    %eax,%eax
L96:
  mov    0x8(%rsp),%rdx
  sub    %fs:0x28,%rdx
  jne    L109
  add    $0x10,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  ret
  nopl   0x0(%rax,%rax,1)
L93:
  bt     %rax,%r13
  jae    L42
  jmp    L137
  nop
L8:
  sub    %rbp,%rax
  mov    %r12d,%edi
  sub    %rbx,%rax
  lea    0x1(%rax),%rsi
  mov    D28(%rip),%rax
  mov    (%rax),%edx
  call   <lseek@plt>
  jmp    L42
L80:
  movslq %r12d,%rax
  mov    %rbx,0x0(%r13,%rax,8)
  lea    0x1(%r12),%eax
  cltq
  movq   $0x0,0x0(%r13,%rax,8)
  jmp    L75
L109:
  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;
}
```