// File: /workspace/github_cpp_makefile_star2_O2/Matlock42[P]Jeopardy/./RapidXml/rapidxml.hpp
// Function: void rapidxml::xml_document<char>::insert_coded_character<0>(char*&, unsigned long)
static void insert_coded_character(Ch *&text, unsigned long code)
        {
            if (Flags & parse_no_utf8)
            {
                // Insert 8-bit ASCII character
                // Todo: possibly verify that code is less than 256 and use replacement char otherwise?
                text[0] = static_cast<unsigned char>(code);
                text += 1;
            }
            else
            {
                // Insert UTF8 sequence
                if (code < 0x80)    // 1 byte sequence
                {
	                text[0] = static_cast<unsigned char>(code);
                    text += 1;
                }
                else if (code < 0x800)  // 2 byte sequence
                {
	                text[1] = static_cast<unsigned char>((code | 0x80) & 0xBF); code >>= 6;
	                text[0] = static_cast<unsigned char>(code | 0xC0);
                    text += 2;
                }
	            else if (code < 0x10000)    // 3 byte sequence
                {
	                text[2] = static_cast<unsigned char>((code | 0x80) & 0xBF); code >>= 6;
	                text[1] = static_cast<unsigned char>((code | 0x80) & 0xBF); code >>= 6;
	                text[0] = static_cast<unsigned char>(code | 0xE0);
                    text += 3;
                }
	            else if (code < 0x110000)   // 4 byte sequence
                {
	                text[3] = static_cast<unsigned char>((code | 0x80) & 0xBF); code >>= 6;
	                text[2] = static_cast<unsigned char>((code | 0x80) & 0xBF); code >>= 6;
	                text[1] = static_cast<unsigned char>((code | 0x80) & 0xBF); code >>= 6;
	                text[0] = static_cast<unsigned char>(code | 0xF0);
                    text += 4;
                }
                else    // Invalid, only codes up to 0x10FFFF are allowed in Unicode
                {
                    RAPIDXML_PARSE_ERROR("invalid numeric character entity", text);
                }
            }
        }

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movq %rdi, %rbx
cmpq $0x7f, %rsi
ja 0x5134
pushq $0x1
jmp 0x51bf
cmpq $0x7ff, %rsi            # imm = 0x7FF
ja 0x5154
movl %esi, %eax
andb $0x3f, %al
orb $-0x80, %al
movq (%rbx), %rcx
movb %al, 0x1(%rcx)
shrl $0x6, %esi
orb $-0x40, %sil
pushq $0x2
jmp 0x51bf
cmpq $0xffff, %rsi           # imm = 0xFFFF
ja 0x5183
movl %esi, %eax
andb $0x3f, %al
orb $-0x80, %al
movq (%rbx), %rcx
movb %al, 0x2(%rcx)
movl %esi, %eax
shrl $0x6, %eax
andb $0x3f, %al
orb $-0x80, %al
movq (%rbx), %rcx
movb %al, 0x1(%rcx)
shrl $0xc, %esi
orb $-0x20, %sil
pushq $0x3
jmp 0x51bf
cmpq $0x10ffff, %rsi         # imm = 0x10FFFF
ja 0x51d0
movl %esi, %eax
andb $0x3f, %al
orb $-0x80, %al
movq (%rbx), %rcx
movb %al, 0x3(%rcx)
movl %esi, %eax
shrl $0x6, %eax
andb $0x3f, %al
orb $-0x80, %al
movq (%rbx), %rcx
movb %al, 0x2(%rcx)
movl %esi, %eax
shrl $0xc, %eax
andb $0x3f, %al
orb $-0x80, %al
movq (%rbx), %rcx
movb %al, 0x1(%rcx)
shrl $0x12, %esi
orb $-0x10, %sil
pushq $0x4
popq %rax
movq (%rbx), %rcx
movb %sil, (%rcx)
addq %rax, (%rbx)
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
pushq $0x18
popq %rdi
callq 0x20e0
movq (%rbx), %rcx
leaq 0x4b9e(%rip), %rdx      # 0x9d80
movq %rdx, (%rax)
leaq 0x130f(%rip), %rdx      # 0x64fb
movq %rdx, 0x8(%rax)
movq %rcx, 0x10(%rax)
leaq 0x4b5d(%rip), %rsi      # 0x9d58
movq 0x4dd6(%rip), %rdx      # 0x9fd8
movq %rax, %rdi
callq 0x2360