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

```asm
<main>:
  endbr64
  push   %rbx
  sub    $0x120,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,0x118(%rsp)
  xor    %eax,%eax
  movl   $0x1,(%rsp)
  movl   $0x2,0x4(%rsp)
  movl   $0x3,0x8(%rsp)
  movl   $0x6,0xc(%rsp)
  movl   $0x7,0x10(%rsp)
  movl   $0x8,0x14(%rsp)
  movl   $0x9,0x18(%rsp)
  movl   $0xa,0x1c(%rsp)
  movl   $0xb,0x20(%rsp)
  mov    %rsp,%rbx
  mov    $0x7,%edx
  mov    $0x9,%esi
  mov    %rbx,%rdi
  call   <linear_search_for_num@plt>
  cmp    $0x4,%eax
  sete   %dil
  movzbl %dil,%edi
  call   <assert@plt>
  mov    $0x7,%edx
  mov    $0x9,%esi
  mov    %rbx,%rdi
  call   <binary_search_for_num@plt>
  cmp    $0x4,%eax
  sete   %dil
  movzbl %dil,%edi
  call   <assert@plt>
  movl   $0x1,0x30(%rsp)
  movl   $0x2,0x34(%rsp)
  movl   $0x3,0x38(%rsp)
  movl   $0x6,0x3c(%rsp)
  movl   $0x7,0x40(%rsp)
  movl   $0x8,0x44(%rsp)
  movl   $0x9,0x48(%rsp)
  movl   $0xa,0x4c(%rsp)
  movl   $0xb,0x50(%rsp)
  lea    0x30(%rsp),%rbx
  mov    $0xb,%edx
  mov    $0x9,%esi
  mov    %rbx,%rdi
  call   <linear_search_for_num@plt>
  cmp    $0x8,%eax
  sete   %dil
  movzbl %dil,%edi
  call   <assert@plt>
  mov    $0xb,%edx
  mov    $0x9,%esi
  mov    %rbx,%rdi
  call   <binary_search_for_num@plt>
  cmp    $0x8,%eax
  sete   %dil
  movzbl %dil,%edi
  call   <assert@plt>
  movl   $0x1,0x60(%rsp)
  movl   $0x2,0x64(%rsp)
  movl   $0x3,0x68(%rsp)
  movl   $0x6,0x6c(%rsp)
  movl   $0x7,0x70(%rsp)
  movl   $0x8,0x74(%rsp)
  movl   $0x9,0x78(%rsp)
  movl   $0x14,0x7c(%rsp)
  movl   $0x16,0x80(%rsp)
  lea    0x60(%rsp),%rbx
  mov    $0x1,%edx
  mov    $0x9,%esi
  mov    %rbx,%rdi
  call   <linear_search_for_num@plt>
  test   %eax,%eax
  sete   %dil
  movzbl %dil,%edi
  call   <assert@plt>
  mov    $0x1,%edx
  mov    $0x9,%esi
  mov    %rbx,%rdi
  call   <binary_search_for_num@plt>
  test   %eax,%eax
  sete   %dil
  movzbl %dil,%edi
  call   <assert@plt>
  movl   $0x1,0x90(%rsp)
  movl   $0x2,0x94(%rsp)
  movl   $0x3,0x98(%rsp)
  movl   $0x6,0x9c(%rsp)
  movl   $0x7,0xa0(%rsp)
  movl   $0x8,0xa4(%rsp)
  movl   $0x9,0xa8(%rsp)
  movl   $0x1e,0xac(%rsp)
  movl   $0x21,0xb0(%rsp)
  lea    0x90(%rsp),%rbx
  mov    $0x22,%edx
  mov    $0x9,%esi
  mov    %rbx,%rdi
  call   <linear_search_for_num@plt>
  cmp    $0xffffffff,%eax
  sete   %dil
  movzbl %dil,%edi
  call   <assert@plt>
  mov    $0x22,%edx
  mov    $0x9,%esi
  mov    %rbx,%rdi
  call   <binary_search_for_num@plt>
  cmp    $0xffffffff,%eax
  sete   %dil
  movzbl %dil,%edi
  call   <assert@plt>
  movl   $0x1,0xc0(%rsp)
  movl   $0x2,0xc4(%rsp)
  movl   $0x4,0xc8(%rsp)
  movl   $0x6,0xcc(%rsp)
  movl   $0x7,0xd0(%rsp)
  movl   $0x8,0xd4(%rsp)
  movl   $0x9,0xd8(%rsp)
  movl   $0x28,0xdc(%rsp)
  movl   $0x2c,0xe0(%rsp)
  lea    0xc0(%rsp),%rbx
  mov    $0x0,%edx
  mov    $0x9,%esi
  mov    %rbx,%rdi
  call   <linear_search_for_num@plt>
  cmp    $0xffffffff,%eax
  sete   %dil
  movzbl %dil,%edi
  call   <assert@plt>
  mov    $0x0,%edx
  mov    $0x9,%esi
  mov    %rbx,%rdi
  call   <binary_search_for_num@plt>
  cmp    $0xffffffff,%eax
  sete   %dil
  movzbl %dil,%edi
  call   <assert@plt>
  movl   $0x1,0xf0(%rsp)
  movl   $0x3,0xf4(%rsp)
  movl   $0x5,0xf8(%rsp)
  movl   $0x6,0xfc(%rsp)
  movl   $0x7,0x100(%rsp)
  movl   $0x8,0x104(%rsp)
  movl   $0x9,0x108(%rsp)
  movl   $0x32,0x10c(%rsp)
  movl   $0x37,0x110(%rsp)
  lea    0xf0(%rsp),%rbx
  mov    $0x2,%edx
  mov    $0x9,%esi
  mov    %rbx,%rdi
  call   <linear_search_for_num@plt>
  cmp    $0xffffffff,%eax
  sete   %dil
  movzbl %dil,%edi
  call   <assert@plt>
  mov    $0x2,%edx
  mov    $0x9,%esi
  mov    %rbx,%rdi
  call   <binary_search_for_num@plt>
  cmp    $0xffffffff,%eax
  sete   %dil
  movzbl %dil,%edi
  call   <assert@plt>
  mov    0x118(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L4
  mov    $0x0,%eax
  add    $0x120,%rsp
  pop    %rbx
  ret
L4:
  call   <__stack_chk_fail@plt>
```

