// File: /workspace/github_cpp_makefile_star2_O2/Ciaxur[P]yagb-emu/include/imgui/imgui_draw.cpp
// Function: ImGui::RenderColorRectWithAlphaCheckerboard(ImDrawList*, ImVec2, ImVec2, unsigned int, float, ImVec2, float, int)
void ImGui::RenderColorRectWithAlphaCheckerboard(ImDrawList* draw_list, ImVec2 p_min, ImVec2 p_max, ImU32 col, float grid_step, ImVec2 grid_off, float rounding, int rounding_corners_flags)
{
    if (((col & IM_COL32_A_MASK) >> IM_COL32_A_SHIFT) < 0xFF)
    {
        ImU32 col_bg1 = ImGui::GetColorU32(ImAlphaBlendColors(IM_COL32(204, 204, 204, 255), col));
        ImU32 col_bg2 = ImGui::GetColorU32(ImAlphaBlendColors(IM_COL32(128, 128, 128, 255), col));
        draw_list->AddRectFilled(p_min, p_max, col_bg1, rounding, rounding_corners_flags);

        int yi = 0;
        for (float y = p_min.y + grid_off.y; y < p_max.y; y += grid_step, yi++)
        {
            float y1 = ImClamp(y, p_min.y, p_max.y), y2 = ImMin(y + grid_step, p_max.y);
            if (y2 <= y1)
                continue;
            for (float x = p_min.x + grid_off.x + (yi & 1) * grid_step; x < p_max.x; x += grid_step * 2.0f)
            {
                float x1 = ImClamp(x, p_min.x, p_max.x), x2 = ImMin(x + grid_step, p_max.x);
                if (x2 <= x1)
                    continue;
                int rounding_corners_flags_cell = 0;
                if (y1 <= p_min.y) { if (x1 <= p_min.x) rounding_corners_flags_cell |= ImDrawCornerFlags_TopLeft; if (x2 >= p_max.x) rounding_corners_flags_cell |= ImDrawCornerFlags_TopRight; }
                if (y2 >= p_max.y) { if (x1 <= p_min.x) rounding_corners_flags_cell |= ImDrawCornerFlags_BotLeft; if (x2 >= p_max.x) rounding_corners_flags_cell |= ImDrawCornerFlags_BotRight; }
                rounding_corners_flags_cell &= rounding_corners_flags;
                draw_list->AddRectFilled(ImVec2(x1, y1), ImVec2(x2, y2), col_bg2, rounding_corners_flags_cell ? rounding : 0.0f, rounding_corners_flags_cell);
            }
        }
    }
    else
    {
        draw_list->AddRectFilled(p_min, p_max, col, rounding, rounding_corners_flags);
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x68, %rsp
movl %edx, %ebx
movl %esi, %r15d
movq %rdi, %r14
movlps %xmm0, -0x30(%rbp)
movlps %xmm1, -0x38(%rbp)
cmpl $0xfeffffff, %esi       # imm = 0xFEFFFFFF
jbe 0x6c74d
leaq -0x30(%rbp), %rsi
leaq -0x38(%rbp), %rdx
movq %r14, %rdi
movl %r15d, %ecx
movaps %xmm4, %xmm0
movl %ebx, %r8d
callq 0x64020
addq $0x68, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movl $0xffcccccc, %edi       # imm = 0xFFCCCCCC
movl %r15d, %esi
movss %xmm4, -0x44(%rbp)
movss %xmm2, -0x40(%rbp)
movaps %xmm3, -0x70(%rbp)
callq 0x34c06
movl %eax, %edi
callq 0x35dc8
movl %eax, %r12d
movl $0xff808080, %edi       # imm = 0xFF808080
movl %r15d, %esi
callq 0x34c06
movl %eax, %edi
callq 0x35dc8
movl %eax, %r15d
leaq -0x30(%rbp), %r13
leaq -0x38(%rbp), %rdx
movq %r14, %rdi
movq %r13, %rsi
movl %r12d, %ecx
movss -0x44(%rbp), %xmm0
movl %ebx, %r8d
callq 0x64020
movss -0x40(%rbp), %xmm5
movaps -0x70(%rbp), %xmm2
shufps $0x55, %xmm2, %xmm2     # xmm2 = xmm2[1,1,1,1]
addss 0x4(%r13), %xmm2
movl $0x0, -0x3c(%rbp)
leaq -0x5c(%rbp), %r12
leaq -0x54(%rbp), %r13
movss -0x34(%rbp), %xmm0
ucomiss %xmm2, %xmm0
jbe 0x6c73e
movss -0x2c(%rbp), %xmm1
movaps %xmm2, %xmm4
movaps %xmm0, %xmm2
minss %xmm4, %xmm2
movaps %xmm4, %xmm6
cmpltss %xmm1, %xmm6
movaps %xmm6, %xmm3
andnps %xmm2, %xmm3
andps %xmm1, %xmm6
orps %xmm3, %xmm6
addss %xmm5, %xmm4
movaps %xmm4, -0x80(%rbp)
movaps %xmm4, %xmm7
minss %xmm0, %xmm7
ucomiss %xmm7, %xmm6
jae 0x6c920
movl -0x3c(%rbp), %eax
andl $0x1, %eax
cvtsi2ss %eax, %xmm8
movss -0x30(%rbp), %xmm0
addss -0x70(%rbp), %xmm0
mulss %xmm5, %xmm8
addss %xmm0, %xmm8
movaps %xmm6, -0x90(%rbp)
movss %xmm7, -0x48(%rbp)
movss -0x38(%rbp), %xmm2
ucomiss %xmm8, %xmm2
jbe 0x6c920
movss -0x30(%rbp), %xmm3
movaps %xmm2, %xmm1
minss %xmm8, %xmm1
movaps %xmm8, %xmm0
cmpltss %xmm3, %xmm0
movaps %xmm0, %xmm4
andnps %xmm1, %xmm4
andps %xmm3, %xmm0
orps %xmm4, %xmm0
movaps %xmm8, %xmm1
addss %xmm5, %xmm1
minss %xmm2, %xmm1
ucomiss %xmm1, %xmm0
jae 0x6c90f
movss -0x2c(%rbp), %xmm4
xorl %r8d, %r8d
ucomiss %xmm6, %xmm4
movss -0x44(%rbp), %xmm4
jb 0x6c8a8
xorl %r8d, %r8d
ucomiss %xmm0, %xmm3
setae %r8b
ucomiss %xmm2, %xmm1
jb 0x6c8a8
orl $0x2, %r8d
ucomiss -0x34(%rbp), %xmm7
jb 0x6c8c2
leal 0x4(%r8), %eax
ucomiss %xmm0, %xmm3
cmovael %eax, %r8d
ucomiss %xmm2, %xmm1
jb 0x6c8c2
orl $0x8, %r8d
movss %xmm8, -0x4c(%rbp)
movss %xmm0, -0x5c(%rbp)
movss %xmm6, -0x58(%rbp)
movss %xmm1, -0x54(%rbp)
movss %xmm7, -0x50(%rbp)
xorps %xmm0, %xmm0
andl %ebx, %r8d
je 0x6c8e7
movaps %xmm4, %xmm0
movq %r14, %rdi
movq %r12, %rsi
movq %r13, %rdx
movl %r15d, %ecx
callq 0x64020
movss -0x40(%rbp), %xmm5
movaps -0x90(%rbp), %xmm6
movss -0x48(%rbp), %xmm7
movss -0x4c(%rbp), %xmm8
movaps %xmm5, %xmm0
addss %xmm5, %xmm0
addss %xmm0, %xmm8
jmp 0x6c83d
incl -0x3c(%rbp)
movaps -0x80(%rbp), %xmm2
jmp 0x6c7c9