// File: /workspace/github_cpp_makefile_star2_O1/pranavmodx[P]modlang/src/evaluator.cpp
// Function: Evaluator::evalIntegerInfixExpression(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, Object*, Object*)
Object *Evaluator::evalIntegerInfixExpression(std::string operand, Object *left, Object *right)
{
	int leftVal = ((Integer *)left)->value;
	int rightVal = ((Integer *)right)->value;

	Object *res;

	if (operand == "+")
		res = new Integer(leftVal + rightVal);
	else if (operand == "-")
		res = new Integer(leftVal - rightVal);
	else if (operand == "*")
		res = new Integer(leftVal * rightVal);
	else if (operand == "/" && rightVal != 0)
		res = new Integer(leftVal / rightVal);
	else if (operand == "%" && rightVal != 0)
		res = new Integer(leftVal % rightVal);

	else if (operand == "==")
		return leftVal == rightVal ? __TRUE : __FALSE;
	else if (operand == "!=")
		return leftVal != rightVal ? __TRUE : __FALSE;
	else if (operand == ">")
		return leftVal > rightVal ? __TRUE : __FALSE;
	else if (operand == "<")
		return leftVal < rightVal ? __TRUE : __FALSE;
	else if (operand == ">=")
		return leftVal >= rightVal ? __TRUE : __FALSE;
	else if (operand == "<=")
		return leftVal <= rightVal ? __TRUE : __FALSE;

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

	return res;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xe8, %rsp
movq %rcx, %r14
movq %rdx, %r12
movq %rsi, %r15
movl 0x8(%rdx), %ebp
movl 0x8(%rcx), %r13d
leaq 0x686c(%rip), %rsi      # 0x2975e
movq %r15, %rdi
callq 0x50a0
testl %eax, %eax
je 0x22f6b
leaq 0x6c2a(%rip), %rsi      # 0x29b2f
movq %r15, %rdi
callq 0x50a0
testl %eax, %eax
je 0x22f7d
leaq 0x684a(%rip), %rsi      # 0x29762
movq %r15, %rdi
callq 0x50a0
testl %eax, %eax
je 0x22f9c
leaq 0x6839(%rip), %rsi      # 0x29764
movq %r15, %rdi
callq 0x50a0
testl %eax, %eax
sete %al
testl %r13d, %r13d
setne %cl
andb %al, %cl
cmpb $0x1, %cl
jne 0x22fd0
movl $0x10, %edi
callq 0x51b0
movq %rax, %rbx
movl %ebp, %eax
cltd
idivl %r13d
leaq 0x11b6d(%rip), %rcx     # 0x34ad0
movq %rcx, (%rbx)
movl %eax, 0x8(%rbx)
jmp 0x22fbb
movl $0x10, %edi
callq 0x51b0
movq %rax, %rbx
addl %ebp, %r13d
jmp 0x22fad
movl $0x10, %edi
callq 0x51b0
movq %rax, %rbx
subl %r13d, %ebp
leaq 0x11b3c(%rip), %rax     # 0x34ad0
movq %rax, (%rbx)
movl %ebp, 0x8(%rbx)
jmp 0x22fbb
movl $0x10, %edi
callq 0x51b0
movq %rax, %rbx
imull %ebp, %r13d
leaq 0x11b1c(%rip), %rax     # 0x34ad0
movq %rax, (%rbx)
movl %r13d, 0x8(%rbx)
movq %rbx, %rax
addq $0xe8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
testl %r13d, %r13d
setne %bl
leaq 0x6789(%rip), %rsi      # 0x29766
movq %r15, %rdi
callq 0x50a0
testl %eax, %eax
sete %al
andb %bl, %al
cmpb $0x1, %al
jne 0x23012
movl $0x10, %edi
callq 0x51b0
movq %rax, %rbx
movl %ebp, %eax
cltd
idivl %r13d
leaq 0x11ac6(%rip), %rax     # 0x34ad0
movq %rax, (%rbx)
movl %edx, 0x8(%rbx)
jmp 0x22fbb
leaq 0x6169(%rip), %rsi      # 0x29182
movq %r15, %rdi
callq 0x50a0
testl %eax, %eax
je 0x23112
leaq 0x6155(%rip), %rsi      # 0x29185
movq %r15, %rdi
callq 0x50a0
testl %eax, %eax
je 0x23120
leaq 0x6721(%rip), %rsi      # 0x29768
movq %r15, %rdi
callq 0x50a0
testl %eax, %eax
je 0x23134
leaq 0x619d(%rip), %rsi      # 0x291fb
movq %r15, %rdi
callq 0x50a0
testl %eax, %eax
je 0x2313b
leaq 0x610a(%rip), %rsi      # 0x2917f
movq %r15, %rdi
callq 0x50a0
testl %eax, %eax
je 0x23142
leaq 0x60f0(%rip), %rsi      # 0x2917c
movq %r15, %rdi
callq 0x50a0
testl %eax, %eax
je 0x23149
movl $0x28, %edi
callq 0x51b0
movq %rax, %rbx
movq (%r12), %rax
leaq 0x88(%rsp), %rdi
movq %r12, %rsi
callq *(%rax)
leaq 0x6a89(%rip), %rsi      # 0x29b4a
leaq 0xa8(%rsp), %rdi
leaq 0x88(%rsp), %rdx
callq 0x24269
leaq 0x60d5(%rip), %rsi      # 0x291b2
leaq 0xa8(%rsp), %rdi
callq 0x5360
leaq 0x38(%rsp), %r12
movq %r12, -0x10(%r12)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x23150
movq %rdx, 0x28(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x38(%rsp)
jmp 0x23158
cmpl %r13d, %ebp
jne 0x23125
leaq 0x143da(%rip), %rax     # 0x374f8
jmp 0x2312c
cmpl %r13d, %ebp
jne 0x23117
leaq 0x143d4(%rip), %rax     # 0x37500
movq (%rax), %rbx
jmp 0x22fbb
cmpl %r13d, %ebp
jg 0x23117
jmp 0x23125
cmpl %r13d, %ebp
jl 0x23117
jmp 0x23125
cmpl %r13d, %ebp
jge 0x23117
jmp 0x23125
cmpl %r13d, %ebp
jle 0x23117
jmp 0x23125
movups (%rcx), %xmm0
movups %xmm0, (%r12)
movq 0x8(%rax), %rdx
leaq 0x28(%rsp), %rsi
movq %rdx, 0x8(%rsi)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
leaq 0xc8(%rsp), %rdi
movq %r15, %rdx
callq 0x2490f
leaq 0x6027(%rip), %rsi      # 0x291b2
leaq 0xc8(%rsp), %rdi
callq 0x5360
leaq 0x18(%rsp), %r15
movq %r15, -0x10(%r15)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x231bf
movq %rdx, 0x8(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x18(%rsp)
jmp 0x231c6
movups (%rcx), %xmm0
movups %xmm0, (%r15)
movq 0x8(%rax), %rdx
movq %rdx, 0x10(%rsp)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
movq (%r14), %rax
leaq 0x68(%rsp), %rdi
movq %r14, %rsi
callq *(%rax)
leaq 0x48(%rsp), %rdi
leaq 0x8(%rsp), %rsi
leaq 0x68(%rsp), %rdx
callq 0x24314
leaq 0x11892(%rip), %rax     # 0x34a98
movq %rax, (%rbx)
leaq 0x8(%rbx), %rdi
movq %rbx, %rax
addq $0x18, %rax
movq %rax, 0x8(%rbx)
movq 0x48(%rsp), %rsi
movq 0x50(%rsp), %rdx
addq %rsi, %rdx
callq 0xbde8
leaq 0x58(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x23245
movq 0x58(%rsp), %rsi
incq %rsi
callq 0x51c0
leaq 0x78(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x23260
movq 0x78(%rsp), %rsi
incq %rsi
callq 0x51c0
movq 0x8(%rsp), %rdi
cmpq %r15, %rdi
je 0x23277
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x51c0
leaq 0xd8(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x23298
movq 0xd8(%rsp), %rsi
incq %rsi
callq 0x51c0
movq 0x28(%rsp), %rdi
cmpq %r12, %rdi
je 0x232af
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x51c0
leaq 0xb8(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x232d0
movq 0xb8(%rsp), %rsi
incq %rsi
callq 0x51c0
leaq 0x98(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x22fbb
movq 0x98(%rsp), %rsi
incq %rsi
callq 0x51c0
jmp 0x22fbb
movq %rax, %r14
leaq 0x58(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x2331d
movq 0x58(%rsp), %rsi
incq %rsi
callq 0x51c0
jmp 0x2331d
movq %rax, %r14
leaq 0x78(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x2333d
movq 0x78(%rsp), %rsi
incq %rsi
callq 0x51c0
jmp 0x2333d
movq %rax, %r14
movq 0x8(%rsp), %rdi
cmpq %r15, %rdi
je 0x23359
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x51c0
jmp 0x23359
movq %rax, %r14
leaq 0xd8(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x2337f
movq 0xd8(%rsp), %rsi
incq %rsi
callq 0x51c0
jmp 0x2337f
movq %rax, %r14
movq 0x28(%rsp), %rdi
cmpq %r12, %rdi
je 0x2339b
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x51c0
jmp 0x2339b
movq %rax, %r14
leaq 0xb8(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x233c1
movq 0xb8(%rsp), %rsi
incq %rsi
callq 0x51c0
jmp 0x233c1
movq %rax, %r14
leaq 0x98(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x233e7
movq 0x98(%rsp), %rsi
incq %rsi
callq 0x51c0
jmp 0x233e7
movq %rax, %r14
movl $0x28, %esi
movq %rbx, %rdi
callq 0x51c0
movq %r14, %rdi
callq 0x5330