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

```asm
<testSelecting>:
  endbr64
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x40,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,0x38(%rsp)
  xor    %eax,%eax
  movabs $0x69505f7265746550,%rax
  movabs $0x6b6369705f726570,%rdx
  mov    %rax,(%rsp)
  mov    %rdx,0x8(%rsp)
  movabs $0x6365705f615f6465,%rax
  movabs $0x6369705f666f5f6b,%rdx
  mov    %rax,0x10(%rsp)
  mov    %rdx,0x18(%rsp)
  movabs $0x7065705f64656c6b,%rax
  mov    %rax,0x20(%rsp)
  movl   $0x73726570,0x28(%rsp)
  movw   $0x24,0x2c(%rsp)
  mov    %rsp,%rbx
  mov    %rbx,%rdi
  call   <strlen@plt>
  lea    0x1(%rax),%edi
  call   <malloc@plt>
  mov    %rax,%r12
  mov    %rbx,%rsi
  mov    %rax,%rdi
  call   <strcpy@plt>
  mov    %r12,%rdi
  call   <extractAlphabetLetters@plt>
  mov    %rax,%rbx
  mov    %rax,%rdi
  call   <strlen@plt>
  mov    %eax,%ebp
  mov    %r12,%rdi
  call   <strlen@plt>
  mov    %eax,%esi
  mov    %ebp,%ecx
  mov    %rbx,%rdx
  mov    %r12,%rdi
  call   <buildTree@plt>
  mov    %rax,%rbp
  mov    $0x0,%ecx
  mov    $0x24,%edx
  mov    %rbx,%rsi
  mov    %rax,%rdi
  call   <selectOp@plt>
  cmp    $0xffffffff,%eax
  sete   %dil
  movzbl %dil,%edi
  call   <assert@plt>
  mov    $0x1,%ecx
  mov    $0x24,%edx
  mov    %rbx,%rsi
  mov    %rbp,%rdi
  call   <selectOp@plt>
  cmp    $0x2c,%eax
  sete   %dil
  movzbl %dil,%edi
  call   <assert@plt>
  mov    $0x2,%ecx
  mov    $0x24,%edx
  mov    %rbx,%rsi
  mov    %rbp,%rdi
  call   <selectOp@plt>
  cmp    $0xffffffff,%eax
  sete   %dil
  movzbl %dil,%edi
  call   <assert@plt>
  mov    $0x1,%ecx
  mov    $0x6c,%edx
  mov    %rbx,%rsi
  mov    %rbp,%rdi
  call   <selectOp@plt>
  cmp    $0x21,%eax
  sete   %dil
  movzbl %dil,%edi
  call   <assert@plt>
  mov    $0x6,%ecx
  mov    $0x6f,%edx
  mov    %rbx,%rsi
  mov    %rbp,%rdi
  call   <selectOp@plt>
  cmp    $0xffffffff,%eax
  sete   %dil
  movzbl %dil,%edi
  call   <assert@plt>
  mov    $0x2,%ecx
  mov    $0x70,%edx
  mov    %rbx,%rsi
  mov    %rbp,%rdi
  call   <selectOp@plt>
  cmp    $0xc,%eax
  sete   %dil
  movzbl %dil,%edi
  call   <assert@plt>
  lea    D8(%rip),%rdi
  call   <print@plt>
  mov    %r12,%rdi
  call   <free@plt>
  mov    %rbp,%rdi
  call   <deleteTree@plt>
  mov    0x38(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L4
  add    $0x40,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  ret
L4:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: disassemble_data
arguments: data_label: D8
data_type: string

tool: D8: Selecting tests [PASSED]

assistant: ```c
void testSelecting() {
  char tmp[] = "Peter_Piper_picked_a_peck_of_pickled_peppers$";
  char *test = (char *)malloc((strlen(tmp) + 1) * sizeof(char));
  strcpy(test, tmp);
  char *used_alphabet = extractAlphabetLetters(test);
  struct WaveletTree *tree = buildTree(test, (int)strlen(test), used_alphabet, (int)strlen(used_alphabet));
  assert(selectOp(tree, used_alphabet, '$', 0) == -1);
  assert(selectOp(tree, used_alphabet, '$', 1) == 44);
  assert(selectOp(tree, used_alphabet, '$', 2) == -1);
  assert(selectOp(tree, used_alphabet, 'l', 1) == 33);
  assert(selectOp(tree, used_alphabet, 'o', 6) == -1);
  assert(selectOp(tree, used_alphabet, 'p', 2) == 12);
  print("Selecting tests [PASSED]");
  free((void *)test);
  deleteTree(tree);
}
```