// File: /workspace/github_cpp_makefile_star2_O3/Ciaxur[P]yagb-emu/include/imgui/imgui_widgets.cpp
// Function: ImGui::DragBehavior(unsigned int, int, void*, float, void const*, void const*, char const*, int)
bool ImGui::DragBehavior(ImGuiID id, ImGuiDataType data_type, void* p_v, float v_speed, const void* p_min, const void* p_max, const char* format, ImGuiSliderFlags flags)
{
    // Read imgui.cpp "API BREAKING CHANGES" section for 1.78 if you hit this assert.
    IM_ASSERT((flags == 1 || (flags & ImGuiSliderFlags_InvalidMask_) == 0) && "Invalid ImGuiSliderFlags flags! Has the 'float power' argument been mistakenly cast to flags? Call function with ImGuiSliderFlags_Logarithmic flags instead.");

    ImGuiContext& g = *GImGui;
    if (g.ActiveId == id)
    {
        if (g.ActiveIdSource == ImGuiInputSource_Mouse && !g.IO.MouseDown[0])
            ClearActiveID();
        else if (g.ActiveIdSource == ImGuiInputSource_Nav && g.NavActivatePressedId == id && !g.ActiveIdIsJustActivated)
            ClearActiveID();
    }
    if (g.ActiveId != id)
        return false;
    if ((g.CurrentWindow->DC.ItemFlags & ImGuiItemFlags_ReadOnly) || (flags & ImGuiSliderFlags_ReadOnly))
        return false;

    switch (data_type)
    {
    case ImGuiDataType_S8:     { ImS32 v32 = (ImS32)*(ImS8*)p_v;  bool r = DragBehaviorT<ImS32, ImS32, float>(ImGuiDataType_S32, &v32, v_speed, p_min ? *(const ImS8*) p_min : IM_S8_MIN,  p_max ? *(const ImS8*)p_max  : IM_S8_MAX,  format, flags); if (r) *(ImS8*)p_v = (ImS8)v32; return r; }
    case ImGuiDataType_U8:     { ImU32 v32 = (ImU32)*(ImU8*)p_v;  bool r = DragBehaviorT<ImU32, ImS32, float>(ImGuiDataType_U32, &v32, v_speed, p_min ? *(const ImU8*) p_min : IM_U8_MIN,  p_max ? *(const ImU8*)p_max  : IM_U8_MAX,  format, flags); if (r) *(ImU8*)p_v = (ImU8)v32; return r; }
    case ImGuiDataType_S16:    { ImS32 v32 = (ImS32)*(ImS16*)p_v; bool r = DragBehaviorT<ImS32, ImS32, float>(ImGuiDataType_S32, &v32, v_speed, p_min ? *(const ImS16*)p_min : IM_S16_MIN, p_max ? *(const ImS16*)p_max : IM_S16_MAX, format, flags); if (r) *(ImS16*)p_v = (ImS16)v32; return r; }
    case ImGuiDataType_U16:    { ImU32 v32 = (ImU32)*(ImU16*)p_v; bool r = DragBehaviorT<ImU32, ImS32, float>(ImGuiDataType_U32, &v32, v_speed, p_min ? *(const ImU16*)p_min : IM_U16_MIN, p_max ? *(const ImU16*)p_max : IM_U16_MAX, format, flags); if (r) *(ImU16*)p_v = (ImU16)v32; return r; }
    case ImGuiDataType_S32:    return DragBehaviorT<ImS32, ImS32, float >(data_type, (ImS32*)p_v,  v_speed, p_min ? *(const ImS32* )p_min : IM_S32_MIN, p_max ? *(const ImS32* )p_max : IM_S32_MAX, format, flags);
    case ImGuiDataType_U32:    return DragBehaviorT<ImU32, ImS32, float >(data_type, (ImU32*)p_v,  v_speed, p_min ? *(const ImU32* )p_min : IM_U32_MIN, p_max ? *(const ImU32* )p_max : IM_U32_MAX, format, flags);
    case ImGuiDataType_S64:    return DragBehaviorT<ImS64, ImS64, double>(data_type, (ImS64*)p_v,  v_speed, p_min ? *(const ImS64* )p_min : IM_S64_MIN, p_max ? *(const ImS64* )p_max : IM_S64_MAX, format, flags);
    case ImGuiDataType_U64:    return DragBehaviorT<ImU64, ImS64, double>(data_type, (ImU64*)p_v,  v_speed, p_min ? *(const ImU64* )p_min : IM_U64_MIN, p_max ? *(const ImU64* )p_max : IM_U64_MAX, format, flags);
    case ImGuiDataType_Float:  return DragBehaviorT<float, float, float >(data_type, (float*)p_v,  v_speed, p_min ? *(const float* )p_min : -FLT_MAX,   p_max ? *(const float* )p_max : FLT_MAX,    format, flags);
    case ImGuiDataType_Double: return DragBehaviorT<double,double,double>(data_type, (double*)p_v, v_speed, p_min ? *(const double*)p_min : -DBL_MAX,   p_max ? *(const double*)p_max : DBL_MAX,    format, flags);
    case ImGuiDataType_COUNT:  break;
    }
    IM_ASSERT(0);
    return false;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rcx, %r11
movl 0x10(%rbp), %r10d
cmpl $0x1, %r10d
setne %al
testl $0x7000000f, %r10d      # imm = 0x7000000F
setne %cl
testb %cl, %al
jne 0x95c41
movq %rdx, %r13
movl %esi, %r15d
movl %edi, %ebx
leaq 0x66444(%rip), %rax     # 0xfbcd0
movq (%rax), %r12
cmpl %edi, 0x1b30(%r12)
jne 0x95900
movl 0x1b68(%r12), %eax
cmpl $0x2, %eax
je 0x958b8
cmpl $0x1, %eax
jne 0x95900
cmpb $0x0, 0x130(%r12)
je 0x958cd
jmp 0x95900
cmpl %ebx, 0x1ca8(%r12)
jne 0x95900
cmpb $0x0, 0x1b3c(%r12)
jne 0x95900
movq %r13, -0x40(%rbp)
movq %r9, %r14
movl %r10d, -0x34(%rbp)
movss %xmm0, -0x30(%rbp)
movq %r8, -0x48(%rbp)
movq %r11, %r13
callq 0x46130
movq %r13, %r11
movq -0x48(%rbp), %r8
movss -0x30(%rbp), %xmm0
movl -0x34(%rbp), %r10d
movq %r14, %r9
movq -0x40(%rbp), %r13
cmpl %ebx, 0x1b30(%r12)
jne 0x95929
movq 0x1ae0(%r12), %rax
movl $0x80, %ecx
andl 0x1cc(%rax), %ecx
movl %r10d, %eax
andl $0x200000, %eax         # imm = 0x200000
orl %ecx, %eax
je 0x9593a
xorl %eax, %eax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
cmpl $0x9, %r15d
ja 0x95c60
movl %r15d, %eax
leaq 0x3b582(%rip), %rcx     # 0xd0ed0
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movsbl (%r13), %eax
movl %eax, -0x2c(%rbp)
testq %r11, %r11
je 0x95b40
movsbl (%r11), %edx
jmp 0x95b45
testq %r11, %r11
je 0x95a33
movl (%r11), %edx
jmp 0x95a38
testq %r11, %r11
je 0x95a68
movsd (%r11), %xmm1
jmp 0x95a70
movswl (%r13), %eax
movl %eax, -0x2c(%rbp)
testq %r11, %r11
je 0x95aa5
movswl (%r11), %edx
jmp 0x95aaa
movzwl (%r13), %eax
movl %eax, -0x2c(%rbp)
testq %r11, %r11
je 0x95ad0
movzwl (%r11), %edx
jmp 0x95ad2
testq %r11, %r11
je 0x95b0c
movq (%r11), %rdx
jmp 0x95b0e
movzbl (%r13), %eax
movl %eax, -0x2c(%rbp)
testq %r11, %r11
je 0x95b50
movzbl (%r11), %edx
jmp 0x95b52
testq %r11, %r11
je 0x95ba5
movl (%r11), %edx
jmp 0x95ba7
movabsq $0x7fffffffffffffff, %rcx # imm = 0x7FFFFFFFFFFFFFFF
testq %r11, %r11
je 0x95bd7
movq (%r11), %rdx
jmp 0x95bdb
testq %r11, %r11
je 0x95c04
movss (%r11), %xmm1
jmp 0x95c0c
movl $0x80000000, %edx       # imm = 0x80000000
testq %r8, %r8
je 0x95a42
movl (%r8), %ecx
jmp 0x95a47
movl $0x7fffffff, %ecx       # imm = 0x7FFFFFFF
movl $0x4, %edi
movq %r13, %rsi
movq %r9, %r8
movl %r10d, %r9d
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0xa750b
movsd 0x3b558(%rip), %xmm1    # 0xd0fc8
testq %r8, %r8
je 0x95a7c
movsd (%r8), %xmm2
jmp 0x95a84
movsd 0x3b54c(%rip), %xmm2    # 0xd0fd0
movl $0x9, %edi
movq %r13, %rsi
movq %r9, %rdx
movl %r10d, %ecx
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0xa8b0b
movl $0xffff8000, %edx       # imm = 0xFFFF8000
testq %r8, %r8
je 0x95ab5
movswl (%r8), %ecx
jmp 0x95aba
movl $0x7fff, %ecx           # imm = 0x7FFF
leaq -0x2c(%rbp), %rsi
movl $0x4, %edi
movq %r9, %r8
movl %r10d, %r9d
callq 0xa750b
jmp 0x95af6
xorl %edx, %edx
testq %r8, %r8
je 0x95add
movzwl (%r8), %ecx
jmp 0x95ae2
movl $0xffff, %ecx           # imm = 0xFFFF
leaq -0x2c(%rbp), %rsi
movl $0x5, %edi
movq %r9, %r8
movl %r10d, %r9d
callq 0xa7922
testb %al, %al
je 0x9592b
movzwl -0x2c(%rbp), %ecx
movw %cx, (%r13)
jmp 0x9592b
xorl %edx, %edx
testq %r8, %r8
je 0x95b18
movq (%r8), %rcx
jmp 0x95b1f
movq $-0x1, %rcx
movl $0x7, %edi
movq %r13, %rsi
movq %r9, %r8
movl %r10d, %r9d
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0xa8217
movl $0xffffff80, %edx       # imm = 0xFFFFFF80
testq %r8, %r8
je 0x95b5d
movsbl (%r8), %ecx
jmp 0x95b62
xorl %edx, %edx
testq %r8, %r8
je 0x95b78
movzbl (%r8), %ecx
jmp 0x95b7d
movl $0x7f, %ecx
leaq -0x2c(%rbp), %rsi
movl $0x4, %edi
movq %r9, %r8
movl %r10d, %r9d
callq 0xa750b
jmp 0x95b91
movl $0xff, %ecx
leaq -0x2c(%rbp), %rsi
movl $0x5, %edi
movq %r9, %r8
movl %r10d, %r9d
callq 0xa7922
testb %al, %al
je 0x9592b
movb -0x2c(%rbp), %cl
movb %cl, (%r13)
jmp 0x9592b
xorl %edx, %edx
testq %r8, %r8
je 0x95bb1
movl (%r8), %ecx
jmp 0x95bb6
movl $0xffffffff, %ecx       # imm = 0xFFFFFFFF
movl $0x5, %edi
movq %r13, %rsi
movq %r9, %r8
movl %r10d, %r9d
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0xa7922
leaq 0x1(%rcx), %rdx
testq %r8, %r8
je 0x95be3
movq (%r8), %rcx
movl $0x6, %edi
movq %r13, %rsi
movq %r9, %r8
movl %r10d, %r9d
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0xa7dd8
movss 0x1fc9c(%rip), %xmm1    # 0xb58a8
testq %r8, %r8
je 0x95c18
movss (%r8), %xmm2
jmp 0x95c20
movss 0x1fc20(%rip), %xmm2    # 0xb5840
movl $0x8, %edi
movq %r13, %rsi
movq %r9, %rdx
movl %r10d, %ecx
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0xa86a5
leaq 0x3bac3(%rip), %rdi     # 0xd170b
leaq 0x3b3c9(%rip), %rsi     # 0xd1018
leaq 0x3bb94(%rip), %rcx     # 0xd17ea
movl $0x8aa, %edx            # imm = 0x8AA
callq 0xc140
leaq 0x22485(%rip), %rdi     # 0xb80ec
leaq 0x3b3aa(%rip), %rsi     # 0xd1018
leaq 0x3bb75(%rip), %rcx     # 0xd17ea
movl $0x8c7, %edx            # imm = 0x8C7
callq 0xc140