// File: 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
subq $0x1e0, %rsp            # imm = 0x1E0
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rdi
movq %rdi, -0x178(%rbp)
addq $0x10, %rdi
leaq 0x8bcf(%rip), %rsi      # 0x170d4
callq 0x7440
testb $0x1, %al
jne 0xe513
jmp 0xe5df
movq -0x178(%rbp), %rax
movq 0x30(%rax), %rdi
movq (%rdi), %rax
callq *(%rax)
movl %eax, %ecx
movq -0x178(%rbp), %rax
movl %ecx, -0x17c(%rbp)
movq 0x38(%rax), %rdi
movq (%rdi), %rax
callq *(%rax)
movl %eax, %ecx
movl -0x17c(%rbp), %eax
cmpl %ecx, %eax
je 0xe5da
movq -0x178(%rbp), %rax
movl 0x8(%rax), %eax
movl %eax, -0x18c(%rbp)
leaq -0x29(%rbp), %rdi
movq %rdi, -0x188(%rbp)
callq 0x4480
movq -0x188(%rbp), %rdx
leaq 0x8cd3(%rip), %rsi      # 0x1724c
leaq -0x28(%rbp), %rdi
callq 0x7390
jmp 0xe584
movl -0x18c(%rbp), %edi
leaq -0x28(%rbp), %rsi
callq 0xd3d0
jmp 0xe595
leaq -0x28(%rbp), %rdi
callq 0x41c0
leaq -0x29(%rbp), %rdi
callq 0x42f0
jmp 0xe5da
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x38(%rbp)
movl %eax, -0x3c(%rbp)
jmp 0xe5cc
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x38(%rbp)
movl %eax, -0x3c(%rbp)
leaq -0x28(%rbp), %rdi
callq 0x41c0
leaq -0x29(%rbp), %rdi
callq 0x42f0
jmp 0xe99c
jmp 0xe937
movq -0x178(%rbp), %rax
movq 0x30(%rax), %rdi
movq (%rdi), %rax
movq (%rax), %rax
callq *%rax
movq -0x178(%rbp), %rsi
movl %eax, -0x19c(%rbp)
addq $0x10, %rsi
leaq -0x60(%rbp), %rdi
movq %rdi, -0x198(%rbp)
callq 0x4140
movq -0x198(%rbp), %rdi
callq 0xe360
movl %eax, -0x190(%rbp)
jmp 0xe627
leaq -0x60(%rbp), %rdi
callq 0x41c0
movl -0x190(%rbp), %ecx
movl -0x19c(%rbp), %eax
cmpl %ecx, %eax
je 0xe781
movq -0x178(%rbp), %rax
movl 0x8(%rax), %eax
movl %eax, -0x1ac(%rbp)
leaq -0xc1(%rbp), %rdi
movq %rdi, -0x1a8(%rbp)
callq 0x4480
movq -0x1a8(%rbp), %rdx
leaq 0x8c0c(%rip), %rsi      # 0x17281
leaq -0xc0(%rbp), %rdi
callq 0x7390
jmp 0xe683
movq -0x178(%rbp), %rdx
addq $0x10, %rdx
leaq -0xa0(%rbp), %rdi
leaq -0xc0(%rbp), %rsi
callq 0xf030
jmp 0xe6a3
leaq 0x8be9(%rip), %rdx      # 0x17293
leaq -0x80(%rbp), %rdi
leaq -0xa0(%rbp), %rsi
callq 0xf1c0
jmp 0xe6bc
movl -0x1ac(%rbp), %edi
leaq -0x80(%rbp), %rsi
callq 0xd3d0
jmp 0xe6cd
leaq -0x80(%rbp), %rdi
callq 0x41c0
leaq -0xa0(%rbp), %rdi
callq 0x41c0
leaq -0xc0(%rbp), %rdi
callq 0x41c0
leaq -0xc1(%rbp), %rdi
callq 0x42f0
jmp 0xe781
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x38(%rbp)
movl %eax, -0x3c(%rbp)
leaq -0x60(%rbp), %rdi
callq 0x41c0
jmp 0xe99c
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x38(%rbp)
movl %eax, -0x3c(%rbp)
jmp 0xe770
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x38(%rbp)
movl %eax, -0x3c(%rbp)
jmp 0xe764
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x38(%rbp)
movl %eax, -0x3c(%rbp)
jmp 0xe758
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x38(%rbp)
movl %eax, -0x3c(%rbp)
leaq -0x80(%rbp), %rdi
callq 0x41c0
leaq -0xa0(%rbp), %rdi
callq 0x41c0
leaq -0xc0(%rbp), %rdi
callq 0x41c0
leaq -0xc1(%rbp), %rdi
callq 0x42f0
jmp 0xe99c
movq -0x178(%rbp), %rax
movq 0x38(%rax), %rdi
movq (%rdi), %rax
movq (%rax), %rax
callq *%rax
movq -0x178(%rbp), %rsi
movl %eax, -0x1bc(%rbp)
addq $0x10, %rsi
leaq -0xe8(%rbp), %rdi
movq %rdi, -0x1b8(%rbp)
callq 0x4140
movq -0x1b8(%rbp), %rdi
callq 0xe360
movl %eax, -0x1b0(%rbp)
jmp 0xe7cc
leaq -0xe8(%rbp), %rdi
callq 0x41c0
movl -0x1b0(%rbp), %ecx
movl -0x1bc(%rbp), %eax
cmpl %ecx, %eax
je 0xe935
movq -0x178(%rbp), %rax
movl 0x8(%rax), %eax
movl %eax, -0x1cc(%rbp)
leaq -0x149(%rbp), %rdi
movq %rdi, -0x1c8(%rbp)
callq 0x4480
movq -0x1c8(%rbp), %rdx
leaq 0x8a8d(%rip), %rsi      # 0x172aa
leaq -0x148(%rbp), %rdi
callq 0x7390
jmp 0xe82b
movq -0x178(%rbp), %rdx
addq $0x10, %rdx
leaq -0x128(%rbp), %rdi
leaq -0x148(%rbp), %rsi
callq 0xf030
jmp 0xe84b
leaq 0x8a41(%rip), %rdx      # 0x17293
leaq -0x108(%rbp), %rdi
leaq -0x128(%rbp), %rsi
callq 0xf1c0
jmp 0xe867
movl -0x1cc(%rbp), %edi
leaq -0x108(%rbp), %rsi
callq 0xd3d0
jmp 0xe87b
leaq -0x108(%rbp), %rdi
callq 0x41c0
leaq -0x128(%rbp), %rdi
callq 0x41c0
leaq -0x148(%rbp), %rdi
callq 0x41c0
leaq -0x149(%rbp), %rdi
callq 0x42f0
jmp 0xe935
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x38(%rbp)
movl %eax, -0x3c(%rbp)
leaq -0xe8(%rbp), %rdi
callq 0x41c0
jmp 0xe99c
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x38(%rbp)
movl %eax, -0x3c(%rbp)
jmp 0xe927
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x38(%rbp)
movl %eax, -0x3c(%rbp)
jmp 0xe91b
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x38(%rbp)
movl %eax, -0x3c(%rbp)
jmp 0xe90f
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x38(%rbp)
movl %eax, -0x3c(%rbp)
leaq -0x108(%rbp), %rdi
callq 0x41c0
leaq -0x128(%rbp), %rdi
callq 0x41c0
leaq -0x148(%rbp), %rdi
callq 0x41c0
leaq -0x149(%rbp), %rdi
callq 0x42f0
jmp 0xe99c
jmp 0xe937
movq -0x178(%rbp), %rsi
addq $0x10, %rsi
leaq -0x170(%rbp), %rdi
movq %rdi, -0x1d8(%rbp)
callq 0x4140
movq -0x1d8(%rbp), %rdi
callq 0xe450
movl %eax, -0x1d0(%rbp)
jmp 0xe969
leaq -0x170(%rbp), %rdi
callq 0x41c0
movl -0x1d0(%rbp), %eax
addq $0x1e0, %rsp            # imm = 0x1E0
popq %rbp
retq
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x38(%rbp)
movl %eax, -0x3c(%rbp)
leaq -0x170(%rbp), %rdi
callq 0x41c0
movq -0x38(%rbp), %rdi
callq 0x4470
nopw %cs:(%rax,%rax)