user: 请将这段汇编代码片段转换成等效的C代码：

```asm
<golden>:
  endbr64
  movapd %xmm0,%xmm8
  movapd %xmm2,%xmm6
  movapd %xmm1,%xmm0
  push   %r15
  subsd  %xmm1,%xmm6
  push   %r14
  subsd  %xmm8,%xmm0
  mov    %r8d,%r14d
  push   %r13
  mov    %r9d,%r15d
  mov    %ecx,%r13d
  push   %r12
  mov    %edx,%r12d
  push   %rbp
  mov    %esi,%ebp
  push   %rbx
  mov    %edi,%ebx
  sub    $0x38,%rsp
  comisd %xmm0,%xmm6
  movsd  %xmm2,0x20(%rsp)
  movsd  D32(%rip),%xmm2
  movsd  %xmm3,0x28(%rsp)
  movsd  %xmm8,0x18(%rsp)
  movsd  %xmm2,0x8(%rsp)
  jbe    L33
  mulsd  %xmm2,%xmm6
  movsd  %xmm1,0x10(%rsp)
  sub    $0x8,%rsp
  mov    0x78(%rsp),%eax
  push   %rax
  addsd  %xmm1,%xmm6
  movapd %xmm6,%xmm0
  movsd  %xmm6,0x10(%rsp)
  call   <backvalue@plt>
  pop    %r9
  pop    %r10
  movsd  0x28(%rsp),%xmm3
  movsd  (%rsp),%xmm6
  movapd %xmm0,%xmm5
  movsd  0x10(%rsp),%xmm1
  movsd  0x18(%rsp),%xmm8
  movsd  0x20(%rsp),%xmm2
  movapd %xmm3,%xmm4
  movapd %xmm1,%xmm7
L5:
  movapd %xmm2,%xmm0
  subsd  %xmm8,%xmm0
  comisd D1(%rip),%xmm0
  jbe    L62
  xchg   %ax,%ax
L34:
  comisd %xmm4,%xmm5
  movsd  %xmm5,(%rsp)
  jbe    L83
L8:
  movsd  0x8(%rsp),%xmm1
  movsd  %xmm7,0x28(%rsp)
  mov    %ebp,%esi
  mov    %ebx,%edi
  movsd  %xmm2,0x20(%rsp)
  sub    $0x8,%rsp
  mov    %r13d,%ecx
  mov    %r15d,%r9d
  mulsd  %xmm2,%xmm1
  movsd  %xmm6,0x20(%rsp)
  mov    %r14d,%r8d
  mov    %r12d,%edx
  movsd  D52(%rip),%xmm0
  mov    0x78(%rsp),%eax
  mulsd  %xmm6,%xmm0
  push   %rax
  addsd  %xmm0,%xmm1
  movapd %xmm1,%xmm0
  movsd  %xmm1,0x20(%rsp)
  call   <backvalue@plt>
  pop    %rcx
  pop    %rsi
  movsd  0x20(%rsp),%xmm2
  movsd  0x28(%rsp),%xmm7
  movapd %xmm0,%xmm4
  movsd  0x10(%rsp),%xmm1
  movsd  0x18(%rsp),%xmm6
  movapd %xmm2,%xmm0
  movsd  (%rsp),%xmm5
  subsd  %xmm7,%xmm0
  comisd D1(%rip),%xmm0
  jbe    L63
  movq   %xmm5,%rax
  movapd %xmm4,%xmm5
  movapd %xmm7,%xmm8
  movq   %rax,%xmm4
  movapd %xmm6,%xmm7
  movsd  %xmm5,(%rsp)
  movapd %xmm1,%xmm6
  comisd %xmm4,%xmm5
  ja     L8
L83:
  movsd  %xmm4,0x28(%rsp)
  sub    $0x8,%rsp
  mov    %r12d,%edx
  mov    %r15d,%r9d
  movsd  0x10(%rsp),%xmm3
  movsd  %xmm6,0x28(%rsp)
  mov    %ebp,%esi
  mov    %ebx,%edi
  movsd  D52(%rip),%xmm0
  movsd  %xmm8,0x20(%rsp)
  mov    %r14d,%r8d
  mov    %r13d,%ecx
  mulsd  %xmm8,%xmm3
  movsd  %xmm7,0x18(%rsp)
  mov    0x78(%rsp),%eax
  mulsd  %xmm7,%xmm0
  push   %rax
  addsd  %xmm0,%xmm3
  movapd %xmm3,%xmm0
  movsd  %xmm3,0x10(%rsp)
  call   <backvalue@plt>
  pop    %rax
  pop    %rdx
  movsd  0x20(%rsp),%xmm6
  movsd  0x18(%rsp),%xmm8
  movapd %xmm0,%xmm5
  movsd  (%rsp),%xmm3
  movsd  0x10(%rsp),%xmm7
  movapd %xmm6,%xmm0
  movsd  0x28(%rsp),%xmm4
  subsd  %xmm8,%xmm0
  comisd D1(%rip),%xmm0
  jbe    L61
  movq   %xmm5,%rax
  movapd %xmm6,%xmm2
  movapd %xmm4,%xmm5
  movapd %xmm7,%xmm6
  movq   %rax,%xmm4
  movapd %xmm3,%xmm7
  jmp    L34
  nopl   0x0(%rax)
L33:
  mulsd  %xmm2,%xmm0
  movsd  %xmm1,0x10(%rsp)
  sub    $0x8,%rsp
  movapd %xmm1,%xmm7
  mov    0x78(%rsp),%eax
  push   %rax
  subsd  %xmm0,%xmm7
  movapd %xmm7,%xmm0
  movsd  %xmm7,0x10(%rsp)
  call   <backvalue@plt>
  pop    %rdi
  pop    %r8
  movsd  0x28(%rsp),%xmm3
  movsd  0x10(%rsp),%xmm1
  movapd %xmm0,%xmm4
  movsd  0x20(%rsp),%xmm2
  movsd  0x18(%rsp),%xmm8
  movsd  (%rsp),%xmm7
  movapd %xmm3,%xmm5
  movapd %xmm1,%xmm6
  jmp    L5
  nopl   0x0(%rax)
L63:
  movapd %xmm6,%xmm3
L101:
  comisd %xmm4,%xmm5
  jbe    L39
  movapd %xmm3,%xmm1
  movapd %xmm5,%xmm4
L39:
  mov    0x78(%rsp),%rax
  movsd  %xmm1,(%rax)
  mov    0x80(%rsp),%rax
  movsd  %xmm4,(%rax)
  add    $0x38,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
  cs nopw 0x0(%rax,%rax,1)
L61:
  movapd %xmm7,%xmm1
  jmp    L101
  cs nopw 0x0(%rax,%rax,1)
L62:
  movq   %xmm5,%rax
  movapd %xmm6,%xmm1
  movapd %xmm4,%xmm5
  movapd %xmm7,%xmm3
  movq   %rax,%xmm4
  jmp    L101
```

