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

```asm
<main>:
  endbr64
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x438,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,0x428(%rsp)
  xor    %eax,%eax
  movabs $0x6f77206f6c6c6568,%rax
  mov    %rax,0x14(%rsp)
  movl   $0x646c72,0x1c(%rsp)
  mov    $0x400,%edi
  call   <circular_buffer_init@plt>
  mov    %rax,%r12
  mov    %rax,%rdi
  call   <circular_buffer_capacity@plt>
  mov    %eax,%esi
  lea    D19(%rip),%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  mov    %r12,%rdi
  call   <circular_buffer_size@plt>
  mov    %eax,%esi
  lea    D39(%rip),%rbx
  mov    %rbx,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  mov    $0xa,%edi
  call   <putchar@plt>
  lea    0x14(%rsp),%rsi
  mov    $0xb,%edx
  mov    %r12,%rdi
  call   <circular_buffer_push@plt>
  mov    %r12,%rdi
  call   <circular_buffer_size@plt>
  mov    %eax,%esi
  mov    %rbx,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  lea    0x20(%rsp),%rsi
  mov    $0x400,%edx
  mov    %r12,%rdi
  call   <circular_buffer_push@plt>
  mov    %r12,%rdi
  call   <circular_buffer_size@plt>
  mov    %eax,%esi
  mov    %rbx,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  mov    $0xa,%edi
  call   <putchar@plt>
  mov    %r12,%rdi
  call   <circular_buffer_clear@plt>
  mov    %r12,%rdi
  call   <circular_buffer_size@plt>
  mov    %eax,%esi
  mov    %rbx,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  mov    $0xa,%edi
  call   <putchar@plt>
  mov    $0xa,%ebx
  lea    0x14(%rsp),%rbp
L7:
  mov    $0xb,%edx
  mov    %rbp,%rsi
  mov    %r12,%rdi
  call   <circular_buffer_push@plt>
  mov    $0x5,%edx
  mov    %rbp,%rsi
  mov    %r12,%rdi
  call   <circular_buffer_push@plt>
  sub    $0x1,%rbx
  jne    L7
  mov    $0x14,%ebx
  lea    D11(%rip),%r13
L6:
  lea    0x8(%rsp),%rdx
  lea    0x20(%rsp),%rbp
  mov    %rbp,%rsi
  mov    %r12,%rdi
  call   <circular_buffer_pop@plt>
  mov    0x8(%rsp),%rsi
  movb   $0x0,0x20(%rsp,%rsi,1)
  mov    %rbp,%rdx
  mov    %r13,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  sub    $0x1,%rbx
  jne    L6
  mov    $0xa,%edi
  call   <putchar@plt>
  lea    0x8(%rsp),%rdx
  mov    %rbp,%rsi
  mov    %r12,%rdi
  call   <circular_buffer_pop@plt>
  mov    %rbp,%rdx
  mov    0x8(%rsp),%rsi
  lea    D11(%rip),%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  mov    0x428(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L5
  mov    $0x0,%eax
  add    $0x438,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  ret
L5:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: disassemble_data
arguments: data_tag: D19
datatype: string
name: disassemble_data
arguments: data_tag: D39
datatype: string
name: disassemble_data
arguments: data_tag: D11
datatype: string

tool: D19: capacity: %d


tool: D39: size: %d


tool: D11: nread: %d string: %s


assistant: ```c
int main() {
  char tmpBuf[1024];
  char helloBuf[] = "hello world";
  size_t nread;
  size_t i;
  struct circular_buffer *buf = circular_buffer_init(1024);
  printf("capacity: %d\n", circular_buffer_capacity(buf));
  printf("size: %d\n", circular_buffer_size(buf));
  printf("\n");
  circular_buffer_push(buf, helloBuf, 11);
  printf("size: %d\n", circular_buffer_size(buf));
  circular_buffer_push(buf, tmpBuf, 1024);
  printf("size: %d\n", circular_buffer_size(buf));
  printf("\n");
  circular_buffer_clear(buf);
  printf("size: %d\n", circular_buffer_size(buf));
  printf("\n");
  for (i = 0; i < 10; i++) {
    circular_buffer_push(buf, helloBuf, 11);
    circular_buffer_push(buf, helloBuf, 5);
  }
  for (i = 0; i < 20; i++) {
    circular_buffer_pop(buf, tmpBuf, &nread);
    tmpBuf[nread] = '\0';
    printf("nread: %d string: %s\n", nread, tmpBuf);
  }
  printf("\n");
  circular_buffer_pop(buf, tmpBuf, &nread);
  printf("nread: %d string: %s\n", nread, tmpBuf);
  return 0;
}
```