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

```asm
<main>:
  endbr64
  push   %r15
  xor    %eax,%eax
  lea    D12(%rip),%r15
  push   %r14
  lea    D66(%rip),%r14
  push   %r13
  lea    D51(%rip),%r13
  push   %r12
  lea    D47(%rip),%r12
  push   %rbp
  call   <strdeque_new@plt>
  mov    %r12,%rdx
  xor    %esi,%esi
  mov    %rax,%rbp
  mov    %rax,%rdi
  call   <strdeque_insert_at@plt>
  xor    %esi,%esi
  mov    %rbp,%rdi
  call   <strdeque_get_at@plt>
  mov    %r12,%rsi
  mov    $0x2,%edx
  mov    %rax,%rdi
  call   <streq@plt>
  mov    %eax,%edi
  call   <assert@plt>
  mov    %r13,%rdx
  mov    %rbp,%rdi
  mov    $0x8,%esi
  call   <strdeque_insert_at@plt>
  mov    %rbp,%rdi
  mov    $0x1,%esi
  call   <strdeque_get_at@plt>
  mov    $0x3,%edx
  mov    %r13,%rsi
  lea    D13(%rip),%r13
  mov    %rax,%rdi
  call   <streq@plt>
  mov    %eax,%edi
  call   <assert@plt>
  mov    %rbp,%rdi
  mov    $0x1,%esi
  call   <strdeque_remove_at@plt>
  mov    $0x1,%esi
  mov    %rbp,%rdi
  call   <strdeque_get_at@plt>
  xor    %edi,%edi
  test   %rax,%rax
  sete   %dil
  call   <assert@plt>
  xor    %esi,%esi
  mov    %rbp,%rdi
  call   <strdeque_get_at@plt>
  mov    %r12,%rsi
  mov    $0x2,%edx
  mov    %rax,%rdi
  call   <streq@plt>
  mov    %eax,%edi
  call   <assert@plt>
  xor    %edx,%edx
  xor    %esi,%esi
  mov    %rbp,%rdi
  call   <strdeque_insert_at@plt>
  xor    %esi,%esi
  mov    %rbp,%rdi
  call   <strdeque_get_at@plt>
  mov    $0x2,%edx
  mov    %r12,%rsi
  mov    %rax,%rdi
  call   <streq@plt>
  mov    %eax,%edi
  call   <assert@plt>
  mov    %rbp,%rdi
  call   <strdeque_size@plt>
  xor    %edi,%edi
  cmp    $0x1,%eax
  sete   %dil
  call   <assert@plt>
  mov    $0x1,%esi
  mov    %rbp,%rdi
  call   <strdeque_remove_at@plt>
  mov    %rbp,%rdi
  call   <strdeque_size@plt>
  xor    %edi,%edi
  cmp    $0x1,%eax
  sete   %dil
  call   <assert@plt>
  mov    %rbp,%rdi
  call   <strdeque_delete@plt>
  lea    D41(%rip),%rdx
  xor    %esi,%esi
  mov    %rbp,%rdi
  call   <strdeque_insert_at@plt>
  mov    %rbp,%rdi
  call   <strdeque_size@plt>
  xor    %edi,%edi
  test   %eax,%eax
  sete   %dil
  call   <assert@plt>
  xor    %esi,%esi
  mov    %rbp,%rdi
  call   <strdeque_get_at@plt>
  xor    %edi,%edi
  test   %rax,%rax
  sete   %dil
  call   <assert@plt>
  xor    %eax,%eax
  call   <strdeque_new@plt>
  mov    %rax,%rbp
  xor    %eax,%eax
  call   <strdeque_new@plt>
  mov    %r13,%rdx
  xor    %esi,%esi
  mov    %rbp,%rdi
  mov    %rax,%r12
  call   <strdeque_insert_at@plt>
  mov    %r14,%rdx
  xor    %esi,%esi
  mov    %rbp,%rdi
  call   <strdeque_insert_at@plt>
  mov    %r15,%rdx
  xor    %esi,%esi
  mov    %rbp,%rdi
  call   <strdeque_insert_at@plt>
  mov    %r15,%rdx
  mov    %r12,%rdi
  mov    $0x64,%esi
  call   <strdeque_insert_at@plt>
  mov    %r14,%rdx
  mov    %r12,%rdi
  mov    $0x3e8,%esi
  call   <strdeque_insert_at@plt>
  mov    %r13,%rdx
  mov    %r12,%rdi
  mov    $0x2710,%esi
  call   <strdeque_insert_at@plt>
  mov    %r12,%rsi
  mov    %rbp,%rdi
  call   <strdeque_comp@plt>
  xor    %edi,%edi
  test   %eax,%eax
  sete   %dil
  call   <assert@plt>
  xor    %esi,%esi
  mov    %rbp,%rdi
  call   <strdeque_remove_at@plt>
  mov    %r12,%rsi
  mov    %rbp,%rdi
  call   <strdeque_comp@plt>
  xor    %edi,%edi
  cmp    $0xffffffff,%eax
  sete   %dil
  call   <assert@plt>
  mov    %r12,%rdi
  call   <strdeque_delete@plt>
  mov    %r12,%rsi
  mov    %rbp,%rdi
  call   <strdeque_comp@plt>
  xor    %edi,%edi
  cmp    $0x1,%eax
  sete   %dil
  call   <assert@plt>
  mov    %rbp,%rdi
  call   <strdeque_delete@plt>
  mov    %r12,%rsi
  mov    %rbp,%rdi
  call   <strdeque_comp@plt>
  xor    %edi,%edi
  test   %eax,%eax
  sete   %dil
  call   <assert@plt>
  xor    %eax,%eax
  call   <emptystrdeque@plt>
  mov    %rbp,%rdi
  mov    %rax,%rsi
  call   <strdeque_comp@plt>
  xor    %edi,%edi
  test   %eax,%eax
  sete   %dil
  call   <assert@plt>
  xor    %eax,%eax
  call   <emptystrdeque@plt>
  mov    %r12,%rsi
  lea    D30(%rip),%r12
  mov    %rax,%rdi
  call   <strdeque_comp@plt>
  xor    %edi,%edi
  test   %eax,%eax
  sete   %dil
  call   <assert@plt>
  xor    %eax,%eax
  call   <emptystrdeque@plt>
  mov    %rax,%rbp
  xor    %eax,%eax
  call   <emptystrdeque@plt>
  mov    %rbp,%rsi
  mov    %rax,%rdi
  call   <strdeque_comp@plt>
  xor    %edi,%edi
  test   %eax,%eax
  sete   %dil
  call   <assert@plt>
  xor    %eax,%eax
  call   <emptystrdeque@plt>
  mov    %rax,%rdi
  call   <strdeque_size@plt>
  xor    %edi,%edi
  test   %eax,%eax
  sete   %dil
  call   <assert@plt>
  xor    %eax,%eax
  call   <emptystrdeque@plt>
  mov    %rax,%rdi
  call   <strdeque_delete@plt>
  xor    %eax,%eax
  call   <emptystrdeque@plt>
  mov    %r12,%rdx
  xor    %esi,%esi
  mov    %rax,%rdi
  call   <strdeque_insert_at@plt>
  xor    %eax,%eax
  call   <emptystrdeque@plt>
  mov    %rax,%rdi
  call   <strdeque_size@plt>
  xor    %edi,%edi
  test   %eax,%eax
  sete   %dil
  call   <assert@plt>
  xor    %eax,%eax
  call   <emptystrdeque@plt>
  mov    %r12,%rdx
  xor    %esi,%esi
  mov    %rax,%rdi
  call   <strdeque_insert_at@plt>
  xor    %eax,%eax
  call   <emptystrdeque@plt>
  lea    D43(%rip),%rdx
  xor    %esi,%esi
  mov    %rax,%rdi
  call   <strdeque_insert_at@plt>
  xor    %eax,%eax
  call   <emptystrdeque@plt>
  xor    %esi,%esi
  mov    %rax,%rdi
  call   <strdeque_get_at@plt>
  xor    %edi,%edi
  test   %rax,%rax
  sete   %dil
  call   <assert@plt>
  xor    %eax,%eax
  call   <emptystrdeque@plt>
  xor    %esi,%esi
  mov    %rax,%rdi
  call   <strdeque_remove_at@plt>
  xor    %eax,%eax
  call   <emptystrdeque@plt>
  mov    %rax,%rdi
  call   <strdeque_size@plt>
  xor    %edi,%edi
  test   %eax,%eax
  sete   %dil
  call   <assert@plt>
  xor    %eax,%eax
  call   <emptystrdeque@plt>
  mov    %rax,%rdi
  call   <strdeque_clear@plt>
  pop    %rbp
  xor    %eax,%eax
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
```

