// File: jstaursky[P]hutch/src/Sleigh/slgh_compile.cc
// Function: SleighCompile::checkConsistency()
void SleighCompile::checkConsistency(void)

{
  ConsistencyChecker checker(root,warnunnecessarypcode,warndeadtemps);

  if (!checker.test()) {
    errors += 1;
    return;
  }
  if (!checker.testTruncations(isBigEndian())) {
    errors += 1;
    return;
  }
  if ((!warnunnecessarypcode)&&(checker.getNumUnnecessaryPcode() > 0)) {
    cerr << dec << checker.getNumUnnecessaryPcode();
    cerr << " unnecessary extensions/truncations were converted to copies" << endl;
    cerr << "Use -u switch to list each individually" << endl;
  }
  checker.optimizeAll();
  if (checker.getNumReadNoWrite() > 0) {
    errors += 1;
    return;
  }
  if ((!warndeadtemps)&&(checker.getNumWriteNoRead() > 0)) {
    cerr << dec << checker.getNumWriteNoRead();
    cerr << " operations wrote to temporaries that were not read" << endl;
    cerr << "Use -t switch to list each individually" << endl;
  }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0xe0, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x90(%rbp)
movq 0x190(%rax), %rsi
movzbl 0x335(%rax), %ecx
movzbl 0x334(%rax), %edx
andl $0x1, %edx
andl $0x1, %ecx
leaq -0x68(%rbp), %rdi
movq %rdi, -0x88(%rbp)
callq 0x5abd0
movq -0x88(%rbp), %rdi
callq 0x5ffb0
movb %al, -0x79(%rbp)
jmp 0x62566
movb -0x79(%rbp), %al
testb $0x1, %al
jne 0x625ab
jmp 0x6256f
movq -0x90(%rbp), %rax
movl 0x358(%rax), %ecx
addl $0x1, %ecx
movl %ecx, 0x358(%rax)
movl $0x1, -0x78(%rbp)
jmp 0x6280c
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x70(%rbp)
movl %eax, -0x74(%rbp)
leaq -0x68(%rbp), %rdi
callq 0x6b6d0
jmp 0x6281e
movq -0x90(%rbp), %rdi
callq 0x57c80
movb %al, -0x91(%rbp)
jmp 0x625bf
movb -0x91(%rbp), %al
movzbl %al, %esi
andl $0x1, %esi
leaq -0x68(%rbp), %rdi
callq 0x60040
movb %al, -0x92(%rbp)
jmp 0x625dc
movb -0x92(%rbp), %al
testb $0x1, %al
jne 0x6260a
jmp 0x625e8
movq -0x90(%rbp), %rax
movl 0x358(%rax), %ecx
addl $0x1, %ecx
movl %ecx, 0x358(%rax)
movl $0x1, -0x78(%rbp)
jmp 0x6280c
movq -0x90(%rbp), %rax
testb $0x1, 0x334(%rax)
jne 0x626e3
leaq -0x68(%rbp), %rdi
callq 0x6b680
movl %eax, -0x98(%rbp)
jmp 0x6262f
movl -0x98(%rbp), %eax
cmpl $0x0, %eax
jle 0x626e3
movq 0xcf9a3(%rip), %rdi     # 0x131fe8
leaq -0x3cfdc(%rip), %rsi    # 0x25670
callq 0x11180
movq %rax, -0xa0(%rbp)
jmp 0x6265a
leaq -0x68(%rbp), %rdi
callq 0x6b680
movl %eax, -0xa4(%rbp)
jmp 0x6266b
movl -0xa4(%rbp), %esi
movq -0xa0(%rbp), %rdi
callq 0x11880
jmp 0x6267f
movq 0xcf962(%rip), %rdi     # 0x131fe8
leaq 0x76dc7(%rip), %rsi     # 0xd9454
callq 0x11420
movq %rax, -0xb0(%rbp)
jmp 0x6269b
movq -0xb0(%rbp), %rdi
movq 0xcf8f7(%rip), %rsi     # 0x131fa0
callq 0x114a0
jmp 0x626b0
movq 0xcf931(%rip), %rdi     # 0x131fe8
leaq 0x76dd3(%rip), %rsi     # 0xd9491
callq 0x11420
movq %rax, -0xb8(%rbp)
jmp 0x626cc
movq -0xb8(%rbp), %rdi
movq 0xcf8c6(%rip), %rsi     # 0x131fa0
callq 0x114a0
jmp 0x626e1
jmp 0x626e3
leaq -0x68(%rbp), %rdi
callq 0x60180
jmp 0x626ee
leaq -0x68(%rbp), %rdi
callq 0x6b690
movl %eax, -0xbc(%rbp)
jmp 0x626ff
movl -0xbc(%rbp), %eax
cmpl $0x0, %eax
jle 0x6272c
movq -0x90(%rbp), %rax
movl 0x358(%rax), %ecx
addl $0x1, %ecx
movl %ecx, 0x358(%rax)
movl $0x1, -0x78(%rbp)
jmp 0x6280c
movq -0x90(%rbp), %rax
testb $0x1, 0x335(%rax)
jne 0x62805
leaq -0x68(%rbp), %rdi
callq 0x6b6b0
movl %eax, -0xc0(%rbp)
jmp 0x62751
movl -0xc0(%rbp), %eax
cmpl $0x0, %eax
jle 0x62805
movq 0xcf881(%rip), %rdi     # 0x131fe8
leaq -0x3d0fe(%rip), %rsi    # 0x25670
callq 0x11180
movq %rax, -0xc8(%rbp)
jmp 0x6277c
leaq -0x68(%rbp), %rdi
callq 0x6b6b0
movl %eax, -0xcc(%rbp)
jmp 0x6278d
movl -0xcc(%rbp), %esi
movq -0xc8(%rbp), %rdi
callq 0x11880
jmp 0x627a1
movq 0xcf840(%rip), %rdi     # 0x131fe8
leaq 0x76d0a(%rip), %rsi     # 0xd94b9
callq 0x11420
movq %rax, -0xd8(%rbp)
jmp 0x627bd
movq -0xd8(%rbp), %rdi
movq 0xcf7d5(%rip), %rsi     # 0x131fa0
callq 0x114a0
jmp 0x627d2
movq 0xcf80f(%rip), %rdi     # 0x131fe8
leaq 0x76d0d(%rip), %rsi     # 0xd94ed
callq 0x11420
movq %rax, -0xe0(%rbp)
jmp 0x627ee
movq -0xe0(%rbp), %rdi
movq 0xcf7a4(%rip), %rsi     # 0x131fa0
callq 0x114a0
jmp 0x62803
jmp 0x62805
movl $0x0, -0x78(%rbp)
leaq -0x68(%rbp), %rdi
callq 0x6b6d0
addq $0xe0, %rsp
popq %rbp
retq
movq -0x70(%rbp), %rdi
callq 0x118b0
nopw (%rax,%rax)