// File: jstaursky[P]hutch/src/Sleigh/pcodecompile.cc
// Function: PcodeCompile::newOutput(bool, ExprTree*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>*, unsigned int)
vector<OpTpl *> *PcodeCompile::newOutput(bool usesLocalKey,ExprTree *rhs,string *varname,uint4 size)

{
  VarnodeSymbol *sym;
  VarnodeTpl *tmpvn = buildTemporary();
  if (size != 0)
    tmpvn->setSize(ConstTpl(ConstTpl::real,size)); // Size was explicitly specified
  else if ((rhs->getSize().getType()==ConstTpl::real)&&(rhs->getSize().getReal()!=0))
    tmpvn->setSize(rhs->getSize());	// Inherit size from unnamed expression result
				// Only inherit if the size is real, otherwise we
				// cannot build the VarnodeSymbol with a placeholder constant
  rhs->setOutput(tmpvn);
  sym = new VarnodeSymbol(*varname,tmpvn->getSpace().getSpace(),tmpvn->getOffset().getReal(),tmpvn->getSize().getReal()); // Create new symbol regardless
  addSymbol(sym);
  if ((!usesLocalKey) && enforceLocalKey)
	  reportError("Must use 'local' keyword to define symbol: "+*varname);
  delete varname;
  return ExprTree::toVector(rhs);
}

// Assembly:
subq $0xf8, %rsp
movb %sil, %al
movq %rdi, 0xf0(%rsp)
andb $0x1, %al
movb %al, 0xef(%rsp)
movq %rdx, 0xe0(%rsp)
movq %rcx, 0xd8(%rsp)
movl %r8d, 0xd4(%rsp)
movq 0xf0(%rsp), %rdi
movq %rdi, 0x68(%rsp)
callq 0xd5da0
movq %rax, 0xc0(%rsp)
cmpl $0x0, 0xd4(%rsp)
je 0x10e390
movq 0xc0(%rsp), %rax
movq %rax, 0x60(%rsp)
movl 0xd4(%rsp), %eax
movl %eax, %edx
leaq 0xa0(%rsp), %rdi
xorl %esi, %esi
callq 0xd9880
movq 0x60(%rsp), %rdi
leaq 0xa0(%rsp), %rsi
callq 0xe29d0
jmp 0x10e3ee
movq 0xe0(%rsp), %rdi
callq 0xdc270
movq %rax, %rdi
callq 0xde5d0
cmpl $0x0, %eax
jne 0x10e3ec
movq 0xe0(%rsp), %rdi
callq 0xdc270
movq %rax, %rdi
callq 0xdd890
cmpq $0x0, %rax
je 0x10e3ec
movq 0xc0(%rsp), %rax
movq %rax, 0x58(%rsp)
movq 0xe0(%rsp), %rdi
callq 0xdc270
movq 0x58(%rsp), %rdi
movq %rax, %rsi
callq 0xe29d0
jmp 0x10e3ee
movq 0xe0(%rsp), %rdi
movq 0xc0(%rsp), %rsi
callq 0xd4540
movl $0x58, %edi
callq 0xd8380
movq %rax, 0x40(%rsp)
movq 0xd8(%rsp), %rax
movq %rax, 0x48(%rsp)
movq 0xc0(%rsp), %rdi
callq 0xe3000
movq %rax, 0x50(%rsp)
jmp 0x10e433
movq 0x50(%rsp), %rdi
callq 0xd2a20
movq %rax, 0x38(%rsp)
jmp 0x10e444
movq 0xc0(%rsp), %rdi
callq 0xdbaf0
movq %rax, 0x30(%rsp)
jmp 0x10e458
movq 0x30(%rsp), %rdi
callq 0xdd890
movq %rax, 0x28(%rsp)
jmp 0x10e469
movq 0xc0(%rsp), %rdi
callq 0xd4930
movq %rax, 0x20(%rsp)
jmp 0x10e47d
movq 0x20(%rsp), %rdi
callq 0xdd890
movq %rax, 0x18(%rsp)
jmp 0x10e48e
movq 0x28(%rsp), %rcx
movq 0x38(%rsp), %rdx
movq 0x48(%rsp), %rsi
movq 0x40(%rsp), %rdi
movq 0x18(%rsp), %rax
movl %eax, %r8d
callq 0xd9790
jmp 0x10e4b1
movq 0x68(%rsp), %rdi
movq 0x40(%rsp), %rax
movq %rax, 0xc8(%rsp)
movq 0xc8(%rsp), %rsi
movq (%rdi), %rax
callq *0x8(%rax)
testb $0x1, 0xef(%rsp)
jne 0x10e572
movq 0x68(%rsp), %rax
testb $0x1, 0x24(%rax)
je 0x10e572
movq 0xd8(%rsp), %rdx
leaq 0x79a41(%rip), %rsi     # 0x187f3e
leaq 0x70(%rsp), %rdi
movq %rdi, 0x10(%rsp)
callq 0xd7370
movq 0x68(%rsp), %rdi
movq 0x10(%rsp), %rsi
movq (%rdi), %rax
movq 0x20(%rax), %rax
callq *%rax
jmp 0x10e521
leaq 0x70(%rsp), %rdi
callq 0xd4550
jmp 0x10e572
movq 0x40(%rsp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x98(%rsp)
movl %eax, 0x94(%rsp)
movl $0x58, %esi
callq 0xd8620
jmp 0x10e5b3
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x98(%rsp)
movl %eax, 0x94(%rsp)
leaq 0x70(%rsp), %rdi
callq 0xd4550
jmp 0x10e5b3
movq 0xd8(%rsp), %rax
movq %rax, 0x8(%rsp)
cmpq $0x0, %rax
je 0x10e59e
movq 0x8(%rsp), %rdi
callq 0xd4550
movq 0x8(%rsp), %rdi
movl $0x20, %esi
callq 0xd8620
movq 0xe0(%rsp), %rdi
callq 0xd0270
addq $0xf8, %rsp
retq
movq 0x98(%rsp), %rdi
callq 0xe0be0