// File: /workspace/github_cpp_makefile_star2_O1/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, (%rax)
movaps %xmm0, 0x10(%rax)
movaps %xmm0, 0x20(%rax)
movaps %xmm0, 0x30(%rax)
movaps %xmm0, 0x40(%rax)
movaps %xmm0, 0x50(%rax)
movaps %xmm0, 0x70(%rax)
movaps %xmm0, 0x60(%rax)
leaq 0x1f591(%rip), %rax     # 0x347e8
addq $0x10, %rax
movq %rax, (%rbx)
leaq 0x8(%rbx), %rdi
leaq 0x18(%rbx), %rax
movq %rax, 0x8(%rbx)
xorl %eax, %eax
movq %rax, 0x10(%rbx)
movb %al, 0x18(%rbx)
leaq 0x28(%rbx), %r15
leaq 0x38(%rbx), %rcx
movq %rcx, 0x28(%rbx)
movq %rax, 0x30(%rbx)
movb %al, 0x38(%rbx)
leaq 0x58(%rbx), %rcx
movq %rcx, 0x48(%rbx)
movq %rax, 0x50(%rbx)
movb %al, 0x58(%rbx)
movq %rax, 0x78(%rbx)
movups %xmm0, 0x68(%rbx)
leaq 0x30(%r14), %r12
movq %r12, %rsi
callq 0x5100
leaq 0x50(%r14), %rsi
movq %r15, %rdi
callq 0x5100
leaq 0x21774(%rip), %rsi     # 0x36a30
movq %r14, %rdi
callq 0x1629e
testb %al, %al
je 0x1549d
movq 0x78(%r14), %r15
cmpq 0x21641(%rip), %r15     # 0x36918
jne 0x152f5
testq %r15, %r15
je 0x15330
movq 0x2162b(%rip), %rsi     # 0x36910
movq 0x70(%r14), %rdi
movq %r15, %rdx
callq 0x51d0
testl %eax, %eax
je 0x15330
cmpq 0x2163c(%rip), %r15     # 0x36938
jne 0x1531a
testq %r15, %r15
je 0x15330
movq 0x21626(%rip), %rsi     # 0x36930
movq 0x70(%r14), %rdi
movq %r15, %rdx
callq 0x51d0
testl %eax, %eax
je 0x15330
movq (%rbx), %rax
movq %rbx, %rdi
callq *0x20(%rax)
movq %r14, %rdi
callq 0x16742
jmp 0x154a6
leaq 0x48(%rbx), %r15
movq %r14, %rdi
callq 0x13d4c
movq %r15, %rdi
movq %r12, %rsi
callq 0x5100
leaq 0x21702(%rip), %rsi     # 0x36a50
movq %r14, %rdi
callq 0x1629e
testb %al, %al
je 0x1549d
leaq 0x2182b(%rip), %rsi     # 0x36b90
movq %r14, %rdi
callq 0x1629e
testb %al, %al
je 0x1549d
movq %rbx, %r12
addq $0x68, %r12
leaq 0x28(%rsp), %r13
movq 0x78(%r14), %rdx
cmpq 0x2182c(%rip), %rdx     # 0x36bb8
jne 0x153af
testq %rdx, %rdx
je 0x1548a
movq 0x21812(%rip), %rsi     # 0x36bb0
movq 0x70(%r14), %rdi
callq 0x51d0
testl %eax, %eax
je 0x1548a
movq %r14, %rdi
callq 0x13d4c
movq %r14, %rdi
xorl %esi, %esi
callq 0x162f0
movq %rax, (%rsp)
movq (%rax), %rcx
movq %r13, %rdi
movq %rax, %rsi
callq *0x30(%rcx)
movq 0x30(%rsp), %rdx
movb $0x1, %bpl
cmpq 0x50(%rbx), %rdx
jne 0x153fb
testq %rdx, %rdx
je 0x153f9
movq (%r15), %rsi
movq 0x28(%rsp), %rdi
callq 0x51d0
testl %eax, %eax
setne %bpl
jmp 0x153fb
xorl %ebp, %ebp
movq 0x28(%rsp), %rdi
leaq 0x38(%rsp), %rax
cmpq %rax, %rdi
je 0x15417
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x51c0
testb %bpl, %bpl
jne 0x154ba
movq 0x70(%rbx), %rsi
cmpq 0x78(%rbx), %rsi
je 0x15438
movq (%rsp), %rax
movq %rax, (%rsi)
addq $0x8, 0x70(%rbx)
jmp 0x15443
movq %r12, %rdi
movq %rsp, %rdx
callq 0x19120
movq 0x78(%r14), %rdx
cmpq 0x2176a(%rip), %rdx     # 0x36bb8
jne 0x15471
testq %rdx, %rdx
je 0x15381
movq 0x21750(%rip), %rsi     # 0x36bb0
movq 0x70(%r14), %rdi
callq 0x51d0
testl %eax, %eax
je 0x15381
movq %r14, %rdi
leaq 0x21675(%rip), %rsi     # 0x36af0
callq 0x1629e
testb %al, %al
jne 0x15381
jmp 0x154a6
leaq 0x2171f(%rip), %rsi     # 0x36bb0
movq %r14, %rdi
callq 0x1629e
testb %al, %al
jne 0x154a8
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 0xbde8
movq %r14, %rdi
movq %rbx, %rsi
callq 0x16842
movq 0x8(%rsp), %rdi
cmpq %r15, %rdi
je 0x154a6
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x51c0
jmp 0x154a6
movq %rax, %rbx
movq 0x8(%rsp), %rdi
cmpq %r15, %rdi
je 0x15519
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x51c0
movq %rbx, %rdi
callq 0x5330
nop