user: 这段汇编代码用C语言表示是什么样的？

```asm
<rgb_ramp_lookup>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x40,%rsp
  mov    %rdi,-0x28(%rbp)
  movss  %xmm0,-0x2c(%rbp)
  mov    %esi,-0x30(%rbp)
  mov    %edx,-0x34(%rbp)
  movss  -0x2c(%rbp),%xmm0
  movss  %xmm0,-0x1c(%rbp)
  mov    -0x28(%rbp),%rax
  mov    %rax,%rdi
  call   <arraylength@plt>
  mov    %eax,-0x8(%rbp)
  pxor   %xmm0,%xmm0
  comiss -0x1c(%rbp),%xmm0
  ja     L72
  movss  -0x1c(%rbp),%xmm0
  movss  D26(%rip),%xmm1
  comiss %xmm1,%xmm0
  jbe    L17
L72:
  cmpl   $0x0,-0x34(%rbp)
  je     L17
  pxor   %xmm0,%xmm0
  comiss -0x1c(%rbp),%xmm0
  jbe    L81
  mov    -0x28(%rbp),%rax
  movss  (%rax),%xmm0
  movss  %xmm0,-0x18(%rbp)
  mov    -0x28(%rbp),%rax
  add    $0x4,%rax
  movss  (%rax),%xmm1
  movss  -0x18(%rbp),%xmm0
  subss  %xmm1,%xmm0
  movss  %xmm0,-0x14(%rbp)
  movss  -0x1c(%rbp),%xmm0
  movss  D8(%rip),%xmm1
  xorps  %xmm1,%xmm0
  movss  %xmm0,-0x1c(%rbp)
  jmp    L77
L81:
  mov    -0x8(%rbp),%eax
  cltq
  shl    $0x2,%rax
  lea    -0x4(%rax),%rdx
  mov    -0x28(%rbp),%rax
  add    %rdx,%rax
  movss  (%rax),%xmm0
  movss  %xmm0,-0x18(%rbp)
  mov    -0x8(%rbp),%eax
  cltq
  shl    $0x2,%rax
  lea    -0x8(%rax),%rdx
  mov    -0x28(%rbp),%rax
  add    %rdx,%rax
  movss  (%rax),%xmm1
  movss  -0x18(%rbp),%xmm0
  subss  %xmm1,%xmm0
  movss  %xmm0,-0x14(%rbp)
  movss  -0x1c(%rbp),%xmm0
  movss  D26(%rip),%xmm1
  subss  %xmm1,%xmm0
  movss  %xmm0,-0x1c(%rbp)
L77:
  movss  -0x14(%rbp),%xmm0
  movaps %xmm0,%xmm1
  mulss  -0x1c(%rbp),%xmm1
  mov    -0x8(%rbp),%eax
  sub    $0x1,%eax
  pxor   %xmm0,%xmm0
  cvtsi2ss %eax,%xmm0
  mulss  %xmm1,%xmm0
  addss  -0x18(%rbp),%xmm0
  jmp    L47
L17:
  movsd  D2(%rip),%xmm0
  mov    -0x2c(%rbp),%eax
  movapd %xmm0,%xmm2
  pxor   %xmm1,%xmm1
  movd   %eax,%xmm0
  call   <clamp@plt>
  mov    -0x8(%rbp),%edx
  sub    $0x1,%edx
  imul   %edx,%eax
  pxor   %xmm0,%xmm0
  cvtsi2ss %eax,%xmm0
  movss  %xmm0,-0x1c(%rbp)
  movss  -0x1c(%rbp),%xmm0
  cvttss2si %xmm0,%eax
  mov    %eax,-0x10(%rbp)
  cmpl   $0x0,-0x10(%rbp)
  jns    L62
  movl   $0x0,-0x10(%rbp)
L62:
  mov    -0x10(%rbp),%eax
  cmp    -0x8(%rbp),%eax
  jl     L36
  mov    -0x8(%rbp),%eax
  sub    $0x1,%eax
  mov    %eax,-0x10(%rbp)
L36:
  pxor   %xmm1,%xmm1
  cvtsi2ssl -0x10(%rbp),%xmm1
  movss  -0x1c(%rbp),%xmm0
  subss  %xmm1,%xmm0
  movss  %xmm0,-0x4(%rbp)
  mov    -0x10(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x28(%rbp),%rax
  add    %rdx,%rax
  movss  (%rax),%xmm0
  movss  %xmm0,-0xc(%rbp)
  cmpl   $0x0,-0x30(%rbp)
  je     L65
  movss  -0x4(%rbp),%xmm0
  pxor   %xmm1,%xmm1
  comiss %xmm1,%xmm0
  jbe    L65
  pxor   %xmm2,%xmm2
  cvtss2sd -0x4(%rbp),%xmm2
  movsd  D2(%rip),%xmm0
  movapd %xmm0,%xmm1
  subsd  %xmm2,%xmm1
  pxor   %xmm0,%xmm0
  cvtss2sd -0xc(%rbp),%xmm0
  mulsd  %xmm0,%xmm1
  mov    -0x10(%rbp),%eax
  cltq
  add    $0x1,%rax
  lea    0x0(,%rax,4),%rdx
  mov    -0x28(%rbp),%rax
  add    %rdx,%rax
  movss  (%rax),%xmm0
  mulss  -0x4(%rbp),%xmm0
  cvtss2sd %xmm0,%xmm0
  addsd  %xmm1,%xmm0
  cvtsd2ss %xmm0,%xmm0
  movss  %xmm0,-0xc(%rbp)
L65:
  movss  -0xc(%rbp),%xmm0
L47:
  leave
  ret
```

tool_calls: name: unpack_data
arguments: data_label: D26
datatype: f32
name: unpack_data
arguments: data_label: D8
datatype: byte[4]
name: unpack_data
arguments: data_label: D2
datatype: f32[2]

tool: D26: 1

tool: {"D8": [0x00,0x00,0x00,0x80]}

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

assistant: ```c
float rgb_ramp_lookup(float ramp[], float at, int interpolate, int extrapolate) {
  float f = at;
  int table_size = arraylength(ramp);
  if ((f < 0.0 || f > 1.0) && extrapolate) {
    float t0, dy;
    if (f < 0.0) {
      t0 = ramp[0];
      dy = t0 - ramp[1];
      f = -f;
    } else {
      t0 = ramp[table_size - 1];
      dy = t0 - ramp[table_size - 2];
      f = f - 1.0;
    }
    return t0 + dy * f * (table_size - 1);
  }
  f = clamp(at, 0.0, 1.0) * (table_size - 1);
  int i = (int)f;
  if (i < 0)
    i = 0;
  if (i >= table_size)
    i = table_size - 1;
  float t = f - (float)i;
  float result = ramp[i];
  if (interpolate && t > 0.0)
    result = (1.0 - t) * result + t * ramp[i + 1];
  return result;
}
```