// File: /workspace/github_cpp_makefile_star2_O1/pranavmodx[P]modlang/src/evaluator.cpp
// Function: Evaluator::evalStringIndexExpression(String*, Integer*)
Object *Evaluator::evalStringIndexExpression(String *string, Integer *index)
{
	int i = index->value;
	auto arr = string->value;

	if (arr.size() <= i)
		return new Error("error: index " + index->inspect() + " out of range");

	return new String(std::string(1, arr[i]));
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xa0, %rsp
movq %rdx, %r14
movslq 0x8(%rdx), %r12
leaq 0x70(%rsp), %r15
movq %r15, -0x10(%r15)
movq 0x8(%rsi), %rax
movq 0x10(%rsi), %rdx
addq %rax, %rdx
leaq 0x60(%rsp), %rbx
movq %rbx, %rdi
movq %rax, %rsi
callq 0xbde8
cmpq %r12, 0x8(%rbx)
jbe 0x23b94
movl $0x28, %edi
callq 0x51b0
movq %rax, %rbx
movq 0x60(%rsp), %rax
movsbl (%rax,%r12), %edx
leaq 0x30(%rsp), %r12
movq %r12, -0x10(%r12)
leaq 0x20(%rsp), %rdi
movl $0x1, %esi
callq 0x5210
leaq 0x11020(%rip), %rax     # 0x34b78
movq %rax, (%rbx)
leaq 0x8(%rbx), %rdi
movq %rbx, %rax
addq $0x18, %rax
movq %rax, 0x8(%rbx)
movq 0x20(%rsp), %rsi
movq 0x28(%rsp), %rdx
addq %rsi, %rdx
callq 0xbde8
movq 0x20(%rsp), %rdi
cmpq %r12, %rdi
je 0x23ce6
movq 0x30(%rsp), %rsi
jmp 0x23cde
movl $0x28, %edi
callq 0x51b0
movq %rax, %rbx
movq (%r14), %rax
leaq 0x80(%rsp), %rdi
movq %r14, %rsi
callq *0x8(%rax)
leaq 0x6018(%rip), %rcx      # 0x29bd1
leaq 0x80(%rsp), %rdi
movl $0xd, %r8d
xorl %esi, %esi
xorl %edx, %edx
callq 0x51f0
leaq 0x50(%rsp), %r12
movq %r12, -0x10(%r12)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x23bf8
movq %rdx, 0x40(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x50(%rsp)
jmp 0x23c00
movups (%rcx), %xmm0
movups %xmm0, (%r12)
movq 0x8(%rax), %rdx
leaq 0x40(%rsp), %rdi
movq %rdx, 0x8(%rdi)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
leaq 0x5978(%rip), %rsi      # 0x2959b
callq 0x5360
leaq 0x10(%rsp), %r13
movq %r13, -0x10(%r13)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x23c4e
movq %rdx, (%rsp)
movq (%rcx), %rdx
movq %rdx, 0x10(%rsp)
jmp 0x23c56
movups (%rcx), %xmm0
movups %xmm0, (%r13)
movq 0x8(%rax), %rdx
movq %rdx, 0x8(%rsp)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
leaq 0x10e23(%rip), %rax     # 0x34a98
movq %rax, (%rbx)
leaq 0x8(%rbx), %rdi
movq %rbx, %rax
addq $0x18, %rax
movq %rax, 0x8(%rbx)
movq (%rsp), %rsi
movq 0x8(%rsp), %rdx
addq %rsi, %rdx
callq 0xbde8
movq (%rsp), %rdi
cmpq %r13, %rdi
je 0x23cae
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x51c0
movq 0x40(%rsp), %rdi
cmpq %r12, %rdi
je 0x23cc5
movq 0x50(%rsp), %rsi
incq %rsi
callq 0x51c0
leaq 0x90(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x23ce6
movq 0x90(%rsp), %rsi
incq %rsi
callq 0x51c0
movq 0x60(%rsp), %rdi
cmpq %r15, %rdi
je 0x23cfd
movq 0x70(%rsp), %rsi
incq %rsi
callq 0x51c0
movq %rbx, %rax
addq $0xa0, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
movq %rax, %r14
movq (%rsp), %rdi
cmpq %r13, %rdi
je 0x23d2f
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x51c0
jmp 0x23d2f
movq %rax, %r14
movq 0x40(%rsp), %rdi
cmpq %r12, %rdi
je 0x23d4b
movq 0x50(%rsp), %rsi
incq %rsi
callq 0x51c0
jmp 0x23d4b
movq %rax, %r14
leaq 0x90(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x23d87
movq 0x90(%rsp), %rsi
jmp 0x23d78
movq %rax, %r14
movq 0x20(%rsp), %rdi
cmpq %r12, %rdi
je 0x23d87
movq 0x30(%rsp), %rsi
incq %rsi
callq 0x51c0
jmp 0x23d87
jmp 0x23d84
movq %rax, %r14
movl $0x28, %esi
movq %rbx, %rdi
callq 0x51c0
jmp 0x23d99
movq %rax, %r14
movq 0x60(%rsp), %rdi
cmpq %r15, %rdi
je 0x23db0
movq 0x70(%rsp), %rsi
incq %rsi
callq 0x51c0
movq %r14, %rdi
callq 0x5330