// File: /workspace/github_cpp_makefile_star2_O1/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 $0x88, %rsp
movl %edx, %ebx
movl %esi, %r15d
movq %rdi, %r14
movlps %xmm0, -0x40(%rbp)
movlps %xmm1, -0x38(%rbp)
cmpl $0xfeffffff, %esi       # imm = 0xFEFFFFFF
jbe 0x84d40
leaq -0x40(%rbp), %rsi
leaq -0x38(%rbp), %rdx
movq %r14, %rdi
movl %r15d, %ecx
movaps %xmm4, %xmm0
movl %ebx, %r8d
callq 0x79d4a
jmp 0x84f69
movl $0xffcccccc, %edi       # imm = 0xFFCCCCCC
movl %r15d, %esi
movss %xmm4, -0x30(%rbp)
movaps %xmm3, -0x70(%rbp)
movss %xmm2, -0x2c(%rbp)
callq 0x42db2
movl %eax, %edi
callq 0x44652
movl %eax, %r12d
movl $0xff808080, %edi       # imm = 0xFF808080
movl %r15d, %esi
callq 0x42db2
movl %eax, %edi
callq 0x44652
movl %eax, %r15d
leaq -0x40(%rbp), %r13
leaq -0x38(%rbp), %rdx
movq %r14, %rdi
movq %r13, %rsi
movl %r12d, %ecx
movss -0x30(%rbp), %xmm0
movl %ebx, %r8d
callq 0x79d4a
movss -0x2c(%rbp), %xmm4
movaps -0x70(%rbp), %xmm3
movss 0x4(%r13), %xmm0
movaps %xmm3, %xmm1
shufps $0x55, %xmm3, %xmm1     # xmm1 = xmm1[1,1],xmm3[1,1]
movaps %xmm0, -0x80(%rbp)
addss %xmm0, %xmm1
leaq -0x38(%rbp), %rax
movss 0x4(%rax), %xmm6
ucomiss %xmm1, %xmm6
jbe 0x84f69
movss -0x40(%rbp), %xmm7
addss %xmm7, %xmm3
xorl %r12d, %r12d
movss -0x38(%rbp), %xmm8
leaq -0x58(%rbp), %r13
movaps %xmm3, -0x70(%rbp)
movss %xmm6, -0x48(%rbp)
movaps %xmm7, -0xa0(%rbp)
movss %xmm8, -0x44(%rbp)
movaps %xmm6, %xmm0
minss %xmm1, %xmm0
movaps %xmm1, %xmm9
movaps -0x80(%rbp), %xmm2
cmpltss %xmm2, %xmm9
movaps %xmm1, %xmm5
movaps %xmm9, %xmm1
andnps %xmm0, %xmm1
andps %xmm2, %xmm9
orps %xmm1, %xmm9
addss %xmm4, %xmm5
movaps %xmm5, -0x90(%rbp)
minss %xmm6, %xmm5
ucomiss %xmm5, %xmm9
jae 0x84f56
movl %r12d, %eax
andl $0x1, %eax
xorps %xmm10, %xmm10
cvtsi2ss %eax, %xmm10
mulss %xmm4, %xmm10
addss %xmm3, %xmm10
ucomiss %xmm10, %xmm8
jbe 0x84f56
movaps %xmm9, -0xb0(%rbp)
movss %xmm5, -0x4c(%rbp)
movaps %xmm8, %xmm1
minss %xmm10, %xmm1
movaps %xmm10, %xmm0
cmpltss %xmm7, %xmm0
movaps %xmm0, %xmm2
andnps %xmm1, %xmm2
andps %xmm7, %xmm0
orps %xmm2, %xmm0
movaps %xmm10, %xmm1
addss %xmm4, %xmm1
minss %xmm8, %xmm1
ucomiss %xmm1, %xmm0
jae 0x84f40
xorl %r8d, %r8d
movaps -0x80(%rbp), %xmm2
ucomiss %xmm9, %xmm2
movss -0x30(%rbp), %xmm2
jb 0x84ec0
xorl %r8d, %r8d
ucomiss %xmm0, %xmm7
setae %r8b
ucomiss %xmm8, %xmm1
jb 0x84ec0
orl $0x2, %r8d
ucomiss %xmm6, %xmm5
jb 0x84eda
leal 0x4(%r8), %eax
ucomiss %xmm0, %xmm7
cmovael %eax, %r8d
ucomiss %xmm8, %xmm1
jb 0x84eda
orl $0x8, %r8d
movss %xmm10, -0x50(%rbp)
movss %xmm0, -0x60(%rbp)
movss %xmm9, -0x5c(%rbp)
movss %xmm1, -0x58(%rbp)
movss %xmm5, -0x54(%rbp)
xorps %xmm0, %xmm0
andl %ebx, %r8d
je 0x84f00
movaps %xmm2, %xmm0
movq %r14, %rdi
leaq -0x60(%rbp), %rsi
movq %r13, %rdx
movl %r15d, %ecx
callq 0x79d4a
movaps -0x70(%rbp), %xmm3
movss -0x2c(%rbp), %xmm4
movss -0x48(%rbp), %xmm6
movaps -0xa0(%rbp), %xmm7
movss -0x44(%rbp), %xmm8
movaps -0xb0(%rbp), %xmm9
movss -0x4c(%rbp), %xmm5
movss -0x50(%rbp), %xmm10
movaps %xmm4, %xmm0
addss %xmm4, %xmm0
addss %xmm0, %xmm10
ucomiss %xmm10, %xmm8
ja 0x84e66
incl %r12d
movaps -0x90(%rbp), %xmm1
ucomiss %xmm1, %xmm6
ja 0x84df6
addq $0x88, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq