// File: /workspace/github_cpp_makefile_star2_O1/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 0x5661
movl $0x1, %eax
jmp 0x56f5
cmpq $0x7ff, %rsi            # imm = 0x7FF
ja 0x5684
movl %esi, %eax
andb $0x3f, %al
orb $-0x80, %al
movq (%rbx), %rcx
movb %al, 0x1(%rcx)
shrl $0x6, %esi
orb $-0x40, %sil
movl $0x2, %eax
jmp 0x56f5
cmpq $0xffff, %rsi           # imm = 0xFFFF
ja 0x56b6
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
movl $0x3, %eax
jmp 0x56f5
cmpq $0x10ffff, %rsi         # imm = 0x10FFFF
ja 0x5705
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
movl $0x4, %eax
movq (%rbx), %rcx
movb %sil, (%rcx)
addq %rax, (%rbx)
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
movl $0x18, %edi
callq 0x20d0
movq (%rbx), %rcx
leaq 0x3667(%rip), %rdx      # 0x8d80
movq %rdx, (%rax)
leaq 0xdc0(%rip), %rdx       # 0x64e3
movq %rdx, 0x8(%rax)
movq %rcx, 0x10(%rax)
leaq 0x3626(%rip), %rsi      # 0x8d58
movq 0x389f(%rip), %rdx      # 0x8fd8
movq %rax, %rdi
callq 0x2330
nop