user: 下面的汇编指令对应的C源代码是什么：

```asm
<Search>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x38,%rsp
  mov    %edi,0x24(%rsp)
  mov    %rsi,0x28(%rsp)
  mov    %edx,%ebx
  mov    %rcx,%r13
  shl    $0x3,%edi
  call   <malloc@plt>
  mov    %rax,%r15
  movsd  0x0(%r13),%xmm0
  comisd D6(%rip),%xmm0
  jbe    L90
  comisd 0x8(%r13),%xmm0
  ja     L130
L90:
  pxor   %xmm1,%xmm1
  mov    $0x0,%r14d
  comisd %xmm0,%xmm1
  jbe    L72
  movsd  0x8(%r13),%xmm1
  mov    $0x0,%r14d
  comisd %xmm0,%xmm1
  jbe    L72
L130:
  movl   $0x0,(%r15)
  mov    $0x1,%r14d
L72:
  lea    -0x1(%rbx),%edi
  cmp    $0x1,%edi
  jle    L43
  lea    -0x3(%rbx),%edx
  add    $0x2,%rdx
  mov    $0x1,%eax
  pxor   %xmm3,%xmm3
  movapd %xmm3,%xmm2
  jmp    L246
L202:
  movslq %r14d,%rsi
  mov    %ecx,(%r15,%rsi,4)
  lea    0x1(%r14),%r14d
L270:
  add    $0x1,%rax
  cmp    %rdx,%rax
  je     L43
L246:
  mov    %eax,%ecx
  movsd  0x0(%r13,%rax,8),%xmm0
  movsd  -0x8(%r13,%rax,8),%xmm1
  comisd %xmm1,%xmm0
  jb     L226
  comisd 0x8(%r13,%rax,8),%xmm0
  jbe    L226
  comisd %xmm2,%xmm0
  ja     L202
L226:
  comisd %xmm0,%xmm1
  jb     L270
  movsd  0x8(%r13,%rax,8),%xmm1
  comisd %xmm0,%xmm1
  jbe    L270
  comisd %xmm0,%xmm3
  jbe    L270
  jmp    L202
L43:
  movslq %edi,%rax
  lea    0x0(,%rax,8),%rdx
  movsd  0x0(%r13,%rax,8),%xmm0
  comisd D6(%rip),%xmm0
  jbe    L238
  comisd -0x8(%r13,%rdx,1),%xmm0
  ja     L53
L238:
  pxor   %xmm1,%xmm1
  comisd %xmm0,%xmm1
  jbe    L117
  movsd  -0x8(%r13,%rdx,1),%xmm1
  comisd %xmm0,%xmm1
  jbe    L117
L53:
  movslq %r14d,%rax
  mov    %edi,(%r15,%rax,4)
  lea    0x1(%r14),%r14d
L117:
  mov    0x24(%rsp),%eax
  add    $0x1,%eax
  mov    %r14d,%esi
  sub    %eax,%esi
  mov    %esi,0x20(%rsp)
  test   %esi,%esi
  jle    L38
  movslq %r14d,%rax
  lea    -0x4(%r15,%rax,4),%rax
  mov    %rax,0x18(%rsp)
  jmp    L301
L152:
  movslq 0x0(%rbp),%rax
  movsd  0x0(%r13,%rax,8),%xmm0
  comisd D6(%rip),%xmm0
  jbe    L252
  movl   $0x1,0xc(%rsp)
L158:
  add    $0x1,%r12d
  add    $0x4,%rbp
  cmp    %r14d,%r12d
  je     L324
L76:
  movslq 0x0(%rbp),%rax
  movsd  0x0(%r13,%rax,8),%xmm0
  call   <fabs@plt>
  mov    %rax,0x10(%rsp)
  movslq %ebx,%rax
  movslq (%r15,%rax,4),%rax
  movsd  0x0(%r13,%rax,8),%xmm0
  call   <fabs@plt>
  cmp    %rax,0x10(%rsp)
  cmovl  %r12d,%ebx
  cmpl   $0x0,0xc(%rsp)
  je     L152
  movslq 0x0(%rbp),%rax
  pxor   %xmm4,%xmm4
  comisd 0x0(%r13,%rax,8),%xmm4
  ja     L74
L252:
  cmp    %r14d,%ebx
  jge    L192
L24:
  movslq %ebx,%rax
  lea    (%r15,%rax,4),%rax
L240:
  mov    %rax,%rdx
  add    $0x4,%rax
  mov    (%rax),%ecx
  mov    %ecx,(%rdx)
  add    $0x1,%ebx
  cmp    %r14d,%ebx
  jl     L240
L192:
  sub    $0x1,%r14d
  subq   $0x4,0x18(%rsp)
  subl   $0x1,0x20(%rsp)
  je     L38
L301:
  movslq (%r15),%rax
  movsd  0x0(%r13,%rax,8),%xmm0
  pxor   %xmm5,%xmm5
  comisd %xmm5,%xmm0
  seta   %al
  movzbl %al,%eax
  mov    %eax,0xc(%rsp)
  cmp    $0x1,%r14d
  jle    L221
  lea    0x4(%r15),%rbp
  mov    $0x0,%ebx
  mov    $0x1,%r12d
  jmp    L76
L74:
  movl   $0x0,0xc(%rsp)
  jmp    L158
L221:
  mov    $0x0,%ebx
L324:
  cmpl   $0x1,0x20(%rsp)
  jne    L252
  mov    0x18(%rsp),%rax
  mov    %rax,%rbp
  movslq (%rax),%rax
  movsd  0x0(%r13,%rax,8),%xmm0
  call   <fabs@plt>
  mov    %rax,%rbx
  movslq (%r15),%rax
  movsd  0x0(%r13,%rax,8),%xmm0
  call   <fabs@plt>
  cmp    %rax,%rbx
  cmovge %r15,%rbp
  mov    0x0(%rbp),%ebx
  cmp    %r14d,%ebx
  jl     L24
L38:
  mov    0x24(%rsp),%eax
  test   %eax,%eax
  js     L22
  lea    0x1(%rax),%eax
  lea    (%r15,%rax,4),%rsi
  mov    %r15,%rax
  mov    0x28(%rsp),%rcx
  sub    %r15,%rcx
L131:
  mov    (%rax),%edx
  mov    %edx,(%rcx,%rax,1)
  add    $0x4,%rax
  cmp    %rsi,%rax
  jne    L131
L22:
  mov    %r15,%rdi
  call   <free@plt>
  add    $0x38,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
```

