user: Please show me the C implementation that matches the assembly code listed below:

```asm
<cheb>:
  endbr64
  sub    $0x168,%rsp
  mov    %edi,%eax
  lea    D4(%rip),%rsi
  mov    $0x2a,%ecx
  mov    %fs:0x28,%rdx
  mov    %rdx,0x158(%rsp)
  xor    %edx,%edx
  mov    %rsp,%rdi
  movss  D17(%rip),%xmm2
  rep movsq %ds:(%rsi),%es:(%rdi)
  test   %eax,%eax
  je     L54
  addss  %xmm0,%xmm0
  movsd  D23(%rip),%xmm1
  mov    %eax,%edx
  shr    $0x1f,%edx
  lea    (%rax,%rdx,1),%ecx
  cvtss2sd %xmm0,%xmm0
  subsd  %xmm1,%xmm0
  and    $0x1,%ecx
  sub    %edx,%ecx
  divsd  %xmm1,%xmm0
  movaps %xmm2,%xmm1
  cvtsd2ss %xmm0,%xmm0
  test   $0x1,%al
  jne    L86
L27:
  lea    0x2(%rax),%esi
  mov    %esi,%edx
  shr    $0x1f,%edx
  add    %esi,%edx
  sar    %edx
  cmp    %ecx,%eax
  jl     L30
  lea    -0x1(%rax),%r8d
  lea    -0x1(%rdx),%edi
  pxor   %xmm2,%xmm2
  movslq %r8d,%r8
  movslq %edi,%rdi
  lea    0x0(,%r8,8),%rsi
  sub    %r8,%rsi
  add    %rsi,%rdi
  cvtsi2ssl (%rsp,%rdi,4),%xmm2
  lea    0x2(%rcx),%edi
  mulss  %xmm1,%xmm2
  mulss  %xmm0,%xmm1
  addss  D13(%rip),%xmm2
  mulss  %xmm0,%xmm1
  cmp    %edi,%eax
  jl     L54
  lea    -0x2(%rdx),%edi
  pxor   %xmm3,%xmm3
  movslq %edi,%rdi
  add    %rsi,%rdi
  cvtsi2ssl (%rsp,%rdi,4),%xmm3
  lea    0x4(%rcx),%edi
  mulss  %xmm1,%xmm3
  mulss  %xmm0,%xmm1
  addss  %xmm3,%xmm2
  mulss  %xmm0,%xmm1
  cmp    %edi,%eax
  jl     L54
  lea    -0x3(%rdx),%edi
  pxor   %xmm3,%xmm3
  movslq %edi,%rdi
  add    %rsi,%rdi
  cvtsi2ssl (%rsp,%rdi,4),%xmm3
  lea    0x6(%rcx),%edi
  mulss  %xmm1,%xmm3
  mulss  %xmm0,%xmm1
  addss  %xmm3,%xmm2
  mulss  %xmm0,%xmm1
  cmp    %edi,%eax
  jl     L54
  lea    -0x4(%rdx),%edi
  pxor   %xmm3,%xmm3
  movslq %edi,%rdi
  add    %rsi,%rdi
  cvtsi2ssl (%rsp,%rdi,4),%xmm3
  lea    0x8(%rcx),%edi
  mulss  %xmm1,%xmm3
  mulss  %xmm0,%xmm1
  addss  %xmm3,%xmm2
  mulss  %xmm0,%xmm1
  cmp    %edi,%eax
  jl     L54
  lea    -0x5(%rdx),%edi
  pxor   %xmm3,%xmm3
  movslq %edi,%rdi
  add    %rsi,%rdi
  cvtsi2ssl (%rsp,%rdi,4),%xmm3
  lea    0xa(%rcx),%edi
  mulss  %xmm1,%xmm3
  mulss  %xmm0,%xmm1
  addss  %xmm3,%xmm2
  mulss  %xmm0,%xmm1
  cmp    %edi,%eax
  jl     L54
  lea    -0x6(%rdx),%edi
  pxor   %xmm3,%xmm3
  add    $0xc,%ecx
  movslq %edi,%rdi
  add    %rsi,%rdi
  cvtsi2ssl (%rsp,%rdi,4),%xmm3
  mulss  %xmm1,%xmm3
  mulss  %xmm0,%xmm1
  addss  %xmm3,%xmm2
  mulss  %xmm1,%xmm0
  cmp    %ecx,%eax
  jl     L54
  sub    $0x7,%edx
  pxor   %xmm1,%xmm1
  movslq %edx,%rdx
  add    %rdx,%rsi
  cvtsi2ssl (%rsp,%rsi,4),%xmm1
  mulss  %xmm1,%xmm0
  addss  %xmm0,%xmm2
L54:
  mov    0x158(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L26
  movaps %xmm2,%xmm0
  add    $0x168,%rsp
  ret
  nopw   0x0(%rax,%rax,1)
L86:
  movaps %xmm0,%xmm1
  jmp    L27
  nopl   0x0(%rax,%rax,1)
L30:
  pxor   %xmm2,%xmm2
  jmp    L54
L26:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: unpack_data
arguments: data_label: D4
data_type: string
name: unpack_data
arguments: data_label: D17
data_type: byte[4]
name: unpack_data
arguments: data_label: D23
data_type: f64
name: unpack_data
arguments: data_label: D13
data_type: byte[4]

tool: D4: 

tool: {"D17": [0x00,0x00,0x80,0x3f]}

tool: D23: 3.14

tool: {"D13": [0x00,0x00,0x00,0x00]}

assistant: ```c
float cheb(float x, int st) {
  int chebdat[12][7] = {{1, 0, 0, 0, 0, 0, 0}, {2, -1, 0, 0, 0, 0, 0}, {4, -3, 0, 0, 0, 0, 0}, {8, -8, 1, 0, 0, 0, 0}, {16, -20, 5, 0, 0, 0, 0}, {32, -48, 18, -1, 0, 0, 0}, {64, -112, 56, -7, 0, 0, 0}, {128, -256, 160, -32, 1, 0, 0}, {256, -576, 432, -120, 9, 0, 0}, {512, -1280, 1120, -400, 50, -1, 0}, {1024, -2816, 2816, -1232, 220, -11, 0}, {2048, -6144, 6912, -3584, 840, -72, 1}};
  float xst, sum;
  int nst, n;
  x = (2 * x - 3.14) / 3.14;
  if (st == 0)
    return 1;
  sum = 0;
  nst = st % 2;
  if (nst == 0)
    xst = 1;
  else
    xst = x;
  n = (st + 2) / 2;
  while (nst <= st) {
    sum = sum + chebdat[st - 1][n - 1] * xst;
    nst += 2;
    xst = xst * x * x;
    n--;
  }
  return sum;
}
```