// File: /workspace/github_cpp_makefile_star2_O2/pranavmodx[P]modlang/src/evaluator.cpp
// Function: Evaluator::evalInfixExpression(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, Object*, Object*)
Object *Evaluator::evalInfixExpression(std::string operand, Object *left, Object *right)
{
	Object *error;

	if (left->type() == INTEGER_OBJ && right->type() == INTEGER_OBJ)
		return evalIntegerInfixExpression(operand, left, right);

	else if (left->type() == STRING_OBJ && right->type() == STRING_OBJ)
		return evalStringInfixExpression(operand, left, right);

	else if (left == __NULL || right == __NULL)
		return __NULL;

	else if (left->type() != right->type())
	{
		error = new Error("error: type mismatch -> " + left->type() + " " + operand + " " + right->type());
		return error;
	}

	else if (operand == "==")
		return left == right ? __TRUE : __FALSE;
	else if (operand == "!=")
		return left != right ? __TRUE : __FALSE;

	else
	{
		error = new Error("error: unknown operator -> " + left->type() + " " + operand + " " + right->type());

		return error;
	}
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x148, %rsp            # imm = 0x148
movq %rcx, %r14
movq %rdx, %r12
movq %rsi, %r15
movq (%rdx), %rax
leaq 0x8(%rsp), %rbx
movq %rbx, %rdi
movq %rdx, %rsi
callq *(%rax)
leaq 0x16829(%rip), %rsi     # 0x2d158
movq %rbx, %rdi
callq 0xa7b4
testb %al, %al
je 0x169a6
movq (%r14), %rax
leaq 0x28(%rsp), %rdi
movq %r14, %rsi
callq *(%rax)
leaq 0x16809(%rip), %rsi     # 0x2d158
leaq 0x28(%rsp), %rbx
movq %rbx, %rdi
callq 0xa7b4
movl %eax, %ebp
movq %rbx, %rdi
callq 0x5388
leaq 0x8(%rsp), %rdi
callq 0x5388
testb %bpl, %bpl
je 0x169b0
leaq 0x128(%rsp), %rbx
movq %rbx, %rdi
movq %r15, %rsi
callq 0x5260
movq %rbx, %rsi
movq %r12, %rdx
movq %r14, %rcx
callq 0x17d9a
movq %rax, %rbx
leaq 0x128(%rsp), %rdi
jmp 0x16ba9
leaq 0x8(%rsp), %rdi
callq 0x5388
movq (%r12), %rax
leaq 0x8(%rsp), %rbx
movq %rbx, %rdi
movq %r12, %rsi
callq *(%rax)
leaq 0x167d0(%rip), %rsi     # 0x2d198
movq %rbx, %rdi
callq 0xa7b4
testb %al, %al
je 0x16a3f
movq (%r14), %rax
leaq 0x28(%rsp), %rdi
movq %r14, %rsi
callq *(%rax)
leaq 0x167b0(%rip), %rsi     # 0x2d198
leaq 0x28(%rsp), %rbx
movq %rbx, %rdi
callq 0xa7b4
movl %eax, %ebp
movq %rbx, %rdi
callq 0x5388
leaq 0x8(%rsp), %rdi
callq 0x5388
testb %bpl, %bpl
je 0x16a49
leaq 0x108(%rsp), %rbx
movq %rbx, %rdi
movq %r15, %rsi
callq 0x5260
movq %rbx, %rsi
movq %r12, %rdx
movq %r14, %rcx
callq 0x1810a
movq %rax, %rbx
leaq 0x108(%rsp), %rdi
jmp 0x16ba9
leaq 0x8(%rsp), %rdi
callq 0x5388
leaq 0x15aa8(%rip), %rax     # 0x2c4f8
movq (%rax), %rbx
cmpq %r12, %rbx
sete %al
cmpq %r14, %rbx
sete %cl
orb %al, %cl
jne 0x16bae
movq (%r12), %rax
leaq 0x8(%rsp), %rdi
movq %r12, %rsi
callq *(%rax)
movq (%r14), %rax
leaq 0x28(%rsp), %rdi
movq %r14, %rsi
callq *(%rax)
leaq 0x8(%rsp), %rbx
leaq 0x28(%rsp), %r13
movq %rbx, %rdi
movq %r13, %rsi
callq 0x10766
movl %eax, %ebp
movq %r13, %rdi
callq 0x5388
movq %rbx, %rdi
callq 0x5388
testb %bpl, %bpl
je 0x16bc3
pushq $0x28
popq %rdi
callq 0x51d0
movq %rax, %rbx
movq (%r12), %rax
leaq 0x68(%rsp), %rdi
movq %r12, %rsi
callq *(%rax)
leaq 0x60ab(%rip), %rsi      # 0x1cb7d
leaq 0x88(%rsp), %rdi
leaq 0x68(%rsp), %rdx
callq 0xd257
leaq 0x5707(%rip), %rdx      # 0x1c1f2
leaq 0xa8(%rsp), %rdi
leaq 0x88(%rsp), %rsi
callq 0xd12a
leaq 0x28(%rsp), %rdi
leaq 0xa8(%rsp), %rsi
movq %r15, %rdx
callq 0xd238
leaq 0x56d6(%rip), %rdx      # 0x1c1f2
leaq 0x8(%rsp), %rdi
leaq 0x28(%rsp), %rsi
callq 0xd12a
movq (%r14), %rax
leaq 0x48(%rsp), %rdi
movq %r14, %rsi
callq *(%rax)
leaq 0xe8(%rsp), %rdi
leaq 0x8(%rsp), %rsi
leaq 0x48(%rsp), %rdx
callq 0xd149
leaq 0xe8(%rsp), %rsi
movq %rbx, %rdi
callq 0x12cc2
leaq 0xe8(%rsp), %rdi
callq 0x5388
leaq 0x48(%rsp), %rdi
callq 0x5388
leaq 0x8(%rsp), %rdi
callq 0x5388
leaq 0x28(%rsp), %rdi
callq 0x5388
leaq 0xa8(%rsp), %rdi
callq 0x5388
leaq 0x88(%rsp), %rdi
callq 0x5388
leaq 0x68(%rsp), %rdi
callq 0x5388
movq %rbx, %rax
addq $0x148, %rsp            # imm = 0x148
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x546d(%rip), %rsi      # 0x1c037
movq %r15, %rdi
callq 0x18aa7
testb %al, %al
je 0x16be4
cmpq %r14, %r12
jne 0x16bfc
leaq 0x1591e(%rip), %rax     # 0x2c500
jmp 0x16c03
leaq 0x544f(%rip), %rsi      # 0x1c03a
movq %r15, %rdi
callq 0x18aa7
testb %al, %al
je 0x16c08
cmpq %r14, %r12
jne 0x16bdb
leaq 0x15905(%rip), %rax     # 0x2c508
movq (%rax), %rbx
jmp 0x16bae
pushq $0x28
popq %rdi
callq 0x51d0
movq %rax, %rbx
movq (%r12), %rax
leaq 0x68(%rsp), %rdi
movq %r12, %rsi
callq *(%rax)
leaq 0x5f6e(%rip), %rsi      # 0x1cb96
leaq 0x88(%rsp), %rdi
leaq 0x68(%rsp), %rdx
callq 0xd257
leaq 0x55b1(%rip), %rdx      # 0x1c1f2
leaq 0xa8(%rsp), %rdi
leaq 0x88(%rsp), %rsi
callq 0xd12a
leaq 0x28(%rsp), %rdi
leaq 0xa8(%rsp), %rsi
movq %r15, %rdx
callq 0xd238
leaq 0x5580(%rip), %rdx      # 0x1c1f2
leaq 0x8(%rsp), %rdi
leaq 0x28(%rsp), %rsi
callq 0xd12a
movq (%r14), %rax
leaq 0x48(%rsp), %rdi
movq %r14, %rsi
callq *(%rax)
leaq 0xc8(%rsp), %rdi
leaq 0x8(%rsp), %rsi
leaq 0x48(%rsp), %rdx
callq 0xd149
leaq 0xc8(%rsp), %rsi
movq %rbx, %rdi
callq 0x12cc2
leaq 0xc8(%rsp), %rdi
jmp 0x16b67
movq %rax, %r14
leaq 0xc8(%rsp), %rdi
jmp 0x16ce8
jmp 0x16cef
jmp 0x16cfe
jmp 0x16d0d
jmp 0x16d1c
jmp 0x16d50
jmp 0x16d55
jmp 0x16d5a
movq %rax, %r14
leaq 0xe8(%rsp), %rdi
callq 0x5388
jmp 0x16cf2
movq %rax, %r14
leaq 0x48(%rsp), %rdi
callq 0x5388
jmp 0x16d01
movq %rax, %r14
leaq 0x8(%rsp), %rdi
callq 0x5388
jmp 0x16d10
movq %rax, %r14
leaq 0x28(%rsp), %rdi
callq 0x5388
jmp 0x16d1f
movq %rax, %r14
leaq 0xa8(%rsp), %rdi
callq 0x5388
leaq 0x88(%rsp), %rdi
callq 0x5388
leaq 0x68(%rsp), %rdi
callq 0x5388
pushq $0x28
popq %rsi
movq %rbx, %rdi
callq 0x51e0
jmp 0x16d8a
movq %rax, %r14
jmp 0x16d2c
movq %rax, %r14
jmp 0x16d39
movq %rax, %r14
jmp 0x16d43
movq %rax, %r14
leaq 0x108(%rsp), %rdi
jmp 0x16d85
movq %rax, %r14
leaq 0x128(%rsp), %rdi
jmp 0x16d85
jmp 0x16d7d
jmp 0x16d7d
movq %rax, %r14
leaq 0x8(%rsp), %rdi
callq 0x5388
movq %r14, %rdi
callq 0x5330