user: 请显示与下面列出的汇编代码相匹配的C语言实现：

```asm
<tbdm>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0xa0,%rsp
  mov    %rdi,0x20(%rsp)
  mov    %rsi,%rbx
  mov    %rdx,%r12
  mov    %rcx,%r15
  mov    %r8,%rbp
  mov    %r9,0x10(%rsp)
  mov    %fs:0x28,%rax
  mov    %rax,0x90(%rsp)
  xor    %eax,%eax
  lea    -0x4(%rdx),%r13
  lea    -0x8(%rsi),%r14
  mov    0x1d8(%rsi),%rcx
  push   %r8
  mov    %r15,%r9
  mov    %rdx,%r8
  mov    $0x3c,%edx
  call   <difmag@plt>
  mov    (%r15),%rax
  mov    (%r14,%rax,8),%rdx
  mov    0x18(%rsp),%rax
  mov    %rdx,(%rax)
  mov    (%r15),%rax
  cvttss2si 0x0(%r13,%rax,4),%rdi
  mov    %rdi,0x20(%rsp)
  sub    $0x2,%rax
  mov    0x1d8(%rbx),%rdi
  lea    -0x1(%rdi),%r8
  lea    0x2(%rdx),%rsi
  add    $0x10,%rsp
  lea    0x3(%rdx),%rcx
  cmp    %r8,%rsi
  cmovl  %rcx,%r8
  mov    $0x2c,%ecx
  cmp    %rcx,%rdx
  cmovl  %rcx,%rdx
  lea    -0x3(%rdx),%rcx
  cmp    %rcx,%r8
  jl     L50
  add    $0x1,%r8
  mov    $0x0,%esi
  jmp    L81
L103:
  add    $0x1,%rcx
  cmp    %rcx,%r8
  je     L39
L81:
  mov    (%r14,%rax,8),%rdx
  cmp    %rcx,%rdx
  jge    L76
L37:
  add    $0x1,%rax
  mov    -0x8(%rbx,%rax,8),%rdx
  cmp    %rcx,%rdx
  jl     L37
L76:
  cmp    %rcx,%rdx
  je     L103
  mov    %rcx,0x50(%rsp,%rsi,8)
  lea    0x1(%rsi),%rsi
  jmp    L103
L39:
  test   %rsi,%rsi
  jg     L117
L50:
  mov    0x8(%rsp),%rax
  mov    (%rax),%rdx
  cmp    $0x4f,%rdx
  jle    L52
  mov    %rdx,%rax
  shr    $0x3f,%rax
  add    %rdx,%rax
  sar    %rax
  mov    %rax,%rdx
  and    $0x1,%edx
  jne    L107
  lea    -0x1(%rax),%rdx
  mov    %rdx,0x50(%rsp)
  add    $0x1,%rax
  mov    %rax,0x58(%rsp)
  mov    $0x2,%edx
L32:
  mov    0x1d8(%rbx),%rcx
  lea    0x50(%rsp),%rsi
  sub    $0x8,%rsp
  lea    0x30(%rsp),%rax
  push   %rax
  lea    0x30(%rsp),%r9
  lea    0x40(%rsp),%r8
  mov    0x28(%rsp),%rdi
  call   <difmag@plt>
  mov    0x30(%rsp),%rax
  sub    $0x1,%rax
  movss  0x40(%rsp,%rax,4),%xmm1
  pxor   %xmm0,%xmm0
  cvtsi2ssq 0x20(%rsp),%xmm0
  add    $0x10,%rsp
  comiss %xmm1,%xmm0
  jbe    L52
  mov    0x50(%rsp,%rax,8),%rax
  mov    0x8(%rsp),%rdi
  mov    %rax,(%rdi)
  cvttss2si %xmm1,%rax
  mov    %rax,0x10(%rsp)
  subq   $0x14,(%r15)
L52:
  mov    (%r15),%rax
  pxor   %xmm0,%xmm0
  cvtsi2ssq 0x10(%rsp),%xmm0
  movss  %xmm0,0x0(%r13,%rax,4)
  mov    (%r15),%rax
  mov    $0x6,%edx
  cmp    %rdx,%rax
  cmovl  %rdx,%rax
  lea    -0x5(%rax),%rdx
  mov    %rdx,0x0(%rbp)
  mov    (%r15),%rdx
  mov    $0x37,%ecx
  cmp    %rcx,%rdx
  cmovg  %rcx,%rdx
  sub    $0x4,%rax
  lea    0x5(%rdx),%rcx
  cmp    %rax,%rcx
  jl     L124
  lea    0x6(%rdx),%rcx
  jmp    L71
L117:
  lea    0x50(%rsp),%rax
  sub    $0x8,%rsp
  lea    0x30(%rsp),%rdx
  push   %rdx
  lea    0x30(%rsp),%r9
  lea    0x40(%rsp),%r8
  mov    %rdi,%rcx
  mov    %rsi,%rdx
  mov    %rax,%rsi
  mov    0x28(%rsp),%rdi
  call   <difmag@plt>
  mov    0x30(%rsp),%rax
  sub    $0x1,%rax
  movss  0x40(%rsp,%rax,4),%xmm1
  pxor   %xmm0,%xmm0
  cvtsi2ssq 0x20(%rsp),%xmm0
  add    $0x10,%rsp
  comiss %xmm1,%xmm0
  jbe    L50
  mov    0x50(%rsp,%rax,8),%rax
  mov    0x8(%rsp),%rdi
  mov    %rax,(%rdi)
  cvttss2si %xmm1,%rax
  mov    %rax,0x10(%rsp)
  jmp    L50
L107:
  mov    %rax,0x50(%rsp)
  jmp    L32
L88:
  add    $0x1,%rax
  cmp    %rcx,%rax
  je     L124
L71:
  mov    0x0(%rbp),%rdx
  movss  -0x4(%r12,%rax,4),%xmm0
  comiss 0x0(%r13,%rdx,4),%xmm0
  jbe    L88
  mov    %rax,0x0(%rbp)
  jmp    L88
L124:
  mov    0x88(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L150
  add    $0x98,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
L150:
  call   <__stack_chk_fail@plt>
```

