user: What would the C source look like for the assembly code provided here?

```asm
<pcapack_scale>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x60,%rsp
  mov    %edi,-0x44(%rbp)
  mov    %esi,-0x48(%rbp)
  mov    %edx,-0x4c(%rbp)
  mov    %ecx,-0x50(%rbp)
  mov    %r8,-0x58(%rbp)
  cmpl   $0x0,-0x4c(%rbp)
  je     L246
  cmpl   $0x0,-0x50(%rbp)
  jne    L116
L246:
  mov    $0x0,%eax
  jmp    L223
L116:
  cmpl   $0x0,-0x44(%rbp)
  je     L183
  cmpl   $0x0,-0x48(%rbp)
  je     L183
  pxor   %xmm0,%xmm0
  cvtsi2sdl -0x4c(%rbp),%xmm0
  movsd  D14(%rip),%xmm2
  movapd %xmm0,%xmm1
  subsd  %xmm2,%xmm1
  movsd  D14(%rip),%xmm0
  divsd  %xmm1,%xmm0
  movsd  %xmm0,-0x20(%rbp)
  movl   $0x0,-0x34(%rbp)
  jmp    L146
L255:
  pxor   %xmm0,%xmm0
  movsd  %xmm0,-0x30(%rbp)
  pxor   %xmm0,%xmm0
  movsd  %xmm0,-0x28(%rbp)
  movl   $0x0,-0x38(%rbp)
  jmp    L60
L96:
  mov    -0x4c(%rbp),%eax
  imul   -0x34(%rbp),%eax
  mov    %eax,%edx
  mov    -0x38(%rbp),%eax
  add    %edx,%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x58(%rbp),%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm0
  subsd  -0x30(%rbp),%xmm0
  movsd  %xmm0,-0x18(%rbp)
  pxor   %xmm1,%xmm1
  cvtsi2sdl -0x38(%rbp),%xmm1
  movsd  D14(%rip),%xmm0
  addsd  %xmm0,%xmm1
  movsd  -0x18(%rbp),%xmm0
  divsd  %xmm1,%xmm0
  movsd  -0x30(%rbp),%xmm1
  addsd  %xmm1,%xmm0
  movsd  %xmm0,-0x30(%rbp)
  mov    -0x4c(%rbp),%eax
  imul   -0x34(%rbp),%eax
  mov    %eax,%edx
  mov    -0x38(%rbp),%eax
  add    %edx,%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x58(%rbp),%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm0
  subsd  -0x30(%rbp),%xmm0
  mulsd  -0x18(%rbp),%xmm0
  movsd  -0x28(%rbp),%xmm1
  addsd  %xmm1,%xmm0
  movsd  %xmm0,-0x28(%rbp)
  addl   $0x1,-0x38(%rbp)
L60:
  mov    -0x38(%rbp),%eax
  cmp    -0x4c(%rbp),%eax
  jl     L96
  movsd  -0x28(%rbp),%xmm0
  mulsd  -0x20(%rbp),%xmm0
  movq   %xmm0,%rax
  movq   %rax,%xmm0
  call   <sqrt@plt>
  movq   %xmm0,%rax
  mov    %rax,-0x28(%rbp)
  movl   $0x0,-0x38(%rbp)
  jmp    L97
L11:
  mov    -0x4c(%rbp),%eax
  imul   -0x34(%rbp),%eax
  mov    %eax,%edx
  mov    -0x38(%rbp),%eax
  add    %edx,%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x58(%rbp),%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm0
  subsd  -0x30(%rbp),%xmm0
  mov    -0x4c(%rbp),%eax
  imul   -0x34(%rbp),%eax
  mov    %eax,%edx
  mov    -0x38(%rbp),%eax
  add    %edx,%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x58(%rbp),%rax
  add    %rdx,%rax
  divsd  -0x28(%rbp),%xmm0
  movsd  %xmm0,(%rax)
  addl   $0x1,-0x38(%rbp)
L97:
  mov    -0x38(%rbp),%eax
  cmp    -0x4c(%rbp),%eax
  jl     L11
  addl   $0x1,-0x34(%rbp)
L146:
  mov    -0x34(%rbp),%eax
  cmp    -0x50(%rbp),%eax
  jl     L255
  jmp    L121
L183:
  cmpl   $0x0,-0x44(%rbp)
  je     L188
  pxor   %xmm1,%xmm1
  cvtsi2sdl -0x4c(%rbp),%xmm1
  movsd  D14(%rip),%xmm0
  divsd  %xmm1,%xmm0
  movsd  %xmm0,-0x8(%rbp)
  movl   $0x0,-0x34(%rbp)
  jmp    L43
L98:
  pxor   %xmm0,%xmm0
  movsd  %xmm0,-0x30(%rbp)
  movl   $0x0,-0x38(%rbp)
  jmp    L237
L190:
  mov    -0x4c(%rbp),%eax
  imul   -0x34(%rbp),%eax
  mov    %eax,%edx
  mov    -0x38(%rbp),%eax
  add    %edx,%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x58(%rbp),%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm0
  mulsd  -0x8(%rbp),%xmm0
  movsd  -0x30(%rbp),%xmm1
  addsd  %xmm1,%xmm0
  movsd  %xmm0,-0x30(%rbp)
  addl   $0x1,-0x38(%rbp)
L237:
  mov    -0x38(%rbp),%eax
  cmp    -0x4c(%rbp),%eax
  jl     L190
  movl   $0x0,-0x38(%rbp)
  jmp    L258
L182:
  mov    -0x4c(%rbp),%eax
  imul   -0x34(%rbp),%eax
  mov    %eax,%edx
  mov    -0x38(%rbp),%eax
  add    %edx,%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x58(%rbp),%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm0
  mov    -0x4c(%rbp),%eax
  imul   -0x34(%rbp),%eax
  mov    %eax,%edx
  mov    -0x38(%rbp),%eax
  add    %edx,%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x58(%rbp),%rax
  add    %rdx,%rax
  subsd  -0x30(%rbp),%xmm0
  movsd  %xmm0,(%rax)
  addl   $0x1,-0x38(%rbp)
L258:
  mov    -0x38(%rbp),%eax
  cmp    -0x4c(%rbp),%eax
  jl     L182
  addl   $0x1,-0x34(%rbp)
L43:
  mov    -0x34(%rbp),%eax
  cmp    -0x50(%rbp),%eax
  jl     L98
  jmp    L121
L188:
  cmpl   $0x0,-0x48(%rbp)
  je     L121
  pxor   %xmm0,%xmm0
  cvtsi2sdl -0x4c(%rbp),%xmm0
  movsd  D14(%rip),%xmm2
  movapd %xmm0,%xmm1
  subsd  %xmm2,%xmm1
  movsd  D14(%rip),%xmm0
  divsd  %xmm1,%xmm0
  movsd  %xmm0,-0x10(%rbp)
  movl   $0x0,-0x34(%rbp)
  jmp    L256
L191:
  pxor   %xmm0,%xmm0
  movsd  %xmm0,-0x28(%rbp)
  movl   $0x0,-0x38(%rbp)
  jmp    L171
L115:
  mov    -0x4c(%rbp),%eax
  imul   -0x34(%rbp),%eax
  mov    %eax,%edx
  mov    -0x38(%rbp),%eax
  add    %edx,%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x58(%rbp),%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm0
  movsd  %xmm0,-0x20(%rbp)
  movsd  -0x20(%rbp),%xmm0
  mulsd  %xmm0,%xmm0
  mulsd  -0x10(%rbp),%xmm0
  movsd  -0x28(%rbp),%xmm1
  addsd  %xmm1,%xmm0
  movsd  %xmm0,-0x28(%rbp)
  addl   $0x1,-0x38(%rbp)
L171:
  mov    -0x38(%rbp),%eax
  cmp    -0x4c(%rbp),%eax
  jl     L115
  mov    -0x28(%rbp),%rax
  movq   %rax,%xmm0
  call   <sqrt@plt>
  movq   %xmm0,%rax
  mov    %rax,-0x28(%rbp)
  movl   $0x0,-0x38(%rbp)
  jmp    L51
L198:
  mov    -0x4c(%rbp),%eax
  imul   -0x34(%rbp),%eax
  mov    %eax,%edx
  mov    -0x38(%rbp),%eax
  add    %edx,%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x58(%rbp),%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm0
  mov    -0x4c(%rbp),%eax
  imul   -0x34(%rbp),%eax
  mov    %eax,%edx
  mov    -0x38(%rbp),%eax
  add    %edx,%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x58(%rbp),%rax
  add    %rdx,%rax
  divsd  -0x28(%rbp),%xmm0
  movsd  %xmm0,(%rax)
  addl   $0x1,-0x38(%rbp)
L51:
  mov    -0x38(%rbp),%eax
  cmp    -0x4c(%rbp),%eax
  jl     L198
  addl   $0x1,-0x34(%rbp)
L256:
  mov    -0x34(%rbp),%eax
  cmp    -0x50(%rbp),%eax
  jl     L191
L121:
  mov    $0x0,%eax
L223:
  leave
  ret
```

