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

```asm
<main>:
  endbr64
  sub    $0x958,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,0x948(%rsp)
  xor    %eax,%eax
  movq   $0x61,0x40(%rsp)
  movq   $0x0,0x48(%rsp)
  movq   $0x0,0x50(%rsp)
  movq   $0x0,0x58(%rsp)
  movq   $0x0,0x60(%rsp)
  movq   $0x0,0x68(%rsp)
  movq   $0x0,0x70(%rsp)
  movq   $0x0,0x78(%rsp)
  movq   $0x0,0x80(%rsp)
  movq   $0x0,0x88(%rsp)
  movq   $0x0,0x90(%rsp)
  movq   $0x0,0x98(%rsp)
  movq   $0x0,0xa0(%rsp)
  movq   $0x0,0xa8(%rsp)
  movq   $0x0,0xb0(%rsp)
  movq   $0x0,0xb8(%rsp)
  movq   $0x0,0xc0(%rsp)
  movq   $0x0,0xc8(%rsp)
  movq   $0x0,0xd0(%rsp)
  movq   $0x0,0xd8(%rsp)
  movq   $0x0,0xe0(%rsp)
  movq   $0x0,0xe8(%rsp)
  movq   $0x0,0xf0(%rsp)
  movq   $0x0,0xf8(%rsp)
  movq   $0x0,0x100(%rsp)
  movq   $0x0,0x108(%rsp)
  movq   $0x0,0x110(%rsp)
  movq   $0x0,0x118(%rsp)
  movq   $0x0,0x120(%rsp)
  movq   $0x0,0x128(%rsp)
  movq   $0x0,0x130(%rsp)
  movq   $0x0,0x138(%rsp)
  movq   $0x61,0x140(%rsp)
  movq   $0x0,0x148(%rsp)
  movq   $0x0,0x150(%rsp)
  movq   $0x0,0x158(%rsp)
  movq   $0x0,0x160(%rsp)
  movq   $0x0,0x168(%rsp)
  movq   $0x0,0x170(%rsp)
  movq   $0x0,0x178(%rsp)
  movq   $0x0,0x180(%rsp)
  movq   $0x0,0x188(%rsp)
  movq   $0x0,0x190(%rsp)
  movq   $0x0,0x198(%rsp)
  movq   $0x0,0x1a0(%rsp)
  movq   $0x0,0x1a8(%rsp)
  movq   $0x0,0x1b0(%rsp)
  movq   $0x0,0x1b8(%rsp)
  movq   $0x0,0x1c0(%rsp)
  movq   $0x0,0x1c8(%rsp)
  movq   $0x0,0x1d0(%rsp)
  movq   $0x0,0x1d8(%rsp)
  movq   $0x0,0x1e0(%rsp)
  movq   $0x0,0x1e8(%rsp)
  movq   $0x0,0x1f0(%rsp)
  movq   $0x0,0x1f8(%rsp)
  movq   $0x0,0x200(%rsp)
  movq   $0x0,0x208(%rsp)
  movq   $0x0,0x210(%rsp)
  movq   $0x0,0x218(%rsp)
  movq   $0x0,0x220(%rsp)
  movq   $0x0,0x228(%rsp)
  movq   $0x0,0x230(%rsp)
  movq   $0x0,0x238(%rsp)
  movq   $0x6261,0x240(%rsp)
  movq   $0x0,0x248(%rsp)
  movq   $0x0,0x250(%rsp)
  movq   $0x0,0x258(%rsp)
  movq   $0x0,0x260(%rsp)
  movq   $0x0,0x268(%rsp)
  movq   $0x0,0x270(%rsp)
  movq   $0x0,0x278(%rsp)
  movq   $0x0,0x280(%rsp)
  movq   $0x0,0x288(%rsp)
  movq   $0x0,0x290(%rsp)
  movq   $0x0,0x298(%rsp)
  movq   $0x0,0x2a0(%rsp)
  movq   $0x0,0x2a8(%rsp)
  movq   $0x0,0x2b0(%rsp)
  movq   $0x0,0x2b8(%rsp)
  movq   $0x0,0x2c0(%rsp)
  movq   $0x0,0x2c8(%rsp)
  movq   $0x0,0x2d0(%rsp)
  movq   $0x0,0x2d8(%rsp)
  movq   $0x0,0x2e0(%rsp)
  movq   $0x0,0x2e8(%rsp)
  movq   $0x0,0x2f0(%rsp)
  movq   $0x0,0x2f8(%rsp)
  movq   $0x0,0x300(%rsp)
  movq   $0x0,0x308(%rsp)
  movq   $0x0,0x310(%rsp)
  movq   $0x0,0x318(%rsp)
  movq   $0x0,0x320(%rsp)
  movq   $0x0,0x328(%rsp)
  movq   $0x0,0x330(%rsp)
  movq   $0x0,0x338(%rsp)
  movq   $0x6261,0x340(%rsp)
  movq   $0x0,0x348(%rsp)
  movq   $0x0,0x350(%rsp)
  movq   $0x0,0x358(%rsp)
  movq   $0x0,0x360(%rsp)
  movq   $0x0,0x368(%rsp)
  movq   $0x0,0x370(%rsp)
  movq   $0x0,0x378(%rsp)
  movq   $0x0,0x380(%rsp)
  movq   $0x0,0x388(%rsp)
  movq   $0x0,0x390(%rsp)
  movq   $0x0,0x398(%rsp)
  movq   $0x0,0x3a0(%rsp)
  movq   $0x0,0x3a8(%rsp)
  movq   $0x0,0x3b0(%rsp)
  movq   $0x0,0x3b8(%rsp)
  movq   $0x0,0x3c0(%rsp)
  movq   $0x0,0x3c8(%rsp)
  movq   $0x0,0x3d0(%rsp)
  movq   $0x0,0x3d8(%rsp)
  movq   $0x0,0x3e0(%rsp)
  movq   $0x0,0x3e8(%rsp)
  movq   $0x0,0x3f0(%rsp)
  movq   $0x0,0x3f8(%rsp)
  movq   $0x0,0x400(%rsp)
  movq   $0x0,0x408(%rsp)
  movq   $0x0,0x410(%rsp)
  movq   $0x0,0x418(%rsp)
  movq   $0x0,0x420(%rsp)
  movq   $0x0,0x428(%rsp)
  movq   $0x0,0x430(%rsp)
  movq   $0x0,0x438(%rsp)
  movq   $0x636261,0x440(%rsp)
  movq   $0x0,0x448(%rsp)
  movq   $0x0,0x450(%rsp)
  movq   $0x0,0x458(%rsp)
  movq   $0x0,0x460(%rsp)
  movq   $0x0,0x468(%rsp)
  movq   $0x0,0x470(%rsp)
  movq   $0x0,0x478(%rsp)
  movq   $0x0,0x480(%rsp)
  movq   $0x0,0x488(%rsp)
  movq   $0x0,0x490(%rsp)
  movq   $0x0,0x498(%rsp)
  movq   $0x0,0x4a0(%rsp)
  movq   $0x0,0x4a8(%rsp)
  movq   $0x0,0x4b0(%rsp)
  movq   $0x0,0x4b8(%rsp)
  movq   $0x0,0x4c0(%rsp)
  movq   $0x0,0x4c8(%rsp)
  movq   $0x0,0x4d0(%rsp)
  movq   $0x0,0x4d8(%rsp)
  movq   $0x0,0x4e0(%rsp)
  movq   $0x0,0x4e8(%rsp)
  movq   $0x0,0x4f0(%rsp)
  movq   $0x0,0x4f8(%rsp)
  movq   $0x0,0x500(%rsp)
  movq   $0x0,0x508(%rsp)
  movq   $0x0,0x510(%rsp)
  movq   $0x0,0x518(%rsp)
  movq   $0x0,0x520(%rsp)
  movq   $0x0,0x528(%rsp)
  movq   $0x0,0x530(%rsp)
  movq   $0x0,0x538(%rsp)
  movq   $0x636261,0x540(%rsp)
  movq   $0x0,0x548(%rsp)
  movq   $0x0,0x550(%rsp)
  movq   $0x0,0x558(%rsp)
  movq   $0x0,0x560(%rsp)
  movq   $0x0,0x568(%rsp)
  movq   $0x0,0x570(%rsp)
  movq   $0x0,0x578(%rsp)
  movq   $0x0,0x580(%rsp)
  movq   $0x0,0x588(%rsp)
  movq   $0x0,0x590(%rsp)
  movq   $0x0,0x598(%rsp)
  movq   $0x0,0x5a0(%rsp)
  movq   $0x0,0x5a8(%rsp)
  movq   $0x0,0x5b0(%rsp)
  movq   $0x0,0x5b8(%rsp)
  movq   $0x0,0x5c0(%rsp)
  movq   $0x0,0x5c8(%rsp)
  movq   $0x0,0x5d0(%rsp)
  movq   $0x0,0x5d8(%rsp)
  movq   $0x0,0x5e0(%rsp)
  movq   $0x0,0x5e8(%rsp)
  movq   $0x0,0x5f0(%rsp)
  movq   $0x0,0x5f8(%rsp)
  movq   $0x0,0x600(%rsp)
  movq   $0x0,0x608(%rsp)
  movq   $0x0,0x610(%rsp)
  movq   $0x0,0x618(%rsp)
  movq   $0x0,0x620(%rsp)
  movq   $0x0,0x628(%rsp)
  movq   $0x0,0x630(%rsp)
  movq   $0x0,0x638(%rsp)
  movq   $0x64636261,0x640(%rsp)
  movq   $0x0,0x648(%rsp)
  movq   $0x0,0x650(%rsp)
  movq   $0x0,0x658(%rsp)
  movq   $0x0,0x660(%rsp)
  movq   $0x0,0x668(%rsp)
  movq   $0x0,0x670(%rsp)
  movq   $0x0,0x678(%rsp)
  movq   $0x0,0x680(%rsp)
  movq   $0x0,0x688(%rsp)
  movq   $0x0,0x690(%rsp)
  movq   $0x0,0x698(%rsp)
  movq   $0x0,0x6a0(%rsp)
  movq   $0x0,0x6a8(%rsp)
  movq   $0x0,0x6b0(%rsp)
  movq   $0x0,0x6b8(%rsp)
  movq   $0x0,0x6c0(%rsp)
  movq   $0x0,0x6c8(%rsp)
  movq   $0x0,0x6d0(%rsp)
  movq   $0x0,0x6d8(%rsp)
  movq   $0x0,0x6e0(%rsp)
  movq   $0x0,0x6e8(%rsp)
  movq   $0x0,0x6f0(%rsp)
  movq   $0x0,0x6f8(%rsp)
  movq   $0x0,0x700(%rsp)
  movq   $0x0,0x708(%rsp)
  movq   $0x0,0x710(%rsp)
  movq   $0x0,0x718(%rsp)
  movq   $0x0,0x720(%rsp)
  movq   $0x0,0x728(%rsp)
  movq   $0x0,0x730(%rsp)
  movq   $0x0,0x738(%rsp)
  movabs $0x6564636261,%rax
  mov    $0x0,%edx
  mov    %rax,0x740(%rsp)
  mov    %rdx,0x748(%rsp)
  movq   $0x0,0x750(%rsp)
  movq   $0x0,0x758(%rsp)
  movq   $0x0,0x760(%rsp)
  movq   $0x0,0x768(%rsp)
  movq   $0x0,0x770(%rsp)
  movq   $0x0,0x778(%rsp)
  movq   $0x0,0x780(%rsp)
  movq   $0x0,0x788(%rsp)
  movq   $0x0,0x790(%rsp)
  movq   $0x0,0x798(%rsp)
  movq   $0x0,0x7a0(%rsp)
  movq   $0x0,0x7a8(%rsp)
  movq   $0x0,0x7b0(%rsp)
  movq   $0x0,0x7b8(%rsp)
  movq   $0x0,0x7c0(%rsp)
  movq   $0x0,0x7c8(%rsp)
  movq   $0x0,0x7d0(%rsp)
  movq   $0x0,0x7d8(%rsp)
  movq   $0x0,0x7e0(%rsp)
  movq   $0x0,0x7e8(%rsp)
  movq   $0x0,0x7f0(%rsp)
  movq   $0x0,0x7f8(%rsp)
  movq   $0x0,0x800(%rsp)
  movq   $0x0,0x808(%rsp)
  movq   $0x0,0x810(%rsp)
  movq   $0x0,0x818(%rsp)
  movq   $0x0,0x820(%rsp)
  movq   $0x0,0x828(%rsp)
  movq   $0x0,0x830(%rsp)
  movq   $0x0,0x838(%rsp)
  lea    0x40(%rsp),%rax
  mov    %rax,(%rsp)
  lea    0x140(%rsp),%rax
  mov    %rax,0x8(%rsp)
  lea    0x240(%rsp),%rax
  mov    %rax,0x10(%rsp)
  lea    0x340(%rsp),%rax
  mov    %rax,0x18(%rsp)
  lea    0x440(%rsp),%rax
  mov    %rax,0x20(%rsp)
  lea    0x540(%rsp),%rax
  mov    %rax,0x28(%rsp)
  lea    0x640(%rsp),%rax
  mov    %rax,0x30(%rsp)
  lea    0x740(%rsp),%rax
  mov    %rax,0x38(%rsp)
  movq   $0x636261,0x840(%rsp)
  movq   $0x0,0x848(%rsp)
  movq   $0x0,0x850(%rsp)
  movq   $0x0,0x858(%rsp)
  movq   $0x0,0x860(%rsp)
  movq   $0x0,0x868(%rsp)
  movq   $0x0,0x870(%rsp)
  movq   $0x0,0x878(%rsp)
  movq   $0x0,0x880(%rsp)
  movq   $0x0,0x888(%rsp)
  movq   $0x0,0x890(%rsp)
  movq   $0x0,0x898(%rsp)
  movq   $0x0,0x8a0(%rsp)
  movq   $0x0,0x8a8(%rsp)
  movq   $0x0,0x8b0(%rsp)
  movq   $0x0,0x8b8(%rsp)
  movq   $0x0,0x8c0(%rsp)
  movq   $0x0,0x8c8(%rsp)
  movq   $0x0,0x8d0(%rsp)
  movq   $0x0,0x8d8(%rsp)
  movq   $0x0,0x8e0(%rsp)
  movq   $0x0,0x8e8(%rsp)
  movq   $0x0,0x8f0(%rsp)
  movq   $0x0,0x8f8(%rsp)
  movq   $0x0,0x900(%rsp)
  movq   $0x0,0x908(%rsp)
  movq   $0x0,0x910(%rsp)
  movq   $0x0,0x918(%rsp)
  movq   $0x0,0x920(%rsp)
  movq   $0x0,0x928(%rsp)
  movq   $0x0,0x930(%rsp)
  movq   $0x0,0x938(%rsp)
  lea    0x840(%rsp),%rsi
  mov    %rsp,%rdi
  call   <BinarySearch@plt>
  cmp    $0xffffffff,%eax
  je     L10
  mov    %eax,%esi
  cltq
  mov    (%rsp,%rax,8),%rdx
  lea    D12(%rip),%rdi
  mov    $0x0,%eax
  call   <printf@plt>
L5:
  mov    0x948(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L7
  mov    $0x0,%eax
  add    $0x958,%rsp
  ret
L10:
  lea    D2(%rip),%rdi
  call   <puts@plt>
  jmp    L5
L7:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: retrieve_data
arguments: data_tag: D12
data_type: string
name: retrieve_data
arguments: data_tag: D2
data_type: string

tool: D12: %d-%s


tool: D2: not found

assistant: ```c
int main(int argc, char const *argv[]) {
  char *A[8];
  char str1[256] = "a";
  char str2[256] = "a";
  char str3[256] = "ab";
  char str4[256] = "ab";
  char str5[256] = "abc";
  char str6[256] = "abc";
  char str7[256] = "abcd";
  char str8[256] = "abcde";
  A[0] = str1;
  A[1] = str2;
  A[2] = str3;
  A[3] = str4;
  A[4] = str5;
  A[5] = str6;
  A[6] = str7;
  A[7] = str8;
  char key[256] = "abc";
  int index = BinarySearch(A, key);
  if (index != -1) {
    printf("%d-%s\n", index, A[index]);
  } else {
    printf("not found\n");
  }
  return 0;
}
```