user: 请将以下的汇编代码转换成C语言代码:

```asm
<main>:
  endbr64
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x2c0,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,0x2b8(%rsp)
  xor    %eax,%eax
  mov    $0x42,%edi
  call   <tea_bag_size@plt>
  cmp    $0x48,%eax
  sete   %dil
  movzbl %dil,%edi
  call   <assert@plt>
  lea    0x50(%rsp),%rbx
  mov    $0x130,%edx
  mov    $0x58,%esi
  mov    %rbx,%rdi
  call   <memset@plt>
  mov    $0x42,%edx
  mov    $0x61,%esi
  mov    %rbx,%rdi
  call   <memset@plt>
  lea    0x180(%rsp),%rbp
  mov    $0x130,%edx
  mov    $0x58,%esi
  mov    %rbp,%rdi
  call   <memset@plt>
  mov    $0x48,%edx
  mov    $0x0,%esi
  mov    %rbp,%rdi
  call   <memset@plt>
  mov    $0x42,%edx
  mov    $0x61,%esi
  mov    %rbp,%rdi
  call   <memset@plt>
  lea    0x10(%rsp),%r12
  mov    $0x42,%edx
  mov    %rbx,%rsi
  mov    %r12,%rdi
  call   <tea_encrypt@plt>
  mov    $0x48,%edx
  mov    %rbx,%rsi
  mov    %r12,%rdi
  call   <tea_decrypt@plt>
  mov    $0x42,%edx
  mov    %rbx,%rsi
  mov    %r12,%rdi
  call   <tea_encrypt@plt>
  mov    $0x48,%edx
  mov    %rbx,%rsi
  mov    %r12,%rdi
  call   <tea_decrypt@plt>
  mov    $0x130,%edx
  mov    %rbp,%rsi
  mov    %rbx,%rdi
  call   <memcmp@plt>
  test   %rax,%rax
  sete   %dil
  movzbl %dil,%edi
  call   <assert@plt>
  lea    0x8(%rsp),%rdi
  mov    $0x0,%esi
  call   <gettimeofday@plt>
  mov    $0x1e8480,%ebx
  lea    0x50(%rsp),%rbp
L66:
  lea    0x10(%rsp),%rdi
  mov    $0x42,%edx
  mov    %rbp,%rsi
  call   <tea_encrypt@plt>
  sub    $0x1,%ebx
  jne    L66
  lea    0xc(%rsp),%rbx
  mov    $0x0,%esi
  mov    %rbx,%rdi
  call   <gettimeofday@plt>
  lea    0x8(%rsp),%rdi
  mov    %rbx,%rsi
  call   <delta_timeval@plt>
  mov    %rax,%rsi
  test   %rax,%rax
  js     L30
  pxor   %xmm0,%xmm0
  cvtsi2sd %rax,%xmm0
L29:
  mulsd  D53(%rip),%xmm0
  divsd  D49(%rip),%xmm0
  lea    D52(%rip),%rdi
  call   <printf@plt>
  lea    0x8(%rsp),%rdi
  mov    $0x0,%esi
  call   <gettimeofday@plt>
  mov    $0x1e8480,%ebx
  lea    0x50(%rsp),%rbp
L0:
  lea    0x10(%rsp),%rdi
  mov    $0x48,%edx
  mov    %rbp,%rsi
  call   <tea_decrypt@plt>
  sub    $0x1,%ebx
  jne    L0
  lea    0xc(%rsp),%rbx
  mov    $0x0,%esi
  mov    %rbx,%rdi
  call   <gettimeofday@plt>
  lea    0x8(%rsp),%rdi
  mov    %rbx,%rsi
  call   <delta_timeval@plt>
  mov    %rax,%rsi
  test   %rax,%rax
  js     L44
  pxor   %xmm0,%xmm0
  cvtsi2sd %rax,%xmm0
L60:
  mulsd  D53(%rip),%xmm0
  divsd  D49(%rip),%xmm0
  lea    D9(%rip),%rdi
  call   <printf@plt>
  mov    0x2b8(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L9
  mov    $0x0,%eax
  add    $0x2c0,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  ret
L30:
  shr    %rax
  mov    %rsi,%rdx
  and    $0x1,%edx
  or     %rdx,%rax
  pxor   %xmm0,%xmm0
  cvtsi2sd %rax,%xmm0
  addsd  %xmm0,%xmm0
  jmp    L29
L44:
  shr    %rax
  mov    %rsi,%rdx
  and    $0x1,%edx
  or     %rdx,%rax
  pxor   %xmm0,%xmm0
  cvtsi2sd %rax,%xmm0
  addsd  %xmm0,%xmm0
  jmp    L60
L9:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: retrieve_data
arguments: tag: D53
type_infered: f64
name: retrieve_data
arguments: tag: D49
type_infered: byte[8]
name: retrieve_data
arguments: tag: D52
type_infered: string
name: retrieve_data
arguments: tag: D9
type_infered: string

tool: D53: 1000

tool: {"D49": [0x00,0x00,0x00,0x00,0x80,0x84,0x3e,0x41]}

tool: D52: TEA Encrypt %luus  %.0fns


tool: D9: TEA Decrypt %luus  %.0fns


assistant: ```c
int main(int argc, char *argv[]) {
  uint8_t buf[72 + 4], expect[72 + 4];
  uint8_t key[16];
  unsigned long delta;
  struct timeval start, end;
  assert(tea_bag_size(66) == 72);
  memset(buf, 'X', sizeof(buf));
  memset(buf, 'a', 66);
  memset(expect, 'X', sizeof(expect));
  memset(expect, 0, 72);
  memset(expect, 'a', 66);
  tea_encrypt(key, buf, 66);
  tea_decrypt(key, buf, 72);
  tea_encrypt(key, buf, 66);
  tea_decrypt(key, buf, 72);
  assert(memcmp(buf, expect, sizeof(buf)) == 0);
  gettimeofday(&start, NULL);
  for (int i = 0; i < 2000000; ++i)
    tea_encrypt(key, buf, 66);
  gettimeofday(&end, NULL);
  delta = delta_timeval(&start, &end);
  printf("TEA Encrypt %luus  %.0fns\n", delta, (double)delta * 1000.0 / 2000000);
  gettimeofday(&start, NULL);
  for (int i = 0; i < 2000000; ++i)
    tea_decrypt(key, buf, 72);
  gettimeofday(&end, NULL);
  delta = delta_timeval(&start, &end);
  printf("TEA Decrypt %luus  %.0fns\n", delta, (double)delta * 1000.0 / 2000000);
  return 0;
}
```