// File: Konano[P]UselessDatabase/./json.hpp
// Function: nlohmann::detail::lexer<nlohmann::basic_json<std::map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::adl_serializer>>::scan_number()
token_type scan_number()  // lgtm [cpp/use-of-goto]
    {
        // reset token_buffer to store the number's bytes
        reset();

        // the type of the parsed number; initially set to unsigned; will be
        // changed if minus sign, decimal point or exponent is read
        token_type number_type = token_type::value_unsigned;

        // state (init): we just found out we need to scan a number
        switch (current)
        {
            case '-':
            {
                add(current);
                goto scan_number_minus;
            }

            case '0':
            {
                add(current);
                goto scan_number_zero;
            }

            case '1':
            case '2':
            case '3':
            case '4':
            case '5':
            case '6':
            case '7':
            case '8':
            case '9':
            {
                add(current);
                goto scan_number_any1;
            }

            // all other characters are rejected outside scan_number()
            default:            // LCOV_EXCL_LINE
                assert(false);  // LCOV_EXCL_LINE
        }

scan_number_minus:
        // state: we just parsed a leading minus sign
        number_type = token_type::value_integer;
        switch (get())
        {
            case '0':
            {
                add(current);
                goto scan_number_zero;
            }

            case '1':
            case '2':
            case '3':
            case '4':
            case '5':
            case '6':
            case '7':
            case '8':
            case '9':
            {
                add(current);
                goto scan_number_any1;
            }

            default:
            {
                error_message = "invalid number; expected digit after '-'";
                return token_type::parse_error;
            }
        }

scan_number_zero:
        // state: we just parse a zero (maybe with a leading minus sign)
        switch (get())
        {
            case '.':
            {
                add(decimal_point_char);
                goto scan_number_decimal1;
            }

            case 'e':
            case 'E':
            {
                add(current);
                goto scan_number_exponent;
            }

            default:
                goto scan_number_done;
        }

scan_number_any1:
        // state: we just parsed a number 0-9 (maybe with a leading minus sign)
        switch (get())
        {
            case '0':
            case '1':
            case '2':
            case '3':
            case '4':
            case '5':
            case '6':
            case '7':
            case '8':
            case '9':
            {
                add(current);
                goto scan_number_any1;
            }

            case '.':
            {
                add(decimal_point_char);
                goto scan_number_decimal1;
            }

            case 'e':
            case 'E':
            {
                add(current);
                goto scan_number_exponent;
            }

            default:
                goto scan_number_done;
        }

scan_number_decimal1:
        // state: we just parsed a decimal point
        number_type = token_type::value_float;
        switch (get())
        {
            case '0':
            case '1':
            case '2':
            case '3':
            case '4':
            case '5':
            case '6':
            case '7':
            case '8':
            case '9':
            {
                add(current);
                goto scan_number_decimal2;
            }

            default:
            {
                error_message = "invalid number; expected digit after '.'";
                return token_type::parse_error;
            }
        }

scan_number_decimal2:
        // we just parsed at least one number after a decimal point
        switch (get())
        {
            case '0':
            case '1':
            case '2':
            case '3':
            case '4':
            case '5':
            case '6':
            case '7':
            case '8':
            case '9':
            {
                add(current);
                goto scan_number_decimal2;
            }

            case 'e':
            case 'E':
            {
                add(current);
                goto scan_number_exponent;
            }

            default:
                goto scan_number_done;
        }

scan_number_exponent:
        // we just parsed an exponent
        number_type = token_type::value_float;
        switch (get())
        {
            case '+':
            case '-':
            {
                add(current);
                goto scan_number_sign;
            }

            case '0':
            case '1':
            case '2':
            case '3':
            case '4':
            case '5':
            case '6':
            case '7':
            case '8':
            case '9':
            {
                add(current);
                goto scan_number_any2;
            }

            default:
            {
                error_message =
                    "invalid number; expected '+', '-', or digit after exponent";
                return token_type::parse_error;
            }
        }

scan_number_sign:
        // we just parsed an exponent sign
        switch (get())
        {
            case '0':
            case '1':
            case '2':
            case '3':
            case '4':
            case '5':
            case '6':
            case '7':
            case '8':
            case '9':
            {
                add(current);
                goto scan_number_any2;
            }

            default:
            {
                error_message = "invalid number; expected digit after exponent sign";
                return token_type::parse_error;
            }
        }

scan_number_any2:
        // we just parsed a number after the exponent or exponent sign
        switch (get())
        {
            case '0':
            case '1':
            case '2':
            case '3':
            case '4':
            case '5':
            case '6':
            case '7':
            case '8':
            case '9':
            {
                add(current);
                goto scan_number_any2;
            }

            default:
                goto scan_number_done;
        }

scan_number_done:
        // unget the character after the number (we only read it to know that
        // we are done scanning a number)
        unget();

        char* endptr = nullptr;
        errno = 0;

        // try to parse integers first and fall back to floats
        if (number_type == token_type::value_unsigned)
        {
            const auto x = std::strtoull(token_buffer.data(), &endptr, 10);

            // we checked the number format before
            assert(endptr == token_buffer.data() + token_buffer.size());

            if (errno == 0)
            {
                value_unsigned = static_cast<number_unsigned_t>(x);
                if (value_unsigned == x)
                {
                    return token_type::value_unsigned;
                }
            }
        }
        else if (number_type == token_type::value_integer)
        {
            const auto x = std::strtoll(token_buffer.data(), &endptr, 10);

            // we checked the number format before
            assert(endptr == token_buffer.data() + token_buffer.size());

            if (errno == 0)
            {
                value_integer = static_cast<number_integer_t>(x);
                if (value_integer == x)
                {
                    return token_type::value_integer;
                }
            }
        }

        // this code is reached if we parse a floating-point number or if an
        // integer conversion above failed
        strtof(value_float, token_buffer.data(), &endptr);

        // we checked the number format before
        assert(endptr == token_buffer.data() + token_buffer.size());

        return token_type::value_float;
    }

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x90, %rsp
movq %rdi, -0x10(%rbp)
movq -0x10(%rbp), %rdi
movq %rdi, -0x40(%rbp)
callq 0x23110
movq -0x40(%rbp), %rax
movl $0x5, -0x14(%rbp)
movl 0x10(%rax), %eax
movl %eax, -0x34(%rbp)
subl $0x2d, %eax
je 0x220bb
jmp 0x220a4
movl -0x34(%rbp), %eax
subl $0x30, %eax
je 0x220c9
jmp 0x220ae
movl -0x34(%rbp), %eax
addl $-0x31, %eax
subl $0x9, %eax
jb 0x220da
jmp 0x220eb
movq -0x40(%rbp), %rdi
movl 0x10(%rdi), %esi
callq 0x23170
jmp 0x2210a
movq -0x40(%rbp), %rdi
movl 0x10(%rdi), %esi
callq 0x23170
jmp 0x2216a
movq -0x40(%rbp), %rdi
movl 0x10(%rdi), %esi
callq 0x23170
jmp 0x221bb
leaq 0x5cb72(%rip), %rdi     # 0x7ec64
leaq 0x5ca48(%rip), %rsi     # 0x7eb41
movl $0x1f71, %edx           # imm = 0x1F71
leaq 0x5f2c9(%rip), %rcx     # 0x813ce
callq 0x6350
movq -0x40(%rbp), %rdi
movl $0x6, -0x14(%rbp)
callq 0x21310
movl %eax, %ecx
movl %ecx, -0x44(%rbp)
subl $0x30, %eax
je 0x22133
jmp 0x22126
movl -0x44(%rbp), %eax
addl $-0x31, %eax
subl $0x9, %eax
jb 0x22141
jmp 0x2214f
movq -0x40(%rbp), %rdi
movl 0x10(%rdi), %esi
callq 0x23170
jmp 0x2216a
movq -0x40(%rbp), %rdi
movl 0x10(%rdi), %esi
callq 0x23170
jmp 0x221bb
movq -0x40(%rbp), %rax
leaq 0x5f2e7(%rip), %rcx     # 0x81441
movq %rcx, 0x68(%rax)
movl $0xe, -0x4(%rbp)
jmp 0x2259b
movq -0x40(%rbp), %rdi
callq 0x21310
movl %eax, %ecx
movl %ecx, -0x48(%rbp)
subl $0x2e, %eax
je 0x22193
jmp 0x2217f
movl -0x48(%rbp), %eax
subl $0x45, %eax
je 0x221a5
jmp 0x22189
movl -0x48(%rbp), %eax
subl $0x65, %eax
je 0x221a5
jmp 0x221b6
movq -0x40(%rbp), %rdi
movsbl 0x88(%rdi), %esi
callq 0x23170
jmp 0x2221c
movq -0x40(%rbp), %rdi
movl 0x10(%rdi), %esi
callq 0x23170
jmp 0x222ae
jmp 0x22377
movq -0x40(%rbp), %rdi
callq 0x21310
addl $-0x2e, %eax
movl %eax, %ecx
movq %rcx, -0x50(%rbp)
subl $0x37, %eax
ja 0x22217
movq -0x50(%rbp), %rax
leaq 0x5c66f(%rip), %rcx     # 0x7e84c
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movq -0x40(%rbp), %rdi
movl 0x10(%rdi), %esi
callq 0x23170
jmp 0x221bb
movq -0x40(%rbp), %rdi
movsbl 0x88(%rdi), %esi
callq 0x23170
jmp 0x2221c
movq -0x40(%rbp), %rdi
movl 0x10(%rdi), %esi
callq 0x23170
jmp 0x222ae
jmp 0x22377
movq -0x40(%rbp), %rdi
movl $0x7, -0x14(%rbp)
callq 0x21310
addl $-0x30, %eax
subl $0x9, %eax
ja 0x22244
jmp 0x22236
movq -0x40(%rbp), %rdi
movl 0x10(%rdi), %esi
callq 0x23170
jmp 0x2225f
movq -0x40(%rbp), %rax
leaq 0x5f21b(%rip), %rcx     # 0x8146a
movq %rcx, 0x68(%rax)
movl $0xe, -0x4(%rbp)
jmp 0x2259b
movq -0x40(%rbp), %rdi
callq 0x21310
movl %eax, %ecx
movl %ecx, %eax
addl $-0x30, %eax
movl %ecx, -0x54(%rbp)
subl $0xa, %eax
jb 0x2228d
jmp 0x22279
movl -0x54(%rbp), %eax
subl $0x45, %eax
je 0x2229b
jmp 0x22283
movl -0x54(%rbp), %eax
subl $0x65, %eax
je 0x2229b
jmp 0x222a9
movq -0x40(%rbp), %rdi
movl 0x10(%rdi), %esi
callq 0x23170
jmp 0x2225f
movq -0x40(%rbp), %rdi
movl 0x10(%rdi), %esi
callq 0x23170
jmp 0x222ae
jmp 0x22377
movq -0x40(%rbp), %rdi
movl $0x7, -0x14(%rbp)
callq 0x21310
movl %eax, %ecx
movl %ecx, -0x58(%rbp)
subl $0x2b, %eax
je 0x222e1
jmp 0x222ca
movl -0x58(%rbp), %eax
subl $0x2d, %eax
je 0x222e1
jmp 0x222d4
movl -0x58(%rbp), %eax
addl $-0x30, %eax
subl $0xa, %eax
jb 0x222ef
jmp 0x222fd
movq -0x40(%rbp), %rdi
movl 0x10(%rdi), %esi
callq 0x23170
jmp 0x22318
movq -0x40(%rbp), %rdi
movl 0x10(%rdi), %esi
callq 0x23170
jmp 0x22354
movq -0x40(%rbp), %rax
leaq 0x5f18b(%rip), %rcx     # 0x81493
movq %rcx, 0x68(%rax)
movl $0xe, -0x4(%rbp)
jmp 0x2259b
movq -0x40(%rbp), %rdi
callq 0x21310
addl $-0x30, %eax
subl $0x9, %eax
ja 0x22339
jmp 0x2232b
movq -0x40(%rbp), %rdi
movl 0x10(%rdi), %esi
callq 0x23170
jmp 0x22354
movq -0x40(%rbp), %rax
leaq 0x5f18a(%rip), %rcx     # 0x814ce
movq %rcx, 0x68(%rax)
movl $0xe, -0x4(%rbp)
jmp 0x2259b
movq -0x40(%rbp), %rdi
callq 0x21310
addl $-0x30, %eax
subl $0x9, %eax
ja 0x22375
jmp 0x22367
movq -0x40(%rbp), %rdi
movl 0x10(%rdi), %esi
callq 0x23170
jmp 0x22354
jmp 0x22377
movq -0x40(%rbp), %rdi
callq 0x225b0
movq $0x0, -0x20(%rbp)
callq 0x6080
movl $0x0, (%rax)
cmpl $0x5, -0x14(%rbp)
jne 0x2244c
movq -0x40(%rbp), %rdi
addq $0x48, %rdi
callq 0x62e0
movq %rax, %rdi
leaq -0x20(%rbp), %rsi
movl $0xa, %edx
callq 0x6670
movq -0x40(%rbp), %rdi
movq %rax, -0x28(%rbp)
movq -0x20(%rbp), %rax
movq %rax, -0x60(%rbp)
addq $0x48, %rdi
callq 0x62e0
movq -0x40(%rbp), %rdi
movq %rax, -0x68(%rbp)
addq $0x48, %rdi
callq 0x6380
movq -0x68(%rbp), %rcx
movq %rax, %rdx
movq -0x60(%rbp), %rax
addq %rdx, %rcx
cmpq %rcx, %rax
jne 0x223fa
jmp 0x22419
leaq 0x5f100(%rip), %rdi     # 0x81501
leaq 0x5c739(%rip), %rsi     # 0x7eb41
movl $0x2068, %edx           # imm = 0x2068
leaq 0x5efba(%rip), %rcx     # 0x813ce
callq 0x6350
callq 0x6080
cmpl $0x0, (%rax)
jne 0x22447
movq -0x40(%rbp), %rax
movq -0x28(%rbp), %rcx
movq %rcx, 0x78(%rax)
movq 0x78(%rax), %rax
cmpq -0x28(%rbp), %rax
jne 0x22445
movl $0x5, -0x4(%rbp)
jmp 0x2259b
jmp 0x22447
jmp 0x22504
cmpl $0x6, -0x14(%rbp)
jne 0x22502
movq -0x40(%rbp), %rdi
addq $0x48, %rdi
callq 0x62e0
movq %rax, %rdi
leaq -0x20(%rbp), %rsi
movl $0xa, %edx
callq 0x60c0
movq -0x40(%rbp), %rdi
movq %rax, -0x30(%rbp)
movq -0x20(%rbp), %rax
movq %rax, -0x70(%rbp)
addq $0x48, %rdi
callq 0x62e0
movq -0x40(%rbp), %rdi
movq %rax, -0x78(%rbp)
addq $0x48, %rdi
callq 0x6380
movq -0x78(%rbp), %rcx
movq %rax, %rdx
movq -0x70(%rbp), %rax
addq %rdx, %rcx
cmpq %rcx, %rax
jne 0x224b3
jmp 0x224d2
leaq 0x5f047(%rip), %rdi     # 0x81501
leaq 0x5c680(%rip), %rsi     # 0x7eb41
movl $0x2078, %edx           # imm = 0x2078
leaq 0x5ef01(%rip), %rcx     # 0x813ce
callq 0x6350
callq 0x6080
cmpl $0x0, (%rax)
jne 0x22500
movq -0x40(%rbp), %rax
movq -0x30(%rbp), %rcx
movq %rcx, 0x70(%rax)
movq 0x70(%rax), %rax
cmpq -0x30(%rbp), %rax
jne 0x224fe
movl $0x6, -0x4(%rbp)
jmp 0x2259b
jmp 0x22500
jmp 0x22502
jmp 0x22504
movq -0x40(%rbp), %rdi
movq %rdi, %rax
addq $0x80, %rax
movq %rax, -0x90(%rbp)
addq $0x48, %rdi
callq 0x62e0
movq -0x90(%rbp), %rdi
movq %rax, %rsi
leaq -0x20(%rbp), %rdx
callq 0x236c0
movq -0x40(%rbp), %rdi
movq -0x20(%rbp), %rax
movq %rax, -0x80(%rbp)
addq $0x48, %rdi
callq 0x62e0
movq -0x40(%rbp), %rdi
movq %rax, -0x88(%rbp)
addq $0x48, %rdi
callq 0x6380
movq -0x88(%rbp), %rcx
movq %rax, %rdx
movq -0x80(%rbp), %rax
addq %rdx, %rcx
cmpq %rcx, %rax
jne 0x22575
jmp 0x22594
leaq 0x5ef85(%rip), %rdi     # 0x81501
leaq 0x5c5be(%rip), %rsi     # 0x7eb41
movl $0x2089, %edx           # imm = 0x2089
leaq 0x5ee3f(%rip), %rcx     # 0x813ce
callq 0x6350
movl $0x7, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x90, %rsp
popq %rbp
retq
nopw (%rax,%rax)