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

```asm
<test_encrypt_cbc>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x390,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,-0x8(%rbp)
  xor    %eax,%eax
  movl   $0x2b,-0x390(%rbp)
  movl   $0x7e,-0x38c(%rbp)
  movl   $0x15,-0x388(%rbp)
  movl   $0x16,-0x384(%rbp)
  movl   $0x28,-0x380(%rbp)
  movl   $0xae,-0x37c(%rbp)
  movl   $0xd2,-0x378(%rbp)
  movl   $0xa6,-0x374(%rbp)
  movl   $0xab,-0x370(%rbp)
  movl   $0xf7,-0x36c(%rbp)
  movl   $0x15,-0x368(%rbp)
  movl   $0x88,-0x364(%rbp)
  movl   $0x9,-0x360(%rbp)
  movl   $0xcf,-0x35c(%rbp)
  movl   $0x4f,-0x358(%rbp)
  movl   $0x3c,-0x354(%rbp)
  movl   $0x0,-0x350(%rbp)
  movl   $0x1,-0x34c(%rbp)
  movl   $0x2,-0x348(%rbp)
  movl   $0x3,-0x344(%rbp)
  movl   $0x4,-0x340(%rbp)
  movl   $0x5,-0x33c(%rbp)
  movl   $0x6,-0x338(%rbp)
  movl   $0x7,-0x334(%rbp)
  movl   $0x8,-0x330(%rbp)
  movl   $0x9,-0x32c(%rbp)
  movl   $0xa,-0x328(%rbp)
  movl   $0xb,-0x324(%rbp)
  movl   $0xc,-0x320(%rbp)
  movl   $0xd,-0x31c(%rbp)
  movl   $0xe,-0x318(%rbp)
  movl   $0xf,-0x314(%rbp)
  movl   $0x6b,-0x310(%rbp)
  movl   $0xc1,-0x30c(%rbp)
  movl   $0xbe,-0x308(%rbp)
  movl   $0xe2,-0x304(%rbp)
  movl   $0x2e,-0x300(%rbp)
  movl   $0x40,-0x2fc(%rbp)
  movl   $0x9f,-0x2f8(%rbp)
  movl   $0x96,-0x2f4(%rbp)
  movl   $0xe9,-0x2f0(%rbp)
  movl   $0x3d,-0x2ec(%rbp)
  movl   $0x7e,-0x2e8(%rbp)
  movl   $0x11,-0x2e4(%rbp)
  movl   $0x73,-0x2e0(%rbp)
  movl   $0x93,-0x2dc(%rbp)
  movl   $0x17,-0x2d8(%rbp)
  movl   $0x2a,-0x2d4(%rbp)
  movl   $0xae,-0x2d0(%rbp)
  movl   $0x2d,-0x2cc(%rbp)
  movl   $0x8a,-0x2c8(%rbp)
  movl   $0x57,-0x2c4(%rbp)
  movl   $0x1e,-0x2c0(%rbp)
  movl   $0x3,-0x2bc(%rbp)
  movl   $0xac,-0x2b8(%rbp)
  movl   $0x9c,-0x2b4(%rbp)
  movl   $0x9e,-0x2b0(%rbp)
  movl   $0xb7,-0x2ac(%rbp)
  movl   $0x6f,-0x2a8(%rbp)
  movl   $0xac,-0x2a4(%rbp)
  movl   $0x45,-0x2a0(%rbp)
  movl   $0xaf,-0x29c(%rbp)
  movl   $0x8e,-0x298(%rbp)
  movl   $0x51,-0x294(%rbp)
  movl   $0x30,-0x290(%rbp)
  movl   $0xc8,-0x28c(%rbp)
  movl   $0x1c,-0x288(%rbp)
  movl   $0x46,-0x284(%rbp)
  movl   $0xa3,-0x280(%rbp)
  movl   $0x5c,-0x27c(%rbp)
  movl   $0xe4,-0x278(%rbp)
  movl   $0x11,-0x274(%rbp)
  movl   $0xe5,-0x270(%rbp)
  movl   $0xfb,-0x26c(%rbp)
  movl   $0xc1,-0x268(%rbp)
  movl   $0x19,-0x264(%rbp)
  movl   $0x1a,-0x260(%rbp)
  movl   $0xa,-0x25c(%rbp)
  movl   $0x52,-0x258(%rbp)
  movl   $0xef,-0x254(%rbp)
  movl   $0xf6,-0x250(%rbp)
  movl   $0x9f,-0x24c(%rbp)
  movl   $0x24,-0x248(%rbp)
  movl   $0x45,-0x244(%rbp)
  movl   $0xdf,-0x240(%rbp)
  movl   $0x4f,-0x23c(%rbp)
  movl   $0x9b,-0x238(%rbp)
  movl   $0x17,-0x234(%rbp)
  movl   $0xad,-0x230(%rbp)
  movl   $0x2b,-0x22c(%rbp)
  movl   $0x41,-0x228(%rbp)
  movl   $0x7b,-0x224(%rbp)
  movl   $0xe6,-0x220(%rbp)
  movl   $0x6c,-0x21c(%rbp)
  movl   $0x37,-0x218(%rbp)
  movl   $0x10,-0x214(%rbp)
  movl   $0x76,-0x210(%rbp)
  movl   $0x49,-0x20c(%rbp)
  movl   $0xab,-0x208(%rbp)
  movl   $0xac,-0x204(%rbp)
  movl   $0x81,-0x200(%rbp)
  movl   $0x19,-0x1fc(%rbp)
  movl   $0xb2,-0x1f8(%rbp)
  movl   $0x46,-0x1f4(%rbp)
  movl   $0xce,-0x1f0(%rbp)
  movl   $0xe9,-0x1ec(%rbp)
  movl   $0x8e,-0x1e8(%rbp)
  movl   $0x9b,-0x1e4(%rbp)
  movl   $0x12,-0x1e0(%rbp)
  movl   $0xe9,-0x1dc(%rbp)
  movl   $0x19,-0x1d8(%rbp)
  movl   $0x7d,-0x1d4(%rbp)
  movl   $0x50,-0x1d0(%rbp)
  movl   $0x86,-0x1cc(%rbp)
  movl   $0xcb,-0x1c8(%rbp)
  movl   $0x9b,-0x1c4(%rbp)
  movl   $0x50,-0x1c0(%rbp)
  movl   $0x72,-0x1bc(%rbp)
  movl   $0x19,-0x1b8(%rbp)
  movl   $0xee,-0x1b4(%rbp)
  movl   $0x95,-0x1b0(%rbp)
  movl   $0xdb,-0x1ac(%rbp)
  movl   $0x11,-0x1a8(%rbp)
  movl   $0x3a,-0x1a4(%rbp)
  movl   $0x91,-0x1a0(%rbp)
  movl   $0x76,-0x19c(%rbp)
  movl   $0x78,-0x198(%rbp)
  movl   $0xb2,-0x194(%rbp)
  movl   $0x73,-0x190(%rbp)
  movl   $0xbe,-0x18c(%rbp)
  movl   $0xd6,-0x188(%rbp)
  movl   $0xb8,-0x184(%rbp)
  movl   $0xe3,-0x180(%rbp)
  movl   $0xc1,-0x17c(%rbp)
  movl   $0x74,-0x178(%rbp)
  movl   $0x3b,-0x174(%rbp)
  movl   $0x71,-0x170(%rbp)
  movl   $0x16,-0x16c(%rbp)
  movl   $0xe6,-0x168(%rbp)
  movl   $0x9e,-0x164(%rbp)
  movl   $0x22,-0x160(%rbp)
  movl   $0x22,-0x15c(%rbp)
  movl   $0x95,-0x158(%rbp)
  movl   $0x16,-0x154(%rbp)
  movl   $0x3f,-0x150(%rbp)
  movl   $0xf1,-0x14c(%rbp)
  movl   $0xca,-0x148(%rbp)
  movl   $0xa1,-0x144(%rbp)
  movl   $0x68,-0x140(%rbp)
  movl   $0x1f,-0x13c(%rbp)
  movl   $0xac,-0x138(%rbp)
  movl   $0x9,-0x134(%rbp)
  movl   $0x12,-0x130(%rbp)
  movl   $0xe,-0x12c(%rbp)
  movl   $0xca,-0x128(%rbp)
  movl   $0x30,-0x124(%rbp)
  movl   $0x75,-0x120(%rbp)
  movl   $0x86,-0x11c(%rbp)
  movl   $0xe1,-0x118(%rbp)
  movl   $0xa7,-0x114(%rbp)
  lea    -0x350(%rbp),%rcx
  lea    -0x390(%rbp),%rdx
  lea    -0x310(%rbp),%rsi
  lea    -0x110(%rbp),%rax
  mov    %rcx,%r8
  mov    %rdx,%rcx
  mov    $0x40,%edx
  mov    %rax,%rdi
  call   <AES128_CBC_encrypt_buffer@plt>
  lea    D26(%rip),%rax
  mov    %rax,%rdi
  call   <printf@plt>
  lea    -0x110(%rbp),%rcx
  lea    -0x210(%rbp),%rax
  mov    $0x40,%edx
  mov    %rcx,%rsi
  mov    %rax,%rdi
  call   <strncmp@plt>
  test   %rax,%rax
  jne    L2
  lea    D8(%rip),%rax
  mov    %rax,%rdi
  call   <printf@plt>
  jmp    L4
L2:
  lea    D7(%rip),%rax
  mov    %rax,%rdi
  call   <printf@plt>
L4:
  nop
  mov    -0x8(%rbp),%rax
  sub    %fs:0x28,%rax
  je     L6
  call   <__stack_chk_fail@plt>
L6:
  leave
  ret
```

