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

```asm
<c_phansalkar>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0xa0,%rsp
  mov    %rdi,-0x88(%rbp)
  mov    %esi,-0x8c(%rbp)
  mov    %edx,-0x90(%rbp)
  mov    %rcx,-0x98(%rbp)
  movsd  D51(%rip),%xmm0
  movsd  %xmm0,-0x48(%rbp)
  movsd  D43(%rip),%xmm0
  movsd  %xmm0,-0x40(%rbp)
  movsd  D26(%rip),%xmm0
  movsd  %xmm0,-0x38(%rbp)
  movsd  D44(%rip),%xmm0
  movsd  %xmm0,-0x30(%rbp)
  movsd  D11(%rip),%xmm0
  movsd  %xmm0,-0x58(%rbp)
  movsd  D40(%rip),%xmm0
  movsd  %xmm0,-0x50(%rbp)
  mov    -0x98(%rbp),%rax
  mov    $0x8,%edx
  mov    $0x0,%esi
  mov    %rax,%rdi
  call   <memset@plt>
  movl   $0x0,-0x78(%rbp)
  jmp    L103
L30:
  movl   $0x0,-0x74(%rbp)
  jmp    L45
L89:
  mov    -0x78(%rbp),%eax
  imul   -0x90(%rbp),%eax
  mov    %eax,%edx
  mov    -0x74(%rbp),%eax
  add    %edx,%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x88(%rbp),%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm0
  mov    -0x50(%rbp),%rax
  movapd %xmm0,%xmm1
  movq   %rax,%xmm0
  call   <min@plt>
  movq   %xmm0,%rax
  mov    %rax,-0x50(%rbp)
  mov    -0x78(%rbp),%eax
  imul   -0x90(%rbp),%eax
  mov    %eax,%edx
  mov    -0x74(%rbp),%eax
  add    %edx,%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x88(%rbp),%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm0
  mov    -0x58(%rbp),%rax
  movapd %xmm0,%xmm1
  movq   %rax,%xmm0
  call   <max@plt>
  movq   %xmm0,%rax
  mov    %rax,-0x58(%rbp)
  mov    -0x78(%rbp),%eax
  imul   -0x90(%rbp),%eax
  mov    %eax,%edx
  mov    -0x74(%rbp),%eax
  add    %edx,%eax
  movslq %eax,%rdx
  mov    -0x98(%rbp),%rax
  add    %rdx,%rax
  movb   $0x0,(%rax)
  addl   $0x1,-0x74(%rbp)
L45:
  mov    -0x74(%rbp),%eax
  cmp    -0x90(%rbp),%eax
  jl     L89
  addl   $0x1,-0x78(%rbp)
L103:
  mov    -0x78(%rbp),%eax
  cmp    -0x90(%rbp),%eax
  jl     L30
  movl   $0x0,-0x78(%rbp)
  jmp    L118
L50:
  movl   $0x0,-0x74(%rbp)
  jmp    L119
L10:
  mov    -0x78(%rbp),%eax
  imul   -0x90(%rbp),%eax
  mov    %eax,%edx
  mov    -0x74(%rbp),%eax
  add    %edx,%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x88(%rbp),%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm0
  subsd  -0x50(%rbp),%xmm0
  movsd  -0x58(%rbp),%xmm1
  subsd  -0x50(%rbp),%xmm1
  mov    -0x78(%rbp),%eax
  imul   -0x90(%rbp),%eax
  mov    %eax,%edx
  mov    -0x74(%rbp),%eax
  add    %edx,%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x88(%rbp),%rax
  add    %rdx,%rax
  divsd  %xmm1,%xmm0
  movsd  %xmm0,(%rax)
  addl   $0x1,-0x74(%rbp)
L119:
  mov    -0x74(%rbp),%eax
  cmp    -0x90(%rbp),%eax
  jl     L10
  addl   $0x1,-0x78(%rbp)
L118:
  mov    -0x78(%rbp),%eax
  cmp    -0x90(%rbp),%eax
  jl     L50
  mov    -0x8c(%rbp),%eax
  mov    %eax,-0x78(%rbp)
  jmp    L148
L73:
  mov    -0x8c(%rbp),%eax
  mov    %eax,-0x74(%rbp)
  jmp    L134
L78:
  mov    -0x78(%rbp),%eax
  imul   -0x90(%rbp),%eax
  mov    %eax,%edx
  mov    -0x74(%rbp),%eax
  add    %edx,%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x88(%rbp),%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm0
  movsd  %xmm0,-0x28(%rbp)
  pxor   %xmm0,%xmm0
  movsd  %xmm0,-0x20(%rbp)
  pxor   %xmm0,%xmm0
  movsd  %xmm0,-0x68(%rbp)
  pxor   %xmm0,%xmm0
  movsd  %xmm0,-0x60(%rbp)
  mov    -0x78(%rbp),%eax
  sub    -0x8c(%rbp),%eax
  mov    %eax,-0x70(%rbp)
  jmp    L112
L164:
  mov    -0x74(%rbp),%eax
  sub    -0x8c(%rbp),%eax
  mov    %eax,-0x6c(%rbp)
  jmp    L33
L29:
  mov    -0x70(%rbp),%eax
  imul   -0x90(%rbp),%eax
  mov    %eax,%edx
  mov    -0x6c(%rbp),%eax
  add    %edx,%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x88(%rbp),%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm0
  movsd  -0x68(%rbp),%xmm1
  addsd  %xmm1,%xmm0
  movsd  %xmm0,-0x68(%rbp)
  mov    -0x70(%rbp),%eax
  imul   -0x90(%rbp),%eax
  mov    %eax,%edx
  mov    -0x6c(%rbp),%eax
  add    %edx,%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x88(%rbp),%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm1
  mov    -0x70(%rbp),%eax
  imul   -0x90(%rbp),%eax
  mov    %eax,%edx
  mov    -0x6c(%rbp),%eax
  add    %edx,%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x88(%rbp),%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm0
  mulsd  %xmm1,%xmm0
  movsd  -0x60(%rbp),%xmm1
  addsd  %xmm1,%xmm0
  movsd  %xmm0,-0x60(%rbp)
  addl   $0x1,-0x6c(%rbp)
L33:
  mov    -0x74(%rbp),%edx
  mov    -0x8c(%rbp),%eax
  add    %edx,%eax
  cmp    %eax,-0x6c(%rbp)
  jle    L29
  addl   $0x1,-0x70(%rbp)
L112:
  mov    -0x78(%rbp),%edx
  mov    -0x8c(%rbp),%eax
  add    %edx,%eax
  cmp    %eax,-0x70(%rbp)
  jle    L164
  mov    -0x8c(%rbp),%eax
  add    %eax,%eax
  lea    0x1(%rax),%edx
  mov    -0x8c(%rbp),%eax
  add    %eax,%eax
  add    $0x1,%eax
  imul   %edx,%eax
  pxor   %xmm0,%xmm0
  cvtsi2sd %eax,%xmm0
  movsd  %xmm0,-0x18(%rbp)
  movsd  -0x68(%rbp),%xmm0
  divsd  -0x18(%rbp),%xmm0
  movsd  %xmm0,-0x10(%rbp)
  movsd  -0x68(%rbp),%xmm0
  movapd %xmm0,%xmm1
  mulsd  -0x10(%rbp),%xmm1
  movsd  -0x60(%rbp),%xmm0
  subsd  %xmm1,%xmm0
  divsd  -0x18(%rbp),%xmm0
  movq   %xmm0,%rax
  movq   %rax,%xmm0
  call   <sqrt@plt>
  movq   %xmm0,%rax
  mov    %rax,-0x8(%rbp)
  movsd  -0x30(%rbp),%xmm0
  movq   D19(%rip),%xmm1
  xorpd  %xmm1,%xmm0
  mulsd  -0x10(%rbp),%xmm0
  movq   %xmm0,%rax
  movq   %rax,%xmm0
  call   <exp@plt>
  movq   %xmm0,%rax
  movq   %rax,%xmm1
  mulsd  -0x38(%rbp),%xmm1
  movsd  D30(%rip),%xmm0
  addsd  %xmm0,%xmm1
  movsd  -0x8(%rbp),%xmm0
  divsd  -0x40(%rbp),%xmm0
  movsd  D30(%rip),%xmm2
  subsd  %xmm2,%xmm0
  mulsd  -0x48(%rbp),%xmm0
  addsd  %xmm1,%xmm0
  movsd  -0x10(%rbp),%xmm1
  mulsd  %xmm1,%xmm0
  movsd  %xmm0,-0x20(%rbp)
  movsd  -0x28(%rbp),%xmm0
  comisd -0x20(%rbp),%xmm0
  jbe    L84
  mov    -0x78(%rbp),%eax
  imul   -0x90(%rbp),%eax
  mov    %eax,%edx
  mov    -0x74(%rbp),%eax
  add    %edx,%eax
  movslq %eax,%rdx
  mov    -0x98(%rbp),%rax
  add    %rdx,%rax
  movb   $0x1,(%rax)
  jmp    L102
L84:
  mov    -0x78(%rbp),%eax
  imul   -0x90(%rbp),%eax
  mov    %eax,%edx
  mov    -0x74(%rbp),%eax
  add    %edx,%eax
  movslq %eax,%rdx
  mov    -0x98(%rbp),%rax
  add    %rdx,%rax
  movb   $0x0,(%rax)
L102:
  addl   $0x1,-0x74(%rbp)
L134:
  mov    -0x90(%rbp),%eax
  sub    -0x8c(%rbp),%eax
  cmp    %eax,-0x74(%rbp)
  jl     L78
  addl   $0x1,-0x78(%rbp)
L148:
  mov    -0x90(%rbp),%eax
  sub    -0x8c(%rbp),%eax
  cmp    %eax,-0x78(%rbp)
  jl     L73
  nop
  nop
  leave
  ret
```

