// File: /workspace/github_cpp_makefile_star2_O1/SYZYGYfpga[P]brain-tools/include/json.hpp
// Function: nlohmann::detail::serializer<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>>::throw_if_invalid_utf8(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)
static void throw_if_invalid_utf8(const std::string& str)
    {
        // start with state 0 (= accept)
        uint8_t state = 0;

        for (size_t i = 0; i < str.size(); ++i)
        {
            const auto byte = static_cast<uint8_t>(str[i]);
            decode(state, byte);
            if (state == 1)
            {
                // state 1 means reject
                std::stringstream ss;
                ss << std::setw(2) << std::uppercase << std::setfill('0') << std::hex << static_cast<int>(byte);
                JSON_THROW(type_error::create(316, "invalid UTF-8 byte at index " + std::to_string(i) + ": 0x" + ss.str()));
            }
        }

        if (state != 0)
        {
            // we finish reading, but do not accept: string was incomplete
            std::stringstream ss;
            ss << std::setw(2) << std::uppercase << std::setfill('0') << std::hex << static_cast<int>(static_cast<uint8_t>(str.back()));
            JSON_THROW(type_error::create(316, "incomplete UTF-8 string; last byte: 0x" + ss.str()));
        }
    }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x228, %rsp            # imm = 0x228
