// File: marxn[P]pupp/src/parser/statement.cpp
// Function: AssignStatement::Invoke(NodeContext*)
int AssignStatement::Invoke(NodeContext * context)
{
        Variable * var = context->GetVariable(this->VarLayer, this->VarDef->GetVarIndex());
        if(var==NULL)
        {
                cerr<<"pupp runtime error: cannot find variable: "<<this->VarDef->GetVarName()<<endl;
                return NODE_RET_ERROR;
        }

        if(var->GetVarType()!=Array && var->GetVarType()!=Map && this->Reference->GetExpsList()->size()>0)
        {
                cerr<<"pupp runtime error: Variable "<<this->Reference->GetVarName()<<" is neither an array nor a set."<<endl;
                return false;
        }

        ValueBox * result = var->GetVBox();
        
        if(this->Reference->GetExpsList()->size()==0 && var->GetVarType()==Array)
        {
                cerr<<"pupp runtime error: cannot assign for an array"<<var->GetVarName()<<endl;
                return NODE_RET_ERROR;
        }
        
        bool need_convert = true;
        list<list<Expression*>*> * exprslist = this->Reference->GetExpsList();
        
        for(list<list<Expression*>*>::iterator gitor = exprslist->begin(); gitor!=exprslist->end(); gitor++)
        {
                list<Expression*>* exprlist = *gitor;
                
                if(result==NULL)
                {
                        cerr<<"pupp runtime error: cannot find key for variable "<<var->GetVarName()<<endl;
                        return NODE_RET_ERROR;
                }
                else if(result->GetVal()->GetType()==Array)
                {
                        if(static_cast<ArrayValue*>(result->GetVal())->GetDimensionNum()!=exprlist->size())
                        {
                                cerr<<"pupp runtime error: wrong dimension variable: "<<var->GetVarName()<<endl;
                                return NODE_RET_ERROR;
                        }

                        vector<long> desc;
                        
                        for(list<Expression*>::iterator i = exprlist->begin(); i!=exprlist->end(); i++)
                        {
                                ConstValue * value = (*i)->Calculate(context);
                                if(value->GetType()!=Integer)
                                {
                                        ConstValue * thevalue = ConstValueCast(value, Integer);
                                        delete value;

                                        if(thevalue==NULL)
                                        {
                                                cerr<<"pupp runtime error: invalid index type for variable: "<<var->GetVarName()<<endl;
                                                return NODE_RET_ERROR;
                                        }
                                        
                                        value = thevalue;
                                        
                                }
                                
                                desc.push_back(static_cast<IntegerValue*>(value)->GetValue());
                                delete value;
                        }

                        ArrayValue * val = static_cast<ArrayValue*>(result->GetVal());
                        
                        result = val->GetElementBox(desc);
                }
                else if(result->GetVal()->GetType()==Map)
                {
                        need_convert = false;
                        
                        if(exprlist->size() > 1)
                        {
                                cerr<<"pupp runtime error: invalid key list for a collection"<<endl;
                                return NODE_RET_ERROR;
                        }
                        
                        ConstValue * key = exprlist->front()->Calculate(context);
                        if(key==NULL)
                        {
                                cerr<<"pupp runtime error: invalid key for a collection"<<endl;
                                return NODE_RET_ERROR;
                        }
                        
                        MapValue * val = static_cast<MapValue*>(result->GetVal());
                        result = val->FindByKey(key->toString());
                        
                        if(result==NULL)
                        {
                                MapValue * value = new MapValue();
                                ValueBox * vb = new ValueBox(value);
                                KVValue * kv = new KVValue(key, vb);
                                val->AddKV(kv);

                                delete kv;
                                delete vb;
                                delete value;
                                
                                result = val->FindByKey(key->toString());
                        }
                        
                        delete key;
                }
                else
                {
                        cerr<<"pupp runtime error: cannot accept a non-collection variable: "<<var->GetVarName()<<endl;
                        return NODE_RET_ERROR;
                }
        }
        
        ConstValue * value = Expr->Calculate(context);
        
        if(value==NULL)
        {
                cerr<<"pupp runtime error: cannot calculate the value for the expression"<<endl;
                return NODE_RET_ERROR;
        }

        if(result->GetVal()->GetType()!=value->GetType() && need_convert)
        {
                ConstValue * thevalue = ConstValueCast(value, var->GetVarType());
                delete value;
                value = thevalue;

                if(value==NULL)
                {
                        cerr<<"pupp runtime error: data type mismatch while assigning "<<endl;
                        return NODE_RET_ERROR;
                }
        }
        
        this->AdjustValue(result, value, this->OperType);
                
        return NODE_RET_NORMAL;
}

