user: 请将这段汇编代码片段转换成等效的C代码:

```asm
<main>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x88,%rsp
  cmp    $0x1,%edi
  jle    L144
  mov    0x8(%rsi),%rdi
  call   <atoi@plt>
  movslq %eax,%rbp
  mov    %ebp,%ebx
  mov    %rbp,%r12
  imul   %ebp,%ebx
  lea    0x0(,%rbx,8),%r13d
  mov    %r13d,%edi
  call   <malloc@plt>
  mov    %r13d,%edi
  mov    %rax,0x20(%rsp)
  call   <malloc@plt>
  mov    %r13d,%edi
  mov    %rax,0x30(%rsp)
  call   <malloc@plt>
  mov    %r13d,%edi
  mov    %rax,0x28(%rsp)
  mov    %rax,%r15
  call   <malloc@plt>
  mov    %rax,0x58(%rsp)
  mov    %rax,%rcx
  test   %ebp,%ebp
  jle    L193
  mov    %r12d,%ebx
  mov    %r15,%r11
  mov    %r12d,0x8(%rsp)
  mov    %rcx,%r8
  and    $0xfffffffe,%ebx
  mov    %r15,%rdi
  mov    0x30(%rsp),%rsi
  xor    %r9d,%r9d
  lea    0x0(,%rbp,8),%r13
  sub    $0x1,%rbp
  mov    %ebx,%r14d
  movsd  D47(%rip),%xmm0
  imul   %r12d,%r14d
  lea    -0x8(%r13),%r15
  pxor   %xmm2,%xmm2
  mov    %rbp,%rdx
  imul   %r13,%rdx
  mov    0x20(%rsp),%rbp
  mov    %r15,0x38(%rsp)
  mov    %r8,%r15
  movapd D47(%rip),%xmm1
  sub    %rbp,%r11
  mov    %rdx,0x10(%rsp)
  mov    %r12d,%edx
  shr    %edx
  mov    %r11,0x60(%rsp)
  mov    %edx,%eax
  sub    $0x1,%eax
  mov    %rax,%r10
  lea    -0x1(%r12),%eax
  shl    $0x4,%r10
  lea    0x0(,%rax,8),%rdx
  mov    %eax,0x18(%rsp)
  mov    %r10,%rax
  mov    %rdx,0x48(%rsp)
  mov    %rcx,%rdx
  mov    %rbp,%rcx
  add    $0x10,%rax
  sub    %rbp,%rdx
  mov    %r10,0x70(%rsp)
  xor    %r10d,%r10d
  mov    %rax,0x40(%rsp)
  mov    0x48(%rsp),%rax
  mov    %rdx,0x68(%rsp)
  add    $0x8,%rax
  mov    %rax,0x50(%rsp)
  nopl   0x0(%rax,%rax,1)
L101:
  mov    0x10(%rsp),%rax
  mov    0x38(%rsp),%r12
  lea    (%rsi,%rax,1),%r11
  lea    0x8(%rcx),%rax
  cmp    %rax,%rdi
  setne  %dl
  cmp    %r8,%rax
  setne  %al
  and    %edx,%eax
  cmpl   $0xa,0x18(%rsp)
  seta   %dl
  and    %edx,%eax
  lea    0x8(%rdi),%rdx
  cmp    %rdx,%r8
  setne  %dl
  and    %edx,%eax
  lea    (%r12,%rcx,1),%rdx
  cmp    %rdx,%rsi
  seta   %dl
  cmp    %rcx,%r11
  setb   %bpl
  or     %ebp,%edx
  and    %edx,%eax
  lea    (%rdi,%r12,1),%rdx
  cmp    %rdx,%rsi
  seta   %dl
  cmp    %rdi,%r11
  setb   %bpl
  or     %ebp,%edx
  test   %dl,%al
  je     L177
  lea    (%r8,%r12,1),%rax
  cmp    %rax,%rsi
  seta   %al
  cmp    %r8,%r11
  setb   %dl
  or     %al,%dl
  je     L177
  mov    0x40(%rsp),%rax
  mov    %rdi,%rbp
  mov    %r8,%r11
  mov    %rsi,%rdx
  sub    %rcx,%rbp
  sub    %rcx,%r11
  lea    (%rax,%rcx,1),%r12
  mov    %rcx,%rax
  nopl   0x0(%rax)
L209:
  movups %xmm1,(%rax)
  movsd  %xmm0,(%rdx)
  add    %r13,%rdx
  movsd  %xmm0,(%rdx)
  add    %r13,%rdx
  movups %xmm2,0x0(%rbp,%rax,1)
  movups %xmm1,(%r11,%rax,1)
  add    $0x10,%rax
  cmp    %r12,%rax
  jne    L209
  cmp    0x8(%rsp),%ebx
  je     L235
  mov    0x20(%rsp),%rdx
  lea    (%r9,%rbx,1),%eax
  mov    0x30(%rsp),%r11
  cltq
  movsd  %xmm0,(%rdx,%rax,8)
  lea    (%r10,%r14,1),%edx
  movslq %edx,%rdx
  movsd  %xmm0,(%r11,%rdx,8)
  mov    0x28(%rsp),%rdx
  movq   $0x0,(%rdx,%rax,8)
  movsd  %xmm0,(%r15,%rax,8)
L235:
  mov    0x8(%rsp),%edx
  lea    0x1(%r10),%eax
  add    $0x8,%rsi
  add    %r13,%rcx
  add    %r13,%rdi
  add    %r13,%r8
  add    %edx,%r9d
  cmp    %eax,%edx
  je     L219
  mov    %eax,%r10d
  jmp    L101
L177:
  mov    0x50(%rsp),%rax
  mov    0x60(%rsp),%rbp
  mov    %rsi,%rdx
  mov    0x68(%rsp),%r12
  lea    (%rax,%rcx,1),%r11
  mov    %rcx,%rax
  nopl   0x0(%rax)
L61:
  movsd  %xmm0,(%rax)
  movsd  %xmm0,(%rdx)
  add    %r13,%rdx
  movq   $0x0,0x0(%rbp,%rax,1)
  movsd  %xmm0,(%r12,%rax,1)
  add    $0x8,%rax
  cmp    %r11,%rax
  jne    L61
  jmp    L235
L219:
  mov    %eax,0x7c(%rsp)
  mov    %eax,%r14d
  xor    %eax,%eax
  mov    %r10d,%ebp
  mov    %r10d,0x50(%rsp)
  mov    0x8(%rsp),%r12d
  call   <dwalltime@plt>
  mov    0x20(%rsp),%rcx
  pxor   %xmm6,%xmm6
  xor    %edx,%edx
  mov    0x58(%rsp),%r10
  mov    0x70(%rsp),%r9
  mov    %r14d,%r11d
  xor    %r8d,%r8d
  mov    %rcx,%rsi
  movsd  %xmm0,0x68(%rsp)
  movapd %xmm6,%xmm2
  movapd %xmm6,%xmm0
  mov    %r10,%rdi
  movsd  %xmm6,0x60(%rsp)
  sub    %r10,%rsi
  add    $0x10,%r9
  cmp    $0x1,%r11d
  je     L269
  nopw   0x0(%rax,%rax,1)
L43:
  lea    (%r9,%rdi,1),%r14
  mov    %rdi,%rax
  nop
L27:
  movupd (%rax,%rsi,1),%xmm3
  movupd (%rax),%xmm5
  add    $0x10,%rax
  movsd  -0x10(%rax),%xmm1
  mulpd  %xmm5,%xmm3
  addsd  %xmm1,%xmm2
  movsd  -0x8(%rax),%xmm1
  addsd  %xmm1,%xmm2
  addsd  %xmm3,%xmm0
  unpckhpd %xmm3,%xmm3
  addsd  %xmm3,%xmm0
  cmp    %r14,%rax
  jne    L27
  mov    %ebx,%eax
  cmp    %r12d,%ebx
  je     L201
L99:
  add    %edx,%eax
  cltq
  movsd  (%r10,%rax,8),%xmm1
  addsd  %xmm1,%xmm2
  mulsd  (%rcx,%rax,8),%xmm1
  addsd  %xmm1,%xmm0
L201:
  lea    0x1(%r8),%eax
  add    %r12d,%edx
  add    %r13,%rdi
  cmp    %ebp,%r8d
  je     L91
  mov    %eax,%r8d
  cmp    $0x1,%r11d
  jne    L43
L269:
  xor    %eax,%eax
  jmp    L99
L91:
  divsd  %xmm2,%xmm0
  mov    0x48(%rsp),%rax
  mov    0x28(%rsp),%rsi
  movq   $0x0,0x38(%rsp)
  movl   $0x0,0x48(%rsp)
  lea    0x8(%rsi,%rax,1),%rsi
  mov    %rsi,0x10(%rsp)
  mov    0x20(%rsp),%rsi
  lea    0x8(%rsi,%rax,1),%r12
  mov    0x30(%rsp),%rax
  sub    %rsi,%rax
  mov    %rax,0x40(%rsp)
  movsd  %xmm0,0x8(%rsp)
  nopl   0x0(%rax)
L147:
  mov    0x38(%rsp),%rax
  mov    0x28(%rsp),%r15
  mov    0x20(%rsp),%rsi
  mov    0x40(%rsp),%rbp
  add    %rax,%r15
  add    %rsi,%rax
  mov    %r15,%r14
  mov    %rax,0x18(%rsp)
  nopw   0x0(%rax,%rax,1)
L146:
  mov    0x18(%rsp),%r15
  nopl   (%rax)
L259:
  movsd  (%r15),%xmm0
  subsd  0x8(%rsp),%xmm0
  mov    $0x2,%edi
  add    $0x8,%r15
  call   <pow@plt>
  movsd  -0x8(%r15,%rbp,1),%xmm0
  subsd  0x8(%rsp),%xmm0
  mov    $0x2,%edi
  mov    %eax,%ebx
  call   <pow@plt>
  imul   %eax,%ebx
  mov    %ebx,%edi
  call   <sqrt@plt>
  pxor   %xmm0,%xmm0
  cvtsi2sd %rax,%xmm0
  addsd  (%r14),%xmm0
  movsd  %xmm0,(%r14)
  cmp    %r12,%r15
  jne    L259
  add    %r13,%rbp
  add    $0x8,%r14
  cmp    0x10(%rsp),%r14
  jne    L146
  mov    0x48(%rsp),%esi
  add    %r13,0x10(%rsp)
  add    %r13,%r12
  add    %r13,0x38(%rsp)
  sub    %r13,0x40(%rsp)
  lea    0x1(%rsi),%eax
  cmp    0x50(%rsp),%esi
  je     L149
  mov    %eax,0x48(%rsp)
  jmp    L147
L149:
  xor    %eax,%eax
  call   <dwalltime@plt>
  subsd  0x68(%rsp),%xmm0
  mov    $0x1,%eax
  lea    D20(%rip),%rdi
  call   <printf@plt>
  mov    0x7c(%rsp),%eax
  imul   %eax,%eax
L134:
  mov    0x28(%rsp),%rdx
  movsd  0x60(%rsp),%xmm0
  xor    %ecx,%ecx
L41:
  ucomisd (%rdx),%xmm0
  jp     L33
  je     L198
L33:
  lea    D19(%rip),%rdi
  call   <puts@plt>
L6:
  mov    0x20(%rsp),%rdi
  call   <free@plt>
  mov    0x30(%rsp),%rdi
  call   <free@plt>
  mov    0x28(%rsp),%rdi
  call   <free@plt>
  mov    0x58(%rsp),%rdi
  call   <free@plt>
L181:
  add    $0x88,%rsp
  xor    %eax,%eax
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
L198:
  add    $0x1,%ecx
  add    $0x8,%rdx
  cmp    %ecx,%eax
  jg     L41
L246:
  lea    D27(%rip),%rdi
  call   <puts@plt>
  jmp    L6
L144:
  lea    D2(%rip),%rdi
  call   <puts@plt>
  jmp    L181
L193:
  xor    %eax,%eax
  call   <dwalltime@plt>
  xor    %eax,%eax
  movsd  %xmm0,0x8(%rsp)
  call   <dwalltime@plt>
  subsd  0x8(%rsp),%xmm0
  mov    $0x1,%eax
  lea    D20(%rip),%rdi
  call   <printf@plt>
  mov    %ebx,%eax
  test   %ebx,%ebx
  je     L246
  pxor   %xmm7,%xmm7
  movsd  %xmm7,0x60(%rsp)
  jmp    L134
```

