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

```asm
<gen_ucsbT_stf>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x38,%rsp
  mov    %rdi,0x28(%rsp)
  mov    %rsi,%r13
  mov    %rdx,%rbx
  mov    %ecx,%ebp
  mov    %r8,%r12
  mov    %r9,%r14
  mov    %ecx,%esi
  mov    %rdx,%rdi
  call   <zapit@plt>
  movss  (%r14),%xmm1
  movaps %xmm1,%xmm5
  mulss  0x0(%r13),%xmm5
  movss  %xmm5,0x20(%rsp)
  movaps %xmm5,%xmm0
  divss  (%r12),%xmm0
  cvtss2sd %xmm0,%xmm0
  addsd  D111(%rip),%xmm0
  cvttsd2si %xmm0,%r13d
  cmp    %ebp,%r13d
  cmovg  %ebp,%r13d
  test   %r13d,%r13d
  jle    L73
  pxor   %xmm0,%xmm0
  cvtss2sd %xmm5,%xmm0
  mulsd  D21(%rip),%xmm0
  cvtss2sd %xmm1,%xmm1
  divsd  %xmm1,%xmm0
  pxor   %xmm4,%xmm4
  cvtsd2ss %xmm0,%xmm4
  movss  %xmm4,0xc(%rsp)
  subss  %xmm4,%xmm5
  movss  %xmm5,0x24(%rsp)
  addss  %xmm4,%xmm4
  movss  %xmm4,0x18(%rsp)
  lea    -0x1(%r13),%r15d
  mov    %r13d,%r14d
  mov    $0x0,%ebp
  jmp    L33
L79:
  mulss  D40(%rip),%xmm0
  divss  %xmm3,%xmm0
  movss  %xmm0,0x1c(%rsp)
  call   <cos@plt>
  movsd  %xmm0,0x10(%rsp)
  movss  0x1c(%rsp),%xmm0
  mulss  D38(%rip),%xmm0
  call   <sin@plt>
  movapd %xmm0,%xmm1
  movsd  D15(%rip),%xmm0
  movsd  0x10(%rsp),%xmm2
  mulsd  %xmm0,%xmm2
  subsd  %xmm2,%xmm0
  mulsd  D65(%rip),%xmm1
  addsd  %xmm1,%xmm0
  cvtsd2ss %xmm0,%xmm0
L30:
  movss  %xmm0,(%rbx,%rbp,4)
  add    $0x1,%rbp
  cmp    %r14,%rbp
  je     L45
L33:
  pxor   %xmm0,%xmm0
  cvtsi2ss %ebp,%xmm0
  mulss  (%r12),%xmm0
  movss  0xc(%rsp),%xmm3
  comiss %xmm0,%xmm3
  ja     L79
  movss  0x18(%rsp),%xmm4
  comiss %xmm0,%xmm4
  ja     L84
  movss  0x20(%rsp),%xmm6
  comiss %xmm0,%xmm6
  ja     L43
  pxor   %xmm0,%xmm0
  jmp    L30
L84:
  movaps %xmm0,%xmm1
  movss  0xc(%rsp),%xmm7
  subss  %xmm7,%xmm1
  mulss  D40(%rip),%xmm1
  divss  0x24(%rsp),%xmm1
  movss  %xmm1,0x1c(%rsp)
  mulss  D40(%rip),%xmm0
  divss  %xmm7,%xmm0
  call   <cos@plt>
  movsd  %xmm0,0x10(%rsp)
  movss  0x1c(%rsp),%xmm0
  call   <cos@plt>
  movsd  0x10(%rsp),%xmm2
  mulsd  D15(%rip),%xmm2
  movsd  D31(%rip),%xmm1
  subsd  %xmm2,%xmm1
  mulsd  D34(%rip),%xmm0
  addsd  %xmm0,%xmm1
  pxor   %xmm0,%xmm0
  cvtsd2ss %xmm1,%xmm0
  jmp    L30
L43:
  subss  0xc(%rsp),%xmm0
  mulss  D40(%rip),%xmm0
  divss  0x24(%rsp),%xmm0
  call   <cos@plt>
  mulsd  D34(%rip),%xmm0
  addsd  D34(%rip),%xmm0
  cvtsd2ss %xmm0,%xmm0
  jmp    L30
L45:
  movss  (%r12),%xmm2
  mov    %rbx,%rax
  lea    0x4(%rbx,%r15,4),%rdx
  pxor   %xmm0,%xmm0
L22:
  movaps %xmm2,%xmm1
  mulss  (%rbx),%xmm1
  addss  %xmm1,%xmm0
  add    $0x4,%rbx
  cmp    %rdx,%rbx
  jne    L22
  pxor   %xmm1,%xmm1
  comiss %xmm0,%xmm1
  jae    L49
  mov    0x28(%rsp),%rcx
  movss  (%rcx),%xmm1
  divss  %xmm0,%xmm1
L125:
  movaps %xmm1,%xmm0
  mulss  (%rax),%xmm0
  movss  %xmm0,(%rax)
  add    $0x4,%rax
  cmp    %rdx,%rax
  jne    L125
L95:
  mov    %r13d,%eax
  add    $0x38,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
L73:
  mov    $0x0,%r13d
  jmp    L95
L49:
  mov    $0x0,%r13d
  jmp    L95
```

tool_calls: name: read_data
arguments: label: D111
type: f64
name: read_data
arguments: label: D21
type: f64
name: read_data
arguments: label: D40
type: f32
name: read_data
arguments: label: D38
type: byte[4]
name: read_data
arguments: label: D15
type: f64
name: read_data
arguments: label: D65
type: f64
name: read_data
arguments: label: D31
type: f64
name: read_data
arguments: label: D34
type: f64

tool: D111: 0.5

tool: D21: 0.13

tool: D40: 3.141592654

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

tool: D15: 0.7

tool: D65: 0.6

tool: D31: 1

tool: D34: 0.3

assistant: ```c
int gen_ucsbT_stf(float *slip, float *t0, float *stf, int nt, float *dt, float *beta) {
  int it, nstf;
  float tau, tau1, tau2, tau1x2, arg1, arg2;
  float sum, t, alpha;
  float pi = 3.141592654;
  zapit(stf, nt);
  tau = (*beta) * (*t0);
  tau1 = 0.13 * tau / (*beta);
  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);
}
```