// File: /workspace/github_cpp_makefile_star2_O3/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 %rdi, %r13
movq 0x3d4e7(%rip), %rbx     # 0x55480
movq 0x1758(%rbx), %rax
movb $0x1, 0x72(%rax)
movl 0x27a0(%rbx), %ecx
movl %ecx, 0x1790(%rbx)
movw $0x1, 0x1799(%rbx)
movq %rax, 0x17a0(%rbx)
movl $0x0, 0x1788(%rbx)
decl 0x288(%rax)
decl 0x28c(%rax)
cmpl $0x1, %edx
je 0x1800c
testl %r14d, %r14d
jne 0x18068
movq -0x30(%rbp), %rax
movl (%rax), %r8d
testl %r9d, %r9d
js 0x18035
leaq 0x26ddf(%rip), %rdx     # 0x3edd6
leaq -0x50(%rbp), %rdi
movl $0x20, %esi
movl %r9d, %ecx
xorl %eax, %eax
callq 0x8678
jmp 0x18068
movq -0x30(%rbp), %rax
cvtss2sd (%rax), %xmm0
testl %r9d, %r9d
js 0x18051
leaq 0x26dbb(%rip), %rdx     # 0x3eddb
leaq -0x50(%rbp), %rdi
movl $0x20, %esi
movl %r9d, %ecx
movb $0x1, %al
callq 0x8678
jmp 0x18068
leaq 0x2687b(%rip), %rdx     # 0x3e8b7
leaq -0x50(%rbp), %rdi
movl $0x20, %esi
movl %r8d, %ecx
xorl %eax, %eax
callq 0x8678
jmp 0x18068
leaq 0x27cb8(%rip), %rdx     # 0x3fd10
leaq -0x50(%rbp), %rdi
movl $0x20, %esi
movb $0x1, %al
callq 0x8678
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)
movq $0x0, (%rsp)
leaq -0x50(%rbp), %rsi
movq %r12, %rdi
movl $0x20, %edx
movl $0x11, %r8d
xorl %r9d, %r9d
callq 0x18159
movl %eax, %r12d
movl 0x27a0(%rbx), %eax
movl 0x1790(%rbx), %ecx
testl %eax, %eax
je 0x180ef
cmpl %eax, %ecx
je 0x18102
movl $0x0, 0x27a0(%rbx)
jmp 0x18102
cmpl %r15d, %ecx
jne 0x1813a
movl %r15d, 0x27a0(%rbx)
movl %r15d, 0x1788(%rbx)
testb %r12b, %r12b
je 0x18128
movq 0x3d372(%rip), %rax     # 0x55480
movq 0x1ad0(%rax), %rsi
leaq -0x50(%rbp), %rdi
movl %r14d, %edx
movq -0x30(%rbp), %rcx
xorl %r8d, %r8d
callq 0x1a381
movl %r12d, %eax
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x26161(%rip), %rdi     # 0x3e2a2
leaq 0x2556d(%rip), %rsi     # 0x3d6b5
leaq 0x26164(%rip), %rcx     # 0x3e2b3
movl $0x16d7, %edx           # imm = 0x16D7
callq 0x7140