tool_calls: name: retrieve_data
arguments: data_tag: D32
data_type: f64
name: retrieve_data
arguments: data_tag: D1
data_type: byte[16]
name: retrieve_data
arguments: data_tag: D52
data_type: f64

tool: D32: 0.38196601

tool: {"D1": [0xfc,0xa9,0xf1,0xd2,0x4d,0x62,0x50,0x3f,0x7a,0xb9,0xdb,0x37,0xef,0xc6,0xe3,0x3f]}

tool: D52: 0.61803399

assistant: ```c
void golden(int t, int r, int f1, int f2, int e, int a, int actn, double ul, double um, double ur, double vm, double *umax, double *vmax) {
  double u0, u1, u2, u3;
  double v1, v2;
  u0 = ul;
  u3 = ur;
  if ((ur - um) > (um - ul)) {
    u1 = um;
    v1 = vm;
    u2 = um + 0.38196601 * (ur - um);
    v2 = backvalue(t, r, f1, f2, e, a, u2, actn);
  } else {
    u2 = um;
    v2 = vm;
    u1 = um - 0.38196601 * (um - ul);
    v1 = backvalue(t, r, f1, f2, e, a, u1, actn);
  }
  while ((u3 - u0) > 1.0e-3) {
    if (v2 > v1) {
      (u0) = (u1);
      (u1) = (u2);
      (u2) = (0.61803399 * u1 + 0.38196601 * u3);
      ;
      v1 = v2;
      v2 = backvalue(t, r, f1, f2, e, a, u2, actn);
    } else {
      (u3) = (u2);
      (u2) = (u1);
      (u1) = (0.61803399 * u2 + 0.38196601 * u0);
      ;
      v2 = v1;
      v1 = backvalue(t, r, f1, f2, e, a, u1, actn);
    }
  }
  if (v1 > v2) {
    *umax = u1;
    *vmax = v1;
  } else {
    *umax = u2;
    *vmax = v2;
  }
  return;
}
```