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

```asm
<main>:
  endbr64
  push   %r14
  mov    $0x800000,%edi
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  call   <malloc@plt>
  mov    $0x400000,%edi
  mov    %rax,%r12
  call   <malloc@plt>
  pxor   %xmm4,%xmm4
  mov    %r12,%rbx
  mov    %r12,%rdx
  movdqa D60(%rip),%xmm1
  movdqa %xmm4,%xmm5
  mov    %rax,%r13
  movdqa D84(%rip),%xmm3
  movdqa D64(%rip),%xmm2
  lea    0x800000(%r12),%rbp
  pcmpgtd %xmm1,%xmm5
  nopl   0x0(%rax,%rax,1)
L12:
  movdqa %xmm3,%xmm0
  movdqa %xmm4,%xmm7
  movdqa %xmm5,%xmm8
  add    $0x20,%rdx
  movdqa %xmm0,%xmm6
  movdqa %xmm5,%xmm9
  paddd  %xmm2,%xmm3
  pmuludq %xmm0,%xmm6
  psrlq  $0x20,%xmm0
  pmuludq %xmm0,%xmm0
  pshufd $0x8,%xmm6,%xmm6
  pshufd $0x8,%xmm0,%xmm0
  punpckldq %xmm0,%xmm6
  movdqa %xmm6,%xmm0
  punpckldq %xmm6,%xmm0
  pcmpgtd %xmm0,%xmm7
  pmuludq %xmm0,%xmm8
  pmuludq %xmm1,%xmm0
  pmuludq %xmm1,%xmm7
  paddq  %xmm8,%xmm7
  movdqa %xmm4,%xmm8
  psllq  $0x20,%xmm7
  paddq  %xmm7,%xmm0
  movdqa %xmm6,%xmm7
  punpckhdq %xmm6,%xmm7
  pcmpgtd %xmm7,%xmm8
  pmuludq %xmm7,%xmm9
  pmuludq %xmm1,%xmm7
  pmuludq %xmm1,%xmm8
  paddq  %xmm9,%xmm8
  psllq  $0x20,%xmm8
  paddq  %xmm8,%xmm7
  shufps $0xdd,%xmm7,%xmm0
  paddd  %xmm6,%xmm0
  psrad  $0x4,%xmm0
  cvtdq2pd %xmm0,%xmm6
  pshufd $0xee,%xmm0,%xmm0
  movups %xmm6,-0x20(%rdx)
  cvtdq2pd %xmm0,%xmm0
  movups %xmm0,-0x10(%rdx)
  cmp    %rbp,%rdx
  jne    L12
  mov    $0x100000,%esi
  mov    %r12,%rdi
  call   <example_function1@plt>
  movdqa D60(%rip),%xmm1
  pxor   %xmm4,%xmm4
  movdqa D84(%rip),%xmm3
  movdqa %xmm4,%xmm5
  movdqa D64(%rip),%xmm2
  movq   %xmm0,%r14
  pcmpgtd %xmm1,%xmm5
  nopl   0x0(%rax)
L29:
  movdqa %xmm3,%xmm0
  movdqa %xmm4,%xmm7
  movdqa %xmm5,%xmm8
  add    $0x20,%rbx
  movdqa %xmm0,%xmm6
  movdqa %xmm5,%xmm9
  paddd  %xmm2,%xmm3
  pmuludq %xmm0,%xmm6
  psrlq  $0x20,%xmm0
  pmuludq %xmm0,%xmm0
  pshufd $0x8,%xmm6,%xmm6
  pshufd $0x8,%xmm0,%xmm0
  punpckldq %xmm0,%xmm6
  movdqa %xmm6,%xmm0
  punpckldq %xmm6,%xmm0
  pcmpgtd %xmm0,%xmm7
  pmuludq %xmm0,%xmm8
  pmuludq %xmm1,%xmm0
  pmuludq %xmm1,%xmm7
  paddq  %xmm8,%xmm7
  movdqa %xmm4,%xmm8
  psllq  $0x20,%xmm7
  paddq  %xmm7,%xmm0
  movdqa %xmm6,%xmm7
  punpckhdq %xmm6,%xmm7
  pcmpgtd %xmm7,%xmm8
  pmuludq %xmm7,%xmm9
  pmuludq %xmm1,%xmm7
  pmuludq %xmm1,%xmm8
  paddq  %xmm9,%xmm8
  psllq  $0x20,%xmm8
  paddq  %xmm8,%xmm7
  shufps $0xdd,%xmm7,%xmm0
  paddd  %xmm6,%xmm0
  psrad  $0x4,%xmm0
  cvtdq2pd %xmm0,%xmm6
  pshufd $0xee,%xmm0,%xmm0
  movups %xmm6,-0x20(%rbx)
  cvtdq2pd %xmm0,%xmm0
  movups %xmm0,-0x10(%rbx)
  cmp    %rbp,%rbx
  jne    L29
  mov    $0x100000,%esi
  mov    %r12,%rdi
  call   <example_static_function@plt>
  movdqa D69(%rip),%xmm5
  mov    %r13,%rdx
  pxor   %xmm7,%xmm7
  movdqa %xmm7,%xmm8
  movdqa D84(%rip),%xmm6
  movdqa D64(%rip),%xmm2
  movq   %xmm0,%rbx
  pcmpgtd %xmm5,%xmm8
  lea    0x400000(%r13),%rcx
  nopl   (%rax)
L7:
  movdqa %xmm6,%xmm1
  movdqa %xmm7,%xmm3
  movdqa %xmm8,%xmm4
  add    $0x10,%rdx
  movdqa %xmm1,%xmm0
  movdqa %xmm8,%xmm9
  paddd  %xmm2,%xmm6
  punpckldq %xmm1,%xmm0
  pcmpgtd %xmm0,%xmm3
  pmuludq %xmm0,%xmm4
  pmuludq %xmm5,%xmm0
  pmuludq %xmm5,%xmm3
  paddq  %xmm4,%xmm3
  movdqa %xmm7,%xmm4
  psllq  $0x20,%xmm3
  paddq  %xmm3,%xmm0
  movdqa %xmm1,%xmm3
  punpckhdq %xmm1,%xmm3
  pcmpgtd %xmm3,%xmm4
  pmuludq %xmm3,%xmm9
  pmuludq %xmm5,%xmm3
  pmuludq %xmm5,%xmm4
  paddq  %xmm9,%xmm4
  psllq  $0x20,%xmm4
  paddq  %xmm4,%xmm3
  shufps $0xdd,%xmm3,%xmm0
  psrad  $0x3,%xmm0
  movdqa %xmm0,%xmm3
  pslld  $0x4,%xmm3
  paddd  %xmm3,%xmm0
  psubd  %xmm0,%xmm1
  movups %xmm1,-0x10(%rdx)
  cmp    %rdx,%rcx
  jne    L7
  mov    %r13,%rdi
  mov    $0x100000,%esi
  call   <example_function2@plt>
  movq   %r14,%xmm2
  lea    D109(%rip),%rdi
  cvttsd2si %xmm2,%esi
  mov    %eax,%ebp
  call   <printf@plt>
  movq   %rbx,%xmm2
  lea    D4(%rip),%rdi
  cvttsd2si %xmm2,%esi
  call   <printf@plt>
  mov    %ebp,%esi
  lea    D112(%rip),%rdi
  call   <printf@plt>
  pop    %rbx
  xor    %eax,%eax
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  ret
```