tool_calls: name: unpack_data
arguments: data_label: D6
type: f64

tool: D6: 0

assistant: ```c
void Search(int r, int Ext[], int gridsize, double E[]) {
  int i, j, k, l, extra;
  int up, alt;
  int *foundExt;
  foundExt = (int *)malloc((2 * r) * sizeof(int));
  k = 0;
  if (((E[0] > 0.0) && (E[0] > E[1])) || ((E[0] < 0.0) && (E[0] < E[1])))
    foundExt[k++] = 0;
  for (i = 1; i < gridsize - 1; i++) {
    if (((E[i] >= E[i - 1]) && (E[i] > E[i + 1]) && (E[i] > 0.0)) || ((E[i] <= E[i - 1]) && (E[i] < E[i + 1]) && (E[i] < 0.0)))
      foundExt[k++] = i;
  }
  j = gridsize - 1;
  if (((E[j] > 0.0) && (E[j] > E[j - 1])) || ((E[j] < 0.0) && (E[j] < E[j - 1])))
    foundExt[k++] = j;
  extra = k - (r + 1);
  while (extra > 0) {
    if (E[foundExt[0]] > 0.0)
      up = 1;
    else
      up = 0;
    l = 0;
    alt = 1;
    for (j = 1; j < k; j++) {
      if (fabs(E[foundExt[j]]) < fabs(E[foundExt[l]]))
        l = j;
      if ((up) && (E[foundExt[j]] < 0.0))
        up = 0;
      else if ((!up) && (E[foundExt[j]] > 0.0))
        up = 1;
      else {
        alt = 0;
        break;
      }
    }
    if ((alt) && (extra == 1)) {
      if (fabs(E[foundExt[k - 1]]) < fabs(E[foundExt[0]]))
        l = foundExt[k - 1];
      else
        l = foundExt[0];
    }
    for (j = l; j < k; j++) {
      foundExt[j] = foundExt[j + 1];
    }
    k--;
    extra--;
  }
  for (i = 0; i <= r; i++) {
    Ext[i] = foundExt[i];
  }
  free(foundExt);
}
```