// File: elarielcl[P]ArielsSequitur/TestSequitur.cpp
// Function: simpleTest(char*)
void simpleTest(char string[]) {
  cout << "INPUT=" << string << endl;
  SequiturGrammar* grammar = new SequiturGrammar();
  for (int i = 0; string[i]!=0; ++i)
    grammar->put(string[i]);
  cout << "GRAMMAR" << endl;
  grammar->print();

  cout << "OUTPUT=";
  grammar->printUncompress();
  cout << endl;
  std::string s="";
  grammar->getUncompress(&s);
  if (s == string) cout << "SUCCESSFUL TEST (OUTPUT == INPUT)" << endl;
  else {
    cout << "WRONG TEST (OUTPUT != INPUT)" << endl;
    exit(1);
  }

  cout << "================" << endl << endl;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x90, %rsp
movq %rdi, -0x8(%rbp)
movq 0xe382(%rip), %rdi      # 0x10fd8
leaq 0x84a2(%rip), %rsi      # 0xb0ff
callq 0x2150
movq %rax, %rdi
movq -0x8(%rbp), %rsi
callq 0x2150
movq %rax, %rdi
movq 0xe350(%rip), %rsi      # 0x10fc8
callq 0x2190
movl $0x28, %edi
callq 0x2160
movq %rax, %rdi
movq %rdi, %rax
movq %rax, -0x50(%rbp)
movl $0x100, %esi            # imm = 0x100
movl $0x774dfe0, %edx        # imm = 0x774DFE0
callq 0x7ef0
jmp 0x2ca2
movq -0x50(%rbp), %rax
movq %rax, -0x10(%rbp)
movl $0x0, -0x20(%rbp)
movq -0x8(%rbp), %rax
movslq -0x20(%rbp), %rcx
movsbl (%rax,%rcx), %eax
cmpl $0x0, %eax
je 0x2d01
movq -0x10(%rbp), %rdi
movq -0x8(%rbp), %rax
movslq -0x20(%rbp), %rcx
movsbl (%rax,%rcx), %esi
callq 0x7ff0
movl -0x20(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x20(%rbp)
jmp 0x2cb1
movq -0x50(%rbp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x18(%rbp)
movl %eax, -0x1c(%rbp)
movl $0x28, %esi
callq 0x2170
jmp 0x2ea5
movq 0xe2d0(%rip), %rdi      # 0x10fd8
movq %rdi, -0x68(%rbp)
leaq 0x849c(%rip), %rsi      # 0xb1af
callq 0x2150
movq %rax, %rdi
movq 0xe2a6(%rip), %rsi      # 0x10fc8
movq %rsi, -0x60(%rbp)
callq 0x2190
movq -0x10(%rbp), %rdi
callq 0x8110
movq -0x68(%rbp), %rdi
leaq 0x8478(%rip), %rsi      # 0xb1b7
callq 0x2150
movq -0x10(%rbp), %rdi
callq 0x8130
movq -0x68(%rbp), %rdi
movq -0x60(%rbp), %rsi
callq 0x2190
leaq -0x41(%rbp), %rdi
movq %rdi, -0x58(%rbp)
callq 0x2270
movq -0x58(%rbp), %rdx
leaq 0x8530(%rip), %rsi      # 0xb2a2
leaq -0x40(%rbp), %rdi
callq 0x42f0
jmp 0x2d7d
leaq -0x41(%rbp), %rdi
callq 0x21b0
movq -0x10(%rbp), %rdi
leaq -0x40(%rbp), %rsi
callq 0x8150
jmp 0x2d95
movq -0x8(%rbp), %rsi
leaq -0x40(%rbp), %rdi
callq 0x43a0
movb %al, -0x69(%rbp)
jmp 0x2da7
movb -0x69(%rbp), %al
testb $0x1, %al
jne 0x2db0
jmp 0x2e11
movq 0xe221(%rip), %rdi      # 0x10fd8
leaq 0x8401(%rip), %rsi      # 0xb1bf
callq 0x2150
movq %rax, -0x78(%rbp)
jmp 0x2dc9
movq -0x78(%rbp), %rdi
movq 0xe1f4(%rip), %rsi      # 0x10fc8
callq 0x2190
jmp 0x2ddb
jmp 0x2e46
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x18(%rbp)
movl %eax, -0x1c(%rbp)
leaq -0x41(%rbp), %rdi
callq 0x21b0
jmp 0x2ea5
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x18(%rbp)
movl %eax, -0x1c(%rbp)
leaq -0x40(%rbp), %rdi
callq 0x20c0
jmp 0x2ea5
movq 0xe1c0(%rip), %rdi      # 0x10fd8
leaq 0x83c2(%rip), %rsi      # 0xb1e1
callq 0x2150
movq %rax, -0x80(%rbp)
jmp 0x2e2a
movq -0x80(%rbp), %rdi
movq 0xe193(%rip), %rsi      # 0x10fc8
callq 0x2190
jmp 0x2e3c
movl $0x1, %edi
callq 0x21f0
movq 0xe18b(%rip), %rdi      # 0x10fd8
leaq 0x8261(%rip), %rsi      # 0xb0b5
callq 0x2150
movq %rax, -0x88(%rbp)
jmp 0x2e62
movq -0x88(%rbp), %rdi
movq 0xe158(%rip), %rsi      # 0x10fc8
callq 0x2190
movq %rax, -0x90(%rbp)
jmp 0x2e7e
movq -0x90(%rbp), %rdi
movq 0xe13c(%rip), %rsi      # 0x10fc8
callq 0x2190
jmp 0x2e93
leaq -0x40(%rbp), %rdi
callq 0x20c0
addq $0x90, %rsp
popq %rbp
retq
movq -0x18(%rbp), %rdi
callq 0x2260
nop