// File: /workspace/github_cpp_makefile_star2_O1/marxn[P]pupp/src/parser/statement.cpp
// Function: AssignStatement::Check()
bool AssignStatement::Check()
{
        unsigned long layer = 1;
        
        Node * parent = this->GetParentNode();
        this->VarDef = parent->FindVariable(this->Reference->GetVarName(), &layer);
        
        if(this->VarDef==NULL)
        {
                cerr<<"pupp provision error: Variable "<<this->Reference->GetVarName()<<"has not defined"<<endl;
                return false;
        }
        
        this->VarLayer = layer;
        
        list<list<Expression*>*>* exprslist = this->Reference->GetExpsList();
        
        for(list<list<Expression*>*>::iterator gitor = exprslist->begin(); gitor!=exprslist->end(); gitor++)
        {
                list<Expression*>* exprlist = *gitor;
                for(list<Expression*>::iterator i = exprlist->begin(); i!=exprlist->end(); i++)
                {
                        if((*i)->Check()==false)
                        {
                                return false;
                        }
                }
        }
        
        if(this->Expr->Check()==false)
        {
                return false;
        }

        return true;

}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x50, %rsp
movq %rdi, %rbx
leaq 0x8(%rsp), %r14
movq $0x1, (%r14)
callq 0xc3e8
movq %rax, %r15
movq 0x68(%rbx), %rax
leaq 0x40(%rsp), %r13
movq %r13, -0x10(%r13)
movq (%rax), %rsi
movq 0x8(%rax), %rdx
addq %rsi, %rdx
leaq 0x30(%rsp), %r12
movq %r12, %rdi
callq 0x99e8
movq %r15, %rdi
movq %r12, %rsi
movq %r14, %rdx
callq 0xc57c
movq %rax, 0x78(%rbx)
movq 0x30(%rsp), %rdi
cmpq %r13, %rdi
je 0x1753d
movq 0x40(%rsp), %rsi
incq %rsi
callq 0x6270
cmpq $0x0, 0x78(%rbx)
je 0x1758c
movq 0x8(%rsp), %rax
movq %rax, 0x80(%rbx)
movq 0x68(%rbx), %rax
movq 0x20(%rax), %r14
movq (%r14), %r15
cmpq %r14, %r15
je 0x17633
movq 0x10(%r15), %r12
movq %r12, %r13
movq (%r13), %r13
cmpq %r12, %r13
je 0x17587
movq 0x10(%r13), %rdi
movq (%rdi), %rax
callq *0x20(%rax)
testb %al, %al
jne 0x1756b
jmp 0x1762f
movq (%r15), %r15
jmp 0x1755b
movq 0x30a5d(%rip), %r14     # 0x47ff0
leaq 0x1ec59(%rip), %rsi     # 0x361f3
movl $0x1f, %edx
movq %r14, %rdi
callq 0x62f0
movq 0x68(%rbx), %rax
leaq 0x20(%rsp), %r15
movq %r15, -0x10(%r15)
movq (%rax), %rsi
movq 0x8(%rax), %rdx
addq %rsi, %rdx
leaq 0x10(%rsp), %rbx
movq %rbx, %rdi
callq 0x99e8
movq (%rbx), %rsi
movq 0x8(%rbx), %rdx
movq %r14, %rdi
callq 0x62f0
movq %rax, %rbx
leaq 0x208a1(%rip), %rsi     # 0x37e85
movl $0xf, %edx
movq %rax, %rdi
callq 0x62f0
movq (%rbx), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x6220
movsbl %al, %esi
movq %rbx, %rdi
callq 0x6040
movq %rax, %rdi
callq 0x61b0
movq 0x10(%rsp), %rdi
cmpq %r15, %rdi
je 0x1762f
movq 0x20(%rsp), %rsi
incq %rsi
callq 0x6270
xorl %eax, %eax
jmp 0x1763d
movq 0x70(%rbx), %rdi
movq (%rdi), %rax
callq *0x20(%rax)
addq $0x50, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
movq %rax, %rbx
movq 0x30(%rsp), %rdi
cmpq %r13, %rdi
je 0x17679
movq 0x40(%rsp), %rsi
jmp 0x17671
movq %rax, %rbx
movq 0x10(%rsp), %rdi
cmpq %r15, %rdi
je 0x17679
movq 0x20(%rsp), %rsi
incq %rsi
callq 0x6270
movq %rbx, %rdi
callq 0x6470
nop