// File: /workspace/github_cpp_makefile_star2_O2/donfreiday[P]gb/./imgui/imgui.cpp
// Function: ImGui::InputScalarAsWidgetReplacement(ImRect const&, char const*, ImGuiDataType, void*, unsigned int, int)
bool ImGui::InputScalarAsWidgetReplacement(const ImRect& aabb, const char* label, ImGuiDataType data_type, void* data_ptr, ImGuiID id, int decimal_precision)
{
    ImGuiState& g = *GImGui;
    ImGuiWindow* window = GetCurrentWindow();

    // Our replacement widget will override the focus ID (registered previously to allow for a TAB focus to happen)
    SetActiveID(g.ScalarAsInputTextId, window);
    g.HoveredId = 0;
    FocusableItemUnregister(window);

    char buf[32];
    DataTypeFormatString(data_type, data_ptr, decimal_precision, buf, IM_ARRAYSIZE(buf));
    bool value_changed = InputTextEx(label, buf, IM_ARRAYSIZE(buf), aabb.GetSize() - g.Style.FramePadding*2.0f, ImGuiInputTextFlags_CharsDecimal | ImGuiInputTextFlags_AutoSelectAll);
    if (g.ScalarAsInputTextId == 0)
    {
        // First frame
        IM_ASSERT(g.ActiveId == id);    // InputText ID expected to match the Slider ID (else we'd need to store them both, which is also possible)
        g.ScalarAsInputTextId = g.ActiveId;
        g.HoveredId = id;
    }
    else if (g.ActiveId != g.ScalarAsInputTextId)
    {
        // Release
        g.ScalarAsInputTextId = 0;
    }
    if (value_changed)
        DataTypeApplyOpFromText(buf, GImGui->InputTextState.InitialText.begin(), data_type, data_ptr, NULL);
    return value_changed;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movl %r8d, %r15d
movq %rcx, -0x30(%rbp)
movl %edx, %r14d
movq %rsi, %r12
movq 0x3c644(%rip), %rbx     # 0x50480
movq 0x1758(%rbx), %rax
movb $0x1, 0x72(%rax)
movl 0x27a0(%rbx), %ecx
movl %ecx, 0x1790(%rbx)
movw $0x1, 0x1799(%rbx)
movq %rax, 0x17a0(%rbx)
andl $0x0, 0x1788(%rbx)
movq %rdi, %r13
decl 0x288(%rax)
decl 0x28c(%rax)
cmpl $0x1, %edx
je 0x13ea9
testl %r14d, %r14d
jne 0x13eff
movq -0x30(%rbp), %rax
movl (%rax), %r8d
testl %r9d, %r9d
js 0x13ed0
leaq 0x23f68(%rip), %rdx     # 0x37dfe
leaq -0x50(%rbp), %rdi
pushq $0x20
popq %rsi
movl %r9d, %ecx
xorl %eax, %eax
callq 0x83b1
jmp 0x13eff
movq -0x30(%rbp), %rax
cvtss2sd (%rax), %xmm0
testl %r9d, %r9d
js 0x13eea
leaq 0x23f46(%rip), %rdx     # 0x37e03
leaq -0x50(%rbp), %rdi
pushq $0x20
popq %rsi
movl %r9d, %ecx
movb $0x1, %al
callq 0x83b1
jmp 0x13eff
leaq 0x23998(%rip), %rdx     # 0x3786f
leaq -0x50(%rbp), %rdi
pushq $0x20
popq %rsi
movl %r8d, %ecx
xorl %eax, %eax
callq 0x83b1
jmp 0x13eff
leaq 0x2500f(%rip), %rdx     # 0x38f00
leaq -0x50(%rbp), %rdi
pushq $0x20
popq %rsi
movb $0x1, %al
callq 0x83b1
movss 0x8(%r13), %xmm0
subss (%r13), %xmm0
movss 0xc(%r13), %xmm1
subss 0x4(%r13), %xmm1
movss 0x1408(%rbx), %xmm2
movss 0x140c(%rbx), %xmm3
addss %xmm2, %xmm2
addss %xmm3, %xmm3
subss %xmm2, %xmm0
subss %xmm3, %xmm1
unpcklps %xmm1, %xmm0            # xmm0 = xmm0[0],xmm1[0],xmm0[1],xmm1[1]
leaq -0x58(%rbp), %rcx
movlps %xmm0, (%rcx)
andq $0x0, (%rsp)
leaq -0x50(%rbp), %rsi
pushq $0x20
popq %rdx
pushq $0x11
popq %r8
movq %r12, %rdi
xorl %r9d, %r9d
callq 0x13fe6
movl %eax, %r12d
movl 0x27a0(%rbx), %eax
movl 0x1790(%rbx), %ecx
testl %eax, %eax
je 0x13f7c
cmpl %eax, %ecx
je 0x13f8f
andl $0x0, 0x27a0(%rbx)
jmp 0x13f8f
cmpl %r15d, %ecx
jne 0x13fc7
movl %r15d, 0x27a0(%rbx)
movl %r15d, 0x1788(%rbx)
testb %r12b, %r12b
je 0x13fb5
movq 0x3c4e5(%rip), %rax     # 0x50480
movq 0x1ad0(%rax), %rsi
leaq -0x50(%rbp), %rdi
movl %r14d, %edx
movq -0x30(%rbp), %rcx
xorl %r8d, %r8d
callq 0x15e60
movl %r12d, %eax
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x2328c(%rip), %rdi     # 0x3725a
leaq 0x22698(%rip), %rsi     # 0x3666d
leaq 0x2328f(%rip), %rcx     # 0x3726b
movl $0x16d7, %edx           # imm = 0x16D7
callq 0x7140