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

```asm
<main>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  add    $0xffffffffffffff80,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,-0x8(%rbp)
  xor    %eax,%eax
  movl   $0x1,-0x70(%rbp)
  movl   $0x2,-0x6c(%rbp)
  movl   $0x3,-0x68(%rbp)
  movl   $0x4,-0x64(%rbp)
  movl   $0x5,-0x60(%rbp)
  movl   $0x6,-0x5c(%rbp)
  movl   $0x7,-0x58(%rbp)
  movl   $0x8,-0x54(%rbp)
  movl   $0x9,-0x50(%rbp)
  movl   $0xa,-0x4c(%rbp)
  movl   $0xb,-0x48(%rbp)
  lea    D58(%rip),%rax
  mov    %rax,%rdi
  call   <puts@plt>
  lea    -0x70(%rbp),%rax
  mov    $0xa,%ecx
  mov    $0xa,%edx
  mov    $0x0,%esi
  mov    %rax,%rdi
  call   <binary_search@plt>
  mov    %eax,%esi
  lea    D36(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  lea    -0x70(%rbp),%rax
  mov    $0xffffffff,%ecx
  mov    $0xa,%edx
  mov    $0x0,%esi
  mov    %rax,%rdi
  call   <binary_search@plt>
  mov    %eax,%esi
  lea    D54(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  movl   $0x1,-0x40(%rbp)
  movl   $0x2,-0x3c(%rbp)
  movl   $0x2,-0x38(%rbp)
  movl   $0x3,-0x34(%rbp)
  movl   $0x4,-0x30(%rbp)
  movl   $0x4,-0x2c(%rbp)
  movl   $0x4,-0x28(%rbp)
  movl   $0x5,-0x24(%rbp)
  movl   $0x6,-0x20(%rbp)
  movl   $0x7,-0x1c(%rbp)
  movl   $0x7,-0x18(%rbp)
  movl   $0xb,-0x78(%rbp)
  mov    -0x78(%rbp),%eax
  lea    -0x1(%rax),%edx
  lea    -0x40(%rbp),%rax
  mov    $0x2,%ecx
  mov    $0x0,%esi
  mov    %rax,%rdi
  call   <binary_search_left@plt>
  mov    %eax,%esi
  lea    D52(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  mov    -0x78(%rbp),%eax
  lea    -0x1(%rax),%edx
  lea    -0x40(%rbp),%rax
  mov    $0x4,%ecx
  mov    $0x0,%esi
  mov    %rax,%rdi
  call   <binary_search_left@plt>
  mov    %eax,%esi
  lea    D6(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  movl   $0x1,-0x74(%rbp)
  lea    -0x74(%rbp),%rax
  mov    $0x1,%ecx
  mov    $0x0,%edx
  mov    $0x0,%esi
  mov    %rax,%rdi
  call   <binary_search@plt>
  mov    %eax,%esi
  lea    D19(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  lea    -0x74(%rbp),%rax
  mov    $0x2,%ecx
  mov    $0x0,%edx
  mov    $0x0,%esi
  mov    %rax,%rdi
  call   <binary_search@plt>
  mov    %eax,%esi
  lea    D52(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  mov    $0x0,%eax
  mov    -0x8(%rbp),%rdx
  sub    %fs:0x28,%rdx
  je     L3
  call   <__stack_chk_fail@plt>
L3:
  leave
  ret
```

tool_calls: name: retrieve_data
arguments: data_tag: D58
type_guessed: string
name: retrieve_data
arguments: data_tag: D36
type_guessed: string
name: retrieve_data
arguments: data_tag: D54
type_guessed: string
name: retrieve_data
arguments: data_tag: D52
type_guessed: string
name: retrieve_data
arguments: data_tag: D6
type_guessed: string
name: retrieve_data
arguments: data_tag: D19
type_guessed: string

tool: D58: base test: 

tool: D36: find 10: %d


tool: D54: find -1: %d


tool: D52: find 2: %d


tool: D6: find 4: %d


tool: D19: find 1: %d


assistant: ```c
int main() {
  int arr1[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11};
  printf("base test: \n");
  printf("find 10: %d\n", binary_search(arr1, 0, 10, 10));
  printf("find -1: %d\n", binary_search(arr1, 0, 10, -1));
  int arr2[] = {1, 2, 2, 3, 4, 4, 4, 5, 6, 7, 7};
  int len = sizeof(arr2) / sizeof(int);
  printf("find 2: %d\n", binary_search_left(arr2, 0, len - 1, 2));
  printf("find 4: %d\n", binary_search_left(arr2, 0, len - 1, 4));
  int arr3[] = {1};
  printf("find 1: %d\n", binary_search(arr3, 0, 0, 1));
  printf("find 2: %d\n", binary_search(arr3, 0, 0, 2));
  return 0;
}
```