user: 这段汇编代码用C语言表示是什么样的?

```asm
<__getgrent>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  movabs $0xfffffff6fffff9ff,%rbp
  push   %rbx
  mov    %edi,%ebx
  sub    $0x18,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,0x8(%rsp)
  xor    %eax,%eax
L116:
  mov    D118(%rip),%rdi
L128:
  mov    $0x100,%esi
  mov    $0x100,%r12d
  xor    %r13d,%r13d
  call   <realloc@plt>
  jmp    L58
  nopw   0x0(%rax,%rax,1)
L83:
  mov    D118(%rip),%rdi
  mov    $0xa,%esi
  call   <strchr@plt>
  mov    %rax,%r15
  test   %rax,%rax
  jne    L18
  lea    0x100(%r12),%r14d
  mov    D118(%rip),%rdi
  mov    %r12d,%r13d
  movswl %r14w,%esi
  mov    %r14d,%r12d
  call   <realloc@plt>
L58:
  mov    %r12d,%edx
  movswq %r13w,%rcx
  mov    %ebx,%edi
  mov    %rax,D124(%rip)
  sub    %r13d,%edx
  lea    (%rax,%rcx,1),%rsi
  movswl %dx,%edx
  call   <read@plt>
  mov    %eax,%r14d
  test   %eax,%eax
  jg     L83
  xor    %eax,%eax
L132:
  mov    0x8(%rsp),%rdx
  sub    %fs:0x28,%rdx
  jne    L169
  add    $0x18,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
  nopw   0x0(%rax,%rax,1)
L18:
  lea    0x1(%rax),%rsi
  movswl %r13w,%eax
  mov    %ebx,%edi
  add    %r14d,%eax
  cltq
  add    D124(%rip),%rax
  sub    %rax,%rsi
  mov    D124(%rip),%rax
  mov    (%rax),%edx
  call   <lseek@plt>
  mov    D124(%rip),%rdi
  movb   $0x0,(%r15)
  movzbl (%rdi),%eax
  cmp    $0x23,%al
  jbe    L121
L46:
  mov    $0x3a,%esi
  mov    %rdi,D38(%rip)
  call   <strchr@plt>
  test   %rax,%rax
  je     L116
  movb   $0x0,(%rax)
  lea    0x1(%rax),%rdi
  mov    $0x3a,%esi
  mov    %rdi,D7(%rip)
  call   <strchr@plt>
  test   %rax,%rax
  je     L116
  movb   $0x0,(%rax)
  lea    0x1(%rax),%r13
  mov    $0x3a,%esi
  mov    %r13,%rdi
  call   <strchr@plt>
  mov    %rax,%r12
  test   %rax,%rax
  je     L116
  movb   $0x0,(%rax)
  mov    %rsp,%rsi
  mov    $0xa,%edx
  mov    %r13,%rdi
  call   <strtoul@plt>
  mov    %rax,D36(%rip)
  mov    (%rsp),%rax
  cmpb   $0x0,(%rax)
  jne    L116
  mov    D116(%rip),%rdi
  test   %rdi,%rdi
  je     L126
  call   <free@plt>
L126:
  mov    $0x8,%edi
  add    $0x1,%r12
  xor    %ebp,%ebp
  call   <malloc@plt>
  jmp    L89
L122:
  mov    D116(%rip),%rdi
  movb   $0x0,(%rax)
  add    $0x1,%ebp
  lea    0x1(%rax),%rbx
  lea    0x8(,%rbp,8),%esi
  mov    %r12,(%rdi,%rdx,8)
  movswl %si,%esi
  mov    %rbx,%r12
  call   <realloc@plt>
L89:
  mov    $0x2c,%esi
  mov    %r12,%rdi
  mov    %rax,D141(%rip)
  call   <strchr@plt>
  movswq %bp,%rdx
  lea    0x0(,%rdx,8),%rcx
  test   %rax,%rax
  jne    L122
  mov    D141(%rip),%rax
  cmpb   $0x0,(%r12)
  lea    (%rax,%rcx,1),%rdx
  jne    L153
  movq   $0x0,(%rdx)
L6:
  mov    %rax,D141(%rip)
  lea    D38(%rip),%rax
  jmp    L132
  nopw   0x0(%rax,%rax,1)
L121:
  bt     %rax,%rbp
  jae    L128
  jmp    L46
L153:
  mov    %r12,(%rdx)
  movq   $0x0,0x8(%rax,%rcx,1)
  jmp    L6
L169:
  call   <__stack_chk_fail@plt>
```

assistant: ```c
struct group *__getgrent(int grp_fd) {
  static char *line_buff = NULL;
  static char **members = NULL;
  short line_index;
  short buff_size;
  static struct group group;
  char *ptr;
  char *field_begin;
  short member_num;
  char *endptr;
  int line_len;
restart:
  line_index = 0;
  buff_size = 256;
  line_buff = realloc(line_buff, buff_size);
  while (1) {
    if ((line_len = read(grp_fd, line_buff + line_index, buff_size - line_index)) <= 0)
      return NULL;
    field_begin = strchr(line_buff, '\n');
    if (field_begin != NULL) {
      lseek(grp_fd, (long)(1 + field_begin - (line_len + line_index + line_buff)), SEEK_CUR);
      *field_begin = '\0';
      if (*line_buff == '#' || *line_buff == ' ' || *line_buff == '\n' || *line_buff == '\t')
        goto restart;
      break;
    } else {
      line_index = buff_size;
      buff_size += 256;
      line_buff = realloc(line_buff, buff_size);
    }
  }
  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;
  if (members != NULL)
    free(members);
  members = (char **)malloc(1 * sizeof(char *));
  while ((ptr = strchr(ptr, ',')) != NULL) {
    *ptr = '\0';
    ptr++;
    members[member_num] = field_begin;
    field_begin = ptr;
    member_num++;
    members = (char **)realloc((void *)members, (member_num + 1) * sizeof(char *));
  }
  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;
}
```