// File: 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
movq %rsp, %rbp
subq $0x380, %rsp            # imm = 0x380
movq %rsi, -0x328(%rbp)
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq %rcx, -0x28(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x320(%rbp)
movq -0x20(%rbp), %rsi
movq (%rsi), %rax
leaq -0x50(%rbp), %rdi
callq *(%rax)
leaq -0x50(%rbp), %rdi
leaq 0x3353b(%rip), %rsi     # 0x67220
callq 0x16920
movb %al, %cl
movb $0x0, -0x7d(%rbp)
xorl %eax, %eax
testb $0x1, %cl
movb %al, -0x312(%rbp)
jne 0x33cff
jmp 0x33d2b
movq -0x28(%rbp), %rsi
movq (%rsi), %rax
movq (%rax), %rax
leaq -0x70(%rbp), %rdi
callq *%rax
jmp 0x33d11
movb $0x1, -0x7d(%rbp)
leaq -0x70(%rbp), %rdi
leaq 0x33500(%rip), %rsi     # 0x67220
callq 0x16920
movb %al, -0x312(%rbp)
movb -0x312(%rbp), %al
movb %al, -0x329(%rbp)
testb $0x1, -0x7d(%rbp)
jne 0x33d3f
jmp 0x33d48
leaq -0x70(%rbp), %rdi
callq 0x5518
leaq -0x50(%rbp), %rdi
callq 0x5518
movb -0x329(%rbp), %al
testb $0x1, %al
jne 0x33d60
jmp 0x33df1
movq -0x328(%rbp), %rsi
leaq -0xa0(%rbp), %rdi
movq %rdi, -0x340(%rbp)
callq 0x5130
movq -0x320(%rbp), %rdi
movq -0x340(%rbp), %rsi
movq -0x20(%rbp), %rdx
movq -0x28(%rbp), %rcx
callq 0x36050
movq %rax, -0x338(%rbp)
jmp 0x33d9e
movq -0x338(%rbp), %rax
movq %rax, -0x8(%rbp)
leaq -0xa0(%rbp), %rdi
callq 0x5518
jmp 0x3451a
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x78(%rbp)
movl %eax, -0x7c(%rbp)
leaq -0x50(%rbp), %rdi
callq 0x5518
jmp 0x34527
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x78(%rbp)
movl %eax, -0x7c(%rbp)
leaq -0xa0(%rbp), %rdi
callq 0x5518
jmp 0x34527
movq -0x20(%rbp), %rsi
movq (%rsi), %rax
leaq -0xc0(%rbp), %rdi
callq *(%rax)
leaq -0xc0(%rbp), %rdi
leaq 0x33451(%rip), %rsi     # 0x67260
callq 0x16920
movb %al, %cl
movb $0x0, -0xe1(%rbp)
xorl %eax, %eax
testb $0x1, %cl
movb %al, -0x341(%rbp)
jne 0x33e2c
jmp 0x33e61
movq -0x28(%rbp), %rsi
movq (%rsi), %rax
movq (%rax), %rax
leaq -0xe0(%rbp), %rdi
callq *%rax
jmp 0x33e41
movb $0x1, -0xe1(%rbp)
leaq -0xe0(%rbp), %rdi
leaq 0x3340a(%rip), %rsi     # 0x67260
callq 0x16920
movb %al, -0x341(%rbp)
movb -0x341(%rbp), %al
movb %al, -0x342(%rbp)
testb $0x1, -0xe1(%rbp)
jne 0x33e78
jmp 0x33e84
leaq -0xe0(%rbp), %rdi
callq 0x5518
leaq -0xc0(%rbp), %rdi
callq 0x5518
movb -0x342(%rbp), %al
testb $0x1, %al
jne 0x33e9f
jmp 0x33f33
movq -0x328(%rbp), %rsi
leaq -0x108(%rbp), %rdi
movq %rdi, -0x358(%rbp)
callq 0x5130
movq -0x320(%rbp), %rdi
movq -0x358(%rbp), %rsi
movq -0x20(%rbp), %rdx
movq -0x28(%rbp), %rcx
callq 0x36730
movq %rax, -0x350(%rbp)
jmp 0x33edd
movq -0x350(%rbp), %rax
movq %rax, -0x8(%rbp)
leaq -0x108(%rbp), %rdi
callq 0x5518
jmp 0x3451a
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x78(%rbp)
movl %eax, -0x7c(%rbp)
leaq -0xc0(%rbp), %rdi
callq 0x5518
jmp 0x34527
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x78(%rbp)
movl %eax, -0x7c(%rbp)
leaq -0x108(%rbp), %rdi
callq 0x5518
jmp 0x34527
movq -0x20(%rbp), %rax
leaq 0x32682(%rip), %rcx     # 0x665c0
cmpq (%rcx), %rax
je 0x33f53
movq -0x28(%rbp), %rax
leaq 0x32672(%rip), %rcx     # 0x665c0
cmpq (%rcx), %rax
jne 0x33f66
leaq 0x32666(%rip), %rax     # 0x665c0
movq (%rax), %rax
movq %rax, -0x8(%rbp)
jmp 0x3451a
movq -0x20(%rbp), %rsi
movq (%rsi), %rax
movq (%rax), %rax
leaq -0x128(%rbp), %rdi
callq *%rax
movq -0x28(%rbp), %rsi
movq (%rsi), %rax
movq (%rax), %rax
leaq -0x148(%rbp), %rdi
callq *%rax
jmp 0x33f8e
leaq -0x128(%rbp), %rdi
leaq -0x148(%rbp), %rsi
callq 0x22d80
movb %al, -0x359(%rbp)
leaq -0x148(%rbp), %rdi
callq 0x5518
leaq -0x128(%rbp), %rdi
callq 0x5518
movb -0x359(%rbp), %al
testb $0x1, %al
jne 0x33fce
jmp 0x3422d
movl $0x28, %edi
callq 0x52a0
movq %rax, -0x368(%rbp)
movb $0x1, -0x229(%rbp)
movq -0x20(%rbp), %rsi
movq (%rsi), %rax
movq (%rax), %rax
leaq -0x208(%rbp), %rdi
callq *%rax
jmp 0x33ffb
leaq 0x11cfb(%rip), %rsi     # 0x45cfd
leaq -0x1e8(%rbp), %rdi
leaq -0x208(%rbp), %rdx
callq 0x1bde0
jmp 0x34017
leaq 0x11358(%rip), %rdx     # 0x45376
leaq -0x1c8(%rbp), %rdi
leaq -0x1e8(%rbp), %rsi
callq 0x1bb10
jmp 0x34033
movq -0x328(%rbp), %rdx
leaq -0x1a8(%rbp), %rdi
leaq -0x1c8(%rbp), %rsi
callq 0x1bd90
jmp 0x3404f
leaq 0x11320(%rip), %rdx     # 0x45376
leaq -0x188(%rbp), %rdi
leaq -0x1a8(%rbp), %rsi
callq 0x1bb10
jmp 0x3406b
movq -0x28(%rbp), %rsi
movq (%rsi), %rax
movq (%rax), %rax
leaq -0x228(%rbp), %rdi
callq *%rax
jmp 0x34080
leaq -0x168(%rbp), %rdi
leaq -0x188(%rbp), %rsi
leaq -0x228(%rbp), %rdx
callq 0x1bb80
jmp 0x3409c
movq -0x368(%rbp), %rdi
leaq -0x168(%rbp), %rsi
callq 0x2b980
jmp 0x340b1
movq -0x368(%rbp), %rax
movb $0x0, -0x229(%rbp)
movq %rax, -0x30(%rbp)
leaq -0x168(%rbp), %rdi
callq 0x5518
leaq -0x228(%rbp), %rdi
callq 0x5518
leaq -0x188(%rbp), %rdi
callq 0x5518
leaq -0x1a8(%rbp), %rdi
callq 0x5518
leaq -0x1c8(%rbp), %rdi
callq 0x5518
leaq -0x1e8(%rbp), %rdi
callq 0x5518
leaq -0x208(%rbp), %rdi
callq 0x5518
movq -0x30(%rbp), %rax
movq %rax, -0x8(%rbp)
jmp 0x3451a
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x78(%rbp)
movl %eax, -0x7c(%rbp)
leaq -0x128(%rbp), %rdi
callq 0x5518
jmp 0x34527
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x78(%rbp)
movl %eax, -0x7c(%rbp)
jmp 0x3420c
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x78(%rbp)
movl %eax, -0x7c(%rbp)
jmp 0x34200
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x78(%rbp)
movl %eax, -0x7c(%rbp)
jmp 0x341f4
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x78(%rbp)
movl %eax, -0x7c(%rbp)
jmp 0x341e8
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x78(%rbp)
movl %eax, -0x7c(%rbp)
jmp 0x341dc
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x78(%rbp)
movl %eax, -0x7c(%rbp)
jmp 0x341d0
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x78(%rbp)
movl %eax, -0x7c(%rbp)
jmp 0x341c4
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x78(%rbp)
movl %eax, -0x7c(%rbp)
leaq -0x168(%rbp), %rdi
callq 0x5518
leaq -0x228(%rbp), %rdi
callq 0x5518
leaq -0x188(%rbp), %rdi
callq 0x5518
leaq -0x1a8(%rbp), %rdi
callq 0x5518
leaq -0x1c8(%rbp), %rdi
callq 0x5518
leaq -0x1e8(%rbp), %rdi
callq 0x5518
leaq -0x208(%rbp), %rdi
callq 0x5518
testb $0x1, -0x229(%rbp)
jne 0x34217
jmp 0x34228
movq -0x368(%rbp), %rdi
movl $0x28, %esi
callq 0x52b0
jmp 0x34527
movq -0x328(%rbp), %rdi
leaq 0x10e00(%rip), %rsi     # 0x4503b
callq 0x385c0
testb $0x1, %al
jne 0x34246
jmp 0x34284
movq -0x20(%rbp), %rax
cmpq -0x28(%rbp), %rax
jne 0x34263
leaq 0x32371(%rip), %rax     # 0x665c8
movq (%rax), %rax
movq %rax, -0x370(%rbp)
jmp 0x34274
leaq 0x32366(%rip), %rax     # 0x665d0
movq (%rax), %rax
movq %rax, -0x370(%rbp)
movq -0x370(%rbp), %rax
movq %rax, -0x8(%rbp)
jmp 0x3451a
movq -0x328(%rbp), %rdi
leaq 0x10dac(%rip), %rsi     # 0x4503e
callq 0x385c0
testb $0x1, %al
jne 0x3429d
jmp 0x342db
movq -0x20(%rbp), %rax
cmpq -0x28(%rbp), %rax
je 0x342ba
leaq 0x3231a(%rip), %rax     # 0x665c8
movq (%rax), %rax
movq %rax, -0x378(%rbp)
jmp 0x342cb
leaq 0x3230f(%rip), %rax     # 0x665d0
movq (%rax), %rax
movq %rax, -0x378(%rbp)
movq -0x378(%rbp), %rax
movq %rax, -0x8(%rbp)
jmp 0x3451a
movl $0x28, %edi
callq 0x52a0
movq %rax, -0x380(%rbp)
movb $0x1, -0x311(%rbp)
movq -0x20(%rbp), %rsi
movq (%rsi), %rax
movq (%rax), %rax
leaq -0x2f0(%rbp), %rdi
callq *%rax
jmp 0x34308
leaq 0x11a07(%rip), %rsi     # 0x45d16
leaq -0x2d0(%rbp), %rdi
leaq -0x2f0(%rbp), %rdx
callq 0x1bde0
jmp 0x34324
leaq 0x1104b(%rip), %rdx     # 0x45376
leaq -0x2b0(%rbp), %rdi
leaq -0x2d0(%rbp), %rsi
callq 0x1bb10
jmp 0x34340
movq -0x328(%rbp), %rdx
leaq -0x290(%rbp), %rdi
leaq -0x2b0(%rbp), %rsi
callq 0x1bd90
jmp 0x3435c
leaq 0x11013(%rip), %rdx     # 0x45376
leaq -0x270(%rbp), %rdi
leaq -0x290(%rbp), %rsi
callq 0x1bb10
jmp 0x34378
movq -0x28(%rbp), %rsi
movq (%rsi), %rax
movq (%rax), %rax
leaq -0x310(%rbp), %rdi
callq *%rax
jmp 0x3438d
leaq -0x250(%rbp), %rdi
leaq -0x270(%rbp), %rsi
leaq -0x310(%rbp), %rdx
callq 0x1bb80
jmp 0x343a9
movq -0x380(%rbp), %rdi
leaq -0x250(%rbp), %rsi
callq 0x2b980
jmp 0x343be
movq -0x380(%rbp), %rax
movb $0x0, -0x311(%rbp)
movq %rax, -0x30(%rbp)
leaq -0x250(%rbp), %rdi
callq 0x5518
leaq -0x310(%rbp), %rdi
callq 0x5518
leaq -0x270(%rbp), %rdi
callq 0x5518
leaq -0x290(%rbp), %rdi
callq 0x5518
leaq -0x2b0(%rbp), %rdi
callq 0x5518
leaq -0x2d0(%rbp), %rdi
callq 0x5518
leaq -0x2f0(%rbp), %rdi
callq 0x5518
movq -0x30(%rbp), %rax
movq %rax, -0x8(%rbp)
jmp 0x3451a
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x78(%rbp)
movl %eax, -0x7c(%rbp)
jmp 0x344fc
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x78(%rbp)
movl %eax, -0x7c(%rbp)
jmp 0x344f0
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x78(%rbp)
movl %eax, -0x7c(%rbp)
jmp 0x344e4
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x78(%rbp)
movl %eax, -0x7c(%rbp)
jmp 0x344d8
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x78(%rbp)
movl %eax, -0x7c(%rbp)
jmp 0x344cc
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x78(%rbp)
movl %eax, -0x7c(%rbp)
jmp 0x344c0
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x78(%rbp)
movl %eax, -0x7c(%rbp)
jmp 0x344b4
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x78(%rbp)
movl %eax, -0x7c(%rbp)
leaq -0x250(%rbp), %rdi
callq 0x5518
leaq -0x310(%rbp), %rdi
callq 0x5518
leaq -0x270(%rbp), %rdi
callq 0x5518
leaq -0x290(%rbp), %rdi
callq 0x5518
leaq -0x2b0(%rbp), %rdi
callq 0x5518
leaq -0x2d0(%rbp), %rdi
callq 0x5518
leaq -0x2f0(%rbp), %rdi
callq 0x5518
testb $0x1, -0x311(%rbp)
jne 0x34507
jmp 0x34518
movq -0x380(%rbp), %rdi
movl $0x28, %esi
callq 0x52b0
jmp 0x34527
movq -0x8(%rbp), %rax
addq $0x380, %rsp            # imm = 0x380
popq %rbp
retq
movq -0x78(%rbp), %rdi
callq 0x5490