// File: donfreiday[P]gb/./imgui/imgui.cpp
// Function: ImGui::MenuItem(char const*, char const*, bool, bool)
bool ImGui::MenuItem(const char* label, const char* shortcut, bool selected, bool enabled)
{
    ImGuiWindow* window = GetCurrentWindow();
    if (window->SkipItems)
        return false;

    ImGuiState& g = *GImGui;
    ImVec2 pos = window->DC.CursorPos;
    ImVec2 label_size = CalcTextSize(label, NULL, true);
    ImVec2 shortcut_size = shortcut ? CalcTextSize(shortcut, NULL) : ImVec2(0.0f, 0.0f);
    float w = window->MenuColumns.DeclColumns(label_size.x, shortcut_size.x, (float)(int)(g.FontSize * 1.20f)); // Feedback for next frame
    float extra_w = ImMax(0.0f, ImGui::GetContentRegionAvail().x - w);

    bool pressed = ImGui::Selectable(label, false, ImGuiSelectableFlags_MenuItem | ImGuiSelectableFlags_DrawFillAvailWidth | (!enabled ? ImGuiSelectableFlags_Disabled : 0), ImVec2(w, 0.0f));
    if (shortcut_size.x > 0.0f)
    {
        ImGui::PushStyleColor(ImGuiCol_Text, g.Style.Colors[ImGuiCol_TextDisabled]);
        RenderText(pos + ImVec2(window->MenuColumns.Pos[1] + extra_w, 0.0f), shortcut, NULL, false);
        ImGui::PopStyleColor();
    }

    if (selected)
        RenderCheckMark(pos + ImVec2(window->MenuColumns.Pos[2] + extra_w + g.FontSize * 0.20f, 0.0f), window->Color(ImGuiCol_Text));

    return pressed;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0xa0, %rsp
movb %cl, %al
movb %dl, %cl
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
andb $0x1, %cl
movb %cl, -0x19(%rbp)
andb $0x1, %al
movb %al, -0x1a(%rbp)
callq 0x2e220
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rax
testb $0x1, 0x74(%rax)
je 0x27f0e
movb $0x0, -0x1(%rbp)
jmp 0x2812e
movq 0x515ab(%rip), %rax     # 0x794c0
movq %rax, -0x30(%rbp)
movq -0x28(%rbp), %rax
movq 0xa8(%rax), %rax
movq %rax, -0x38(%rbp)
movq -0x10(%rbp), %rdi
xorl %eax, %eax
movl %eax, %esi
movl $0x1, %edx
movss 0x3313f(%rip), %xmm0    # 0x5b07c
callq 0x10930
movlpd %xmm0, -0x40(%rbp)
cmpq $0x0, -0x18(%rbp)
je 0x27f6a
movq -0x18(%rbp), %rdi
xorl %edx, %edx
movl %edx, %esi
movss 0x3311e(%rip), %xmm0    # 0x5b07c
callq 0x10930
movlpd %xmm0, -0x48(%rbp)
jmp 0x27f79
leaq -0x48(%rbp), %rdi
xorps %xmm1, %xmm1
movaps %xmm1, %xmm0
callq 0x2d280
movq -0x28(%rbp), %rdi
addq $0x208, %rdi            # imm = 0x208
movss -0x40(%rbp), %xmm0
movss -0x48(%rbp), %xmm1
movq -0x30(%rbp), %rax
movss 0x1718(%rax), %xmm2
movss 0x33162(%rip), %xmm3    # 0x5b104
mulss %xmm3, %xmm2
cvttps2dq %xmm2, %xmm2
cvtdq2ps %xmm2, %xmm2
callq 0xb6b0
movss %xmm0, -0x4c(%rbp)
callq 0x15d60
movlpd %xmm0, -0x58(%rbp)
movss -0x58(%rbp), %xmm1
subss -0x4c(%rbp), %xmm1
xorps %xmm0, %xmm0
callq 0xb7c0
movss %xmm0, -0x50(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x90(%rbp)
movb -0x1a(%rbp), %dl
xorb $-0x1, %dl
xorl %eax, %eax
movl $0x10, %ecx
testb $0x1, %dl
cmovnel %ecx, %eax
orl $0x28, %eax
movl %eax, -0x88(%rbp)
movss -0x4c(%rbp), %xmm0
leaq -0x64(%rbp), %rdi
xorps %xmm1, %xmm1
callq 0x2d280
movq -0x90(%rbp), %rdi
movl -0x88(%rbp), %edx
xorl %esi, %esi
leaq -0x64(%rbp), %rcx
callq 0x27150
andb $0x1, %al
movb %al, -0x59(%rbp)
movss -0x48(%rbp), %xmm0
xorps %xmm1, %xmm1
ucomiss %xmm1, %xmm0
jbe 0x280a5
movq -0x30(%rbp), %rsi
addq $0x1470, %rsi           # imm = 0x1470
xorl %edi, %edi
callq 0x16040
movq -0x28(%rbp), %rax
movss 0x21c(%rax), %xmm0
movss -0x50(%rbp), %xmm1
addss %xmm1, %xmm0
leaq -0x74(%rbp), %rdi
movq %rdi, -0x98(%rbp)
xorps %xmm1, %xmm1
callq 0x2d280
movq -0x98(%rbp), %rsi
leaq -0x38(%rbp), %rdi
callq 0xc7e0
movlpd %xmm0, -0x6c(%rbp)
movq -0x18(%rbp), %rdi
movsd -0x6c(%rbp), %xmm0
xorl %edx, %edx
movl %edx, %esi
callq 0x10100
movl $0x1, %edi
callq 0x161b0
testb $0x1, -0x19(%rbp)
je 0x28126
movq -0x28(%rbp), %rax
movss 0x220(%rax), %xmm1
movss -0x50(%rbp), %xmm0
addss %xmm0, %xmm1
movq -0x30(%rbp), %rax
movss 0x1718(%rax), %xmm0
movss 0x32f30(%rip), %xmm2    # 0x5b004
mulss %xmm2, %xmm0
addss %xmm1, %xmm0
leaq -0x84(%rbp), %rdi
movq %rdi, -0xa0(%rbp)
xorps %xmm1, %xmm1
callq 0x2d280
movq -0xa0(%rbp), %rsi
leaq -0x38(%rbp), %rdi
callq 0xc7e0
movlpd %xmm0, -0x7c(%rbp)
movq -0x28(%rbp), %rdi
xorl %esi, %esi
movss 0x32f03(%rip), %xmm0    # 0x5b018
callq 0x2ea40
movl %eax, %edi
movsd -0x7c(%rbp), %xmm0
callq 0x11020
movb -0x59(%rbp), %al
andb $0x1, %al
movb %al, -0x1(%rbp)
movb -0x1(%rbp), %al
andb $0x1, %al
addq $0xa0, %rsp
popq %rbp
retq
nopl (%rax)