user: 请将以下的汇编代码转换成C语言代码:

```asm
<c_chapman>:
  endbr64
  push   %r15
  movapd %xmm0,%xmm5
  push   %r14
  mov    %r8,%r14
  push   %r13
  push   %r12
  push   %rbp
  mov    %rcx,%rbp
  push   %rbx
  movslq %edi,%rbx
  lea    0x0(,%rbx,8),%r15
  mov    %rbx,%r12
  sub    $0x78,%rsp
  movsd  -0x8(%rcx,%r15,1),%xmm4
  movsd  (%rcx,%rbx,8),%xmm0
  movsd  %xmm2,0x20(%rsp)
  movapd %xmm4,%xmm6
  movapd %xmm0,%xmm8
  movsd  %xmm1,0x8(%rsp)
  subsd  %xmm0,%xmm6
  addsd  %xmm2,%xmm8
  movapd %xmm1,%xmm0
  mov    %edx,0x28(%rsp)
  mulsd  D67(%rip),%xmm0
  movsd  %xmm4,0x30(%rsp)
  mulsd  %xmm6,%xmm5
  movsd  %xmm6,0x38(%rsp)
  movsd  %xmm8,0x18(%rsp)
  addsd  %xmm8,%xmm5
  movsd  %xmm5,0x10(%rsp)
  call   <sin@plt>
  movsd  0x8(%rsp),%xmm1
  movsd  D63(%rip),%xmm13
  movsd  0x10(%rsp),%xmm5
  movapd %xmm0,%xmm6
  movsd  0x18(%rsp),%xmm8
  comisd %xmm13,%xmm1
  movsd  0x20(%rsp),%xmm2
  mulsd  %xmm5,%xmm6
  jbe    L20
  comisd %xmm6,%xmm2
  movsd  D16(%rip),%xmm3
  ja     L243
  mov    0x28(%rsp),%edx
  cmp    %edx,%ebx
  jg     L20
  movsd  0x30(%rsp),%xmm4
  mov    %ebx,%r13d
  jmp    L5
  nopl   0x0(%rax)
L167:
  movsd  -0x8(%rbp,%rbx,8),%xmm4
L5:
  addsd  %xmm2,%xmm4
  comisd %xmm6,%xmm4
  jbe    L213
  movsd  0x0(%rbp,%rbx,8),%xmm0
  addsd  %xmm2,%xmm0
  ucomisd %xmm0,%xmm6
  cmovae %ebx,%r13d
L213:
  add    $0x1,%rbx
  cmp    %ebx,%edx
  jge    L167
  test   %r13d,%r13d
  jle    L6
L91:
  cmpltsd %xmm1,%xmm13
  pxor   %xmm12,%xmm12
  movapd %xmm6,%xmm7
  movsd  D21(%rip),%xmm9
  mulsd  %xmm6,%xmm7
  mov    $0x1,%ebx
  movapd %xmm12,%xmm3
  movsd  D31(%rip),%xmm0
  andpd  %xmm13,%xmm0
  andnpd %xmm9,%xmm13
  orpd   %xmm0,%xmm13
  jmp    L234
  nopl   (%rax)
L268:
  jne    L288
  cmp    %r13d,%r12d
  jne    L288
  mulsd  %xmm0,%xmm0
  movapd %xmm5,%xmm1
  movapd %xmm13,%xmm11
  movapd %xmm9,%xmm10
L135:
  subsd  %xmm7,%xmm0
  ucomisd %xmm0,%xmm12
  ja     L267
  sqrtsd %xmm0,%xmm0
  movapd %xmm0,%xmm14
L286:
  mulsd  %xmm1,%xmm1
  subsd  %xmm7,%xmm1
  ucomisd %xmm1,%xmm12
  ja     L114
  sqrtsd %xmm1,%xmm1
L158:
  mulsd  %xmm11,%xmm1
  movapd %xmm14,%xmm0
  subsd  %xmm1,%xmm0
L157:
  movsd  -0x8(%r14,%rbx,8),%xmm1
  add    $0x1,%rbx
  mulsd  %xmm10,%xmm1
  mulsd  %xmm0,%xmm1
  divsd  %xmm4,%xmm1
  addsd  %xmm1,%xmm3
  cmp    %ebx,%r13d
  jl     L272
L234:
  movsd  -0x8(%rbp,%rbx,8),%xmm0
  movsd  0x0(%rbp,%rbx,8),%xmm1
  mov    %ebx,%eax
  movapd %xmm0,%xmm4
  addsd  %xmm2,%xmm0
  subsd  %xmm1,%xmm4
  cmp    %ebx,%r12d
  jge    L268
  mov    D46(%rip),%rsi
  addsd  %xmm2,%xmm1
  movq   %rsi,%xmm10
L84:
  mulsd  %xmm0,%xmm0
  movapd %xmm0,%xmm11
  subsd  %xmm7,%xmm11
  cmp    %r13d,%r12d
  jge    L176
  cmp    %eax,%r13d
  jne    L176
  ucomisd %xmm11,%xmm12
  ja     L281
  movapd %xmm11,%xmm0
  sqrtsd %xmm0,%xmm0
  jmp    L157
L6:
  pxor   %xmm12,%xmm12
  movapd %xmm12,%xmm3
  nopl   (%rax)
L272:
  cmp    %r13d,%r12d
  jge    L243
  mulsd  %xmm6,%xmm6
  mulsd  %xmm5,%xmm5
  subsd  %xmm6,%xmm5
  ucomisd %xmm5,%xmm12
  ja     L16
  sqrtsd %xmm5,%xmm5
L200:
  mulsd  %xmm8,%xmm8
  subsd  %xmm6,%xmm8
  ucomisd %xmm8,%xmm12
  ja     L198
  sqrtsd %xmm8,%xmm8
L296:
  subsd  %xmm8,%xmm5
  mulsd  -0x8(%r14,%r15,1),%xmm5
  divsd  0x38(%rsp),%xmm5
  addsd  %xmm5,%xmm3
L243:
  add    $0x78,%rsp
  movapd %xmm3,%xmm0
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
  nopl   0x0(%rax,%rax,1)
L20:
  mov    %r12d,%r13d
  test   %r12d,%r12d
  jg     L91
  pxor   %xmm3,%xmm3
  jmp    L243
L281:
  movapd %xmm11,%xmm0
  movsd  %xmm12,0x58(%rsp)
  movsd  %xmm7,0x50(%rsp)
  movsd  %xmm2,0x48(%rsp)
  movsd  %xmm3,0x40(%rsp)
  movsd  %xmm4,0x30(%rsp)
  movsd  %xmm10,0x28(%rsp)
  movsd  %xmm6,0x20(%rsp)
  movsd  %xmm5,0x18(%rsp)
  movsd  %xmm13,0x10(%rsp)
  movsd  %xmm8,0x8(%rsp)
  call   <sqrt@plt>
  mov    D21(%rip),%rax
  movsd  0x8(%rsp),%xmm8
  movsd  0x10(%rsp),%xmm13
  movsd  0x18(%rsp),%xmm5
  movsd  0x20(%rsp),%xmm6
  movsd  0x28(%rsp),%xmm10
  movq   %rax,%xmm9
  movsd  0x30(%rsp),%xmm4
  movsd  0x40(%rsp),%xmm3
  movsd  0x48(%rsp),%xmm2
  movsd  0x50(%rsp),%xmm7
  movsd  0x58(%rsp),%xmm12
  jmp    L157
L267:
  movsd  %xmm12,0x68(%rsp)
  movsd  %xmm7,0x60(%rsp)
  movsd  %xmm2,0x58(%rsp)
  movsd  %xmm3,0x50(%rsp)
  movsd  %xmm4,0x48(%rsp)
  movsd  %xmm11,0x40(%rsp)
  movsd  %xmm10,0x30(%rsp)
  movsd  %xmm6,0x28(%rsp)
  movsd  %xmm5,0x20(%rsp)
  movsd  %xmm13,0x18(%rsp)
  movsd  %xmm1,0x10(%rsp)
  movsd  %xmm8,0x8(%rsp)
  call   <sqrt@plt>
  mov    D21(%rip),%rax
  movsd  0x68(%rsp),%xmm12
  movsd  0x60(%rsp),%xmm7
  movsd  0x58(%rsp),%xmm2
  movapd %xmm0,%xmm14
  movsd  0x50(%rsp),%xmm3
  movsd  0x48(%rsp),%xmm4
  movq   %rax,%xmm9
  movsd  0x40(%rsp),%xmm11
  movsd  0x30(%rsp),%xmm10
  movsd  0x28(%rsp),%xmm6
  movsd  0x20(%rsp),%xmm5
  movsd  0x18(%rsp),%xmm13
  movsd  0x10(%rsp),%xmm1
  movsd  0x8(%rsp),%xmm8
  jmp    L286
L114:
  movapd %xmm1,%xmm0
  movsd  %xmm12,0x68(%rsp)
  movsd  %xmm7,0x60(%rsp)
  movsd  %xmm2,0x58(%rsp)
  movsd  %xmm3,0x50(%rsp)
  movsd  %xmm4,0x48(%rsp)
  movsd  %xmm11,0x40(%rsp)
  movsd  %xmm10,0x30(%rsp)
  movsd  %xmm6,0x28(%rsp)
  movsd  %xmm5,0x20(%rsp)
  movsd  %xmm13,0x18(%rsp)
  movsd  %xmm14,0x10(%rsp)
  movsd  %xmm8,0x8(%rsp)
  call   <sqrt@plt>
  mov    D21(%rip),%rax
  movsd  0x68(%rsp),%xmm12
  movsd  0x60(%rsp),%xmm7
  movsd  0x58(%rsp),%xmm2
  movapd %xmm0,%xmm1
  movsd  0x50(%rsp),%xmm3
  movsd  0x48(%rsp),%xmm4
  movq   %rax,%xmm9
  movsd  0x40(%rsp),%xmm11
  movsd  0x30(%rsp),%xmm10
  movsd  0x28(%rsp),%xmm6
  movsd  0x20(%rsp),%xmm5
  movsd  0x18(%rsp),%xmm13
  movsd  0x10(%rsp),%xmm14
  movsd  0x8(%rsp),%xmm8
  jmp    L158
L198:
  movapd %xmm8,%xmm0
  movsd  %xmm3,0x10(%rsp)
  movsd  %xmm5,0x8(%rsp)
  call   <sqrt@plt>
  movsd  0x10(%rsp),%xmm3
  movsd  0x8(%rsp),%xmm5
  movapd %xmm0,%xmm8
  jmp    L296
L176:
  movapd %xmm9,%xmm11
  jmp    L135
L16:
  movapd %xmm5,%xmm0
  movsd  %xmm12,0x20(%rsp)
  movsd  %xmm3,0x18(%rsp)
  movsd  %xmm6,0x10(%rsp)
  movsd  %xmm8,0x8(%rsp)
  call   <sqrt@plt>
  movsd  0x20(%rsp),%xmm12
  movsd  0x18(%rsp),%xmm3
  movsd  0x10(%rsp),%xmm6
  movsd  0x8(%rsp),%xmm8
  movapd %xmm0,%xmm5
  jmp    L200
L288:
  addsd  %xmm2,%xmm1
  movapd %xmm9,%xmm10
  jmp    L84
```