tool_calls: name: read_data
arguments: data_label: D14
data_type: f64

tool: D14: 1

assistant: ```c
int pcapack_scale(const bool centerx, const bool scalex, const int m, const int n, double *restrict x) {
  int i, j;
  double colmean, colvar;
  double dt, tmp;
  if (m == 0 || n == 0)
    return 0;
  ;
  if (centerx && scalex) {
    tmp = 1. / ((double)m - 1);
#pragma omp parallel for private(i, j, colmean, colvar, dt) shared(x) if (m * n > OMP_MIN_SIZE)
    for (j = 0; j < n; j++) {
      colmean = 0;
      colvar = 0;

      for (i = 0; i < m; i++) {
        dt = x[i + m * j] - colmean;
        colmean += dt / ((double)i + 1);
        colvar += dt * (x[i + m * j] - colmean);
      }
      colvar = sqrt(colvar * tmp);

      for (i = 0; i < m; i++)
        x[i + m * j] = (x[i + m * j] - colmean) / colvar;
    }
  } else if (centerx) {
    const double div = 1. / ((double)m);
#pragma omp parallel for private(i, j, colmean) shared(x) if (m * n > OMP_MIN_SIZE)
    for (j = 0; j < n; j++) {
      colmean = 0;

      for (i = 0; i < m; i++)
        colmean += x[i + m * j] * div;

      for (i = 0; i < m; i++)
        x[i + m * j] -= colmean;
    }
  } else if (scalex) {
    const double div = 1. / ((double)m - 1);
#pragma omp parallel for private(i, j, colvar, tmp) shared(x) if (m * n > OMP_MIN_SIZE)
    for (j = 0; j < n; j++) {
      colvar = 0;

      for (i = 0; i < m; i++) {
        tmp = x[i + m * j];
        colvar += tmp * tmp * div;
      }
      colvar = sqrt(colvar);

      for (i = 0; i < m; i++)
        x[i + m * j] /= colvar;
    }
  }
  return 0;
}
```