// File: /workspace/github_cpp_makefile_star2_O3/pranavmodx[P]modlang/src/parser.cpp
// Function: Parser::parseMaxHeapLiteral()
Expression *Parser::parseMaxHeapLiteral()
{
	MaxHeapLiteral *exp = new MaxHeapLiteral();
	exp->token = curToken;

	if (!expectPeek(LT))
	{
		delete exp;
		return nullptr;
	}

	if (peekToken.type != INTEGER && peekToken.type != STRING) {
		delete exp;
		peekTypeError();
		return nullptr;
	}

	nextToken();

	exp->type = curToken.type;

	if (!expectPeek(GT))
	{
		delete exp;
		return nullptr;
	}

	if (!expectPeek(LBRACE))
	{
		delete exp;
		return nullptr;
	}

	while (peekToken.type != RBRACE)
	{
		nextToken();

		Expression *value = parseExpression(LOWEST);

		if (value->getTokenType() != exp->type) {
			curTypeError(exp->type);
			return nullptr;
		}

		exp->elements.push_back(value);

		if (peekToken.type != RBRACE && !expectPeek(COMMA))
			return nullptr;
	}

	if (!expectPeek(RBRACE))
	{
		delete exp;
		return nullptr;
	}

	return exp;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x48, %rsp
movq %rdi, %r14
movl $0x80, %edi
callq 0x51b0
movq %rax, %rbx
xorps %xmm0, %xmm0
movaps %xmm0, 0x10(%rax)
movaps %xmm0, 0x20(%rax)
movaps %xmm0, 0x30(%rax)
movaps %xmm0, 0x40(%rax)
movaps %xmm0, 0x50(%rax)
movaps %xmm0, 0x60(%rax)
leaq 0x1f8a4(%rip), %rax     # 0x34788
addq $0x10, %rax
movq %rax, (%rbx)
leaq 0x8(%rbx), %rdi
leaq 0x18(%rbx), %rax
movq %rax, 0x8(%rbx)
xorl %eax, %eax
movb %al, 0x18(%rbx)
leaq 0x28(%rbx), %r15
leaq 0x38(%rbx), %rcx
movq %rcx, 0x28(%rbx)
movb %al, 0x38(%rbx)
leaq 0x58(%rbx), %rcx
movq %rcx, 0x48(%rbx)
movb %al, 0x58(%rbx)
movups %xmm0, 0x68(%rbx)
movq $0x0, 0x78(%rbx)
leaq 0x30(%r14), %r12
movq %r12, %rsi
callq 0x5100
leaq 0x50(%r14), %rsi
movq %r15, %rdi
callq 0x5100
leaq 0x21aef(%rip), %rsi     # 0x36a30
movq %r14, %rdi
callq 0x16224
testb %al, %al
je 0x15132
movq 0x78(%r14), %r15
cmpq 0x219bc(%rip), %r15     # 0x36918
jne 0x14f7a
testq %r15, %r15
je 0x14fb5
movq 0x219a6(%rip), %rsi     # 0x36910
movq 0x70(%r14), %rdi
movq %r15, %rdx
callq 0x51d0
testl %eax, %eax
je 0x14fb5
cmpq 0x219b7(%rip), %r15     # 0x36938
jne 0x14f9f
testq %r15, %r15
je 0x14fb5
movq 0x219a1(%rip), %rsi     # 0x36930
movq 0x70(%r14), %rdi
movq %r15, %rdx
callq 0x51d0
testl %eax, %eax
je 0x14fb5
movq (%rbx), %rax
movq %rbx, %rdi
callq *0x20(%rax)
movq %r14, %rdi
callq 0x166ac
jmp 0x1513b
leaq 0x48(%rbx), %r15
movq %r14, %rdi
callq 0x13d2e
movq %r15, %rdi
movq %r12, %rsi
callq 0x5100
leaq 0x21a7d(%rip), %rsi     # 0x36a50
movq %r14, %rdi
callq 0x16224
testb %al, %al
je 0x15132
leaq 0x21ba6(%rip), %rsi     # 0x36b90
movq %r14, %rdi
callq 0x16224
testb %al, %al
je 0x15132
movq %rbx, %r12
addq $0x68, %r12
movq 0x21bb0(%rip), %rbp     # 0x36bb8
cmpq %rbp, 0x78(%r14)
jne 0x15032
testq %rbp, %rbp
je 0x1511f
movq 0x21b92(%rip), %rsi     # 0x36bb0
movq 0x70(%r14), %rdi
movq %rbp, %rdx
callq 0x51d0
testl %eax, %eax
je 0x1511f
movq %r14, %rdi
callq 0x13d2e
movq %r14, %rdi
xorl %esi, %esi
callq 0x1626e
movq %rax, (%rsp)
movq (%rax), %rcx
leaq 0x28(%rsp), %rdi
movq %rax, %rsi
callq *0x30(%rcx)
movq 0x30(%rsp), %rdx
cmpq 0x50(%rbx), %rdx
jne 0x1507e
movq 0x28(%rsp), %rbp
testq %rdx, %rdx
je 0x15088
movq (%r15), %rsi
movq %rbp, %rdi
callq 0x51d0
testl %eax, %eax
setne %r13b
jmp 0x1508b
movb $0x1, %r13b
movq 0x28(%rsp), %rbp
jmp 0x1508b
xorl %r13d, %r13d
leaq 0x38(%rsp), %rax
cmpq %rax, %rbp
je 0x150a5
movq 0x38(%rsp), %rsi
incq %rsi
movq %rbp, %rdi
callq 0x51c0
testb %r13b, %r13b
jne 0x1514f
movq 0x70(%rbx), %rsi
cmpq 0x78(%rbx), %rsi
je 0x150c6
movq (%rsp), %rax
movq %rax, (%rsi)
addq $0x8, 0x70(%rbx)
jmp 0x150d1
movq %r12, %rdi
movq %rsp, %rdx
callq 0x18f70
movq 0x78(%r14), %rbp
cmpq 0x21adc(%rip), %rbp     # 0x36bb8
jne 0x15106
testq %rbp, %rbp
je 0x150ff
movq 0x21ac6(%rip), %rsi     # 0x36bb0
movq 0x70(%r14), %rdi
movq %rbp, %rdx
callq 0x51d0
testl %eax, %eax
jne 0x15106
jmp 0x15008
xorl %ebp, %ebp
jmp 0x15008
movq %r14, %rdi
leaq 0x219e0(%rip), %rsi     # 0x36af0
callq 0x16224
testb %al, %al
jne 0x15001
jmp 0x1513b
leaq 0x21a8a(%rip), %rsi     # 0x36bb0
movq %r14, %rdi
callq 0x16224
testb %al, %al
jne 0x1513d
movq (%rbx), %rax
movq %rbx, %rdi
callq *0x20(%rax)
xorl %ebx, %ebx
movq %rbx, %rax
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x18(%rsp), %r15
movq %r15, -0x10(%r15)
movq 0x48(%rbx), %rsi
movq 0x50(%rbx), %rdx
addq %rsi, %rdx
leaq 0x8(%rsp), %rbx
movq %rbx, %rdi
callq 0xbdc6
movq %r14, %rdi
movq %rbx, %rsi
callq 0x167ac
movq 0x8(%rsp), %rdi
cmpq %r15, %rdi
je 0x1513b
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x51c0
jmp 0x1513b
movq %rax, %rbx
movq 0x8(%rsp), %rdi
cmpq %r15, %rdi
je 0x151ae
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x51c0
movq %rbx, %rdi
callq 0x5330