user: 请从给定的汇编指令推导出C源代码：

```asm
<parsegroup>:
  endbr64
  push   %r15
  mov    %rcx,%r15
  mov    $0x32,%ecx
  pxor   %xmm0,%xmm0
  push   %r14
  push   %r13
  mov    %rdi,%r13
  push   %r12
  push   %rbp
  mov    %rsi,%rbp
  push   %rbx
  mov    %rdx,%rbx
  sub    $0x1d8,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,0x1c8(%rsp)
  xor    %eax,%eax
  lea    0x30(%rsp),%rdi
  movaps %xmm0,0x10(%rsp)
  rep stos %rax,%es:(%rdi)
  mov    %r13,%rdi
  call   <strlen@plt>
  lea    0x1(%rax),%r12d
  mov    %r12d,0x20(%rsp)
  cmp    %r15d,%r12d
  jg     L51
  mov    %r15d,%r9d
  mov    %r13,%rdx
  mov    $0x1,%ecx
  xor    %eax,%eax
  test   %r12d,%r12d
  jle    L33
  nopw   0x0(%rax,%rax,1)
L128:
  add    $0x1,%eax
  cmpb   $0x3a,(%rdx)
  je     L111
  add    $0x1,%rdx
  cmp    %eax,%r12d
  jg     L128
  cmp    $0x4,%ecx
  jne    L33
L170:
  mov    0x1c(%rsp),%r8d
  mov    %r8d,0x30(%rsp)
  cmp    %r12d,%r8d
  jge    L135
  mov    %r12d,%edx
  lea    0x1(%r8),%eax
  sub    %r8d,%edx
  cltq
  lea    -0x1(%rdx),%ecx
  movslq %r8d,%rdx
  lea    0x2(%rcx,%rdx,1),%rdx
  mov    $0x1,%ecx
  nopl   (%rax)
L114:
  cmpb   $0x2c,-0x1(%r13,%rax,1)
  jne    L32
  movslq %ecx,%rsi
  add    $0x1,%ecx
  mov    %eax,0x30(%rsp,%rsi,4)
L32:
  add    $0x1,%rax
  cmp    %rax,%rdx
  jne    L114
  lea    0x1(%rcx),%r14d
  movslq %r14d,%r14
  shl    $0x3,%r14
L14:
  movslq %r12d,%rax
  movslq %ecx,%rcx
  add    %r14,%rax
  mov    %r12d,0x30(%rsp,%rcx,4)
  cmp    %r15,%rax
  jbe    L159
L51:
  mov    D8(%rip),%rax
  mov    (%rax),%eax
L154:
  mov    0x1c8(%rsp),%rdx
  sub    %fs:0x28,%rdx
  jne    L174
  add    $0x1d8,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
  nopl   0x0(%rax,%rax,1)
L111:
  mov    %eax,0x10(%rsp,%rcx,4)
  mov    0x20(%rsp),%r12d
  lea    0x1(%rcx),%esi
  add    $0x1,%rdx
  cmp    %eax,%r12d
  jle    L125
  movslq %esi,%rcx
  jmp    L128
  nopl   0x0(%rax)
L33:
  mov    D5(%rip),%rax
  mov    (%rax),%eax
  jmp    L154
  nopl   0x0(%rax,%rax,1)
L159:
  mov    %r9d,%edx
  mov    %rbx,%rdi
  xor    %esi,%esi
  mov    %rcx,0x8(%rsp)
  mov    %r8d,0x4(%rsp)
  call   <memset@plt>
  movslq 0x18(%rsp),%rsi
  mov    0x4(%rsp),%r8d
  mov    %rbx,%rdi
  sub    %esi,%r8d
  mov    %esi,0x4(%rsp)
  add    %r13,%rsi
  lea    -0x1(%r8),%edx
  mov    %r8d,%r15d
  call   <memcpy@plt>
  movslq %r15d,%r8
  mov    %rbx,%rdi
  movb   $0x0,(%rbx,%r8,1)
  call   <atoi@plt>
  mov    %r12d,%edx
  mov    %rbx,%rdi
  xor    %esi,%esi
  mov    %eax,0x18(%rbp)
  call   <memset@plt>
  mov    0x14(%rsp),%r15d
  mov    %rbx,%rdi
  mov    %r13,%rsi
  mov    %rbx,0x0(%rbp)
  lea    -0x1(%r15),%edx
  call   <memcpy@plt>
  movslq %r15d,%rsi
  mov    0x4(%rsp),%r9d
  add    %rsi,%rbx
  add    %r13,%rsi
  movb   $0x0,(%rbx)
  sub    %r15d,%r9d
  mov    %rbx,%rdi
  lea    0x34(%rsp),%r15
  mov    %rbx,0x8(%rbp)
  mov    %r9d,%r12d
  lea    -0x1(%r9),%edx
  call   <memcpy@plt>
  movslq %r12d,%r9
  mov    0x8(%rsp),%rcx
  add    %r9,%rbx
  movb   $0x0,(%rbx)
  add    %rbx,%r14
  lea    (%rbx,%rcx,8),%r12
  mov    %rbx,0x10(%rbp)
  nop
L171:
  movslq -0x4(%r15),%rsi
  mov    (%r15),%ebp
  mov    %r14,%rdi
  add    $0x8,%rbx
  add    $0x4,%r15
  sub    %esi,%ebp
  add    %r13,%rsi
  lea    -0x1(%rbp),%edx
  movslq %ebp,%rbp
  call   <memcpy@plt>
  mov    %r14,%rax
  add    %rbp,%r14
  movb   $0x0,(%r14)
  mov    %rax,-0x8(%rbx)
  cmp    %r12,%rbx
  jne    L171
  movq   $0x0,(%rbx)
  xor    %eax,%eax
  jmp    L154
  nopl   0x0(%rax,%rax,1)
L125:
  mov    %esi,%ecx
  cmp    $0x4,%ecx
  je     L170
  jmp    L33
L135:
  mov    $0x10,%r14d
  mov    $0x1,%ecx
  jmp    L14
L174:
  call   <__stack_chk_fail@plt>
```

