user: What is the c source code of the assembly code below?

```asm
<GCI_Phasor>:
  endbr64
  push   %r15
  movslq %esi,%rax
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  mov    %rax,%rbx
  sub    $0x58,%rsp
  movss  (%rcx),%xmm4
  mov    %rax,0x48(%rsp)
  shl    $0x2,%rax
  mov    0xb0(%rsp),%r12
  mov    %edx,0x28(%rsp)
  sub    %esi,%edx
  mov    %esi,0x24(%rsp)
  mov    %r8,0x30(%rsp)
  mov    %r9,0x38(%rsp)
  mov    %rax,0x40(%rsp)
  movss  %xmm0,0x1c(%rsp)
  movss  %xmm4,0x4(%rsp)
  add    %rdi,%rax
  je     L104
  mov    %edx,%ebp
  test   %ebp,%ebp
  js     L103
  movaps %xmm0,%xmm7
  pxor   %xmm0,%xmm0
  mov    %rdi,%r14
  mov    %rax,%r13
  cvtsi2ss %ebp,%xmm0
  movss  D65(%rip),%xmm1
  divss  %xmm0,%xmm1
  mulss  %xmm7,%xmm0
  movss  %xmm1,0x8(%rsp)
  call   <setPhasorPeriod@plt>
  test   %ebp,%ebp
  je     L236
  pxor   %xmm6,%xmm6
  lea    -0x1(%rbp),%ecx
  mov    %r13,%rax
  lea    0x4(%r13,%rcx,4),%rcx
  movss  %xmm6,0x20(%rsp)
  movss  %xmm6,0x10(%rsp)
  nopl   0x0(%rax)
L118:
  movss  (%rax),%xmm0
  subss  0x4(%rsp),%xmm0
  add    $0x4,%rax
  addss  0x10(%rsp),%xmm0
  movss  %xmm0,0x10(%rsp)
  cmp    %rax,%rcx
  jne    L118
  movss  D2(%rip),%xmm4
  xor    %r15d,%r15d
  pxor   %xmm1,%xmm1
  movss  %xmm4,0x14(%rsp)
  nopl   0x0(%rax)
L43:
  pxor   %xmm0,%xmm0
  movss  %xmm1,0x18(%rsp)
  cvtsi2ss %r15d,%xmm0
  addss  0x14(%rsp),%xmm0
  mulss  0x8(%rsp),%xmm0
  call   <cosf@plt>
  movss  0x18(%rsp),%xmm1
  movaps %xmm0,%xmm2
  movss  0x0(%r13,%r15,4),%xmm0
  subss  0x4(%rsp),%xmm0
  add    $0x1,%r15
  mulss  %xmm2,%xmm0
  addss  %xmm0,%xmm1
  cmp    %r15,%rbp
  jne    L43
  divss  0x10(%rsp),%xmm1
  xor    %r15d,%r15d
  movss  %xmm1,0x2c(%rsp)
  pxor   %xmm1,%xmm1
  nopw   0x0(%rax,%rax,1)
L2:
  pxor   %xmm0,%xmm0
  movss  %xmm1,0x18(%rsp)
  cvtsi2ss %r15d,%xmm0
  addss  0x14(%rsp),%xmm0
  mulss  0x8(%rsp),%xmm0
  call   <sinf@plt>
  movss  0x18(%rsp),%xmm1
  movaps %xmm0,%xmm2
  movss  0x0(%r13,%r15,4),%xmm0
  subss  0x4(%rsp),%xmm0
  add    $0x1,%r15
  mulss  %xmm2,%xmm0
  addss  %xmm0,%xmm1
  cmp    %r15,%rbp
  jne    L2
  divss  0x10(%rsp),%xmm1
L142:
  movss  0x2c(%rsp),%xmm6
  movaps %xmm1,%xmm0
  movss  0x1c(%rsp),%xmm2
  divss  0x8(%rsp),%xmm2
  mov    0x90(%rsp),%rax
  movss  0x20(%rsp),%xmm7
  divss  %xmm6,%xmm0
  movaps %xmm6,%xmm3
  mulss  %xmm6,%xmm3
  mulss  %xmm2,%xmm0
  movss  %xmm0,(%rax)
  movaps %xmm1,%xmm0
  mulss  %xmm1,%xmm0
  addss  %xmm0,%xmm3
  movss  D3(%rip),%xmm0
  divss  %xmm3,%xmm0
  subss  D3(%rip),%xmm0
  ucomiss %xmm0,%xmm7
  ja     L51
  sqrtss %xmm0,%xmm0
L49:
  mulss  %xmm0,%xmm2
  movss  0x2c(%rsp),%xmm7
  mov    0x98(%rsp),%rax
  cmpq   $0x0,0xa8(%rsp)
  movss  %xmm2,(%rax)
  mov    0x90(%rsp),%rax
  addss  (%rax),%xmm2
  mulss  0x14(%rsp),%xmm2
  mov    0xa0(%rsp),%rax
  movss  %xmm2,(%rax)
  mov    0x30(%rsp),%rax
  movss  %xmm7,(%rax)
  mov    0x38(%rsp),%rax
  movss  %xmm1,(%rax)
  je     L178
  movslq 0x28(%rsp),%rbp
  mov    0xa8(%rsp),%rdi
  xor    %esi,%esi
  lea    0x0(,%rbp,4),%r13
  mov    %r13,%rdx
  call   <memset@plt>
  xor    %esi,%esi
  mov    %r13,%rdx
  mov    %r12,%rdi
  call   <memset@plt>
  cmp    %ebp,0x24(%rsp)
  jge    L183
  mov    0xa0(%rsp),%rax
  mov    0x24(%rsp),%ebp
  xor    %r13d,%r13d
  pxor   %xmm2,%xmm2
  sub    0x28(%rsp),%ebp
  movss  (%rax),%xmm1
  movss  %xmm1,0x14(%rsp)
  nopl   0x0(%rax,%rax,1)
L69:
  pxor   %xmm0,%xmm0
  movss  %xmm2,0x8(%rsp)
  cvtsi2ss %r13d,%xmm0
  mulss  0x1c(%rsp),%xmm0
  sub    $0x1,%r13d
  divss  0x14(%rsp),%xmm0
  call   <expf@plt>
  movss  0x8(%rsp),%xmm2
  addss  %xmm0,%xmm2
  cmp    %r13d,%ebp
  jne    L69
  movss  0x10(%rsp),%xmm4
  xor    %r13d,%r13d
  mov    0x40(%rsp),%r15
  mov    %rbx,0x8(%rsp)
  add    0xa8(%rsp),%r15
  movss  0x14(%rsp),%xmm1
  divss  %xmm2,%xmm4
  mov    %r15,%rbx
  mov    %r13d,%r15d
  mov    0xa0(%rsp),%r13
  movss  %xmm4,0x10(%rsp)
  jmp    L78
  xchg   %ax,%ax
L67:
  movss  0x0(%r13),%xmm1
L78:
  pxor   %xmm0,%xmm0
  add    $0x4,%rbx
  cvtsi2ss %r15d,%xmm0
  mulss  0x1c(%rsp),%xmm0
  sub    $0x1,%r15d
  divss  %xmm1,%xmm0
  call   <expf@plt>
  mulss  0x10(%rsp),%xmm0
  addss  0x4(%rsp),%xmm0
  movss  %xmm0,-0x4(%rbx)
  cmp    %r15d,%ebp
  jne    L67
  mov    0x8(%rsp),%rbx
L183:
  mov    %r12,%rax
  or     0xb8(%rsp),%rax
  je     L178
  mov    0x24(%rsp),%edx
  xor    %eax,%eax
  test   %edx,%edx
  jle    L136
  mov    0xa8(%rsp),%rcx
  mov    0x48(%rsp),%rdx
  nopl   0x0(%rax)
L130:
  test   %r12,%r12
  je     L30
  movss  (%r14,%rax,4),%xmm0
  subss  (%rcx,%rax,4),%xmm0
  movss  %xmm0,(%r12,%rax,4)
L30:
  add    $0x1,%rax
  cmp    %rax,%rdx
  jne    L130
L136:
  mov    0x28(%rsp),%edi
  pxor   %xmm2,%xmm2
  cmp    %edi,0x24(%rsp)
  jge    L240
  mov    0x28(%rsp),%edx
  mov    0xa8(%rsp),%rax
  nopl   0x0(%rax)
L95:
  movss  (%rax,%rbx,4),%xmm1
  movss  (%r14,%rbx,4),%xmm0
  subss  %xmm1,%xmm0
  test   %r12,%r12
  je     L206
  movss  %xmm0,(%r12,%rbx,4)
  movss  (%rax,%rbx,4),%xmm1
L206:
  comiss D3(%rip),%xmm1
  movss  D3(%rip),%xmm3
  jbe    L180
  divss  %xmm1,%xmm3
L180:
  mulss  %xmm0,%xmm0
  add    $0x1,%rbx
  mulss  %xmm3,%xmm0
  addss  %xmm0,%xmm2
  cmp    %ebx,%edx
  jg     L95
L240:
  cmpq   $0x0,0xb8(%rsp)
  je     L178
  mov    0xb8(%rsp),%rax
  movss  %xmm2,(%rax)
L178:
  xor    %eax,%eax
L80:
  add    $0x58,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
L236:
  pxor   %xmm3,%xmm3
  movss  D2(%rip),%xmm4
  movaps %xmm3,%xmm6
  movss  %xmm3,0x20(%rsp)
  divss  %xmm3,%xmm6
  movss  %xmm3,0x10(%rsp)
  movss  %xmm4,0x14(%rsp)
  movss  %xmm6,0x2c(%rsp)
  movaps %xmm6,%xmm1
  jmp    L142
L103:
  mov    $0xfffffffe,%eax
  jmp    L80
L104:
  mov    $0xffffffff,%eax
  jmp    L80
L51:
  movss  %xmm1,0x18(%rsp)
  movss  %xmm2,0x8(%rsp)
  call   <sqrtf@plt>
  movss  0x18(%rsp),%xmm1
  movss  0x8(%rsp),%xmm2
  jmp    L49
```

