user: Translate the below assembly code into C programming language:

```asm
<stepVector_Eigen>:
  endbr64
  push   %r15
  mov    %r8,%r15
  push   %r14
  mov    %edi,%r14d
  push   %r13
  mov    %r9,%r13
  push   %r12
  mov    %rcx,%r12
  push   %rbp
  mov    %rdx,%rbp
  push   %rbx
  mov    %edi,%ebx
  imul   %edi,%ebx
  sub    $0x58,%rsp
  mov    %rsi,0x20(%rsp)
  mov    %ebx,%edi
  mov    $0x8,%esi
  movsd  %xmm0,0x48(%rsp)
  movsd  %xmm1,0x10(%rsp)
  call   <calloc@plt>
  mov    $0x8,%esi
  mov    %ebx,%edi
  mov    %rax,0x18(%rsp)
  call   <calloc@plt>
  mov    $0x8,%esi
  mov    %r14d,%edi
  mov    %rax,0x30(%rsp)
  call   <calloc@plt>
  mov    $0x8,%esi
  mov    %r14d,%edi
  mov    %rax,0x28(%rsp)
  call   <calloc@plt>
  mov    $0x8,%esi
  mov    %r14d,%edi
  mov    %rax,(%rsp)
  call   <calloc@plt>
  cmpq   $0x0,0x18(%rsp)
  mov    0x28(%rsp),%r11
  mov    %rax,0x8(%rsp)
  mov    0x30(%rsp),%r8
  je     L424
  test   %r8,%r8
  je     L424
  test   %r11,%r11
  mov    %rax,%rdi
  sete   %al
  cmpq   $0x0,(%rsp)
  sete   %dl
  or     %dl,%al
  jne    L424
  test   %rdi,%rdi
  jne    L63
L424:
  lea    D4(%rip),%rdi
  mov    %r11,0x30(%rsp)
  mov    %r8,0x28(%rsp)
  call   <printf@plt>
  mov    $0xffffffff,%edi
  call   <exit@plt>
  mov    0x30(%rsp),%r11
  mov    0x28(%rsp),%r8
L63:
  test   %r14d,%r14d
  jle    L189
  movslq %r14d,%r10
  mov    0x18(%rsp),%rdx
  movsd  D55(%rip),%xmm0
  xor    %eax,%eax
  lea    0x8(,%r10,8),%r9
  nopl   0x0(%rax)
L207:
  mov    %eax,%ebx
  add    $0x1,%eax
  movsd  %xmm0,(%rdx)
  add    %r9,%rdx
  cmp    %eax,%r14d
  jne    L207
  mov    0x18(%rsp),%rdx
  mov    0x20(%rsp),%rsi
  mov    %r11,%rcx
  mov    %r14d,%edi
  mov    %r10,0x40(%rsp)
  mov    %r9,0x38(%rsp)
  mov    %r8,0x30(%rsp)
  mov    %r11,0x28(%rsp)
  call   <gen_sym_eigen@plt>
  mov    (%rsp),%rax
  mov    0x30(%rsp),%r8
  mov    0x38(%rsp),%r9
  mov    0x8(%rsp),%rcx
  mov    %rax,%rdx
  mov    0x28(%rsp),%r11
  lea    0x8(%rax,%rbx,8),%rax
  mov    %r8,%rsi
  mov    0x40(%rsp),%r10
  mov    %r8,0x20(%rsp)
  sub    $0x8,%r9
  mov    %rax,%r8
  xchg   %ax,%ax
L51:
  xor    %eax,%eax
  nopw   0x0(%rax,%rax,1)
L205:
  movsd  0x0(%rbp,%rax,8),%xmm0
  mulsd  (%rsi,%rax,8),%xmm0
  mov    %rax,%rdi
  addsd  (%rdx),%xmm0
  movsd  %xmm0,(%rdx)
  movsd  (%r12,%rax,8),%xmm0
  mulsd  (%rsi,%rax,8),%xmm0
  add    $0x1,%rax
  addsd  (%rcx),%xmm0
  movsd  %xmm0,(%rcx)
  cmp    %rbx,%rdi
  jne    L205
  add    $0x8,%rdx
  add    %r9,%rsi
  add    $0x8,%rcx
  cmp    %r8,%rdx
  jne    L51
  pxor   %xmm4,%xmm4
  mov    0x20(%rsp),%r8
  mov    (%rsp),%rcx
  xor    %eax,%eax
  movq   D38(%rip),%xmm5
  mov    0x8(%rsp),%rsi
  movapd %xmm4,%xmm7
  movapd %xmm4,%xmm6
  jmp    L235
L28:
  mov    %rdx,%rax
L235:
  movsd  (%r11,%rax,8),%xmm1
  movapd %xmm1,%xmm0
  andpd  %xmm5,%xmm0
  comisd %xmm4,%xmm0
  jbe    L53
  movsd  (%rsi,%rax,8),%xmm0
  movsd  (%rcx,%rax,8),%xmm2
  mulsd  %xmm0,%xmm2
  mulsd  %xmm0,%xmm0
  divsd  %xmm1,%xmm2
  divsd  %xmm1,%xmm0
  addsd  %xmm2,%xmm7
  addsd  %xmm0,%xmm6
L53:
  lea    0x1(%rax),%rdx
  cmp    %rbx,%rax
  jne    L28
  ucomisd %xmm4,%xmm6
  jp     L14
  movapd %xmm4,%xmm3
  je     L164
L14:
  movsd  0x48(%rsp),%xmm3
  subsd  %xmm7,%xmm3
  divsd  %xmm6,%xmm3
L164:
  lea    0x0(,%r10,8),%rdx
  xor    %esi,%esi
  mov    %r13,%rdi
  mov    %r11,0x38(%rsp)
  mov    %r8,0x30(%rsp)
  mov    %r10,0x20(%rsp)
  movsd  %xmm3,0x28(%rsp)
  call   <memset@plt>
  mov    %r14d,%eax
  mov    %r14d,%r9d
  mov    0x30(%rsp),%r8
  shr    %eax
  and    $0xfffffffe,%r9d
  movsd  0x28(%rsp),%xmm3
  xor    %ecx,%ecx
  lea    -0x1(%rax),%edi
  mov    %r9d,%eax
  mov    0x38(%rsp),%r11
  mov    0x20(%rsp),%r10
  add    $0x1,%rdi
  lea    0x0(%r13,%rax,8),%rsi
  pxor   %xmm4,%xmm4
  xor    %edx,%edx
  movq   D38(%rip),%xmm5
  shl    $0x4,%rdi
  jmp    L99
L261:
  add    $0x1,%rdx
  add    %r14d,%ecx
  cmp    %r10,%rdx
  je     L137
  nopl   0x0(%rax)
L99:
  movsd  (%r11,%rdx,8),%xmm1
  movapd %xmm1,%xmm0
  andpd  %xmm5,%xmm0
  comisd %xmm4,%xmm0
  jbe    L261
  mov    0x8(%rsp),%rax
  movsd  (%rax,%rdx,8),%xmm0
  mov    (%rsp),%rax
  mulsd  %xmm3,%xmm0
  addsd  (%rax,%rdx,8),%xmm0
  movslq %ecx,%rax
  lea    0x8(,%rax,8),%rax
  lea    (%r8,%rax,1),%rbx
  divsd  %xmm1,%xmm0
  cmp    %rbx,%r13
  lea    -0x8(%r8,%rax,1),%rbx
  je     L357
  cmp    $0x1,%r14d
  je     L357
  movapd %xmm0,%xmm6
  xor    %eax,%eax
  unpcklpd %xmm6,%xmm6
L375:
  movupd (%rbx,%rax,1),%xmm2
  movupd 0x0(%r13,%rax,1),%xmm1
  mulpd  %xmm6,%xmm2
  subpd  %xmm2,%xmm1
  movups %xmm1,0x0(%r13,%rax,1)
  add    $0x10,%rax
  cmp    %rax,%rdi
  jne    L375
  cmp    %r9d,%r14d
  je     L261
  lea    (%rcx,%r9,1),%eax
  movsd  (%rsi),%xmm1
  add    $0x1,%rdx
  add    %r14d,%ecx
  cltq
  mulsd  (%r8,%rax,8),%xmm0
  subsd  %xmm0,%xmm1
  movsd  %xmm1,(%rsi)
  cmp    %r10,%rdx
  jne    L99
L137:
  comisd 0x10(%rsp),%xmm4
  jae    L347
L350:
  test   %r14d,%r14d
  mov    $0x1,%ecx
  cmovg  %r14d,%ecx
  cmp    $0x1,%r14d
  jle    L256
  mov    %ecx,%edx
  movapd %xmm4,%xmm0
  mov    %r13,%rax
  shr    %edx
  sub    $0x1,%edx
  shl    $0x4,%rdx
  lea    0x10(%r13,%rdx,1),%rdx
  nopl   (%rax)
L328:
  movupd (%rax),%xmm2
  add    $0x10,%rax
  mulpd  %xmm2,%xmm2
  addsd  %xmm2,%xmm0
  unpckhpd %xmm2,%xmm2
  addsd  %xmm2,%xmm0
  cmp    %rax,%rdx
  jne    L328
  mov    %ecx,%eax
  and    $0xfffffffe,%eax
  and    $0x1,%ecx
  je     L247
L452:
  cltq
  movsd  0x0(%r13,%rax,8),%xmm1
  mulsd  %xmm1,%xmm1
  addsd  %xmm1,%xmm0
L247:
  ucomisd %xmm0,%xmm4
  ja     L128
L105:
  sqrtsd %xmm0,%xmm0
L237:
  movsd  0x10(%rsp),%xmm5
  comisd %xmm5,%xmm0
  jbe    L386
  test   %r14d,%r14d
  jle    L450
  cmp    $0x1,%r14d
  je     L259
  mov    %r14d,%edx
  movapd %xmm5,%xmm4
  movapd %xmm0,%xmm2
  mov    %r13,%rax
  shr    %edx
  unpcklpd %xmm4,%xmm4
  unpcklpd %xmm2,%xmm2
  sub    $0x1,%edx
  shl    $0x4,%rdx
  lea    0x10(%r13,%rdx,1),%rdx
  nopl   (%rax)
L89:
  movupd (%rax),%xmm1
  add    $0x10,%rax
  mulpd  %xmm4,%xmm1
  divpd  %xmm2,%xmm1
  movups %xmm1,-0x10(%rax)
  cmp    %rdx,%rax
  jne    L89
  mov    %r14d,%eax
  and    $0xfffffffe,%eax
  test   $0x1,%r14b
  je     L388
L74:
  cltq
  movsd  0x10(%rsp),%xmm1
  lea    0x0(%r13,%rax,8),%rax
  mulsd  (%rax),%xmm1
  divsd  %xmm0,%xmm1
  movsd  %xmm1,(%rax)
L388:
  lea    0x8(%rbp),%rax
  cmp    %rax,%r15
  lea    0x8(%r12),%rax
  setne  %dl
  cmp    %rax,%r15
  setne  %al
  test   %al,%dl
  je     L3
  cmp    $0x2,%r14d
  jle    L3
  test   %r14d,%r14d
  mov    $0x1,%ecx
  movapd %xmm3,%xmm1
  cmovg  %r14d,%ecx
  unpcklpd %xmm1,%xmm1
  xor    %eax,%eax
  mov    %ecx,%edx
  shr    %edx
  shl    $0x4,%rdx
  nopl   0x0(%rax,%rax,1)
L254:
  movupd (%r12,%rax,1),%xmm0
  movupd 0x0(%rbp,%rax,1),%xmm7
  mulpd  %xmm1,%xmm0
  addpd  %xmm7,%xmm0
  movups %xmm0,(%r15,%rax,1)
  add    $0x10,%rax
  cmp    %rax,%rdx
  jne    L254
  mov    %ecx,%eax
  and    $0xfffffffe,%eax
  and    $0x1,%ecx
  je     L450
  mulsd  (%r12,%rax,8),%xmm3
  addsd  0x0(%rbp,%rax,8),%xmm3
  movsd  %xmm3,(%r15,%rax,8)
L450:
  mov    0x18(%rsp),%rdi
  mov    %r11,0x20(%rsp)
  mov    %r8,0x10(%rsp)
  call   <free@plt>
  mov    0x10(%rsp),%rdi
  call   <free@plt>
  mov    0x20(%rsp),%rdi
  call   <free@plt>
  mov    (%rsp),%rdi
  call   <free@plt>
  mov    0x8(%rsp),%rdi
  add    $0x58,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  jmp    10c0 <free@plt>
L357:
  xor    %eax,%eax
  nopl   0x0(%rax)
L435:
  movsd  (%rbx,%rax,8),%xmm2
  movsd  0x0(%r13,%rax,8),%xmm1
  mulsd  %xmm0,%xmm2
  subsd  %xmm2,%xmm1
  movsd  %xmm1,0x0(%r13,%rax,8)
  add    $0x1,%rax
  cmp    %r10,%rax
  jne    L435
  jmp    L261
L386:
  test   %r14d,%r14d
  jg     L388
  jmp    L450
L347:
  lea    D32(%rip),%rdi
  mov    %r11,0x30(%rsp)
  mov    %r8,0x28(%rsp)
  movsd  %xmm3,0x20(%rsp)
  call   <printf@plt>
  mov    $0xffffffff,%edi
  call   <exit@plt>
  movsd  0x20(%rsp),%xmm3
  mov    0x28(%rsp),%r8
  pxor   %xmm4,%xmm4
  mov    0x30(%rsp),%r11
  jmp    L350
L3:
  xor    %eax,%eax
L393:
  movsd  (%r12,%rax,8),%xmm0
  mulsd  %xmm3,%xmm0
  addsd  0x0(%rbp,%rax,8),%xmm0
  movsd  %xmm0,(%r15,%rax,8)
  add    $0x1,%rax
  cmp    %eax,%r14d
  jg     L393
  jmp    L450
L189:
  mov    0x18(%rsp),%rdx
  mov    0x20(%rsp),%rsi
  mov    %r11,%rcx
  mov    %r14d,%edi
  mov    %r8,0x30(%rsp)
  mov    %r11,0x28(%rsp)
  call   <gen_sym_eigen@plt>
  pxor   %xmm3,%xmm3
  comisd 0x10(%rsp),%xmm3
  mov    0x28(%rsp),%r11
  mov    0x30(%rsp),%r8
  movapd %xmm3,%xmm0
  jb     L105
  lea    D32(%rip),%rdi
  mov    %r11,0x28(%rsp)
  mov    %r8,0x20(%rsp)
  call   <printf@plt>
  mov    $0xffffffff,%edi
  call   <exit@plt>
  pxor   %xmm3,%xmm3
  mov    0x20(%rsp),%r8
  mov    0x28(%rsp),%r11
  movapd %xmm3,%xmm0
  jmp    L105
L256:
  movapd %xmm4,%xmm0
  xor    %eax,%eax
  jmp    L452
L259:
  xor    %eax,%eax
  jmp    L74
L128:
  mov    %r11,0x30(%rsp)
  mov    %r8,0x28(%rsp)
  movsd  %xmm3,0x20(%rsp)
  call   <sqrt@plt>
  mov    0x30(%rsp),%r11
  mov    0x28(%rsp),%r8
  movsd  0x20(%rsp),%xmm3
  jmp    L237
```

