// File: /workspace/github_cpp_makefile_star2_O2/marxn[P]pupp/src/parser/operation.cpp
// Function: Operation::GTOperation(ConstValue*, ConstValue*)
ConstValue * Operation::GTOperation(ConstValue * left, ConstValue * right)
{
        ConstValue * result = NULL;

        if(left->GetType()==Integer && right->GetType()==Integer)
        {
                result = new BooleanValue(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 BooleanValue(leftvalue > *static_cast<DecimalValue*>(right));
        }
        else if(left->GetType()==Decimal && right->GetType()==Integer)
        {
                DecimalValue rightvalue(static_cast<IntegerValue*>(right));
                result = new BooleanValue(*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 BooleanValue(*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 BooleanValue(value1->GetValue() > value2.GetValue());
                }
                else if(rightvalue->LooksLikeDecimal())
                {
                        DecimalValue value1(static_cast<IntegerValue*>(left));
                        DecimalValue value2(rightvalue->toString());

                        result = new BooleanValue(value1 > value2);
                }
                else
                {
                        result = new NullValue;
                }
        }
        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 BooleanValue(value1.GetValue() > value2->GetValue());
                }
                else if(leftvalue->LooksLikeDecimal())
                {
                        DecimalValue value1(leftvalue->toString());
                        DecimalValue value2(static_cast<IntegerValue*>(right));

                        result = new BooleanValue(value1 > value2);
                }
                else
                {
                        result = new NullValue;
                }
        }
        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 BooleanValue(*value1 > value2);
                }
                else if(rightvalue->LooksLikeDecimal())
                {
                        DecimalValue * value1 = static_cast<DecimalValue*>(left);
                        DecimalValue value2(right->toString());

                        result = new BooleanValue(*value1 > value2);
                }
                else
                {
                        result = new NullValue;
                }
        }
        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 BooleanValue(value1 > *value2);
                }
                else if(leftvalue->LooksLikeDecimal())
                {
                        DecimalValue value1(leftvalue->toString());
                        DecimalValue * value2 = static_cast<DecimalValue*>(right);

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

                result = new BooleanValue(leftvalue->toString().compare(rightvalue->toString()) > 0);
        }
        else
        {
                result = new NullValue;
        }

        return result;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x150, %rsp            # imm = 0x150
