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

```asm
<main>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x70,%rsp
  mov    %edi,-0x64(%rbp)
  mov    %rsi,-0x70(%rbp)
  movl   $0x400,-0x50(%rbp)
  movl   $0x400,-0x4c(%rbp)
  movl   $0x400,-0x48(%rbp)
  movl   $0x400,-0x44(%rbp)
  mov    $0x1,%esi
  mov    $0x10000000,%edi
  call   <spm_malloc@plt>
  mov    %rax,-0x40(%rbp)
  mov    -0x40(%rbp),%rax
  mov    %rax,-0x38(%rbp)
  mov    -0x40(%rbp),%rax
  add    $0x4000000,%rax
  mov    %rax,-0x30(%rbp)
  mov    -0x30(%rbp),%rax
  add    $0x4000000,%rax
  mov    %rax,-0x28(%rbp)
  mov    -0x28(%rbp),%rax
  add    $0x4000000,%rax
  mov    %rax,-0x20(%rbp)
  mov    -0x20(%rbp),%rax
  add    $0x4000000,%rax
  mov    %rax,-0x18(%rbp)
  movsd  D18(%rip),%xmm0
  movsd  %xmm0,-0x10(%rbp)
  movsd  D27(%rip),%xmm0
  movsd  %xmm0,-0x8(%rbp)
  movl   $0x0,-0x5c(%rbp)
  jmp    L93
L211:
  movl   $0x0,-0x58(%rbp)
  jmp    L26
L5:
  pxor   %xmm1,%xmm1
  cvtsi2sdl -0x5c(%rbp),%xmm1
  pxor   %xmm0,%xmm0
  cvtsi2sdl -0x58(%rbp),%xmm0
  mulsd  %xmm1,%xmm0
  pxor   %xmm1,%xmm1
  cvtsi2sdl -0x50(%rbp),%xmm1
  mov    -0x5c(%rbp),%eax
  imul   -0x48(%rbp),%eax
  mov    %eax,%edx
  mov    -0x58(%rbp),%eax
  add    %edx,%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x30(%rbp),%rax
  add    %rdx,%rax
  divsd  %xmm1,%xmm0
  movsd  %xmm0,(%rax)
  addl   $0x1,-0x58(%rbp)
L26:
  mov    -0x58(%rbp),%eax
  cmp    -0x48(%rbp),%eax
  jl     L5
  addl   $0x1,-0x5c(%rbp)
L93:
  mov    -0x5c(%rbp),%eax
  cmp    -0x50(%rbp),%eax
  jl     L211
  movl   $0x0,-0x5c(%rbp)
  jmp    L52
L105:
  movl   $0x0,-0x58(%rbp)
  jmp    L221
L86:
  pxor   %xmm1,%xmm1
  cvtsi2sdl -0x5c(%rbp),%xmm1
  mov    -0x58(%rbp),%eax
  add    $0x1,%eax
  pxor   %xmm0,%xmm0
  cvtsi2sd %eax,%xmm0
  mulsd  %xmm1,%xmm0
  pxor   %xmm1,%xmm1
  cvtsi2sdl -0x4c(%rbp),%xmm1
  mov    -0x5c(%rbp),%eax
  imul   -0x4c(%rbp),%eax
  mov    %eax,%edx
  mov    -0x58(%rbp),%eax
  add    %edx,%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x28(%rbp),%rax
  add    %rdx,%rax
  divsd  %xmm1,%xmm0
  movsd  %xmm0,(%rax)
  addl   $0x1,-0x58(%rbp)
L221:
  mov    -0x58(%rbp),%eax
  cmp    -0x4c(%rbp),%eax
  jl     L86
  addl   $0x1,-0x5c(%rbp)
L52:
  mov    -0x5c(%rbp),%eax
  cmp    -0x48(%rbp),%eax
  jl     L105
  movl   $0x0,-0x5c(%rbp)
  jmp    L152
L239:
  movl   $0x0,-0x58(%rbp)
  jmp    L186
L212:
  pxor   %xmm1,%xmm1
  cvtsi2sdl -0x5c(%rbp),%xmm1
  mov    -0x58(%rbp),%eax
  add    $0x3,%eax
  pxor   %xmm0,%xmm0
  cvtsi2sd %eax,%xmm0
  mulsd  %xmm1,%xmm0
  pxor   %xmm1,%xmm1
  cvtsi2sdl -0x44(%rbp),%xmm1
  mov    -0x5c(%rbp),%eax
  imul   -0x4c(%rbp),%eax
  mov    %eax,%edx
  mov    -0x58(%rbp),%eax
  add    %edx,%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x20(%rbp),%rax
  add    %rdx,%rax
  divsd  %xmm1,%xmm0
  movsd  %xmm0,(%rax)
  addl   $0x1,-0x58(%rbp)
L186:
  mov    -0x58(%rbp),%eax
  cmp    -0x4c(%rbp),%eax
  jl     L212
  addl   $0x1,-0x5c(%rbp)
L152:
  mov    -0x5c(%rbp),%eax
  cmp    -0x44(%rbp),%eax
  jl     L239
  movl   $0x0,-0x5c(%rbp)
  jmp    L66
L11:
  movl   $0x0,-0x58(%rbp)
  jmp    L9
L36:
  pxor   %xmm1,%xmm1
  cvtsi2sdl -0x5c(%rbp),%xmm1
  mov    -0x58(%rbp),%eax
  add    $0x2,%eax
  pxor   %xmm0,%xmm0
  cvtsi2sd %eax,%xmm0
  mulsd  %xmm1,%xmm0
  pxor   %xmm1,%xmm1
  cvtsi2sdl -0x48(%rbp),%xmm1
  mov    -0x5c(%rbp),%eax
  imul   -0x44(%rbp),%eax
  mov    %eax,%edx
  mov    -0x58(%rbp),%eax
  add    %edx,%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x18(%rbp),%rax
  add    %rdx,%rax
  divsd  %xmm1,%xmm0
  movsd  %xmm0,(%rax)
  addl   $0x1,-0x58(%rbp)
L9:
  mov    -0x58(%rbp),%eax
  cmp    -0x44(%rbp),%eax
  jl     L36
  addl   $0x1,-0x5c(%rbp)
L66:
  mov    -0x5c(%rbp),%eax
  cmp    -0x50(%rbp),%eax
  jl     L11
  mov    $0x0,%esi
  mov    $0x0,%edi
  call   <m5_reset_stats@plt>
  movl   $0x0,-0x5c(%rbp)
  jmp    L38
L174:
  movl   $0x0,-0x58(%rbp)
  jmp    L147
L136:
  mov    -0x5c(%rbp),%eax
  shl    $0xa,%eax
  mov    %eax,%edx
  mov    -0x58(%rbp),%eax
  add    %edx,%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x38(%rbp),%rax
  add    %rdx,%rax
  pxor   %xmm0,%xmm0
  movsd  %xmm0,(%rax)
  movl   $0x0,-0x54(%rbp)
  jmp    L151
L1:
  mov    -0x5c(%rbp),%eax
  shl    $0xa,%eax
  mov    %eax,%edx
  mov    -0x58(%rbp),%eax
  add    %edx,%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x38(%rbp),%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm1
  mov    -0x5c(%rbp),%eax
  shl    $0xa,%eax
  mov    %eax,%edx
  mov    -0x54(%rbp),%eax
  add    %edx,%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x30(%rbp),%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm0
  movapd %xmm0,%xmm2
  mulsd  -0x10(%rbp),%xmm2
  mov    -0x54(%rbp),%eax
  shl    $0xa,%eax
  mov    %eax,%edx
  mov    -0x58(%rbp),%eax
  add    %edx,%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x28(%rbp),%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm0
  mulsd  %xmm2,%xmm0
  mov    -0x5c(%rbp),%eax
  shl    $0xa,%eax
  mov    %eax,%edx
  mov    -0x58(%rbp),%eax
  add    %edx,%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x38(%rbp),%rax
  add    %rdx,%rax
  addsd  %xmm1,%xmm0
  movsd  %xmm0,(%rax)
  addl   $0x1,-0x54(%rbp)
L151:
  cmpl   $0x3ff,-0x54(%rbp)
  jle    L1
  addl   $0x1,-0x58(%rbp)
L147:
  cmpl   $0x3ff,-0x58(%rbp)
  jle    L136
  addl   $0x1,-0x5c(%rbp)
L38:
  cmpl   $0x3ff,-0x5c(%rbp)
  jle    L174
  movl   $0x0,-0x5c(%rbp)
  jmp    L278
L63:
  movl   $0x0,-0x58(%rbp)
  jmp    L206
L139:
  mov    -0x5c(%rbp),%eax
  shl    $0xa,%eax
  mov    %eax,%edx
  mov    -0x58(%rbp),%eax
  add    %edx,%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x18(%rbp),%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm0
  mov    -0x5c(%rbp),%eax
  shl    $0xa,%eax
  mov    %eax,%edx
  mov    -0x58(%rbp),%eax
  add    %edx,%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x18(%rbp),%rax
  add    %rdx,%rax
  mulsd  -0x8(%rbp),%xmm0
  movsd  %xmm0,(%rax)
  movl   $0x0,-0x54(%rbp)
  jmp    L48
L34:
  mov    -0x5c(%rbp),%eax
  shl    $0xa,%eax
  mov    %eax,%edx
  mov    -0x58(%rbp),%eax
  add    %edx,%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x18(%rbp),%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm1
  mov    -0x5c(%rbp),%eax
  shl    $0xa,%eax
  mov    %eax,%edx
  mov    -0x54(%rbp),%eax
  add    %edx,%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x38(%rbp),%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm2
  mov    -0x54(%rbp),%eax
  shl    $0xa,%eax
  mov    %eax,%edx
  mov    -0x58(%rbp),%eax
  add    %edx,%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x20(%rbp),%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm0
  mulsd  %xmm2,%xmm0
  mov    -0x5c(%rbp),%eax
  shl    $0xa,%eax
  mov    %eax,%edx
  mov    -0x58(%rbp),%eax
  add    %edx,%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x18(%rbp),%rax
  add    %rdx,%rax
  addsd  %xmm1,%xmm0
  movsd  %xmm0,(%rax)
  addl   $0x1,-0x54(%rbp)
L48:
  cmpl   $0x3ff,-0x54(%rbp)
  jle    L34
  addl   $0x1,-0x58(%rbp)
L206:
  cmpl   $0x3ff,-0x58(%rbp)
  jle    L139
  addl   $0x1,-0x5c(%rbp)
L278:
  cmpl   $0x3ff,-0x5c(%rbp)
  jle    L63
  mov    $0x0,%esi
  mov    $0x0,%edi
  call   <m5_dump_stats@plt>
  mov    -0x18(%rbp),%rax
  add    $0x58,%rax
  movsd  (%rax),%xmm2
  mov    -0x20(%rbp),%rax
  add    $0x58,%rax
  movsd  (%rax),%xmm1
  mov    -0x28(%rbp),%rax
  add    $0x58,%rax
  movsd  (%rax),%xmm0
  mov    -0x30(%rbp),%rax
  add    $0x58,%rax
  mov    (%rax),%rax
  movsd  -0x8(%rbp),%xmm4
  movsd  -0x10(%rbp),%xmm3
  movapd %xmm4,%xmm5
  movapd %xmm3,%xmm4
  movapd %xmm2,%xmm3
  movapd %xmm1,%xmm2
  movapd %xmm0,%xmm1
  movq   %rax,%xmm0
  lea    D0(%rip),%rax
  mov    %rax,%rdi
  call   <printf@plt>
  mov    $0x0,%eax
  leave
  ret
```

