// File: jstaursky[P]hutch/src/Sleigh/slgh_compile.cc
// Function: SleighCompile::checkLocalExports(Constructor*)
bool SleighCompile::checkLocalExports(Constructor *ct)

{
  if (ct->getTempl() == (ConstructTpl *)0)
    return true;		// No template, collisions impossible
  if (ct->getTempl()->buildOnly())
    return true;		// Operand exports aren't manipulated, so no collision is possible
  if (ct->getNumOperands() < 2)
    return true;		// Collision can only happen with multiple operands
  bool noCollisions = true;
  map<uintb,int4> collect;
  for(int4 i=0;i<ct->getNumOperands();++i) {
    vector<uintb> newCollect;
    ct->getOperand(i)->collectLocalValues(newCollect);
    if (newCollect.empty()) continue;
    int4 collideOperand = findCollision(collect, newCollect, i);
    if (collideOperand >= 0) {
      noCollisions = false;
      if (warnalllocalcollisions) {
	cerr << "Possible collision with symbols ";
	cerr << ct->getOperand(collideOperand)->getName();
	cerr << " and " << ct->getOperand(i)->getName();
	cerr << " in constructor starting at line " << dec << ct->getLineno() << endl;
      }
      break;	// Don't continue
    }
  }
  return noCollisions;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x100, %rsp            # imm = 0x100
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x90(%rbp)
movq -0x18(%rbp), %rdi
callq 0x52880
cmpq $0x0, %rax
jne 0x62956
movb $0x1, -0x1(%rbp)
jmp 0x62c3a
movq -0x18(%rbp), %rdi
callq 0x52880
movq %rax, %rdi
callq 0x4d260
testb $0x1, %al
jne 0x6296d
jmp 0x62976
movb $0x1, -0x1(%rbp)
jmp 0x62c3a
movq -0x18(%rbp), %rdi
callq 0x52760
cmpl $0x2, %eax
jge 0x6298d
movb $0x1, -0x1(%rbp)
jmp 0x62c3a
movb $0x1, -0x19(%rbp)
leaq -0x50(%rbp), %rdi
callq 0x6b7f0
movl $0x0, -0x54(%rbp)
movl -0x54(%rbp), %eax
movl %eax, -0x98(%rbp)
movq -0x18(%rbp), %rdi
callq 0x52760
movl %eax, -0x94(%rbp)
jmp 0x629bb
movl -0x98(%rbp), %eax
movl -0x94(%rbp), %ecx
cmpl %ecx, %eax
jge 0x62c12
leaq -0x80(%rbp), %rdi
callq 0x520e0
movq -0x18(%rbp), %rdi
movl -0x54(%rbp), %esi
callq 0x179c0
movq %rax, -0xa0(%rbp)
jmp 0x629ed
movq -0xa0(%rbp), %rdi
movq (%rdi), %rax
movq 0x58(%rax), %rax
leaq -0x80(%rbp), %rsi
callq *%rax
jmp 0x62a03
leaq -0x80(%rbp), %rdi
callq 0x6b810
testb $0x1, %al
jne 0x62a12
jmp 0x62a4c
movl $0x4, -0x84(%rbp)
jmp 0x62bd8
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x60(%rbp)
movl %eax, -0x64(%rbp)
jmp 0x62c2f
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x60(%rbp)
movl %eax, -0x64(%rbp)
leaq -0x80(%rbp), %rdi
callq 0x321f0
jmp 0x62c2f
movl -0x54(%rbp), %edx
leaq -0x50(%rbp), %rdi
leaq -0x80(%rbp), %rsi
callq 0x62830
movl %eax, -0xa4(%rbp)
jmp 0x62a64
movl -0xa4(%rbp), %eax
movl %eax, -0x88(%rbp)
cmpl $0x0, -0x88(%rbp)
jl 0x62bce
movq -0x90(%rbp), %rax
movb $0x0, -0x19(%rbp)
testb $0x1, 0x337(%rax)
je 0x62bc2
movq 0xcf54c(%rip), %rdi     # 0x131fe8
leaq 0x76a72(%rip), %rsi     # 0xd9515
callq 0x11420
jmp 0x62aaa
movq -0x18(%rbp), %rdi
movl -0x88(%rbp), %esi
callq 0x179c0
movq %rax, -0xb0(%rbp)
jmp 0x62ac2
movq -0xb0(%rbp), %rdi
callq 0x401a0
movq %rax, -0xb8(%rbp)
jmp 0x62ad7
movq -0xb8(%rbp), %rsi
movq 0xcf503(%rip), %rdi     # 0x131fe8
callq 0x113e0
jmp 0x62aec
movq 0xcf4f5(%rip), %rdi     # 0x131fe8
leaq 0x75c58(%rip), %rsi     # 0xd8752
callq 0x11420
movq %rax, -0xc0(%rbp)
jmp 0x62b08
movq -0x18(%rbp), %rdi
movl -0x54(%rbp), %esi
callq 0x179c0
movq %rax, -0xc8(%rbp)
jmp 0x62b1d
movq -0xc8(%rbp), %rdi
callq 0x401a0
movq %rax, -0xd0(%rbp)
jmp 0x62b32
movq -0xd0(%rbp), %rsi
movq -0xc0(%rbp), %rdi
callq 0x113e0
jmp 0x62b47
movq 0xcf49a(%rip), %rdi     # 0x131fe8
leaq 0x765a5(%rip), %rsi     # 0xd90fa
callq 0x11420
movq %rax, -0xd8(%rbp)
jmp 0x62b63
movq -0xd8(%rbp), %rdi
leaq -0x3d501(%rip), %rsi    # 0x25670
callq 0x11180
movq %rax, -0xe0(%rbp)
jmp 0x62b7f
movq -0x18(%rbp), %rdi
callq 0x6a600
movl %eax, -0xe4(%rbp)
jmp 0x62b90
movl -0xe4(%rbp), %esi
movq -0xe0(%rbp), %rdi
callq 0x11880
movq %rax, -0xf0(%rbp)
jmp 0x62bab
movq -0xf0(%rbp), %rdi
movq 0xcf3e7(%rip), %rsi     # 0x131fa0
callq 0x114a0
jmp 0x62bc0
jmp 0x62bc2
movl $0x2, -0x84(%rbp)
jmp 0x62bd8
movl $0x0, -0x84(%rbp)
leaq -0x80(%rbp), %rdi
callq 0x321f0
movl -0x84(%rbp), %eax
movl %eax, -0xf4(%rbp)
testl %eax, %eax
je 0x62c02
jmp 0x62bf3
movl -0xf4(%rbp), %eax
subl $0x2, %eax
je 0x62c12
jmp 0x62c00
jmp 0x62c04
jmp 0x62c04
movl -0x54(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x54(%rbp)
jmp 0x629a1
movb -0x19(%rbp), %al
andb $0x1, %al
movb %al, -0x1(%rbp)
movl $0x1, -0x84(%rbp)
leaq -0x50(%rbp), %rdi
callq 0x6b850
jmp 0x62c3a
leaq -0x50(%rbp), %rdi
callq 0x6b850
jmp 0x62c48
movb -0x1(%rbp), %al
andb $0x1, %al
addq $0x100, %rsp            # imm = 0x100
popq %rbp
retq
movq -0x60(%rbp), %rdi
callq 0x118b0
nopw %cs:(%rax,%rax)