tool_calls: name: extract_symbolic_data
arguments: data_label: D65
datatype: byte[4]
name: extract_symbolic_data
arguments: data_label: D2
datatype: byte[4]
name: extract_symbolic_data
arguments: data_label: D3
datatype: byte[4]

tool: {"D65": [0xdb,0x0f,0xc9,0x40]}

tool: {"D2": [0x00,0x00,0x00,0x3f]}

tool: {"D3": [0x00,0x00,0x80,0x3f]}

assistant: ```c
int GCI_Phasor(float xincr, float y[], int fit_start, int fit_end, float *Z, float *U, float *V, float *taup, float *taum, float *tau, float *fitted, float *residuals, float *chisq) {
  int i, ret = 0, nBins;
  float *data, u, v, A, w, I, Ifit, bg, chisq_local, res, sigma2;
  data = &(y[fit_start]);
  nBins = (fit_end - fit_start);
  bg = *Z;
  if (!data)
    return (-1);
  if (nBins < 0)
    return (-2);
  w = 2.0f * 3.1415926535897932384626433832795028841971f / (float)nBins;
  setPhasorPeriod((float)nBins * xincr);
  for (i = 0, I = 0.0f; i < nBins; i++)
    I += (data[i] - bg);
  for (i = 0, u = 0.0f; i < nBins; i++)
    u += (data[i] - bg) * cosf(w * ((float)i + 0.5f));
  u /= I;
  for (i = 0, v = 0.0f; i < nBins; i++)
    v += (data[i] - bg) * sinf(w * ((float)i + 0.5f));
  v /= I;
  *taup = (xincr / w) * (v / u);
  *taum = (xincr / w) * sqrtf(1.0f / (u * u + v * v) - 1.0f);
  *tau = ((*taup) + (*taum)) / 2.0f;
  *U = u;
  *V = v;
  if (fitted == 0)
    return 0;
  memset(fitted, 0, (size_t)fit_end * sizeof(float));
  memset(residuals, 0, (size_t)fit_end * sizeof(float));
  for (Ifit = 0.0f, i = fit_start; i < fit_end; i++)
    Ifit += expf((float)(-(i - fit_start)) * xincr / (*tau));
  A = I / Ifit;
  for (i = fit_start; i < fit_end; i++) {
    fitted[i] = bg + A * expf((float)(-(i - fit_start)) * xincr / (*tau));
  }
  if (residuals == 0 && chisq == 0)
    return 0;
  chisq_local = 0.0f;
  for (i = 0; i < fit_start; i++) {
    res = y[i] - fitted[i];
    if (residuals != 0)
      residuals[i] = res;
  }
  for (i = fit_start; i < fit_end; i++) {
    res = y[i] - fitted[i];
    if (residuals != 0)
      residuals[i] = res;
    sigma2 = (fitted[i] > 1 ? 1.0f / fitted[i] : 1.0f);
    chisq_local += res * res * sigma2;
  }
  if (chisq != 0)
    *chisq = chisq_local;
  return (ret);
}
```