user: 请将以下的汇编代码转换成C语言代码:

```asm
<amoeba>:
  endbr64
  push   %r15
  push   %r14
  mov    %rdi,%r14
  push   %r13
  mov    %rsi,%r13
  push   %r12
  mov    %rdx,%r12
  push   %rbp
  push   %rbx
  sub    $0x68,%rsp
  movupd (%rdi),%xmm7
  movsd  %xmm0,0x30(%rsp)
  movupd 0x10(%rdi),%xmm0
  mov    %fs:0x28,%rax
  mov    %rax,0x58(%rsp)
  xor    %eax,%eax
  movl   $0x0,(%rcx)
  lea    0x8(%rsi),%rax
  addpd  %xmm7,%xmm0
  movupd 0x20(%rdi),%xmm7
  mov    %rax,0x38(%rsp)
  mov    %rcx,%rax
  addpd  %xmm7,%xmm0
  movaps %xmm0,0x40(%rsp)
  xchg   %ax,%ax
L97:
  movsd  0x0(%r13),%xmm2
  movsd  0x8(%r13),%xmm1
  mov    0x38(%rsp),%rdx
  comisd %xmm1,%xmm2
  mov    %rdx,%r9
  ja     L138
  movapd %xmm2,%xmm3
  movapd %xmm1,%xmm0
  xor    %esi,%esi
  xor    %ebp,%ebp
  mov    $0x1,%ebx
L79:
  comisd %xmm3,%xmm1
  jbe    L200
  movapd %xmm1,%xmm0
  cmp    $0x1,%ebx
  je     L124
  movapd %xmm2,%xmm0
  mov    %r13,%r9
  mov    $0x8,%esi
  mov    $0x1,%ebp
  nopl   0x0(%rax,%rax,1)
L124:
  comisd %xmm1,%xmm2
  movsd  0x10(%r13),%xmm3
  sbb    %rdx,%rdx
  not    %rdx
  and    $0x8,%edx
  movsd  0x0(%r13,%rdx,1),%xmm4
  comisd %xmm3,%xmm4
  jae    L107
  xor    %ecx,%ecx
  comisd %xmm1,%xmm2
  mov    %rdx,%r15
  setae  %dil
  setae  %cl
  movzbl %dil,%edi
  mov    %ecx,0x24(%rsp)
  mov    %rdi,0x28(%rsp)
L68:
  comisd %xmm0,%xmm3
  jbe    L69
  movslq %ebx,%rbp
  lea    0x10(%r13),%r9
  movapd %xmm3,%xmm0
  mov    $0x2,%ebx
L156:
  add    %r13,%r15
  movapd %xmm0,%xmm1
  andpd  D33(%rip),%xmm0
  movsd  0x30(%rsp),%xmm5
  movsd  (%r15),%xmm3
  subsd  %xmm3,%xmm1
  movapd %xmm3,%xmm4
  andpd  D33(%rip),%xmm1
  andpd  D33(%rip),%xmm4
  addsd  %xmm1,%xmm1
  addsd  %xmm4,%xmm0
  addsd  D22(%rip),%xmm0
  divsd  %xmm0,%xmm1
  comisd %xmm1,%xmm5
  ja     L16
  mov    (%rax),%edx
  mov    %r9,0x8(%rsp)
  cmp    $0x1387,%edx
  jg     L132
  add    $0x2,%edx
  mov    %rax,0x18(%rsp)
  mov    %ebx,%r8d
  mov    %r12,%rcx
  mov    %edx,(%rax)
  mov    D62(%rip),%rax
  mov    %r13,%rsi
  mov    %r14,%rdi
  lea    0x40(%rsp),%rdx
  movq   %rax,%xmm0
  mov    %rdx,0x10(%rsp)
  call   <amotry@plt>
  movsd  (%r15),%xmm1
  mov    0x10(%rsp),%rdx
  mov    0x18(%rsp),%rax
  mov    0x8(%rsp),%r9
  comisd %xmm0,%xmm1
  jae    L209
  comisd 0x0(%r13,%rbp,8),%xmm0
  jae    L182
  subl   $0x1,(%rax)
  jmp    L97
  cs nopw 0x0(%rax,%rax,1)
L138:
  comisd %xmm2,%xmm1
  jbe    L12
  movapd %xmm1,%xmm0
  xor    %esi,%esi
  xor    %ebp,%ebp
  mov    $0x1,%ebx
  jmp    L124
  nopl   0x0(%rax)
L69:
  ucomisd 0x0(%r13,%rsi,1),%xmm3
  mov    $0x2,%edx
  cmova  %rdx,%rbp
  jmp    L156
  nopl   (%rax)
L107:
  movq   $0x2,0x28(%rsp)
  mov    $0x10,%r15d
  movl   $0x2,0x24(%rsp)
  jmp    L68
  nopl   0x0(%rax)
L209:
  mov    %rax,0x8(%rsp)
  mov    %ebx,%r8d
  mov    %r12,%rcx
  mov    %r13,%rsi
  mov    D71(%rip),%rax
  mov    %r14,%rdi
  movq   %rax,%xmm0
  call   <amotry@plt>
  mov    0x8(%rsp),%rax
  jmp    L97
  nopl   0x0(%rax)
L200:
  mov    %rdx,%r9
  jmp    L124
L182:
  mov    %rax,0x18(%rsp)
  movsd  (%r9),%xmm6
  mov    %ebx,%r8d
  mov    %r12,%rcx
  mov    D48(%rip),%rax
  mov    %r13,%rsi
  mov    %r14,%rdi
  mov    %rdx,0x10(%rsp)
  movsd  %xmm6,0x8(%rsp)
  movq   %rax,%xmm0
  call   <amotry@plt>
  comisd 0x8(%rsp),%xmm0
  mov    0x10(%rsp),%rdx
  mov    0x18(%rsp),%rax
  jb     L97
  mov    0x28(%rsp),%rcx
  mov    %rax,0x10(%rsp)
  mov    %r14,%rdi
  xor    %ebp,%ebp
  mov    %r14,0x8(%rsp)
  shl    $0x4,%rcx
  lea    (%r14,%rcx,1),%r15
  mov    %rdx,%r14
  mov    %r15,%rbx
  mov    %rdi,%r15
L126:
  cmp    %ebp,0x24(%rsp)
  je     L65
  movsd  (%r15),%xmm0
  addsd  (%rbx),%xmm0
  mov    %r14,%rdi
  mulsd  D48(%rip),%xmm0
  movsd  %xmm0,0x40(%rsp)
  movsd  %xmm0,(%r15)
  movsd  0x8(%r15),%xmm0
  addsd  0x8(%rbx),%xmm0
  mulsd  D48(%rip),%xmm0
  movsd  %xmm0,0x48(%rsp)
  movsd  %xmm0,0x8(%r15)
  call   *%r12
  movsd  %xmm0,0x0(%r13,%rbp,8)
L65:
  add    $0x1,%rbp
  add    $0x10,%r15
  cmp    $0x3,%rbp
  jne    L126
  mov    0x8(%rsp),%r14
  mov    0x10(%rsp),%rax
  movupd (%r14),%xmm7
  movupd 0x10(%r14),%xmm0
  addl   $0x2,(%rax)
  addpd  %xmm7,%xmm0
  movupd 0x20(%r14),%xmm7
  addpd  %xmm7,%xmm0
  movaps %xmm0,0x40(%rsp)
  jmp    L97
  nopl   0x0(%rax)
L16:
  mov    0x28(%rsp),%rbp
  movsd  %xmm3,0x0(%r13)
  movsd  %xmm2,(%r15)
  movsd  (%r14),%xmm0
  shl    $0x4,%rbp
  lea    (%r14,%rbp,1),%rax
  movsd  (%rax),%xmm1
  movsd  %xmm1,(%r14)
  movsd  0x8(%rax),%xmm1
  movsd  %xmm0,(%rax)
  movsd  0x8(%r14),%xmm0
  movsd  %xmm1,0x8(%r14)
  movsd  %xmm0,0x8(%rax)
L132:
  mov    0x58(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L72
  add    $0x68,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
  nop
L12:
  movapd %xmm1,%xmm3
  movapd %xmm2,%xmm0
  mov    %r13,%rdx
  mov    $0x8,%esi
  mov    $0x1,%ebp
  xor    %ebx,%ebx
  jmp    L79
L72:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: parse_data
arguments: tag: D33
datatype: qword[2]
name: parse_data
arguments: tag: D22
datatype: byte[8]
name: parse_data
arguments: tag: D62
datatype: byte[8]
name: parse_data
arguments: tag: D71
datatype: f64
name: parse_data
arguments: tag: D48
datatype: f64

tool: {"D33": [0x7fffffffffffffff,0x0000000000000000]}

tool: {"D22": [0x16,0x56,0xe7,0x9e,0xaf,0x03,0xd2,0x3c]}

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

tool: D71: 2

tool: D48: 0.5

assistant: ```c
void amoeba(double p[3][2], double *y, double ftol, double (*funk)(double[]), int *nfunk) {
  int ii, ihi, ilo, inhi;
  double rtol, ysave, ytry, psum[2], tempzz;
  *nfunk = 0;
  psum[0] = p[0][0] + p[1][0] + p[2][0];
  psum[1] = p[0][1] + p[1][1] + p[2][1];
  for (;;) {
    ilo = 0;
    ihi = y[0] > y[1] ? (inhi = 1, 0) : (inhi = 0, 1);
    for (ii = 0; ii <= 2; ii++) {
      if (y[ii] <= y[ilo])
        ilo = ii;
      if (y[ii] > y[ihi]) {
        inhi = ihi;
        ihi = ii;
      } else if (y[ii] > y[inhi] && ii != ihi)
        inhi = ii;
    }
    rtol = 2.0 * fabs(y[ihi] - y[ilo]) / (fabs(y[ihi]) + fabs(y[ilo]) + 1.0e-15);
    if (rtol < ftol) {
      tempzz = (y[0]);
      (y[0]) = (y[ilo]);
      (y[ilo]) = tempzz;
      tempzz = (p[0][0]);
      (p[0][0]) = (p[ilo][0]);
      (p[ilo][0]) = tempzz;
      tempzz = (p[0][1]);
      (p[0][1]) = (p[ilo][1]);
      (p[ilo][1]) = tempzz;
      break;
    }
    if (*nfunk >= 5000) {
      return;
    }
    *nfunk += 2;
    ytry = amotry(p, y, psum, funk, ihi, -1.0);
    if (ytry <= y[ilo])
      ytry = amotry(p, y, psum, funk, ihi, 2.0);
    else if (ytry >= y[inhi]) {
      ysave = y[ihi];
      ytry = amotry(p, y, psum, funk, ihi, 0.5);
      if (ytry >= ysave) {
        for (ii = 0; ii <= 2; ii++) {
          if (ii != ilo) {
            p[ii][0] = psum[0] = 0.5 * (p[ii][0] + p[ilo][0]);
            p[ii][1] = psum[1] = 0.5 * (p[ii][1] + p[ilo][1]);
            y[ii] = (*funk)(psum);
          }
        }
        *nfunk += 2;
        psum[0] = p[0][0] + p[1][0] + p[2][0];
        psum[1] = p[0][1] + p[1][1] + p[2][1];
      }
    } else
      --(*nfunk);
  }
}
```