tool_calls: name: extract_symbolic_data
arguments: tag: D47
type_infered: f64[2]
name: extract_symbolic_data
arguments: tag: D20
type_infered: string
name: extract_symbolic_data
arguments: tag: D19
type_infered: string
name: extract_symbolic_data
arguments: tag: D27
type_infered: string
name: extract_symbolic_data
arguments: tag: D2
type_infered: string

tool: {"D47": [1.0,1.0]}

tool: D20: Tiempo en segundos: %f 


tool: D19: Resultado erroneo

tool: D27: Resultado correcto

tool: D2: 
 Faltan argumentos:: N dimension de la matriz 

assistant: ```c
main(int argc, char *argv[]) {
  double *A, *B, *C, *W;
  int i, j, k, N;
  int check = 1;
  double timetick;
  if (argc < 2) {
    printf("\n Faltan argumentos:: N dimension de la matriz \n");
    return 0;
  }
  N = atoi(argv[1]);
  A = (double *)malloc(sizeof(double) * N * N);
  B = (double *)malloc(sizeof(double) * N * N);
  C = (double *)malloc(sizeof(double) * N * N);
  W = (double *)malloc(sizeof(double) * N * N);
  for (i = 0; i < N; i++) {
    for (j = 0; j < N; j++) {
      A[i * N + j] = 1.0;
      B[i + N * j] = 1.0;
      C[i * N + j] = 0.0;
      W[i * N + j] = 1.0;
    }
  }
  timetick = dwalltime();
  double total = 0;
  double temp = 0;
  for (i = 0; i < N; i++) {
    for (j = 0; j < N; j++) {
      temp += W[i * N + j];
      total += A[i * N + j] * W[i * N + j];
    }
  }
  total /= temp;
  for (i = 0; i < N; i++) {
    for (j = 0; j < N; j++) {
      for (k = 0; k < N; k++) {
        C[i * N + j] += sqrt((pow(A[i * N + k] - total, 2)) * (pow(B[j * N + k] - total, 2)));
      }
    }
  }
  printf("Tiempo en segundos: %f \n", dwalltime() - timetick);
  for (i = 0; i < N * N; i++) {
    check = check && (C[i] == 0.0);
  }
  if (check) {
    printf("Resultado correcto\n");
  } else {
    printf("Resultado erroneo\n");
  }
  free(A);
  free(B);
  free(C);
  free(W);
  return (0);
}
```