// File: /workspace/github_cpp_makefile_star2_O2/kelwinfc[P]ci4721-Fernandez-Gyomrey/src/AST.cpp
// Function: AST_op::AST_op(AST_expression*, tokenId*, AST_expression*)
AST_op::AST_op(AST_expression* l, tokenId* o, AST_expression* r){
    
    is_constant = false;
    type = UNDEFINED;
    
    line = l->line;
    column = l->column;
    
    if ( o->ident.compare("+") == 0 ){
        oper_type = PLUS;
    } else if ( o->ident.compare("-") == 0 ){
        oper_type = MINUS;
    } else if ( o->ident.compare("*") == 0 ){
        oper_type = PROD;
    } else if ( o->ident.compare("/") == 0 ){
        oper_type = DIV;
    } else if ( o->ident.compare("%") == 0 ){
        oper_type = MOD;
    } else if ( o->ident.compare("&&") == 0 ){
        oper_type = AND;
    } else if ( o->ident.compare("||") == 0 ){
        oper_type = OR;
    } else if ( o->ident.compare("==>") == 0 ){
        oper_type = IMP;
    } else if ( o->ident.compare("<==") == 0 ){
        oper_type = CONSEQ;
    } else if ( o->ident.compare("==") == 0 ){
        oper_type = EQ;
    } else if ( o->ident.compare("!=") == 0 ){
        oper_type = UNEQ;
    } else if ( o->ident.compare("<") == 0 ){
        oper_type = LESS;
    } else if ( o->ident.compare("<=") == 0 ){
        oper_type = LESS_EQ;
    } else if ( o->ident.compare(">") == 0 ){
        oper_type = GREAT;
    } else if ( o->ident.compare(">=") == 0 ){
        oper_type = GREAT_EQ;
    } else {
        throw "Error de implementación en identificación de operador de expresión binaria";
    }
    
    line_op = o->line;
    column_op = o->column;
    delete o;
    
    left = l;
    right = r;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %rdi, %rbx
leaq 0x18(%rdi), %rax
movq %rax, 0x20(%rdi)
movq %rax, 0x18(%rdi)
andq $0x0, 0x28(%rdi)
leaq 0x30(%rdi), %rax
movq %rax, 0x38(%rdi)
movq %rax, 0x30(%rdi)
andq $0x0, 0x40(%rdi)
movq %rcx, %r14
movq %rdx, %r15
leaq 0x26505(%rip), %rax     # 0x37020
movq %rax, (%rdi)
movb $0x0, 0x14(%rdi)
andl $0x0, 0x10(%rdi)
movq %rsi, %r12
movq 0x8(%rsi), %rax
movq %rax, 0x8(%rdi)
leaq 0x8(%rdx), %r13
leaq 0x12a2f(%rip), %rsi     # 0x2356b
movq %r13, %rdi
callq 0x60d0
testl %eax, %eax
je 0x10c7e
leaq 0x14bb6(%rip), %rsi     # 0x25709
movq %r13, %rdi
callq 0x60d0
testl %eax, %eax
je 0x10c82
leaq 0x14b68(%rip), %rsi     # 0x256d2
movq %r13, %rdi
callq 0x60d0
testl %eax, %eax
je 0x10c86
leaq 0x129ec(%rip), %rsi     # 0x2356d
movq %r13, %rdi
callq 0x60d0
testl %eax, %eax
je 0x10c8a
leaq 0x129d7(%rip), %rsi     # 0x2356f
movq %r13, %rdi
callq 0x60d0
testl %eax, %eax
je 0x10c8e
leaq 0x129c2(%rip), %rsi     # 0x23571
movq %r13, %rdi
callq 0x60d0
testl %eax, %eax
je 0x10c92
leaq 0x129ae(%rip), %rsi     # 0x23574
movq %r13, %rdi
callq 0x60d0
testl %eax, %eax
je 0x10c96
leaq 0x1299a(%rip), %rsi     # 0x23577
movq %r13, %rdi
callq 0x60d0
testl %eax, %eax
je 0x10c9a
leaq 0x12987(%rip), %rsi     # 0x2357b
movq %r13, %rdi
callq 0x60d0
testl %eax, %eax
je 0x10c9e
leaq 0x12971(%rip), %rsi     # 0x2357c
movq %r13, %rdi
callq 0x60d0
testl %eax, %eax
je 0x10ca2
leaq 0x1295d(%rip), %rsi     # 0x2357f
movq %r13, %rdi
callq 0x60d0
testl %eax, %eax
je 0x10ca6
leaq 0x1294d(%rip), %rsi     # 0x23582
movq %r13, %rdi
callq 0x60d0
testl %eax, %eax
je 0x10caa
leaq 0x1293c(%rip), %rsi     # 0x23584
movq %r13, %rdi
callq 0x60d0
testl %eax, %eax
je 0x10cae
leaq 0x146f8(%rip), %rsi     # 0x25353
movq %r13, %rdi
callq 0x60d0
testl %eax, %eax
je 0x10cb2
leaq 0x12919(%rip), %rsi     # 0x23587
movq %r13, %rdi
callq 0x60d0
testl %eax, %eax
jne 0x10ce4
pushq $0xe
jmp 0x10cb4
xorl %eax, %eax
jmp 0x10cb5
pushq $0x1
jmp 0x10cb4
pushq $0x2
jmp 0x10cb4
pushq $0x3
jmp 0x10cb4
pushq $0x4
jmp 0x10cb4
pushq $0x5
jmp 0x10cb4
pushq $0x6
jmp 0x10cb4
pushq $0x7
jmp 0x10cb4
pushq $0x8
jmp 0x10cb4
pushq $0x9
jmp 0x10cb4
pushq $0xa
jmp 0x10cb4
pushq $0xb
jmp 0x10cb4
pushq $0xc
jmp 0x10cb4
pushq $0xd
popq %rax
movl %eax, 0x68(%rbx)
movq (%r15), %rax
movq %rax, 0x48(%rbx)
movq %r15, %rdi
callq 0x125aa
pushq $0x28
popq %rsi
movq %r15, %rdi
callq 0x62e0
movq %r12, 0x58(%rbx)
movq %r14, 0x60(%rbx)
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
pushq $0x8
popq %rdi
callq 0x6140
leaq 0x143a6(%rip), %rcx     # 0x25099
movq %rcx, (%rax)
movq 0x272ab(%rip), %rsi     # 0x37fa8
movq %rax, %rdi
xorl %edx, %edx
callq 0x6500
movq %rax, %r14
movq %rbx, %rdi
callq 0x125fa
movq %r14, %rdi
callq 0x6530