user: Please show me the C implementation that matches the assembly code listed below:

```asm
<main>:
  endbr64
  push   %rbp
  push   %rbx
  sub    $0x88,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,0x78(%rsp)
  xor    %eax,%eax
  movl   $0x1,0x10(%rsp)
  movl   $0x2,0x14(%rsp)
  movl   $0x3,0x18(%rsp)
  movl   $0x4,0x1c(%rsp)
  movl   $0x5,0x20(%rsp)
  movl   $0x6,0x24(%rsp)
  movl   $0x7,0x28(%rsp)
  movl   $0x8,0x2c(%rsp)
  movl   $0x9,0x30(%rsp)
  movl   $0xa,0x34(%rsp)
  movl   $0xb,0x38(%rsp)
  lea    D48(%rip),%rdi
  call   <puts@plt>
  lea    0x10(%rsp),%rbx
  mov    $0xa,%ecx
  mov    $0xa,%edx
  mov    $0x0,%esi
  mov    %rbx,%rdi
  call   <binary_search@plt>
  mov    %eax,%esi
  lea    D26(%rip),%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  mov    $0xffffffff,%ecx
  mov    $0xa,%edx
  mov    $0x0,%esi
  mov    %rbx,%rdi
  call   <binary_search@plt>
  mov    %eax,%esi
  lea    D15(%rip),%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  movl   $0x1,0x40(%rsp)
  movl   $0x2,0x44(%rsp)
  movl   $0x2,0x48(%rsp)
  movl   $0x3,0x4c(%rsp)
  movl   $0x4,0x50(%rsp)
  movl   $0x4,0x54(%rsp)
  movl   $0x4,0x58(%rsp)
  movl   $0x5,0x5c(%rsp)
  movl   $0x6,0x60(%rsp)
  movl   $0x7,0x64(%rsp)
  movl   $0x7,0x68(%rsp)
  lea    0x40(%rsp),%rbp
  mov    $0x2,%ecx
  mov    $0xa,%edx
  mov    $0x0,%esi
  mov    %rbp,%rdi
  call   <binary_search_left@plt>
  mov    %eax,%esi
  lea    D56(%rip),%rbx
  mov    %rbx,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  mov    $0x4,%ecx
  mov    $0xa,%edx
  mov    $0x0,%esi
  mov    %rbp,%rdi
  call   <binary_search_left@plt>
  mov    %eax,%esi
  lea    D1(%rip),%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  movl   $0x1,0xc(%rsp)
  lea    0xc(%rsp),%rbp
  mov    $0x1,%ecx
  mov    $0x0,%edx
  mov    $0x0,%esi
  mov    %rbp,%rdi
  call   <binary_search@plt>
  mov    %eax,%esi
  lea    D13(%rip),%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  mov    $0x2,%ecx
  mov    $0x0,%edx
  mov    $0x0,%esi
  mov    %rbp,%rdi
  call   <binary_search@plt>
  mov    %eax,%esi
  mov    %rbx,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  mov    0x78(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L7
  mov    $0x0,%eax
  add    $0x88,%rsp
  pop    %rbx
  pop    %rbp
  ret
L7:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: unpack_data
arguments: data_tag: D48
data_type: string
name: unpack_data
arguments: data_tag: D26
data_type: string
name: unpack_data
arguments: data_tag: D15
data_type: string
name: unpack_data
arguments: data_tag: D56
data_type: string
name: unpack_data
arguments: data_tag: D1
data_type: string
name: unpack_data
arguments: data_tag: D13
data_type: string

tool: D48: base test: 

tool: D26: find 10: %d


tool: D15: find -1: %d


tool: D56: find 2: %d


tool: D1: find 4: %d


tool: D13: 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;
}
```