// Assembly:
subq $0x3a8, %rsp            # imm = 0x3A8
movq %rdi, 0x398(%rsp)
movq %rsi, 0x390(%rsp)
movq 0x398(%rsp), %rax
movq %rax, 0x178(%rsp)
movq 0x390(%rsp), %rcx
movq %rcx, 0x180(%rsp)
movq 0x80(%rax), %rcx
movq %rcx, 0x188(%rsp)
movq 0x78(%rax), %rdi
callq 0x310b0
movq 0x180(%rsp), %rdi
movq 0x188(%rsp), %rsi
movq %rax, %rdx
callq 0x14950
movq %rax, 0x388(%rsp)
cmpq $0x0, 0x388(%rsp)
jne 0x2cd75
movq 0x4932b(%rip), %rdi     # 0x75ff0
leaq 0x32738(%rip), %rsi     # 0x5f404
callq 0x62d0
movq %rax, %rcx
movq 0x178(%rsp), %rax
movq %rcx, 0x160(%rsp)
movq 0x78(%rax), %rsi
leaq 0x368(%rsp), %rdi
movq %rdi, 0x168(%rsp)
callq 0x31030
movq 0x160(%rsp), %rdi
movq 0x168(%rsp), %rsi
callq 0x62a0
movq %rax, 0x170(%rsp)
jmp 0x2cd1c
movq 0x170(%rsp), %rdi
movq 0x4928d(%rip), %rsi     # 0x75fb8
callq 0x6320
jmp 0x2cd32
leaq 0x368(%rsp), %rdi
callq 0x61e0
movl $0xffffffff, 0x3a4(%rsp) # imm = 0xFFFFFFFF
jmp 0x2dad5
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x360(%rsp)
movl %eax, 0x35c(%rsp)
leaq 0x368(%rsp), %rdi
callq 0x61e0
jmp 0x2dae4
movq 0x388(%rsp), %rdi
callq 0x30cb0
cmpl $0x7, %eax
je 0x2ce99
movq 0x388(%rsp), %rdi
callq 0x30cb0
cmpl $0x6, %eax
je 0x2ce99
movq 0x178(%rsp), %rax
movq 0x68(%rax), %rdi
callq 0x2cbc0
movq %rax, %rdi
callq 0x114d0
cmpq $0x0, %rax
jbe 0x2ce99
movq 0x49225(%rip), %rdi     # 0x75ff0
leaq 0x33fef(%rip), %rsi     # 0x60dc1
callq 0x62d0
movq %rax, %rcx
movq 0x178(%rsp), %rax
movq %rcx, 0x148(%rsp)
movq 0x68(%rax), %rsi
leaq 0x338(%rsp), %rdi
movq %rdi, 0x150(%rsp)
callq 0x2cb90
movq 0x148(%rsp), %rdi
movq 0x150(%rsp), %rsi
callq 0x62a0
movq %rax, 0x158(%rsp)
jmp 0x2ce22
movq 0x158(%rsp), %rdi
leaq 0x33fae(%rip), %rsi     # 0x60ddf
callq 0x62d0
movq %rax, 0x140(%rsp)
jmp 0x2ce40
movq 0x140(%rsp), %rdi
movq 0x49169(%rip), %rsi     # 0x75fb8
callq 0x6320
jmp 0x2ce56
leaq 0x338(%rsp), %rdi
callq 0x61e0
movl $0x0, 0x3a4(%rsp)
jmp 0x2dad5
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x360(%rsp)
movl %eax, 0x35c(%rsp)
leaq 0x338(%rsp), %rdi
callq 0x61e0
jmp 0x2dae4
movq 0x388(%rsp), %rdi
callq 0x30a30
movq %rax, %rcx
movq 0x178(%rsp), %rax
movq %rcx, 0x330(%rsp)
movq 0x68(%rax), %rdi
callq 0x2cbc0
movq %rax, %rdi
callq 0x114d0
cmpq $0x0, %rax
jne 0x2cf9a
movq 0x388(%rsp), %rdi
callq 0x30cb0
cmpl $0x7, %eax
jne 0x2cf9a
movq 0x490ff(%rip), %rdi     # 0x75ff0
leaq 0x33f07(%rip), %rsi     # 0x60dff
callq 0x62d0
movq %rax, 0x128(%rsp)
movq 0x388(%rsp), %rsi
leaq 0x310(%rsp), %rdi
movq %rdi, 0x130(%rsp)
callq 0x309b0
movq 0x128(%rsp), %rdi
movq 0x130(%rsp), %rsi
callq 0x62a0
movq %rax, 0x138(%rsp)
jmp 0x2cf41
movq 0x138(%rsp), %rdi
movq 0x49068(%rip), %rsi     # 0x75fb8
callq 0x6320
jmp 0x2cf57
leaq 0x310(%rsp), %rdi
callq 0x61e0
movl $0xffffffff, 0x3a4(%rsp) # imm = 0xFFFFFFFF
jmp 0x2dad5
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x360(%rsp)
movl %eax, 0x35c(%rsp)
leaq 0x310(%rsp), %rdi
callq 0x61e0
jmp 0x2dae4
movq 0x178(%rsp), %rax
movb $0x1, 0x30f(%rsp)
movq 0x68(%rax), %rdi
callq 0x2cbc0
movq %rax, 0x300(%rsp)
movq 0x300(%rsp), %rdi
callq 0x11500
movq %rax, 0x2f8(%rsp)
movq 0x300(%rsp), %rdi
callq 0x11550
movq %rax, 0x2f0(%rsp)
leaq 0x2f8(%rsp), %rdi
leaq 0x2f0(%rsp), %rsi
callq 0x11530
testb $0x1, %al
jne 0x2d003
jmp 0x2d971
leaq 0x2f8(%rsp), %rdi
callq 0x11580
movq (%rax), %rax
movq %rax, 0x2e8(%rsp)
cmpq $0x0, 0x330(%rsp)
jne 0x2d0da
movq 0x48fbf(%rip), %rdi     # 0x75ff0
leaq 0x33df6(%rip), %rsi     # 0x60e2e
callq 0x62d0
movq %rax, 0x110(%rsp)
movq 0x388(%rsp), %rsi
leaq 0x2c8(%rsp), %rdi
movq %rdi, 0x118(%rsp)
callq 0x309b0
movq 0x110(%rsp), %rdi
movq 0x118(%rsp), %rsi
callq 0x62a0
movq %rax, 0x120(%rsp)
jmp 0x2d081
movq 0x120(%rsp), %rdi
movq 0x48f28(%rip), %rsi     # 0x75fb8
callq 0x6320
jmp 0x2d097
leaq 0x2c8(%rsp), %rdi
callq 0x61e0
movl $0xffffffff, 0x3a4(%rsp) # imm = 0xFFFFFFFF
jmp 0x2dad5
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x360(%rsp)
movl %eax, 0x35c(%rsp)
leaq 0x2c8(%rsp), %rdi
callq 0x61e0
jmp 0x2dae4
movq 0x330(%rsp), %rdi
callq 0x7a20
movq %rax, %rdi
callq 0x7870
cmpl $0x7, %eax
jne 0x2d4f2
movq 0x330(%rsp), %rdi
callq 0x7a20
movq %rax, %rdi
callq 0xa600
movq %rax, 0x108(%rsp)
movq 0x2e8(%rsp), %rdi
callq 0x115a0
movq %rax, %rcx
movq 0x108(%rsp), %rax
cmpq %rcx, %rax
je 0x2d1e6
movq 0x48eb3(%rip), %rdi     # 0x75ff0
leaq 0x3200d(%rip), %rsi     # 0x5f151
callq 0x62d0
movq %rax, 0xf0(%rsp)
movq 0x388(%rsp), %rsi
leaq 0x2a8(%rsp), %rdi
movq %rdi, 0xf8(%rsp)
callq 0x309b0
movq 0xf0(%rsp), %rdi
movq 0xf8(%rsp), %rsi
callq 0x62a0
movq %rax, 0x100(%rsp)
jmp 0x2d18d
movq 0x100(%rsp), %rdi
movq 0x48e1c(%rip), %rsi     # 0x75fb8
callq 0x6320
jmp 0x2d1a3
leaq 0x2a8(%rsp), %rdi
callq 0x61e0
movl $0xffffffff, 0x3a4(%rsp) # imm = 0xFFFFFFFF
jmp 0x2dad5
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x360(%rsp)
movl %eax, 0x35c(%rsp)
leaq 0x2a8(%rsp), %rdi
callq 0x61e0
jmp 0x2dae4
leaq 0x290(%rsp), %rdi
callq 0xadc0
movq 0x2e8(%rsp), %rdi
callq 0x11290
movq %rax, 0x288(%rsp)
movq 0x2e8(%rsp), %rdi
callq 0x112e0
movq %rax, 0x280(%rsp)
leaq 0x288(%rsp), %rdi
leaq 0x280(%rsp), %rsi
callq 0x112c0
testb $0x1, %al
jne 0x2d23b
jmp 0x2d45b
leaq 0x288(%rsp), %rdi
callq 0x11310
movq (%rax), %rdi
movq 0x390(%rsp), %rsi
movq (%rdi), %rax
movq 0x10(%rax), %rax
callq *%rax
movq %rax, 0xe8(%rsp)
jmp 0x2d266
movq 0xe8(%rsp), %rax
movq %rax, 0x278(%rsp)
movq 0x278(%rsp), %rdi
callq 0x7870
movl %eax, 0xe4(%rsp)
jmp 0x2d28c
movl 0xe4(%rsp), %eax
cmpl $0x1, %eax
je 0x2d3db
movq 0x278(%rsp), %rdi
movl $0x1, %esi
callq 0xa620
movq %rax, 0xd8(%rsp)
jmp 0x2d2b8
movq 0xd8(%rsp), %rax
movq %rax, 0x270(%rsp)
movq 0x278(%rsp), %rax
movq %rax, 0xd0(%rsp)
cmpq $0x0, %rax
je 0x2d2ec
movq 0xd0(%rsp), %rdi
movq (%rdi), %rax
callq *0x8(%rax)
cmpq $0x0, 0x270(%rsp)
jne 0x2d3cb
movq 0x48cee(%rip), %rdi     # 0x75ff0
leaq 0x33b57(%rip), %rsi     # 0x60e60
callq 0x62d0
movq %rax, 0xc8(%rsp)
jmp 0x2d318
movq 0x388(%rsp), %rsi
leaq 0x250(%rsp), %rdi
callq 0x309b0
jmp 0x2d32f
movq 0xc8(%rsp), %rdi
leaq 0x250(%rsp), %rsi
callq 0x62a0
movq %rax, 0xc0(%rsp)
jmp 0x2d34e
movq 0xc0(%rsp), %rdi
movq 0x48c5b(%rip), %rsi     # 0x75fb8
callq 0x6320
jmp 0x2d364
leaq 0x250(%rsp), %rdi
callq 0x61e0
movl $0xffffffff, 0x3a4(%rsp) # imm = 0xFFFFFFFF
movl $0x1, 0x24c(%rsp)
jmp 0x2d4bc
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x360(%rsp)
movl %eax, 0x35c(%rsp)
jmp 0x2d4e0
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x360(%rsp)
movl %eax, 0x35c(%rsp)
leaq 0x250(%rsp), %rdi
callq 0x61e0
jmp 0x2d4e0
movq 0x270(%rsp), %rax
movq %rax, 0x278(%rsp)
movq 0x278(%rsp), %rdi
callq 0x7fe0
movq %rax, 0xb8(%rsp)
jmp 0x2d3f2
movq 0xb8(%rsp), %rax
movq %rax, 0x240(%rsp)
leaq 0x290(%rsp), %rdi
leaq 0x240(%rsp), %rsi
callq 0x115d0
jmp 0x2d419
movq 0x278(%rsp), %rax
movq %rax, 0xb0(%rsp)
cmpq $0x0, %rax
je 0x2d43d
movq 0xb0(%rsp), %rdi
movq (%rdi), %rax
callq *0x8(%rax)
jmp 0x2d43f
leaq 0x288(%rsp), %rdi
xorl %esi, %esi
callq 0x11380
movq %rax, 0x238(%rsp)
jmp 0x2d208
movq 0x330(%rsp), %rdi
callq 0x7a20
movq %rax, 0xa8(%rsp)
jmp 0x2d472
movq 0xa8(%rsp), %rax
movq %rax, 0x230(%rsp)
movq 0x230(%rsp), %rdi
leaq 0x290(%rsp), %rsi
callq 0xa070
movq %rax, 0xa0(%rsp)
jmp 0x2d4a1
movq 0xa0(%rsp), %rax
movq %rax, 0x330(%rsp)
movl $0x0, 0x24c(%rsp)
leaq 0x290(%rsp), %rdi
callq 0xb090
movl 0x24c(%rsp), %eax
testl %eax, %eax
je 0x2d4db
jmp 0x2d4d6
jmp 0x2dad5
jmp 0x2d951
leaq 0x290(%rsp), %rdi
callq 0xb090
jmp 0x2dae4
movq 0x330(%rsp), %rdi
callq 0x7a20
movq %rax, %rdi
callq 0x7870
cmpl $0x6, %eax
jne 0x2d8b1
movb $0x0, 0x30f(%rsp)
movq 0x2e8(%rsp), %rdi
callq 0x115a0
cmpq $0x1, %rax
jbe 0x2d55d
movq 0x48abe(%rip), %rdi     # 0x75ff0
leaq 0x3395d(%rip), %rsi     # 0x60e96
callq 0x62d0
movq %rax, %rdi
movq 0x48a70(%rip), %rsi     # 0x75fb8
callq 0x6320
movl $0xffffffff, 0x3a4(%rsp) # imm = 0xFFFFFFFF
jmp 0x2dad5
movq 0x2e8(%rsp), %rdi
callq 0x2f010
movq (%rax), %rdi
movq 0x390(%rsp), %rsi
movq (%rdi), %rax
callq *0x10(%rax)
movq %rax, 0x228(%rsp)
cmpq $0x0, 0x228(%rsp)
jne 0x2d5c0
movq 0x48a5b(%rip), %rdi     # 0x75ff0
leaq 0x33930(%rip), %rsi     # 0x60ecc
callq 0x62d0
movq %rax, %rdi
movq 0x48a0d(%rip), %rsi     # 0x75fb8
callq 0x6320
movl $0xffffffff, 0x3a4(%rsp) # imm = 0xFFFFFFFF
jmp 0x2dad5
movq 0x330(%rsp), %rdi
callq 0x7a20
movq %rax, 0x220(%rsp)
movq 0x220(%rsp), %rax
movq %rax, 0x88(%rsp)
movq 0x228(%rsp), %rsi
movq (%rsi), %rax
movq 0x18(%rax), %rax
leaq 0x200(%rsp), %rdi
movq %rdi, 0x90(%rsp)
callq *%rax
movq 0x88(%rsp), %rdi
movq 0x90(%rsp), %rsi
callq 0x96c0
movq %rax, 0x98(%rsp)
jmp 0x2d625
movq 0x98(%rsp), %rax
movq %rax, 0x330(%rsp)
leaq 0x200(%rsp), %rdi
callq 0x61e0
cmpq $0x0, 0x330(%rsp)
jne 0x2d88e
movl $0x40, %edi
callq 0x62f0
movq %rax, %rdi
movq %rdi, %rax
movq %rax, 0x80(%rsp)
callq 0x91d0
jmp 0x2d670
movq 0x80(%rsp), %rax
movq %rax, 0x1f8(%rsp)
movl $0x10, %edi
callq 0x62f0
movq %rax, %rdi
movq %rdi, %rax
movq %rax, 0x78(%rsp)
movq 0x1f8(%rsp), %rsi
callq 0x78a0
jmp 0x2d6a4
movq 0x78(%rsp), %rax
movq %rax, 0x1f0(%rsp)
movl $0x20, %edi
callq 0x62f0
movq %rax, %rdi
movq %rdi, %rax
movq %rax, 0x70(%rsp)
movq 0x228(%rsp), %rsi
movq 0x1f0(%rsp), %rdx
callq 0x8e80
jmp 0x2d6dd
movq 0x70(%rsp), %rax
movq %rax, 0x1e8(%rsp)
movq 0x220(%rsp), %rdi
movq 0x1e8(%rsp), %rsi
callq 0x94d0
movq 0x1e8(%rsp), %rax
movq %rax, 0x68(%rsp)
cmpq $0x0, %rax
je 0x2d71d
movq 0x68(%rsp), %rdi
movq (%rdi), %rax
callq *0x8(%rax)
movq 0x1f0(%rsp), %rax
movq %rax, 0x60(%rsp)
cmpq $0x0, %rax
je 0x2d749
movq 0x60(%rsp), %rdi
callq 0x78f0
movq 0x60(%rsp), %rdi
movl $0x10, %esi
callq 0x6300
movq 0x1f8(%rsp), %rax
movq %rax, 0x58(%rsp)
cmpq $0x0, %rax
je 0x2d767
movq 0x58(%rsp), %rdi
movq (%rdi), %rax
callq *0x8(%rax)
movq 0x220(%rsp), %rax
movq %rax, 0x40(%rsp)
movq 0x228(%rsp), %rsi
movq (%rsi), %rax
movq 0x18(%rax), %rax
leaq 0x1c8(%rsp), %rdi
movq %rdi, 0x48(%rsp)
callq *%rax
movq 0x40(%rsp), %rdi
movq 0x48(%rsp), %rsi
callq 0x96c0
movq %rax, 0x50(%rsp)
jmp 0x2d7a8
movq 0x50(%rsp), %rax
movq %rax, 0x330(%rsp)
leaq 0x1c8(%rsp), %rdi
callq 0x61e0
jmp 0x2d88e
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x360(%rsp)
movl %eax, 0x35c(%rsp)
leaq 0x200(%rsp), %rdi
callq 0x61e0
jmp 0x2dae4
movq 0x80(%rsp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x360(%rsp)
movl %eax, 0x35c(%rsp)
movl $0x40, %esi
callq 0x6300
jmp 0x2dae4
movq 0x78(%rsp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x360(%rsp)
movl %eax, 0x35c(%rsp)
movl $0x10, %esi
callq 0x6300
jmp 0x2dae4
movq 0x70(%rsp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x360(%rsp)
movl %eax, 0x35c(%rsp)
movl $0x20, %esi
callq 0x6300
jmp 0x2dae4
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x360(%rsp)
movl %eax, 0x35c(%rsp)
leaq 0x1c8(%rsp), %rdi
callq 0x61e0
jmp 0x2dae4
movq 0x228(%rsp), %rax
movq %rax, 0x38(%rsp)
cmpq $0x0, %rax
je 0x2d8ac
movq 0x38(%rsp), %rdi
movq (%rdi), %rax
callq *0x8(%rax)
jmp 0x2d94f
movq 0x48738(%rip), %rdi     # 0x75ff0
leaq 0x3363e(%rip), %rsi     # 0x60efd
callq 0x62d0
movq %rax, 0x20(%rsp)
movq 0x388(%rsp), %rsi
leaq 0x1a8(%rsp), %rdi
movq %rdi, 0x28(%rsp)
callq 0x309b0
movq 0x20(%rsp), %rdi
movq 0x28(%rsp), %rsi
callq 0x62a0
movq %rax, 0x30(%rsp)
jmp 0x2d8f9
movq 0x30(%rsp), %rdi
movq 0x486b3(%rip), %rsi     # 0x75fb8
callq 0x6320
jmp 0x2d90c
leaq 0x1a8(%rsp), %rdi
callq 0x61e0
movl $0xffffffff, 0x3a4(%rsp) # imm = 0xFFFFFFFF
jmp 0x2dad5
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x360(%rsp)
movl %eax, 0x35c(%rsp)
leaq 0x1a8(%rsp), %rdi
callq 0x61e0
jmp 0x2dae4
jmp 0x2d951
jmp 0x2d953
jmp 0x2d955
leaq 0x2f8(%rsp), %rdi
xorl %esi, %esi
callq 0x11600
movq %rax, 0x1a0(%rsp)
jmp 0x2cfd0
movq 0x178(%rsp), %rax
movq 0x70(%rax), %rdi
movq 0x390(%rsp), %rsi
movq (%rdi), %rax
callq *0x10(%rax)
movq %rax, 0x198(%rsp)
cmpq $0x0, 0x198(%rsp)
jne 0x2d9d0
movq 0x4864b(%rip), %rdi     # 0x75ff0
leaq 0x3358f(%rip), %rsi     # 0x60f3b
callq 0x62d0
movq %rax, %rdi
movq 0x485fd(%rip), %rsi     # 0x75fb8
callq 0x6320
movl $0xffffffff, 0x3a4(%rsp) # imm = 0xFFFFFFFF
jmp 0x2dad5
movq 0x330(%rsp), %rdi
callq 0x7a20
movq %rax, %rdi
callq 0x7870
movl %eax, 0x1c(%rsp)
movq 0x198(%rsp), %rdi
callq 0x7870
movl %eax, %ecx
movl 0x1c(%rsp), %eax
cmpl %ecx, %eax
je 0x2daaa
testb $0x1, 0x30f(%rsp)
je 0x2daaa
movq 0x198(%rsp), %rax
movq %rax, 0x8(%rsp)
movq 0x388(%rsp), %rdi
callq 0x30cb0
movq 0x8(%rsp), %rdi
movl %eax, %esi
callq 0xa620
movq %rax, 0x190(%rsp)
movq 0x198(%rsp), %rax
movq %rax, 0x10(%rsp)
cmpq $0x0, %rax
je 0x2da5e
movq 0x10(%rsp), %rdi
movq (%rdi), %rax
callq *0x8(%rax)
movq 0x190(%rsp), %rax
movq %rax, 0x198(%rsp)
cmpq $0x0, 0x198(%rsp)
jne 0x2daa8
movq 0x48570(%rip), %rdi     # 0x75ff0
leaq 0x334f6(%rip), %rsi     # 0x60f7d
callq 0x62d0
movq %rax, %rdi
movq 0x48522(%rip), %rsi     # 0x75fb8
callq 0x6320
movl $0xffffffff, 0x3a4(%rsp) # imm = 0xFFFFFFFF
jmp 0x2dad5
jmp 0x2daaa
movq 0x178(%rsp), %rdi
movq 0x330(%rsp), %rsi
movq 0x198(%rsp), %rdx
movl 0x60(%rdi), %ecx
callq 0x2db00
movl $0x0, 0x3a4(%rsp)
movl 0x3a4(%rsp), %eax
addq $0x3a8, %rsp            # imm = 0x3A8
retq
movq 0x360(%rsp), %rdi
callq 0x6550
nopw %cs:(%rax,%rax)