tool_calls: name: parse_data
arguments: data_label: D67
type: byte[8]
name: parse_data
arguments: data_label: D63
type: f64
name: parse_data
arguments: data_label: D16
type: byte[8]
name: parse_data
arguments: data_label: D21
type: f64
name: parse_data
arguments: data_label: D31
type: f32[2]
name: parse_data
arguments: data_label: D46
type: f64

tool: {"D67": [0x39,0x9d,0x52,0xa2,0x46,0xdf,0x91,0x3f]}

tool: D63: 90

tool: {"D16": [0x40,0x8c,0xb5,0x78,0x1d,0xaf,0x15,0x44]}

tool: D21: 1

tool: {"D31": [0.0,-1.875]}

tool: D46: 2

assistant: ```c
double c_chapman(int lc, double taup, double *tauc, int nlyr, double *zd, double *dtau_c, double zenang, double r) {
  register int id, j;
  double zenrad, xp, xpsinz, sum, fact, fact2, rj, rjp1, dhj, dsj;
  zenrad = zenang * (3.14159265358979323846 / 180.);
  xp = r + zd[lc] + (zd[lc - 1] - zd[lc]) * taup;
  xpsinz = xp * sin(zenrad);
  if (zenang > 90. && xpsinz < r) {
    return 1.e+20;
  }
  id = lc;
  if (zenang > 90.) {
    for (j = lc; j <= nlyr; j++) {
      if (xpsinz < (zd[j - 1] + r) && (xpsinz >= zd[j] + r)) {
        id = j;
      }
    }
  }
  sum = 0.;
  for (j = 1; j <= id; j++) {
    fact = 1.;
    fact2 = 1.;
    if (j > lc) {
      fact = 2.;
    } else if (j == lc && lc == id && zenang > 90.) {
      fact2 = -1.;
    }
    rj = r + zd[j - 1];
    rjp1 = r + zd[j];
    if (j == lc && id == lc) {
      rjp1 = xp;
    }
    dhj = zd[j - 1] - zd[j];
    if (id > lc && j == id) {
      dsj = sqrt(rj * rj - xpsinz * xpsinz);
    } else {
      dsj = sqrt(rj * rj - xpsinz * xpsinz) - fact2 * sqrt(rjp1 * rjp1 - xpsinz * xpsinz);
    }
    sum += dtau_c[j - 1] * fact * dsj / dhj;
  }
  if (id > lc) {
    dhj = zd[lc - 1] - zd[lc];
    dsj = sqrt(xp * xp - xpsinz * xpsinz) - sqrt(({
                                                   const double _x = (double)(zd[lc] + r);
                                                   _x *_x;
                                                 }) -
                                                 xpsinz * xpsinz);
    sum += dtau_c[lc - 1] * dsj / dhj;
  }
  return sum;
}
```