// File: /workspace/github_cpp_makefile_star2_O3/pranavmodx[P]modlang/src/evaluator.cpp
// Function: Evaluator::evalHashMapLiteral(HashMapLiteral*, Environment*)
Object *Evaluator::evalHashMapLiteral(HashMapLiteral *hashMapLiteral, Environment *env)
{
	HashMap *hashMap = new HashMap();

	for (auto pair : hashMapLiteral->pairs)
	{
		Object *key = Eval(pair.key, env);

		if (key->type() == ERROR_OBJ)
			return key;

		Object *value = Eval(pair.value, env);

		if (value->type() == ERROR_OBJ)
		{
			delete hashMap;
			return value;
		}

		HashKey hashKey(key->type(), key->inspect());
		HashMapPairObj hashMapPairObj(key, value);

		hashMap->pairs[hashKey] = hashMapPairObj;
	}

	return hashMap;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xa8, %rsp
movq %rdx, 0x18(%rsp)
movq %rsi, %rbx
movq %rdi, 0x10(%rsp)
movl $0x40, %edi
callq 0x51b0
xorps %xmm0, %xmm0
movaps %xmm0, 0x20(%rax)
leaq 0x130ba(%rip), %rcx     # 0x34c20
movq %rcx, (%rax)
leaq 0x38(%rax), %rcx
movq %rcx, 0x8(%rax)
movq $0x1, 0x10(%rax)
movups %xmm0, 0x18(%rax)
movl $0x3f800000, 0x28(%rax) # imm = 0x3F800000
movups %xmm0, 0x30(%rax)
movq 0x48(%rbx), %r14
movq 0x50(%rbx), %rcx
movq %rcx, 0x60(%rsp)
cmpq %rcx, %r14
je 0x21d8b
movq %rax, (%rsp)
addq $0x8, %rax
movq %rax, 0x8(%rsp)
leaq 0x68(%rsp), %r13
movq (%r14), %rsi
movq 0x8(%r14), %rbx
movq 0x10(%rsp), %rdi
movq 0x18(%rsp), %rdx
callq 0x1ed4a
movq %rax, %rbp
movq (%rax), %rax
leaq 0x20(%rsp), %rdi
movq %rbp, %rsi
callq *(%rax)
movq 0x28(%rsp), %rdx
cmpq 0x16756(%rip), %rdx     # 0x38338
jne 0x21c05
movq 0x20(%rsp), %r12
testq %rdx, %rdx
je 0x21c0f
movq 0x1673b(%rip), %rsi     # 0x38330
movq %r12, %rdi
callq 0x51d0
testl %eax, %eax
sete %r15b
jmp 0x21c12
movq 0x20(%rsp), %r12
xorl %r15d, %r15d
jmp 0x21c12
movb $0x1, %r15b
leaq 0x30(%rsp), %rax
cmpq %rax, %r12
je 0x21c2c
movq 0x30(%rsp), %rsi
incq %rsi
movq %r12, %rdi
callq 0x51c0
testb %r15b, %r15b
jne 0x21d90
movq 0x10(%rsp), %rdi
movq %rbx, %rsi
movq 0x18(%rsp), %rdx
callq 0x1ed4a
movq %rax, %rbx
movq (%rax), %rax
leaq 0x20(%rsp), %rdi
movq %rbx, %rsi
callq *(%rax)
movq 0x28(%rsp), %rdx
cmpq 0x166d5(%rip), %rdx     # 0x38338
jne 0x21c86
movq 0x20(%rsp), %r12
testq %rdx, %rdx
je 0x21c90
movq 0x166ba(%rip), %rsi     # 0x38330
movq %r12, %rdi
callq 0x51d0
testl %eax, %eax
sete %r15b
jmp 0x21c93
movq 0x20(%rsp), %r12
xorl %r15d, %r15d
jmp 0x21c93
movb $0x1, %r15b
leaq 0x30(%rsp), %rax
cmpq %rax, %r12
je 0x21cad
movq 0x30(%rsp), %rsi
incq %rsi
movq %r12, %rdi
callq 0x51c0
testb %r15b, %r15b
jne 0x21d95
movq (%rbp), %rax
leaq 0x88(%rsp), %r15
movq %r15, %rdi
movq %rbp, %rsi
callq *(%rax)
movq (%rbp), %rax
movq %r13, %rdi
movq %rbp, %rsi
callq *0x8(%rax)
leaq 0x20(%rsp), %rdi
movq %r15, %rsi
movq %r13, %rdx
callq 0x2432c
movq 0x68(%rsp), %rdi
leaq 0x78(%rsp), %rax
cmpq %rax, %rdi
je 0x21d03
movq 0x78(%rsp), %rsi
incq %rsi
callq 0x51c0
movq 0x88(%rsp), %rdi
leaq 0x98(%rsp), %rax
cmpq %rax, %rdi
je 0x21d28
movq 0x98(%rsp), %rsi
incq %rsi
callq 0x51c0
movq 0x8(%rsp), %rdi
leaq 0x20(%rsp), %rsi
callq 0x286a0
movq %rbp, (%rax)
movq %rbx, 0x8(%rax)
movq 0x40(%rsp), %rdi
leaq 0x50(%rsp), %rax
cmpq %rax, %rdi
je 0x21d5a
movq 0x50(%rsp), %rsi
incq %rsi
callq 0x51c0
movq 0x20(%rsp), %rdi
leaq 0x30(%rsp), %rax
cmpq %rax, %rdi
je 0x21d76
movq 0x30(%rsp), %rsi
incq %rsi
callq 0x51c0
addq $0x10, %r14
cmpq 0x60(%rsp), %r14
jne 0x21bb0
movq (%rsp), %rbx
jmp 0x21dba
movq %rax, %rbx
jmp 0x21dba
movq %rbp, %rbx
jmp 0x21dba
movq (%rsp), %r14
leaq 0x12e80(%rip), %rax     # 0x34c20
movq %rax, (%r14)
movq 0x8(%rsp), %rdi
callq 0x24ac2
movl $0x40, %esi
movq %r14, %rdi
callq 0x51c0
movq %rbx, %rax
addq $0xa8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
leaq 0x20(%rsp), %rdi
callq 0x2443c
jmp 0x21e27
movq %rax, %rbx
movq 0x68(%rsp), %rdi
leaq 0x78(%rsp), %rax
cmpq %rax, %rdi
je 0x21e02
movq 0x78(%rsp), %rsi
incq %rsi
callq 0x51c0
jmp 0x21e02
movq %rax, %rbx
movq 0x88(%rsp), %rdi
leaq 0x98(%rsp), %rax
cmpq %rax, %rdi
je 0x21e27
movq 0x98(%rsp), %rsi
incq %rsi
callq 0x51c0
movq %rbx, %rdi
callq 0x5330
nop