user: 请将这段汇编代码片段转换成等效的C代码：

```asm
<gen_ucsb_stf>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x60,%rsp
  mov    %rdi,-0x38(%rbp)
  mov    %rsi,-0x40(%rbp)
  mov    %rdx,-0x48(%rbp)
  mov    %ecx,-0x4c(%rbp)
  mov    %r8,-0x58(%rbp)
  movss  D77(%rip),%xmm0
  movss  %xmm0,-0x20(%rbp)
  mov    -0x4c(%rbp),%edx
  mov    -0x48(%rbp),%rax
  mov    %edx,%esi
  mov    %rax,%rdi
  call   <zapit@plt>
  mov    -0x40(%rbp),%rax
  movss  (%rax),%xmm0
  movss  %xmm0,-0x1c(%rbp)
  pxor   %xmm1,%xmm1
  cvtss2sd -0x1c(%rbp),%xmm1
  movsd  D107(%rip),%xmm0
  mulsd  %xmm1,%xmm0
  cvtsd2ss %xmm0,%xmm0
  movss  %xmm0,-0x18(%rbp)
  movss  -0x1c(%rbp),%xmm0
  subss  -0x18(%rbp),%xmm0
  movss  %xmm0,-0x14(%rbp)
  movss  -0x18(%rbp),%xmm0
  addss  %xmm0,%xmm0
  movss  %xmm0,-0x10(%rbp)
  mov    -0x58(%rbp),%rax
  movss  (%rax),%xmm1
  movss  -0x1c(%rbp),%xmm0
  divss  %xmm1,%xmm0
  pxor   %xmm1,%xmm1
  cvtss2sd %xmm0,%xmm1
  movsd  D45(%rip),%xmm0
  addsd  %xmm1,%xmm0
  cvttsd2si %xmm0,%eax
  mov    %eax,-0x2c(%rbp)
  mov    -0x2c(%rbp),%eax
  cmp    -0x4c(%rbp),%eax
  jle    L120
  mov    -0x4c(%rbp),%eax
  mov    %eax,-0x2c(%rbp)
L120:
  cmpl   $0x0,-0x2c(%rbp)
  jne    L27
  mov    $0x0,%eax
  jmp    L49
L27:
  movl   $0x0,-0x30(%rbp)
  jmp    L41
L38:
  pxor   %xmm1,%xmm1
  cvtsi2ssl -0x30(%rbp),%xmm1
  mov    -0x58(%rbp),%rax
  movss  (%rax),%xmm0
  mulss  %xmm1,%xmm0
  movss  %xmm0,-0xc(%rbp)
  pxor   %xmm0,%xmm0
  movss  %xmm0,-0x24(%rbp)
  movss  -0x18(%rbp),%xmm0
  comiss -0xc(%rbp),%xmm0
  jbe    L127
  movss  -0x20(%rbp),%xmm0
  mulss  -0xc(%rbp),%xmm0
  divss  -0x18(%rbp),%xmm0
  movss  %xmm0,-0x8(%rbp)
  movss  -0x8(%rbp),%xmm1
  movss  D99(%rip),%xmm0
  mulss  %xmm1,%xmm0
  movss  %xmm0,-0x4(%rbp)
  mov    -0x8(%rbp),%eax
  movd   %eax,%xmm0
  call   <cos@plt>
  movsd  D4(%rip),%xmm1
  mulsd  %xmm0,%xmm1
  movsd  D4(%rip),%xmm0
  subsd  %xmm1,%xmm0
  movsd  %xmm0,-0x60(%rbp)
  mov    -0x4(%rbp),%eax
  movd   %eax,%xmm0
  call   <sin@plt>
  movsd  D62(%rip),%xmm1
  mulsd  %xmm1,%xmm0
  addsd  -0x60(%rbp),%xmm0
  cvtsd2ss %xmm0,%xmm0
  movss  %xmm0,-0x24(%rbp)
  jmp    L105
L127:
  movss  -0x10(%rbp),%xmm0
  comiss -0xc(%rbp),%xmm0
  jbe    L103
  movss  -0x20(%rbp),%xmm0
  mulss  -0xc(%rbp),%xmm0
  divss  -0x18(%rbp),%xmm0
  movss  %xmm0,-0x8(%rbp)
  movss  -0xc(%rbp),%xmm0
  subss  -0x18(%rbp),%xmm0
  mulss  -0x20(%rbp),%xmm0
  divss  -0x14(%rbp),%xmm0
  movss  %xmm0,-0x4(%rbp)
  mov    -0x8(%rbp),%eax
  movd   %eax,%xmm0
  call   <cos@plt>
  movsd  D4(%rip),%xmm1
  mulsd  %xmm0,%xmm1
  movsd  D22(%rip),%xmm0
  subsd  %xmm1,%xmm0
  movsd  %xmm0,-0x60(%rbp)
  mov    -0x4(%rbp),%eax
  movd   %eax,%xmm0
  call   <cos@plt>
  movsd  D85(%rip),%xmm1
  mulsd  %xmm1,%xmm0
  addsd  -0x60(%rbp),%xmm0
  cvtsd2ss %xmm0,%xmm0
  movss  %xmm0,-0x24(%rbp)
  jmp    L105
L103:
  movss  -0x1c(%rbp),%xmm0
  comiss -0xc(%rbp),%xmm0
  jbe    L105
  movss  -0xc(%rbp),%xmm0
  subss  -0x18(%rbp),%xmm0
  mulss  -0x20(%rbp),%xmm0
  divss  -0x14(%rbp),%xmm0
  movss  %xmm0,-0x8(%rbp)
  mov    -0x8(%rbp),%eax
  movd   %eax,%xmm0
  call   <cos@plt>
  movsd  D85(%rip),%xmm1
  mulsd  %xmm0,%xmm1
  movsd  D85(%rip),%xmm0
  addsd  %xmm1,%xmm0
  cvtsd2ss %xmm0,%xmm0
  movss  %xmm0,-0x24(%rbp)
L105:
  mov    -0x30(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x48(%rbp),%rax
  add    %rdx,%rax
  movss  -0x24(%rbp),%xmm0
  movss  %xmm0,(%rax)
  addl   $0x1,-0x30(%rbp)
L41:
  mov    -0x30(%rbp),%eax
  cmp    -0x2c(%rbp),%eax
  jl     L38
  pxor   %xmm0,%xmm0
  movss  %xmm0,-0x28(%rbp)
  movl   $0x0,-0x30(%rbp)
  jmp    L155
L128:
  mov    -0x58(%rbp),%rax
  movss  (%rax),%xmm1
  mov    -0x30(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x48(%rbp),%rax
  add    %rdx,%rax
  movss  (%rax),%xmm0
  mulss  %xmm1,%xmm0
  movss  -0x28(%rbp),%xmm1
  addss  %xmm1,%xmm0
  movss  %xmm0,-0x28(%rbp)
  addl   $0x1,-0x30(%rbp)
L155:
  mov    -0x30(%rbp),%eax
  cmp    -0x2c(%rbp),%eax
  jl     L128
  pxor   %xmm0,%xmm0
  comiss -0x28(%rbp),%xmm0
  jb     L129
  mov    $0x0,%eax
  jmp    L49
L129:
  mov    -0x38(%rbp),%rax
  movss  (%rax),%xmm0
  divss  -0x28(%rbp),%xmm0
  movss  %xmm0,-0x28(%rbp)
  movl   $0x0,-0x30(%rbp)
  jmp    L14
L82:
  mov    -0x30(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x48(%rbp),%rax
  add    %rdx,%rax
  movss  (%rax),%xmm0
  mov    -0x30(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x48(%rbp),%rax
  add    %rdx,%rax
  mulss  -0x28(%rbp),%xmm0
  movss  %xmm0,(%rax)
  addl   $0x1,-0x30(%rbp)
L14:
  mov    -0x30(%rbp),%eax
  cmp    -0x2c(%rbp),%eax
  jl     L82
  mov    -0x2c(%rbp),%eax
L49:
  leave
  ret
```

tool_calls: name: retrieve_data
arguments: tag: D77
type_guessed: f32
name: retrieve_data
arguments: tag: D107
type_guessed: f64
name: retrieve_data
arguments: tag: D45
type_guessed: f64
name: retrieve_data
arguments: tag: D99
type_guessed: byte[4]
name: retrieve_data
arguments: tag: D4
type_guessed: f64
name: retrieve_data
arguments: tag: D62
type_guessed: f64
name: retrieve_data
arguments: tag: D22
type_guessed: f64
name: retrieve_data
arguments: tag: D85
type_guessed: f64

tool: D77: 3.141592654

tool: D107: 0.13

tool: D45: 0.5

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

tool: D4: 0.7

tool: D62: 0.6

tool: D22: 1

tool: D85: 0.3

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);
}
```