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

```asm
<taper_norm>:
  endbr64
  push   %r13
  pxor   %xmm0,%xmm0
  mov    %rsi,%r13
  mov    %edx,%esi
  push   %r12
  cvtsi2sd %edx,%xmm0
  mov    %rdi,%rcx
  push   %rbp
  push   %rbx
  sub    $0x18,%rsp
  mulsd  D24(%rip),%xmm0
  cvttsd2si %xmm0,%ebx
  sub    %ebx,%edx
  test   %edx,%edx
  jle    L48
  movslq %edx,%rax
  mov    %edx,%r8d
  lea    (%rdi,%rax,4),%rax
  lea    0x4(%r13),%rdi
  cmp    %rax,%r13
  setae  %al
  cmp    %rdi,%rcx
  setae  %dil
  or     %dil,%al
  je     L15
  cmp    $0x1,%edx
  je     L15
  lea    -0x1(%rdx),%eax
  cmp    $0x2,%eax
  jbe    L82
  mov    %edx,%edi
  movss  0x0(%r13),%xmm1
  mov    %rcx,%rax
  shr    $0x2,%edi
  sub    $0x1,%edi
  shufps $0x0,%xmm1,%xmm1
  shl    $0x4,%rdi
  lea    0x10(%rcx,%rdi,1),%rdi
  nopl   0x0(%rax,%rax,1)
L95:
  movups (%rax),%xmm0
  add    $0x10,%rax
  mulps  %xmm1,%xmm0
  movups %xmm0,-0x10(%rax)
  cmp    %rdi,%rax
  jne    L95
  mov    %edx,%edi
  and    $0xfffffffc,%edi
  mov    %edi,%eax
  cmp    %edx,%edi
  je     L48
  mov    %edx,%r8d
  sub    %edi,%r8d
  cmp    $0x1,%r8d
  je     L121
L125:
  lea    (%rcx,%rdi,4),%rdi
  movss  0x0(%r13),%xmm1
  movq   (%rdi),%xmm0
  shufps $0xe0,%xmm1,%xmm1
  mulps  %xmm1,%xmm0
  movlps %xmm0,(%rdi)
  mov    %r8d,%edi
  and    $0xfffffffe,%edi
  add    %edi,%eax
  cmp    %edi,%r8d
  je     L48
L121:
  cltq
  lea    (%rcx,%rax,4),%rax
  movss  (%rax),%xmm0
  mulss  0x0(%r13),%xmm0
  movss  %xmm0,(%rax)
L48:
  pxor   %xmm1,%xmm1
  movsd  D13(%rip),%xmm0
  pxor   %xmm3,%xmm3
  cvtsi2ss %ebx,%xmm1
  cvtss2sd %xmm1,%xmm1
  divsd  %xmm1,%xmm0
  cvtsd2ss %xmm0,%xmm3
  movss  %xmm3,0xc(%rsp)
  cmp    %edx,%esi
  jle    L6
  movslq %edx,%rdx
  add    $0x1,%ebx
  mov    $0x1,%ebp
  lea    (%rcx,%rdx,4),%r12
  nopl   0x0(%rax)
L115:
  pxor   %xmm0,%xmm0
  add    $0x4,%r12
  cvtsi2ss %ebp,%xmm0
  mulss  0xc(%rsp),%xmm0
  add    $0x1,%ebp
  cvtss2sd %xmm0,%xmm0
  call   <cos@plt>
  pxor   %xmm1,%xmm1
  addsd  D36(%rip),%xmm0
  cvtss2sd 0x0(%r13),%xmm1
  mulsd  D6(%rip),%xmm1
  mulsd  %xmm0,%xmm1
  cvtsd2ss %xmm1,%xmm1
  mulss  -0x4(%r12),%xmm1
  movss  %xmm1,-0x4(%r12)
  cmp    %ebx,%ebp
  jne    L115
L6:
  add    $0x18,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  ret
  nopl   (%rax)
L15:
  lea    -0x1(%rdx),%edi
  mov    %rcx,%rax
  lea    0x4(%rcx,%rdi,4),%rdi
  nopl   0x0(%rax,%rax,1)
L18:
  movss  (%rax),%xmm0
  mulss  0x0(%r13),%xmm0
  add    $0x4,%rax
  movss  %xmm0,-0x4(%rax)
  cmp    %rax,%rdi
  jne    L18
  jmp    L48
L82:
  xor    %eax,%eax
  xor    %edi,%edi
  jmp    L125
```

tool_calls: name: disassemble_data
arguments: data_tag: D24
datatype: f64
name: disassemble_data
arguments: data_tag: D13
datatype: f64
name: disassemble_data
arguments: data_tag: D36
datatype: f64
name: disassemble_data
arguments: data_tag: D6
datatype: f64

tool: D24: 0.05

tool: D13: 3.14159

tool: D36: 1

tool: D6: 0.5

assistant: ```c
void taper_norm(g, dt, nt) float *g, *dt;
int nt;
{
  float fac, df, arg;
  int i;
  int ntap;
  ntap = nt * 0.05;
  for (i = 0; i < nt - ntap; i++)
    g[i] = g[i] * (*dt);
  df = 3.14159 / (float)(ntap);
  for (i = nt - ntap; i < nt; i++) {
    arg = (i - (nt - (ntap + 1))) * df;
    fac = (*dt) * 0.5 * (1.0 + cos(arg));
    g[i] = g[i] * fac;
  }
}
```