// File: /workspace/github_cpp_makefile_star2_O1/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 0x34e4a
testl %esi, %esi
jne 0x350e5
movl (%rbx), %r15d
movl 0x4(%rbx), %eax
cmpl %eax, %r15d
jne 0x350be
incl %r15d
testl %eax, %eax
je 0x3507a
movl %eax, %ecx
shrl $0x1f, %ecx
addl %eax, %ecx
sarl %ecx
addl %eax, %ecx
jmp 0x3507f
cmpl $0x0, (%rbx)
jle 0x350f3
movq 0x8(%rbx), %rax
xorl %ecx, %ecx
leaq 0x12760(%rip), %rdx     # 0x475c0
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 0x34e68
incl %ecx
addq %r8, %rsi
cmpl $0x1b, %ecx
jne 0x34e62
cvtsi2ssl 0x18(%rdi), %xmm2
movss 0x84ae(%rip), %xmm0     # 0x3d380
movaps %xmm0, %xmm1
cvtsi2ssl 0x1c(%rdi), %xmm3
movzwl 0x8(%rax), %ecx
cvtsi2ss %ecx, %xmm4
divss %xmm2, %xmm1
divss %xmm3, %xmm0
movss 0x84ca(%rip), %xmm2     # 0x3d3bc
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 0xd952(%rip), %xmm2     # 0x42870
leaq -0xb0(%rbp), %rcx
movaps %xmm2, -0x10(%rcx)
movaps 0xd950(%rip), %xmm2     # 0x42880
movaps %xmm2, (%rcx)
movaps 0xd956(%rip), %xmm2     # 0x42890
movaps %xmm2, 0x10(%rcx)
movaps 0xd95b(%rip), %xmm2     # 0x428a0
movaps %xmm2, 0x20(%rcx)
movaps 0xd960(%rip), %xmm2     # 0x428b0
movaps %xmm2, 0x30(%rcx)
movaps 0xd965(%rip), %xmm2     # 0x428c0
movaps %xmm2, 0x40(%rcx)
movaps 0xd96a(%rip), %xmm2     # 0x428d0
movaps %xmm2, 0x50(%rcx)
movaps 0xd96f(%rip), %xmm2     # 0x428e0
movaps %xmm2, 0x60(%rcx)
movaps 0xd974(%rip), %xmm2     # 0x428f0
movaps %xmm2, 0x70(%rcx)
movaps 0xd979(%rip), %xmm2     # 0x42900
movaps %xmm2, 0x80(%rcx)
movabsq $0x4110000041100000, %rdx # imm = 0x4110000041100000
movq %rdx, 0x90(%rcx)
movl $0x1944, %edx           # imm = 0x1944
xorl %esi, %esi
leaq 0x204e3(%rip), %rdi     # 0x55490
movss 0xd89f(%rip), %xmm2     # 0x42854
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 0x34fb5
jmp 0x350e5
movl $0x8, %ecx
cmpl %r15d, %ecx
cmovgl %ecx, %r15d
cmpl %r15d, %eax
jge 0x350be
movslq %r15d, %rdi
shlq $0x4, %rdi
callq 0x85d9
movq %rax, %r14
movq 0x8(%rbx), %rsi
movslq (%rbx), %rdx
shlq $0x4, %rdx
movq %rax, %rdi
callq 0x7080
movq 0x8(%rbx), %rdi
callq 0x9065
movq %r14, 0x8(%rbx)
movl %r15d, 0x4(%rbx)
movq 0x8(%rbx), %rax
movslq (%rbx), %rcx
leal 0x1(%rcx), %edx
movl %edx, (%rbx)
shlq $0x4, %rcx
movabsq $0x1c00b500000000, %rdx # imm = 0x1C00B500000000
movq %rdx, (%rax,%rcx)
movq $0x0, 0x8(%rax,%rcx)
addq $0xa8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
leaq 0x9cb6(%rip), %rdi      # 0x3edb0
leaq 0x9992(%rip), %rsi      # 0x3ea93
leaq 0x12358(%rip), %rcx     # 0x47460
movl $0x31c, %edx            # imm = 0x31C
callq 0x7140