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

```asm
<my_lnsrch>:
  endbr64
  push   %r15
  movapd %xmm0,%xmm5
  mov    %r8,%r15
  push   %r14
  mov    %edi,%r14d
  push   %r13
  mov    %r9,%r13
  push   %r12
  push   %rbp
  mov    %rsi,%rbp
  push   %rbx
  mov    %rcx,%rbx
  sub    $0x88,%rsp
  mov    0xc0(%rsp),%rax
  movl   $0x0,(%rax)
  test   %edi,%edi
  jle    L182
  mov    %rdx,%r12
  cmp    $0x1,%edi
  je     L415
  mov    %edi,%edx
  pxor   %xmm7,%xmm7
  lea    0x8(%rcx),%rax
  shr    %edx
  movsd  %xmm7,0x58(%rsp)
  movapd %xmm7,%xmm0
  sub    $0x1,%edx
  shl    $0x4,%rdx
  lea    0x18(%rcx,%rdx,1),%rdx
  nopl   0x0(%rax)
L162:
  movupd (%rax),%xmm6
  add    $0x10,%rax
  mulpd  %xmm6,%xmm6
  addsd  %xmm6,%xmm0
  unpckhpd %xmm6,%xmm6
  addsd  %xmm6,%xmm0
  cmp    %rdx,%rax
  jne    L162
  mov    %r14d,%eax
  or     $0x1,%eax
  test   $0x1,%r14b
  je     L104
L279:
  cltq
  movsd  (%rbx,%rax,8),%xmm6
  mulsd  %xmm6,%xmm6
  addsd  %xmm6,%xmm0
L104:
  movsd  0x58(%rsp),%xmm7
  ucomisd %xmm0,%xmm7
  ja     L359
  sqrtsd %xmm0,%xmm0
  comisd %xmm2,%xmm0
  ja     L255
  cs nopw 0x0(%rax,%rax,1)
L373:
  test   %r14d,%r14d
  mov    $0x1,%ecx
  cmovg  %r14d,%ecx
  cmp    $0x1,%r14d
  jle    L218
L401:
  mov    %ecx,%eax
  pxor   %xmm2,%xmm2
  shr    %eax
  lea    -0x1(%rax),%edx
  mov    $0x8,%eax
  shl    $0x4,%rdx
  add    $0x18,%rdx
  xchg   %ax,%ax
L42:
  movupd (%r12,%rax,1),%xmm0
  movupd (%rbx,%rax,1),%xmm7
  add    $0x10,%rax
  mulpd  %xmm7,%xmm0
  addsd  %xmm0,%xmm2
  unpckhpd %xmm0,%xmm0
  addsd  %xmm0,%xmm2
  cmp    %rdx,%rax
  jne    L42
  mov    %ecx,%eax
  or     $0x1,%eax
  and    $0x1,%ecx
  je     L349
L392:
  cltq
  movsd  (%r12,%rax,8),%xmm0
  mulsd  (%rbx,%rax,8),%xmm0
  addsd  %xmm0,%xmm2
L349:
  movsd  0x58(%rsp),%xmm9
  mov    $0x1,%eax
  movq   D1(%rip),%xmm8
  movapd %xmm9,%xmm7
  nopl   0x0(%rax)
L489:
  movsd  0x0(%rbp,%rax,8),%xmm6
  movsd  (%rbx,%rax,8),%xmm0
  ucomisd %xmm9,%xmm6
  jp     L142
  je     L317
L142:
  divsd  %xmm6,%xmm0
L317:
  andpd  %xmm8,%xmm0
  add    $0x1,%rax
  maxsd  %xmm7,%xmm0
  movapd %xmm0,%xmm7
  cmp    %eax,%r14d
  jge    L489
L44:
  lea    0x8(%rbp),%rax
  lea    0x8(%r15),%r12
  mov    %r14d,0x34(%rsp)
  mov    %rax,0x48(%rsp)
  lea    0x10(%rbp),%rax
  lea    -0x1(%r14),%edi
  cmp    %rax,%r12
  lea    0x10(%rbx),%rax
  mov    %edi,0x78(%rsp)
  setne  0x77(%rsp)
  cmp    %rax,%r12
  movzbl 0x77(%rsp),%ecx
  setne  %al
  mov    %rbx,0x68(%rsp)
  and    %ecx,%eax
  cmp    $0x1,%edi
  mov    %r15,0x60(%rsp)
  mov    %eax,%edx
  seta   %al
  and    %eax,%edx
  mov    %r14d,%eax
  shr    %eax
  mov    %dl,0x76(%rsp)
  lea    -0x1(%rax),%ecx
  mov    %r14d,%eax
  and    $0xfffffffe,%eax
  shl    $0x4,%rcx
  mov    %eax,0x70(%rsp)
  mov    %r14d,%eax
  add    $0x18,%rcx
  or     $0x1,%eax
  movslq %eax,%rdx
  mov    %eax,0x7c(%rsp)
  mov    D62(%rip),%rax
  divsd  %xmm7,%xmm1
  shl    $0x3,%rdx
  lea    (%rbx,%rdx,1),%r9
  lea    0x0(%rbp,%rdx,1),%r11
  add    %r15,%rdx
  mov    %rcx,%r15
  mov    %r9,%r14
  mov    %r11,%rbx
  movsd  %xmm1,0x50(%rsp)
  movq   %rax,%xmm1
  nopl   0x0(%rax,%rax,1)
L502:
  mov    0x34(%rsp),%eax
  test   %eax,%eax
  jle    L397
  cmpb   $0x0,0x76(%rsp)
  je     L315
  movapd %xmm1,%xmm0
  mov    0x68(%rsp),%r8
  mov    0x60(%rsp),%r10
  mov    $0x8,%eax
  unpcklpd %xmm0,%xmm0
  nopw   0x0(%rax,%rax,1)
L179:
  movupd (%r8,%rax,1),%xmm6
  movupd 0x0(%rbp,%rax,1),%xmm7
  mulpd  %xmm0,%xmm6
  addpd  %xmm7,%xmm6
  movups %xmm6,(%r10,%rax,1)
  add    $0x10,%rax
  cmp    %r15,%rax
  jne    L179
  mov    0x70(%rsp),%ecx
  cmp    %ecx,0x34(%rsp)
  je     L397
  movsd  (%r14),%xmm6
  mulsd  %xmm1,%xmm6
  addsd  (%rbx),%xmm6
  movsd  %xmm6,(%rdx)
L397:
  mov    0x48(%rsp),%rsi
  mov    %r12,%rdi
  mov    %rdx,(%rsp)
  movsd  %xmm5,0x28(%rsp)
  movsd  %xmm2,0x20(%rsp)
  movsd  %xmm4,0x18(%rsp)
  movsd  %xmm3,0x10(%rsp)
  movsd  %xmm1,0x8(%rsp)
  call   <validate_x@plt>
  mov    %r12,%rdi
  call   *0xc8(%rsp)
  movsd  %xmm0,0x0(%r13)
  call   <finite@plt>
  mov    (%rsp),%rdx
  movsd  0x8(%rsp),%xmm1
  test   %rax,%rax
  movsd  0x10(%rsp),%xmm3
  movsd  0x18(%rsp),%xmm4
  movsd  0x20(%rsp),%xmm2
  movsd  0x28(%rsp),%xmm5
  je     L283
  movsd  0x50(%rsp),%xmm7
  comisd %xmm1,%xmm7
  ja     L225
  movsd  D43(%rip),%xmm6
  movsd  0x0(%r13),%xmm7
  mulsd  %xmm1,%xmm6
  mulsd  %xmm2,%xmm6
  addsd  %xmm5,%xmm6
  comisd %xmm7,%xmm6
  jae    L93
  ucomisd D62(%rip),%xmm1
  jp     L239
  jne    L239
  movapd %xmm7,%xmm0
  movapd %xmm2,%xmm4
  xorpd  D89(%rip),%xmm4
  subsd  %xmm5,%xmm0
  subsd  %xmm2,%xmm0
  addsd  %xmm0,%xmm0
  divsd  %xmm0,%xmm4
L365:
  movsd  D53(%rip),%xmm0
  movapd %xmm1,%xmm3
  movsd  %xmm5,0x40(%rsp)
  movsd  %xmm7,0x38(%rsp)
  mulsd  %xmm1,%xmm0
  movapd %xmm4,%xmm1
  maxsd  %xmm0,%xmm1
  jmp    L502
  nopl   (%rax)
L239:
  movapd %xmm1,%xmm0
  movapd %xmm7,%xmm11
  movapd %xmm3,%xmm6
  mulsd  %xmm2,%xmm0
  subsd  %xmm5,%xmm11
  movapd %xmm3,%xmm9
  mulsd  %xmm2,%xmm6
  movapd %xmm1,%xmm10
  movapd %xmm1,%xmm8
  mulsd  %xmm3,%xmm9
  subsd  %xmm3,%xmm8
  xorpd  D89(%rip),%xmm3
  mulsd  %xmm1,%xmm10
  subsd  %xmm0,%xmm11
  movsd  0x38(%rsp),%xmm0
  subsd  0x40(%rsp),%xmm0
  subsd  %xmm6,%xmm0
  mulsd  %xmm11,%xmm3
  movapd %xmm11,%xmm6
  divsd  %xmm10,%xmm6
  movapd %xmm0,%xmm12
  mulsd  %xmm1,%xmm0
  divsd  %xmm9,%xmm12
  divsd  %xmm10,%xmm3
  subsd  %xmm12,%xmm6
  divsd  %xmm9,%xmm0
  divsd  %xmm8,%xmm6
  addsd  %xmm0,%xmm3
  divsd  %xmm8,%xmm3
  ucomisd 0x58(%rsp),%xmm6
  jp     L119
  jne    L119
  addsd  %xmm3,%xmm3
  movapd %xmm2,%xmm4
  xorpd  D89(%rip),%xmm4
  divsd  %xmm3,%xmm4
L113:
  movsd  D78(%rip),%xmm0
  mulsd  %xmm1,%xmm0
  minsd  %xmm4,%xmm0
  movapd %xmm0,%xmm4
  jmp    L365
  cs nopw 0x0(%rax,%rax,1)
L119:
  mulsd  D57(%rip),%xmm6
  movapd %xmm3,%xmm0
  movsd  0x58(%rsp),%xmm13
  mulsd  %xmm3,%xmm0
  movapd %xmm6,%xmm8
  mulsd  %xmm2,%xmm8
  subsd  %xmm8,%xmm0
  comisd %xmm0,%xmm13
  ja     L113
  ucomisd %xmm0,%xmm13
  ja     L244
  sqrtsd %xmm0,%xmm0
L493:
  subsd  %xmm3,%xmm0
  movapd %xmm0,%xmm4
  divsd  %xmm6,%xmm4
  jmp    L113
  nopw   0x0(%rax,%rax,1)
L315:
  mov    0x78(%rsp),%esi
  mov    0x68(%rsp),%r8
  mov    $0x1,%eax
  mov    0x60(%rsp),%r10
  add    $0x2,%rsi
  nopw   0x0(%rax,%rax,1)
L21:
  movsd  (%r8,%rax,8),%xmm0
  mulsd  %xmm1,%xmm0
  addsd  0x0(%rbp,%rax,8),%xmm0
  movsd  %xmm0,(%r10,%rax,8)
  add    $0x1,%rax
  cmp    %rax,%rsi
  jne    L21
  jmp    L397
L283:
  mov    0xc0(%rsp),%rax
  movl   $0x2,(%rax)
L93:
  add    $0x88,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
L255:
  test   %r14d,%r14d
  jle    L367
L512:
  divsd  %xmm0,%xmm2
  cmp    $0x1,%r14d
  je     L289
  mov    %r14d,%edx
  movapd %xmm2,%xmm6
  lea    0x8(%rbx),%rax
  shr    %edx
  unpcklpd %xmm6,%xmm6
  sub    $0x1,%edx
  shl    $0x4,%rdx
  lea    0x18(%rbx,%rdx,1),%rdx
  nopl   0x0(%rax,%rax,1)
L233:
  movupd (%rax),%xmm0
  add    $0x10,%rax
  mulpd  %xmm6,%xmm0
  movups %xmm0,-0x10(%rax)
  cmp    %rax,%rdx
  jne    L233
  mov    %r14d,%eax
  or     $0x1,%eax
  test   $0x1,%r14b
  je     L145
L408:
  cltq
  lea    (%rbx,%rax,8),%rax
  mulsd  (%rax),%xmm2
  movsd  %xmm2,(%rax)
  jmp    L373
L225:
  mov    0x34(%rsp),%r14d
  mov    %r15,%rcx
  mov    0x60(%rsp),%r15
  test   %r14d,%r14d
  jle    L266
  cmpl   $0x2,0x78(%rsp)
  jbe    L223
  cmpb   $0x0,0x77(%rsp)
  je     L223
  mov    $0x8,%eax
  nopl   (%rax)
L519:
  movupd 0x0(%rbp,%rax,1),%xmm5
  movups %xmm5,(%r15,%rax,1)
  add    $0x10,%rax
  cmp    %rax,%rcx
  jne    L519
  cmp    0x70(%rsp),%r14d
  je     L266
  movslq 0x7c(%rsp),%rax
  movsd  0x0(%rbp,%rax,8),%xmm0
  movsd  %xmm0,(%r15,%rax,8)
L266:
  mov    0xc0(%rsp),%rax
  movl   $0x1,(%rax)
  jmp    L93
L145:
  test   %r14d,%r14d
  mov    $0x1,%ecx
  cmovg  %r14d,%ecx
  jmp    L401
L182:
  pxor   %xmm2,%xmm2
  movapd %xmm2,%xmm7
  movsd  %xmm2,0x58(%rsp)
  jmp    L44
L218:
  pxor   %xmm2,%xmm2
  mov    $0x1,%eax
  jmp    L392
L415:
  pxor   %xmm7,%xmm7
  mov    $0x1,%eax
  movsd  %xmm7,0x58(%rsp)
  movapd %xmm7,%xmm0
  jmp    L279
L223:
  mov    0x78(%rsp),%eax
  mov    $0x1,%edx
  add    $0x2,%rax
L161:
  movsd  0x0(%rbp,%rdx,8),%xmm0
  movsd  %xmm0,(%r15,%rdx,8)
  add    $0x1,%rdx
  cmp    %rax,%rdx
  jne    L161
  jmp    L266
L289:
  mov    $0x1,%eax
  jmp    L408
L244:
  mov    %rdx,0x18(%rsp)
  movsd  %xmm5,0x38(%rsp)
  movsd  %xmm2,0x28(%rsp)
  movsd  %xmm1,0x20(%rsp)
  movsd  %xmm3,0x10(%rsp)
  movsd  %xmm6,0x8(%rsp)
  movsd  %xmm7,(%rsp)
  call   <sqrt@plt>
  movsd  0x38(%rsp),%xmm5
  movsd  0x28(%rsp),%xmm2
  movsd  0x20(%rsp),%xmm1
  mov    0x18(%rsp),%rdx
  movsd  0x10(%rsp),%xmm3
  movsd  0x8(%rsp),%xmm6
  movsd  (%rsp),%xmm7
  jmp    L493
L359:
  movsd  %xmm2,0x20(%rsp)
  movsd  %xmm1,0x18(%rsp)
  movsd  %xmm5,0x10(%rsp)
  movsd  %xmm4,0x8(%rsp)
  movsd  %xmm3,(%rsp)
  call   <sqrt@plt>
  movsd  0x20(%rsp),%xmm2
  movsd  (%rsp),%xmm3
  movsd  0x8(%rsp),%xmm4
  movsd  0x10(%rsp),%xmm5
  comisd %xmm2,%xmm0
  movsd  0x18(%rsp),%xmm1
  ja     L512
  jmp    L373
L367:
  movsd  0x58(%rsp),%xmm7
  movapd %xmm7,%xmm2
  jmp    L44
```

