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

	Object *res;

	if (operand == "+")
		res = new String(leftVal + rightVal);
	else
		return new Error("error: unknown operator -> " + left->type() + " " + operand + " " + right->type());

	return res;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x1b0, %rsp            # imm = 0x1B0
movq %rsi, -0x198(%rbp)
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq %rcx, -0x28(%rbp)
movq -0x20(%rbp), %rsi
addq $0x8, %rsi
leaq -0x48(%rbp), %rdi
callq 0x5130
movq -0x28(%rbp), %rsi
addq $0x8, %rsi
leaq -0x68(%rbp), %rdi
callq 0x5130
jmp 0x36776
movq -0x198(%rbp), %rdi
leaq 0xe8a5(%rip), %rsi      # 0x45029
callq 0x385c0
movb %al, -0x199(%rbp)
jmp 0x36791
movb -0x199(%rbp), %al
testb $0x1, %al
jne 0x367a0
jmp 0x36871
movl $0x28, %edi
callq 0x52a0
movq %rax, -0x1a8(%rbp)
jmp 0x367b3
movb $0x1, -0xa1(%rbp)
leaq -0xa0(%rbp), %rdi
leaq -0x48(%rbp), %rsi
leaq -0x68(%rbp), %rdx
callq 0x38790
jmp 0x367d0
movq -0x1a8(%rbp), %rdi
leaq -0xa0(%rbp), %rsi
callq 0x38640
jmp 0x367e5
movq -0x1a8(%rbp), %rax
movb $0x0, -0xa1(%rbp)
movq %rax, -0x80(%rbp)
leaq -0xa0(%rbp), %rdi
callq 0x5518
jmp 0x36ab4
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x70(%rbp)
movl %eax, -0x74(%rbp)
jmp 0x36aee
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x70(%rbp)
movl %eax, -0x74(%rbp)
jmp 0x36ae5
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x70(%rbp)
movl %eax, -0x74(%rbp)
jmp 0x36850
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x70(%rbp)
movl %eax, -0x74(%rbp)
leaq -0xa0(%rbp), %rdi
callq 0x5518
testb $0x1, -0xa1(%rbp)
jne 0x3685b
jmp 0x3686c
movq -0x1a8(%rbp), %rdi
movl $0x28, %esi
callq 0x52b0
jmp 0x36ae5
movl $0x28, %edi
callq 0x52a0
movq %rax, -0x1b0(%rbp)
jmp 0x36884
movb $0x1, -0x189(%rbp)
movq -0x20(%rbp), %rsi
movq (%rsi), %rax
movq (%rax), %rax
leaq -0x168(%rbp), %rdi
callq *%rax
jmp 0x368a0
leaq 0xf46f(%rip), %rsi      # 0x45d16
leaq -0x148(%rbp), %rdi
leaq -0x168(%rbp), %rdx
callq 0x1bde0
jmp 0x368bc
leaq 0xeab3(%rip), %rdx      # 0x45376
leaq -0x128(%rbp), %rdi
leaq -0x148(%rbp), %rsi
callq 0x1bb10
jmp 0x368d8
movq -0x198(%rbp), %rdx
leaq -0x108(%rbp), %rdi
leaq -0x128(%rbp), %rsi
callq 0x1bd90
jmp 0x368f4
leaq 0xea7b(%rip), %rdx      # 0x45376
leaq -0xe8(%rbp), %rdi
leaq -0x108(%rbp), %rsi
callq 0x1bb10
jmp 0x36910
movq -0x28(%rbp), %rsi
movq (%rsi), %rax
movq (%rax), %rax
leaq -0x188(%rbp), %rdi
callq *%rax
jmp 0x36925
leaq -0xc8(%rbp), %rdi
leaq -0xe8(%rbp), %rsi
leaq -0x188(%rbp), %rdx
callq 0x1bb80
jmp 0x36941
movq -0x1b0(%rbp), %rdi
leaq -0xc8(%rbp), %rsi
callq 0x2b980
jmp 0x36956
movq -0x1b0(%rbp), %rax
movb $0x0, -0x189(%rbp)
movq %rax, -0x8(%rbp)
leaq -0xc8(%rbp), %rdi
callq 0x5518
leaq -0x188(%rbp), %rdi
callq 0x5518
leaq -0xe8(%rbp), %rdi
callq 0x5518
leaq -0x108(%rbp), %rdi
callq 0x5518
leaq -0x128(%rbp), %rdi
callq 0x5518
leaq -0x148(%rbp), %rdi
callq 0x5518
leaq -0x168(%rbp), %rdi
callq 0x5518
movl $0x1, -0x190(%rbp)
jmp 0x36ac6
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x70(%rbp)
movl %eax, -0x74(%rbp)
jmp 0x36a96
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x70(%rbp)
movl %eax, -0x74(%rbp)
jmp 0x36a8a
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x70(%rbp)
movl %eax, -0x74(%rbp)
jmp 0x36a7e
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x70(%rbp)
movl %eax, -0x74(%rbp)
jmp 0x36a72
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x70(%rbp)
movl %eax, -0x74(%rbp)
jmp 0x36a66
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x70(%rbp)
movl %eax, -0x74(%rbp)
jmp 0x36a5a
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x70(%rbp)
movl %eax, -0x74(%rbp)
jmp 0x36a4e
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x70(%rbp)
movl %eax, -0x74(%rbp)
leaq -0xc8(%rbp), %rdi
callq 0x5518
leaq -0x188(%rbp), %rdi
callq 0x5518
leaq -0xe8(%rbp), %rdi
callq 0x5518
leaq -0x108(%rbp), %rdi
callq 0x5518
leaq -0x128(%rbp), %rdi
callq 0x5518
leaq -0x148(%rbp), %rdi
callq 0x5518
leaq -0x168(%rbp), %rdi
callq 0x5518
testb $0x1, -0x189(%rbp)
jne 0x36aa1
jmp 0x36ab2
movq -0x1b0(%rbp), %rdi
movl $0x28, %esi
callq 0x52b0
jmp 0x36ae5
movq -0x80(%rbp), %rax
movq %rax, -0x8(%rbp)
movl $0x1, -0x190(%rbp)
leaq -0x68(%rbp), %rdi
callq 0x5518
leaq -0x48(%rbp), %rdi
callq 0x5518
movq -0x8(%rbp), %rax
addq $0x1b0, %rsp            # imm = 0x1B0
popq %rbp
retq
leaq -0x68(%rbp), %rdi
callq 0x5518
leaq -0x48(%rbp), %rdi
callq 0x5518
movq -0x70(%rbp), %rdi
callq 0x5490