// File: /workspace/github_cpp_makefile_star2_O1/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, 0x30(%rsp)
movq %rdi, %rbx
movl $0x40, %edi
callq 0x6260
movq %rax, 0x20(%rsp)
movq %rax, %rdi
callq 0x8a9a
leaq 0x8(%rsp), %rax
movq %rax, 0x8(%rax)
movq %rax, (%rax)
movq $0x0, 0x10(%rax)
movq 0x18(%rbx), %rax
movq (%rax), %r12
cmpq %rax, %r12
je 0xa2f5
movq $0x0, 0x28(%rsp)
movq 0x10(%r12), %rdi
movq (%rdi), %rax
movq 0x30(%rsp), %rsi
callq *0x10(%rax)
movq %rax, %rbp
movq %rax, %rdi
callq 0x7dee
cmpl $0x5, %eax
jne 0xa263
movl $0x18, %edi
callq 0x6260
movq %rbp, 0x10(%rax)
movq %rax, %rdi
leaq 0x8(%rsp), %rsi
callq 0x6070
incq 0x18(%rsp)
jmp 0xa2e7
movl $0x18, %edi
callq 0x6260
movq %rax, %r13
movq %rax, %rdi
movq 0x28(%rsp), %rsi
callq 0x815a
movl $0x10, %edi
callq 0x6260
movq %rax, %r14
movq %rax, %rdi
movq %rbp, %rsi
callq 0x7e02
movl $0x20, %edi
callq 0x6260
movq %rax, %r15
movq %rax, %rdi
movq %r13, %rsi
movq %r14, %rdx
callq 0x886e
movq 0x20(%rsp), %rdi
movq %r15, %rsi
callq 0x8c26
movq %r14, %rdi
callq 0x7e66
movq (%r15), %rax
movq %r15, %rdi
callq *0x8(%rax)
movq (%r13), %rax
movq %r13, %rdi
callq *0x8(%rax)
movq (%rbp), %rax
movq %rbp, %rdi
callq *0x8(%rax)
incq 0x28(%rsp)
movq (%r12), %r12
cmpq 0x18(%rbx), %r12
jne 0xa21e
movq 0x8(%rsp), %r15
leaq 0x8(%rsp), %rbx
cmpq %rbx, %r15
movq 0x20(%rsp), %r12
je 0xa32e
movq 0x10(%r15), %r14
movq %r12, %rdi
movq %r14, %rsi
callq 0x8c26
testq %r14, %r14
je 0xa326
movq (%r14), %rax
movq %r14, %rdi
callq *0x8(%rax)
movq (%r15), %r15
cmpq %rbx, %r15
jne 0xa309
movq 0x8(%rsp), %rdi
cmpq %rbx, %rdi
je 0xa34d
movq (%rdi), %r14
movl $0x18, %esi
callq 0x6270
movq %r14, %rdi
cmpq %rbx, %r14
jne 0xa338
movq %r12, %rax
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %r12
movl $0x40, %esi
movq 0x20(%rsp), %rdi
callq 0x6270
jmp 0xa3d3
movq %rax, %r12
movl $0x18, %esi
movq %r13, %rdi
jmp 0xa39c
movq %rax, %r12
movl $0x10, %esi
movq %r14, %rdi
jmp 0xa39c
jmp 0xa3ac
jmp 0xa3ac
movq %rax, %r12
movl $0x20, %esi
movq %r15, %rdi
callq 0x6270
jmp 0xa3af
jmp 0xa3ac
movq %rax, %r12
jmp 0xa3b4
jmp 0xa3ac
movq %rax, %r12
leaq 0x8(%rsp), %rbx
movq 0x8(%rsp), %rdi
cmpq %rbx, %rdi
je 0xa3d3
movq (%rdi), %r14
movl $0x18, %esi
callq 0x6270
movq %r14, %rdi
cmpq %rbx, %r14
jne 0xa3be
movq %r12, %rdi
callq 0x6470
nop