// File: sile[P]unf/src/unf/unf-test.cc
// Function: main
int main(int argc, char** argv) {
  if(argc != 1) {
    std::cerr << "Usage: unf-test" << std::endl;
    return 1;
  }

  UNF::Normalizer norm;

  unsigned cnt=0;
  std::vector<std::string> ary;
  std::string line;
  while(std::getline(std::cin, line)) {
    if(ary.size()==5) {
      cnt++;
      if(nf_test(ary, norm, cnt)==false)
	return 1;
      ary.clear();
    } else {
      ary.push_back(line);
    }
  }
  if(ary.size()==5) {
    cnt++;
    if(nf_test(ary, norm, cnt)==false)
      return 1;
  }
  
  std::cerr << "All tests passed!: " << cnt << " entries" << std::endl << std::endl;
  return 0;
}

// Assembly:
subq $0x1c8, %rsp            # imm = 0x1C8
movl $0x0, 0x1c4(%rsp)
movl %edi, 0x1c0(%rsp)
movq %rsi, 0x1b8(%rsp)
cmpl $0x1, 0x1c0(%rsp)
je 0x2e0d
movq 0x69206(%rip), %rdi     # 0x6bfe8
leaq 0x6593c(%rip), %rsi     # 0x68725
callq 0x2150
movq %rax, %rdi
movq 0x691c0(%rip), %rsi     # 0x6bfb8
callq 0x2170
movl $0x1, 0x1c4(%rsp)
jmp 0x30cf
leaq 0xb0(%rsp), %rdi
callq 0x32b0
movl $0x0, 0xac(%rsp)
leaq 0x90(%rsp), %rdi
callq 0x3440
jmp 0x2e34
leaq 0x60(%rsp), %rdi
callq 0x21b0
jmp 0x2e40
jmp 0x2e42
movq 0x69187(%rip), %rdi     # 0x6bfd0
leaq 0x60(%rsp), %rsi
callq 0x2040
movq %rax, 0x50(%rsp)
jmp 0x2e5a
movq 0x50(%rsp), %rdi
movq (%rdi), %rax
movq -0x18(%rax), %rax
addq %rax, %rdi
callq 0x21f0
movq %rax, 0x48(%rsp)
jmp 0x2e75
movq 0x48(%rsp), %rax
cmpq $0x0, %rax
je 0x2f80
leaq 0x90(%rsp), %rdi
callq 0x31e0
movq %rax, 0x40(%rsp)
jmp 0x2e98
movq 0x40(%rsp), %rax
cmpq $0x5, %rax
jne 0x2f65
movl 0xac(%rsp), %eax
incl %eax
movl %eax, 0xac(%rsp)
movl 0xac(%rsp), %edx
leaq 0x90(%rsp), %rdi
leaq 0xb0(%rsp), %rsi
callq 0x2c00
movb %al, 0x3f(%rsp)
jmp 0x2ed9
movb 0x3f(%rsp), %al
andb $0x1, %al
movzbl %al, %eax
cmpl $0x0, %eax
jne 0x2f54
movl $0x1, 0x1c4(%rsp)
movl $0x1, 0x5c(%rsp)
jmp 0x3081
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x88(%rsp)
movl %eax, 0x84(%rsp)
jmp 0x30be
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x88(%rsp)
movl %eax, 0x84(%rsp)
jmp 0x30ad
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x88(%rsp)
movl %eax, 0x84(%rsp)
leaq 0x60(%rsp), %rdi
callq 0x20e0
jmp 0x309c
leaq 0x90(%rsp), %rdi
callq 0x3450
jmp 0x2f63
jmp 0x2f7b
leaq 0x90(%rsp), %rdi
leaq 0x60(%rsp), %rsi
callq 0x3470
jmp 0x2f79
jmp 0x2f7b
jmp 0x2e42
leaq 0x90(%rsp), %rdi
callq 0x31e0
movq %rax, 0x30(%rsp)
jmp 0x2f94
movq 0x30(%rsp), %rax
cmpq $0x5, %rax
jne 0x2ff9
movl 0xac(%rsp), %eax
incl %eax
movl %eax, 0xac(%rsp)
movl 0xac(%rsp), %edx
leaq 0x90(%rsp), %rdi
leaq 0xb0(%rsp), %rsi
callq 0x2c00
movb %al, 0x2f(%rsp)
jmp 0x2fd1
movb 0x2f(%rsp), %al
andb $0x1, %al
movzbl %al, %eax
cmpl $0x0, %eax
jne 0x2ff7
movl $0x1, 0x1c4(%rsp)
movl $0x1, 0x5c(%rsp)
jmp 0x3081
jmp 0x2ff9
movq 0x68fe8(%rip), %rdi     # 0x6bfe8
leaq 0x6572e(%rip), %rsi     # 0x68735
callq 0x2150
movq %rax, 0x20(%rsp)
jmp 0x3013
movq 0x20(%rsp), %rdi
movl 0xac(%rsp), %esi
callq 0x21a0
movq %rax, 0x18(%rsp)
jmp 0x302b
movq 0x18(%rsp), %rdi
leaq 0x65712(%rip), %rsi     # 0x68749
callq 0x2150
movq %rax, 0x10(%rsp)
jmp 0x3043
movq 0x10(%rsp), %rdi
movq 0x68f69(%rip), %rsi     # 0x6bfb8
callq 0x2170
movq %rax, 0x8(%rsp)
jmp 0x305b
movq 0x8(%rsp), %rdi
movq 0x68f51(%rip), %rsi     # 0x6bfb8
callq 0x2170
jmp 0x306e
movl $0x0, 0x1c4(%rsp)
movl $0x1, 0x5c(%rsp)
leaq 0x60(%rsp), %rdi
callq 0x20e0
jmp 0x308d
leaq 0x90(%rsp), %rdi
callq 0x34f0
jmp 0x309e
jmp 0x30ad
leaq 0xb0(%rsp), %rdi
callq 0x3570
jmp 0x30cf
leaq 0x90(%rsp), %rdi
callq 0x34f0
jmp 0x30bc
jmp 0x30be
leaq 0xb0(%rsp), %rdi
callq 0x3570
jmp 0x30cd
jmp 0x30de
movl 0x1c4(%rsp), %eax
addq $0x1c8, %rsp            # imm = 0x1C8
retq
movq 0x88(%rsp), %rdi
callq 0x2230
movq %rax, %rdi
callq 0x34e0
nopw %cs:(%rax,%rax)
nopl (%rax)