// File: donfreiday[P]gb/./imgui/imgui.cpp
// Function: ImGui::InputScalarEx(char const*, ImGuiDataType, void*, void*, void*, char const*, int)
bool ImGui::InputScalarEx(const char* label, ImGuiDataType data_type, void* data_ptr, void* step_ptr, void* step_fast_ptr, const char* scalar_format, ImGuiInputTextFlags extra_flags)
{
    ImGuiWindow* window = GetCurrentWindow();
    if (window->SkipItems)
        return false;

    ImGuiState& g = *GImGui;
    const ImGuiStyle& style = g.Style;
    const float w = CalcItemWidth();
    const ImVec2 label_size = ImGui::CalcTextSize(label, NULL, true);
    const ImRect frame_bb(window->DC.CursorPos, window->DC.CursorPos + ImVec2(w, label_size.y) + style.FramePadding*2.0f);

    ImGui::BeginGroup();
    ImGui::PushID(label);
    const ImVec2 button_sz = ImVec2(g.FontSize, g.FontSize) + style.FramePadding * 2;
    if (step_ptr)
        ImGui::PushItemWidth(ImMax(1.0f, w - (button_sz.x + style.ItemInnerSpacing.x)*2));

    char buf[64];
    DataTypeFormatString(data_type, data_ptr, scalar_format, buf, IM_ARRAYSIZE(buf));

    bool value_changed = false;
    if (!(extra_flags & ImGuiInputTextFlags_CharsHexadecimal))
        extra_flags |= ImGuiInputTextFlags_CharsDecimal;
    extra_flags |= ImGuiInputTextFlags_AutoSelectAll;
    if (ImGui::InputText("", buf, IM_ARRAYSIZE(buf), extra_flags))
    {
        DataTypeApplyOpFromText(buf, GImGui->InputTextState.InitialText.begin(), data_type, data_ptr, scalar_format);
        value_changed = true;
    }

    // Step buttons
    if (step_ptr)
    {
        ImGui::PopItemWidth();
        ImGui::SameLine(0, style.ItemInnerSpacing.x);
        if (ButtonEx("-", button_sz, ImGuiButtonFlags_Repeat | ImGuiButtonFlags_DontClosePopups))
        {
            DataTypeApplyOp(data_type, '-', data_ptr, g.IO.KeyCtrl && step_fast_ptr ? step_fast_ptr : step_ptr);
            value_changed = true;
        }
        ImGui::SameLine(0, style.ItemInnerSpacing.x);
        if (ButtonEx("+", button_sz, ImGuiButtonFlags_Repeat | ImGuiButtonFlags_DontClosePopups))
        {
            DataTypeApplyOp(data_type, '+', data_ptr, g.IO.KeyCtrl && step_fast_ptr ? step_fast_ptr : step_ptr);
            value_changed = true;
        }
    }
    ImGui::PopID();

    if (label_size.x > 0)
    {
        ImGui::SameLine(0, style.ItemInnerSpacing.x);
        RenderText(ImVec2(window->DC.CursorPos.x, window->DC.CursorPos.y + style.FramePadding.y), label);
        ItemSize(label_size, style.FramePadding.y);
    }
    ImGui::EndGroup();

    return value_changed;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x160, %rsp            # imm = 0x160
movl 0x10(%rbp), %eax
movq %rdi, -0x10(%rbp)
movl %esi, -0x14(%rbp)
movq %rdx, -0x20(%rbp)
movq %rcx, -0x28(%rbp)
movq %r8, -0x30(%rbp)
movq %r9, -0x38(%rbp)
callq 0x2e220
movq %rax, -0x40(%rbp)
movq -0x40(%rbp), %rax
testb $0x1, 0x74(%rax)
je 0x25cf1
movb $0x0, -0x1(%rbp)
jmp 0x260e9
movq 0x537c8(%rip), %rax     # 0x794c0
movq %rax, -0x48(%rbp)
movq -0x48(%rbp), %rax
addq $0x13e8, %rax           # imm = 0x13E8
movq %rax, -0x50(%rbp)
callq 0x185e0
movss %xmm0, -0x54(%rbp)
movq -0x10(%rbp), %rdi
xorl %eax, %eax
movl %eax, %esi
movl $0x1, %edx
movss 0x35353(%rip), %xmm0    # 0x5b07c
callq 0x10930
movlpd %xmm0, -0x5c(%rbp)
movq -0x40(%rbp), %rax
addq $0xa8, %rax
movq %rax, -0x118(%rbp)
movss -0x54(%rbp), %xmm0
movss -0x58(%rbp), %xmm1
leaq -0x84(%rbp), %rdi
movq %rdi, -0x120(%rbp)
callq 0x2d280
movq -0x120(%rbp), %rsi
movq -0x118(%rbp), %rdi
callq 0xc7e0
movlpd %xmm0, -0x7c(%rbp)
movq -0x50(%rbp), %rdi
addq $0x20, %rdi
movss 0x3532f(%rip), %xmm0    # 0x5b0b8
movss %xmm0, -0x10c(%rbp)
callq 0xe4b0
movlpd %xmm0, -0x8c(%rbp)
leaq -0x7c(%rbp), %rdi
leaq -0x8c(%rbp), %rsi
callq 0xc7e0
movq -0x118(%rbp), %rsi
movlpd %xmm0, -0x74(%rbp)
leaq -0x6c(%rbp), %rdi
leaq -0x74(%rbp), %rdx
callq 0x2eb40
callq 0x211c0
movq -0x10(%rbp), %rdi
callq 0x1b8c0
movq -0x48(%rbp), %rax
movss 0x1718(%rax), %xmm1
leaq -0x9c(%rbp), %rdi
movq %rdi, -0x108(%rbp)
movaps %xmm1, %xmm0
callq 0x2d280
movss -0x10c(%rbp), %xmm0
movq -0x50(%rbp), %rdi
addq $0x20, %rdi
callq 0xe4b0
movq -0x108(%rbp), %rdi
movlpd %xmm0, -0xa4(%rbp)
leaq -0xa4(%rbp), %rsi
callq 0xc7e0
movlpd %xmm0, -0x94(%rbp)
cmpq $0x0, -0x28(%rbp)
je 0x25e73
movss -0x54(%rbp), %xmm0
movss -0x94(%rbp), %xmm1
movq -0x50(%rbp), %rax
addss 0x34(%rax), %xmm1
movd %xmm1, %eax
xorl $0x80000000, %eax       # imm = 0x80000000
movd %eax, %xmm1
addss %xmm1, %xmm1
addss %xmm0, %xmm1
movss 0x351af(%rip), %xmm0    # 0x5b018
callq 0xb7c0
callq 0xafc0
movl -0x14(%rbp), %edi
movq -0x20(%rbp), %rsi
movq -0x38(%rbp), %rdx
leaq -0xf0(%rbp), %rcx
movl $0x40, %r8d
callq 0x26100
movb $0x0, -0xf1(%rbp)
movl 0x10(%rbp), %eax
andl $0x2, %eax
cmpl $0x0, %eax
jne 0x25eab
movl 0x10(%rbp), %eax
orl $0x1, %eax
movl %eax, 0x10(%rbp)
movl 0x10(%rbp), %eax
orl $0x10, %eax
movl %eax, 0x10(%rbp)
leaq -0xf0(%rbp), %rsi
movl 0x10(%rbp), %ecx
leaq 0x39389(%rip), %rdi     # 0x5f24e
movl $0x40, %edx
xorl %eax, %eax
movl %eax, %r9d
movq %r9, %r8
callq 0xb040
testb $0x1, %al
jne 0x25edd
jmp 0x25f23
leaq -0xf0(%rbp), %rax
movq %rax, -0x128(%rbp)
movq 0x535ce(%rip), %rdi     # 0x794c0
addq $0x1ab0, %rdi           # imm = 0x1AB0
addq $0x18, %rdi
callq 0x2fe30
movq -0x128(%rbp), %rdi
movq %rax, %rsi
movl -0x14(%rbp), %edx
movq -0x20(%rbp), %rcx
movq -0x38(%rbp), %r8
callq 0x1f910
movb $0x1, -0xf1(%rbp)
cmpq $0x0, -0x28(%rbp)
je 0x2605d
callq 0xb0f0
movq -0x50(%rbp), %rax
movss 0x34(%rax), %xmm1
xorps %xmm0, %xmm0
callq 0x1a5e0
leaq 0x364b6(%rip), %rdi     # 0x5c401
leaq -0x94(%rbp), %rsi
movl $0x11, %edx
callq 0x1aa80
testb $0x1, %al
jne 0x25f62
jmp 0x25fc7
movl -0x14(%rbp), %eax
movl %eax, -0x134(%rbp)
movq -0x20(%rbp), %rax
movq %rax, -0x130(%rbp)
movq -0x48(%rbp), %rax
testb $0x1, 0x105(%rax)
je 0x25f97
cmpq $0x0, -0x30(%rbp)
je 0x25f97
movq -0x30(%rbp), %rax
movq %rax, -0x140(%rbp)
jmp 0x25fa2
movq -0x28(%rbp), %rax
movq %rax, -0x140(%rbp)
movq -0x130(%rbp), %rdx
movl -0x134(%rbp), %edi
movq -0x140(%rbp), %rcx
movl $0x2d, %esi
callq 0x26170
movb $0x1, -0xf1(%rbp)
movq -0x50(%rbp), %rax
movss 0x34(%rax), %xmm1
xorps %xmm0, %xmm0
callq 0x1a5e0
leaq 0x362ae(%rip), %rdi     # 0x5c28d
leaq -0x94(%rbp), %rsi
movl $0x11, %edx
callq 0x1aa80
testb $0x1, %al
jne 0x25ff6
jmp 0x2605b
movl -0x14(%rbp), %eax
movl %eax, -0x14c(%rbp)
movq -0x20(%rbp), %rax
movq %rax, -0x148(%rbp)
movq -0x48(%rbp), %rax
testb $0x1, 0x105(%rax)
je 0x2602b
cmpq $0x0, -0x30(%rbp)
je 0x2602b
movq -0x30(%rbp), %rax
movq %rax, -0x158(%rbp)
jmp 0x26036
movq -0x28(%rbp), %rax
movq %rax, -0x158(%rbp)
movq -0x148(%rbp), %rdx
movl -0x14c(%rbp), %edi
movq -0x158(%rbp), %rcx
movl $0x2b, %esi
callq 0x26170
movb $0x1, -0xf1(%rbp)
jmp 0x2605d
callq 0x1b550
movss -0x5c(%rbp), %xmm0
xorps %xmm1, %xmm1
ucomiss %xmm1, %xmm0
jbe 0x260d9
movq -0x50(%rbp), %rax
movss 0x34(%rax), %xmm1
xorps %xmm0, %xmm0
callq 0x1a5e0
movq -0x40(%rbp), %rax
movss 0xa8(%rax), %xmm0
movss 0xac(%rax), %xmm1
movq -0x50(%rbp), %rax
movss 0x24(%rax), %xmm2
addss %xmm2, %xmm1
leaq -0xfc(%rbp), %rdi
callq 0x2d280
movq -0x10(%rbp), %rdi
movsd -0xfc(%rbp), %xmm0
xorl %eax, %eax
movl %eax, %esi
movl $0x1, %edx
callq 0x10100
movq -0x50(%rbp), %rax
movss 0x24(%rax), %xmm0
leaq -0x5c(%rbp), %rdi
callq 0xbeb0
callq 0x21490
movb -0xf1(%rbp), %al
andb $0x1, %al
movb %al, -0x1(%rbp)
movb -0x1(%rbp), %al
andb $0x1, %al
addq $0x160, %rsp            # imm = 0x160
popq %rbp
retq
nopw (%rax,%rax)