tool_calls: name: retrieve_data
arguments: tag: D12
type_guessed: string
name: retrieve_data
arguments: tag: D66
type_guessed: string
name: retrieve_data
arguments: tag: D51
type_guessed: string
name: retrieve_data
arguments: tag: D47
type_guessed: string
name: retrieve_data
arguments: tag: D13
type_guessed: string
name: retrieve_data
arguments: tag: D41
type_guessed: string
name: retrieve_data
arguments: tag: D30
type_guessed: string
name: retrieve_data
arguments: tag: D43
type_guessed: string

tool: D12: ccc

tool: D66: cc

tool: D51: aa

tool: D47: a

tool: D13: c

tool: D41: b

tool: D30: d

tool: D43: dd

assistant: ```c
int main() {
  unsigned long d1, d2, d3;
  d1 = strdeque_new();
  strdeque_insert_at(d1, 0, "a");
  assert(streq(strdeque_get_at(d1, 0), "a", 2));
  strdeque_insert_at(d1, 8, "aa");
  assert(streq(strdeque_get_at(d1, 1), "aa", 3));
  strdeque_remove_at(d1, 1);
  assert(strdeque_get_at(d1, 1) == NULL);
  assert(streq(strdeque_get_at(d1, 0), "a", 2));
  strdeque_insert_at(d1, 0, NULL);
  assert(streq(strdeque_get_at(d1, 0), "a", 2));
  assert(strdeque_size(d1) == 1);
  strdeque_remove_at(d1, 1);
  assert(strdeque_size(d1) == 1);
  strdeque_delete(d1);
  strdeque_insert_at(d1, 0, "b");
  assert(strdeque_size(d1) == 0);
  assert(strdeque_get_at(d1, 0) == NULL);
  d2 = strdeque_new();
  d3 = strdeque_new();
  strdeque_insert_at(d2, 0, "c");
  strdeque_insert_at(d2, 0, "cc");
  strdeque_insert_at(d2, 0, "ccc");
  strdeque_insert_at(d3, 100, "ccc");
  strdeque_insert_at(d3, 1000, "cc");
  strdeque_insert_at(d3, 10000, "c");
  assert(strdeque_comp(d2, d3) == 0);
  strdeque_remove_at(d2, 0);
  assert(strdeque_comp(d2, d3) == -1);
  strdeque_delete(d3);
  assert(strdeque_comp(d2, d3) == 1);
  strdeque_delete(d2);
  assert(strdeque_comp(d2, d3) == 0);
  assert(strdeque_comp(d2, emptystrdeque()) == 0);
  assert(strdeque_comp(emptystrdeque(), d3) == 0);
  assert(strdeque_comp(emptystrdeque(), emptystrdeque()) == 0);
  assert(strdeque_size(emptystrdeque()) == 0);
  strdeque_delete(emptystrdeque());
  strdeque_insert_at(emptystrdeque(), 0, "d");
  assert(strdeque_size(emptystrdeque()) == 0);
  strdeque_insert_at(emptystrdeque(), 0, "d");
  strdeque_insert_at(emptystrdeque(), 0, "dd");
  assert(strdeque_get_at(emptystrdeque(), 0) == NULL);
  strdeque_remove_at(emptystrdeque(), 0);
  assert(strdeque_size(emptystrdeque()) == 0);
  strdeque_clear(emptystrdeque());
  return 0;
}
```