// File: /workspace/github_cpp_makefile_star2_O1/pranavmodx[P]modlang/src/parser.cpp
// Function: Parser::parseIntegerLiteral()
Expression *Parser::parseIntegerLiteral()
{
	IntegerLiteral *intLit = new IntegerLiteral();
	intLit->token = curToken;

	try
	{
		intLit->value = std::stoi(curToken.literal);
	}
	catch (const std::invalid_argument e)
	{
		errors.push_back("error: cannot parse " + curToken.literal + " to int");
		return nullptr;
	}
	catch (const std::out_of_range e)
	{
		errors.push_back("error: the integer " + curToken.literal + " is out of range");
		return nullptr;
	}

	return intLit;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x58, %rsp
movq %rdi, %rbx
movl $0x50, %edi
callq 0x51b0
movq %rax, %r14
xorps %xmm0, %xmm0
movaps %xmm0, (%rax)
movaps %xmm0, 0x10(%rax)
movaps %xmm0, 0x20(%rax)
movaps %xmm0, 0x30(%rax)
movaps %xmm0, 0x40(%rax)
leaq 0x20999(%rip), %rax     # 0x348f8
movq %rax, (%r14)
leaq 0x8(%r14), %rdi
leaq 0x18(%r14), %rax
movq %rax, 0x8(%r14)
xorl %eax, %eax
movq %rax, 0x10(%r14)
movb %al, 0x18(%r14)
leaq 0x28(%r14), %r12
leaq 0x38(%r14), %rcx
movq %rcx, 0x28(%r14)
movq %rax, 0x30(%r14)
movb %al, 0x38(%r14)
leaq 0x30(%rbx), %rsi
callq 0x5100
leaq 0x50(%rbx), %rsi
movq %r12, %rdi
movq %rsi, 0x20(%rsp)
callq 0x5100
movq 0x50(%rbx), %r13
callq 0x5050
movq %rax, %r12
movl (%rax), %r15d
movl $0x0, (%rax)
movq %rsp, %rbp
movq %r13, %rdi
movq %rbp, %rsi
movl $0xa, %edx
callq 0x5260
cmpq %r13, (%rbp)
je 0x14003
movslq %eax, %rcx
cmpq %rax, %rcx
jne 0x1400f
movl (%r12), %ecx
cmpl $0x22, %ecx
je 0x1400f
testl %ecx, %ecx
jne 0x13fed
movl %r15d, (%r12)
movl %eax, 0x48(%r14)
movq %r14, %rax
addq $0x58, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x155cb(%rip), %rdi     # 0x295d5
callq 0x5120
leaq 0x155bf(%rip), %rdi     # 0x295d5
callq 0x5280
movq %rax, %r14
cmpl $0x0, (%r12)
jne 0x14029
movl %r15d, (%r12)
cmpl $0x2, %edx
jne 0x140bc
movq %r14, %rdi
callq 0x5240
leaq 0x48(%rsp), %r12
movq %r12, %rdi
movq %rax, %rsi
callq 0x5310
movq 0x20f6f(%rip), %rax     # 0x34fc0
addq $0x10, %rax
movq %rax, (%r12)
movq %r14, %rdi
callq 0x50d0
leaq 0x15541(%rip), %rsi     # 0x295a9
leaq 0x28(%rsp), %rdi
movq 0x20(%rsp), %rdx
callq 0x11b9f
leaq 0x15540(%rip), %rsi     # 0x295be
leaq 0x28(%rsp), %rdi
callq 0x5360
addq $0xb0, %rbx
leaq 0x10(%rsp), %r15
movq %r15, -0x10(%r15)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x14148
movq %rdx, (%rsp)
movq (%rcx), %rdx
movq %rdx, 0x10(%rsp)
jmp 0x1414f
cmpl $0x1, %edx
jne 0x142bb
movq %r14, %rdi
callq 0x5240
leaq 0x48(%rsp), %r12
movq %r12, %rdi
movq %rax, %rsi
callq 0x5310
movq 0x20ee4(%rip), %rax     # 0x34fc8
addq $0x10, %rax
movq %rax, (%r12)
movq %r14, %rdi
callq 0x50d0
leaq 0x15489(%rip), %rsi     # 0x29584
leaq 0x28(%rsp), %rdi
movq 0x20(%rsp), %rdx
callq 0x11b9f
leaq 0x15487(%rip), %rsi     # 0x29598
leaq 0x28(%rsp), %rdi
callq 0x5360
addq $0xb0, %rbx
leaq 0x10(%rsp), %r15
movq %r15, -0x10(%r15)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x141ae
movq %rdx, (%rsp)
movq (%rcx), %rdx
movq %rdx, 0x10(%rsp)
jmp 0x141b5
movups (%rcx), %xmm0
movups %xmm0, (%r15)
movq 0x8(%rax), %rdx
movq %rsp, %rsi
movq %rdx, 0x8(%rsi)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
movq %rbx, %rdi
callq 0x185a0
movq (%rsp), %rdi
cmpq %r15, %rdi
je 0x14187
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x51c0
leaq 0x38(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x141a2
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x51c0
leaq 0x48(%rsp), %rdi
callq 0x5300
jmp 0x14212
movups (%rcx), %xmm0
movups %xmm0, (%r15)
movq 0x8(%rax), %rdx
movq %rsp, %rsi
movq %rdx, 0x8(%rsi)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
movq %rbx, %rdi
callq 0x185a0
movq (%rsp), %rdi
cmpq %r15, %rdi
je 0x141ed
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x51c0
leaq 0x38(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x14208
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x51c0
leaq 0x48(%rsp), %rdi
callq 0x5270
callq 0x52f0
xorl %r14d, %r14d
jmp 0x13ff1
movq %rax, %r14
movq (%rsp), %rdi
cmpq %r15, %rdi
je 0x14258
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x51c0
jmp 0x14258
movq %rax, %r14
movq (%rsp), %rdi
cmpq %r15, %rdi
je 0x1428c
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x51c0
jmp 0x1428c
movq %rax, %r14
leaq 0x38(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x14278
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x51c0
jmp 0x14278
movq %rax, %r14
leaq 0x48(%rsp), %rdi
callq 0x5270
callq 0x52f0
jmp 0x142bb
movq %rax, %r14
leaq 0x38(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x142ac
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x51c0
jmp 0x142ac
movq %rax, %r14
leaq 0x48(%rsp), %rdi
callq 0x5300
callq 0x52f0
movq %r14, %rdi
callq 0x5330
movq %rax, %rdi
callq 0xbc77
nop