// File: /workspace/github_cpp_makefile_star2_O3/menhits[P]phplus/src/ResolveLiteral.cpp
// Function: resolveIntLiteral(std::shared_ptr<TokenData>, std::shared_ptr<TypeBase>)
Action resolveIntLiteral(Token token, Type type)
{
	string in=token->getText();
	
	int val=0;
	
	for (auto i=in.begin(); i!=in.end(); ++i)
	{
		if (*i<'0' || *i>'9')
		{
			error.log(string() + "bad character '" + *i + "' tersedian pada nomor '" + in + "'", SOURCE_ERROR, token);
			return nullptr;
		}
		
		val=val*10+(*i-'0');
	}
	
	if (type==Bool)
	{
		bool out=(val!=0);
		return constGetAction(&out, type, token->getText(), globalNamespace);
	}
	else
	{
		int out=val;
		return constGetAction(&out, type, token->getText(), globalNamespace);
	}
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x178, %rsp            # imm = 0x178
movq %rdx, %r15
movq %rsi, %r14
movq %rdi, %rbx
movq (%rsi), %rax
leaq 0x88(%rsp), %rbp
movq %rbp, -0x10(%rbp)
movq (%rax), %rsi
movq 0x8(%rax), %rdx
addq %rsi, %rdx
leaq 0x78(%rsp), %r12
movq %r12, %rdi
callq 0xde0c
movq 0x8(%r12), %rcx
testq %rcx, %rcx
je 0x517d9
movq 0x78(%rsp), %r12
xorl %r13d, %r13d
xorl %eax, %eax
movzbl (%r12,%r13), %edx
leal -0x3a(%rdx), %esi
cmpb $-0xb, %sil
jbe 0x51821
leal (%rax,%rax,4), %eax
leal (%rdx,%rax,2), %eax
addl $-0x30, %eax
incq %r13
cmpq %r13, %rcx
jne 0x517b8
jmp 0x517db
xorl %eax, %eax
movq (%r15), %rcx
leaq 0x48c3b(%rip), %rdx     # 0x9a420
cmpq (%rdx), %rcx
je 0x5187c
movl %eax, 0x58(%rsp)
movq %rcx, 0x18(%rsp)
movq 0x8(%r15), %rax
movq %rax, 0x20(%rsp)
testq %rax, %rax
je 0x51a97
movq 0x48798(%rip), %rcx     # 0x99fa8
cmpb $0x0, (%rcx)
je 0x51a93
incl 0x8(%rax)
jmp 0x51a97
leaq 0xe8(%rsp), %rax
movq %rax, -0x10(%rax)
movq $0x0, -0x8(%rax)
movb $0x0, (%rax)
leaq 0x29929(%rip), %rsi     # 0x7b168
leaq 0xd8(%rsp), %rdi
callq 0xa560
leaq 0xa8(%rsp), %rsi
movq %rsi, -0x10(%rsi)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x518b2
movq %rdx, 0x98(%rsp)
movq (%rcx), %rdx
movq %rdx, 0xa8(%rsp)
jmp 0x518b8
testl %eax, %eax
setne 0x58(%rsp)
movq %rcx, 0x38(%rsp)
movq 0x8(%r15), %rax
movq %rax, 0x40(%rsp)
testq %rax, %rax
je 0x51bf7
movq 0x48707(%rip), %rcx     # 0x99fa8
cmpb $0x0, (%rcx)
je 0x51bf3
incl 0x8(%rax)
jmp 0x51bf7
movups (%rcx), %xmm0
movups %xmm0, (%rsi)
movq 0x8(%rax), %rdx
leaq 0x98(%rsp), %rdi
movq %rdx, 0x8(%rdi)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
movsbl (%r12,%r13), %r8d
movq 0x8(%rdi), %rsi
movl $0x1, %ecx
xorl %edx, %edx
callq 0xa550
leaq 0x108(%rsp), %r12
movq %r12, -0x10(%r12)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x5191d
movq %rdx, 0xf8(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x108(%rsp)
jmp 0x51925
movups (%rcx), %xmm0
movups %xmm0, (%r12)
movq 0x8(%rax), %rdx
leaq 0xf8(%rsp), %rdi
movq %rdx, 0x8(%rdi)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
leaq 0x2982d(%rip), %rsi     # 0x7b178
callq 0xa560
leaq 0x128(%rsp), %rbp
movq %rbp, -0x10(%rbp)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x51980
movq %rdx, 0x118(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x128(%rsp)
jmp 0x51987
movups (%rcx), %xmm0
movups %xmm0, (%rbp)
movq 0x8(%rax), %rdx
leaq 0x118(%rsp), %rdi
movq %rdx, 0x8(%rdi)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
movq 0x78(%rsp), %rsi
movq 0x80(%rsp), %rdx
callq 0xa110
leaq 0x68(%rsp), %r15
movq %r15, -0x10(%r15)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x519df
movq %rdx, 0x58(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x68(%rsp)
jmp 0x519e6
movups (%rcx), %xmm0
movups %xmm0, (%r15)
movq 0x8(%rax), %rdx
leaq 0x58(%rsp), %rdi
movq %rdx, 0x8(%rdi)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
leaq 0x2a861(%rip), %rsi     # 0x7c26a
callq 0xa560
leaq 0xc8(%rsp), %r13
movq %r13, -0x10(%r13)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x51a3e
movq %rdx, 0xb8(%rsp)
movq (%rcx), %rdx
movq %rdx, 0xc8(%rsp)
jmp 0x51a46
movups (%rcx), %xmm0
movups %xmm0, (%r13)
movq 0x8(%rax), %rdx
movq %rdx, 0xc0(%rsp)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
movq (%r14), %rax
movq %rax, 0x48(%rsp)
movq 0x8(%r14), %rax
movq %rax, 0x50(%rsp)
testq %rax, %rax
je 0x51b3d
movq 0x48526(%rip), %rcx     # 0x99fa8
cmpb $0x0, (%rcx)
je 0x51b39
incl 0x8(%rax)
jmp 0x51b3d
lock
incl 0x8(%rax)
movq (%r14), %rax
leaq 0x148(%rsp), %r14
movq %r14, -0x10(%r14)
movq (%rax), %rsi
movq 0x8(%rax), %rdx
addq %rsi, %rdx
leaq 0x138(%rsp), %rdi
callq 0xde0c
leaq 0x488bc(%rip), %rax     # 0x9a380
movq (%rax), %rcx
movq 0x8(%rax), %rax
movq %rcx, 0x8(%rsp)
movq %rax, 0x10(%rsp)
testq %rax, %rax
je 0x51aef
movq 0x484c7(%rip), %rcx     # 0x99fa8
cmpb $0x0, (%rcx)
je 0x51aeb
incl 0x8(%rax)
jmp 0x51aef
lock
incl 0x8(%rax)
leaq 0x58(%rsp), %rsi
leaq 0x18(%rsp), %rdx
leaq 0x138(%rsp), %rcx
leaq 0x8(%rsp), %r8
movq %rbx, %rdi
callq 0x6d80c
movq 0x10(%rsp), %rdi
testq %rdi, %rdi
je 0x51b1d
callq 0xdce4
movq 0x138(%rsp), %rdi
cmpq %r14, %rdi
je 0x51b2f
callq 0xa2b0
movq 0x20(%rsp), %rdi
jmp 0x51c94
lock
incl 0x8(%rax)
leaq 0x487cf(%rip), %rdi     # 0x9a313
leaq 0xb8(%rsp), %rsi
leaq 0x48(%rsp), %rcx
xorl %edx, %edx
callq 0x1fc46
movq 0x50(%rsp), %rdi
testq %rdi, %rdi
je 0x51b67
callq 0xdce4
movq 0xb8(%rsp), %rdi
cmpq %r13, %rdi
je 0x51b79
callq 0xa2b0
movq 0x58(%rsp), %rdi
cmpq %r15, %rdi
je 0x51b88
callq 0xa2b0
movq 0x118(%rsp), %rdi
cmpq %rbp, %rdi
leaq 0x88(%rsp), %rbp
je 0x51ba2
callq 0xa2b0
movq 0xf8(%rsp), %rdi
cmpq %r12, %rdi
je 0x51bb4
callq 0xa2b0
movq 0x98(%rsp), %rdi
leaq 0xa8(%rsp), %rax
cmpq %rax, %rdi
je 0x51bce
callq 0xa2b0
movq 0xd8(%rsp), %rdi
leaq 0xe8(%rsp), %rax
cmpq %rax, %rdi
je 0x51be8
callq 0xa2b0
xorps %xmm0, %xmm0
movups %xmm0, (%rbx)
jmp 0x51c9e
lock
incl 0x8(%rax)
movq (%r14), %rax
leaq 0x168(%rsp), %r14
movq %r14, -0x10(%r14)
movq (%rax), %rsi
movq 0x8(%rax), %rdx
addq %rsi, %rdx
leaq 0x158(%rsp), %rdi
callq 0xde0c
leaq 0x4875c(%rip), %rax     # 0x9a380
movq (%rax), %rcx
movq 0x8(%rax), %rax
movq %rcx, 0x28(%rsp)
movq %rax, 0x30(%rsp)
testq %rax, %rax
je 0x51c4f
movq 0x48367(%rip), %rcx     # 0x99fa8
cmpb $0x0, (%rcx)
je 0x51c4b
incl 0x8(%rax)
jmp 0x51c4f
lock
incl 0x8(%rax)
leaq 0x58(%rsp), %rsi
leaq 0x38(%rsp), %rdx
leaq 0x158(%rsp), %rcx
leaq 0x28(%rsp), %r8
movq %rbx, %rdi
callq 0x6d80c
movq 0x30(%rsp), %rdi
testq %rdi, %rdi
je 0x51c7d
callq 0xdce4
movq 0x158(%rsp), %rdi
cmpq %r14, %rdi
je 0x51c8f
callq 0xa2b0
movq 0x40(%rsp), %rdi
testq %rdi, %rdi
je 0x51c9e
callq 0xdce4
movq 0x78(%rsp), %rdi
cmpq %rbp, %rdi
je 0x51cad
callq 0xa2b0
movq %rbx, %rax
addq $0x178, %rsp            # imm = 0x178
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
movq 0x30(%rsp), %rdi
testq %rdi, %rdi
je 0x51cd4
callq 0xdce4
movq 0x158(%rsp), %rdi
cmpq %r14, %rdi
je 0x51ceb
callq 0xa2b0
jmp 0x51ceb
movq %rax, %rbx
movq 0x40(%rsp), %rdi
jmp 0x51dc9
movq %rax, %rbx
movq 0x50(%rsp), %rdi
testq %rdi, %rdi
je 0x51d07
callq 0xdce4
movq 0xb8(%rsp), %rdi
cmpq %r13, %rdi
je 0x51d1e
callq 0xa2b0
jmp 0x51d1e
movq %rax, %rbx
movq 0x58(%rsp), %rdi
cmpq %r15, %rdi
je 0x51d32
callq 0xa2b0
jmp 0x51d32
movq %rax, %rbx
movq 0x118(%rsp), %rdi
cmpq %rbp, %rdi
je 0x51d49
callq 0xa2b0
jmp 0x51d49
movq %rax, %rbx
movq 0xf8(%rsp), %rdi
cmpq %r12, %rdi
je 0x51d60
callq 0xa2b0
jmp 0x51d60
movq %rax, %rbx
movq 0x98(%rsp), %rdi
leaq 0xa8(%rsp), %rax
cmpq %rax, %rdi
je 0x51d7f
callq 0xa2b0
jmp 0x51d7f
movq %rax, %rbx
movq 0xd8(%rsp), %rdi
leaq 0xe8(%rsp), %rax
cmpq %rax, %rdi
je 0x51dd3
callq 0xa2b0
jmp 0x51dd3
movq %rax, %rbx
movq 0x10(%rsp), %rdi
testq %rdi, %rdi
je 0x51dad
callq 0xdce4
movq 0x138(%rsp), %rdi
cmpq %r14, %rdi
je 0x51dc4
callq 0xa2b0
jmp 0x51dc4
movq %rax, %rbx
movq 0x20(%rsp), %rdi
testq %rdi, %rdi
je 0x51dd3
callq 0xdce4
movq 0x78(%rsp), %rdi
leaq 0x88(%rsp), %rax
cmpq %rax, %rdi
je 0x51dea
callq 0xa2b0
movq %rbx, %rdi
callq 0xa510