// File: Nallantli[P]Rossa/main/rossa/node_parser/node_parser.cpp
// Function: node_parser_t::parseNumNode(std::vector<node_scope_t, std::allocator<node_scope_t>>*)
ptr_node_t node_parser_t::parseNumNode(std::vector<node_scope_t> *scopes)
{
	number_t numValue;
	std::string numStr = currentToken.valueString;
	if (numStr.size() > 2 && isalpha(currentToken.valueString[1]))
	{
		switch (numStr[1])
		{
		case 'b':
		case 'B':
			numValue = number_t::Long(std::stoll(numStr.substr(2), nullptr, 2));
			break;
		default:
			numValue = number_t::Long(std::stoll(numStr, nullptr, 0));
			break;
		}
	}
	else if (numStr == "inf")
	{
		numValue = number_t::Double(INFINITY);
	}
	else if (numStr == "nan")
	{
		numValue = number_t::Double(NAN);
	}
	else if (numStr.find('.') != std::string::npos)
	{
		numValue = number_t::Double(std::stod(numStr));
	}
	else if (numStr.length() == 1 && !isdigit(numStr[0]))
	{
		numValue = number_t::Long(static_cast<unsigned char>(numStr[0]));
	}
	else
	{
		numValue = number_t::Long(std::stoll(numStr, nullptr, 10));
	}
	const ptr_node_t n = std::make_shared<ContainerNode>(*scopes, symbol_t::Number(numValue), currentToken);
	nextToken();
	return n;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x230, %rsp            # imm = 0x230
movq %rdi, -0x1d0(%rbp)
movq %rdi, %rax
movq %rax, -0x1c8(%rbp)
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x1c0(%rbp)
leaq -0x28(%rbp), %rdi
callq 0x9c4f0
movq -0x1c0(%rbp), %rsi
addq $0x58, %rsi
addq $0x58, %rsi
leaq -0x48(%rbp), %rdi
callq 0x11250
leaq -0x48(%rbp), %rdi
callq 0x113e0
cmpq $0x2, %rax
jbe 0x39287
movq -0x1c0(%rbp), %rdi
addq $0xb0, %rdi
movl $0x1, %esi
callq 0x11ac0
movq %rax, -0x1d8(%rbp)
jmp 0x39118
movq -0x1d8(%rbp), %rax
movsbl (%rax), %edi
callq 0x118e0
cmpl $0x0, %eax
je 0x39287
leaq -0x48(%rbp), %rdi
movl $0x1, %esi
callq 0x11ac0
movq %rax, -0x1e0(%rbp)
jmp 0x39147
movq -0x1e0(%rbp), %rax
movsbl (%rax), %eax
orl $0x20, %eax
subl $0x62, %eax
je 0x3916f
jmp 0x3921b
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x50(%rbp)
movl %eax, -0x54(%rbp)
jmp 0x3961b
leaq -0x90(%rbp), %rdi
leaq -0x48(%rbp), %rsi
movl $0x2, %edx
movq $-0x1, %rcx
callq 0x115b0
jmp 0x3918d
xorl %eax, %eax
movl %eax, %esi
leaq -0x90(%rbp), %rdi
movl $0x2, %edx
callq 0x570a0
movq %rax, -0x1e8(%rbp)
jmp 0x391ab
movq -0x1e8(%rbp), %rax
movq %rax, -0x70(%rbp)
leaq -0x70(%rbp), %rdi
callq 0x9c540
movl %edx, -0x98(%rbp)
movq %rax, -0xa0(%rbp)
movq -0xa0(%rbp), %rax
movq %rax, -0x68(%rbp)
movl -0x98(%rbp), %eax
movl %eax, -0x60(%rbp)
leaq -0x28(%rbp), %rdi
leaq -0x68(%rbp), %rsi
callq 0x9c570
leaq -0x90(%rbp), %rdi
callq 0x11360
jmp 0x39282
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x50(%rbp)
movl %eax, -0x54(%rbp)
leaq -0x90(%rbp), %rdi
callq 0x11360
jmp 0x3961b
xorl %edx, %edx
movl %edx, %esi
leaq -0x48(%rbp), %rdi
callq 0x570a0
movq %rax, -0x1f0(%rbp)
jmp 0x39231
movq -0x1f0(%rbp), %rax
movq %rax, -0xb8(%rbp)
leaq -0xb8(%rbp), %rdi
callq 0x9c540
movl %edx, -0xc0(%rbp)
movq %rax, -0xc8(%rbp)
movq -0xc8(%rbp), %rax
movq %rax, -0xb0(%rbp)
movl -0xc0(%rbp), %eax
movl %eax, -0xa8(%rbp)
leaq -0x28(%rbp), %rdi
leaq -0xb0(%rbp), %rsi
callq 0x9c570
jmp 0x39525
leaq 0x1175d4(%rip), %rsi    # 0x150862
leaq -0x48(%rbp), %rdi
callq 0x24630
movb %al, -0x1f1(%rbp)
jmp 0x3929f
movb -0x1f1(%rbp), %al
testb $0x1, %al
jne 0x392ab
jmp 0x39304
movabsq $0x7ff0000000000000, %rax # imm = 0x7FF0000000000000
movq %rax, -0xe0(%rbp)
leaq -0xe0(%rbp), %rdi
callq 0x9c510
movl %edx, -0xe8(%rbp)
movq %rax, -0xf0(%rbp)
movq -0xf0(%rbp), %rax
movq %rax, -0xd8(%rbp)
movl -0xe8(%rbp), %eax
movl %eax, -0xd0(%rbp)
leaq -0x28(%rbp), %rdi
leaq -0xd8(%rbp), %rsi
callq 0x9c570
jmp 0x39523
leaq 0x11755b(%rip), %rsi    # 0x150866
leaq -0x48(%rbp), %rdi
callq 0x24630
movb %al, -0x1f2(%rbp)
jmp 0x3931c
movb -0x1f2(%rbp), %al
testb $0x1, %al
jne 0x39328
jmp 0x39381
movabsq $0x7ff8000000000000, %rax # imm = 0x7FF8000000000000
movq %rax, -0x108(%rbp)
leaq -0x108(%rbp), %rdi
callq 0x9c510
movl %edx, -0x110(%rbp)
movq %rax, -0x118(%rbp)
movq -0x118(%rbp), %rax
movq %rax, -0x100(%rbp)
movl -0x110(%rbp), %eax
movl %eax, -0xf8(%rbp)
leaq -0x28(%rbp), %rdi
leaq -0x100(%rbp), %rsi
callq 0x9c570
jmp 0x39521
leaq -0x48(%rbp), %rdi
movl $0x2e, %esi
xorl %eax, %eax
movl %eax, %edx
callq 0x11780
cmpq $-0x1, %rax
je 0x39408
xorl %eax, %eax
movl %eax, %esi
leaq -0x48(%rbp), %rdi
callq 0x570e0
movsd %xmm0, -0x200(%rbp)
jmp 0x393b0
movsd -0x200(%rbp), %xmm0
movsd %xmm0, -0x130(%rbp)
leaq -0x130(%rbp), %rdi
callq 0x9c510
movl %edx, -0x138(%rbp)
movq %rax, -0x140(%rbp)
movq -0x140(%rbp), %rax
movq %rax, -0x128(%rbp)
movl -0x138(%rbp), %eax
movl %eax, -0x120(%rbp)
leaq -0x28(%rbp), %rdi
leaq -0x128(%rbp), %rsi
callq 0x9c570
jmp 0x3951f
leaq -0x48(%rbp), %rdi
callq 0x11840
cmpq $0x1, %rax
jne 0x394b1
xorl %eax, %eax
movl %eax, %esi
leaq -0x48(%rbp), %rdi
callq 0x11ac0
movq %rax, -0x208(%rbp)
jmp 0x39431
movq -0x208(%rbp), %rax
movsbl (%rax), %edi
callq 0x114f0
cmpl $0x0, %eax
jne 0x394b1
xorl %eax, %eax
movl %eax, %esi
leaq -0x48(%rbp), %rdi
callq 0x11ac0
movq %rax, -0x210(%rbp)
jmp 0x3945b
movq -0x210(%rbp), %rax
movzbl (%rax), %eax
movq %rax, -0x158(%rbp)
leaq -0x158(%rbp), %rdi
callq 0x9c540
movl %edx, -0x160(%rbp)
movq %rax, -0x168(%rbp)
movq -0x168(%rbp), %rax
movq %rax, -0x150(%rbp)
movl -0x160(%rbp), %eax
movl %eax, -0x148(%rbp)
leaq -0x28(%rbp), %rdi
leaq -0x150(%rbp), %rsi
callq 0x9c570
jmp 0x3951d
xorl %eax, %eax
movl %eax, %esi
leaq -0x48(%rbp), %rdi
movl $0xa, %edx
callq 0x570a0
movq %rax, -0x218(%rbp)
jmp 0x394cc
movq -0x218(%rbp), %rax
movq %rax, -0x180(%rbp)
leaq -0x180(%rbp), %rdi
callq 0x9c540
movl %edx, -0x188(%rbp)
movq %rax, -0x190(%rbp)
movq -0x190(%rbp), %rax
movq %rax, -0x178(%rbp)
movl -0x188(%rbp), %eax
movl %eax, -0x170(%rbp)
leaq -0x28(%rbp), %rdi
leaq -0x178(%rbp), %rsi
callq 0x9c570
jmp 0x3951f
jmp 0x39521
jmp 0x39523
jmp 0x39525
movb $0x0, -0x191(%rbp)
movq -0x18(%rbp), %rax
movq %rax, -0x220(%rbp)
leaq -0x1b8(%rbp), %rdi
leaq -0x28(%rbp), %rsi
callq 0x86bf0
jmp 0x39549
movq -0x220(%rbp), %rsi
movq -0x1c0(%rbp), %rcx
addq $0x58, %rcx
leaq -0x1a8(%rbp), %rdi
leaq -0x1b8(%rbp), %rdx
callq 0x57120
jmp 0x39570
movq -0x1d0(%rbp), %rdi
leaq -0x1a8(%rbp), %rsi
movq %rsi, -0x228(%rbp)
callq 0x571a0
movq -0x228(%rbp), %rdi
callq 0x571d0
leaq -0x1b8(%rbp), %rdi
callq 0x86dc0
movq -0x1c0(%rbp), %rdi
callq 0x38fd0
jmp 0x395b0
movb $0x1, -0x191(%rbp)
testb $0x1, -0x191(%rbp)
jne 0x39602
jmp 0x395f6
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x50(%rbp)
movl %eax, -0x54(%rbp)
leaq -0x1b8(%rbp), %rdi
callq 0x86dc0
jmp 0x3961b
movq -0x1d0(%rbp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x50(%rbp)
movl %eax, -0x54(%rbp)
callq 0x24b20
jmp 0x3961b
movq -0x1d0(%rbp), %rdi
callq 0x24b20
leaq -0x48(%rbp), %rdi
callq 0x11360
movq -0x1c8(%rbp), %rax
addq $0x230, %rsp            # imm = 0x230
popq %rbp
retq
leaq -0x48(%rbp), %rdi
callq 0x11360
movq -0x50(%rbp), %rdi
callq 0x119c0
nopl (%rax)