// File: /workspace/github_cpp_makefile_star2_O1/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 0xdde2
movq 0x8(%r12), %rcx
testq %rcx, %rcx
je 0x50a45
movq 0x78(%rsp), %r12
xorl %r13d, %r13d
xorl %eax, %eax
movzbl (%r12,%r13), %edx
leal -0x3a(%rdx), %esi
cmpb $-0xb, %sil
jbe 0x50a8d
leal (%rax,%rax,4), %eax
leal (%rdx,%rax,2), %eax
addl $-0x30, %eax
incq %r13
cmpq %r13, %rcx
jne 0x50a24
jmp 0x50a47
xorl %eax, %eax
movq (%r15), %rcx
leaq 0x489cf(%rip), %rdx     # 0x99420
cmpq (%rdx), %rcx
je 0x50ae8
movl %eax, 0x58(%rsp)
movq %rcx, 0x18(%rsp)
movq 0x8(%r15), %rax
movq %rax, 0x20(%rsp)
testq %rax, %rax
je 0x50d03
movq 0x4852c(%rip), %rcx     # 0x98fa8
cmpb $0x0, (%rcx)
je 0x50cff
incl 0x8(%rax)
jmp 0x50d03
leaq 0xe8(%rsp), %rax
movq %rax, -0x10(%rax)
movq $0x0, -0x8(%rax)
movb $0x0, (%rax)
leaq 0x296fd(%rip), %rsi     # 0x7a1a8
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 0x50b1e
movq %rdx, 0x98(%rsp)
movq (%rcx), %rdx
movq %rdx, 0xa8(%rsp)
jmp 0x50b24
testl %eax, %eax
setne 0x58(%rsp)
movq %rcx, 0x38(%rsp)
movq 0x8(%r15), %rax
movq %rax, 0x40(%rsp)
testq %rax, %rax
je 0x50e63
movq 0x4849b(%rip), %rcx     # 0x98fa8
cmpb $0x0, (%rcx)
je 0x50e5f
incl 0x8(%rax)
jmp 0x50e63
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 0x50b89
movq %rdx, 0xf8(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x108(%rsp)
jmp 0x50b91
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 0x29601(%rip), %rsi     # 0x7a1b8
callq 0xa560
leaq 0x128(%rsp), %rbp
movq %rbp, -0x10(%rbp)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x50bec
movq %rdx, 0x118(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x128(%rsp)
jmp 0x50bf3
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 0x50c4b
movq %rdx, 0x58(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x68(%rsp)
jmp 0x50c52
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 0x2a635(%rip), %rsi     # 0x7b2aa
callq 0xa560
leaq 0xc8(%rsp), %r13
movq %r13, -0x10(%r13)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x50caa
movq %rdx, 0xb8(%rsp)
movq (%rcx), %rdx
movq %rdx, 0xc8(%rsp)
jmp 0x50cb2
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 0x50da9
movq 0x482ba(%rip), %rcx     # 0x98fa8
cmpb $0x0, (%rcx)
je 0x50da5
incl 0x8(%rax)
jmp 0x50da9
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 0xdde2
leaq 0x48650(%rip), %rax     # 0x99380
movq (%rax), %rcx
movq 0x8(%rax), %rax
movq %rcx, 0x8(%rsp)
movq %rax, 0x10(%rsp)
testq %rax, %rax
je 0x50d5b
movq 0x4825b(%rip), %rcx     # 0x98fa8
cmpb $0x0, (%rcx)
je 0x50d57
incl 0x8(%rax)
jmp 0x50d5b
lock
incl 0x8(%rax)
leaq 0x58(%rsp), %rsi
leaq 0x18(%rsp), %rdx
leaq 0x138(%rsp), %rcx
leaq 0x8(%rsp), %r8
movq %rbx, %rdi
callq 0x6c8d8
movq 0x10(%rsp), %rdi
testq %rdi, %rdi
je 0x50d89
callq 0xdcba
movq 0x138(%rsp), %rdi
cmpq %r14, %rdi
je 0x50d9b
callq 0xa2b0
movq 0x20(%rsp), %rdi
jmp 0x50f00
lock
incl 0x8(%rax)
leaq 0x48563(%rip), %rdi     # 0x99313
leaq 0xb8(%rsp), %rsi
leaq 0x48(%rsp), %rcx
xorl %edx, %edx
callq 0x1f926
movq 0x50(%rsp), %rdi
testq %rdi, %rdi
je 0x50dd3
callq 0xdcba
movq 0xb8(%rsp), %rdi
cmpq %r13, %rdi
je 0x50de5
callq 0xa2b0
movq 0x58(%rsp), %rdi
cmpq %r15, %rdi
je 0x50df4
callq 0xa2b0
movq 0x118(%rsp), %rdi
cmpq %rbp, %rdi
leaq 0x88(%rsp), %rbp
je 0x50e0e
callq 0xa2b0
movq 0xf8(%rsp), %rdi
cmpq %r12, %rdi
je 0x50e20
callq 0xa2b0
movq 0x98(%rsp), %rdi
leaq 0xa8(%rsp), %rax
cmpq %rax, %rdi
je 0x50e3a
callq 0xa2b0
movq 0xd8(%rsp), %rdi
leaq 0xe8(%rsp), %rax
cmpq %rax, %rdi
je 0x50e54
callq 0xa2b0
xorps %xmm0, %xmm0
movups %xmm0, (%rbx)
jmp 0x50f0a
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 0xdde2
leaq 0x484f0(%rip), %rax     # 0x99380
movq (%rax), %rcx
movq 0x8(%rax), %rax
movq %rcx, 0x28(%rsp)
movq %rax, 0x30(%rsp)
testq %rax, %rax
je 0x50ebb
movq 0x480fb(%rip), %rcx     # 0x98fa8
cmpb $0x0, (%rcx)
je 0x50eb7
incl 0x8(%rax)
jmp 0x50ebb
lock
incl 0x8(%rax)
leaq 0x58(%rsp), %rsi
leaq 0x38(%rsp), %rdx
leaq 0x158(%rsp), %rcx
leaq 0x28(%rsp), %r8
movq %rbx, %rdi
callq 0x6c8d8
movq 0x30(%rsp), %rdi
testq %rdi, %rdi
je 0x50ee9
callq 0xdcba
movq 0x158(%rsp), %rdi
cmpq %r14, %rdi
je 0x50efb
callq 0xa2b0
movq 0x40(%rsp), %rdi
testq %rdi, %rdi
je 0x50f0a
callq 0xdcba
movq 0x78(%rsp), %rdi
cmpq %rbp, %rdi
je 0x50f19
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 0x50f40
callq 0xdcba
movq 0x158(%rsp), %rdi
cmpq %r14, %rdi
je 0x50f57
callq 0xa2b0
jmp 0x50f57
movq %rax, %rbx
movq 0x40(%rsp), %rdi
jmp 0x51035
movq %rax, %rbx
movq 0x50(%rsp), %rdi
testq %rdi, %rdi
je 0x50f73
callq 0xdcba
movq 0xb8(%rsp), %rdi
cmpq %r13, %rdi
je 0x50f8a
callq 0xa2b0
jmp 0x50f8a
movq %rax, %rbx
movq 0x58(%rsp), %rdi
cmpq %r15, %rdi
je 0x50f9e
callq 0xa2b0
jmp 0x50f9e
movq %rax, %rbx
movq 0x118(%rsp), %rdi
cmpq %rbp, %rdi
je 0x50fb5
callq 0xa2b0
jmp 0x50fb5
movq %rax, %rbx
movq 0xf8(%rsp), %rdi
cmpq %r12, %rdi
je 0x50fcc
callq 0xa2b0
jmp 0x50fcc
movq %rax, %rbx
movq 0x98(%rsp), %rdi
leaq 0xa8(%rsp), %rax
cmpq %rax, %rdi
je 0x50feb
callq 0xa2b0
jmp 0x50feb
movq %rax, %rbx
movq 0xd8(%rsp), %rdi
leaq 0xe8(%rsp), %rax
cmpq %rax, %rdi
je 0x5103f
callq 0xa2b0
jmp 0x5103f
movq %rax, %rbx
movq 0x10(%rsp), %rdi
testq %rdi, %rdi
je 0x51019
callq 0xdcba
movq 0x138(%rsp), %rdi
cmpq %r14, %rdi
je 0x51030
callq 0xa2b0
jmp 0x51030
movq %rax, %rbx
movq 0x20(%rsp), %rdi
testq %rdi, %rdi
je 0x5103f
callq 0xdcba
movq 0x78(%rsp), %rdi
leaq 0x88(%rsp), %rax
cmpq %rax, %rdi
je 0x51056
callq 0xa2b0
movq %rbx, %rdi
callq 0xa510