assistant: ```c
int main() {
  int array0[] = {1, 2, 3, 6, 7, 8, 9, 10, 11};
  int len0 = sizeof(array0) / sizeof(int);
  int num0 = 7;
  int exp_index0 = 4;
  assert(exp_index0 == linear_search_for_num(array0, len0, num0));
  assert(exp_index0 == binary_search_for_num(array0, len0, num0));
  int array1[] = {1, 2, 3, 6, 7, 8, 9, 10, 11};
  int len1 = sizeof(array1) / sizeof(int);
  int num1 = 11;
  int exp_index1 = 8;
  assert(exp_index1 == linear_search_for_num(array1, len1, num1));
  assert(exp_index1 == binary_search_for_num(array1, len1, num1));
  int array2[] = {1, 2, 3, 6, 7, 8, 9, 20, 22};
  int len2 = sizeof(array2) / sizeof(int);
  int num2 = 1;
  int exp_index2 = 0;
  assert(exp_index2 == linear_search_for_num(array2, len2, num2));
  assert(exp_index2 == binary_search_for_num(array2, len2, num2));
  int array3[] = {1, 2, 3, 6, 7, 8, 9, 30, 33};
  int len3 = sizeof(array3) / sizeof(int);
  int num3 = array3[len3 - 1] + 1;
  int exp_index3 = -1;
  assert(exp_index3 == linear_search_for_num(array3, len3, num3));
  assert(exp_index3 == binary_search_for_num(array3, len3, num3));
  int array4[] = {1, 2, 4, 6, 7, 8, 9, 40, 44};
  int len4 = sizeof(array4) / sizeof(int);
  int num4 = array4[0] - 1;
  int exp_index4 = -1;
  assert(exp_index4 == linear_search_for_num(array4, len4, num4));
  assert(exp_index4 == binary_search_for_num(array4, len4, num4));
  int array5[] = {1, 3, 5, 6, 7, 8, 9, 50, 55};
  int len5 = sizeof(array5) / sizeof(int);
  int num5 = array5[0] + 1;
  int exp_index5 = -1;
  assert(exp_index5 == linear_search_for_num(array5, len5, num5));
  assert(exp_index5 == binary_search_for_num(array5, len5, num5));
  return (0);
}
```