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

```asm
<gen_ucsb_stf>:
  endbr64
  push   %r15
  push   %r14
  mov    %rdx,%r14
  push   %r13
  mov    %rsi,%r13
  mov    %ecx,%esi
  push   %r12
  mov    %rdi,%r12
  mov    %rdx,%rdi
  push   %rbp
  mov    %ecx,%ebp
  push   %rbx
  mov    %r8,%rbx
  sub    $0x28,%rsp
  call   <zapit@plt>
  movss  0x0(%r13),%xmm7
  movss  (%rbx),%xmm1
  movaps %xmm7,%xmm0
  movss  %xmm7,(%rsp)
  divss  %xmm1,%xmm0
  cvtss2sd %xmm0,%xmm0
  addsd  D107(%rip),%xmm0
  cvttsd2si %xmm0,%eax
  cmp    %ebp,%eax
  cmovle %eax,%ebp
  test   %ebp,%ebp
  jle    L180
  pxor   %xmm2,%xmm2
  lea    -0x1(%rbp),%eax
  mov    %ebp,%r13d
  xor    %r15d,%r15d
  cvtss2sd (%rsp),%xmm2
  mulsd  D59(%rip),%xmm2
  mov    %eax,0x1c(%rsp)
  mov    %ebp,%ebp
  cvtsd2ss %xmm2,%xmm2
  subss  %xmm2,%xmm7
  movss  %xmm7,0x18(%rsp)
  movaps %xmm2,%xmm7
  addss  %xmm2,%xmm7
  movss  %xmm7,0x4(%rsp)
  jmp    L117
  nopw   0x0(%rax,%rax,1)
L192:
  movss  0x4(%rsp),%xmm5
  comiss %xmm0,%xmm5
  ja     L132
  movss  (%rsp),%xmm6
  pxor   %xmm1,%xmm1
  comiss %xmm0,%xmm6
  ja     L7
L202:
  movss  %xmm1,(%r14,%r15,4)
  add    $0x1,%r15
  cmp    %r15,%rbp
  je     L41
L130:
  movss  (%rbx),%xmm1
L117:
  pxor   %xmm0,%xmm0
  cvtsi2ss %r15d,%xmm0
  mulss  %xmm1,%xmm0
  comiss %xmm0,%xmm2
  jbe    L192
  mulss  D86(%rip),%xmm0
  movss  %xmm2,0x14(%rsp)
  movaps %xmm0,%xmm1
  divss  %xmm2,%xmm1
  movaps %xmm1,%xmm0
  movss  %xmm1,0x10(%rsp)
  call   <cos@plt>
  movss  0x10(%rsp),%xmm1
  mulss  D1(%rip),%xmm1
  movsd  %xmm0,0x8(%rsp)
  movaps %xmm1,%xmm0
  call   <sin@plt>
  movsd  D41(%rip),%xmm1
  movsd  0x8(%rsp),%xmm3
  movapd %xmm0,%xmm4
  movss  0x14(%rsp),%xmm2
  mulsd  %xmm1,%xmm3
  mulsd  D85(%rip),%xmm4
  subsd  %xmm3,%xmm1
  addsd  %xmm4,%xmm1
  cvtsd2ss %xmm1,%xmm1
  movss  %xmm1,(%r14,%r15,4)
  add    $0x1,%r15
  cmp    %r15,%rbp
  jne    L130
L41:
  cmpl   $0x2,0x1c(%rsp)
  movss  (%rbx),%xmm4
  jbe    L78
  mov    %r13d,%ecx
  lea    0x10(%r14),%rsi
  movaps %xmm4,%xmm3
  mov    %r14,%rdx
  shr    $0x2,%ecx
  pxor   %xmm1,%xmm1
  shufps $0x0,%xmm3,%xmm3
  sub    $0x1,%ecx
  shl    $0x4,%rcx
  add    %rsi,%rcx
  nopl   (%rax)
L22:
  movups (%rdx),%xmm0
  add    $0x10,%rdx
  mulps  %xmm3,%xmm0
  addss  %xmm0,%xmm1
  movaps %xmm0,%xmm2
  shufps $0x55,%xmm0,%xmm2
  addss  %xmm2,%xmm1
  movaps %xmm0,%xmm2
  unpckhps %xmm0,%xmm2
  shufps $0xff,%xmm0,%xmm0
  addss  %xmm2,%xmm1
  addss  %xmm0,%xmm1
  cmp    %rdx,%rcx
  jne    L22
  mov    %r13d,%edx
  and    $0xfffffffc,%edx
  cmp    %edx,%r13d
  je     L148
L237:
  movslq %edx,%rcx
  movss  (%r14,%rcx,4),%xmm0
  lea    0x0(,%rcx,4),%rsi
  lea    0x1(%rdx),%ecx
  mulss  %xmm4,%xmm0
  addss  %xmm0,%xmm1
  cmp    %r13d,%ecx
  jge    L58
  movss  0x4(%r14,%rsi,1),%xmm0
  add    $0x2,%edx
  mulss  %xmm4,%xmm0
  addss  %xmm0,%xmm1
  cmp    %edx,%r13d
  jle    L58
  mulss  0x8(%r14,%rsi,1),%xmm4
  addss  %xmm4,%xmm1
L58:
  pxor   %xmm5,%xmm5
  comiss %xmm1,%xmm5
  jae    L180
  movss  (%r12),%xmm2
  cmpl   $0x2,0x1c(%rsp)
  divss  %xmm1,%xmm2
  jbe    L238
  lea    0x10(%r14),%rsi
L52:
  mov    %r13d,%ecx
  movaps %xmm2,%xmm1
  mov    %r14,%rdx
  shr    $0x2,%ecx
  shufps $0x0,%xmm1,%xmm1
  sub    $0x1,%ecx
  shl    $0x4,%rcx
  add    %rsi,%rcx
  nopw   0x0(%rax,%rax,1)
L152:
  movups (%rdx),%xmm0
  add    $0x10,%rdx
  mulps  %xmm1,%xmm0
  movups %xmm0,-0x10(%rdx)
  cmp    %rcx,%rdx
  jne    L152
  mov    %r13d,%ecx
  and    $0xfffffffc,%ecx
  mov    %ecx,%edx
  cmp    %r13d,%ecx
  je     L57
L32:
  mov    %r13d,%esi
  sub    %ecx,%esi
  cmp    $0x1,%esi
  je     L178
  lea    (%r14,%rcx,4),%rcx
  movaps %xmm2,%xmm1
  movq   (%rcx),%xmm0
  shufps $0xe0,%xmm1,%xmm1
  mulps  %xmm1,%xmm0
  movlps %xmm0,(%rcx)
  mov    %esi,%ecx
  and    $0xfffffffe,%ecx
  add    %ecx,%edx
  cmp    %ecx,%esi
  je     L57
L178:
  movslq %edx,%rdx
  lea    (%r14,%rdx,4),%rdx
  mulss  (%rdx),%xmm2
  movss  %xmm2,(%rdx)
  jmp    L57
  xchg   %ax,%ax
L132:
  movaps %xmm0,%xmm3
  movss  %xmm2,0x10(%rsp)
  mulss  D86(%rip),%xmm0
  subss  %xmm2,%xmm3
  mulss  D86(%rip),%xmm3
  divss  0x18(%rsp),%xmm3
  movss  %xmm3,0x14(%rsp)
  divss  %xmm2,%xmm0
  call   <cos@plt>
  movss  0x14(%rsp),%xmm3
  movsd  %xmm0,0x8(%rsp)
  movaps %xmm3,%xmm0
  call   <cos@plt>
  movsd  0x8(%rsp),%xmm1
  movss  0x10(%rsp),%xmm2
  movapd %xmm0,%xmm3
  movsd  D41(%rip),%xmm0
  mulsd  D127(%rip),%xmm3
  mulsd  %xmm1,%xmm0
  movsd  D55(%rip),%xmm1
  subsd  %xmm0,%xmm1
  addsd  %xmm3,%xmm1
  cvtsd2ss %xmm1,%xmm1
  jmp    L202
  nopl   0x0(%rax,%rax,1)
L7:
  subss  %xmm2,%xmm0
  mulss  D86(%rip),%xmm0
  movss  %xmm2,0x8(%rsp)
  divss  0x18(%rsp),%xmm0
  call   <cos@plt>
  pxor   %xmm1,%xmm1
  movss  0x8(%rsp),%xmm2
  mulsd  D127(%rip),%xmm0
  addsd  D127(%rip),%xmm0
  cvtsd2ss %xmm0,%xmm1
  jmp    L202
  nopl   0x0(%rax,%rax,1)
L180:
  xor    %r13d,%r13d
L57:
  add    $0x28,%rsp
  mov    %r13d,%eax
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
  nopl   (%rax)
L148:
  pxor   %xmm5,%xmm5
  comiss %xmm1,%xmm5
  jae    L180
  movss  (%r12),%xmm2
  divss  %xmm1,%xmm2
  jmp    L52
L78:
  pxor   %xmm1,%xmm1
  xor    %edx,%edx
  jmp    L237
L238:
  xor    %ecx,%ecx
  xor    %edx,%edx
  jmp    L32
```