tool_calls: name: retrieve_data
arguments: label: D26
data_type: string
name: retrieve_data
arguments: label: D8
data_type: string
name: retrieve_data
arguments: label: D7
data_type: string

tool: D26: CBC encrypt: 

tool: D8: SUCCESS!


tool: D7: FAILURE!


assistant: ```c
void test_encrypt_cbc(void) {
  uint8_t key[] = {0x2b, 0x7e, 0x15, 0x16, 0x28, 0xae, 0xd2, 0xa6, 0xab, 0xf7, 0x15, 0x88, 0x09, 0xcf, 0x4f, 0x3c};
  uint8_t iv[] = {0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f};
  uint8_t in[] = {0x6b, 0xc1, 0xbe, 0xe2, 0x2e, 0x40, 0x9f, 0x96, 0xe9, 0x3d, 0x7e, 0x11, 0x73, 0x93, 0x17, 0x2a, 0xae, 0x2d, 0x8a, 0x57, 0x1e, 0x03, 0xac, 0x9c, 0x9e, 0xb7, 0x6f, 0xac, 0x45, 0xaf, 0x8e, 0x51, 0x30, 0xc8, 0x1c, 0x46, 0xa3, 0x5c, 0xe4, 0x11, 0xe5, 0xfb, 0xc1, 0x19, 0x1a, 0x0a, 0x52, 0xef, 0xf6, 0x9f, 0x24, 0x45, 0xdf, 0x4f, 0x9b, 0x17, 0xad, 0x2b, 0x41, 0x7b, 0xe6, 0x6c, 0x37, 0x10};
  uint8_t out[] = {0x76, 0x49, 0xab, 0xac, 0x81, 0x19, 0xb2, 0x46, 0xce, 0xe9, 0x8e, 0x9b, 0x12, 0xe9, 0x19, 0x7d, 0x50, 0x86, 0xcb, 0x9b, 0x50, 0x72, 0x19, 0xee, 0x95, 0xdb, 0x11, 0x3a, 0x91, 0x76, 0x78, 0xb2, 0x73, 0xbe, 0xd6, 0xb8, 0xe3, 0xc1, 0x74, 0x3b, 0x71, 0x16, 0xe6, 0x9e, 0x22, 0x22, 0x95, 0x16, 0x3f, 0xf1, 0xca, 0xa1, 0x68, 0x1f, 0xac, 0x09, 0x12, 0x0e, 0xca, 0x30, 0x75, 0x86, 0xe1, 0xa7};
  uint8_t buffer[64];
  AES128_CBC_encrypt_buffer(buffer, in, 64, key, iv);
  printf("CBC encrypt: ");
  if (0 == strncmp((char *)out, (char *)buffer, 64)) {
    printf("SUCCESS!\n");
  } else {
    printf("FAILURE!\n");
  }
}
```