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

```asm
<main>:
  endbr64
  push   %r12
  lea    D17(%rip),%rdi
  push   %rbp
  sub    $0x78,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,0x68(%rsp)
  xor    %eax,%eax
  lea    0x40(%rsp),%rbp
  mov    %rsp,%r12
  call   <puts@plt>
  mov    %rbp,%rdi
  movabs $0x500000004,%rax
  mov    $0x7,%esi
  mov    %rax,0x40(%rsp)
  movabs $0x700000006,%rax
  mov    %rax,0x48(%rsp)
  movabs $0x200000001,%rax
  mov    %rax,0x50(%rsp)
  movl   $0x3,0x58(%rsp)
  call   <arrayPrint@plt>
  mov    $0x5,%ecx
  xor    %esi,%esi
  mov    %rbp,%rdi
  mov    $0x6,%edx
  lea    D13(%rip),%rbp
  call   <search@plt>
  mov    $0x5,%esi
  mov    %rbp,%rdi
  mov    %eax,%edx
  xor    %eax,%eax
  call   <printf@plt>
  lea    D5(%rip),%rdi
  call   <puts@plt>
  mov    %r12,%rdi
  mov    $0x6,%esi
  movabs $0x300000003,%rax
  mov    %rax,(%rsp)
  movabs $0x400000003,%rax
  mov    %rax,0x8(%rsp)
  movabs $0x300000005,%rax
  mov    %rax,0x10(%rsp)
  call   <arrayPrint@plt>
  mov    $0x4,%ecx
  xor    %esi,%esi
  mov    %r12,%rdi
  mov    $0x5,%edx
  lea    0x20(%rsp),%r12
  call   <search@plt>
  mov    $0x4,%esi
  mov    %rbp,%rdi
  mov    %eax,%edx
  xor    %eax,%eax
  call   <printf@plt>
  lea    D11(%rip),%rdi
  call   <puts@plt>
  mov    $0x6,%esi
  mov    %r12,%rdi
  movabs $0x1e00000014,%rax
  mov    %rax,0x20(%rsp)
  movabs $0x3200000028,%rax
  mov    %rax,0x28(%rsp)
  movabs $0xa0000003c,%rax
  mov    %rax,0x30(%rsp)
  call   <arrayPrint@plt>
  mov    $0xa,%ecx
  xor    %esi,%esi
  mov    %r12,%rdi
  mov    $0x5,%edx
  call   <search@plt>
  mov    $0xa,%esi
  mov    %rbp,%rdi
  mov    %eax,%edx
  xor    %eax,%eax
  call   <printf@plt>
  mov    $0x14,%ecx
  xor    %esi,%esi
  mov    %r12,%rdi
  mov    $0x5,%edx
  call   <search@plt>
  mov    $0x14,%esi
  mov    %rbp,%rdi
  mov    %eax,%edx
  xor    %eax,%eax
  call   <printf@plt>
  xor    %esi,%esi
  mov    $0x5,%edx
  mov    %r12,%rdi
  mov    $0x1e,%ecx
  call   <search@plt>
  mov    $0x1e,%esi
  mov    %rbp,%rdi
  mov    %eax,%edx
  xor    %eax,%eax
  call   <printf@plt>
  mov    0x68(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L0
  add    $0x78,%rsp
  xor    %eax,%eax
  pop    %rbp
  pop    %r12
  ret
L0:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: read_data
arguments: data_label: D17
data_type: string
name: read_data
arguments: data_label: D13
data_type: string
name: read_data
arguments: data_label: D5
data_type: string
name: read_data
arguments: data_label: D11
data_type: string

tool: D17: Test case 1:

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


tool: D5: 
Test case 2:

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