// File: /workspace/github_cpp_makefile_star2_O3/donfreiday[P]gb/./imgui/imgui_draw.cpp
// Function: ImFontAtlas::RenderCustomTexData(int, void*)
void ImFontAtlas::RenderCustomTexData(int pass, void* p_rects)
{
    // A work of art lies ahead! (. = white layer, X = black layer, others are blank)
    // The white texels on the top left are the ones we'll use everywhere in ImGui to render filled shapes.
    const int TEX_DATA_W = 90;
    const int TEX_DATA_H = 27;
    const char texture_data[TEX_DATA_W*TEX_DATA_H+1] =
    {
        "..-         -XXXXXXX-    X    -           X           -XXXXXXX          -          XXXXXXX"
        "..-         -X.....X-   X.X   -          X.X          -X.....X          -          X.....X"
        "---         -XXX.XXX-  X...X  -         X...X         -X....X           -           X....X"
        "X           -  X.X  - X.....X -        X.....X        -X...X            -            X...X"
        "XX          -  X.X  -X.......X-       X.......X       -X..X.X           -           X.X..X"
        "X.X         -  X.X  -XXXX.XXXX-       XXXX.XXXX       -X.X X.X          -          X.X X.X"
        "X..X        -  X.X  -   X.X   -          X.X          -XX   X.X         -         X.X   XX"
        "X...X       -  X.X  -   X.X   -    XX    X.X    XX    -      X.X        -        X.X      "
        "X....X      -  X.X  -   X.X   -   X.X    X.X    X.X   -       X.X       -       X.X       "
        "X.....X     -  X.X  -   X.X   -  X..X    X.X    X..X  -        X.X      -      X.X        "
        "X......X    -  X.X  -   X.X   - X...XXXXXX.XXXXXX...X -         X.X   XX-XX   X.X         "
        "X.......X   -  X.X  -   X.X   -X.....................X-          X.X X.X-X.X X.X          "
        "X........X  -  X.X  -   X.X   - X...XXXXXX.XXXXXX...X -           X.X..X-X..X.X           "
        "X.........X -XXX.XXX-   X.X   -  X..X    X.X    X..X  -            X...X-X...X            "
        "X..........X-X.....X-   X.X   -   X.X    X.X    X.X   -           X....X-X....X           "
        "X......XXXXX-XXXXXXX-   X.X   -    XX    X.X    XX    -          X.....X-X.....X          "
        "X...X..X    ---------   X.X   -          X.X          -          XXXXXXX-XXXXXXX          "
        "X..X X..X   -       -XXXX.XXXX-       XXXX.XXXX       ------------------------------------"
        "X.X  X..X   -       -X.......X-       X.......X       -    XX           XX    -           "
        "XX    X..X  -       - X.....X -        X.....X        -   X.X           X.X   -           "
        "      X..X          -  X...X  -         X...X         -  X..X           X..X  -           "
        "       XX           -   X.X   -          X.X          - X...XXXXXXXXXXXXX...X -           "
        "------------        -    X    -           X           -X.....................X-           "
        "                    ----------------------------------- X...XXXXXXXXXXXXX...X -           "
        "                                                      -  X..X           X..X  -           "
        "                                                      -   X.X           X.X   -           "
        "                                                      -    XX           XX    -           "
    };

    ImVector<stbrp_rect>& rects = *(ImVector<stbrp_rect>*)p_rects;
    if (pass == 0)
    {
        // Request rectangles
        stbrp_rect r;
        memset(&r, 0, sizeof(r));
        r.w = (TEX_DATA_W*2)+1;
        r.h = TEX_DATA_H+1;
        rects.push_back(r);
    }
    else if (pass == 1)
    {
        // Render/copy pixels
        const stbrp_rect& r = rects[0];
        for (int y = 0, n = 0; y < TEX_DATA_H; y++)
            for (int x = 0; x < TEX_DATA_W; x++, n++)
            {
                const int offset0 = (int)(r.x + x) + (int)(r.y + y) * TexWidth;
                const int offset1 = offset0 + 1 + TEX_DATA_W;
                TexPixelsAlpha8[offset0] = texture_data[n] == '.' ? 0xFF : 0x00;
                TexPixelsAlpha8[offset1] = texture_data[n] == 'X' ? 0xFF : 0x00;
            }
        const ImVec2 tex_uv_scale(1.0f / TexWidth, 1.0f / TexHeight);
        TexUvWhitePixel = ImVec2((r.x + 0.5f) * tex_uv_scale.x, (r.y + 0.5f) * tex_uv_scale.y);

        // Setup mouse cursors
        const ImVec2 cursor_datas[ImGuiMouseCursor_Count_][3] =
        {
            // Pos ........ Size ......... Offset ......
            { ImVec2(0,3),  ImVec2(12,19), ImVec2( 0, 0) }, // ImGuiMouseCursor_Arrow
            { ImVec2(13,0), ImVec2(7,16),  ImVec2( 4, 8) }, // ImGuiMouseCursor_TextInput
            { ImVec2(31,0), ImVec2(23,23), ImVec2(11,11) }, // ImGuiMouseCursor_Move
            { ImVec2(21,0), ImVec2( 9,23), ImVec2( 5,11) }, // ImGuiMouseCursor_ResizeNS
            { ImVec2(55,18),ImVec2(23, 9), ImVec2(11, 5) }, // ImGuiMouseCursor_ResizeEW
            { ImVec2(73,0), ImVec2(17,17), ImVec2( 9, 9) }, // ImGuiMouseCursor_ResizeNESW
            { ImVec2(55,0), ImVec2(17,17), ImVec2( 9, 9) }, // ImGuiMouseCursor_ResizeNWSE
        };

        for (int type = 0; type < ImGuiMouseCursor_Count_; type++)
        {
            ImGuiMouseCursorData& cursor_data = GImGui->MouseCursorData[type];
            ImVec2 pos = cursor_datas[type][0] + ImVec2((float)r.x, (float)r.y);
            const ImVec2 size = cursor_datas[type][1];
            cursor_data.Type = type;
            cursor_data.Size = size;
            cursor_data.HotOffset = cursor_datas[type][2];
            cursor_data.TexUvMin[0] = (pos) * tex_uv_scale;
            cursor_data.TexUvMax[0] = (pos + size) * tex_uv_scale;
            pos.x += TEX_DATA_W+1;
            cursor_data.TexUvMin[1] = (pos) * tex_uv_scale;
            cursor_data.TexUvMax[1] = (pos + size) * tex_uv_scale;
        }
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0xa8, %rsp
movq %rdx, %rbx
cmpl $0x1, %esi
je 0x34594
testl %esi, %esi
jne 0x3482e
movl (%rbx), %eax
cmpl 0x4(%rbx), %eax
jne 0x347c4
leal 0x1(%rax), %ecx
testl %eax, %eax
je 0x347ca
movl %eax, %edx
shrl $0x1f, %edx
addl %eax, %edx
sarl %edx
addl %eax, %edx
jmp 0x347cf
cmpl $0x0, (%rbx)
jle 0x3483c
movq 0x8(%rbx), %rax
xorl %ecx, %ecx
leaq 0x12fc6(%rip), %rdx     # 0x47570
xorl %esi, %esi
movslq %esi, %rsi
xorl %r8d, %r8d
movzwl 0x8(%rax), %r9d
movzwl 0xa(%rax), %r10d
addl %ecx, %r10d
imull 0x18(%rdi), %r10d
addl %r8d, %r9d
addl %r10d, %r9d
leaq (%rsi,%r8), %r10
movb (%rdx,%r10), %r10b
cmpb $0x2e, %r10b
sete %r11b
negb %r11b
movq 0x8(%rdi), %rbx
movslq %r9d, %r9
movb %r11b, (%rbx,%r9)
cmpb $0x58, %r10b
sete %r10b
negb %r10b
movq 0x8(%rdi), %r11
movb %r10b, 0x5b(%r11,%r9)
incq %r8
cmpl $0x5a, %r8d
jne 0x345b2
incl %ecx
addq %r8, %rsi
cmpl $0x1b, %ecx
jne 0x345ac
cvtsi2ssl 0x18(%rdi), %xmm2
movss 0x8d74(%rip), %xmm0     # 0x3d390
movaps %xmm0, %xmm1
cvtsi2ssl 0x1c(%rdi), %xmm3
movzwl 0x8(%rax), %ecx
cvtsi2ss %ecx, %xmm4
divss %xmm2, %xmm1
divss %xmm3, %xmm0
movss 0x8d90(%rip), %xmm2     # 0x3d3cc
addss %xmm2, %xmm4
movzwl 0xa(%rax), %ecx
xorps %xmm3, %xmm3
cvtsi2ss %ecx, %xmm3
mulss %xmm1, %xmm4
addss %xmm2, %xmm3
mulss %xmm0, %xmm3
movss %xmm4, 0x24(%rdi)
movss %xmm3, 0x28(%rdi)
movaps 0xe188(%rip), %xmm2     # 0x427f0
leaq -0xb0(%rbp), %rcx
movaps %xmm2, -0x10(%rcx)
movaps 0xe186(%rip), %xmm2     # 0x42800
movaps %xmm2, (%rcx)
movaps 0xe18c(%rip), %xmm2     # 0x42810
movaps %xmm2, 0x10(%rcx)
movaps 0xe191(%rip), %xmm2     # 0x42820
movaps %xmm2, 0x20(%rcx)
movaps 0xe196(%rip), %xmm2     # 0x42830
movaps %xmm2, 0x30(%rcx)
movaps 0xe19b(%rip), %xmm2     # 0x42840
movaps %xmm2, 0x40(%rcx)
movaps 0xe1a0(%rip), %xmm2     # 0x42850
movaps %xmm2, 0x50(%rcx)
movaps 0xe1a5(%rip), %xmm2     # 0x42860
movaps %xmm2, 0x60(%rcx)
movaps 0xe1aa(%rip), %xmm2     # 0x42870
movaps %xmm2, 0x70(%rcx)
movaps 0xe1af(%rip), %xmm2     # 0x42880
movaps %xmm2, 0x80(%rcx)
movabsq $0x4110000041100000, %rdx # imm = 0x4110000041100000
movq %rdx, 0x90(%rcx)
movl $0x1944, %edx           # imm = 0x1944
xorl %esi, %esi
leaq 0x20d89(%rip), %rdi     # 0x55480
movss 0xe0d9(%rip), %xmm2     # 0x427d8
movzwl 0x8(%rax), %r8d
xorps %xmm3, %xmm3
cvtsi2ss %r8d, %xmm3
movzwl 0xa(%rax), %r8d
xorps %xmm5, %xmm5
cvtsi2ss %r8d, %xmm5
addss -0x10(%rcx), %xmm3
addss -0xc(%rcx), %xmm5
movq (%rdi), %r8
movl -0x8(%rcx), %r9d
movl -0x4(%rcx), %r10d
movd %r9d, %xmm6
movd %r10d, %xmm4
movl %esi, (%r8,%rdx)
movl %r9d, 0xc(%r8,%rdx)
movl %r10d, 0x10(%r8,%rdx)
movq (%rcx), %r9
movq %r9, 0x4(%r8,%rdx)
movaps %xmm1, %xmm7
mulss %xmm3, %xmm7
movaps %xmm0, %xmm8
mulss %xmm5, %xmm8
unpcklps %xmm8, %xmm7            # xmm7 = xmm7[0],xmm8[0],xmm7[1],xmm8[1]
movaps %xmm3, %xmm9
addss %xmm2, %xmm9
movaps %xmm1, %xmm10
mulss %xmm9, %xmm10
unpcklps %xmm8, %xmm10           # xmm10 = xmm10[0],xmm8[0],xmm10[1],xmm8[1]
movlhps %xmm10, %xmm7           # xmm7 = xmm7[0],xmm10[0]
movups %xmm7, 0x14(%r8,%rdx)
addss %xmm6, %xmm3
addss %xmm5, %xmm4
mulss %xmm1, %xmm3
mulss %xmm0, %xmm4
unpcklps %xmm4, %xmm3            # xmm3 = xmm3[0],xmm4[0],xmm3[1],xmm4[1]
addss %xmm6, %xmm9
mulss %xmm1, %xmm9
unpcklps %xmm4, %xmm9            # xmm9 = xmm9[0],xmm4[0],xmm9[1],xmm4[1]
movlhps %xmm9, %xmm3            # xmm3 = xmm3[0],xmm9[0]
movups %xmm3, 0x24(%r8,%rdx)
incq %rsi
addq $0x18, %rcx
addq $0x34, %rdx
cmpq $0x7, %rsi
jne 0x346ff
jmp 0x3482e
movq 0x8(%rbx), %r14
jmp 0x3480c
movl $0x8, %edx
cmpl %ecx, %edx
cmovgl %edx, %ecx
movslq %ecx, %r15
movq %r15, %rdi
shlq $0x4, %rdi
callq 0x8589
movq %rax, %r14
movq 0x8(%rbx), %rsi
movslq (%rbx), %rdx
shlq $0x4, %rdx
movq %rax, %rdi
callq 0x7080
movq 0x8(%rbx), %rdi
callq 0x9019
movq %r14, 0x8(%rbx)
movl %r15d, 0x4(%rbx)
movl (%rbx), %eax
leal 0x1(%rax), %ecx
movl %ecx, (%rbx)
cltq
shlq $0x4, %rax
movabsq $0x1c00b500000000, %rcx # imm = 0x1C00B500000000
movq %rcx, (%r14,%rax)
movq $0x0, 0x8(%r14,%rax)
addq $0xa8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
leaq 0xa59d(%rip), %rdi      # 0x3ede0
leaq 0xa279(%rip), %rsi      # 0x3eac3
leaq 0x12bc5(%rip), %rcx     # 0x47416
movl $0x31c, %edx            # imm = 0x31C
callq 0x7140