user: 请从给定的汇编指令推导出C源代码:

```asm
<modelhess>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  movslq %esi,%r13
  push   %r12
  mov    %r13,%r15
  push   %rbp
  mov    %rdi,%rbp
  mov    %r13d,%edi
  push   %rbx
  imul   %r13d,%edi
  mov    %rdx,%rbx
  sub    $0x88,%rsp
  shl    $0x3,%edi
  mov    %rcx,0x60(%rsp)
  mov    %r13,0x40(%rsp)
  call   <malloc@plt>
  mov    %rax,%r14
  test   %r13d,%r13d
  jle    L475
  lea    -0x1(%r13),%r10d
  mov    %rbp,%rdi
  mov    %rbx,%rcx
  mov    %rbp,%rdx
  shl    $0x3,%r10
  lea    0x0(,%r13,8),%r9
  mov    %r13d,%esi
  lea    0x8(%rbx,%r10,1),%r11
  nopw   0x0(%rax,%rax,1)
L204:
  xor    %eax,%eax
  nopw   0x0(%rax,%rax,1)
L54:
  movsd  (%rcx),%xmm1
  mulsd  (%rbx,%rax,8),%xmm1
  movsd  (%rdx,%rax,8),%xmm0
  divsd  %xmm1,%xmm0
  movsd  %xmm0,(%rdx,%rax,8)
  add    $0x1,%rax
  cmp    %rsi,%rax
  jne    L54
  add    $0x8,%rcx
  add    %r9,%rdx
  cmp    %r11,%rcx
  jne    L204
  add    $0x8,%r9
  mov    %r14,%rax
  lea    0x8(%r14,%r10,1),%rdx
L515:
  movsd  (%rdi),%xmm0
  add    $0x8,%rax
  add    %r9,%rdi
  movsd  %xmm0,-0x8(%rax)
  cmp    %rdx,%rax
  jne    L515
  mov    %r15d,%esi
  mov    %r14,%rdi
  call   <array_max@plt>
  mov    %r15d,%esi
  mov    %r14,%rdi
  movsd  %xmm0,0x8(%rsp)
  call   <array_min@plt>
  movsd  0x8(%rsp),%xmm3
  pxor   %xmm4,%xmm4
  movsd  %xmm4,0x10(%rsp)
  comisd %xmm4,%xmm3
  jbe    L357
  movsd  D2(%rip),%xmm7
  movq   %xmm3,%r12
  mulsd  %xmm3,%xmm7
  movq   %xmm7,%r13
L347:
  mov    0x40(%rsp),%rax
  test   %r15d,%r15d
  mov    %r14,%rdi
  movsd  %xmm0,0x18(%rsp)
  movsd  %xmm3,0x8(%rsp)
  lea    0x0(,%rax,8),%rdx
  mov    $0x8,%eax
  cmovle %rax,%rdx
  xor    %esi,%esi
  call   <memset@plt>
  movsd  0x18(%rsp),%xmm0
  movq   %r13,%xmm3
  pxor   %xmm2,%xmm2
  comisd %xmm0,%xmm3
  movsd  0x8(%rsp),%xmm3
  jb     L356
  movq   %r12,%xmm2
  subsd  %xmm0,%xmm2
  addsd  %xmm2,%xmm2
  mulsd  D2(%rip),%xmm2
  subsd  %xmm0,%xmm2
  addsd  %xmm2,%xmm3
L356:
  xor    %edi,%edi
  xor    %esi,%esi
  xor    %ecx,%ecx
  xchg   %ax,%ax
L38:
  xor    %eax,%eax
L403:
  add    $0x1,%eax
  cmp    %eax,%r15d
  jle    L421
L106:
  cmp    %ecx,%eax
  jle    L403
  lea    (%rax,%rdi,1),%edx
  add    $0x1,%eax
  movslq %edx,%rdx
  movsd  0x0(%rbp,%rdx,8),%xmm0
  movslq %esi,%rdx
  add    $0x1,%esi
  movsd  %xmm0,(%r14,%rdx,8)
  cmp    %eax,%r15d
  jg     L106
L421:
  add    $0x1,%ecx
  add    %r15d,%edi
  cmp    %ecx,%r15d
  jg     L38
L170:
  mov    %r14,%rdi
  movsd  %xmm2,0x18(%rsp)
  movsd  %xmm3,0x8(%rsp)
  call   <array_max_abs@plt>
  movsd  D63(%rip),%xmm1
  movsd  0x8(%rsp),%xmm3
  movsd  0x18(%rsp),%xmm2
  mulsd  %xmm0,%xmm1
  comisd %xmm3,%xmm1
  jbe    L366
  movapd %xmm0,%xmm4
  subsd  %xmm3,%xmm4
  movsd  D29(%rip),%xmm3
  mulsd  %xmm0,%xmm3
  addsd  %xmm4,%xmm3
  addsd  %xmm3,%xmm2
  movapd %xmm1,%xmm3
L366:
  ucomisd 0x10(%rsp),%xmm3
  jp     L282
  jne    L282
  movsd  D49(%rip),%xmm2
  movapd %xmm2,%xmm3
L500:
  test   %r15d,%r15d
  jle    L458
  mov    0x40(%rsp),%rax
  xor    %edx,%edx
  lea    0x8(,%rax,8),%rcx
  mov    %rbp,%rax
L161:
  movsd  (%rax),%xmm1
  add    $0x1,%edx
  addsd  %xmm2,%xmm1
  movsd  %xmm1,(%rax)
  add    %rcx,%rax
  cmp    %edx,%r15d
  jne    L161
L458:
  pxor   %xmm1,%xmm1
  cvtsi2sd %r15d,%xmm1
  divsd  %xmm1,%xmm0
  comisd %xmm0,%xmm3
  jbe    L427
L222:
  movsd  0x10(%rsp),%xmm4
  ucomisd %xmm3,%xmm4
  ja     L35
  sqrtsd %xmm3,%xmm3
  movapd %xmm3,%xmm0
L341:
  mov    0x60(%rsp),%rdx
  mov    %r15d,%esi
  mov    %rbp,%rdi
  call   <cholmod@plt>
  movsd  0x10(%rsp),%xmm3
  movsd  %xmm0,0x68(%rsp)
  comisd %xmm3,%xmm0
  jbe    L378
  movsd  0x0(%rbp),%xmm2
  movsd  %xmm2,0x18(%rsp)
  test   %r15d,%r15d
  jle    L1
  mov    0x40(%rsp),%rax
  lea    0x8(%rbp),%r13
  mov    %r15d,0x58(%rsp)
  xor    %esi,%esi
  mov    %r13,%r12
  mov    %rbx,0x78(%rsp)
  add    $0x1,%rax
  mov    %r14,0x70(%rsp)
  mov    %rsi,%r14
  mov    %rax,0x30(%rsp)
  shl    $0x3,%rax
  mov    %rax,0x50(%rsp)
  sub    $0x8,%rax
  lea    0x0(%rbp,%rax,1),%rdi
  mov    %rax,0x48(%rsp)
  add    %rax,%r12
  lea    -0x1(%r15),%eax
  mov    %eax,0x5c(%rsp)
  mov    %rdi,0x28(%rsp)
  xor    %edi,%edi
  mov    %rbp,0x38(%rsp)
  mov    %edi,%ebp
  movsd  %xmm2,0x20(%rsp)
  movsd  %xmm3,0x8(%rsp)
  nopl   (%rax)
L413:
  add    $0x1,%ebp
  cmp    %ebp,0x58(%rsp)
  jle    L310
  mov    0x5c(%rsp),%eax
  mov    0x38(%rsp),%rdi
  mov    %r13,%r15
  sub    %ebp,%eax
  add    %r14,%rax
  lea    0x10(%rdi,%rax,8),%rbx
  nopw   0x0(%rax,%rax,1)
L83:
  movsd  (%r15),%xmm0
  add    $0x8,%r15
  call   <fabs@plt>
  pxor   %xmm0,%xmm0
  cvtsi2sd %rax,%xmm0
  addsd  0x8(%rsp),%xmm0
  movsd  %xmm0,0x8(%rsp)
  cmp    %r15,%rbx
  jne    L83
L310:
  movsd  0x8(%rsp),%xmm7
  movsd  -0x8(%r13),%xmm0
  movapd %xmm7,%xmm1
  addsd  %xmm0,%xmm1
  subsd  %xmm7,%xmm0
  maxsd  0x18(%rsp),%xmm1
  minsd  0x20(%rsp),%xmm0
  movsd  %xmm1,0x18(%rsp)
  movsd  %xmm0,0x20(%rsp)
  cmp    %ebp,0x58(%rsp)
  je     L103
  movsd  0x10(%rsp),%xmm2
  mov    0x28(%rsp),%rbx
  movsd  %xmm2,0x8(%rsp)
  nopl   0x0(%rax,%rax,1)
L518:
  movsd  (%rbx),%xmm0
  add    $0x8,%rbx
  call   <fabs@plt>
  pxor   %xmm0,%xmm0
  cvtsi2sd %rax,%xmm0
  addsd  0x8(%rsp),%xmm0
  movsd  %xmm0,0x8(%rsp)
  cmp    %rbx,%r12
  jne    L518
  mov    0x50(%rsp),%rdi
  mov    0x48(%rsp),%rsi
  add    0x30(%rsp),%r14
  add    %rsi,0x28(%rsp)
  add    %rdi,%r13
  add    %rdi,%r12
  jmp    L413
L282:
  comisd 0x10(%rsp),%xmm2
  ja     L500
  pxor   %xmm1,%xmm1
  cvtsi2sd %r15d,%xmm1
  divsd  %xmm1,%xmm0
  comisd %xmm0,%xmm3
  ja     L222
L427:
  movsd  0x10(%rsp),%xmm2
  ucomisd %xmm0,%xmm2
  ja     L374
  sqrtsd %xmm0,%xmm0
  jmp    L341
L103:
  movsd  0x20(%rsp),%xmm3
  movsd  0x18(%rsp),%xmm0
  movsd  0x10(%rsp),%xmm4
  mov    0x70(%rsp),%r14
  subsd  %xmm3,%xmm0
  mov    0x38(%rsp),%rbp
  mov    0x58(%rsp),%r15d
  mulsd  D2(%rip),%xmm0
  mov    0x78(%rsp),%rbx
  subsd  %xmm3,%xmm0
  comisd %xmm0,%xmm4
  ja     L46
  movsd  0x68(%rsp),%xmm7
  comisd %xmm0,%xmm7
  ja     L55
L360:
  test   %r15d,%r15d
  jle    L350
  mov    0x40(%rsp),%rax
  add    $0x1,%rax
  mov    %rax,0x30(%rsp)
L482:
  mov    0x30(%rsp),%rcx
  movsd  0x68(%rsp),%xmm1
  mov    %rbp,%rax
  xor    %edx,%edx
  shl    $0x3,%rcx
  nopl   (%rax)
L297:
  movsd  (%rax),%xmm0
  add    $0x1,%edx
  addsd  %xmm1,%xmm0
  movsd  %xmm0,(%rax)
  add    %rcx,%rax
  cmp    %edx,%r15d
  jne    L297
  mov    0x60(%rsp),%rdx
  pxor   %xmm0,%xmm0
  mov    %r15d,%esi
  mov    %rbp,%rdi
  call   <cholmod@plt>
L245:
  mov    0x40(%rsp),%rax
  mov    %rbx,%rdx
  mov    %rbx,%rcx
  xor    %esi,%esi
  lea    0x0(,%rax,8),%rdi
  nopl   0x0(%rax,%rax,1)
L167:
  xor    %eax,%eax
  nopw   0x0(%rax,%rax,1)
L516:
  movsd  (%rcx),%xmm1
  mulsd  (%rbx,%rax,8),%xmm1
  mulsd  0x0(%rbp,%rax,8),%xmm1
  movsd  %xmm1,0x0(%rbp,%rax,8)
  add    $0x1,%rax
  cmp    %eax,%r15d
  jg     L516
  add    $0x1,%esi
  add    %rdi,%rbp
  add    $0x8,%rcx
  cmp    %esi,%r15d
  jg     L167
  mov    0x60(%rsp),%r10
  mov    0x40(%rsp),%r8
  xor    %edi,%edi
  xor    %esi,%esi
  lea    0x8(%r10),%r9
  nopw   0x0(%rax,%rax,1)
L130:
  test   %esi,%esi
  je     L53
  lea    -0x1(%rsi),%ecx
  lea    (%r10,%rdi,8),%rax
  add    %rdi,%rcx
  lea    (%r9,%rcx,8),%rcx
  nopw   0x0(%rax,%rax,1)
L300:
  movsd  (%rax),%xmm1
  mulsd  (%rdx),%xmm1
  add    $0x8,%rax
  movsd  %xmm1,-0x8(%rax)
  cmp    %rcx,%rax
  jne    L300
L53:
  add    $0x1,%esi
  add    $0x8,%rdx
  add    %r8,%rdi
  cmp    %esi,%r15d
  jg     L130
L234:
  mov    %r14,%rdi
  movsd  %xmm0,0x8(%rsp)
  call   <free@plt>
  movsd  0x8(%rsp),%xmm0
  add    $0x88,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
L378:
  mov    0x60(%rsp),%rdx
  pxor   %xmm0,%xmm0
  mov    %r15d,%esi
  mov    %rbp,%rdi
  call   <cholmod@plt>
  test   %r15d,%r15d
  jg     L245
  jmp    L234
L357:
  movsd  0x10(%rsp),%xmm7
  movq   %xmm7,%r13
  movq   %xmm7,%r12
  jmp    L347
L46:
  movsd  0x10(%rsp),%xmm3
  movsd  %xmm3,0x68(%rsp)
  jmp    L482
L475:
  mov    %rax,%rdi
  mov    %r13d,%esi
  call   <array_max@plt>
  mov    %r13d,%esi
  mov    %r14,%rdi
  movsd  %xmm0,0x8(%rsp)
  call   <array_min@plt>
  movsd  0x8(%rsp),%xmm3
  pxor   %xmm4,%xmm4
  movapd %xmm4,%xmm1
  movsd  %xmm4,0x10(%rsp)
  movapd %xmm4,%xmm2
  comisd %xmm4,%xmm3
  jbe    L301
  movsd  D2(%rip),%xmm2
  movapd %xmm3,%xmm1
  mulsd  %xmm3,%xmm2
L301:
  comisd %xmm0,%xmm2
  jae    L142
  pxor   %xmm2,%xmm2
  xor    %esi,%esi
  jmp    L170
L1:
  movsd  0x18(%rsp),%xmm2
  movsd  0x10(%rsp),%xmm7
  movapd %xmm2,%xmm0
  subsd  %xmm2,%xmm0
  mulsd  D2(%rip),%xmm0
  subsd  %xmm2,%xmm0
  comisd %xmm0,%xmm7
  jbe    L397
L350:
  mov    0x60(%rsp),%rdx
  mov    %r15d,%esi
  mov    %rbp,%rdi
  pxor   %xmm0,%xmm0
  call   <cholmod@plt>
  jmp    L234
L142:
  subsd  %xmm0,%xmm1
  movsd  D2(%rip),%xmm2
  xor    %esi,%esi
  addsd  %xmm1,%xmm1
  mulsd  %xmm1,%xmm2
  subsd  %xmm0,%xmm2
  addsd  %xmm2,%xmm3
  jmp    L170
L397:
  movsd  0x68(%rsp),%xmm7
  comisd %xmm0,%xmm7
  jbe    L360
  jmp    L350
L55:
  movsd  %xmm0,0x68(%rsp)
  jmp    L482
L35:
  movapd %xmm3,%xmm0
  call   <sqrt@plt>
  jmp    L341
L374:
  call   <sqrt@plt>
  jmp    L341
```