assistant: ```c
void tbdm(float *speech, long *tau, float *amdf, long *minptr, long *maxptr, long *mintau) {
  float amdf2[6];
  long minp2, ltau2, maxp2, i, j;
  long minamd, ptr, tau2[6];
  --amdf;
  --tau;
  difmag(speech, &tau[1], 60, tau[60], &amdf[1], minptr, maxptr);
  *mintau = tau[*minptr];
  minamd = (long)amdf[*minptr];
  ltau2 = 0;
  ptr = *minptr - 2;
  j = ((*mintau + 3) <= (tau[60] - 1) ? (*mintau + 3) : (tau[60] - 1));
  i = ((*mintau - 3) >= (41) ? (*mintau - 3) : (41));
  for (; i <= j; ++i) {
    while (tau[ptr] < i) {
      ++ptr;
    }
    if (tau[ptr] != i) {
      ++ltau2;
      tau2[ltau2 - 1] = i;
    }
  }
  if (ltau2 > 0) {
    difmag(speech, tau2, ltau2, tau[60], amdf2, &minp2, &maxp2);
    if (amdf2[minp2 - 1] < (float)minamd) {
      *mintau = tau2[minp2 - 1];
      minamd = (long)amdf2[minp2 - 1];
    }
  }
  if (*mintau >= 80) {
    i = *mintau / 2;
    if ((i & 1) == 0) {
      ltau2 = 2;
      tau2[0] = i - 1;
      tau2[1] = i + 1;
    } else {
      ltau2 = 1;
      tau2[0] = i;
    }
    difmag(speech, tau2, ltau2, tau[60], amdf2, &minp2, &maxp2);
    if (amdf2[minp2 - 1] < (float)minamd) {
      *mintau = tau2[minp2 - 1];
      minamd = (long)amdf2[minp2 - 1];
      *minptr += -20;
    }
  }
  amdf[*minptr] = (float)minamd;
  *maxptr = ((*minptr - 5) >= (1) ? (*minptr - 5) : (1));
  j = ((*minptr + 5) <= (60) ? (*minptr + 5) : (60));
  for (i = *maxptr + 1; i <= j; ++i) {
    if (amdf[i] > amdf[*maxptr]) {
      *maxptr = i;
    }
  }
}
```