// File: /workspace/github_cpp_makefile_star2_O3/marxn[P]pupp/src/parser/operation.cpp
// Function: Operation::AddOperation(ConstValue*, ConstValue*)
ConstValue * Operation::AddOperation(ConstValue * left, ConstValue * right)
{
        ConstValue * result = NULL;
        if(left->GetType()==Integer && right->GetType()==Integer)
        {
                result = new IntegerValue(static_cast<IntegerValue*>(left)->GetValue() + static_cast<IntegerValue*>(right)->GetValue());
        }
        else if(left->GetType()==Integer && right->GetType()==Decimal)
        {
                DecimalValue leftvalue(static_cast<IntegerValue*>(left));
                result = new DecimalValue(leftvalue + *static_cast<DecimalValue*>(right));
        }
        else if(left->GetType()==Decimal && right->GetType()==Integer)
        {
                DecimalValue rightvalue(static_cast<IntegerValue*>(right));
                result = new DecimalValue(*static_cast<DecimalValue*>(left) + rightvalue);
        }
        else if(left->GetType()==Decimal && right->GetType()==Decimal)
        {
                DecimalValue * value1 = static_cast<DecimalValue*>(left);
                DecimalValue * value2 = static_cast<DecimalValue*>(right);

                result = new DecimalValue(*value1 + *value2);        
        }
        else if(left->GetType()==Integer && right->GetType()==String)
        {
                StringValue * rightvalue = static_cast<StringValue*>(right);

                if(rightvalue->LooksLikeInteger())
                {
                        IntegerValue * value1 = static_cast<IntegerValue*>(left);
                        IntegerValue value2(rightvalue->toString());
                        result = new IntegerValue(value1->GetValue() + value2.GetValue());
                }
                else if(rightvalue->LooksLikeDecimal())
                {
                        DecimalValue value1(static_cast<IntegerValue*>(left));
                        DecimalValue value2(rightvalue->toString());

                        result = new DecimalValue(value1 + value2);
                }
                else
                {
                        result = left->DupValue();
                }
        }
        else if(left->GetType()==String && right->GetType()==Integer)
        {
                StringValue * leftvalue = static_cast<StringValue*>(left);
                if(leftvalue->LooksLikeInteger())
                {
                        IntegerValue value1(leftvalue->toString());
                        IntegerValue * value2 = static_cast<IntegerValue*>(right);
                        result = new IntegerValue(value1.GetValue() + value2->GetValue());
                }
                else if(leftvalue->LooksLikeDecimal())
                {
                        DecimalValue value1(leftvalue->toString());
                        DecimalValue value2(static_cast<IntegerValue*>(right));

                        result = new DecimalValue(value1 + value2);
                }
                else
                {
                        result = right->DupValue();
                }
        }
        else if(left->GetType()==Decimal && right->GetType()==String)
        {
                StringValue * rightvalue = static_cast<StringValue*>(right);

                if(rightvalue->LooksLikeInteger())
                {
                        DecimalValue * value1 = static_cast<DecimalValue*>(left);
                        DecimalValue value2(right->toString());

                        result = new DecimalValue(*value1 + value2);
                }
                else if(rightvalue->LooksLikeDecimal())
                {
                        DecimalValue * value1 = static_cast<DecimalValue*>(left);

                        DecimalValue value2(right->toString());
                        result = new DecimalValue(*value1 + value2);
                }
                else
                {
                        result = left->DupValue();
                }
        }
        else if(left->GetType()==String && right->GetType()==Decimal)
        {
                StringValue * leftvalue = static_cast<StringValue*>(left);

                if(leftvalue->LooksLikeInteger())
                {
                        DecimalValue value1(left->toString());

                        DecimalValue * value2 = static_cast<DecimalValue*>(right);
                        result = new DecimalValue(value1 + *value2);
                }
                else if(leftvalue->LooksLikeDecimal())
                {
                        DecimalValue value1(leftvalue->toString());

                        DecimalValue * value2 = static_cast<DecimalValue*>(right);

                        result = new DecimalValue(value1 + *value2);
                }
                else
                {
                        result = right->DupValue();
                }
        }
        else if(left->GetType()==String && right->GetType()==String)
        {
                result = new StringValue(left->toString() + right->toString());
        }
        else
        {
                result = new NullValue;
        }
        return result;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x170, %rsp            # imm = 0x170
movq %rsi, %r14
movq %rdi, %r15
callq 0x7da6
cmpl $0x1, %eax
jne 0xd7ac
movq %r14, %rdi
callq 0x7da6
cmpl $0x1, %eax
jne 0xd7ac
movl $0x18, %edi
callq 0x6260
movq %rax, %rbx
movq %r15, %rdi
callq 0x8160
movq %rax, %r15
movq %r14, %rdi
callq 0x8160
addq %r15, %rax
movq %rbx, %rdi
movq %rax, %rsi
callq 0x810c
jmp 0xdb92
movq %r15, %rdi
callq 0x7da6
cmpl $0x1, %eax
jne 0xd7ee
movq %r14, %rdi
callq 0x7da6
cmpl $0x2, %eax
jne 0xd7ee
movq %rsp, %rdi
movq %r15, %rsi
callq 0x8326
movl $0x28, %edi
callq 0x6260
movq %rax, %rbx
movq %rsp, %rsi
movq %rax, %rdi
movq %r14, %rdx
callq 0x8480
jmp 0xd82e
movq %r15, %rdi
callq 0x7da6
cmpl $0x2, %eax
jne 0xd83b
movq %r14, %rdi
callq 0x7da6
cmpl $0x1, %eax
jne 0xd83b
movq %rsp, %rdi
movq %r14, %rsi
callq 0x8326
movl $0x28, %edi
callq 0x6260
movq %rax, %rbx
movq %rsp, %rdx
movq %rax, %rdi
movq %r15, %rsi
callq 0x8480
movq %rsp, %rdi
callq 0x83ce
jmp 0xdb92
movq %r15, %rdi
callq 0x7da6
cmpl $0x2, %eax
jne 0xd875
movq %r14, %rdi
callq 0x7da6
cmpl $0x2, %eax
jne 0xd875
movl $0x28, %edi
callq 0x6260
movq %rax, %rbx
movq %rax, %rdi
movq %r15, %rsi
movq %r14, %rdx
callq 0x8480
jmp 0xdb92
movq %r15, %rdi
callq 0x7da6
cmpl $0x1, %eax
jne 0xd91a
movq %r14, %rdi
callq 0x7da6
cmpl $0x4, %eax
jne 0xd91a
movq %r14, %rdi
callq 0x803c
testb %al, %al
je 0xdba2
movq (%r14), %rax
leaq 0x150(%rsp), %rbx
movq %rbx, %rdi
movq %r14, %rsi
callq *0x18(%rax)
movq %rsp, %rdi
movq %rbx, %rsi
callq 0x8122
leaq 0x160(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0xd8e7
movq 0x160(%rsp), %rsi
incq %rsi
callq 0x6270
movl $0x18, %edi
callq 0x6260
movq %rax, %rbx
movq %r15, %rdi
callq 0x8160
movq %rax, %r14
movq %rsp, %rdi
callq 0x8160
addq %r14, %rax
movq %rbx, %rdi
movq %rax, %rsi
callq 0x810c
jmp 0xd9ba
movq %r15, %rdi
callq 0x7da6
cmpl $0x4, %eax
jne 0xd9c7
movq %r14, %rdi
callq 0x7da6
cmpl $0x1, %eax
jne 0xd9c7
movq %r15, %rdi
callq 0x803c
testb %al, %al
je 0xdc1a
movq (%r15), %rax
leaq 0x130(%rsp), %rbx
movq %rbx, %rdi
movq %r15, %rsi
callq *0x18(%rax)
movq %rsp, %rdi
movq %rbx, %rsi
callq 0x8122
leaq 0x140(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0xd98c
movq 0x140(%rsp), %rsi
incq %rsi
callq 0x6270
movl $0x18, %edi
callq 0x6260
movq %rax, %rbx
movq %rsp, %rdi
callq 0x8160
movq %rax, %r15
movq %r14, %rdi
callq 0x8160
addq %r15, %rax
movq %rbx, %rdi
movq %rax, %rsi
callq 0x810c
movq %rsp, %rdi
callq 0x97c6
jmp 0xdb92
movq %r15, %rdi
callq 0x7da6
cmpl $0x2, %eax
jne 0xda51
movq %r14, %rdi
callq 0x7da6
cmpl $0x4, %eax
jne 0xda51
movq %r14, %rdi
callq 0x803c
testb %al, %al
je 0xdca3
movq (%r14), %rax
leaq 0xf0(%rsp), %rbx
movq %rbx, %rdi
movq %r14, %rsi
callq *0x18(%rax)
movq %rsp, %rdi
movq %rbx, %rsi
callq 0x8222
leaq 0x100(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0xda31
movq 0x100(%rsp), %rsi
incq %rsi
callq 0x6270
movl $0x28, %edi
callq 0x6260
movq %rax, %rbx
movq %rsp, %rdx
movq %rax, %rdi
movq %r15, %rsi
callq 0x8480
jmp 0xd82e
movq %r15, %rdi
callq 0x7da6
cmpl $0x4, %eax
jne 0xdadb
movq %r14, %rdi
callq 0x7da6
cmpl $0x2, %eax
jne 0xdadb
movq %r15, %rdi
callq 0x803c
testb %al, %al
je 0xdd17
movq (%r15), %rax
leaq 0xb0(%rsp), %rbx
movq %rbx, %rdi
movq %r15, %rsi
callq *0x18(%rax)
movq %rsp, %rdi
movq %rbx, %rsi
callq 0x8222
leaq 0xc0(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0xdabb
movq 0xc0(%rsp), %rsi
incq %rsi
callq 0x6270
movl $0x28, %edi
callq 0x6260
movq %rax, %rbx
movq %rsp, %rsi
movq %rax, %rdi
movq %r14, %rdx
callq 0x8480
jmp 0xd82e
movq %r15, %rdi
callq 0x7da6
cmpl $0x4, %eax
jne 0xdb7d
movq %r14, %rdi
callq 0x7da6
cmpl $0x4, %eax
jne 0xdb7d
movl $0x30, %edi
callq 0x6260
movq %rax, %rbx
movq (%r15), %rax
movq %rsp, %rdi
movq %r15, %rsi
callq *0x18(%rax)
movq (%r14), %rax
leaq 0x28(%rsp), %rdi
movq %r14, %rsi
callq *0x18(%rax)
leaq 0x10(%rsp), %r14
movq -0x10(%r14), %rcx
movq -0x8(%r14), %r8
movq 0x30(%rsp), %rdx
leaq (%rdx,%r8), %rax
movl $0xf, %edi
cmpq %r14, %rcx
je 0xdb49
movq 0x10(%rsp), %rdi
movq 0x28(%rsp), %rsi
cmpq %rdi, %rax
jbe 0xdb70
leaq 0x38(%rsp), %r9
movl $0xf, %edi
cmpq %r9, %rsi
je 0xdb67
movq 0x38(%rsp), %rdi
cmpq %rdi, %rax
jbe 0xdd98
movq %rsp, %rdi
callq 0x60e0
jmp 0xdda6
movl $0x10, %edi
callq 0x6260
movq %rax, %rbx
movq %rax, %rdi
callq 0x7ed2
movq %rbx, %rax
addq $0x170, %rsp            # imm = 0x170
popq %rbx
popq %r14
popq %r15
retq
movq %r14, %rdi
callq 0x80aa
testb %al, %al
je 0xdd0f
movq %rsp, %rdi
movq %r15, %rsi
callq 0x8326
movq (%r14), %rax
leaq 0x70(%rsp), %rdi
movq %r14, %rsi
callq *0x18(%rax)
leaq 0x28(%rsp), %rdi
leaq 0x70(%rsp), %rsi
callq 0x8222
leaq 0x80(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0xdbfb
movq 0x80(%rsp), %rsi
incq %rsi
callq 0x6270
movl $0x28, %edi
callq 0x6260
movq %rax, %rbx
movq %rsp, %rsi
leaq 0x28(%rsp), %rdx
movq %rax, %rdi
callq 0x8480
jmp 0xdc94
movq %r15, %rdi
callq 0x80aa
testb %al, %al
je 0xdd83
movq (%r15), %rax
leaq 0x110(%rsp), %rbx
movq %rbx, %rdi
movq %r15, %rsi
callq *0x18(%rax)
movq %rsp, %rdi
movq %rbx, %rsi
callq 0x8222
leaq 0x120(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0xdc6a
movq 0x120(%rsp), %rsi
incq %rsi
callq 0x6270
leaq 0x28(%rsp), %rdi
movq %r14, %rsi
callq 0x8326
movl $0x28, %edi
callq 0x6260
movq %rax, %rbx
movq %rsp, %rsi
leaq 0x28(%rsp), %rdx
movq %rax, %rdi
callq 0x8480
leaq 0x28(%rsp), %rdi
callq 0x83ce
jmp 0xd82e
movq %r14, %rdi
callq 0x80aa
testb %al, %al
je 0xdd0f
movq (%r14), %rax
leaq 0xd0(%rsp), %rbx
movq %rbx, %rdi
movq %r14, %rsi
callq *0x18(%rax)
movq %rsp, %rdi
movq %rbx, %rsi
callq 0x8222
leaq 0xe0(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0xdcef
movq 0xe0(%rsp), %rsi
incq %rsi
callq 0x6270
movl $0x28, %edi
callq 0x6260
movq %rax, %rbx
movq %rsp, %rdx
movq %rax, %rdi
movq %r15, %rsi
callq 0x8480
jmp 0xd82e
movq (%r15), %rax
movq %r15, %rdi
jmp 0xdd89
movq %r15, %rdi
callq 0x80aa
testb %al, %al
je 0xdd83
movq (%r15), %rax
leaq 0x90(%rsp), %rbx
movq %rbx, %rdi
movq %r15, %rsi
callq *0x18(%rax)
movq %rsp, %rdi
movq %rbx, %rsi
callq 0x8222
leaq 0xa0(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0xdd63
movq 0xa0(%rsp), %rsi
incq %rsi
callq 0x6270
movl $0x28, %edi
callq 0x6260
movq %rax, %rbx
movq %rsp, %rsi
movq %rax, %rdi
movq %r14, %rdx
callq 0x8480
jmp 0xd82e
movq (%r14), %rax
movq %r14, %rdi
addq $0x170, %rsp            # imm = 0x170
popq %rbx
popq %r14
popq %r15
jmpq *0x10(%rax)
leaq 0x28(%rsp), %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x62e0
leaq 0x60(%rsp), %rdx
movq %rdx, -0x10(%rdx)
movq (%rax), %rsi
leaq 0x10(%rax), %rcx
cmpq %rcx, %rsi
je 0xddca
movq %rsi, 0x50(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x60(%rsp)
jmp 0xddd0
movups (%rcx), %xmm0
movups %xmm0, (%rdx)
movq %rax, %rdx
addq $0x8, %rdx
movq 0x8(%rax), %rsi
movq %rsi, 0x58(%rsp)
movq %rcx, (%rax)
movq $0x0, (%rdx)
movb $0x0, (%rcx)
leaq 0x50(%rsp), %rsi
movq %rbx, %rdi
callq 0x7f4c
leaq 0x60(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0xde15
movq 0x60(%rsp), %rsi
incq %rsi
callq 0x6270
leaq 0x38(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0xde30
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x6270
movq (%rsp), %rdi
cmpq %r14, %rdi
je 0xdb92
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x6270
jmp 0xdb92
jmp 0xe075
jmp 0xe087
movq %rax, %r14
leaq 0xa0(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0xe0a4
movq 0xa0(%rsp), %rsi
jmp 0xe03c
jmp 0xe075
jmp 0xe087
movq %rax, %r14
leaq 0xe0(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0xe0a4
movq 0xe0(%rsp), %rsi
jmp 0xe03c
jmp 0xdf0a
jmp 0xdf1c
jmp 0xe087
movq %rax, %r14
leaq 0x120(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0xe0a4
movq 0x120(%rsp), %rsi
jmp 0xe03c
jmp 0xe075
jmp 0xe087
movq %rax, %r14
leaq 0xc0(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0xe0a4
movq 0xc0(%rsp), %rsi
jmp 0xe03c
movq %rax, %r14
movl $0x28, %esi
movq %rbx, %rdi
callq 0x6270
jmp 0xdf1f
movq %rax, %r14
leaq 0x28(%rsp), %rdi
callq 0x83ce
jmp 0xe08a
movq %rax, %r14
leaq 0x80(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0xe08a
movq 0x80(%rsp), %rsi
incq %rsi
jmp 0xe080
jmp 0xe087
jmp 0xe075
jmp 0xe087
movq %rax, %r14
leaq 0x100(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0xe0a4
movq 0x100(%rsp), %rsi
jmp 0xe03c
movq %rax, %r14
leaq 0x60(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0xdfad
movq 0x60(%rsp), %rsi
incq %rsi
callq 0x6270
jmp 0xdfad
movq %rax, %r14
leaq 0x38(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0xdfcd
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x6270
jmp 0xdfcd
movq %rax, %r14
leaq 0x10(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0xdfed
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x6270
jmp 0xdfed
movq %rax, %r14
movl $0x30, %esi
jmp 0xe09c
jmp 0xe01b
movq %rax, %r14
leaq 0x140(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0xe0a4
movq 0x140(%rsp), %rsi
jmp 0xe03c
movq %rax, %r14
jmp 0xe067
movq %rax, %r14
leaq 0x160(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0xe0a4
movq 0x160(%rsp), %rsi
incq %rsi
jmp 0xe09f
movq %rax, %r14
movl $0x10, %esi
jmp 0xe09c
jmp 0xe057
movq %rax, %r14
movl $0x28, %esi
jmp 0xe09c
movq %rax, %r14
movl $0x18, %esi
movq %rbx, %rdi
callq 0x6270
movq %rsp, %rdi
callq 0x97c6
jmp 0xe0a4
jmp 0xe075
jmp 0xe087
movq %rax, %r14
movl $0x28, %esi
movq %rbx, %rdi
callq 0x6270
jmp 0xe08a
movq %rax, %r14
movq %rsp, %rdi
callq 0x83ce
jmp 0xe0a4
movq %rax, %r14
movl $0x18, %esi
movq %rbx, %rdi
callq 0x6270
movq %r14, %rdi
callq 0x6460