user: Converte this assembly snippet into its equivalent C code:

```asm
<amotry>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x70,%rsp
  mov    %rdi,-0x48(%rbp)
  mov    %rsi,-0x50(%rbp)
  mov    %rdx,-0x58(%rbp)
  mov    %rcx,-0x60(%rbp)
  mov    %r8d,-0x64(%rbp)
  movsd  %xmm0,-0x70(%rbp)
  mov    %fs:0x28,%rax
  mov    %rax,-0x8(%rbp)
  xor    %eax,%eax
  movsd  D15(%rip),%xmm0
  movapd %xmm0,%xmm1
  subsd  -0x70(%rbp),%xmm1
  movsd  D11(%rip),%xmm0
  mulsd  %xmm1,%xmm0
  movsd  %xmm0,-0x38(%rbp)
  movsd  -0x38(%rbp),%xmm0
  subsd  -0x70(%rbp),%xmm0
  movsd  %xmm0,-0x30(%rbp)
  mov    -0x58(%rbp),%rax
  movsd  (%rax),%xmm0
  mulsd  -0x38(%rbp),%xmm0
  mov    -0x64(%rbp),%eax
  cltq
  shl    $0x4,%rax
  mov    %rax,%rdx
  mov    -0x48(%rbp),%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm1
  mulsd  -0x30(%rbp),%xmm1
  subsd  %xmm1,%xmm0
  movsd  %xmm0,-0x20(%rbp)
  mov    -0x58(%rbp),%rax
  add    $0x8,%rax
  movsd  (%rax),%xmm0
  mulsd  -0x38(%rbp),%xmm0
  mov    -0x64(%rbp),%eax
  cltq
  shl    $0x4,%rax
  mov    %rax,%rdx
  mov    -0x48(%rbp),%rax
  add    %rdx,%rax
  movsd  0x8(%rax),%xmm1
  mulsd  -0x30(%rbp),%xmm1
  subsd  %xmm1,%xmm0
  movsd  %xmm0,-0x18(%rbp)
  lea    -0x20(%rbp),%rax
  mov    -0x60(%rbp),%rdx
  mov    %rax,%rdi
  call   *%rdx
  movq   %xmm0,%rax
  mov    %rax,-0x28(%rbp)
  mov    -0x64(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x50(%rbp),%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm0
  comisd -0x28(%rbp),%xmm0
  jbe    L14
  mov    -0x64(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x50(%rbp),%rax
  add    %rdx,%rax
  movsd  -0x28(%rbp),%xmm0
  movsd  %xmm0,(%rax)
  mov    -0x58(%rbp),%rax
  movsd  (%rax),%xmm1
  movsd  -0x20(%rbp),%xmm0
  mov    -0x64(%rbp),%eax
  cltq
  shl    $0x4,%rax
  mov    %rax,%rdx
  mov    -0x48(%rbp),%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm2
  subsd  %xmm2,%xmm0
  addsd  %xmm1,%xmm0
  mov    -0x58(%rbp),%rax
  movsd  %xmm0,(%rax)
  mov    -0x64(%rbp),%eax
  cltq
  shl    $0x4,%rax
  mov    %rax,%rdx
  mov    -0x48(%rbp),%rax
  add    %rdx,%rax
  movsd  -0x20(%rbp),%xmm0
  movsd  %xmm0,(%rax)
  mov    -0x58(%rbp),%rax
  add    $0x8,%rax
  movsd  (%rax),%xmm1
  movsd  -0x18(%rbp),%xmm0
  mov    -0x64(%rbp),%eax
  cltq
  shl    $0x4,%rax
  mov    %rax,%rdx
  mov    -0x48(%rbp),%rax
  add    %rdx,%rax
  movsd  0x8(%rax),%xmm2
  subsd  %xmm2,%xmm0
  mov    -0x58(%rbp),%rax
  add    $0x8,%rax
  addsd  %xmm1,%xmm0
  movsd  %xmm0,(%rax)
  mov    -0x64(%rbp),%eax
  cltq
  shl    $0x4,%rax
  mov    %rax,%rdx
  mov    -0x48(%rbp),%rax
  add    %rdx,%rax
  movsd  -0x18(%rbp),%xmm0
  movsd  %xmm0,0x8(%rax)
L14:
  movsd  -0x28(%rbp),%xmm0
  movq   %xmm0,%rax
  mov    -0x8(%rbp),%rdx
  sub    %fs:0x28,%rdx
  je     L15
  call   <__stack_chk_fail@plt>
L15:
  movq   %rax,%xmm0
  leave
  ret
```

tool_calls: name: retrieve_data
arguments: data_label: D15
datatype: f64
name: retrieve_data
arguments: data_label: D11
datatype: f64

tool: D15: 1

tool: D11: 0.5

assistant: ```c
double amotry(double p[3][2], double *y, double *psum, double (*funk)(double[]), int ihi, double fac) {
  double fac1, fac2, ytry, ptry[2];
  fac1 = 0.5 * (1.0 - fac);
  fac2 = fac1 - fac;
  ptry[0] = psum[0] * fac1 - p[ihi][0] * fac2;
  ptry[1] = psum[1] * fac1 - p[ihi][1] * fac2;
  ytry = (*funk)(ptry);
  if (ytry < y[ihi]) {
    y[ihi] = ytry;
    psum[0] += ptry[0] - p[ihi][0];
    p[ihi][0] = ptry[0];
    psum[1] += ptry[1] - p[ihi][1];
    p[ihi][1] = ptry[1];
  }
  return ytry;
}
```