// File: /workspace/github_cpp_makefile_star2_O3/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 $0xa8, %rsp
movl %edx, %ebx
movl %esi, %r15d
movq %rdi, %r14
movlps %xmm0, -0x48(%rbp)
movlps %xmm1, -0x40(%rbp)
cmpl $0xfeffffff, %esi       # imm = 0xFEFFFFFF
jbe 0x83147
leaq -0x48(%rbp), %rsi
leaq -0x40(%rbp), %rdx
movq %r14, %rdi
movl %r15d, %ecx
movaps %xmm4, %xmm0
movl %ebx, %r8d
callq 0x785e6
jmp 0x8337e
movaps %xmm1, %xmm5
shufps $0x55, %xmm1, %xmm5     # xmm5 = xmm5[1,1],xmm1[1,1]
movaps %xmm5, -0x80(%rbp)
movl $0xffcccccc, %edi       # imm = 0xFFCCCCCC
movl %r15d, %esi
movss %xmm4, -0x30(%rbp)
movaps %xmm3, -0x70(%rbp)
movss %xmm2, -0x2c(%rbp)
movaps %xmm1, -0xa0(%rbp)
movaps %xmm0, -0x90(%rbp)
callq 0x42515
movl %eax, %edi
callq 0x43c5f
movl %eax, %r12d
movl $0xff808080, %edi       # imm = 0xFF808080
movl %r15d, %esi
callq 0x42515
movl %eax, %edi
callq 0x43c5f
movl %eax, %r15d
leaq -0x48(%rbp), %rsi
leaq -0x40(%rbp), %rdx
movq %r14, %rdi
movl %r12d, %ecx
movss -0x30(%rbp), %xmm0
movl %ebx, %r8d
callq 0x785e6
movaps -0x80(%rbp), %xmm7
movaps -0x90(%rbp), %xmm6
movaps -0xa0(%rbp), %xmm5
movss -0x2c(%rbp), %xmm4
movaps -0x70(%rbp), %xmm3
movaps %xmm3, %xmm2
addps %xmm6, %xmm2
shufps $0x55, %xmm2, %xmm2     # xmm2 = xmm2[1,1,1,1]
ucomiss %xmm2, %xmm7
jbe 0x8337e
movaps %xmm6, %xmm0
shufps $0x55, %xmm6, %xmm0     # xmm0 = xmm0[1,1],xmm6[1,1]
movaps %xmm0, -0xb0(%rbp)
addss %xmm6, %xmm3
xorl %r12d, %r12d
leaq -0x50(%rbp), %r13
movaps %xmm3, -0x70(%rbp)
movaps %xmm7, %xmm0
minss %xmm2, %xmm0
movaps %xmm2, %xmm9
movaps -0xb0(%rbp), %xmm8
cmpltss %xmm8, %xmm9
movaps %xmm9, %xmm1
andnps %xmm0, %xmm1
andps %xmm8, %xmm9
orps %xmm1, %xmm9
addss %xmm4, %xmm2
movaps %xmm2, -0xc0(%rbp)
movaps %xmm2, %xmm8
minss %xmm7, %xmm8
ucomiss %xmm8, %xmm9
jae 0x8336b
movl %r12d, %eax
andl $0x1, %eax
xorps %xmm10, %xmm10
cvtsi2ss %eax, %xmm10
mulss %xmm4, %xmm10
addss %xmm3, %xmm10
ucomiss %xmm10, %xmm5
jbe 0x8336b
movaps %xmm9, -0xd0(%rbp)
movss %xmm8, -0x34(%rbp)
movaps %xmm5, %xmm1
minss %xmm10, %xmm1
movaps %xmm10, %xmm0
cmpltss %xmm6, %xmm0
movaps %xmm0, %xmm2
andnps %xmm1, %xmm2
andps %xmm6, %xmm0
orps %xmm2, %xmm0
movaps %xmm10, %xmm1
addss %xmm4, %xmm1
minss %xmm5, %xmm1
ucomiss %xmm1, %xmm0
jae 0x83355
xorl %r8d, %r8d
movaps -0xb0(%rbp), %xmm2
ucomiss %xmm9, %xmm2
movss -0x30(%rbp), %xmm2
jb 0x832d3
xorl %r8d, %r8d
ucomiss %xmm0, %xmm6
setae %r8b
ucomiss %xmm5, %xmm1
jb 0x832d3
orl $0x2, %r8d
ucomiss %xmm7, %xmm8
jb 0x832ed
leal 0x4(%r8), %eax
ucomiss %xmm0, %xmm6
cmovael %eax, %r8d
ucomiss %xmm5, %xmm1
jb 0x832ed
orl $0x8, %r8d
movss %xmm10, -0x38(%rbp)
movss %xmm0, -0x58(%rbp)
movss %xmm9, -0x54(%rbp)
movss %xmm1, -0x50(%rbp)
movss %xmm8, -0x4c(%rbp)
xorps %xmm0, %xmm0
andl %ebx, %r8d
je 0x83314
movaps %xmm2, %xmm0
movq %r14, %rdi
leaq -0x58(%rbp), %rsi
movq %r13, %rdx
movl %r15d, %ecx
callq 0x785e6
movaps -0x70(%rbp), %xmm3
movss -0x2c(%rbp), %xmm4
movaps -0xa0(%rbp), %xmm5
movaps -0x90(%rbp), %xmm6
movaps -0x80(%rbp), %xmm7
movaps -0xd0(%rbp), %xmm9
movss -0x34(%rbp), %xmm8
movss -0x38(%rbp), %xmm10
movaps %xmm4, %xmm0
addss %xmm4, %xmm0
addss %xmm0, %xmm10
ucomiss %xmm10, %xmm5
ja 0x83279
incl %r12d
movaps -0xc0(%rbp), %xmm2
ucomiss %xmm2, %xmm7
ja 0x83202
addq $0xa8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq