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

```asm
<main>:
  endbr64
  push   %rbp
  push   %rbx
  sub    $0x78,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,0x68(%rsp)
  xor    %eax,%eax
  lea    D5(%rip),%rdi
  call   <puts@plt>
  movl   $0x4,0x40(%rsp)
  movl   $0x5,0x44(%rsp)
  movl   $0x6,0x48(%rsp)
  movl   $0x7,0x4c(%rsp)
  movl   $0x1,0x50(%rsp)
  movl   $0x2,0x54(%rsp)
  movl   $0x3,0x58(%rsp)
  lea    0x40(%rsp),%rbx
  mov    $0x7,%esi
  mov    %rbx,%rdi
  call   <arrayPrint@plt>
  mov    $0x5,%ecx
  mov    $0x6,%edx
  mov    $0x0,%esi
  mov    %rbx,%rdi
  call   <search@plt>
  mov    %eax,%edx
  mov    $0x5,%esi
  lea    D17(%rip),%rbx
  mov    %rbx,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  lea    D12(%rip),%rdi
  call   <puts@plt>
  movl   $0x3,(%rsp)
  movl   $0x3,0x4(%rsp)
  movl   $0x3,0x8(%rsp)
  movl   $0x4,0xc(%rsp)
  movl   $0x5,0x10(%rsp)
  movl   $0x3,0x14(%rsp)
  mov    %rsp,%rbp
  mov    $0x6,%esi
  mov    %rbp,%rdi
  call   <arrayPrint@plt>
  mov    $0x4,%ecx
  mov    $0x5,%edx
  mov    $0x0,%esi
  mov    %rbp,%rdi
  call   <search@plt>
  mov    %eax,%edx
  mov    $0x4,%esi
  mov    %rbx,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  lea    D18(%rip),%rdi
  call   <puts@plt>
  movl   $0x14,0x20(%rsp)
  movl   $0x1e,0x24(%rsp)
  movl   $0x28,0x28(%rsp)
  movl   $0x32,0x2c(%rsp)
  movl   $0x3c,0x30(%rsp)
  movl   $0xa,0x34(%rsp)
  lea    0x20(%rsp),%rbp
  mov    $0x6,%esi
  mov    %rbp,%rdi
  call   <arrayPrint@plt>
  mov    $0xa,%ecx
  mov    $0x5,%edx
  mov    $0x0,%esi
  mov    %rbp,%rdi
  call   <search@plt>
  mov    %eax,%edx
  mov    $0xa,%esi
  mov    %rbx,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  mov    $0x14,%ecx
  mov    $0x5,%edx
  mov    $0x0,%esi
  mov    %rbp,%rdi
  call   <search@plt>
  mov    %eax,%edx
  mov    $0x14,%esi
  mov    %rbx,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  mov    $0x1e,%ecx
  mov    $0x5,%edx
  mov    $0x0,%esi
  mov    %rbp,%rdi
  call   <search@plt>
  mov    %eax,%edx
  mov    $0x1e,%esi
  mov    %rbx,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  mov    0x68(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L1
  mov    $0x0,%eax
  add    $0x78,%rsp
  pop    %rbx
  pop    %rbp
  ret
L1:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: read_data
arguments: tag: D5
data_type: string
name: read_data
arguments: tag: D17
data_type: string
name: read_data
arguments: tag: D12
data_type: string
name: read_data
arguments: tag: D18
data_type: string

tool: D5: Test case 1:

tool: D17: Index of element %i is %i


tool: D12: 
Test case 2:

tool: D18: 
Test case 3:

assistant: ```c
int main(void) {
  printf("Test case 1:\n");
  int x = 5;
  int testArray[] = {4, 5, 6, 7, 1, 2, 3};
  arrayPrint(testArray, sizeof(testArray) / sizeof(int));
  printf("Index of element %i is %i\n", x, search(testArray, 0, sizeof(testArray) / sizeof(int) - 1, x));
  printf("\nTest case 2:\n");
  x = 4;
  int testArray1[] = {3, 3, 3, 4, 5, 3};
  arrayPrint(testArray1, sizeof(testArray1) / sizeof(int));
  printf("Index of element %i is %i\n", x, search(testArray1, 0, sizeof(testArray1) / sizeof(int) - 1, x));
  printf("\nTest case 3:\n");
  x = 10;
  int testArray2[] = {20, 30, 40, 50, 60, 10};
  arrayPrint(testArray2, sizeof(testArray2) / sizeof(int));
  printf("Index of element %i is %i\n", x, search(testArray2, 0, sizeof(testArray2) / sizeof(int) - 1, x));
  x = 20;
  printf("Index of element %i is %i\n", x, search(testArray2, 0, sizeof(testArray2) / sizeof(int) - 1, x));
  x = 30;
  printf("Index of element %i is %i\n", x, search(testArray2, 0, sizeof(testArray2) / sizeof(int) - 1, x));
  return 0;
}
```