// File: 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
subq $0x80, %rsp
movlpd %xmm0, -0x8(%rbp)
movlpd %xmm1, -0x10(%rbp)
movlpd %xmm3, -0x18(%rbp)
movq %rdi, -0x20(%rbp)
movl %esi, -0x24(%rbp)
movss %xmm2, -0x28(%rbp)
movss %xmm4, -0x2c(%rbp)
movl %edx, -0x30(%rbp)
movl -0x24(%rbp), %eax
andl $0xff000000, %eax       # imm = 0xFF000000
shrl $0x18, %eax
cmpl $0xff, %eax
jae 0x11e4ad
movl -0x24(%rbp), %esi
movl $0xffcccccc, %edi       # imm = 0xFFCCCCCC
callq 0xc5850
movl %eax, %edi
callq 0xc77e0
movl %eax, -0x34(%rbp)
movl -0x24(%rbp), %esi
movl $0xff808080, %edi       # imm = 0xFF808080
callq 0xc5850
movl %eax, %edi
callq 0xc77e0
movl %eax, -0x38(%rbp)
movq -0x20(%rbp), %rdi
movl -0x34(%rbp), %ecx
movss -0x2c(%rbp), %xmm0
movl -0x30(%rbp), %r8d
leaq -0x8(%rbp), %rsi
leaq -0x10(%rbp), %rdx
callq 0x113090
movl $0x0, -0x3c(%rbp)
movss -0x4(%rbp), %xmm0
addss -0x14(%rbp), %xmm0
movss %xmm0, -0x40(%rbp)
movss -0x40(%rbp), %xmm1
movss -0xc(%rbp), %xmm0
ucomiss %xmm1, %xmm0
jbe 0x11e4ab
movss -0x40(%rbp), %xmm0
movss -0x4(%rbp), %xmm1
movss -0xc(%rbp), %xmm2
callq 0x1158e0
movss %xmm0, -0x44(%rbp)
movss -0x40(%rbp), %xmm0
addss -0x28(%rbp), %xmm0
movss -0xc(%rbp), %xmm1
callq 0x112de0
movss %xmm0, -0x48(%rbp)
movss -0x48(%rbp), %xmm1
movss -0x44(%rbp), %xmm0
ucomiss %xmm1, %xmm0
jb 0x11e2fe
jmp 0x11e48e
movss -0x8(%rbp), %xmm1
addss -0x18(%rbp), %xmm1
movl -0x3c(%rbp), %eax
andl $0x1, %eax
cvtsi2ss %eax, %xmm0
movss -0x28(%rbp), %xmm2
mulss %xmm2, %xmm0
addss %xmm1, %xmm0
movss %xmm0, -0x4c(%rbp)
movss -0x4c(%rbp), %xmm1
movss -0x10(%rbp), %xmm0
ucomiss %xmm1, %xmm0
jbe 0x11e48c
movss -0x4c(%rbp), %xmm0
movss -0x8(%rbp), %xmm1
movss -0x10(%rbp), %xmm2
callq 0x1158e0
movss %xmm0, -0x50(%rbp)
movss -0x4c(%rbp), %xmm0
addss -0x28(%rbp), %xmm0
movss -0x10(%rbp), %xmm1
callq 0x112de0
movss %xmm0, -0x54(%rbp)
movss -0x54(%rbp), %xmm1
movss -0x50(%rbp), %xmm0
ucomiss %xmm1, %xmm0
jb 0x11e37d
jmp 0x11e470
movl $0x0, -0x58(%rbp)
movss -0x44(%rbp), %xmm1
movss -0x4(%rbp), %xmm0
ucomiss %xmm1, %xmm0
jb 0x11e3c1
movss -0x50(%rbp), %xmm1
movss -0x8(%rbp), %xmm0
ucomiss %xmm1, %xmm0
jb 0x11e3ab
movl -0x58(%rbp), %eax
orl $0x1, %eax
movl %eax, -0x58(%rbp)
movss -0x54(%rbp), %xmm0
ucomiss -0x10(%rbp), %xmm0
jb 0x11e3bf
movl -0x58(%rbp), %eax
orl $0x2, %eax
movl %eax, -0x58(%rbp)
jmp 0x11e3c1
movss -0x48(%rbp), %xmm0
ucomiss -0xc(%rbp), %xmm0
jb 0x11e3fa
movss -0x50(%rbp), %xmm1
movss -0x8(%rbp), %xmm0
ucomiss %xmm1, %xmm0
jb 0x11e3e4
movl -0x58(%rbp), %eax
orl $0x4, %eax
movl %eax, -0x58(%rbp)
movss -0x54(%rbp), %xmm0
ucomiss -0x10(%rbp), %xmm0
jb 0x11e3f8
movl -0x58(%rbp), %eax
orl $0x8, %eax
movl %eax, -0x58(%rbp)
jmp 0x11e3fa
movl -0x30(%rbp), %eax
andl -0x58(%rbp), %eax
movl %eax, -0x58(%rbp)
movq -0x20(%rbp), %rax
movq %rax, -0x78(%rbp)
movss -0x50(%rbp), %xmm0
movss -0x44(%rbp), %xmm1
leaq -0x60(%rbp), %rdi
callq 0xbf4c0
movss -0x54(%rbp), %xmm0
movss -0x48(%rbp), %xmm1
leaq -0x68(%rbp), %rdi
callq 0xbf4c0
movl -0x38(%rbp), %eax
movl %eax, -0x6c(%rbp)
cmpl $0x0, -0x58(%rbp)
je 0x11e449
movss -0x2c(%rbp), %xmm0
movss %xmm0, -0x7c(%rbp)
jmp 0x11e453
xorps %xmm0, %xmm0
movss %xmm0, -0x7c(%rbp)
jmp 0x11e453
movl -0x6c(%rbp), %ecx
movq -0x78(%rbp), %rdi
movss -0x7c(%rbp), %xmm0
movl -0x58(%rbp), %r8d
leaq -0x60(%rbp), %rsi
leaq -0x68(%rbp), %rdx
callq 0x113090
movss -0x28(%rbp), %xmm0
movss -0x4c(%rbp), %xmm1
addss %xmm0, %xmm0
addss %xmm1, %xmm0
movss %xmm0, -0x4c(%rbp)
jmp 0x11e324
jmp 0x11e48e
movss -0x28(%rbp), %xmm0
addss -0x40(%rbp), %xmm0
movss %xmm0, -0x40(%rbp)
movl -0x3c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x3c(%rbp)
jmp 0x11e2a5
jmp 0x11e4ca
movq -0x20(%rbp), %rdi
movl -0x24(%rbp), %ecx
movss -0x2c(%rbp), %xmm0
movl -0x30(%rbp), %r8d
leaq -0x8(%rbp), %rsi
leaq -0x10(%rbp), %rdx
callq 0x113090
addq $0x80, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)