assistant: ```c
int parsegroup(char *str, struct group *result, char *buffer, size_t buflen) {
  int fields[4 + 1] = {0};
  int members[100] = {0};
  int i, field, len;
  char **bufp;
  fields[4] = strlen(str) + 1;
  if (fields[4] > (int)buflen) {
    return ERANGE;
  }
  for (field = 1, i = 0; i < fields[4]; i++) {
    if (str[i] == ':') {
      fields[field++] = i + 1;
    }
  }
  if (field != 4) {
    return ENOENT;
  }
  members[0] = fields[3];
  for (field = 1, i = fields[3]; i < fields[4]; i++) {
    if (str[i] == ',') {
      members[field++] = i + 1;
    }
  }
  members[field] = fields[4];
  if ((fields[4] + ((field + 1) * sizeof(char *))) > buflen) {
    return ERANGE;
  }
  do {
    memset(buffer, 0, buflen);
    memcpy(buffer, &str[fields[2]], ((fields[2 + 1] - fields[2]) - 1));
    buffer[((fields[2 + 1] - fields[2]) - 1) + 1] = '\0';
    result->gr_gid = atoi(buffer);
  } while (0);
  memset(buffer, 0, fields[4]);
  do {
    result->gr_name = buffer;
    memcpy(buffer, &str[fields[0]], ((fields[0 + 1] - fields[0]) - 1));
    buffer[((fields[0 + 1] - fields[0]) - 1) + 1] = '\0';
    buffer += ((fields[0 + 1] - fields[0]) - 1) + 1;
  } while (0);
  do {
    result->gr_passwd = buffer;
    memcpy(buffer, &str[fields[1]], ((fields[1 + 1] - fields[1]) - 1));
    buffer[((fields[1 + 1] - fields[1]) - 1) + 1] = '\0';
    buffer += ((fields[1 + 1] - fields[1]) - 1) + 1;
  } while (0);
  result->gr_mem = bufp = (char **)buffer;
  buffer += (sizeof(char *) * (field + 1));
  for (i = 0; i < field; i++) {
    len = ((members[i + 1] - members[i]) - 1);
    memcpy(buffer, &str[members[i]], len);
    buffer[len + 1] = '\0';
    *(bufp++) = buffer;
    buffer += len + 1;
  }
  *bufp = NULL;
  return 0;
}
```