// File: 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
movq %rsp, %rbp
subq $0x180, %rsp            # imm = 0x180
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x100(%rbp)
movq $0x0, -0x20(%rbp)
cmpq $0x0, -0x18(%rbp)
jbe 0x335a
movq -0x100(%rbp), %rdi
movq 0x68(%rdi), %rax
movq %rax, -0x110(%rbp)
addq $0x88, %rdi
callq 0x2d60
movq %rax, %rcx
movq -0x110(%rbp), %rax
subq %rcx, %rax
movq %rax, -0x30(%rbp)
leaq -0x18(%rbp), %rdi
leaq -0x30(%rbp), %rsi
callq 0x41b0
movq -0x100(%rbp), %rdi
movq (%rax), %rax
movq %rax, -0x28(%rbp)
movq %rdi, %rax
addq $0x88, %rax
movq %rax, -0x108(%rbp)
addq $0x88, %rdi
callq 0x6d90
movq %rax, -0x40(%rbp)
leaq -0x38(%rbp), %rdi
leaq -0x40(%rbp), %rsi
callq 0x6dc0
movq -0x10(%rbp), %rdi
callq 0x6e00
movq %rax, -0x50(%rbp)
movq -0x20(%rbp), %rsi
leaq -0x50(%rbp), %rdi
callq 0x6e30
movq %rax, -0x48(%rbp)
movq -0x10(%rbp), %rdi
callq 0x6e00
movq %rax, -0x68(%rbp)
movq -0x20(%rbp), %rsi
leaq -0x68(%rbp), %rdi
callq 0x6e30
movq %rax, -0x60(%rbp)
movq -0x28(%rbp), %rsi
leaq -0x60(%rbp), %rdi
callq 0x6e30
movq -0x108(%rbp), %rdi
movq %rax, -0x58(%rbp)
movq -0x38(%rbp), %rsi
movq -0x48(%rbp), %rdx
movq -0x58(%rbp), %rcx
callq 0x6ce0
movq -0x100(%rbp), %rdi
movq %rax, -0x70(%rbp)
movq -0x28(%rbp), %rax
addq -0x20(%rbp), %rax
movq %rax, -0x20(%rbp)
movq -0x28(%rbp), %rcx
movq -0x18(%rbp), %rax
subq %rcx, %rax
movq %rax, -0x18(%rbp)
addq $0x88, %rdi
callq 0x2d60
movq -0x100(%rbp), %rcx
cmpq 0x68(%rcx), %rax
jb 0x3342
movq -0x100(%rbp), %rax
movq 0x68(%rax), %rax
movq %rax, -0x120(%rbp)
leaq -0x89(%rbp), %rdi
movq %rdi, -0x118(%rbp)
callq 0x6e70
movq -0x120(%rbp), %rsi
movq -0x118(%rbp), %rdx
leaq -0x88(%rbp), %rdi
callq 0x6e90
jmp 0x2f15
leaq -0x89(%rbp), %rdi
callq 0x6f00
movq $0x0, -0xa8(%rbp)
movq -0x100(%rbp), %rcx
movq -0xa8(%rbp), %rax
cmpq 0x68(%rcx), %rax
jae 0x2ff8
movq -0x100(%rbp), %rdi
addq $0xa0, %rdi
movq -0xa8(%rbp), %rsi
callq 0x5640
movq -0x100(%rbp), %rdi
movsd (%rax), %xmm0
movsd %xmm0, -0x130(%rbp)
addq $0x88, %rdi
movq -0xa8(%rbp), %rsi
callq 0x6f20
movsd -0x130(%rbp), %xmm0
movswl (%rax), %eax
cvtsi2sd %eax, %xmm1
mulsd %xmm1, %xmm0
movsd %xmm0, -0x128(%rbp)
movq -0xa8(%rbp), %rsi
leaq -0x88(%rbp), %rdi
callq 0x5640
movsd -0x128(%rbp), %xmm0
movsd %xmm0, (%rax)
movq -0xa8(%rbp), %rax
addq $0x1, %rax
movq %rax, -0xa8(%rbp)
jmp 0x2f2c
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x98(%rbp)
movl %eax, -0x9c(%rbp)
leaq -0x89(%rbp), %rdi
callq 0x6f00
jmp 0x3363
movq -0x100(%rbp), %rdi
movq %rdi, %rdx
addq $0x8, %rdx
leaq -0x88(%rbp), %rsi
callq 0x6f40
movw %ax, -0x132(%rbp)
jmp 0x301b
movq -0x100(%rbp), %rdi
movw -0x132(%rbp), %ax
movw %ax, -0xaa(%rbp)
movq %rdi, %rdx
addq $0x20, %rdx
leaq -0x88(%rbp), %rsi
callq 0x6f40
movw %ax, -0x134(%rbp)
jmp 0x304c
movq -0x100(%rbp), %rcx
movw -0x134(%rbp), %ax
movw %ax, -0xac(%rbp)
movzwl -0xaa(%rbp), %eax
movzwl (%rcx), %ecx
cmpl %ecx, %eax
je 0x3084
movq -0x100(%rbp), %rcx
movzwl -0xac(%rbp), %eax
movzwl (%rcx), %ecx
cmpl %ecx, %eax
jne 0x30be
movq -0x100(%rbp), %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0x7020
jmp 0x3096
jmp 0x328a
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x98(%rbp)
movl %eax, -0x9c(%rbp)
leaq -0x88(%rbp), %rdi
callq 0x35e0
jmp 0x3363
movq -0x100(%rbp), %rax
addq $0xb8, %rax
movq %rax, -0x140(%rbp)
leaq -0xaa(%rbp), %rdi
leaq -0xac(%rbp), %rsi
callq 0x6320
movl %eax, -0x138(%rbp)
jmp 0x30ed
movq -0x140(%rbp), %rdi
movl -0x138(%rbp), %eax
movl %eax, -0xbc(%rbp)
leaq -0xbc(%rbp), %rsi
callq 0x70f0
movq %rax, -0x148(%rbp)
jmp 0x3115
movq -0x148(%rbp), %rax
movq %rax, -0xb8(%rbp)
leaq -0xb8(%rbp), %rdi
callq 0x7120
movq -0x100(%rbp), %rdi
movq %rax, %rsi
callq 0x7020
jmp 0x3140
leaq -0xb8(%rbp), %rdi
callq 0x7120
movq %rax, %rcx
movq -0x100(%rbp), %rax
movq 0x8(%rcx), %rcx
movq %rcx, -0xc8(%rbp)
movq 0x70(%rax), %rax
movq %rax, -0x150(%rbp)
leaq -0xb8(%rbp), %rdi
callq 0x7120
movq -0x150(%rbp), %rdx
movq -0x100(%rbp), %rcx
addq 0x8(%rax), %rdx
movq %rdx, 0x8(%rax)
movq -0xc8(%rbp), %rax
cmpq 0x68(%rcx), %rax
jae 0x31f7
leaq -0xb8(%rbp), %rdi
callq 0x7120
movq -0x100(%rbp), %rcx
movq 0x8(%rax), %rax
cmpq 0x68(%rcx), %rax
jb 0x31f7
movq -0x100(%rbp), %rax
movq 0x48(%rax), %rax
movq %rax, -0x158(%rbp)
leaq -0xb8(%rbp), %rdi
callq 0x7120
movq -0x158(%rbp), %rdi
movq -0x100(%rbp), %rsi
movzbl 0x10(%rax), %edx
movq (%rdi), %rax
movq (%rax), %rax
callq *%rax
jmp 0x31f2
jmp 0x3288
leaq -0xb8(%rbp), %rdi
callq 0x7120
movq -0x100(%rbp), %rcx
movq 0x8(%rax), %rax
xorl %edx, %edx
divq 0x68(%rcx)
cmpq $0x0, %rdx
jne 0x3286
movq -0x100(%rbp), %rax
movq 0x48(%rax), %rax
movq %rax, -0x168(%rbp)
leaq -0xb8(%rbp), %rdi
movq %rdi, -0x170(%rbp)
callq 0x7120
movq -0x170(%rbp), %rdi
movzbl 0x10(%rax), %eax
movl %eax, -0x15c(%rbp)
callq 0x7120
movq -0x168(%rbp), %rdi
movq -0x100(%rbp), %rsi
movq 0x8(%rax), %rax
movq 0x58(%rsi), %rcx
xorl %edx, %edx
divq %rcx
movl -0x15c(%rbp), %edx
movq %rax, %rcx
movq (%rdi), %rax
movq 0x8(%rax), %rax
callq *%rax
jmp 0x3284
jmp 0x3286
jmp 0x3288
jmp 0x328a
movq -0x100(%rbp), %rdi
addq $0x88, %rdi
movq %rdi, -0x180(%rbp)
callq 0x71d0
movq %rax, -0xd8(%rbp)
leaq -0xd0(%rbp), %rdi
leaq -0xd8(%rbp), %rsi
callq 0x6dc0
movq -0x180(%rbp), %rdi
callq 0x71d0
movq %rax, %rcx
movq -0x100(%rbp), %rax
movq %rcx, -0xf0(%rbp)
movq 0x70(%rax), %rsi
leaq -0xf0(%rbp), %rdi
callq 0x7200
movq %rax, -0xe8(%rbp)
leaq -0xe0(%rbp), %rdi
leaq -0xe8(%rbp), %rsi
callq 0x6dc0
movq -0x180(%rbp), %rdi
movq -0xd0(%rbp), %rsi
movq -0xe0(%rbp), %rdx
callq 0x7140
movq %rax, -0x178(%rbp)
jmp 0x3328
movq -0x178(%rbp), %rax
movq %rax, -0xf8(%rbp)
leaq -0x88(%rbp), %rdi
callq 0x35e0
movq -0x100(%rbp), %rax
movq -0x28(%rbp), %rcx
addq 0x78(%rax), %rcx
movq %rcx, 0x78(%rax)
jmp 0x2daa
addq $0x180, %rsp            # imm = 0x180
popq %rbp
retq
movq -0x98(%rbp), %rdi
callq 0x22a0
nop