user: What would the C source look like for the assembly code provided here:

```asm
<RAMP>:
  endbr64
  push   %r14
  pxor   %xmm4,%xmm4
  push   %r13
  push   %r12
  mov    %rdx,%r12
  push   %rbp
  mov    %rsi,%rbp
  push   %rbx
  sub    $0x20,%rsp
  mov    (%rsi),%rcx
  test   %rcx,%rcx
  je     L182
  movsd  -0x8(%rdi,%rcx,8),%xmm4
L182:
  ucomisd %xmm0,%xmm4
  jp     L161
  je     L199
L161:
  pxor   %xmm3,%xmm3
  ucomisd D20(%rip),%xmm1
  subsd  %xmm4,%xmm0
  cvtsi2sd %r12,%xmm3
  movapd %xmm0,%xmm2
  divsd  %xmm3,%xmm2
  jp     L196
  jne    L196
  test   %r12,%r12
  jle    L168
  movq   D28(%rip),%xmm0
  lea    (%rdi,%rcx,8),%rsi
  xor    %eax,%eax
  nopl   0x0(%rax,%rax,1)
L7:
  pxor   %xmm1,%xmm1
  mov    %rax,%rdx
  cvtsi2sd %rax,%xmm1
  mulsd  %xmm2,%xmm1
  addsd  %xmm4,%xmm1
  andpd  %xmm0,%xmm1
  movsd  %xmm1,(%rsi,%rax,8)
  add    $0x1,%rax
  cmp    %rax,%r12
  jne    L7
  lea    (%r12,%rcx,1),%rax
  add    %rcx,%rdx
  mov    %rax,0x0(%rbp)
  movsd  %xmm1,(%rdi,%rdx,8)
L168:
  add    $0x20,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  ret
  nopl   0x0(%rax,%rax,1)
L196:
  pxor   %xmm3,%xmm3
  ucomisd %xmm3,%xmm1
  jp     L153
  jne    L153
  test   %r12,%r12
  jle    L168
  lea    (%rdi,%rcx,8),%rsi
  xor    %edx,%edx
  jmp    L46
  nopl   0x0(%rax)
L189:
  mov    %rax,%rdx
L46:
  pxor   %xmm0,%xmm0
  lea    0x1(%rdx),%rax
  cvtsi2sd %rdx,%xmm0
  mulsd  %xmm2,%xmm0
  addsd  %xmm4,%xmm0
  maxsd  %xmm3,%xmm0
  movsd  %xmm0,(%rsi,%rdx,8)
  cmp    %rax,%r12
  jne    L189
L160:
  lea    (%r12,%rcx,1),%rax
  add    %rcx,%rdx
  mov    %rax,0x0(%rbp)
  movsd  %xmm0,(%rdi,%rdx,8)
  add    $0x20,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  ret
  nopl   0x0(%rax,%rax,1)
L199:
  add    $0x20,%rsp
  mov    %r12,%rdx
  movapd %xmm4,%xmm0
  mov    %rbp,%rsi
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  jmp    1060 <DC@plt>
  nopl   0x0(%rax,%rax,1)
L153:
  ucomisd D1(%rip),%xmm1
  jp     L56
  jne    L56
  lea    (%rdi,%rcx,8),%rsi
  xor    %eax,%eax
  test   %r12,%r12
  jle    L168
  nopl   0x0(%rax,%rax,1)
L49:
  pxor   %xmm0,%xmm0
  mov    %rax,%rdx
  cvtsi2sd %rax,%xmm0
  mulsd  %xmm2,%xmm0
  addsd  %xmm4,%xmm0
  movsd  %xmm0,(%rsi,%rax,8)
  add    $0x1,%rax
  cmp    %rax,%r12
  jne    L49
  jmp    L160
  nopw   0x0(%rax,%rax,1)
L56:
  test   %r12,%r12
  jle    L168
  lea    (%rdi,%rcx,8),%r13
  xor    %ebx,%ebx
  lea    0x1(%rcx),%r14
  nopl   0x0(%rax,%rax,1)
L197:
  pxor   %xmm0,%xmm0
  lea    (%r14,%rbx,1),%rax
  movsd  %xmm2,0x18(%rsp)
  cvtsi2sd %rbx,%xmm0
  mov    %rax,0x0(%rbp)
  movsd  %xmm4,0x10(%rsp)
  movsd  %xmm1,0x8(%rsp)
  mulsd  %xmm2,%xmm0
  addsd  %xmm4,%xmm0
  call   <pow@plt>
  movsd  0x8(%rsp),%xmm1
  movsd  0x10(%rsp),%xmm4
  movsd  %xmm0,0x0(%r13,%rbx,8)
  add    $0x1,%rbx
  movsd  0x18(%rsp),%xmm2
  cmp    %rbx,%r12
  jne    L197
  jmp    L168
```

tool_calls: name: retrieve_data
arguments: label: D20
datatype: f32[2]
name: retrieve_data
arguments: label: D28
datatype: qword
name: retrieve_data
arguments: label: D1
datatype: f32[2]

tool: {"D20": [0.0,-1.875]}

tool: D28: 9223372036854775807

tool: {"D1": [0.0,1.875]}

assistant: ```c
void RAMP(double y_final, double *output, uint *index, uint Ni, double expon, double srate, double dt) {
  uint i;
  double tmp1, tmp2;
  tmp1 = ((*index) == 0) ? 0. : output[(*index) - 1];
  if (y_final == tmp1) {
    DC(tmp1, output, index, Ni, expon, srate, dt);
    return;
  }
  tmp2 = (y_final - tmp1) / Ni;
  if (expon == -1)
    for (i = 0; i < Ni; i++)
      output[(*index)++] = fabs(tmp1 + tmp2 * i);
  else if (expon == 0)
    for (i = 0; i < Ni; i++)
      output[(*index)++] = (((tmp1 + tmp2 * i) > 0) ? tmp1 + tmp2 * i : 0.);
  else if (expon != 1)
    for (i = 0; i < Ni; i++)
      output[(*index)++] = pow(tmp1 + tmp2 * i, expon);
  else
    for (i = 0; i < Ni; i++)
      output[(*index)++] = tmp1 + tmp2 * i;
  return;
}
```