// File: /workspace/github_cpp_makefile_star2_O3/marxn[P]pupp/src/parser/statement.cpp
// Function: VarDefinitionStatement::Provision()
bool VarDefinitionStatement::Provision()
{
        Node * parent = this->GetParentNode();

        if(parent)
        {
                string varname = *(this->Ident);
                if(parent->FindVariable(varname, NULL))
                {
                        cerr<<"pupp provision error: Duplicated variable: "<<varname<<endl;
                        return false;
                }

                this->VarDef = new VariableDef(varname);
                this->VarDef->SetVarType(this->VarType->GetVarType());

                //Variable type has to be determined before Lambda expression defined.
                if(this->InitExpr!=NULL && this->InitExpr->IsLambdaExp())
                {
                        this->VarDef->SetVarType(Func);
                }

                parent->AddVariable(this->VarDef);
        }

        if(this->InitExpr)
        {
                this->InitExpr->SetParentNode(this);
                return this->InitExpr->Provision();
        }

        return true;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x68, %rsp
movq %rdi, %rbx
callq 0xc33c
testq %rax, %rax
je 0x17900
movq %rax, %r15
movq 0x70(%rbx), %rax
leaq 0x18(%rsp), %r13
movq %r13, -0x10(%r13)
movq (%rax), %rsi
movq 0x8(%rax), %rdx
addq %rsi, %rdx
leaq 0x8(%rsp), %r14
movq %r14, %rdi
callq 0x99a6
leaq 0x58(%rsp), %r12
movq %r12, -0x10(%r12)
movq (%r14), %rsi
movq 0x8(%r14), %rdx
addq %rsi, %rdx
leaq 0x48(%rsp), %rdi
callq 0x99a6
leaq 0x48(%rsp), %rsi
movq %r15, %rdi
xorl %edx, %edx
callq 0xc4ca
movq %rax, %r14
movq 0x48(%rsp), %rdi
cmpq %r12, %rdi
je 0x177eb
movq 0x58(%rsp), %rsi
incq %rsi
callq 0x6270
testq %r14, %r14
je 0x1784d
movq 0x2f7f9(%rip), %rdi     # 0x46ff0
leaq 0x1f70c(%rip), %rsi     # 0x36f0a
movl $0x2b, %edx
callq 0x62f0
movq 0x8(%rsp), %rsi
movq 0x10(%rsp), %rdx
movq 0x2f7d7(%rip), %rdi     # 0x46ff0
callq 0x62f0
movq %rax, %r15
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %r15, %rdi
movl $0xa, %esi
callq 0x6220
movsbl %al, %esi
movq %r15, %rdi
callq 0x6040
movq %rax, %rdi
callq 0x61b0
jmp 0x178e0
movl $0x40, %edi
callq 0x6260
movq %rax, %r12
leaq 0x38(%rsp), %rbp
movq %rbp, -0x10(%rbp)
movq 0x8(%rsp), %rsi
movq 0x10(%rsp), %rdx
addq %rsi, %rdx
leaq 0x28(%rsp), %rdi
callq 0x99a6
leaq 0x28(%rsp), %rsi
movq %r12, %rdi
callq 0x1884e
movq %r12, 0x60(%rbx)
movq 0x28(%rsp), %rdi
cmpq %rbp, %rdi
je 0x178a6
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x6270
movq 0x60(%rbx), %r12
movq 0x78(%rbx), %rax
movl (%rax), %esi
movq %r12, %rdi
callq 0x18964
movq 0x68(%rbx), %rdi
testq %rdi, %rdi
je 0x178d4
callq 0x9fcc
testb %al, %al
je 0x178d4
movq 0x60(%rbx), %rdi
movl $0x8, %esi
callq 0x18964
movq 0x60(%rbx), %rsi
movq %r15, %rdi
callq 0xc34c
movq 0x8(%rsp), %rdi
cmpq %r13, %rdi
je 0x178f7
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x6270
testq %r14, %r14
je 0x17900
xorl %eax, %eax
jmp 0x1791f
movq 0x68(%rbx), %rdi
testq %rdi, %rdi
je 0x1791d
movq %rbx, %rsi
callq 0x9fb8
movq 0x68(%rbx), %rdi
movq (%rdi), %rax
callq *0x18(%rax)
jmp 0x1791f
movb $0x1, %al
addq $0x68, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
movq 0x28(%rsp), %rdi
cmpq %rbp, %rdi
je 0x1794d
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x6270
jmp 0x1794d
movq %rax, %rbx
movl $0x40, %esi
movq %r12, %rdi
jmp 0x1796c
movq %rax, %rbx
movq 0x48(%rsp), %rdi
cmpq %r12, %rdi
je 0x17976
movq 0x58(%rsp), %rsi
incq %rsi
callq 0x6270
jmp 0x17976
movq %rax, %rbx
movq 0x8(%rsp), %rdi
cmpq %r13, %rdi
je 0x1798d
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x6270
movq %rbx, %rdi
callq 0x6460
nop