// File: jstaursky[P]hutch/src/Sleigh/slghsymbol.cc
// Function: DecisionNode::resolve(ParserWalker&) const
Constructor *DecisionNode::resolve(ParserWalker &walker) const

{
  if (bitsize == 0) {		// The node is terminal
    vector<pair<DisjointPattern *,Constructor *> >::const_iterator iter;
    for(iter=list.begin();iter!=list.end();++iter)
      if ((*iter).first->isMatch(walker))
	return (*iter).second;
    ostringstream s;
    s << walker.getAddr().getShortcut();
    walker.getAddr().printRaw(s);
    s << ": Unable to resolve constructor";
    throw BadDataError(s.str());
  }
  uintm val;
  if (contextdecision)
    val = walker.getContextBits(startbit,bitsize);
  else
    val = walker.getInstructionBits(startbit,bitsize);
  return children[val]->resolve(walker);
}

// Assembly:
subq $0x208, %rsp            # imm = 0x208
movq %rdi, 0x1f8(%rsp)
movq %rsi, 0x1f0(%rsp)
movq 0x1f8(%rsp), %rax
movq %rax, 0x20(%rsp)
cmpl $0x0, 0x3c(%rax)
jne 0x14c1b6
leaq 0x1e8(%rsp), %rdi
callq 0xd0ea0
movq 0x20(%rsp), %rdi
callq 0xde3a0
movq %rax, 0x1e0(%rsp)
movq 0x1e0(%rsp), %rax
movq %rax, 0x1e8(%rsp)
movq 0x20(%rsp), %rdi
callq 0xd40a0
movq %rax, 0x1d8(%rsp)
leaq 0x1e8(%rsp), %rdi
leaq 0x1d8(%rsp), %rsi
callq 0xd7030
testb $0x1, %al
jne 0x14c03a
jmp 0x14c08d
leaq 0x1e8(%rsp), %rdi
callq 0xd16c0
movq (%rax), %rdi
movq 0x1f0(%rsp), %rsi
movq (%rdi), %rax
callq *0x38(%rax)
testb $0x1, %al
jne 0x14c05e
jmp 0x14c07c
leaq 0x1e8(%rsp), %rdi
callq 0xd16c0
movq 0x8(%rax), %rax
movq %rax, 0x200(%rsp)
jmp 0x14c227
jmp 0x14c07e
leaq 0x1e8(%rsp), %rdi
callq 0xe2320
jmp 0x14c00d
leaq 0x60(%rsp), %rdi
callq 0xdbe90
movq 0x1f0(%rsp), %rdi
callq 0xcee30
movq %rax, 0x18(%rsp)
jmp 0x14c0ab
movq 0x18(%rsp), %rdi
callq 0xd5b50
movb %al, 0x17(%rsp)
jmp 0x14c0bb
movb 0x17(%rsp), %al
movsbl %al, %esi
leaq 0x60(%rsp), %rdi
callq 0xda0c0
jmp 0x14c0ce
movq 0x1f0(%rsp), %rdi
callq 0xcee30
movq %rax, 0x8(%rsp)
jmp 0x14c0e2
movq 0x8(%rsp), %rdi
leaq 0x60(%rsp), %rsi
callq 0xd82c0
jmp 0x14c0f3
leaq 0x3d4b3(%rip), %rsi     # 0x1895ad
leaq 0x60(%rsp), %rdi
callq 0xd8300
jmp 0x14c106
movb $0x1, 0x2f(%rsp)
movl $0x20, %edi
callq 0xd2b40
movq %rax, (%rsp)
leaq 0x30(%rsp), %rdi
leaq 0x60(%rsp), %rsi
callq 0xd8840
jmp 0x14c12a
movq (%rsp), %rdi
leaq 0x30(%rsp), %rsi
callq 0xde3d0
jmp 0x14c13a
movq (%rsp), %rdi
movb $0x0, 0x2f(%rsp)
movq 0x7b96e(%rip), %rsi     # 0x1c7ab8
movq 0x7bd27(%rip), %rdx     # 0x1c7e78
callq 0xe01f0
jmp 0x14c241
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x58(%rsp)
movl %eax, 0x54(%rsp)
jmp 0x14c1a7
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x58(%rsp)
movl %eax, 0x54(%rsp)
jmp 0x14c193
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x58(%rsp)
movl %eax, 0x54(%rsp)
leaq 0x30(%rsp), %rdi
callq 0xd4550
testb $0x1, 0x2f(%rsp)
jne 0x14c19c
jmp 0x14c1a5
movq (%rsp), %rdi
callq 0xd5400
jmp 0x14c1a7
leaq 0x60(%rsp), %rdi
callq 0xd0160
jmp 0x14c237
movq 0x20(%rsp), %rax
testb $0x1, 0x34(%rax)
je 0x14c1df
movq 0x20(%rsp), %rax
movq 0x1f0(%rsp), %rdi
movl 0x38(%rax), %esi
movl 0x3c(%rax), %edx
callq 0xd16b0
movl %eax, 0x28(%rsp)
jmp 0x14c1fb
movq 0x20(%rsp), %rax
movq 0x1f0(%rsp), %rdi
movl 0x38(%rax), %esi
movl 0x3c(%rax), %edx
callq 0xd6740
movl %eax, 0x28(%rsp)
movq 0x20(%rsp), %rdi
addq $0x18, %rdi
movl 0x28(%rsp), %eax
movl %eax, %esi
callq 0xd0f90
movq (%rax), %rdi
movq 0x1f0(%rsp), %rsi
callq 0xd95d0
movq %rax, 0x200(%rsp)
movq 0x200(%rsp), %rax
addq $0x208, %rsp            # imm = 0x208
retq
movq 0x58(%rsp), %rdi
callq 0xe0be0
nopw %cs:(%rax,%rax)