// File: swxlion[P]swxJson/src/swxJsonParser.cpp
// Function: swxJson::JsonParser::processNumber()
JsonPtr processNumber()
	{
		int dot = 0;
		int e = 0;
		char *_start = _pos;
		while (*_pos != 0 && _numberChars[*_pos])
		{
			if (*_pos == '.')
				dot++;
			else if (*_pos == 'E' || *_pos == 'e')
				e++;

			_pos++;
		}

		if (_start == _pos)
		{
			if (strncasecmp(_pos, "nan", 3) == 0)
			{
				_pos += 3;
				JsonPtr node(new Json(NAN));
				return insertNode(node);
			}
			if (strncasecmp(_pos, "Infinity", 8) == 0)
			{
				_pos += 8;
				JsonPtr node(new Json(INFINITY));
				return insertNode(node);
			}
			if (strncasecmp(_pos, "inf", 3) == 0)
			{
				_pos += 3;
				JsonPtr node(new Json(INFINITY));
				return insertNode(node);
			}
			throw JSON_ERROR_MSG(JosnInvalidContentError, "Json parser: content error.");
		}

		if (e > 1)
			throw JSON_ERROR_MSG(JosnInvalidContentError, "Json parser: content error, invalid number.");

		bool realType = (dot > 0|| e > 0);
		double d = 0;
		intmax_t i = 0;
		uintmax_t u = 0;
		bool unsignedNumber = false;
		char *endptr = NULL;

		errno = 0;
		if (realType)
			d = strtod(_start, &endptr);
		else if (*_start == '-')
			i = strtoimax(_start, &endptr, 10);
		else
		{
			u = strtoumax(_start, &endptr, 10);
			i = (intmax_t)u;

			unsignedNumber = i < 0;
		}
		
		if (errno || endptr != _pos)
			throw JSON_ERROR_MSG(JosnInvalidContentError, "Json parser: content error, invalid number or huge number.");

		JsonPtr node;
		if (realType)
			node.reset(new Json(d));
		else if (unsignedNumber)
			node.reset(new Json(u));
		else
			node.reset(new Json(i));

		return insertNode(node);
	}