tool_calls: name: extract_symbolic_data
arguments: data_label: D51
type_infered: f64
name: extract_symbolic_data
arguments: data_label: D43
type_infered: f64
name: extract_symbolic_data
arguments: data_label: D26
type_infered: f64
name: extract_symbolic_data
arguments: data_label: D44
type_infered: f64
name: extract_symbolic_data
arguments: data_label: D11
type_infered: f64
name: extract_symbolic_data
arguments: data_label: D40
type_infered: byte[8]
name: extract_symbolic_data
arguments: data_label: D19
type_infered: byte[8]
name: extract_symbolic_data
arguments: data_label: D30
type_infered: f64

tool: D51: 0.25

tool: D43: 0.5

tool: D26: 2

tool: D44: 10

tool: D11: 65537

tool: {"D40": [0x00,0x00,0x00,0x00,0x00,0x00,0xf0,0xbf]}

tool: {"D19": [0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80]}

tool: D30: 1

assistant: ```c
void c_phansalkar(double *frame, int wsize, int size, unsigned char *ret) {
  int i, j, m, n;
  double mean, sdv;
  double k = 0.25, r = 0.5, p = 2, q = 10;
  double pixel, th, sum, sum2, num;
  double Max = 65537, Min = -1;
  memset(ret, 0, sizeof(ret));
  for (i = 0; i < size; i++)
    for (j = 0; j < size; j++) {
      Min = min(Min, frame[i * size + j]);
      Max = max(Max, frame[i * size + j]);
      ret[i * size + j] = 0;
    }
  for (i = 0; i < size; i++)
    for (j = 0; j < size; j++)
      frame[i * size + j] = (frame[i * size + j] - Min) / (Max - Min);
  for (i = wsize; i < size - wsize; i++)
    for (j = wsize; j < size - wsize; j++) {
      pixel = frame[i * size + j];
      th = 0;
      sum = 0;
      sum2 = 0;
      for (m = i - wsize; m <= i + wsize; m++)
        for (n = j - wsize; n <= j + wsize; n++) {
          sum += frame[m * size + n];
          sum2 += frame[m * size + n] * frame[m * size + n];
        }
      num = (2 * wsize + 1) * (2 * wsize + 1);
      mean = sum / num;
      sdv = sqrt((sum2 - sum * mean) / num);
      th = mean * (1 + p * exp(-q * mean) + k * (sdv / r - 1));
      if (pixel > th)
        ret[i * size + j] = 1;
      else
        ret[i * size + j] = 0;
    }
}
```