movq %rsi, %r14
movq %rdi, %r15
callq 0x6cbc
cmpl $0x1, %eax
jne 0xd9ab
movq %r14, %rdi
callq 0x6cbc
cmpl $0x1, %eax
jne 0xd9ab
pushq $0x10
popq %rdi
callq 0x6260
movq %rax, %rbx
movq %r15, %rdi
callq 0x6fe4
movq %rax, %r15
movq %r14, %rdi
callq 0x6fe4
xorl %esi, %esi
cmpq %rax, %r15
setg %sil
movq %rbx, %rdi
callq 0x74a2
jmp 0xdf1a
movq %r15, %rdi
callq 0x6cbc
cmpl $0x1, %eax
jne 0xd9f3
movq %r14, %rdi
callq 0x6cbc
cmpl $0x2, %eax
jne 0xd9f3
movq %rsp, %rdi
movq %r15, %rsi
callq 0x713a
pushq $0x10
popq %rdi
callq 0x6260
movq %rax, %rbx
movq %rsp, %rdi
movq %r14, %rsi
callq 0x736c
movzbl %al, %esi
movq %rbx, %rdi
callq 0x74a2
jmp 0xda39
movq %r15, %rdi
callq 0x6cbc
cmpl $0x2, %eax
jne 0xda46
movq %r14, %rdi
callq 0x6cbc
cmpl $0x1, %eax
jne 0xda46
movq %rsp, %rdi
movq %r14, %rsi
callq 0x713a
pushq $0x10
popq %rdi
callq 0x6260
movq %rax, %rbx
movq %rsp, %rsi
movq %r15, %rdi
callq 0x736c
movzbl %al, %esi
movq %rbx, %rdi
callq 0x74a2
movq %rsp, %rdi
callq 0x71e2
jmp 0xdf1a
movq %r15, %rdi
callq 0x6cbc
cmpl $0x2, %eax
jne 0xda86
movq %r14, %rdi
callq 0x6cbc
cmpl $0x2, %eax
jne 0xda86
pushq $0x10
popq %rdi
callq 0x6260
movq %rax, %rbx
movq %r15, %rdi
movq %r14, %rsi
callq 0x736c
movzbl %al, %esi
movq %rbx, %rdi
callq 0x74a2
jmp 0xdf1a
movq %r15, %rdi
callq 0x6cbc
cmpl $0x1, %eax
jne 0xdb10
movq %r14, %rdi
callq 0x6cbc
cmpl $0x4, %eax
jne 0xdb10
movq %r14, %rdi
callq 0x6ed4
testb %al, %al
je 0xdd29
movq (%r14), %rax
leaq 0x130(%rsp), %rbx
movq %rbx, %rdi
movq %r14, %rsi
callq *0x18(%rax)
movq %rsp, %rdi
movq %rbx, %rsi
callq 0x6fa6
leaq 0x130(%rsp), %rdi
callq 0x6130
pushq $0x10
popq %rdi
callq 0x6260
movq %rax, %rbx
movq %r15, %rdi
callq 0x6fe4
movq %rax, %r14
movq %rsp, %rdi
callq 0x6fe4
xorl %esi, %esi
cmpq %rax, %r14
setg %sil
movq %rbx, %rdi
callq 0x74a2
jmp 0xdb99
movq %r15, %rdi
callq 0x6cbc
cmpl $0x4, %eax
jne 0xdba6
movq %r14, %rdi
callq 0x6cbc
cmpl $0x1, %eax
jne 0xdba6
movq %r15, %rdi
callq 0x6ed4
testb %al, %al
je 0xdd90
movq (%r15), %rax
leaq 0x110(%rsp), %rbx
movq %rbx, %rdi
movq %r15, %rsi
callq *0x18(%rax)
movq %rsp, %rdi
movq %rbx, %rsi
callq 0x6fa6
leaq 0x110(%rsp), %rdi
callq 0x6130
pushq $0x10
popq %rdi
callq 0x6260
movq %rax, %rbx
movq %rsp, %rdi
callq 0x6fe4
movq %rax, %r15
movq %r14, %rdi
callq 0x6fe4
xorl %esi, %esi
cmpq %rax, %r15
setg %sil
movq %rbx, %rdi
callq 0x74a2
movq %rsp, %rdi
callq 0x817e
jmp 0xdf1a
movq %r15, %rdi
callq 0x6cbc
cmpl $0x2, %eax
jne 0xdc22
movq %r14, %rdi
callq 0x6cbc
cmpl $0x4, %eax
jne 0xdc22
movq %r14, %rdi
callq 0x6ed4
testb %al, %al
je 0xde0b
movq (%r14), %rax
leaq 0xd0(%rsp), %rbx
movq %rbx, %rdi
movq %r14, %rsi
callq *0x18(%rax)
movq %rsp, %rdi
movq %rbx, %rsi
callq 0x7098
leaq 0xd0(%rsp), %rdi
callq 0x6130
pushq $0x10
popq %rdi
callq 0x6260
movq %rax, %rbx
movq %rsp, %rsi
movq %r15, %rdi
callq 0x736c
movzbl %al, %esi
movq %rbx, %rdi
callq 0x74a2
jmp 0xda39
movq %r15, %rdi
callq 0x6cbc
cmpl $0x4, %eax
jne 0xdc9e
movq %r14, %rdi
callq 0x6cbc
cmpl $0x2, %eax
jne 0xdc9e
movq %r15, %rdi
callq 0x6ed4
testb %al, %al
je 0xde85
movq (%r15), %rax
leaq 0x90(%rsp), %rbx
movq %rbx, %rdi
movq %r15, %rsi
callq *0x18(%rax)
movq %rsp, %rdi
movq %rbx, %rsi
callq 0x7098
leaq 0x90(%rsp), %rdi
callq 0x6130
pushq $0x10
popq %rdi
callq 0x6260
movq %rax, %rbx
movq %rsp, %rdi
movq %r14, %rsi
callq 0x736c
movzbl %al, %esi
movq %rbx, %rdi
callq 0x74a2
jmp 0xda39
movq %r15, %rdi
callq 0x6cbc
cmpl $0x4, %eax
jne 0xdd11
movq %r14, %rdi
callq 0x6cbc
cmpl $0x4, %eax
jne 0xdd11
pushq $0x10
popq %rdi
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)
movq %rsp, %rdi
leaq 0x28(%rsp), %rsi
callq 0x6040
xorl %esi, %esi
testl %eax, %eax
setg %sil
movq %rbx, %rdi
callq 0x74a2
leaq 0x28(%rsp), %rdi
callq 0x6130
movq %rsp, %rdi
callq 0x6130
jmp 0xdf1a
pushq $0x10
popq %rdi
callq 0x6260
movq %rax, %rbx
movq %rax, %rdi
callq 0x6da8
jmp 0xdf1a
movq %r14, %rdi
callq 0x6f42
testb %al, %al
je 0xde6d
movq %rsp, %rdi
movq %r15, %rsi
callq 0x713a
movq (%r14), %rax
leaq 0x50(%rsp), %rdi
movq %r14, %rsi
callq *0x18(%rax)
leaq 0x28(%rsp), %rdi
leaq 0x50(%rsp), %rsi
callq 0x7098
leaq 0x50(%rsp), %rdi
callq 0x6130
pushq $0x10
popq %rdi
callq 0x6260
movq %rax, %rbx
movq %rsp, %rdi
leaq 0x28(%rsp), %rsi
callq 0x736c
movzbl %al, %esi
movq %rbx, %rdi
callq 0x74a2
jmp 0xddfc
movq %r15, %rdi
callq 0x6f42
testb %al, %al
je 0xdedd
movq (%r15), %rax
leaq 0xf0(%rsp), %rbx
movq %rbx, %rdi
movq %r15, %rsi
callq *0x18(%rax)
movq %rsp, %rdi
movq %rbx, %rsi
callq 0x7098
leaq 0xf0(%rsp), %rdi
callq 0x6130
leaq 0x28(%rsp), %rdi
movq %r14, %rsi
callq 0x713a
pushq $0x10
popq %rdi
callq 0x6260
movq %rax, %rbx
movq %rsp, %rdi
leaq 0x28(%rsp), %rsi
callq 0x736c
movzbl %al, %esi
movq %rbx, %rdi
callq 0x74a2
leaq 0x28(%rsp), %rdi
callq 0x71e2
jmp 0xda39
movq %r14, %rdi
callq 0x6f42
testb %al, %al
je 0xdef2
movq (%r14), %rax
leaq 0xb0(%rsp), %rbx
movq %rbx, %rdi
movq %r14, %rsi
callq *0x18(%rax)
movq %rsp, %rdi
movq %rbx, %rsi
callq 0x7098
leaq 0xb0(%rsp), %rdi
callq 0x6130
pushq $0x10
popq %rdi
callq 0x6260
movq %rax, %rbx
movq %rsp, %rsi
movq %r15, %rdi
callq 0x736c
movzbl %al, %esi
movq %rbx, %rdi
callq 0x74a2
jmp 0xda39
pushq $0x10
popq %rdi
callq 0x6260
movq %rax, %rbx
movq %rax, %rdi
callq 0x6da8
jmp 0xdf1a
movq %r15, %rdi
callq 0x6f42
testb %al, %al
je 0xdf07
movq (%r15), %rax
leaq 0x70(%rsp), %rbx
movq %rbx, %rdi
movq %r15, %rsi
callq *0x18(%rax)
movq %rsp, %rdi
movq %rbx, %rsi
callq 0x7098
leaq 0x70(%rsp), %rdi
callq 0x6130
pushq $0x10
popq %rdi
callq 0x6260
movq %rax, %rbx
movq %rsp, %rdi
movq %r14, %rsi
callq 0x736c
movzbl %al, %esi
movq %rbx, %rdi
callq 0x74a2
jmp 0xda39
pushq $0x10
popq %rdi
callq 0x6260
movq %rax, %rbx
movq %rax, %rdi
callq 0x6da8
jmp 0xdf1a
pushq $0x10
popq %rdi
callq 0x6260
movq %rax, %rbx
movq %rax, %rdi
callq 0x6da8
jmp 0xdf1a
pushq $0x10
popq %rdi
callq 0x6260
movq %rax, %rbx
movq %rax, %rdi
callq 0x6da8
movq %rbx, %rax
addq $0x150, %rsp            # imm = 0x150
popq %rbx
popq %r14
popq %r15
retq
jmp 0xe04b
jmp 0xe06c
movq %rax, %r14
leaq 0x70(%rsp), %rdi
jmp 0xe00d
jmp 0xe04b
jmp 0xe06c
movq %rax, %r14
leaq 0xb0(%rsp), %rdi
jmp 0xe00d
jmp 0xdf8e
jmp 0xe04b
jmp 0xe06c
movq %rax, %r14
leaq 0xf0(%rsp), %rdi
jmp 0xe00d
jmp 0xe054
jmp 0xe04b
movq %rax, %r14
leaq 0x90(%rsp), %rdi
jmp 0xe00d
movq %rax, %r14
jmp 0xdff1
movq %rax, %r14
leaq 0x50(%rsp), %rdi
callq 0x6130
jmp 0xe062
jmp 0xe06c
jmp 0xe04b
jmp 0xe054
jmp 0xe04b
movq %rax, %r14
leaq 0xd0(%rsp), %rdi
jmp 0xe00d
movq %rax, %r14
jmp 0xe023
jmp 0xe06c
jmp 0xdfe3
jmp 0xdffd
movq %rax, %r14
leaq 0x110(%rsp), %rdi
jmp 0xe00d
jmp 0xe054
movq %rax, %r14
pushq $0x10
popq %rsi
movq %rbx, %rdi
callq 0x6270
leaq 0x28(%rsp), %rdi
callq 0x71e2
jmp 0xe062
movq %rax, %r14
jmp 0xe03f
movq %rax, %r14
leaq 0x130(%rsp), %rdi
callq 0x6130
jmp 0xe07a
jmp 0xe054
movq %rax, %r14
leaq 0x28(%rsp), %rdi
callq 0x6130
movq %rsp, %rdi
callq 0x6130
jmp 0xe06f
jmp 0xe06c
jmp 0xe031
movq %rax, %r14
pushq $0x10
popq %rsi
movq %rbx, %rdi
callq 0x6270
movq %rsp, %rdi
callq 0x817e
jmp 0xe07a
jmp 0xe04b
movq %rax, %r14
jmp 0xe062
jmp 0xe06c
jmp 0xe054
movq %rax, %r14
pushq $0x10
popq %rsi
movq %rbx, %rdi
callq 0x6270
movq %rsp, %rdi
callq 0x71e2
jmp 0xe07a
movq %rax, %r14
pushq $0x10
popq %rsi
movq %rbx, %rdi
callq 0x6270
movq %r14, %rdi
callq 0x6460