// File: /workspace/github_cpp_makefile_star2_O1/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 0x7dee
cmpl $0x1, %eax
jne 0xd834
movq %r14, %rdi
callq 0x7dee
cmpl $0x1, %eax
jne 0xd834
movl $0x18, %edi
callq 0x6260
movq %rax, %rbx
movq %r15, %rdi
callq 0x81ae
movq %rax, %r15
movq %r14, %rdi
callq 0x81ae
addq %r15, %rax
movq %rbx, %rdi
movq %rax, %rsi
callq 0x815a
jmp 0xdc1b
movq %r15, %rdi
callq 0x7dee
cmpl $0x1, %eax
jne 0xd876
movq %r14, %rdi
callq 0x7dee
cmpl $0x2, %eax
jne 0xd876
movq %rsp, %rdi
movq %r15, %rsi
callq 0x8374
movl $0x28, %edi
callq 0x6260
movq %rax, %rbx
movq %rsp, %rsi
movq %rax, %rdi
movq %r14, %rdx
callq 0x84ce
jmp 0xd8b6
movq %r15, %rdi
callq 0x7dee
cmpl $0x2, %eax
jne 0xd8c3
movq %r14, %rdi
callq 0x7dee
cmpl $0x1, %eax
jne 0xd8c3
movq %rsp, %rdi
movq %r14, %rsi
callq 0x8374
movl $0x28, %edi
callq 0x6260
movq %rax, %rbx
movq %rsp, %rdx
movq %rax, %rdi
movq %r15, %rsi
callq 0x84ce
movq %rsp, %rdi
callq 0x841c
jmp 0xdc1b
movq %r15, %rdi
callq 0x7dee
cmpl $0x2, %eax
jne 0xd8fd
movq %r14, %rdi
callq 0x7dee
cmpl $0x2, %eax
jne 0xd8fd
movl $0x28, %edi
callq 0x6260
movq %rax, %rbx
movq %rax, %rdi
movq %r15, %rsi
movq %r14, %rdx
callq 0x84ce
jmp 0xdc1b
movq %r15, %rdi
callq 0x7dee
cmpl $0x1, %eax
jne 0xd9a2
movq %r14, %rdi
callq 0x7dee
cmpl $0x4, %eax
jne 0xd9a2
movq %r14, %rdi
callq 0x808a
testb %al, %al
je 0xdc2b
movq (%r14), %rax
leaq 0x150(%rsp), %rbx
movq %rbx, %rdi
movq %r14, %rsi
callq *0x18(%rax)
movq %rsp, %rdi
movq %rbx, %rsi
callq 0x8170
leaq 0x160(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0xd96f
movq 0x160(%rsp), %rsi
incq %rsi
callq 0x6270
movl $0x18, %edi
callq 0x6260
movq %rax, %rbx
movq %r15, %rdi
callq 0x81ae
movq %rax, %r14
movq %rsp, %rdi
callq 0x81ae
addq %r14, %rax
movq %rbx, %rdi
movq %rax, %rsi
callq 0x815a
jmp 0xda42
movq %r15, %rdi
callq 0x7dee
cmpl $0x4, %eax
jne 0xda4f
movq %r14, %rdi
callq 0x7dee
cmpl $0x1, %eax
jne 0xda4f
movq %r15, %rdi
callq 0x808a
testb %al, %al
je 0xdca3
movq (%r15), %rax
leaq 0x130(%rsp), %rbx
movq %rbx, %rdi
movq %r15, %rsi
callq *0x18(%rax)
movq %rsp, %rdi
movq %rbx, %rsi
callq 0x8170
leaq 0x140(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0xda14
movq 0x140(%rsp), %rsi
incq %rsi
callq 0x6270
movl $0x18, %edi
callq 0x6260
movq %rax, %rbx
movq %rsp, %rdi
callq 0x81ae
movq %rax, %r15
movq %r14, %rdi
callq 0x81ae
addq %r15, %rax
movq %rbx, %rdi
movq %rax, %rsi
callq 0x815a
movq %rsp, %rdi
callq 0x9816
jmp 0xdc1b
movq %r15, %rdi
callq 0x7dee
cmpl $0x2, %eax
jne 0xdad9
movq %r14, %rdi
callq 0x7dee
cmpl $0x4, %eax
jne 0xdad9
movq %r14, %rdi
callq 0x808a
testb %al, %al
je 0xdd2c
movq (%r14), %rax
leaq 0xf0(%rsp), %rbx
movq %rbx, %rdi
movq %r14, %rsi
callq *0x18(%rax)
movq %rsp, %rdi
movq %rbx, %rsi
callq 0x8270
leaq 0x100(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0xdab9
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 0x84ce
jmp 0xd8b6
movq %r15, %rdi
callq 0x7dee
cmpl $0x4, %eax
jne 0xdb63
movq %r14, %rdi
callq 0x7dee
cmpl $0x2, %eax
jne 0xdb63
movq %r15, %rdi
callq 0x808a
testb %al, %al
je 0xdda0
movq (%r15), %rax
leaq 0xb0(%rsp), %rbx
movq %rbx, %rdi
movq %r15, %rsi
callq *0x18(%rax)
movq %rsp, %rdi
movq %rbx, %rsi
callq 0x8270
leaq 0xc0(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0xdb43
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 0x84ce
jmp 0xd8b6
movq %r15, %rdi
callq 0x7dee
cmpl $0x4, %eax
jne 0xdc06
movq %r14, %rdi
callq 0x7dee
cmpl $0x4, %eax
jne 0xdc06
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, %esi
cmpq %r14, %rcx
je 0xdbd1
movq 0x10(%rsp), %rsi
cmpq %rsi, %rax
jbe 0xdbf4
leaq 0x38(%rsp), %rdi
movl $0xf, %esi
cmpq %rdi, -0x10(%rdi)
je 0xdbeb
movq 0x38(%rsp), %rsi
cmpq %rsi, %rax
jbe 0xde21
movq 0x28(%rsp), %rsi
movq %rsp, %rdi
callq 0x60e0
jmp 0xde2f
movl $0x10, %edi
callq 0x6260
movq %rax, %rbx
movq %rax, %rdi
callq 0x7f20
movq %rbx, %rax
addq $0x170, %rsp            # imm = 0x170
popq %rbx
popq %r14
popq %r15
retq
movq %r14, %rdi
callq 0x80f8
testb %al, %al
je 0xdd98
movq %rsp, %rdi
movq %r15, %rsi
callq 0x8374
movq (%r14), %rax
leaq 0x70(%rsp), %rdi
movq %r14, %rsi
callq *0x18(%rax)
leaq 0x28(%rsp), %rdi
leaq 0x70(%rsp), %rsi
callq 0x8270
leaq 0x80(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0xdc84
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 0x84ce
jmp 0xdd1d
movq %r15, %rdi
callq 0x80f8
testb %al, %al
je 0xde0c
movq (%r15), %rax
leaq 0x110(%rsp), %rbx
movq %rbx, %rdi
movq %r15, %rsi
callq *0x18(%rax)
movq %rsp, %rdi
movq %rbx, %rsi
callq 0x8270
leaq 0x120(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0xdcf3
movq 0x120(%rsp), %rsi
incq %rsi
callq 0x6270
leaq 0x28(%rsp), %rdi
movq %r14, %rsi
callq 0x8374
movl $0x28, %edi
callq 0x6260
movq %rax, %rbx
movq %rsp, %rsi
leaq 0x28(%rsp), %rdx
movq %rax, %rdi
callq 0x84ce
leaq 0x28(%rsp), %rdi
callq 0x841c
jmp 0xd8b6
movq %r14, %rdi
callq 0x80f8
testb %al, %al
je 0xdd98
movq (%r14), %rax
leaq 0xd0(%rsp), %rbx
movq %rbx, %rdi
movq %r14, %rsi
callq *0x18(%rax)
movq %rsp, %rdi
movq %rbx, %rsi
callq 0x8270
leaq 0xe0(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0xdd78
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 0x84ce
jmp 0xd8b6
movq (%r15), %rax
movq %r15, %rdi
jmp 0xde12
movq %r15, %rdi
callq 0x80f8
testb %al, %al
je 0xde0c
movq (%r15), %rax
leaq 0x90(%rsp), %rbx
movq %rbx, %rdi
movq %r15, %rsi
callq *0x18(%rax)
movq %rsp, %rdi
movq %rbx, %rsi
callq 0x8270
leaq 0xa0(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0xddec
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 0x84ce
jmp 0xd8b6
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 0xde53
movq %rsi, 0x50(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x60(%rsp)
jmp 0xde59
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 0x7f9a
leaq 0x60(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0xde9e
movq 0x60(%rsp), %rsi
incq %rsi
callq 0x6270
leaq 0x38(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0xdeb9
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x6270
movq (%rsp), %rdi
cmpq %r14, %rdi
je 0xdc1b
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x6270
jmp 0xdc1b
jmp 0xe0fe
jmp 0xe110
movq %rax, %r14
leaq 0xa0(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0xe12d
movq 0xa0(%rsp), %rsi
jmp 0xe0c5
jmp 0xe0fe
jmp 0xe110
movq %rax, %r14
leaq 0xe0(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0xe12d
movq 0xe0(%rsp), %rsi
jmp 0xe0c5
jmp 0xdf93
jmp 0xdfa5
jmp 0xe110
movq %rax, %r14
leaq 0x120(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0xe12d
movq 0x120(%rsp), %rsi
jmp 0xe0c5
jmp 0xe0fe
jmp 0xe110
movq %rax, %r14
leaq 0xc0(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0xe12d
movq 0xc0(%rsp), %rsi
jmp 0xe0c5
movq %rax, %r14
movl $0x28, %esi
movq %rbx, %rdi
callq 0x6270
jmp 0xdfa8
movq %rax, %r14
leaq 0x28(%rsp), %rdi
callq 0x841c
jmp 0xe113
movq %rax, %r14
leaq 0x80(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0xe113
movq 0x80(%rsp), %rsi
incq %rsi
jmp 0xe109
jmp 0xe110
jmp 0xe0fe
jmp 0xe110
movq %rax, %r14
leaq 0x100(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0xe12d
movq 0x100(%rsp), %rsi
jmp 0xe0c5
movq %rax, %r14
leaq 0x60(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0xe036
movq 0x60(%rsp), %rsi
incq %rsi
callq 0x6270
jmp 0xe036
movq %rax, %r14
leaq 0x38(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0xe056
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x6270
jmp 0xe056
movq %rax, %r14
leaq 0x10(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0xe076
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x6270
jmp 0xe076
movq %rax, %r14
movl $0x30, %esi
jmp 0xe125
jmp 0xe0a4
movq %rax, %r14
leaq 0x140(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0xe12d
movq 0x140(%rsp), %rsi
jmp 0xe0c5
movq %rax, %r14
jmp 0xe0f0
movq %rax, %r14
leaq 0x160(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0xe12d
movq 0x160(%rsp), %rsi
incq %rsi
jmp 0xe128
movq %rax, %r14
movl $0x10, %esi
jmp 0xe125
jmp 0xe0e0
movq %rax, %r14
movl $0x28, %esi
jmp 0xe125
movq %rax, %r14
movl $0x18, %esi
movq %rbx, %rdi
callq 0x6270
movq %rsp, %rdi
callq 0x9816
jmp 0xe12d
jmp 0xe0fe
jmp 0xe110
movq %rax, %r14
movl $0x28, %esi
movq %rbx, %rdi
callq 0x6270
jmp 0xe113
movq %rax, %r14
movq %rsp, %rdi
callq 0x841c
jmp 0xe12d
movq %rax, %r14
movl $0x18, %esi
movq %rbx, %rdi
callq 0x6270
movq %r14, %rdi
callq 0x6470
nop