// File: marxn[P]pupp/src/parser/transaction.cpp
// Function: TransNode::Check()
bool TransNode::Check()
{
        Node * parent = this->GetParentNode();
        
        list<string*>::iterator i;
        for(i = this->IdList->begin(); i!= this->IdList->end(); i++)
        {
                unsigned long layer = 1;
                
                VariableDef * vardef = parent->FindVariable(**i, &layer);
                if(vardef==NULL)
                {
                        cerr<<"pupp provision error: Variable "<<**i<<" has not been defined"<<endl;
                        return false;
                }

                VariableDef * newvardef = new VariableDef(**i);
                newvardef->SetVarType(vardef->GetVarType());
                this->AddVariable(newvardef);
                
                TransIdentDesc desc = {vardef, newvardef, layer};

                this->VarDefList.push_back(desc);
        }
        
        return ContainerNode::Check();
}

// Assembly:
subq $0xf8, %rsp
movq %rdi, 0xe8(%rsp)
movq 0xe8(%rsp), %rdi
movq %rdi, 0x30(%rsp)
callq 0x14170
movq %rax, 0xe0(%rsp)
leaq 0xd8(%rsp), %rdi
callq 0x301c0
movq 0x30(%rsp), %rax
movq 0x68(%rax), %rdi
callq 0x301e0
movq %rax, 0xd0(%rsp)
movq 0xd0(%rsp), %rax
movq %rax, 0xd8(%rsp)
movq 0x30(%rsp), %rax
movq 0x68(%rax), %rdi
callq 0x29be0
movq %rax, 0xc8(%rsp)
leaq 0xd8(%rsp), %rdi
leaq 0xc8(%rsp), %rsi
callq 0x30210
testb $0x1, %al
jne 0x2fe50
jmp 0x30089
movq $0x1, 0xc0(%rsp)
movq 0xe0(%rsp), %rax
movq %rax, 0x18(%rsp)
leaq 0xd8(%rsp), %rdi
callq 0x30230
movq (%rax), %rsi
leaq 0x98(%rsp), %rdi
movq %rdi, 0x20(%rsp)
callq 0x6160
movq 0x18(%rsp), %rdi
movq 0x20(%rsp), %rsi
leaq 0xc0(%rsp), %rdx
callq 0x143e0
movq %rax, 0x28(%rsp)
jmp 0x2fea9
leaq 0x98(%rsp), %rdi
callq 0x61e0
movq 0x28(%rsp), %rax
movq %rax, 0xb8(%rsp)
cmpq $0x0, 0xb8(%rsp)
jne 0x2ff55
movq 0x46117(%rip), %rdi     # 0x75ff0
leaq 0x2f2fa(%rip), %rsi     # 0x5f1da
callq 0x62d0
movq %rax, 0x10(%rsp)
leaq 0xd8(%rsp), %rdi
callq 0x30230
movq 0x10(%rsp), %rdi
movq (%rax), %rsi
callq 0x62a0
movq %rax, %rdi
leaq 0x2f2ec(%rip), %rsi     # 0x5f1fa
callq 0x62d0
movq %rax, %rdi
movq 0x4609b(%rip), %rsi     # 0x75fb8
callq 0x6320
movb $0x0, 0xf7(%rsp)
jmp 0x3009c
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x90(%rsp)
movl %eax, 0x8c(%rsp)
leaq 0x98(%rsp), %rdi
callq 0x61e0
jmp 0x300ad
movl $0x40, %edi
callq 0x62f0
movq %rax, 0x8(%rsp)
movb $0x1, 0x5f(%rsp)
leaq 0xd8(%rsp), %rdi
callq 0x30230
movq (%rax), %rsi
leaq 0x60(%rsp), %rdi
callq 0x6160
jmp 0x2ff85
movq 0x8(%rsp), %rdi
leaq 0x60(%rsp), %rsi
callq 0x30e90
jmp 0x2ff96
movb $0x0, 0x5f(%rsp)
leaq 0x60(%rsp), %rdi
callq 0x61e0
movq 0x8(%rsp), %rax
movq %rax, 0x80(%rsp)
movq 0x80(%rsp), %rax
movq %rax, (%rsp)
movq 0xb8(%rsp), %rdi
callq 0x31020
movq (%rsp), %rdi
movl %eax, %esi
callq 0x31000
movq 0x30(%rsp), %rdi
movq 0x80(%rsp), %rsi
callq 0x141b0
movq 0x30(%rsp), %rdi
movq 0xb8(%rsp), %rax
movq %rax, 0x40(%rsp)
movq 0x80(%rsp), %rax
movq %rax, 0x48(%rsp)
movq 0xc0(%rsp), %rax
movq %rax, 0x50(%rsp)
addq $0x70, %rdi
leaq 0x40(%rsp), %rsi
callq 0x30260
leaq 0xd8(%rsp), %rdi
xorl %esi, %esi
callq 0x302a0
movq %rax, 0x38(%rsp)
jmp 0x2fe1c
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x90(%rsp)
movl %eax, 0x8c(%rsp)
jmp 0x3006f
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x90(%rsp)
movl %eax, 0x8c(%rsp)
leaq 0x60(%rsp), %rdi
callq 0x61e0
testb $0x1, 0x5f(%rsp)
jne 0x30078
jmp 0x30087
movq 0x8(%rsp), %rdi
movl $0x40, %esi
callq 0x6300
jmp 0x300ad
movq 0x30(%rsp), %rdi
callq 0xd3f0
andb $0x1, %al
movb %al, 0xf7(%rsp)
movb 0xf7(%rsp), %al
andb $0x1, %al
addq $0xf8, %rsp
retq
movq 0x90(%rsp), %rdi
callq 0x6550
nopw (%rax,%rax)