tool_calls: name: read_data
arguments: data_label: D18
type: byte[8]
name: read_data
arguments: data_label: D27
type: byte[8]
name: read_data
arguments: data_label: D0
type: string

tool: {"D18": [0x00,0x00,0x00,0x00,0x00,0xa7,0xdf,0x40]}

tool: {"D27": [0x00,0x00,0x00,0x00,0x00,0x96,0xa0,0x40]}

tool: D0: %f %f %f %f %f %f


assistant: ```c
int main(int argc, char **argv) {
  int ni = 1024;
  int nj = 1024;
  int nk = 1024;
  int nl = 1024;
  double alpha;
  double beta;
  double *vaddr1 = (double *)spm_malloc(1024 * 1024 * 256, 1);
  double *tmp = vaddr1;
  double *A = vaddr1 + 1024 * 1024 * sizeof(double);
  double *B = A + 1024 * 1024 * sizeof(double);
  double *C = B + 1024 * 1024 * sizeof(double);
  double *D = C + 1024 * 1024 * sizeof(double);
  int i, j, k;
  alpha = 32412;
  beta = 2123;
  for (i = 0; i < ni; i++)
    for (j = 0; j < nk; j++)
      A[i * nk + j] = ((double)i * j) / ni;
  for (i = 0; i < nk; i++)
    for (j = 0; j < nj; j++)
      B[i * nj + j] = ((double)i * (j + 1)) / nj;
  for (i = 0; i < nl; i++)
    for (j = 0; j < nj; j++)
      C[i * nj + j] = ((double)i * (j + 3)) / nl;
  for (i = 0; i < ni; i++)
    for (j = 0; j < nl; j++)
      D[i * nl + j] = ((double)i * (j + 2)) / nk;
  m5_reset_stats(0, 0);
#pragma scop
  for (i = 0; i < 1024; i++)
    for (j = 0; j < 1024; j++) {
      tmp[i * 1024 + j] = 0;
      for (k = 0; k < 1024; ++k)
        tmp[i * 1024 + j] += alpha * A[i * 1024 + k] * B[k * 1024 + j];
    }
  for (i = 0; i < 1024; i++)
    for (j = 0; j < 1024; j++) {
      D[i * 1024 + j] *= beta;
      for (k = 0; k < 1024; ++k)
        D[i * 1024 + j] += tmp[i * 1024 + k] * C[k * 1024 + j];
    }
#pragma endscop
  m5_dump_stats(0, 0);
  printf("%f %f %f %f %f %f\n", A[11], B[11], C[11], D[11], alpha, beta);
  return 0;
}
```