user: Converte this assembly snippet into its equivalent C code:

```asm
<get_double_excitation>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x70,%rsp
  mov    %rdi,-0x58(%rbp)
  mov    %rsi,-0x60(%rbp)
  mov    %edx,-0x64(%rbp)
  mov    $0x10,%edi
  call   <malloc@plt>
  mov    %rax,-0x28(%rbp)
  movl   $0x2,-0x50(%rbp)
  movl   $0x0,-0x4c(%rbp)
  movq   $0x0,-0x30(%rbp)
  jmp    L53
L16:
  mov    -0x64(%rbp),%eax
  cltq
  sub    -0x30(%rbp),%rax
  sub    $0x1,%rax
  mov    %rax,-0x20(%rbp)
  mov    -0x20(%rbp),%rax
  lea    0x0(,%rax,8),%rdx
  mov    -0x58(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%rdx
  mov    -0x20(%rbp),%rax
  lea    0x0(,%rax,8),%rcx
  mov    -0x60(%rbp),%rax
  add    %rcx,%rax
  mov    (%rax),%rax
  xor    %rdx,%rax
  mov    %rax,-0x18(%rbp)
  mov    -0x20(%rbp),%rax
  lea    0x0(,%rax,8),%rdx
  mov    -0x60(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%rax
  and    -0x18(%rbp),%rax
  mov    %rax,-0x10(%rbp)
  mov    -0x20(%rbp),%rax
  lea    0x0(,%rax,8),%rdx
  mov    -0x58(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%rax
  and    -0x18(%rbp),%rax
  mov    %rax,-0x8(%rbp)
  mov    -0x10(%rbp),%rax
  mov    %rax,%rdi
  call   <popcount@plt>
  mov    %eax,-0x48(%rbp)
  mov    -0x8(%rbp),%rax
  mov    %rax,%rdi
  call   <popcount@plt>
  mov    %eax,-0x44(%rbp)
  cmpl   $0x1,-0x48(%rbp)
  jne    L79
  mov    -0x10(%rbp),%rax
  mov    %rax,%rdi
  call   <trailz@plt>
  mov    %eax,%edx
  mov    -0x30(%rbp),%rax
  shl    $0x6,%eax
  add    %eax,%edx
  mov    -0x50(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rcx
  mov    -0x28(%rbp),%rax
  add    %rcx,%rax
  mov    %edx,(%rax)
  addl   $0x1,-0x50(%rbp)
  jmp    L34
L79:
  cmpl   $0x2,-0x48(%rbp)
  jne    L34
  mov    -0x10(%rbp),%rax
  mov    %rax,%rdi
  call   <trailz@plt>
  mov    %eax,-0x40(%rbp)
  mov    -0x30(%rbp),%rax
  shl    $0x6,%eax
  mov    %eax,%edx
  mov    -0x40(%rbp),%eax
  add    %eax,%edx
  mov    -0x28(%rbp),%rax
  add    $0x8,%rax
  mov    %edx,(%rax)
  mov    -0x40(%rbp),%eax
  mov    $0x1,%edx
  mov    %eax,%ecx
  shl    %cl,%rdx
  mov    %rdx,%rax
  not    %rax
  and    %rax,-0x10(%rbp)
  mov    -0x10(%rbp),%rax
  mov    %rax,%rdi
  call   <trailz@plt>
  mov    %eax,-0x3c(%rbp)
  mov    -0x30(%rbp),%rax
  shl    $0x6,%eax
  mov    %eax,%edx
  mov    -0x3c(%rbp),%eax
  add    %eax,%edx
  mov    -0x28(%rbp),%rax
  add    $0xc,%rax
  mov    %edx,(%rax)
L34:
  cmpl   $0x1,-0x44(%rbp)
  jne    L2
  mov    -0x8(%rbp),%rax
  mov    %rax,%rdi
  call   <trailz@plt>
  mov    %eax,%edx
  mov    -0x30(%rbp),%rax
  shl    $0x6,%eax
  add    %eax,%edx
  mov    -0x4c(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rcx
  mov    -0x28(%rbp),%rax
  add    %rcx,%rax
  mov    %edx,(%rax)
  addl   $0x1,-0x4c(%rbp)
  jmp    L7
L2:
  cmpl   $0x2,-0x44(%rbp)
  jne    L7
  mov    -0x8(%rbp),%rax
  mov    %rax,%rdi
  call   <trailz@plt>
  mov    %eax,-0x38(%rbp)
  mov    -0x30(%rbp),%rax
  shl    $0x6,%eax
  mov    %eax,%edx
  mov    -0x38(%rbp),%eax
  add    %edx,%eax
  mov    %eax,%edx
  mov    -0x28(%rbp),%rax
  mov    %edx,(%rax)
  mov    -0x38(%rbp),%eax
  mov    $0x1,%edx
  mov    %eax,%ecx
  shl    %cl,%rdx
  mov    %rdx,%rax
  not    %rax
  and    %rax,-0x8(%rbp)
  mov    -0x8(%rbp),%rax
  mov    %rax,%rdi
  call   <trailz@plt>
  mov    %eax,-0x34(%rbp)
  mov    -0x30(%rbp),%rax
  shl    $0x6,%eax
  mov    %eax,%edx
  mov    -0x34(%rbp),%eax
  add    %eax,%edx
  mov    -0x28(%rbp),%rax
  add    $0x4,%rax
  mov    %edx,(%rax)
L7:
  addq   $0x1,-0x30(%rbp)
L53:
  mov    -0x64(%rbp),%eax
  cltq
  cmp    %rax,-0x30(%rbp)
  jb     L16
  mov    -0x28(%rbp),%rax
  leave
  ret
```

assistant: ```c
int *get_double_excitation(uint64_t *str1, uint64_t *str2, int nset) {
  size_t p;
  int *ijab = malloc(sizeof(int) * 4);
  int particle_ind = 2;
  int hole_ind = 0;
  for (p = 0; p < nset; ++p) {
    size_t pp = nset - p - 1;
    uint64_t str_tmp = str1[pp] ^ str2[pp];
    uint64_t str_particle = str_tmp & str2[pp];
    uint64_t str_hole = str_tmp & str1[pp];
    int n_particle = popcount(str_particle);
    int n_hole = popcount(str_hole);
    if (n_particle == 1) {
      ijab[particle_ind] = trailz(str_particle) + 64 * p;
      particle_ind++;
    } else if (n_particle == 2) {
      int a = trailz(str_particle);
      ijab[2] = a + 64 * p;
      str_particle &= ~(1ULL << a);
      int b = trailz(str_particle);
      ijab[3] = b + 64 * p;
    }
    if (n_hole == 1) {
      ijab[hole_ind] = trailz(str_hole) + 64 * p;
      hole_ind++;
    } else if (n_hole == 2) {
      int i = trailz(str_hole);
      ijab[0] = i + 64 * p;
      str_hole &= ~(1ULL << i);
      int j = trailz(str_hole);
      ijab[1] = j + 64 * p;
    }
  }
  return ijab;
}
```