// File: /workspace/github_cpp_makefile_star2_O2/marxn[P]pupp/src/parser/expression.cpp
// Function: SetExpression::Calculate(NodeContext*)
ConstValue * SetExpression::Calculate(NodeContext * context)
{
        long index = 0;
        MapValue * result = new MapValue;
        list<KVValue*> tobedone;

        list<Expression*>::iterator i;
        for(i = this->ExprList->begin(); i!=this->ExprList->end(); i++)
        {
                ConstValue * value = (*i)->Calculate(context);
                if(value->GetType()==KeyValue)
                {
                        tobedone.push_back(static_cast<KVValue*>(value));
                }
                else
                {
                        IntegerValue * key = new IntegerValue(index);
                        ValueBox * vb = new ValueBox(value);

                        KVValue * kv = new KVValue(key, vb);
                        result->AddKV(kv);

                        vb->Destroy();
                        delete kv;
                        delete key;
                        delete value;
                        index++;
                }
        }

        list<KVValue*>::iterator j;
        for(j = tobedone.begin(); j!=tobedone.end(); j++)
        {
                KVValue * value = *j;
                result->AddKV(value);
                delete value;
        }

        return result;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movq %rsi, 0x10(%rsp)
movq %rdi, %r13
pushq $0x40
popq %rdi
callq 0x6260
movq %rax, (%rsp)
movq %rax, %rdi
callq 0x76dc
leaq 0x20(%rsp), %rax
movq %rax, 0x8(%rax)
movq %rax, (%rax)
andq $0x0, 0x10(%rax)
movq 0x18(%r13), %rax
movq $0x0, 0x8(%rsp)
movq %rax, %rbx
movq (%rbx), %rbx
cmpq %rax, %rbx
je 0x8cc6
movq 0x10(%rbx), %rdi
movq (%rdi), %rax
movq 0x10(%rsp), %rsi
callq *0x10(%rax)
movq %rax, %rbp
movq %rax, %rdi
callq 0x6cbc
cmpl $0x5, %eax
jne 0x8c40
movq %rbp, 0x18(%rsp)
leaq 0x20(%rsp), %rdi
leaq 0x18(%rsp), %rsi
callq 0x9f34
jmp 0x8cbd
pushq $0x18
popq %rdi
callq 0x6260
movq %rax, %r14
movq %rax, %rdi
movq 0x8(%rsp), %rsi
callq 0x6f90
pushq $0x10
popq %rdi
callq 0x6260
movq %rax, %r15
movq %rax, %rdi
movq %rbp, %rsi
callq 0x6cce
pushq $0x20
popq %rdi
callq 0x6260
movq %rax, %r12
movq %rax, %rdi
movq %r14, %rsi
movq %r15, %rdx
callq 0x7554
movq (%rsp), %rdi
movq %r12, %rsi
callq 0x782c
movq %r15, %rdi
callq 0x6d16
movq (%r12), %rax
movq %r12, %rdi
callq *0x8(%rax)
movq (%r14), %rax
movq %r14, %rdi
callq *0x8(%rax)
movq (%rbp), %rax
movq %rbp, %rdi
callq *0x8(%rax)
incq 0x8(%rsp)
movq 0x18(%r13), %rax
jmp 0x8bff
leaq 0x20(%rsp), %r12
movq %r12, %rbx
movq (%rsp), %r15
movq (%rbx), %rbx
cmpq %r12, %rbx
je 0x8cf9
movq 0x10(%rbx), %r14
movq %r15, %rdi
movq %r14, %rsi
callq 0x782c
testq %r14, %r14
je 0x8cd2
movq (%r14), %rax
movq %r14, %rdi
callq *0x8(%rax)
jmp 0x8cd2
leaq 0x20(%rsp), %rdi
callq 0x9ffc
movq %r15, %rax
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %r13
pushq $0x40
popq %rsi
movq (%rsp), %rdi
callq 0x6270
jmp 0x8d63
movq %rax, %r13
pushq $0x18
popq %rsi
movq %r14, %rdi
jmp 0x8d49
movq %rax, %r13
pushq $0x10
popq %rsi
movq %r15, %rdi
jmp 0x8d49
jmp 0x8d56
jmp 0x8d56
movq %rax, %r13
pushq $0x20
popq %rsi
movq %r12, %rdi
callq 0x6270
jmp 0x8d59
jmp 0x8d56
jmp 0x8d56
jmp 0x8d56
movq %rax, %r13
leaq 0x20(%rsp), %rdi
callq 0x9ffc
movq %r13, %rdi
callq 0x6460
nop