// File: /workspace/github_cpp_makefile_star2_O3/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 0x6b74(%rip), %rsi      # 0x2976e
movq %r15, %rdi
callq 0x50a0
testl %eax, %eax
je 0x22c73
leaq 0x6f32(%rip), %rsi      # 0x29b3f
movq %r15, %rdi
callq 0x50a0
testl %eax, %eax
je 0x22c85
leaq 0x6b52(%rip), %rsi      # 0x29772
movq %r15, %rdi
callq 0x50a0
testl %eax, %eax
je 0x22ca4
leaq 0x6b41(%rip), %rsi      # 0x29774
movq %r15, %rdi
callq 0x50a0
testl %eax, %eax
sete %al
testl %r13d, %r13d
setne %cl
andb %al, %cl
cmpb $0x1, %cl
jne 0x22cd8
movl $0x10, %edi
callq 0x51b0
movq %rax, %rbx
movl %ebp, %eax
cltd
idivl %r13d
leaq 0x11e65(%rip), %rcx     # 0x34ad0
movq %rcx, (%rbx)
movl %eax, 0x8(%rbx)
jmp 0x22cc3
movl $0x10, %edi
callq 0x51b0
movq %rax, %rbx
addl %ebp, %r13d
jmp 0x22cb5
movl $0x10, %edi
callq 0x51b0
movq %rax, %rbx
subl %r13d, %ebp
leaq 0x11e34(%rip), %rax     # 0x34ad0
movq %rax, (%rbx)
movl %ebp, 0x8(%rbx)
jmp 0x22cc3
movl $0x10, %edi
callq 0x51b0
movq %rax, %rbx
imull %ebp, %r13d
leaq 0x11e14(%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 0x6a91(%rip), %rsi      # 0x29776
movq %r15, %rdi
callq 0x50a0
testl %eax, %eax
sete %al
andb %bl, %al
cmpb $0x1, %al
jne 0x22d1a
movl $0x10, %edi
callq 0x51b0
movq %rax, %rbx
movl %ebp, %eax
cltd
idivl %r13d
leaq 0x11dbe(%rip), %rax     # 0x34ad0
movq %rax, (%rbx)
movl %edx, 0x8(%rbx)
jmp 0x22cc3
leaq 0x6465(%rip), %rsi      # 0x29186
movq %r15, %rdi
callq 0x50a0
testl %eax, %eax
je 0x22e1a
leaq 0x6451(%rip), %rsi      # 0x29189
movq %r15, %rdi
callq 0x50a0
testl %eax, %eax
je 0x22e28
leaq 0x6a29(%rip), %rsi      # 0x29778
movq %r15, %rdi
callq 0x50a0
testl %eax, %eax
je 0x22e3c
leaq 0x6499(%rip), %rsi      # 0x291ff
movq %r15, %rdi
callq 0x50a0
testl %eax, %eax
je 0x22e43
leaq 0x6406(%rip), %rsi      # 0x29183
movq %r15, %rdi
callq 0x50a0
testl %eax, %eax
je 0x22e4a
leaq 0x63ec(%rip), %rsi      # 0x29180
movq %r15, %rdi
callq 0x50a0
testl %eax, %eax
je 0x22e51
movl $0x28, %edi
callq 0x51b0
movq %rax, %rbx
movq (%r12), %rax
leaq 0x88(%rsp), %rdi
movq %r12, %rsi
callq *(%rax)
leaq 0x6d91(%rip), %rsi      # 0x29b5a
leaq 0xa8(%rsp), %rdi
leaq 0x88(%rsp), %rdx
callq 0x23f61
leaq 0x63d1(%rip), %rsi      # 0x291b6
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 0x22e58
movq %rdx, 0x28(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x38(%rsp)
jmp 0x22e60
cmpl %r13d, %ebp
jne 0x22e2d
leaq 0x146d2(%rip), %rax     # 0x374f8
jmp 0x22e34
cmpl %r13d, %ebp
jne 0x22e1f
leaq 0x146cc(%rip), %rax     # 0x37500
movq (%rax), %rbx
jmp 0x22cc3
cmpl %r13d, %ebp
jg 0x22e1f
jmp 0x22e2d
cmpl %r13d, %ebp
jl 0x22e1f
jmp 0x22e2d
cmpl %r13d, %ebp
jge 0x22e1f
jmp 0x22e2d
cmpl %r13d, %ebp
jle 0x22e1f
jmp 0x22e2d
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 0x2460b
leaq 0x6323(%rip), %rsi      # 0x291b6
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 0x22ec7
movq %rdx, 0x8(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x18(%rsp)
jmp 0x22ece
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 0x2400c
leaq 0x11b8a(%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 0xbdc6
leaq 0x58(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x22f4d
movq 0x58(%rsp), %rsi
incq %rsi
callq 0x51c0
leaq 0x78(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x22f68
movq 0x78(%rsp), %rsi
incq %rsi
callq 0x51c0
movq 0x8(%rsp), %rdi
cmpq %r15, %rdi
je 0x22f7f
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x51c0
leaq 0xd8(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x22fa0
movq 0xd8(%rsp), %rsi
incq %rsi
callq 0x51c0
movq 0x28(%rsp), %rdi
cmpq %r12, %rdi
je 0x22fb7
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x51c0
leaq 0xb8(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x22fd8
movq 0xb8(%rsp), %rsi
incq %rsi
callq 0x51c0
leaq 0x98(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x22cc3
movq 0x98(%rsp), %rsi
incq %rsi
callq 0x51c0
jmp 0x22cc3
movq %rax, %r14
leaq 0x58(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x23025
movq 0x58(%rsp), %rsi
incq %rsi
callq 0x51c0
jmp 0x23025
movq %rax, %r14
leaq 0x78(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x23045
movq 0x78(%rsp), %rsi
incq %rsi
callq 0x51c0
jmp 0x23045
movq %rax, %r14
movq 0x8(%rsp), %rdi
cmpq %r15, %rdi
je 0x23061
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x51c0
jmp 0x23061
movq %rax, %r14
leaq 0xd8(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x23087
movq 0xd8(%rsp), %rsi
incq %rsi
callq 0x51c0
jmp 0x23087
movq %rax, %r14
movq 0x28(%rsp), %rdi
cmpq %r12, %rdi
je 0x230a3
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x51c0
jmp 0x230a3
movq %rax, %r14
leaq 0xb8(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x230c9
movq 0xb8(%rsp), %rsi
incq %rsi
callq 0x51c0
jmp 0x230c9
movq %rax, %r14
leaq 0x98(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x230ef
movq 0x98(%rsp), %rsi
incq %rsi
callq 0x51c0
jmp 0x230ef
movq %rax, %r14
movl $0x28, %esi
movq %rbx, %rdi
callq 0x51c0
movq %r14, %rdi
callq 0x5330