movq %rdi, %rbx
movq 0x8(%rdi), %rax
testq %rax, %rax
je 0x5faa
movq (%rbx), %rcx
xorl %r14d, %r14d
leaq 0x4356(%rip), %rdx      # 0xa2cc
xorl %esi, %esi
movzbl (%rcx,%r14), %r15d
movzbl (%r15,%rdx), %edi
movzbl %sil, %esi
shll $0x4, %esi
addq %rdi, %rsi
movb 0x100(%rsi,%rdx), %sil
cmpb $0x1, %sil
je 0x5fc2
incq %r14
cmpq %r14, %rax
jne 0x5f78
testb %sil, %sil
sete %al
jmp 0x5fac
movb $0x1, %al
testb %al, %al
je 0x60c8
addq $0x228, %rsp            # imm = 0x228
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
leaq 0xa0(%rsp), %rbx
movq %rbx, %rdi
callq 0x3170
movq 0x10(%rbx), %rax
movq -0x18(%rax), %rcx
movq $0x2, 0xc0(%rsp,%rcx)
movq -0x18(%rax), %rcx
orl $0x4000, 0xc8(%rsp,%rcx) # imm = 0x4000
movq -0x18(%rax), %rax
leaq (%rsp,%rax), %rbx
addq $0xb0, %rbx
cmpb $0x0, 0xe1(%rbx)
jne 0x6027
movq %rbx, %rdi
movl $0x20, %esi
callq 0x3210
movb %al, 0xe0(%rbx)
movb $0x1, 0xe1(%rbx)
leaq 0xb0(%rsp), %rdi
movb $0x30, 0xe0(%rbx)
movq (%rdi), %rax
movq -0x18(%rax), %rax
movl 0xc8(%rsp,%rax), %ecx
andl $-0x4b, %ecx
orl $0x8, %ecx
movl %ecx, 0xc8(%rsp,%rax)
movl %r15d, %esi
callq 0x3380
movl $0x20, %edi
callq 0x3120
movq %rax, %rbx
leaq 0x60(%rsp), %rdi
movq %r14, %rsi
callq 0x6813
leaq 0x342d(%rip), %rsi      # 0x94a7
leaq 0x80(%rsp), %rdi
leaq 0x60(%rsp), %rdx
callq 0x67a3
leaq 0x3453(%rip), %rsi      # 0x94e6
leaq 0x80(%rsp), %rdi
callq 0x33d0
leaq 0x10(%rsp), %r15
movq %r15, -0x10(%r15)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
jne 0x61cc
movups (%rcx), %xmm0
movups %xmm0, (%r15)
jmp 0x61d8
leaq 0xa0(%rsp), %r14
movq %r14, %rdi
callq 0x3170
movq 0x10(%r14), %rax
movq -0x18(%rax), %rcx
movq $0x2, 0xc0(%rsp,%rcx)
movq -0x18(%rax), %rcx
orl $0x4000, 0xc8(%rsp,%rcx) # imm = 0x4000
movq -0x18(%rax), %rax
leaq (%rsp,%rax), %r14
addq $0xb0, %r14
cmpb $0x0, 0xe1(%r14)
jne 0x6130
movq %r14, %rdi
movl $0x20, %esi
callq 0x3210
movb %al, 0xe0(%r14)
movb $0x1, 0xe1(%r14)
leaq 0xb0(%rsp), %rdi
movb $0x30, 0xe0(%r14)
movq (%rdi), %rax
movq -0x18(%rax), %rax
movl 0xc8(%rsp,%rax), %ecx
andl $-0x4b, %ecx
orl $0x8, %ecx
movl %ecx, 0xc8(%rsp,%rax)
movq (%rbx), %rax
movq 0x8(%rbx), %rcx
movzbl -0x1(%rax,%rcx), %esi
callq 0x3380
movl $0x20, %edi
callq 0x3120
movq %rax, %rbx
leaq 0xb8(%rsp), %rsi
movq %rsp, %rdi
callq 0x3340
leaq 0x3334(%rip), %rsi      # 0x94c4
leaq 0x20(%rsp), %rdi
movq %rsp, %rdx
callq 0x67a3
movb $0x1, %bpl
leaq 0x20(%rsp), %rdx
movq %rbx, %rdi
movl $0x13c, %esi            # imm = 0x13C
callq 0x65c2
xorl %ebp, %ebp
leaq 0x7b3d(%rip), %rsi      # 0xdcf8
leaq 0xf4e(%rip), %rdx       # 0x7110
movq %rbx, %rdi
callq 0x3370
jmp 0x6241
movq %rdx, (%rsp)
movq (%rcx), %rdx
movq %rdx, 0x10(%rsp)
movq 0x8(%rax), %rdx
movq %rdx, 0x8(%rsp)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
leaq 0xb8(%rsp), %rsi
leaq 0x40(%rsp), %rdi
callq 0x3340
leaq 0x20(%rsp), %rdi
movq %rsp, %rsi
leaq 0x40(%rsp), %rdx
callq 0x66fb
movb $0x1, %bpl
leaq 0x20(%rsp), %rdx
movq %rbx, %rdi
movl $0x13c, %esi            # imm = 0x13C
callq 0x65c2
xorl %ebp, %ebp
leaq 0x7ac6(%rip), %rsi      # 0xdcf8
leaq 0xed7(%rip), %rdx       # 0x7110
movq %rbx, %rdi
callq 0x3370
movq %rax, %r14
leaq 0x30(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x625f
callq 0x3200
jmp 0x625f
movq %rax, %r14
movb $0x1, %bpl
leaq 0x10(%rsp), %rax
jmp 0x62df
jmp 0x62ef
movq %rax, %r14
leaq 0x30(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x6289
callq 0x3200
jmp 0x6289
movq %rax, %r14
movb $0x1, %bpl
leaq 0x50(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x62a4
callq 0x3200
jmp 0x62a4
movq %rax, %r14
movb $0x1, %bpl
movq (%rsp), %rdi
cmpq %r15, %rdi
je 0x62bc
callq 0x3200
jmp 0x62bc
jmp 0x6304
movq %rax, %r14
movb $0x1, %bpl
leaq 0x90(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x62da
callq 0x3200
jmp 0x62da
movq %rax, %r14
movb $0x1, %bpl
leaq 0x70(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x62f5
callq 0x3200
jmp 0x62f5
movq %rax, %r14
movb $0x1, %bpl
testb %bpl, %bpl
je 0x6307
movq %rbx, %rdi
callq 0x3190
jmp 0x6307
movq %rax, %r14
movq 0x7caa(%rip), %rsi      # 0xdfb8
leaq 0xa0(%rsp), %rdi
callq 0x31b0
leaq 0x120(%rsp), %rdi
callq 0x30b0
movq %r14, %rdi
callq 0x3390