user: Translate the below assembly code into C programming language:

```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     L177
  movsd  -0x8(%rdi,%rcx,8),%xmm4
L177:
  ucomisd %xmm0,%xmm4
  jp     L17
  je     L115
L17:
  pxor   %xmm3,%xmm3
  ucomisd D12(%rip),%xmm1
  subsd  %xmm4,%xmm0
  cvtsi2sd %r12,%xmm3
  movapd %xmm0,%xmm2
  divsd  %xmm3,%xmm2
  jp     L101
  jne    L101
  test   %r12,%r12
  jle    L195
  movq   D8(%rip),%xmm0
  lea    (%rdi,%rcx,8),%rsi
  xor    %eax,%eax
  nopl   0x0(%rax,%rax,1)
L146:
  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    L146
  lea    (%r12,%rcx,1),%rax
  add    %rcx,%rdx
  mov    %rax,0x0(%rbp)
  movsd  %xmm1,(%rdi,%rdx,8)
L195:
  add    $0x20,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  ret
  nopl   0x0(%rax,%rax,1)
L101:
  pxor   %xmm3,%xmm3
  ucomisd %xmm3,%xmm1
  jp     L172
  jne    L172
  test   %r12,%r12
  jle    L195
  lea    (%rdi,%rcx,8),%rsi
  xor    %edx,%edx
  jmp    L70
  nopl   0x0(%rax)
L166:
  mov    %rax,%rdx
L70:
  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    L166
L104:
  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)
L115:
  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)
L172:
  ucomisd D16(%rip),%xmm1
  jp     L152
  jne    L152
  lea    (%rdi,%rcx,8),%rsi
  xor    %eax,%eax
  test   %r12,%r12
  jle    L195
  nopl   0x0(%rax,%rax,1)
L141:
  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    L141
  jmp    L104
  nopw   0x0(%rax,%rax,1)
L152:
  test   %r12,%r12
  jle    L195
  lea    (%rdi,%rcx,8),%r13
  xor    %ebx,%ebx
  lea    0x1(%rcx),%r14
  nopl   0x0(%rax,%rax,1)
L103:
  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    L103
  jmp    L195
```

tool_calls: name: parse_data
arguments: data_label: D12
type_infered: f32[2]
name: parse_data
arguments: data_label: D8
type_infered: qword
name: parse_data
arguments: data_label: D16
type_infered: f32[2]

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

tool: D8: 9223372036854775807

tool: {"D16": [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;
}
```