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

```asm
<Yanggradient>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  mov    %rsi,%r12
  push   %rbp
  mov    %rdx,%rbp
  push   %rbx
  movslq %edi,%rbx
  lea    (%r9,%rbx,8),%r13
  sub    $0x38,%rsp
  mov    %rcx,0x10(%rsp)
  mov    0x70(%rsp),%ecx
  mov    %r8,0x8(%rsp)
  movsd  %xmm0,0x18(%rsp)
  test   %ecx,%ecx
  jne    L120
  xor    %r14d,%r14d
  test   %ebx,%ebx
  jg     L149
L2:
  add    $0x38,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
  nopl   (%rax)
L58:
  xor    %eax,%eax
  nopw   0x0(%rax,%rax,1)
L118:
  movsd  (%r12,%rax,8),%xmm0
  movsd  %xmm0,0x0(%r13,%rax,8)
  add    $0x1,%rax
  cmp    %rbx,%rax
  jne    L118
  movsd  (%r12,%r14,8),%xmm0
  call   <fabs@plt>
  pxor   %xmm0,%xmm0
  movsd  D20(%rip),%xmm1
  add    $0x1,%eax
  cvtsi2sd %eax,%xmm0
  mulsd  D36(%rip),%xmm0
  call   <pow@plt>
  mov    0x80(%rsp),%rax
  movapd %xmm0,%xmm1
  addsd  %xmm0,%xmm1
  movsd  0x0(%r13,%r14,8),%xmm0
  movapd %xmm0,%xmm2
  addsd  %xmm1,%xmm2
  comisd (%rax,%r14,8),%xmm2
  jbe    L12
  subsd  %xmm1,%xmm0
  mov    0x8(%rsp),%rax
  movsd  %xmm1,0x20(%rsp)
  mov    %r13,%rdi
  movsd  %xmm0,0x0(%r13,%r14,8)
  call   *%rax
  movsd  0x20(%rsp),%xmm1
  mov    0x10(%rsp),%rax
  movapd %xmm0,%xmm2
  movsd  0x18(%rsp),%xmm0
  subsd  %xmm2,%xmm0
  divsd  %xmm1,%xmm0
  movsd  %xmm0,(%rax,%r14,8)
  cs nopw 0x0(%rax,%rax,1)
L115:
  add    $0x1,%r14
  cmp    %rbx,%r14
  je     L2
L149:
  mov    0x0(%rbp,%r14,4),%eax
  test   %eax,%eax
  je     L115
  jmp    L58
  nopl   0x0(%rax,%rax,1)
L12:
  mov    0x8(%rsp),%rax
  movsd  %xmm1,0x20(%rsp)
  mov    %r13,%rdi
  movsd  %xmm2,0x0(%r13,%r14,8)
  call   *%rax
  subsd  0x18(%rsp),%xmm0
  movsd  0x20(%rsp),%xmm1
  mov    0x10(%rsp),%rax
  divsd  %xmm1,%xmm0
  movsd  %xmm0,(%rax,%r14,8)
  jmp    L115
  nopl   0x0(%rax)
L120:
  test   %ebx,%ebx
  jle    L2
  mov    %r9,%r14
  xor    %r15d,%r15d
  jmp    L32
  nopl   0x0(%rax,%rax,1)
L35:
  add    $0x1,%r15
  cmp    %r15,%rbx
  je     L2
L32:
  mov    0x0(%rbp,%r15,4),%edx
  test   %edx,%edx
  je     L35
  xor    %eax,%eax
  nopl   0x0(%rax,%rax,1)
L139:
  movsd  (%r12,%rax,8),%xmm0
  movsd  %xmm0,0x0(%r13,%rax,8)
  movsd  %xmm0,(%r14,%rax,8)
  add    $0x1,%rax
  cmp    %rax,%rbx
  jne    L139
  movsd  (%r12,%r15,8),%xmm0
  call   <fabs@plt>
  pxor   %xmm0,%xmm0
  add    $0x1,%eax
  cvtsi2sd %eax,%xmm0
  mulsd  D36(%rip),%xmm0
  mov    D20(%rip),%rax
  movq   %rax,%xmm1
  call   <pow@plt>
  mov    0x78(%rsp),%rax
  movapd %xmm0,%xmm1
  movsd  (%r14,%r15,8),%xmm0
  subsd  %xmm1,%xmm0
  movsd  %xmm0,(%r14,%r15,8)
  movsd  0x0(%r13,%r15,8),%xmm0
  addsd  %xmm1,%xmm0
  movsd  %xmm0,0x0(%r13,%r15,8)
  movsd  (%r14,%r15,8),%xmm2
  movsd  (%rax,%r15,8),%xmm3
  comisd %xmm2,%xmm3
  jbe    L74
  addsd  %xmm1,%xmm0
  mov    0x8(%rsp),%rax
  movsd  %xmm1,0x20(%rsp)
  mov    %r13,%rdi
  movsd  %xmm0,0x0(%r13,%r15,8)
  call   *%rax
  subsd  0x18(%rsp),%xmm0
L128:
  movsd  0x20(%rsp),%xmm1
  mov    0x10(%rsp),%rax
  addsd  %xmm1,%xmm1
  divsd  %xmm1,%xmm0
  movsd  %xmm0,(%rax,%r15,8)
  jmp    L35
  nopw   0x0(%rax,%rax,1)
L74:
  mov    0x80(%rsp),%rax
  comisd (%rax,%r15,8),%xmm0
  jbe    L77
  subsd  %xmm1,%xmm2
  mov    0x8(%rsp),%rax
  movsd  %xmm1,0x20(%rsp)
  mov    %r14,%rdi
  movsd  %xmm2,(%r14,%r15,8)
  call   *%rax
  movapd %xmm0,%xmm2
  movsd  0x18(%rsp),%xmm0
  subsd  %xmm2,%xmm0
  jmp    L128
  nopw   0x0(%rax,%rax,1)
L77:
  movsd  %xmm1,0x28(%rsp)
  mov    0x8(%rsp),%rax
  mov    %r13,%rdi
  call   *%rax
  mov    0x8(%rsp),%rax
  mov    %r14,%rdi
  movsd  %xmm0,0x20(%rsp)
  call   *%rax
  movsd  0x20(%rsp),%xmm2
  movsd  0x28(%rsp),%xmm1
  mov    0x10(%rsp),%rax
  subsd  %xmm0,%xmm2
  addsd  %xmm1,%xmm1
  divsd  %xmm1,%xmm2
  movsd  %xmm2,(%rax,%r15,8)
  jmp    L35
```