tool_calls: name: read_data
arguments: data_tag: D2
type: byte[8]
name: read_data
arguments: data_tag: D63
type: byte[8]
name: read_data
arguments: data_tag: D29
type: byte[8]
name: read_data
arguments: data_tag: D49
type: f32[2]

tool: {"D2": [0x40,0xeb,0xd6,0x89,0x33,0xfa,0x60,0x3e]}

tool: {"D63": [0x8a,0x33,0xfa,0x10,0x00,0x00,0xf0,0x3f]}

tool: {"D29": [0x40,0xeb,0xd6,0x89,0x33,0xfa,0x70,0x3e]}

tool: {"D49": [0.0,1.875]}

assistant: ```c
double modelhess(double *A, int N, double *dx, double *L) {
  double *U22;
  double sqrteps, maxdiag, mindiag, maxposdiag, u;
  double maxoffdiag, maxinp, maxadd;
  double maxev, minev, offrow, sdd;
  int step, i, j, k;
  sqrteps = sqrt((double)1e-15);
  U22 = (double *)malloc(sizeof(double) * N * N);
  for (i = 0; i < N; ++i) {
    step = i * N;
    for (j = 0; j < N; ++j) {
      A[step + j] /= (dx[i] * dx[j]);
    }
  }
  for (i = 0; i < N; ++i) {
    U22[i] = A[i + i * N];
  }
  maxdiag = array_max(U22, N);
  mindiag = array_min(U22, N);
  maxposdiag = 0.0;
  if (maxdiag > maxposdiag) {
    maxposdiag = maxdiag;
  }
  for (i = 0; i < N; ++i) {
    U22[i] = 0.0;
  }
  u = 0.0;
  if (mindiag <= sqrteps * maxposdiag) {
    u = 2 * (maxposdiag - mindiag) * sqrteps - mindiag;
    maxdiag += u;
  }
  k = 0;
  for (i = 0; i < N; ++i) {
    for (j = 0; j < N; ++j) {
      if (j > i) {
        U22[k] = A[i * N + j];
        k++;
      }
    }
  }
  maxoffdiag = array_max_abs(U22, k);
  if (maxoffdiag * (1 + 2 * sqrteps) > maxdiag) {
    u += (maxoffdiag - maxdiag) + 2 * sqrteps * maxoffdiag;
    maxdiag = maxoffdiag * (1 + 2 * sqrteps);
  }
  if (maxdiag == 0) {
    u = 1;
    maxdiag = 1;
  }
  if (u > 0) {
    for (i = 0; i < N; ++i) {
      A[i * N + i] += u;
    }
  }
  if (maxdiag > maxoffdiag / N) {
    maxinp = sqrt(maxdiag);
  } else {
    maxinp = sqrt(maxoffdiag / N);
  }
  maxadd = cholmod(A, N, L, maxinp);
  if (maxadd > 0) {
    maxev = minev = A[0];
    for (i = 0; i < N; ++i) {
      offrow = 0.0;
      step = i * N;
      for (j = 0; j < i; ++j) {
        offrow += fabs(A[step + j]);
      }
      for (j = i + 1; j < N; ++j) {
        offrow += fabs(A[step + j]);
      }
      if (maxev < A[step + i] + offrow) {
        maxev = A[step + i] + offrow;
      }
      if (minev > A[step + i] - offrow) {
        minev = A[step + i] - offrow;
      }
    }
    sdd = (maxev - minev) * sqrteps - minev;
    if (sdd < 0) {
      sdd = 0;
    }
    if (maxadd > sdd) {
      u = sdd;
    } else {
      u = maxadd;
    }
    for (i = 0; i < N; ++i) {
      A[i * N + i] += u;
    }
  }
  maxadd = cholmod(A, N, L, 0.0);
  for (i = 0; i < N; ++i) {
    step = i * N;
    for (j = 0; j < N; ++j) {
      A[step + j] *= (dx[i] * dx[j]);
    }
  }
  for (i = 0; i < N; ++i) {
    step = i * N;
    for (j = 0; j < i; ++j) {
      L[step + j] *= dx[i];
    }
  }
  free(U22);
  return maxadd;
}
```