// Assembly:
subq $0x218, %rsp            # imm = 0x218
movq %rdi, 0xb0(%rsp)
movq %rdi, %rax
movq %rax, 0xb8(%rsp)
movq %rdi, 0x210(%rsp)
movq %rsi, 0x208(%rsp)
movq 0x208(%rsp), %rax
movq %rax, 0xc0(%rsp)
movl $0x0, 0x204(%rsp)
movl $0x0, 0x200(%rsp)
movq 0x12f0(%rax), %rax
movq %rax, 0x1f8(%rsp)
movq 0xc0(%rsp), %rax
movq 0x12f0(%rax), %rax
movsbl (%rax), %ecx
xorl %eax, %eax
cmpl $0x0, %ecx
movb %al, 0xaf(%rsp)
je 0x7d347
movq 0xc0(%rsp), %rax
movq %rax, %rdi
addq $0x1000, %rdi           # imm = 0x1000
movq 0x12f0(%rax), %rax
movzbl (%rax), %esi
callq 0x7e440
movb %al, 0xaf(%rsp)
movb 0xaf(%rsp), %al
testb $0x1, %al
jne 0x7d357
jmp 0x7d3e1
movq 0xc0(%rsp), %rax
movq 0x12f0(%rax), %rax
movsbl (%rax), %eax
cmpl $0x2e, %eax
jne 0x7d381
movl 0x204(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x204(%rsp)
jmp 0x7d3c2
movq 0xc0(%rsp), %rax
movq 0x12f0(%rax), %rax
movsbl (%rax), %eax
cmpl $0x45, %eax
je 0x7d3af
movq 0xc0(%rsp), %rax
movq 0x12f0(%rax), %rax
movsbl (%rax), %eax
cmpl $0x65, %eax
jne 0x7d3c0
movl 0x200(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x200(%rsp)
jmp 0x7d3c2
movq 0xc0(%rsp), %rax
movq 0x12f0(%rax), %rcx
addq $0x1, %rcx
movq %rcx, 0x12f0(%rax)
jmp 0x7d2ff
movq 0xc0(%rsp), %rcx
movq 0x1f8(%rsp), %rax
cmpq 0x12f0(%rcx), %rax
jne 0x7d892
movq 0xc0(%rsp), %rax
movq 0x12f0(%rax), %rdi
leaq 0x57ee(%rip), %rsi      # 0x82c02
movl $0x3, %edx
callq 0x4a410
cmpl $0x0, %eax
jne 0x7d53e
movq 0xc0(%rsp), %rax
movq 0x12f0(%rax), %rcx
addq $0x3, %rcx
movq %rcx, 0x12f0(%rax)
movl $0x10, %edi
callq 0x4a310
movq %rax, %rdi
movq %rdi, %rax
movq %rax, 0xa0(%rsp)
movsd 0x5647(%rip), %xmm0     # 0x82aa8
callq 0x73a00
jmp 0x7d468
movq 0xa0(%rsp), %rsi
leaq 0x1e8(%rsp), %rdi
movq %rdi, 0x90(%rsp)
callq 0x720a0
movq 0x90(%rsp), %rsi
leaq 0x1c8(%rsp), %rdi
movq %rdi, 0x98(%rsp)
callq 0x4e240
movq 0xb0(%rsp), %rdi
movq 0xc0(%rsp), %rsi
movq 0x98(%rsp), %rdx
callq 0x7d140
jmp 0x7d4c1
leaq 0x1c8(%rsp), %rdi
callq 0x4e270
leaq 0x1e8(%rsp), %rdi
callq 0x4e270
jmp 0x7ddaa
movq 0xa0(%rsp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x1e0(%rsp)
movl %eax, 0x1dc(%rsp)
movl $0x10, %esi
callq 0x4a320
jmp 0x7ddba
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x1e0(%rsp)
movl %eax, 0x1dc(%rsp)
leaq 0x1c8(%rsp), %rdi
callq 0x4e270
leaq 0x1e8(%rsp), %rdi
callq 0x4e270
jmp 0x7ddba
movq 0xc0(%rsp), %rax
movq 0x12f0(%rax), %rdi
leaq 0x56b2(%rip), %rsi      # 0x82c06
movl $0x8, %edx
callq 0x4a410
cmpl $0x0, %eax
jne 0x7d678
movq 0xc0(%rsp), %rax
movq 0x12f0(%rax), %rcx
addq $0x8, %rcx
movq %rcx, 0x12f0(%rax)
movl $0x10, %edi
callq 0x4a310
movq %rax, %rdi
movq %rdi, %rax
movq %rax, 0x88(%rsp)
movsd 0x54ff(%rip), %xmm0     # 0x82aa0
callq 0x73a00
jmp 0x7d5a8
movq 0x88(%rsp), %rsi
leaq 0x1b8(%rsp), %rdi
movq %rdi, 0x78(%rsp)
callq 0x720a0
movq 0x78(%rsp), %rsi
leaq 0x1a8(%rsp), %rdi
movq %rdi, 0x80(%rsp)
callq 0x4e240
movq 0xb0(%rsp), %rdi
movq 0xc0(%rsp), %rsi
movq 0x80(%rsp), %rdx
callq 0x7d140
jmp 0x7d5fb
leaq 0x1a8(%rsp), %rdi
callq 0x4e270
leaq 0x1b8(%rsp), %rdi
callq 0x4e270
jmp 0x7ddaa
movq 0x88(%rsp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x1e0(%rsp)
movl %eax, 0x1dc(%rsp)
movl $0x10, %esi
callq 0x4a320
jmp 0x7ddba
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x1e0(%rsp)
movl %eax, 0x1dc(%rsp)
leaq 0x1a8(%rsp), %rdi
callq 0x4e270
leaq 0x1b8(%rsp), %rdi
callq 0x4e270
jmp 0x7ddba
movq 0xc0(%rsp), %rax
movq 0x12f0(%rax), %rdi
leaq 0x5581(%rip), %rsi      # 0x82c0f
movl $0x3, %edx
callq 0x4a410
cmpl $0x0, %eax
jne 0x7d7a3
movq 0xc0(%rsp), %rax
movq 0x12f0(%rax), %rcx
addq $0x3, %rcx
movq %rcx, 0x12f0(%rax)
movl $0x10, %edi
callq 0x4a310
movq %rax, %rdi
movq %rdi, %rax
movq %rax, 0x70(%rsp)
movsd 0x53c8(%rip), %xmm0     # 0x82aa0
callq 0x73a00
jmp 0x7d6df
movq 0x70(%rsp), %rsi
leaq 0x198(%rsp), %rdi
movq %rdi, 0x60(%rsp)
callq 0x720a0
movq 0x60(%rsp), %rsi
leaq 0x188(%rsp), %rdi
movq %rdi, 0x68(%rsp)
callq 0x4e240
movq 0xb0(%rsp), %rdi
movq 0xc0(%rsp), %rsi
movq 0x68(%rsp), %rdx
callq 0x7d140
jmp 0x7d729
leaq 0x188(%rsp), %rdi
callq 0x4e270
leaq 0x198(%rsp), %rdi
callq 0x4e270
jmp 0x7ddaa
movq 0x70(%rsp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x1e0(%rsp)
movl %eax, 0x1dc(%rsp)
movl $0x10, %esi
callq 0x4a320
jmp 0x7ddba
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x1e0(%rsp)
movl %eax, 0x1dc(%rsp)
leaq 0x188(%rsp), %rdi
callq 0x4e270
leaq 0x198(%rsp), %rdi
callq 0x4e270
jmp 0x7ddba
movb $0x1, 0x166(%rsp)
movl $0x60, %edi
callq 0x4a160
movq %rax, 0x50(%rsp)
leaq 0x167(%rsp), %rdi
movq %rdi, 0x58(%rsp)
callq 0x4a530
movq 0x58(%rsp), %rdx
leaq 0x5349(%rip), %rsi      # 0x82b21
leaq 0x168(%rsp), %rdi
callq 0x4dcf0
jmp 0x7d7e7
movq 0x50(%rsp), %rdi
leaq 0x530d(%rip), %rsi      # 0x82b00
leaq 0x5419(%rip), %rdx      # 0x82c13
movl $0x1a7, %ecx            # imm = 0x1A7
leaq 0x168(%rsp), %r8
callq 0x7d0d0
jmp 0x7d80e
movq 0x50(%rsp), %rdi
movb $0x0, 0x166(%rsp)
leaq 0x1a536(%rip), %rsi     # 0x97d58
leaq -0x6f9(%rip), %rdx      # 0x7d130
callq 0x4a500
jmp 0x7ddc7
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x1e0(%rsp)
movl %eax, 0x1dc(%rsp)
jmp 0x7d86a
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x1e0(%rsp)
movl %eax, 0x1dc(%rsp)
leaq 0x168(%rsp), %rdi
callq 0x4a5b8
leaq 0x167(%rsp), %rdi
callq 0x4a390
testb $0x1, 0x166(%rsp)
jne 0x7d883
jmp 0x7d88d
movq 0x50(%rsp), %rdi
callq 0x4a220
jmp 0x7ddba
cmpl $0x1, 0x200(%rsp)
jle 0x7d98f
movb $0x1, 0x13e(%rsp)
movl $0x60, %edi
callq 0x4a160
movq %rax, 0x40(%rsp)
leaq 0x13f(%rsp), %rdi
movq %rdi, 0x48(%rsp)
callq 0x4a530
movq 0x48(%rsp), %rdx
leaq 0x534c(%rip), %rsi      # 0x82c21
leaq 0x140(%rsp), %rdi
callq 0x4dcf0
jmp 0x7d8e4
movq 0x40(%rsp), %rdi
leaq 0x5210(%rip), %rsi      # 0x82b00
leaq 0x531c(%rip), %rdx      # 0x82c13
movl $0x1ab, %ecx            # imm = 0x1AB
leaq 0x140(%rsp), %r8
callq 0x7d0d0
jmp 0x7d90b
movq 0x40(%rsp), %rdi
movb $0x0, 0x13e(%rsp)
leaq 0x1a439(%rip), %rsi     # 0x97d58
leaq -0x7f6(%rip), %rdx      # 0x7d130
callq 0x4a500
jmp 0x7ddc7
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x1e0(%rsp)
movl %eax, 0x1dc(%rsp)
jmp 0x7d967
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x1e0(%rsp)
movl %eax, 0x1dc(%rsp)
leaq 0x140(%rsp), %rdi
callq 0x4a5b8
leaq 0x13f(%rsp), %rdi
callq 0x4a390
testb $0x1, 0x13e(%rsp)
jne 0x7d980
jmp 0x7d98a
movq 0x40(%rsp), %rdi
callq 0x4a220
jmp 0x7ddba
movb $0x1, %al
cmpl $0x0, 0x204(%rsp)
movb %al, 0x3f(%rsp)
jg 0x7d9ae
cmpl $0x0, 0x200(%rsp)
setg %al
movb %al, 0x3f(%rsp)
movb 0x3f(%rsp), %al
andb $0x1, %al
movb %al, 0x13d(%rsp)
xorps %xmm0, %xmm0
movsd %xmm0, 0x130(%rsp)
movq $0x0, 0x128(%rsp)
movq $0x0, 0x120(%rsp)
movb $0x0, 0x11f(%rsp)
movq $0x0, 0x110(%rsp)
callq 0x4a050
movl $0x0, (%rax)
testb $0x1, 0x13d(%rsp)
je 0x7da28
movq 0x1f8(%rsp), %rdi
leaq 0x110(%rsp), %rsi
callq 0x4a250
movsd %xmm0, 0x130(%rsp)
jmp 0x7daa5
movq 0x1f8(%rsp), %rax
movsbl (%rax), %eax
cmpl $0x2d, %eax
jne 0x7da5c
movq 0x1f8(%rsp), %rdi
leaq 0x110(%rsp), %rsi
movl $0xa, %edx
callq 0x4a380
movq %rax, 0x128(%rsp)
jmp 0x7daa3
movq 0x1f8(%rsp), %rdi
leaq 0x110(%rsp), %rsi
movl $0xa, %edx
callq 0x4a2e0
movq %rax, 0x120(%rsp)
movq 0x120(%rsp), %rax
movq %rax, 0x128(%rsp)
cmpq $0x0, 0x128(%rsp)
setl %al
andb $0x1, %al
movb %al, 0x11f(%rsp)
jmp 0x7daa5
callq 0x4a050
cmpl $0x0, (%rax)
jne 0x7dacc
movq 0xc0(%rsp), %rcx
movq 0x110(%rsp), %rax
cmpq 0x12f0(%rcx), %rax
je 0x7dbbb
movb $0x1, 0xee(%rsp)
movl $0x60, %edi
callq 0x4a160
movq %rax, 0x28(%rsp)
leaq 0xef(%rsp), %rdi
movq %rdi, 0x30(%rsp)
callq 0x4a530
movq 0x30(%rsp), %rdx
leaq 0x514c(%rip), %rsi      # 0x82c4d
leaq 0xf0(%rsp), %rdi
callq 0x4dcf0
jmp 0x7db10
movq 0x28(%rsp), %rdi
leaq 0x4fe4(%rip), %rsi      # 0x82b00
leaq 0x50f0(%rip), %rdx      # 0x82c13
movl $0x1c2, %ecx            # imm = 0x1C2
leaq 0xf0(%rsp), %r8
callq 0x7d0d0
jmp 0x7db37
movq 0x28(%rsp), %rdi
movb $0x0, 0xee(%rsp)
leaq 0x1a20d(%rip), %rsi     # 0x97d58
leaq -0xa22(%rip), %rdx      # 0x7d130
callq 0x4a500
jmp 0x7ddc7
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x1e0(%rsp)
movl %eax, 0x1dc(%rsp)
jmp 0x7db93
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x1e0(%rsp)
movl %eax, 0x1dc(%rsp)
leaq 0xf0(%rsp), %rdi
callq 0x4a5b8
leaq 0xef(%rsp), %rdi
callq 0x4a390
testb $0x1, 0xee(%rsp)
jne 0x7dbac
jmp 0x7dbb6
movq 0x28(%rsp), %rdi
callq 0x4a220
jmp 0x7ddba
leaq 0xd8(%rsp), %rdi
callq 0x71fd0
testb $0x1, 0x13d(%rsp)
je 0x7dc56
movl $0x10, %edi
callq 0x4a310
movq %rax, 0x20(%rsp)
jmp 0x7dbe7
movq 0x20(%rsp), %rdi
movsd 0x130(%rsp), %xmm0
callq 0x73a00
jmp 0x7dbfc
movq 0x20(%rsp), %rsi
leaq 0xd8(%rsp), %rdi
callq 0x7e460
jmp 0x7dc10
jmp 0x7dd28
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x1e0(%rsp)
movl %eax, 0x1dc(%rsp)
jmp 0x7dd9b
movq 0x20(%rsp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x1e0(%rsp)
movl %eax, 0x1dc(%rsp)
movl $0x10, %esi
callq 0x4a320
jmp 0x7dd9b
testb $0x1, 0x11f(%rsp)
je 0x7dcc6
movl $0x10, %edi
callq 0x4a310
movq %rax, 0x18(%rsp)
jmp 0x7dc71
movq 0x18(%rsp), %rdi
movq 0x120(%rsp), %rsi
callq 0x73a90
jmp 0x7dc85
movq 0x18(%rsp), %rsi
leaq 0xd8(%rsp), %rdi
callq 0x7e460
jmp 0x7dc99
jmp 0x7dd26
movq 0x18(%rsp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x1e0(%rsp)
movl %eax, 0x1dc(%rsp)
movl $0x10, %esi
callq 0x4a320
jmp 0x7dd9b
movl $0x10, %edi
callq 0x4a310
movq %rax, 0x10(%rsp)
jmp 0x7dcd7
movq 0x10(%rsp), %rdi
movq 0x128(%rsp), %rsi
callq 0x73a50
jmp 0x7dceb
movq 0x10(%rsp), %rsi
leaq 0xd8(%rsp), %rdi
callq 0x7e460
jmp 0x7dcff
jmp 0x7dd26
movq 0x10(%rsp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x1e0(%rsp)
movl %eax, 0x1dc(%rsp)
movl $0x10, %esi
callq 0x4a320
jmp 0x7dd9b
jmp 0x7dd28
leaq 0xc8(%rsp), %rdi
movq %rdi, 0x8(%rsp)
leaq 0xd8(%rsp), %rsi
callq 0x4e240
movq 0xb0(%rsp), %rdi
movq 0xc0(%rsp), %rsi
movq 0x8(%rsp), %rdx
callq 0x7d140
jmp 0x7dd5e
leaq 0xc8(%rsp), %rdi
callq 0x4e270
leaq 0xd8(%rsp), %rdi
callq 0x4e270
jmp 0x7ddaa
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x1e0(%rsp)
movl %eax, 0x1dc(%rsp)
leaq 0xc8(%rsp), %rdi
callq 0x4e270
leaq 0xd8(%rsp), %rdi
callq 0x4e270
jmp 0x7ddba
movq 0xb8(%rsp), %rax
addq $0x218, %rsp            # imm = 0x218
retq
movq 0x1e0(%rsp), %rdi
callq 0x4a520
nopw (%rax,%rax)