// File: /workspace/github_cpp_makefile_star2_O1/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
movq %rcx, %rbx
movl %edx, %r14d
movq %rsi, %r12
movq %rdi, %r13
movq 0x3cfc9(%rip), %r15     # 0x55490
movq 0x1758(%r15), %rax
movb $0x1, 0x72(%rax)
movl 0x27a0(%r15), %ecx
movl %ecx, 0x1790(%r15)
movw $0x1, 0x1799(%r15)
movq %rax, 0x17a0(%r15)
movl $0x0, 0x1788(%r15)
decl 0x288(%rax)
decl 0x28c(%rax)
cmpl $0x1, %edx
movl %r8d, -0x2c(%rbp)
je 0x1853a
testl %r14d, %r14d
jne 0x18592
movl (%rbx), %r8d
testl %r9d, %r9d
js 0x1855f
leaq 0x26881(%rip), %rdx     # 0x3eda6
leaq -0x50(%rbp), %rdi
movl $0x20, %esi
movl %r9d, %ecx
xorl %eax, %eax
callq 0x86d8
jmp 0x18592
cvtss2sd (%rbx), %xmm0
testl %r9d, %r9d
js 0x1857b
leaq 0x26861(%rip), %rdx     # 0x3edab
leaq -0x50(%rbp), %rdi
movl $0x20, %esi
movl %r9d, %ecx
movb $0x1, %al
callq 0x86d8
jmp 0x18592
leaq 0x26321(%rip), %rdx     # 0x3e887
leaq -0x50(%rbp), %rdi
movl $0x20, %esi
movl %r8d, %ecx
xorl %eax, %eax
callq 0x86d8
jmp 0x18592
leaq 0x2780e(%rip), %rdx     # 0x3fd90
leaq -0x50(%rbp), %rdi
movl $0x20, %esi
movb $0x1, %al
callq 0x86d8
movss 0x8(%r13), %xmm0
subss (%r13), %xmm0
movss 0xc(%r13), %xmm1
subss 0x4(%r13), %xmm1
movss 0x1408(%r15), %xmm2
movss 0x140c(%r15), %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 0x18689
movl %eax, %r12d
movl 0x27a0(%r15), %ecx
movl 0x1790(%r15), %eax
testl %ecx, %ecx
je 0x1861e
cmpl %ecx, %eax
je 0x18633
movl $0x0, 0x27a0(%r15)
jmp 0x18633
movl -0x2c(%rbp), %ecx
cmpl %ecx, %eax
jne 0x1866a
movl %eax, 0x27a0(%r15)
movl %ecx, 0x1788(%r15)
testb %r12b, %r12b
je 0x18658
movq 0x3ce51(%rip), %rax     # 0x55490
movq 0x1ad0(%rax), %rsi
leaq -0x50(%rbp), %rdi
movl %r14d, %edx
movq %rbx, %rcx
xorl %r8d, %r8d
callq 0x1a74c
movl %r12d, %eax
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x25c01(%rip), %rdi     # 0x3e272
leaq 0x2500d(%rip), %rsi     # 0x3d685
leaq 0x25c04(%rip), %rcx     # 0x3e283
movl $0x16d7, %edx           # imm = 0x16D7
callq 0x7140