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

```asm
<gauss_fit>:
  endbr64
  push   %r15
  pxor   %xmm4,%xmm4
  pxor   %xmm1,%xmm1
  pxor   %xmm2,%xmm2
  push   %r14
  push   %r13
  push   %r12
  mov    %esi,%r12d
  push   %rbp
  mov    %rdi,%rbp
  push   %rbx
  sub    $0xa8,%rsp
  mov    %rdx,0x28(%rsp)
  cvtss2sd (%rdx),%xmm4
  cvtss2sd (%rcx),%xmm1
  cvtss2sd (%r8),%xmm2
  mov    %rcx,0x30(%rsp)
  movq   %xmm4,%r13
  mov    %r8,0x38(%rsp)
  mov    %fs:0x28,%rax
  mov    %rax,0x98(%rsp)
  xor    %eax,%eax
  mov    D25(%rip),%rax
  movl   $0xc7,0x24(%rsp)
  movsd  %xmm4,0x40(%rsp)
  mov    %rax,0x60(%rsp)
  mov    D137(%rip),%rax
  movsd  %xmm1,0x48(%rsp)
  mov    %rax,0x68(%rsp)
  mov    D78(%rip),%rax
  movsd  %xmm2,0x50(%rsp)
  mov    %rax,0x70(%rsp)
  mov    D137(%rip),%rax
  mov    %rax,0x80(%rsp)
  mov    %rax,0x88(%rsp)
  mov    %rax,0x90(%rsp)
L177:
  mov    $0x3,%edx
  movq   %r13,%xmm0
  mov    %r12d,%esi
  mov    %rbp,%rdi
  movsd  %xmm2,0x8(%rsp)
  movsd  %xmm1,(%rsp)
  call   <gauss_gradients@plt>
  movsd  D1(%rip),%xmm2
  movsd  (%rsp),%xmm1
  comisd %xmm0,%xmm2
  movsd  0x8(%rsp),%xmm2
  ja     L34
  movq   $0x0,0x10(%rsp)
  lea    0x40(%rsp),%rbx
L43:
  mov    0x10(%rsp),%r14d
  movq   %r13,%xmm0
  mov    %r12d,%esi
  mov    %rbp,%rdi
  movsd  %xmm2,0x8(%rsp)
  mov    %r14d,%edx
  movsd  %xmm1,(%rsp)
  call   <gauss_gradients@plt>
  movsd  D1(%rip),%xmm4
  comisd %xmm0,%xmm4
  ja     L34
  pxor   %xmm5,%xmm5
  ucomisd %xmm5,%xmm0
  jp     L159
  movsd  (%rsp),%xmm1
  movsd  0x8(%rsp),%xmm2
  je     L189
L159:
  mov    0x10(%rsp),%rax
  pxor   %xmm6,%xmm6
  mov    $0xffffffff,%r13d
  comisd %xmm6,%xmm0
  movsd  0x60(%rsp,%rax,8),%xmm7
  movsd  %xmm7,0x8(%rsp)
  jbe    L194
  xorpd  D54(%rip),%xmm7
  mov    $0x1,%r13d
  movsd  %xmm7,0x8(%rsp)
L194:
  lea    0x80(%rsp),%rax
  mov    %rax,0x18(%rsp)
L213:
  cvttsd2si %xmm0,%edi
  call   <fabs@plt>
  mov    0x18(%rsp),%rax
  mov    0x10(%rsp),%rcx
  comisd (%rax,%rcx,8),%xmm0
  jbe    L119
  movsd  (%rbx),%xmm3
  mov    %r13d,%r15d
  nopw   0x0(%rax,%rax,1)
L57:
  addsd  0x8(%rsp),%xmm3
  mov    %r14d,%edx
  mov    %r12d,%esi
  mov    %rbp,%rdi
  movsd  %xmm3,(%rbx)
  movsd  0x50(%rsp),%xmm2
  movsd  0x48(%rsp),%xmm1
  movsd  0x40(%rsp),%xmm0
  movsd  %xmm3,(%rsp)
  call   <gauss_gradients@plt>
  movsd  D1(%rip),%xmm6
  comisd %xmm0,%xmm6
  ja     L34
  pxor   %xmm7,%xmm7
  movsd  (%rsp),%xmm3
  ucomisd %xmm7,%xmm0
  jp     L19
  je     L107
L19:
  pxor   %xmm4,%xmm4
  xor    %r15d,%r15d
  comisd %xmm4,%xmm0
  seta   %r15b
  lea    -0x1(%r15,%r15,1),%r15d
  cmp    %r15d,%r13d
  je     L57
L107:
  movsd  D33(%rip),%xmm1
  mulsd  0x8(%rsp),%xmm1
  mov    %r15d,%r13d
  movsd  %xmm1,0x8(%rsp)
  jmp    L213
L116:
  lea    D102(%rip),%rdi
  call   <puts@plt>
  nop
L34:
  xor    %eax,%eax
L204:
  mov    0x98(%rsp),%rdx
  sub    %fs:0x28,%rdx
  jne    L137
  add    $0xa8,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
L119:
  addq   $0x1,0x10(%rsp)
  mov    0x10(%rsp),%rax
  add    $0x8,%rbx
  movsd  0x50(%rsp),%xmm2
  movsd  0x48(%rsp),%xmm1
  mov    0x40(%rsp),%r13
  cmp    $0x3,%rax
  jne    L43
L189:
  xor    %edx,%edx
  mov    %r12d,%esi
  mov    %rbp,%rdi
  movsd  %xmm2,0x8(%rsp)
  movq   %r13,%xmm0
  movsd  %xmm1,(%rsp)
  call   <gauss_gradients@plt>
  movsd  D137(%rip),%xmm1
  xor    %edi,%edi
  comisd %xmm0,%xmm1
  seta   %dil
  call   <fabs@plt>
  pxor   %xmm1,%xmm1
  movsd  0x8(%rsp),%xmm2
  ucomisd %xmm1,%xmm0
  movsd  (%rsp),%xmm1
  jp     L215
  jne    L215
L193:
  mov    0x24(%rsp),%eax
  test   %eax,%eax
  je     L116
  subl   $0x1,0x24(%rsp)
  jmp    L177
L215:
  mov    $0x1,%edx
  mov    %r12d,%esi
  mov    %rbp,%rdi
  movsd  %xmm1,(%rsp)
  movq   %r13,%xmm0
  movsd  %xmm2,0x8(%rsp)
  call   <gauss_gradients@plt>
  movsd  D137(%rip),%xmm2
  xor    %edi,%edi
  comisd %xmm0,%xmm2
  seta   %dil
  call   <fabs@plt>
  pxor   %xmm4,%xmm4
  movsd  (%rsp),%xmm1
  movsd  0x8(%rsp),%xmm2
  ucomisd %xmm4,%xmm0
  jp     L218
  je     L193
L218:
  mov    $0x2,%edx
  mov    %r12d,%esi
  mov    %rbp,%rdi
  movsd  %xmm1,(%rsp)
  movq   %r13,%xmm0
  movsd  %xmm2,0x8(%rsp)
  call   <gauss_gradients@plt>
  movsd  D137(%rip),%xmm2
  xor    %edi,%edi
  comisd %xmm0,%xmm2
  seta   %dil
  call   <fabs@plt>
  pxor   %xmm2,%xmm2
  movsd  (%rsp),%xmm1
  ucomisd %xmm2,%xmm0
  movsd  0x8(%rsp),%xmm2
  jp     L58
  je     L193
L58:
  mov    0x24(%rsp),%edx
  test   %edx,%edx
  je     L116
  mov    $0x3,%edx
  mov    %r12d,%esi
  mov    %rbp,%rdi
  mov    %r13,(%rsp)
  movq   %r13,%xmm0
  movsd  %xmm2,0x10(%rsp)
  movsd  %xmm1,0x8(%rsp)
  call   <gauss_gradients@plt>
  movsd  (%rsp),%xmm4
  movsd  0x10(%rsp),%xmm2
  lea    D123(%rip),%rdi
  movsd  0x8(%rsp),%xmm1
  movapd %xmm0,%xmm3
  mov    $0x4,%eax
  movapd %xmm4,%xmm0
  call   <printf@plt>
  mov    0x28(%rsp),%rax
  movsd  (%rsp),%xmm4
  movsd  0x8(%rsp),%xmm1
  movsd  0x10(%rsp),%xmm2
  cvtsd2ss %xmm4,%xmm4
  movss  %xmm4,(%rax)
  mov    0x30(%rsp),%rax
  cvtsd2ss %xmm1,%xmm1
  cvtsd2ss %xmm2,%xmm2
  movss  %xmm1,(%rax)
  mov    0x38(%rsp),%rax
  movss  %xmm2,(%rax)
  mov    $0x1,%eax
  jmp    L204
L137:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: extract_symbolic_data
arguments: tag: D25
type_infered: f64
name: extract_symbolic_data
arguments: tag: D137
type_infered: f64
name: extract_symbolic_data
arguments: tag: D78
type_infered: f32[2]
name: extract_symbolic_data
arguments: tag: D1
type_infered: byte[8]
name: extract_symbolic_data
arguments: tag: D54
type_infered: f32[4]
name: extract_symbolic_data
arguments: tag: D33
type_infered: f32[2]
name: extract_symbolic_data
arguments: tag: D102
type_infered: string
name: extract_symbolic_data
arguments: tag: D123
type_infered: string

tool: D25: 5

tool: D137: 1

tool: {"D78": [0.0,1.75]}

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

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

tool: {"D33": [0.0,-1.75]}

tool: D102: Fit taking too long.

tool: D123: Final Params: mu=%e, sig=%e, scale=%e (S=%e)


assistant: ```c
int gauss_fit(float *y, int n_points, float *mu_fit, float *sig_fit, float *scale_fit) {
  double x[3];
  double dx[] = {5.0, 1.0, .5};
  double smallest_grad[] = {1.0, 1.0, 1.0};
  double step, grad;
  double s;
  int old_direction, new_direction;
  int i, j;
  int count_down = 200;
  x[0] = (double)(*mu_fit);
  x[1] = (double)(*sig_fit);
  x[2] = (double)(*scale_fit);
  do {
    s = gauss_gradients(y, n_points, x[0], x[1], x[2], 3);
    if (s < -1.0e20) {
      return 0;
    }
    for (i = 0; i < 3; i++) {
      grad = gauss_gradients(y, n_points, x[0], x[1], x[2], i);
      if (grad < -1.0e20) {
        return 0;
      }
      if (grad == 0.0) {
        break;
      } else if (grad > 0.0) {
        new_direction = 1;
        step = -dx[i];
      } else {
        new_direction = -1;
        step = dx[i];
      }
      while (fabs(grad) > smallest_grad[i]) {
        old_direction = new_direction;
        while (new_direction == old_direction) {
          x[i] += step;
          grad = gauss_gradients(y, n_points, x[0], x[1], x[2], i);
          if (grad < -1.0e20) {
            return 0;
          }
          if (grad == 0.0) {
            break;
          } else if (grad > 0.0) {
            new_direction = 1;
          } else {
            new_direction = -1;
          }
        }
        step *= (-.5);
      }
    }
    if ((fabs(gauss_gradients(y, n_points, x[0], x[1], x[2], 0) < smallest_grad[0])) && (fabs(gauss_gradients(y, n_points, x[0], x[1], x[2], 1) < smallest_grad[1])) && (fabs(gauss_gradients(y, n_points, x[0], x[1], x[2], 2) < smallest_grad[2]))) {
      j = 1;
    } else {
      j = 0;
    }
    count_down--;
    if (count_down == 0) {
      printf("Fit taking too long.\n");
      return 0;
    }
  } while (j == 0);
  s = gauss_gradients(y, n_points, x[0], x[1], x[2], 3);
  printf("Final Params: mu=%e, sig=%e, scale=%e (S=%e)\n", x[0], x[1], x[2], s);
  (*mu_fit) = (float)x[0];
  (*sig_fit) = (float)x[1];
  (*scale_fit) = (float)x[2];
  return 1;
}
```