tool_calls: name: read_data
arguments: data_tag: D4
type: string
name: read_data
arguments: data_tag: D55
type: f64
name: read_data
arguments: data_tag: D38
type: qword
name: read_data
arguments: data_tag: D32
type: string

tool: D4: stepVector_Eigen - error cannot allocate memory


tool: D55: 1

tool: D38: 9223372036854775807

tool: D32: stepVector_Eigen: invalid range of maxStepSize

assistant: ```c
void stepVector_Eigen(int nDim, double C, const double *H, const double *g, const double *J, double maxStepSize, double *gL, double *dR) {
  int i, j;
  double r;
  double *I;
  double *h;
  double *e;
  double *alpha;
  double *beta;
  double gamma;
  I = calloc(nDim * nDim, sizeof(double));
  h = calloc(nDim * nDim, sizeof(double));
  e = calloc(nDim, sizeof(double));
  alpha = calloc(nDim, sizeof(double));
  beta = calloc(nDim, sizeof(double));
  if (I == NULL || h == NULL || e == NULL || alpha == NULL || beta == NULL) {
    printf("stepVector_Eigen - error cannot allocate memory\n");
    exit(-1);
  }
  for (i = 0; i < nDim; i++)
    I[i * nDim + i] = 1.0;
  gen_sym_eigen(nDim, H, I, e, h);
  for (i = 0; i < nDim; i++)
    for (j = 0; j < nDim; j++) {
      alpha[i] += g[j] * h[i * nDim + j];
      beta[i] += J[j] * h[i * nDim + j];
    }
  gamma = 0.0;
  r = 0.0;
  for (i = 0; i < nDim; i++)
    if (fabs(e[i]) > 0.0) {
      gamma += alpha[i] * beta[i] / e[i];
      r += beta[i] * beta[i] / e[i];
    }
  if (r == 0.0)
    gamma = 0.0;
  else
    gamma = (C - gamma) / r;
  for (i = 0; i < nDim; i++)
    dR[i] = 0.0;
  for (i = 0; i < nDim; i++)
    if (fabs(e[i]) > 0.0) {
      r = (alpha[i] + gamma * beta[i]) / e[i];
      for (j = 0; j < nDim; j++)
        dR[j] -= r * h[i * nDim + j];
    }
  if (maxStepSize <= 0.0) {
    printf("stepVector_Eigen: invalid range of maxStepSize");
    exit(-1);
  }
  r = 0;
  for (i = 0; i < nDim; i++)
    r += dR[i] * dR[i];
  r = sqrt(r);
  if (r > maxStepSize)
    for (i = 0; i < nDim; i++)
      dR[i] = dR[i] * maxStepSize / r;
  for (i = 0; i < nDim; i++)
    gL[i] = g[i] + gamma * J[i];
  free(I);
  free(h);
  free(e);
  free(alpha);
  free(beta);
}
```