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

```asm
<picnic>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  push   %rbx
  sub    $0x38,%rsp
  mov    %edi,-0x34(%rbp)
  mov    %esi,-0x38(%rbp)
  mov    %rdx,-0x40(%rbp)
  cmpl   $0x0,-0x38(%rbp)
  jne    L86
  mov    $0x0,%eax
  jmp    L14
L86:
  mov    -0x34(%rbp),%eax
  cltq
  shl    $0x3,%rax
  mov    %rax,%rdi
  call   <malloc@plt>
  mov    %rax,-0x20(%rbp)
  movl   $0x0,-0x2c(%rbp)
  movl   $0x0,-0x28(%rbp)
  movl   $0x0,-0x2c(%rbp)
  jmp    L113
L9:
  mov    -0x34(%rbp),%eax
  cltq
  shl    $0x2,%rax
  mov    -0x2c(%rbp),%edx
  movslq %edx,%rdx
  lea    0x0(,%rdx,8),%rcx
  mov    -0x20(%rbp),%rdx
  lea    (%rcx,%rdx,1),%rbx
  mov    %rax,%rdi
  call   <malloc@plt>
  mov    %rax,(%rbx)
  movl   $0x0,-0x28(%rbp)
  jmp    L80
L92:
  mov    -0x2c(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x20(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%rdx
  mov    -0x28(%rbp),%eax
  cltq
  shl    $0x2,%rax
  add    %rdx,%rax
  movl   $0x0,(%rax)
  addl   $0x1,-0x28(%rbp)
L80:
  mov    -0x28(%rbp),%eax
  cmp    -0x34(%rbp),%eax
  jl     L92
  addl   $0x1,-0x2c(%rbp)
L113:
  mov    -0x2c(%rbp),%eax
  cmp    -0x34(%rbp),%eax
  jl     L9
  movl   $0x0,-0x2c(%rbp)
  jmp    L79
L84:
  mov    -0x2c(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x40(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x20(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%rdx
  mov    -0x2c(%rbp),%eax
  cltq
  add    $0x1,%rax
  lea    0x0(,%rax,4),%rcx
  mov    -0x40(%rbp),%rax
  add    %rcx,%rax
  mov    (%rax),%eax
  cltq
  shl    $0x2,%rax
  add    %rdx,%rax
  movl   $0x1,(%rax)
  mov    -0x2c(%rbp),%eax
  cltq
  add    $0x1,%rax
  lea    0x0(,%rax,4),%rdx
  mov    -0x40(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x20(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%rdx
  mov    -0x2c(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rcx
  mov    -0x40(%rbp),%rax
  add    %rcx,%rax
  mov    (%rax),%eax
  cltq
  shl    $0x2,%rax
  add    %rdx,%rax
  movl   $0x1,(%rax)
  addl   $0x2,-0x2c(%rbp)
L79:
  mov    -0x38(%rbp),%eax
  add    %eax,%eax
  cmp    %eax,-0x2c(%rbp)
  jl     L84
  mov    -0x34(%rbp),%eax
  cltq
  shl    $0x2,%rax
  mov    %rax,%rdi
  call   <malloc@plt>
  mov    %rax,-0x18(%rbp)
  movl   $0x0,-0x2c(%rbp)
  jmp    L17
L40:
  mov    -0x2c(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x18(%rbp),%rax
  add    %rdx,%rax
  movl   $0x0,(%rax)
  addl   $0x1,-0x2c(%rbp)
L17:
  mov    -0x2c(%rbp),%eax
  cmp    -0x34(%rbp),%eax
  jl     L40
  mov    -0x20(%rbp),%rdx
  mov    -0x34(%rbp),%ecx
  mov    -0x18(%rbp),%rax
  mov    %ecx,%esi
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <take_friend@plt>
  mov    %eax,-0x24(%rbp)
  movl   $0x0,-0x2c(%rbp)
  jmp    L45
L48:
  mov    -0x2c(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x20(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%rax
  mov    %rax,%rdi
  call   <free@plt>
  addl   $0x1,-0x2c(%rbp)
L45:
  mov    -0x2c(%rbp),%eax
  cmp    -0x34(%rbp),%eax
  jl     L48
  mov    -0x20(%rbp),%rax
  mov    %rax,%rdi
  call   <free@plt>
  mov    -0x24(%rbp),%eax
L14:
  mov    -0x8(%rbp),%rbx
  leave
  ret
```

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;
}
```