tool_calls: name: unpack_data
arguments: data_tag: D60
data_type: byte[16]
name: unpack_data
arguments: data_tag: D84
data_type: byte[16]
name: unpack_data
arguments: data_tag: D64
data_type: byte[16]
name: unpack_data
arguments: data_tag: D69
data_type: byte[16]
name: unpack_data
arguments: data_tag: D109
data_type: string
name: unpack_data
arguments: data_tag: D4
data_type: string
name: unpack_data
arguments: data_tag: D112
data_type: string

tool: {"D60": [0x43,0x08,0x21,0x84,0x43,0x08,0x21,0x84,0x43,0x08,0x21,0x84,0x43,0x08,0x21,0x84]}

tool: {"D84": [0x00,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x02,0x00,0x00,0x00,0x03,0x00,0x00,0x00]}

tool: {"D64": [0x04,0x00,0x00,0x00,0x04,0x00,0x00,0x00,0x04,0x00,0x00,0x00,0x04,0x00,0x00,0x00]}

tool: {"D69": [0x79,0x78,0x78,0x78,0x79,0x78,0x78,0x78,0x79,0x78,0x78,0x78,0x79,0x78,0x78,0x78]}

tool: D109: sum double = %lf


tool: D4: static sum double = %lf


tool: D112: sum int = %d


assistant: ```c
int main(int argc, char **argv) {
  double *double_array = malloc(sizeof(double) * (1024 * 1024));
  int *int_array = malloc(sizeof(int) * (1024 * 1024));
  int i;
  for (i = 0; i < (1024 * 1024); i++) {
    double_array[i] = (i * i) / 31;
  }
  double sum_double = example_function1(double_array, (1024 * 1024));
  for (i = 0; i < (1024 * 1024); i++) {
    double_array[i] = (i * i) / 31;
  }
  double static_sum_double = example_static_function(double_array, (1024 * 1024));
  for (i = 0; i < (1024 * 1024); i++) {
    int_array[i] = i % 17;
  }
  int sum_int = example_function2(int_array, (1024 * 1024));
  printf("sum double = %lf\n", sum_double);
  printf("static sum double = %lf\n", static_sum_double);
  printf("sum int = %d\n", sum_int);
  return 0;
}
```