// File: /workspace/github_cpp_makefile_star2_O3/elarielcl[P]ArielsSequitur/TestSequitur.cpp
// Function: main
int main() {
  vector<char*> v;
  vector <char*> :: iterator s;

  v.push_back((char*)"abcdbcabcd");
  v.push_back((char*)"cdddcdaddcd");
  v.push_back((char*)"cdddcdaddcdcdddcdaddcdcdddcdaddcdcdddcdaddcdcdddcdaddcdcdddcdaddcdcdddcdaddcdcdddcdaddcd");
  v.push_back((char*)"aaaaaaaaaaaaaaaaaaaaaaaa");
  v.push_back((char*)"ababababababababab");

  cout << "SIMPLE TEST" << endl << "=====================================" << endl << endl;
  for (s = v.begin(); s != v.end(); ++s)
    simpleTest(*s);

  vector<int> nOR;
  nOR.push_back(3);
  nOR.push_back(3);
  nOR.push_back(6);
  nOR.push_back(4);
  nOR.push_back(4); // Precomputed Values
  cout << "GRAMMAR SIZE TEST" << endl << "=====================================" << endl << endl;
  for (int i = 0; i < nOR.size(); ++i)
    numberOfRulesTest(v[i], nOR[i]);


  vector<int> sizes;
  sizes.push_back(8);
  sizes.push_back(9);
  sizes.push_back(15);
  sizes.push_back(9);
  sizes.push_back(9); // Precomputed Values
  cout << "GRAMMAR SIZE TEST" << endl << "=====================================" << endl << endl;
  for (int i = 0; i < sizes.size(); ++i)
    grammarSizeTest(v[i], sizes[i]);

  cout << "RULE USAGE TEST" << endl << "=====================================" << endl << endl;
  for (s = v.begin(); s != v.end(); ++s)
    ruleUsageTest(*s);

  cout << "DIGRAM UNIQUENESS TEST" << endl << "=====================================" << endl << endl;
  for (s = v.begin(); s != v.end(); ++s)
    digramUniquenessTest(*s);

}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
subq $0x68, %rsp
xorps %xmm0, %xmm0
leaq -0x70(%rbp), %rdi
movaps %xmm0, (%rdi)
movq $0x0, 0x10(%rdi)
leaq 0x3b76(%rip), %rax      # 0x6004
leaq -0x50(%rbp), %rsi
movq %rax, (%rsi)
callq 0x3bc0
leaq 0x3bbb(%rip), %rax      # 0x605c
leaq -0x50(%rbp), %rsi
movq %rax, (%rsi)
leaq -0x70(%rbp), %rdi
callq 0x3bc0
leaq 0x3b57(%rip), %rax      # 0x600f
leaq -0x50(%rbp), %rsi
movq %rax, (%rsi)
leaq -0x70(%rbp), %rdi
callq 0x3bc0
leaq 0x3b99(%rip), %rax      # 0x6068
leaq -0x50(%rbp), %rsi
movq %rax, (%rsi)
leaq -0x70(%rbp), %rdi
callq 0x3bc0
leaq 0x3b9b(%rip), %rax      # 0x6081
leaq -0x50(%rbp), %rsi
movq %rax, (%rsi)
leaq -0x70(%rbp), %rdi
callq 0x3bc0
movq 0x6adb(%rip), %rbx      # 0x8fd8
leaq 0x3b90(%rip), %rsi      # 0x6094
movl $0xb, %edx
movq %rbx, %rdi
callq 0x2190
movq (%rbx), %rax
addq -0x18(%rax), %rbx
movq %rbx, %rdi
movl $0xa, %esi
callq 0x2140
movsbl %al, %esi
movq 0x6aa9(%rip), %rdi      # 0x8fd8
callq 0x2040
movq %rax, %rdi
callq 0x20d0
movq %rax, %rbx
leaq 0x3b5a(%rip), %rsi      # 0x60a0
movl $0x25, %edx
movq %rax, %rdi
callq 0x2190
movq (%rbx), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x2140
movsbl %al, %esi
movq %rbx, %rdi
callq 0x2040
movq %rax, %rdi
callq 0x20d0
movq %rax, %rbx
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x2140
movsbl %al, %esi
movq %rbx, %rdi
callq 0x2040
movq %rax, %rdi
callq 0x20d0
movq -0x70(%rbp), %rbx
cmpq -0x68(%rbp), %rbx
je 0x25bc
movq (%rbx), %rdi
callq 0x2b9c
addq $0x8, %rbx
jmp 0x25a8
xorps %xmm0, %xmm0
leaq -0x50(%rbp), %rdi
movaps %xmm0, (%rdi)
movq $0x0, 0x10(%rdi)
leaq -0x30(%rbp), %rdx
movl $0x3, (%rdx)
xorl %esi, %esi
callq 0x3d42
movq -0x48(%rbp), %rsi
movq -0x40(%rbp), %rax
movl $0x3, -0x30(%rbp)
cmpq %rax, %rsi
je 0x2603
movl $0x3, (%rsi)
addq $0x4, %rsi
movq %rsi, -0x48(%rbp)
jmp 0x2618
leaq -0x50(%rbp), %rdi
leaq -0x30(%rbp), %rdx
callq 0x3d42
movq -0x48(%rbp), %rsi
movq -0x40(%rbp), %rax
movl $0x6, -0x30(%rbp)
cmpq %rax, %rsi
je 0x2634
movl $0x6, (%rsi)
addq $0x4, %rsi
movq %rsi, -0x48(%rbp)
jmp 0x2649
leaq -0x50(%rbp), %rdi
leaq -0x30(%rbp), %rdx
callq 0x3d42
movq -0x48(%rbp), %rsi
movq -0x40(%rbp), %rax
movl $0x4, -0x30(%rbp)
cmpq %rax, %rsi
je 0x2665
movl $0x4, (%rsi)
addq $0x4, %rsi
movq %rsi, -0x48(%rbp)
jmp 0x267a
leaq -0x50(%rbp), %rdi
leaq -0x30(%rbp), %rdx
callq 0x3d42
movq -0x48(%rbp), %rsi
movq -0x40(%rbp), %rax
movl $0x4, -0x30(%rbp)
cmpq %rax, %rsi
je 0x2696
movl $0x4, (%rsi)
addq $0x4, %rsi
movq %rsi, -0x48(%rbp)
jmp 0x26a3
leaq -0x50(%rbp), %rdi
leaq -0x30(%rbp), %rdx
callq 0x3d42
movq 0x692e(%rip), %rbx      # 0x8fd8
leaq 0x3a15(%rip), %rsi      # 0x60c6
movl $0x11, %edx
movq %rbx, %rdi
callq 0x2190
movq (%rbx), %rax
addq -0x18(%rax), %rbx
movq %rbx, %rdi
movl $0xa, %esi
callq 0x2140
movsbl %al, %esi
movq 0x68fc(%rip), %rdi      # 0x8fd8
callq 0x2040
movq %rax, %rdi
callq 0x20d0
movq %rax, %rbx
leaq 0x39ad(%rip), %rsi      # 0x60a0
movl $0x25, %edx
movq %rax, %rdi
callq 0x2190
movq (%rbx), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x2140
movsbl %al, %esi
movq %rbx, %rdi
callq 0x2040
movq %rax, %rdi
callq 0x20d0
movq %rax, %rbx
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x2140
movsbl %al, %esi
movq %rbx, %rdi
callq 0x2040
movq %rax, %rdi
callq 0x20d0
movq -0x50(%rbp), %rax
cmpq %rax, -0x48(%rbp)
je 0x2784
xorl %ebx, %ebx
movq -0x70(%rbp), %rcx
movq (%rcx,%rbx,8), %rdi
movl (%rax,%rbx,4), %esi
callq 0x2e61
incq %rbx
movq -0x50(%rbp), %rax
movq -0x48(%rbp), %rcx
subq %rax, %rcx
sarq $0x2, %rcx
cmpq %rbx, %rcx
ja 0x275d
xorps %xmm0, %xmm0
leaq -0x30(%rbp), %rdi
movaps %xmm0, (%rdi)
movq $0x0, 0x10(%rdi)
leaq -0xc(%rbp), %rdx
movl $0x8, (%rdx)
xorl %esi, %esi
callq 0x3d42
movq -0x28(%rbp), %rsi
movq -0x20(%rbp), %rax
movl $0x9, -0xc(%rbp)
cmpq %rax, %rsi
je 0x27cb
movl $0x9, (%rsi)
addq $0x4, %rsi
movq %rsi, -0x28(%rbp)
jmp 0x27e0
leaq -0x30(%rbp), %rdi
leaq -0xc(%rbp), %rdx
callq 0x3d42
movq -0x28(%rbp), %rsi
movq -0x20(%rbp), %rax
movl $0xf, -0xc(%rbp)
cmpq %rax, %rsi
je 0x27fc
movl $0xf, (%rsi)
addq $0x4, %rsi
movq %rsi, -0x28(%rbp)
jmp 0x2811
leaq -0x30(%rbp), %rdi
leaq -0xc(%rbp), %rdx
callq 0x3d42
movq -0x28(%rbp), %rsi
movq -0x20(%rbp), %rax
movl $0x9, -0xc(%rbp)
cmpq %rax, %rsi
je 0x282d
movl $0x9, (%rsi)
addq $0x4, %rsi
movq %rsi, -0x28(%rbp)
jmp 0x2842
leaq -0x30(%rbp), %rdi
leaq -0xc(%rbp), %rdx
callq 0x3d42
movq -0x28(%rbp), %rsi
movq -0x20(%rbp), %rax
movl $0x9, -0xc(%rbp)
cmpq %rax, %rsi
je 0x285e
movl $0x9, (%rsi)
addq $0x4, %rsi
movq %rsi, -0x28(%rbp)
jmp 0x286b
leaq -0x30(%rbp), %rdi
leaq -0xc(%rbp), %rdx
callq 0x3d42
movq 0x6766(%rip), %rbx      # 0x8fd8
leaq 0x384d(%rip), %rsi      # 0x60c6
movl $0x11, %edx
movq %rbx, %rdi
callq 0x2190
movq (%rbx), %rax
addq -0x18(%rax), %rbx
movq %rbx, %rdi
movl $0xa, %esi
callq 0x2140
movsbl %al, %esi
movq 0x6734(%rip), %rdi      # 0x8fd8
callq 0x2040
movq %rax, %rdi
callq 0x20d0
movq %rax, %rbx
leaq 0x37e5(%rip), %rsi      # 0x60a0
movl $0x25, %edx
movq %rax, %rdi
callq 0x2190
movq (%rbx), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x2140
movsbl %al, %esi
movq %rbx, %rdi
callq 0x2040
movq %rax, %rdi
callq 0x20d0
movq %rax, %rbx
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x2140
movsbl %al, %esi
movq %rbx, %rdi
callq 0x2040
movq %rax, %rdi
callq 0x20d0
movq -0x30(%rbp), %rax
cmpq %rax, -0x28(%rbp)
je 0x294c
xorl %ebx, %ebx
movq -0x70(%rbp), %rcx
movq (%rcx,%rbx,8), %rdi
movl (%rax,%rbx,4), %esi
callq 0x3050
incq %rbx
movq -0x30(%rbp), %rax
movq -0x28(%rbp), %rcx
subq %rax, %rcx
sarq $0x2, %rcx
cmpq %rbx, %rcx
ja 0x2925
movq 0x6685(%rip), %rbx      # 0x8fd8
leaq 0x377e(%rip), %rsi      # 0x60d8
movl $0xf, %edx
movq %rbx, %rdi
callq 0x2190
movq (%rbx), %rax
addq -0x18(%rax), %rbx
movq %rbx, %rdi
movl $0xa, %esi
callq 0x2140
movsbl %al, %esi
movq 0x6653(%rip), %rdi      # 0x8fd8
callq 0x2040
movq %rax, %rdi
callq 0x20d0
movq %rax, %rbx
leaq 0x3704(%rip), %rsi      # 0x60a0
movl $0x25, %edx
movq %rax, %rdi
callq 0x2190
movq (%rbx), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x2140
movsbl %al, %esi
movq %rbx, %rdi
callq 0x2040
movq %rax, %rdi
callq 0x20d0
movq %rax, %rbx
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x2140
movsbl %al, %esi
movq %rbx, %rdi
callq 0x2040
movq %rax, %rdi
callq 0x20d0
movq -0x70(%rbp), %rbx
cmpq -0x68(%rbp), %rbx
je 0x2a12
movq (%rbx), %rdi
callq 0x323f
addq $0x8, %rbx
jmp 0x29fe
movq 0x65bf(%rip), %rbx      # 0x8fd8
leaq 0x36c8(%rip), %rsi      # 0x60e8
movl $0x16, %edx
movq %rbx, %rdi
callq 0x2190
movq (%rbx), %rax
addq -0x18(%rax), %rbx
movq %rbx, %rdi
movl $0xa, %esi
callq 0x2140
movsbl %al, %esi
movq 0x658d(%rip), %rdi      # 0x8fd8
callq 0x2040
movq %rax, %rdi
callq 0x20d0
movq %rax, %rbx
leaq 0x363e(%rip), %rsi      # 0x60a0
movl $0x25, %edx
movq %rax, %rdi
callq 0x2190
movq (%rbx), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x2140
movsbl %al, %esi
movq %rbx, %rdi
callq 0x2040
movq %rax, %rdi
callq 0x20d0
movq %rax, %rbx
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x2140
movsbl %al, %esi
movq %rbx, %rdi
callq 0x2040
movq %rax, %rdi
callq 0x20d0
movq -0x70(%rbp), %rbx
cmpq -0x68(%rbp), %rbx
je 0x2ad8
movq (%rbx), %rdi
callq 0x36a8
addq $0x8, %rbx
jmp 0x2ac4
movq -0x30(%rbp), %rdi
testq %rdi, %rdi
je 0x2aed
movq -0x20(%rbp), %rsi
subq %rdi, %rsi
callq 0x2170
movq -0x50(%rbp), %rdi
testq %rdi, %rdi
je 0x2b02
movq -0x40(%rbp), %rsi
subq %rdi, %rsi
callq 0x2170
movq -0x70(%rbp), %rdi
testq %rdi, %rdi
je 0x2b17
movq -0x60(%rbp), %rsi
subq %rdi, %rsi
callq 0x2170
xorl %eax, %eax
addq $0x68, %rsp
popq %rbx
popq %rbp
retq
jmp 0x2b52
jmp 0x2b52
jmp 0x2b52
jmp 0x2b52
jmp 0x2b48
jmp 0x2b48
jmp 0x2b48
jmp 0x2b48
jmp 0x2b52
jmp 0x2b48
jmp 0x2b4d
jmp 0x2b4d
jmp 0x2b4d
jmp 0x2b4d
jmp 0x2b4d
jmp 0x2b48
jmp 0x2b4d
jmp 0x2b52
jmp 0x2b52
jmp 0x2b52
movq %rax, %rbx
jmp 0x2b6a
movq %rax, %rbx
jmp 0x2b7f
movq %rax, %rbx
movq -0x30(%rbp), %rdi
testq %rdi, %rdi
je 0x2b6a
movq -0x20(%rbp), %rsi
subq %rdi, %rsi
callq 0x2170
movq -0x50(%rbp), %rdi
testq %rdi, %rdi
je 0x2b7f
movq -0x40(%rbp), %rsi
subq %rdi, %rsi
callq 0x2170
movq -0x70(%rbp), %rdi
testq %rdi, %rdi
je 0x2b94
movq -0x60(%rbp), %rsi
subq %rdi, %rsi
callq 0x2170
movq %rbx, %rdi
callq 0x2210