// File: /workspace/github_cpp_makefile_star2_O3/pranavmodx[P]modlang/src/parser.cpp
// Function: Parser::parseMinHeapLiteral()
Expression *Parser::parseMinHeapLiteral()
{
	MinHeapLiteral *exp = new MinHeapLiteral();
	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 0x1f5f2(%rip), %rax     # 0x347e8
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 0x217dd(%rip), %rsi     # 0x36a30
movq %r14, %rdi
callq 0x16224
testb %al, %al
je 0x15444
movq 0x78(%r14), %r15
cmpq 0x216aa(%rip), %r15     # 0x36918
jne 0x1528c
testq %r15, %r15
je 0x152c7
movq 0x21694(%rip), %rsi     # 0x36910
movq 0x70(%r14), %rdi
movq %r15, %rdx
callq 0x51d0
testl %eax, %eax
je 0x152c7
cmpq 0x216a5(%rip), %r15     # 0x36938
jne 0x152b1
testq %r15, %r15
je 0x152c7
movq 0x2168f(%rip), %rsi     # 0x36930
movq 0x70(%r14), %rdi
movq %r15, %rdx
callq 0x51d0
testl %eax, %eax
je 0x152c7
movq (%rbx), %rax
movq %rbx, %rdi
callq *0x20(%rax)
movq %r14, %rdi
callq 0x166ac
jmp 0x1544d
leaq 0x48(%rbx), %r15
movq %r14, %rdi
callq 0x13d2e
movq %r15, %rdi
movq %r12, %rsi
callq 0x5100
leaq 0x2176b(%rip), %rsi     # 0x36a50
movq %r14, %rdi
callq 0x16224
testb %al, %al
je 0x15444
leaq 0x21894(%rip), %rsi     # 0x36b90
movq %r14, %rdi
callq 0x16224
testb %al, %al
je 0x15444
movq %rbx, %r12
addq $0x68, %r12
movq 0x2189e(%rip), %rbp     # 0x36bb8
cmpq %rbp, 0x78(%r14)
jne 0x15344
testq %rbp, %rbp
je 0x15431
movq 0x21880(%rip), %rsi     # 0x36bb0
movq 0x70(%r14), %rdi
movq %rbp, %rdx
callq 0x51d0
testl %eax, %eax
je 0x15431
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 0x15390
movq 0x28(%rsp), %rbp
testq %rdx, %rdx
je 0x1539a
movq (%r15), %rsi
movq %rbp, %rdi
callq 0x51d0
testl %eax, %eax
setne %r13b
jmp 0x1539d
movb $0x1, %r13b
movq 0x28(%rsp), %rbp
jmp 0x1539d
xorl %r13d, %r13d
leaq 0x38(%rsp), %rax
cmpq %rax, %rbp
je 0x153b7
movq 0x38(%rsp), %rsi
incq %rsi
movq %rbp, %rdi
callq 0x51c0
testb %r13b, %r13b
jne 0x15461
movq 0x70(%rbx), %rsi
cmpq 0x78(%rbx), %rsi
je 0x153d8
movq (%rsp), %rax
movq %rax, (%rsi)
addq $0x8, 0x70(%rbx)
jmp 0x153e3
movq %r12, %rdi
movq %rsp, %rdx
callq 0x18f70
movq 0x78(%r14), %rbp
cmpq 0x217ca(%rip), %rbp     # 0x36bb8
jne 0x15418
testq %rbp, %rbp
je 0x15411
movq 0x217b4(%rip), %rsi     # 0x36bb0
movq 0x70(%r14), %rdi
movq %rbp, %rdx
callq 0x51d0
testl %eax, %eax
jne 0x15418
jmp 0x1531a
xorl %ebp, %ebp
jmp 0x1531a
movq %r14, %rdi
leaq 0x216ce(%rip), %rsi     # 0x36af0
callq 0x16224
testb %al, %al
jne 0x15313
jmp 0x1544d
leaq 0x21778(%rip), %rsi     # 0x36bb0
movq %r14, %rdi
callq 0x16224
testb %al, %al
jne 0x1544f
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 0x1544d
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x51c0
jmp 0x1544d
movq %rax, %rbx
movq 0x8(%rsp), %rdi
cmpq %r15, %rdi
je 0x154c0
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x51c0
movq %rbx, %rdi
callq 0x5330