user: 请显示与下面列出的汇编代码相匹配的C语言实现:

```asm
<renumber_groups>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  lea    0x1(%rdi),%r13d
  push   %r12
  mov    %edx,%r12d
  push   %rbp
  mov    %rsi,%rbp
  push   %rbx
  mov    %edi,%ebx
  lea    0x0(,%r13,4),%edi
  sub    $0x8,%rsp
  call   <ckalloc@plt>
  mov    %rax,%r9
  test   %ebx,%ebx
  jle    L98
  lea    0x10(%rbp),%rsi
  lea    0x10(%r9),%rdx
  cmp    %rsi,%rax
  setae  %al
  cmp    %rdx,%rbp
  setae  %dl
  or     %dl,%al
  je     L73
  cmp    $0x1,%ebx
  je     L73
  lea    -0x1(%rbx),%r10d
  mov    %ebx,%ecx
  cmp    $0x2,%r10d
  jbe    L102
  mov    %ebx,%eax
  mov    %r9,%rcx
  pxor   %xmm0,%xmm0
  shr    $0x2,%eax
  sub    %rbp,%rcx
  lea    -0x1(%rax),%edx
  mov    %rbp,%rax
  shl    $0x4,%rdx
  add    %rsi,%rdx
  nopw   0x0(%rax,%rax,1)
L184:
  movdqu (%rax),%xmm1
  movups %xmm1,(%rcx,%rax,1)
  add    $0x10,%rax
  movups %xmm0,-0x10(%rax)
  cmp    %rdx,%rax
  jne    L184
  mov    %ebx,%edx
  and    $0xfffffffc,%edx
  mov    %edx,%eax
  cmp    %edx,%ebx
  je     L152
  mov    %ebx,%ecx
  sub    %edx,%ecx
  cmp    $0x1,%ecx
  je     L108
L239:
  lea    0x0(%rbp,%rdx,4),%rsi
  mov    (%rsi),%rdi
  mov    %rdi,(%r9,%rdx,4)
  mov    %ecx,%edx
  and    $0xfffffffe,%edx
  movq   $0x0,(%rsi)
  add    %edx,%eax
  cmp    %ecx,%edx
  je     L152
L108:
  cltq
  lea    0x0(%rbp,%rax,4),%rdx
  mov    (%rdx),%ecx
  mov    %ecx,(%r9,%rax,4)
  movl   $0x0,(%rdx)
L152:
  test   %r12d,%r12d
  jle    L103
  mov    %ebx,%eax
  mov    %rbp,%rcx
  lea    (%r9,%rax,4),%rdx
  sub    %r9,%rcx
  mov    %r9,%rax
  nopw   0x0(%rax,%rax,1)
L100:
  cmp    %r12d,(%rax)
  jne    L223
  movl   $0x1,(%rcx,%rax,1)
  movl   $0x0,(%rax)
L223:
  add    $0x4,%rax
  cmp    %rax,%rdx
  jne    L100
  mov    $0x1,%r12d
L81:
  mov    %r13d,%r11d
  mov    %rbp,%r13
  mov    %r9,%rcx
  mov    $0x1,%esi
  lea    0x8(%r9),%r14
  sub    %r9,%r13
  jmp    L45
L9:
  add    $0x1,%rsi
  mov    %r8,%rcx
  cmp    %rsi,%r11
  je     L112
L45:
  mov    (%rcx),%edx
  lea    0x4(%rcx),%r8
  test   %edx,%edx
  je     L9
  add    $0x1,%r12d
  cmp    %esi,%ebx
  jle    L167
  mov    %r10d,%r15d
  mov    %r8,%rax
  sub    %esi,%r15d
  lea    -0x1(%rsi,%r15,1),%rdi
  lea    (%r14,%rdi,4),%rdi
  jmp    L95
  nopw   0x0(%rax,%rax,1)
L29:
  mov    (%rcx),%edx
L95:
  cmp    %edx,(%rax)
  jne    L122
  mov    %r12d,0x0(%r13,%rax,1)
  movl   $0x0,(%rax)
L122:
  add    $0x4,%rax
  cmp    %rdi,%rax
  jne    L29
L167:
  mov    %r12d,-0x4(%rbp,%rsi,4)
  add    $0x1,%rsi
  movl   $0x0,(%rcx)
  mov    %r8,%rcx
  cmp    %rsi,%r11
  jne    L45
L112:
  mov    %r9,%rdi
  call   <ckfree@plt>
  add    $0x8,%rsp
  mov    %r12d,%eax
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
  nopl   0x0(%rax,%rax,1)
L103:
  xor    %r12d,%r12d
  jmp    L81
L73:
  lea    -0x1(%rbx),%eax
  mov    %r9,%rcx
  mov    %rax,%r10
  lea    0x4(%rbp,%rax,4),%rsi
  sub    %rbp,%rcx
  mov    %rbp,%rax
  nopl   0x0(%rax)
L191:
  mov    (%rax),%edx
  mov    %edx,(%rcx,%rax,1)
  add    $0x4,%rax
  movl   $0x0,-0x4(%rax)
  cmp    %rsi,%rax
  jne    L191
  jmp    L152
L98:
  test   %r12d,%r12d
  setg   %r12b
  movzbl %r12b,%r12d
  jmp    L112
L102:
  xor    %edx,%edx
  xor    %eax,%eax
  jmp    L239
```

assistant: ```c
int renumber_groups(int nseqs, int *aligned_group, int first_group) {
  int i, j;
  int naligned_groups;
  int *tmp;
  tmp = (int *)ckalloc((nseqs + 1) * sizeof(int));
  for (i = 0; i < nseqs; i++) {
    tmp[i] = aligned_group[i];
    aligned_group[i] = 0;
  }
  naligned_groups = 0;
  if (first_group > 0) {
    for (i = 0; i < nseqs; i++)
      if (tmp[i] == first_group) {
        aligned_group[i] = 1;
        tmp[i] = 0;
      }
    naligned_groups++;
  }
  for (i = 0; i < nseqs; i++)
    if (tmp[i] != 0) {
      for (j = i + 1; j < nseqs; j++)
        if (tmp[j] == tmp[i]) {
          aligned_group[j] = naligned_groups + 1;
          tmp[j] = 0;
        }
      aligned_group[i] = naligned_groups + 1;
      tmp[i] = 0;
      naligned_groups++;
    }
  tmp = ckfree(tmp);
  return naligned_groups;
}
```