// File: /workspace/github_cpp_makefile_star2_O1/pranavmodx[P]modlang/src/evaluator.cpp
// Function: Evaluator::evalIndexExpression(Object*, Object*, Environment*)
Object *Evaluator::evalIndexExpression(Object *left, Object *index, Environment *env)
{
	if (left->type() == STRING_OBJ && index->type() == INTEGER_OBJ)
		return evalStringIndexExpression((String *)left, (Integer *)index);

	else if (left->type() == ARRAY_OBJ && index->type() == INTEGER_OBJ)
		return evalArrayIndexExpression((Array *)left, (Integer *)index);

	else if (left->type() == HASHMAP_OBJ)
		return evalHashMapIndexExpression((HashMap *)left, index);

	else
		return new Error("error: index operator [] not supported for -> " + left->type());
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x80, %rsp
movq %rdx, %r14
movq %rsi, %rbx
movq (%rsi), %rax
movq %rsp, %r15
movq %r15, %rdi
callq *(%rax)
movq 0x8(%r15), %rdx
cmpq 0x16755(%rip), %rdx     # 0x38198
jne 0x21a62
testq %rdx, %rdx
je 0x21a66
movq 0x1673f(%rip), %rsi     # 0x38190
movq (%rsp), %rdi
callq 0x51d0
testl %eax, %eax
sete %bpl
jmp 0x21a69
xorl %ebp, %ebp
jmp 0x21a69
movb $0x1, %bpl
testb %bpl, %bpl
je 0x21aab
movq (%r14), %rax
leaq 0x60(%rsp), %rdi
movq %r14, %rsi
callq *(%rax)
movq 0x68(%rsp), %rdx
cmpq 0x166d1(%rip), %rdx     # 0x38158
jne 0x21aab
testq %rdx, %rdx
je 0x21c07
movq 0x166b7(%rip), %rsi     # 0x38150
movq 0x60(%rsp), %rdi
callq 0x51d0
testl %eax, %eax
sete %r15b
jmp 0x21aae
xorl %r15d, %r15d
testb %bpl, %bpl
je 0x21ace
leaq 0x70(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x21ace
movq 0x70(%rsp), %rsi
incq %rsi
callq 0x51c0
leaq 0x10(%rsp), %r12
movq -0x10(%r12), %rdi
cmpq %r12, %rdi
je 0x21aea
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x51c0
testb %r15b, %r15b
je 0x21aff
movq %rbx, %rsi
movq %r14, %rdx
callq 0x23ae0
jmp 0x21c38
movq (%rbx), %rax
movq %rsp, %r15
movq %r15, %rdi
movq %rbx, %rsi
callq *(%rax)
movq 0x8(%r15), %rdx
cmpq 0x166c0(%rip), %rdx     # 0x381d8
jne 0x21b37
testq %rdx, %rdx
je 0x21b3b
movq 0x166aa(%rip), %rsi     # 0x381d0
movq (%rsp), %rdi
callq 0x51d0
testl %eax, %eax
sete %bpl
jmp 0x21b3e
xorl %ebp, %ebp
jmp 0x21b3e
movb $0x1, %bpl
testb %bpl, %bpl
je 0x21b80
movq (%r14), %rax
leaq 0x40(%rsp), %rdi
movq %r14, %rsi
callq *(%rax)
movq 0x48(%rsp), %rdx
cmpq 0x165fc(%rip), %rdx     # 0x38158
jne 0x21b80
testq %rdx, %rdx
je 0x21ca6
movq 0x165e2(%rip), %rsi     # 0x38150
movq 0x40(%rsp), %rdi
callq 0x51d0
testl %eax, %eax
sete %r15b
jmp 0x21b83
xorl %r15d, %r15d
testb %bpl, %bpl
je 0x21ba3
leaq 0x50(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x21ba3
movq 0x50(%rsp), %rsi
incq %rsi
callq 0x51c0
movq (%rsp), %rdi
cmpq %r12, %rdi
je 0x21bb9
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x51c0
testb %r15b, %r15b
je 0x21bcb
movq %rbx, %rsi
movq %r14, %rdx
callq 0x23db8
jmp 0x21c38
movq (%rbx), %rax
movq %rsp, %r15
movq %r15, %rdi
movq %rbx, %rsi
callq *(%rax)
movq 0x8(%r15), %rdx
cmpq 0x16614(%rip), %rdx     # 0x381f8
jne 0x21c03
testq %rdx, %rdx
je 0x21c0f
movq 0x165fe(%rip), %rsi     # 0x381f0
movq (%rsp), %rdi
callq 0x51d0
testl %eax, %eax
sete %bpl
jmp 0x21c12
xorl %ebp, %ebp
jmp 0x21c12
movb $0x1, %r15b
jmp 0x21aae
movb $0x1, %bpl
movq (%rsp), %rdi
cmpq %r12, %rdi
je 0x21c28
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x51c0
testb %bpl, %bpl
je 0x21c4e
movq %rbx, %rsi
movq %r14, %rdx
callq 0x23fee
movq %rax, %r14
movq %r14, %rax
addq $0x80, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movl $0x28, %edi
callq 0x51b0
movq %rax, %r14
movq (%rbx), %rax
movq %rsp, %rdi
movq %rbx, %rsi
callq *(%rax)
leaq 0x7f35(%rip), %rcx      # 0x29ba2
movq %rsp, %rdi
movl $0x2e, %r8d
xorl %esi, %esi
xorl %edx, %edx
callq 0x51f0
leaq 0x30(%rsp), %r15
movq %r15, -0x10(%r15)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x21cae
movq %rdx, 0x20(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x30(%rsp)
jmp 0x21cb5
movb $0x1, %r15b
jmp 0x21b83
movups (%rcx), %xmm0
movups %xmm0, (%r15)
movq 0x8(%rax), %rdx
movq %rdx, 0x28(%rsp)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
leaq 0x12dc4(%rip), %rax     # 0x34a98
movq %rax, (%r14)
leaq 0x8(%r14), %rdi
movq %r14, %rax
addq $0x18, %rax
movq %rax, 0x8(%r14)
movq 0x20(%rsp), %rsi
movq 0x28(%rsp), %rdx
addq %rsi, %rdx
callq 0xbde8
movq 0x20(%rsp), %rdi
cmpq %r15, %rdi
je 0x21d0f
movq 0x30(%rsp), %rsi
incq %rsi
callq 0x51c0
movq (%rsp), %rdi
cmpq %r12, %rdi
je 0x21c3b
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x51c0
jmp 0x21c3b
movq %rax, %rbx
movq 0x20(%rsp), %rdi
cmpq %r15, %rdi
je 0x21d4d
movq 0x30(%rsp), %rsi
incq %rsi
callq 0x51c0
jmp 0x21d4d
movq %rax, %rbx
movq (%rsp), %rdi
cmpq %r12, %rdi
je 0x21d68
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x51c0
jmp 0x21d68
movq %rax, %rbx
movl $0x28, %esi
movq %r14, %rdi
jmp 0x21d99
movq %rax, %rbx
movq (%rsp), %rdi
cmpq %r12, %rdi
jne 0x21d91
jmp 0x21d9e
movq %rax, %rbx
leaq 0x10(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x21d9e
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x51c0
movq %rbx, %rdi
callq 0x5330