// File: /workspace/github_cpp_makefile_star2_O1/jstaursky[P]hutch/src/Sleigh/pcodecompile.cc
// Function: PcodeCompile::propagateSize(ConstructTpl*)
void PcodeCompile::force_size(VarnodeTpl *vt,const ConstTpl &size,const vector<OpTpl *> &ops)

{
  if ((vt->getSize().getType()!=ConstTpl::real)||(vt->getSize().getReal() != 0))
    return;			// Size already exists

  vt->setSize(size);
  if (!vt->isLocalTemp()) return;
				// If the variable is a local temporary
				// The size may need to be propagated to the various
				// uses of the variable
  OpTpl *op;
  VarnodeTpl *vn;

  for(int4 i=0;i<ops.size();++i) {
    op = ops[i];
    vn = op->getOut();
    if ((vn!=(VarnodeTpl *)0)&&(vn->isLocalTemp())) {
      if (vn->getOffset() == vt->getOffset()) {
	if ((size.getType() == ConstTpl::real)&&(vn->getSize().getType() == ConstTpl::real)&&
	    (vn->getSize().getReal() != 0) && (vn->getSize().getReal() != size.getReal()))
	  throw SleighError("Localtemp size mismatch");
	vn->setSize(size);
      }
    }
    for(int4 j=0;j<op->numInput();++j) {
      vn = op->getIn(j);
      if (vn->isLocalTemp()&&(vn->getOffset()==vt->getOffset())) {
	if ((size.getType() == ConstTpl::real)&&(vn->getSize().getType() == ConstTpl::real)&&
	    (vn->getSize().getReal() != 0) && (vn->getSize().getReal() != size.getReal()))
	  throw SleighError("Localtemp size mismatch");
	vn->setSize(size);
      }
    }
  }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
xorps %xmm0, %xmm0
movaps %xmm0, (%rsp)
xorl %eax, %eax
movq %rax, 0x10(%rsp)
movq %rax, 0x30(%rsp)
movaps %xmm0, 0x20(%rsp)
leaq 0x8(%rdi), %rbx
movq 0x8(%rdi), %r15
cmpq 0x10(%rdi), %r15
je 0x52744
movq %rdi, %r14
movq %rsp, %r12
movq (%r15), %rdi
callq 0x41f80
testb %al, %al
je 0x5273a
movq (%r15), %rdi
movq %rbx, %rsi
callq 0x40250
movq (%r15), %rdi
callq 0x41f80
testb %al, %al
je 0x5273a
movq 0x8(%rsp), %rsi
cmpq 0x10(%rsp), %rsi
je 0x5272f
movq (%r15), %rax
movq %rax, (%rsi)
addq $0x8, 0x8(%rsp)
jmp 0x5273a
movq %r12, %rdi
movq %r15, %rdx
callq 0x3f150
addq $0x8, %r15
cmpq 0x10(%r14), %r15
jne 0x526f2
movq %rsp, %r14
movq 0x8(%r14), %rbp
subq (%r14), %rbp
shrq $0x3, %rbp
incl %ebp
leaq 0x20(%rsp), %r15
movq (%rsp), %r12
movq 0x8(%rsp), %r13
subq %r12, %r13
sarq $0x3, %r13
movslq %ebp, %rax
cmpq %rax, %r13
jae 0x527e1
movq 0x20(%rsp), %rax
cmpq %rax, 0x28(%rsp)
je 0x527c7
movq %rax, 0x28(%rsp)
jmp 0x527c7
movq (%r12), %rdi
movq %rbx, %rsi
callq 0x40250
movq (%r12), %rdi
callq 0x41f80
testb %al, %al
je 0x527c3
movq 0x28(%rsp), %rsi
cmpq 0x30(%rsp), %rsi
je 0x527b8
movq (%r12), %rax
movq %rax, (%rsi)
addq $0x8, 0x28(%rsp)
jmp 0x527c3
movq %r15, %rdi
movq %r12, %rdx
callq 0x3f150
addq $0x8, %r12
cmpq 0x8(%rsp), %r12
jne 0x52784
movq %r14, %rdi
movq %r15, %rsi
callq 0x41690
movl %r13d, %ebp
jmp 0x52759
movq 0x20(%rsp), %rdi
testq %rdi, %rdi
je 0x527f8
movq 0x30(%rsp), %rsi
subq %rdi, %rsi
callq 0x40870
movq (%rsp), %rdi
testq %rdi, %rdi
je 0x5280e
movq 0x10(%rsp), %rsi
subq %rdi, %rsi
callq 0x40870
testl %ebp, %ebp
sete %al
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x52826
jmp 0x52826
movq %rax, %rbx
movq 0x20(%rsp), %rdi
testq %rdi, %rdi
je 0x52840
movq 0x30(%rsp), %rsi
subq %rdi, %rsi
callq 0x40870
movq (%rsp), %rdi
testq %rdi, %rdi
je 0x52856
movq 0x10(%rsp), %rsi
subq %rdi, %rsi
callq 0x40870
movq %rbx, %rdi
callq 0x41f00