tool_calls: name: extract_symbolic_data
arguments: data_label: D1
type_infered: qword
name: extract_symbolic_data
arguments: data_label: D62
type_infered: f64
name: extract_symbolic_data
arguments: data_label: D43
type_infered: byte[8]
name: extract_symbolic_data
arguments: data_label: D89
type_infered: f32[4]
name: extract_symbolic_data
arguments: data_label: D53
type_infered: f64
name: extract_symbolic_data
arguments: data_label: D78
type_infered: f64
name: extract_symbolic_data
arguments: data_label: D57
type_infered: f64

tool: D1: 9223372036854775807

tool: D62: 1

tool: {"D43": [0x2d,0x43,0x1c,0xeb,0xe2,0x36,0x1a,0x3f]}

tool: {"D89": [0.0,-0.0,0.0,0.0]}

tool: D53: 0.1

tool: D78: 0.5

tool: D57: 3

assistant: ```c
void my_lnsrch(int n, double xold[], double fold, double g[], double p[], double x[], double *f, double TOLX, double stpmax, int *check, double (*func)(double[])) {
  int i;
  double a, alam, alam2, alamin, b, disc, f2, fold2, rhs1, rhs2, slope, sum, temp, test, tmplam;
  int icount = 0;
  int bad_step;
  double bad_step_factor = 2.0;
  const int ltrace = 0;
  *check = 0;
  for (sum = 0.0, i = 1; i <= n; i++)
    sum += p[i] * p[i];
  sum = sqrt(sum);
  if (sum > stpmax)
    for (i = 1; i <= n; i++)
      p[i] *= stpmax / sum;
  for (slope = 0.0, i = 1; i <= n; i++)
    slope += g[i] * p[i];
  test = 0.0;
  for (i = 1; i <= n; i++) {
    temp = (xold[i] == 0.) ? fabs(p[i]) : fabs(p[i] / xold[i]);
    if (temp > test)
      test = temp;
  }
  alamin = TOLX / test;
  alam = 1.0;
  for (;;) {
    for (i = 1; i <= n; i++)
      x[i] = xold[i] + alam * p[i];
    validate_x((x + 1), (xold + 1));
    *f = (*func)(x + 1);
    bad_step = 0;
    if (finite(*f) == 0) {
      bad_step = 1;
    }
    if (bad_step) {
      *check = 2;
      return;
    }
    if (alam < alamin) {
      for (i = 1; i <= n; i++)
        x[i] = xold[i];
      *check = 1;
      return;
    } else if (*f <= fold + 1.0e-4 * alam * slope) {
      return;
    } else {
      if (alam == 1.0) {
        tmplam = -slope / (2.0 * (*f - fold - slope));
      } else {
        rhs1 = *f - fold - alam * slope;
        rhs2 = f2 - fold2 - alam2 * slope;
        a = (rhs1 / (alam * alam) - rhs2 / (alam2 * alam2)) / (alam - alam2);
        b = (-alam2 * rhs1 / (alam * alam) + alam * rhs2 / (alam2 * alam2)) / (alam - alam2);
        if (a == 0.0)
          tmplam = -slope / (2.0 * b);
        else {
          disc = b * b - 3.0 * a * slope;
          if (disc < 0.0) {
            disc = 0.;
          } else
            tmplam = (-b + sqrt(disc)) / (3.0 * a);
        }
        if (tmplam > 0.5 * alam)
          tmplam = 0.5 * alam;
      }
    }
    alam2 = alam;
    f2 = *f;
    fold2 = fold;
    alam = (((tmplam) > (0.1 * alam)) ? (tmplam) : (0.1 * alam));
    icount++;
  }
}
```