tool_calls: name: extract_symbolic_data
arguments: data_label: D107
type_infered: f64
name: extract_symbolic_data
arguments: data_label: D59
type_infered: f64
name: extract_symbolic_data
arguments: data_label: D86
type_infered: f32
name: extract_symbolic_data
arguments: data_label: D1
type_infered: byte[4]
name: extract_symbolic_data
arguments: data_label: D41
type_infered: f64
name: extract_symbolic_data
arguments: data_label: D85
type_infered: f64
name: extract_symbolic_data
arguments: data_label: D127
type_infered: f64
name: extract_symbolic_data
arguments: data_label: D55
type_infered: f64

tool: D107: 0.5

tool: D59: 0.13

tool: D86: 3.141592654

tool: {"D1": [0x00,0x00,0x00,0x3f]}

tool: D41: 0.7

tool: D85: 0.6

tool: D127: 0.3

tool: D55: 1

assistant: ```c
int gen_ucsb_stf(float *slip, float *t0, float *stf, int nt, float *dt) {
  int it, nstf;
  float tau, tau1, tau2, tau1x2, arg1, arg2;
  float sum, t, alpha;
  float pi = 3.141592654;
  zapit(stf, nt);
  tau = (*t0);
  tau1 = 0.13 * tau;
  tau2 = tau - tau1;
  tau1x2 = 2.0 * tau1;
  nstf = (int)((tau) / (*dt) + 0.5);
  if (nstf > nt)
    nstf = nt;
  if (nstf == 0)
    return (0);
  for (it = 0; it < nstf; it++) {
    t = it * (*dt);
    alpha = 0.0;
    if (t < tau1) {
      arg1 = pi * t / tau1;
      arg2 = 0.5 * arg1;
      alpha = 0.7 - 0.7 * cos(arg1) + 0.6 * sin(arg2);
    } else if (t < tau1x2) {
      arg1 = pi * t / tau1;
      arg2 = pi * (t - tau1) / tau2;
      alpha = 1.0 - 0.7 * cos(arg1) + 0.3 * cos(arg2);
    } else if (t < tau) {
      arg1 = pi * (t - tau1) / tau2;
      alpha = 0.3 + 0.3 * cos(arg1);
    }
    stf[it] = alpha;
  }
  sum = 0.0;
  for (it = 0; it < nstf; it++)
    sum = sum + (*dt) * stf[it];
  if (sum <= 0.0)
    return (0);
  sum = (*slip) / sum;
  for (it = 0; it < nstf; it++)
    stf[it] = stf[it] * sum;
  return (nstf);
}
```