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

```asm
<picnic>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x28,%rsp
  mov    %esi,0xc(%rsp)
  mov    %rdx,0x10(%rsp)
  test   %esi,%esi
  jne    L76
L166:
  mov    0xc(%rsp),%eax
  add    $0x28,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
  nopw   0x0(%rax,%rax,1)
L76:
  movslq %edi,%r14
  mov    %edi,%r15d
  lea    0x0(,%r14,8),%rdi
  shl    $0x2,%r14
  call   <malloc@plt>
  mov    %rax,%rbp
  test   %r15d,%r15d
  jle    L50
  mov    %rax,%r12
  lea    -0x1(%r15),%eax
  mov    %r15d,%ebx
  mov    %eax,0x8(%rsp)
  mov    %r15d,%eax
  and    $0xfffffffc,%ebx
  mov    %rax,0x18(%rsp)
  lea    0x0(%rbp,%rax,8),%rax
  mov    %rax,(%rsp)
  mov    %r15d,%eax
  shr    $0x2,%eax
  lea    -0x1(%rax),%r13d
  add    $0x1,%r13
  shl    $0x4,%r13
  nop
L6:
  mov    %r14,%rdi
  call   <malloc@plt>
  cmpl   $0x2,0x8(%rsp)
  pxor   %xmm0,%xmm0
  mov    %rax,(%r12)
  mov    %rax,%rdx
  jbe    L8
  lea    0x0(%r13,%rax,1),%rcx
  nopl   0x0(%rax,%rax,1)
L17:
  movups %xmm0,(%rax)
  add    $0x10,%rax
  cmp    %rax,%rcx
  jne    L17
  mov    %ebx,%eax
  cmp    %r15d,%ebx
  je     L102
L99:
  movslq %eax,%rcx
  movl   $0x0,(%rdx,%rcx,4)
  lea    0x0(,%rcx,4),%r9
  lea    0x1(%rax),%ecx
  cmp    %r15d,%ecx
  jge    L102
  movl   $0x0,0x4(%rdx,%r9,1)
  add    $0x2,%eax
  cmp    %eax,%r15d
  jle    L102
  movl   $0x0,0x8(%rdx,%r9,1)
L102:
  add    $0x8,%r12
  cmp    (%rsp),%r12
  jne    L6
  mov    0xc(%rsp),%r12d
  add    %r12d,%r12d
  test   %r12d,%r12d
  jle    L147
L107:
  sub    $0x1,%r12d
  mov    0x10(%rsp),%rax
  shr    %r12d
  mov    %r12d,%edx
  lea    0x8(%rax,%rdx,8),%rsi
  xchg   %ax,%ax
L4:
  movslq (%rax),%rdx
  movslq 0x4(%rax),%rcx
  add    $0x8,%rax
  mov    0x0(%rbp,%rdx,8),%rdx
  movl   $0x1,(%rdx,%rcx,4)
  movslq -0x4(%rax),%rdx
  movslq -0x8(%rax),%rcx
  mov    0x0(%rbp,%rdx,8),%rdx
  movl   $0x1,(%rdx,%rcx,4)
  cmp    %rax,%rsi
  jne    L4
  mov    %r14,%rdi
  call   <malloc@plt>
  mov    %rax,%rdi
  mov    %r15d,%eax
  mov    %rax,0x18(%rsp)
  test   %r15d,%r15d
  jle    L15
L81:
  mov    0x18(%rsp),%r14
  xor    %esi,%esi
  mov    %rbp,%rbx
  lea    0x0(,%r14,4),%rdx
  lea    0x0(%rbp,%r14,8),%r13
  call   <memset@plt>
  mov    %rbp,%rdx
  mov    %r15d,%esi
  mov    %rax,%rdi
  xor    %eax,%eax
  call   <take_friend@plt>
  mov    %eax,0xc(%rsp)
  nopl   0x0(%rax,%rax,1)
L90:
  mov    (%rbx),%rdi
  add    $0x8,%rbx
  call   <free@plt>
  cmp    %rbx,%r13
  jne    L90
L126:
  mov    %rbp,%rdi
  call   <free@plt>
  jmp    L166
  xchg   %ax,%ax
L8:
  xor    %eax,%eax
  jmp    L99
L50:
  mov    0xc(%rsp),%r12d
  add    %r12d,%r12d
  test   %r12d,%r12d
  jg     L107
  mov    %r14,%rdi
  call   <malloc@plt>
  mov    %rax,%rdi
L15:
  mov    %rbp,%rdx
  mov    %r15d,%esi
  xor    %eax,%eax
  call   <take_friend@plt>
  mov    %eax,0xc(%rsp)
  jmp    L126
L147:
  mov    %r14,%rdi
  call   <malloc@plt>
  mov    %rax,%rdi
  jmp    L81
```

assistant: ```c
int picnic(int student_count, int friendship_count, int *friendships) {
  if (friendship_count == 0) {
    return 0;
  }
  int **grouped_friendships = (int **)malloc(sizeof(int *) * student_count);
  int i = 0;
  int j = 0;
  for (i = 0; i < student_count; i++) {
    grouped_friendships[i] = (int *)malloc(sizeof(int) * (student_count));
    for (j = 0; j < student_count; j++) {
      grouped_friendships[i][j] = 0;
    }
  }
  for (i = 0; i < 2 * friendship_count; i += 2) {
    grouped_friendships[friendships[i]][friendships[i + 1]] = 1;
    grouped_friendships[friendships[i + 1]][friendships[i]] = 1;
  }
  int *taken = (int *)malloc(sizeof(int) * student_count);
  for (i = 0; i < student_count; i++) {
    taken[i] = 0;
  }
  int result = take_friend(taken, student_count, grouped_friendships);
  for (i = 0; i < student_count; i++) {
    free(grouped_friendships[i]);
  }
  free(grouped_friendships);
  return result;
}
```