// File: /workspace/github_cpp_makefile_star2_O2/devaigergely81[P]flex-bison-example/type_checker_implementation.cc
// Function: binop_expression::get_type() const
type binop_expression::get_type() const {
    if(op == "=") {
        if(left->get_type() != right->get_type()) {
            error(line, "Left and right operands of '=' have different types.");
        }
    } else {
        if(left->get_type() != operand_type(op)) {
            error(line, std::string("Left operand of '") + op + "' has unexpected type.");
        }
        if(right->get_type() != operand_type(op)) {
            error(line, std::string("Right operand of '") + op + "' has unexpected type.");
        }
    }
    return return_type(op);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x108, %rsp            # imm = 0x108
movq %rdi, %r14
leaq 0x10(%rdi), %rbx
leaq 0x3a8a(%rip), %rsi      # 0xae10
movq %rbx, %rdi
callq 0x4fcd
movl %eax, %r12d
movq 0x30(%r14), %rdi
movq (%rdi), %rax
callq *(%rax)
movl %eax, %r15d
testb %r12b, %r12b
je 0x73ea
movq 0x38(%r14), %rdi
movq (%rdi), %rax
callq *(%rax)
cmpl %eax, %r15d
je 0x7522
movl 0x8(%r14), %r14d
leaq 0x3b79(%rip), %rsi      # 0xaf38
leaq -0xd0(%rbp), %rdi
leaq -0x50(%rbp), %rdx
callq 0x4f92
leaq -0xd0(%rbp), %rsi
movl %r14d, %edi
callq 0x6b74
leaq -0xd0(%rbp), %rdi
jmp 0x751d
leaq -0x130(%rbp), %r12
movq %r12, %rdi
movq %rbx, %rsi
callq 0x32b0
movq %r12, %rdi
callq 0x7231
movl %eax, %r13d
movq %r12, %rdi
callq 0x3110
cmpl %r13d, %r15d
je 0x7480
movl 0x8(%r14), %r15d
leaq 0x3b4e(%rip), %rsi      # 0xaf6d
leaq -0x70(%rbp), %rdi
leaq -0x29(%rbp), %rdx
callq 0x4f92
leaq -0x50(%rbp), %rdi
leaq -0x70(%rbp), %rsi
movq %rbx, %rdx
callq 0x7916
leaq 0x3b3c(%rip), %rdx      # 0xaf7f
leaq -0xb0(%rbp), %rdi
leaq -0x50(%rbp), %rsi
callq 0x79e7
leaq -0xb0(%rbp), %rsi
movl %r15d, %edi
callq 0x6b74
leaq -0xb0(%rbp), %rdi
callq 0x3110
leaq -0x50(%rbp), %rdi
callq 0x3110
leaq -0x70(%rbp), %rdi
callq 0x3110
movq 0x38(%r14), %rdi
movq (%rdi), %rax
callq *(%rax)
movl %eax, %r15d
leaq -0x110(%rbp), %r12
movq %r12, %rdi
movq %rbx, %rsi
callq 0x32b0
movq %r12, %rdi
callq 0x7231
movl %eax, %r13d
movq %r12, %rdi
callq 0x3110
cmpl %r13d, %r15d
je 0x7522
movl 0x8(%r14), %r14d
leaq 0x3ad5(%rip), %rsi      # 0xaf96
leaq -0x70(%rbp), %rdi
leaq -0x29(%rbp), %rdx
callq 0x4f92
leaq -0x50(%rbp), %rdi
leaq -0x70(%rbp), %rsi
movq %rbx, %rdx
callq 0x7916
leaq 0x3a9a(%rip), %rdx      # 0xaf7f
leaq -0x90(%rbp), %rdi
leaq -0x50(%rbp), %rsi
callq 0x79e7
leaq -0x90(%rbp), %rsi
movl %r14d, %edi
callq 0x6b74
leaq -0x90(%rbp), %rdi
callq 0x3110
leaq -0x50(%rbp), %rdi
callq 0x3110
leaq -0x70(%rbp), %rdi
callq 0x3110
leaq -0xf0(%rbp), %r14
movq %r14, %rdi
movq %rbx, %rsi
callq 0x32b0
movq %r14, %rdi
callq 0x72f4
movl %eax, %ebx
movq %r14, %rdi
callq 0x3110
movl %ebx, %eax
addq $0x108, %rsp            # imm = 0x108
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
leaq -0x90(%rbp), %rdi
jmp 0x7574
jmp 0x757d
jmp 0x758b
movq %rax, %rbx
leaq -0xb0(%rbp), %rdi
callq 0x3110
jmp 0x7580
jmp 0x75a7
movq %rax, %rbx
leaq -0x50(%rbp), %rdi
callq 0x3110
jmp 0x758e
movq %rax, %rbx
leaq -0x70(%rbp), %rdi
callq 0x3110
jmp 0x75aa
movq %rax, %rbx
leaq -0xd0(%rbp), %rdi
jmp 0x7592
jmp 0x75a7
movq %rax, %rbx
movq %rbx, %rdi
callq 0x3370