// File: rowdyroad[P]dtmfdecoder/./DTMFDecoder.h
// Function: DTMFDecoder<short>::DTMFDecoder(DTMFDecoder<short>::Handler*, unsigned long, unsigned long, unsigned long, double)
DTMFDecoder(Handler* handler, size_t sampleRate = 8000, size_t windowDurationMilliseconds = 50, size_t windowOverlapMilliseconds = 10, double thresold = -59.0)
        : handler_(handler)
        , sampleRate_(sampleRate)
        , windowDurationMilliseconds_(windowDurationMilliseconds)
        , thresold_(thresold)
      {
          if (windowOverlapMilliseconds > windowDurationMilliseconds_) {
            windowOverlapMilliseconds = windowDurationMilliseconds_;
          }
          samplesPerMilliseconds_ = sampleRate_ / 1000;
          framesCount_ = samplesPerMilliseconds_* windowDurationMilliseconds_;
          overlapFramesCount_ = samplesPerMilliseconds_ * windowOverlapMilliseconds;
          windowFrames_.reserve(framesCount_);

          createWindowFunctionTable();
          reset();
      }

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0xc0, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movq %r8, -0x28(%rbp)
movsd %xmm0, -0x30(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x98(%rbp)
movw $0x0, (%rax)
addq $0x8, %rax
movq %rax, -0x90(%rbp)
movw $0x2b9, -0x48(%rbp)     # imm = 0x2B9
movw $0x302, -0x46(%rbp)     # imm = 0x302
movw $0x354, -0x44(%rbp)     # imm = 0x354
movw $0x3ad, -0x42(%rbp)     # imm = 0x3AD
leaq -0x48(%rbp), %rax
movq %rax, -0x40(%rbp)
movq $0x4, -0x38(%rbp)
leaq -0x49(%rbp), %rdi
movq %rdi, -0x88(%rbp)
callq 0x4740
movq -0x90(%rbp), %rdi
movq -0x88(%rbp), %rcx
movq -0x40(%rbp), %rsi
movq -0x38(%rbp), %rdx
callq 0x4760
jmp 0x2ae4
leaq -0x49(%rbp), %rdi
callq 0x47e0
movq -0x98(%rbp), %rax
addq $0x20, %rax
movq %rax, -0xa8(%rbp)
movw $0x4b9, -0x78(%rbp)     # imm = 0x4B9
movw $0x538, -0x76(%rbp)     # imm = 0x538
movw $0x5c5, -0x74(%rbp)     # imm = 0x5C5
movw $0x661, -0x72(%rbp)     # imm = 0x661
leaq -0x78(%rbp), %rax
movq %rax, -0x70(%rbp)
movq $0x4, -0x68(%rbp)
leaq -0x79(%rbp), %rdi
movq %rdi, -0xa0(%rbp)
callq 0x4740
movq -0xa8(%rbp), %rdi
movq -0xa0(%rbp), %rcx
movq -0x70(%rbp), %rsi
movq -0x68(%rbp), %rdx
callq 0x4760
jmp 0x2b54
leaq -0x79(%rbp), %rdi
callq 0x47e0
movq -0x98(%rbp), %rdi
movb $0x31, 0x38(%rdi)
movb $0x32, 0x39(%rdi)
movb $0x33, 0x3a(%rdi)
movb $0x41, 0x3b(%rdi)
movb $0x34, 0x3c(%rdi)
movb $0x35, 0x3d(%rdi)
movb $0x36, 0x3e(%rdi)
movb $0x42, 0x3f(%rdi)
movb $0x37, 0x40(%rdi)
movb $0x38, 0x41(%rdi)
movb $0x39, 0x42(%rdi)
movb $0x43, 0x43(%rdi)
movb $0x2a, 0x44(%rdi)
movb $0x30, 0x45(%rdi)
movb $0x23, 0x46(%rdi)
movb $0x44, 0x47(%rdi)
movq -0x10(%rbp), %rax
movq %rax, 0x48(%rdi)
movq -0x18(%rbp), %rax
movq %rax, 0x50(%rdi)
movq -0x20(%rbp), %rax
movq %rax, 0x60(%rdi)
movsd -0x30(%rbp), %xmm0
movsd %xmm0, 0x80(%rdi)
addq $0x88, %rdi
movq %rdi, -0xc0(%rbp)
callq 0x4800
movq -0x98(%rbp), %rdi
addq $0xa0, %rdi
movq %rdi, -0xb8(%rbp)
callq 0x4820
movq -0x98(%rbp), %rdi
addq $0xb8, %rdi
movq %rdi, -0xb0(%rbp)
callq 0x4840
movq -0x98(%rbp), %rcx
movq -0x28(%rbp), %rax
cmpq 0x60(%rcx), %rax
jbe 0x2c66
movq -0x98(%rbp), %rax
movq 0x60(%rax), %rax
movq %rax, -0x28(%rbp)
jmp 0x2c66
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x58(%rbp)
movl %eax, -0x5c(%rbp)
leaq -0x49(%rbp), %rdi
callq 0x47e0
jmp 0x2d33
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x58(%rbp)
movl %eax, -0x5c(%rbp)
leaq -0x79(%rbp), %rdi
callq 0x47e0
jmp 0x2d27
movq -0x98(%rbp), %rax
movq 0x50(%rax), %rax
shrq $0x3, %rax
movabsq $0x20c49ba5e353f7cf, %rcx # imm = 0x20C49BA5E353F7CF
mulq %rcx
movq -0x98(%rbp), %rax
shrq $0x4, %rdx
movq %rdx, 0x58(%rax)
movq 0x58(%rax), %rcx
movq 0x60(%rax), %rdx
imulq %rdx, %rcx
movq %rcx, 0x68(%rax)
movq 0x58(%rax), %rcx
movq -0x28(%rbp), %rdx
imulq %rdx, %rcx
movq %rcx, 0x70(%rax)
movq %rax, %rdi
addq $0x88, %rdi
movq 0x68(%rax), %rsi
callq 0x4860
jmp 0x2cc6
movq -0x98(%rbp), %rdi
callq 0x4950
jmp 0x2cd4
movq -0x98(%rbp), %rdi
callq 0x4af0
jmp 0x2ce2
addq $0xc0, %rsp
popq %rbp
retq
movq -0xb0(%rbp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x58(%rbp)
movl %eax, -0x5c(%rbp)
callq 0x35c0
movq -0xb8(%rbp), %rdi
callq 0x35e0
movq -0xc0(%rbp), %rdi
callq 0x33d0
movq -0xa8(%rbp), %rdi
callq 0x3640
movq -0x90(%rbp), %rdi
callq 0x3640
movq -0x58(%rbp), %rdi
callq 0x22a0
nopl (%rax)