// File: /workspace/github_cpp_makefile_star2_O1/rowdyroad[P]dtmfdecoder/./DTMFDecoder.h
// Function: DTMFDecoder<short>::decode(std::vector<short, std::allocator<short>> const&, unsigned long)
void decode(const std::vector<T>& frames, size_t framesCount)
      {
        size_t offset = 0;
        while (framesCount > 0) {
          size_t len = std::min(framesCount, framesCount_ - windowFrames_.size());
          windowFrames_.insert(windowFrames_.end(), frames.begin() + offset, frames.begin() + offset + len);
          offset += len;
          framesCount -= len;
          if (windowFrames_.size() >= framesCount_) {
              std::vector<double> resultedFrames(framesCount_);
              for (size_t i = 0; i < framesCount_; ++i) {
                resultedFrames[i] = windowFunctionTable_[i] * windowFrames_[i];
              }
              Frequency low = getExistsFrequency(resultedFrames, kLowFreqs_),
                        high = getExistsFrequency(resultedFrames, kHighFreqs_);

              if (low == kUndefinedFrequency || high == kUndefinedFrequency) {
                truncateDtmfStatTable();
              } else {
                  auto r = dtmfStatsTable_.find(std::make_pair(low, high));
                  truncateDtmfStatTable(&r->first);
                  auto duration = r->second.duration;
                  r->second.duration += overlapFramesCount_;
                  if (duration < framesCount_ && r->second.duration >= framesCount_) {
                    handler_->OnCodeBegin(this, r->second.code);
                  } else if (r->second.duration % framesCount_ == 0) {
                    handler_->OnCode(this, r->second.code, r->second.duration / samplesPerMilliseconds_);
                  }
              }

              windowFrames_.erase(windowFrames_.begin(), windowFrames_.begin() + overlapFramesCount_);
          }
          timestamp_ += len;
        }
      }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x48, %rsp
testq %rdx, %rdx
je 0x2c9a
movq %rdx, %rbx
movq %rsi, %r13
movq %rdi, %r15
leaq 0x88(%rdi), %rax
movq %rax, 0x40(%rsp)
leaq 0x8(%rdi), %rax
movq %rax, 0x38(%rsp)
leaq 0x20(%rdi), %rax
movq %rax, 0x30(%rsp)
leaq 0xb8(%rdi), %rax
movq %rax, 0x20(%rsp)
xorl %r14d, %r14d
leaq 0x8(%rsp), %rbp
movq %rsi, 0x28(%rsp)
movq 0x68(%r15), %r12
movq 0x90(%r15), %rsi
movq %rsi, %rax
subq 0x88(%r15), %rax
sarq %rax
subq %rax, %r12
cmpq %rbx, %r12
cmovaeq %rbx, %r12
leaq (%r14,%r14), %rdx
addq (%r13), %rdx
leaq (%rdx,%r12,2), %rcx
movq 0x40(%rsp), %rdi
callq 0x3830
movq 0x68(%r15), %rsi
movq 0x90(%r15), %rax
subq 0x88(%r15), %rax
sarq %rax
cmpq %rsi, %rax
jb 0x2c87
movq %rbp, %rdi
leaq 0x4(%rsp), %rdx
callq 0x36a8
movq 0x68(%r15), %rax
testq %rax, %rax
je 0x2b45
movq 0x88(%r15), %rcx
movq 0xa0(%r15), %rdx
movq 0x8(%rsp), %rsi
xorl %edi, %edi
movswl (%rcx,%rdi,2), %r8d
xorps %xmm0, %xmm0
cvtsi2sd %r8d, %xmm0
mulsd (%rdx,%rdi,8), %xmm0
movsd %xmm0, (%rsi,%rdi,8)
incq %rdi
cmpq %rdi, %rax
jne 0x2b26
movq %r15, %rdi
movq %rbp, %rsi
movq 0x38(%rsp), %rdx
callq 0x3732
movq %rbp, %rsi
movl %eax, %ebp
movq %r15, %rdi
movq 0x30(%rsp), %rdx
callq 0x3732
movzwl (%r15), %ecx
cmpw %cx, %bp
setne %dl
cmpw %cx, %ax
setne %cl
testb %cl, %dl
jne 0x2b8a
movq %r15, %rdi
xorl %esi, %esi
callq 0x37b4
jmp 0x2c18
shll $0x10, %eax
movzwl %bp, %ecx
orl %eax, %ecx
movl %ecx, 0x4(%rsp)
movq 0x20(%rsp), %rdi
leaq 0x4(%rsp), %rsi
callq 0x3ba8
movq %rax, %rbp
leaq 0x20(%rax), %rsi
movq %r15, %rdi
callq 0x37b4
movq 0x28(%rbp), %rax
movq 0x70(%r15), %rcx
addq %rax, %rcx
movq %rcx, 0x28(%rbp)
movq 0x68(%r15), %rsi
cmpq %rsi, %rax
setae %al
cmpq %rsi, %rcx
setb %dl
orb %al, %dl
je 0x2c08
movq %rcx, %rax
xorl %edx, %edx
divq %rsi
testq %rdx, %rdx
jne 0x2c18
movq 0x48(%r15), %rdi
movzbl 0x30(%rbp), %r8d
movq %rcx, %rax
xorl %edx, %edx
divq 0x58(%r15)
movq (%rdi), %r9
movq %r15, %rsi
movl %r8d, %edx
movq %rax, %rcx
callq *0x8(%r9)
jmp 0x2c18
movq 0x48(%r15), %rdi
movzbl 0x30(%rbp), %edx
movq (%rdi), %rax
movq %r15, %rsi
callq *(%rax)
movq 0x70(%r15), %rax
testq %rax, %rax
je 0x2c6b
movq 0x88(%r15), %rbp
leaq (,%rax,2), %r13
addq %rbp, %r13
movq 0x90(%r15), %rdx
subq %r13, %rdx
je 0x2c4a
movq %rbp, %rdi
movq %r13, %rsi
callq 0x2210
movq 0x90(%r15), %rax
movq %rax, %rcx
subq %r13, %rcx
addq %rcx, %rbp
cmpq %rbp, %rax
movq 0x28(%rsp), %r13
je 0x2c6b
movq %rbp, 0x90(%r15)
movq 0x8(%rsp), %rdi
testq %rdi, %rdi
je 0x2c82
movq 0x18(%rsp), %rsi
subq %rdi, %rsi
callq 0x2190
leaq 0x8(%rsp), %rbp
addq %r12, %r14
subq %r12, %rbx
addq %r12, 0x78(%r15)
testq %rbx, %rbx
jne 0x2aa5
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x2cb1
jmp 0x2cb1
jmp 0x2cb1
jmp 0x2cb1
movq %rax, %rbx
movq 0x8(%rsp), %rdi
testq %rdi, %rdi
je 0x2ccb
movq 0x18(%rsp), %rsi
subq %rdi, %rsi
callq 0x2190
movq %rbx, %rdi
callq 0x2240
nop