tool_calls: name: parse_data
arguments: data_tag: D20
type_guessed: f64
name: parse_data
arguments: data_tag: D36
type_guessed: byte[8]

tool: D20: 0.67

tool: {"D36": [0x3a,0x8c,0x30,0xe2,0x8e,0x79,0x45,0x3e]}

assistant: ```c
void Yanggradient(int n, const double x[], const int need[], double f0, double g[], double (*fun)(const double x[]), double space[], int central, const double *lowbound, const double *upbound) {
  int i, j;
  double *x0 = space, *x1 = space + n, eh0, eh01, eh;
  eh0 = eh01 = 1.e-8;
  if (central) {
    for (i = 0; i < n; i++) {
      if (need[i]) {
        for (j = 0; j < n; j++)
          x0[j] = x1[j] = x[j];
        eh = pow(eh01 * (fabs(x[i]) + 1), 0.67);
        x0[i] -= eh;
        x1[i] += eh;
        if (x0[i] < lowbound[i]) {
          x1[i] += eh;
          g[i] = ((*fun)(x1)-f0) / (eh * 2.0);
        } else if (x1[i] > upbound[i]) {
          x0[i] -= eh;
          g[i] = (f0 - (*fun)(x0)) / (eh * 2.0);
        } else
          g[i] = ((*fun)(x1) - (*fun)(x0)) / (eh * 2.0);
      }
    }
  } else {
    for (i = 0; i < n; i++) {
      if (need[i]) {
        for (j = 0; j < n; j++)
          x1[j] = x[j];
        eh = 2.0 * pow(eh0 * (fabs(x[i]) + 1), 0.67);
        if (x1[i] + eh > upbound[i]) {
          x1[i] -= eh;
          g[i] = (f0 - (*fun)(x1)) / eh;
        } else {
          x1[i] += eh;
          g[i] = ((*fun)(x1)-f0) / eh;
        }
      }
    }
  }
}
```