// File: /workspace/github_cpp_makefile_star2_O1/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 0x97881
movq %rdx, %r13
movl %esi, %r15d
movl %edi, %ebx
leaq 0x66807(%rip), %rax     # 0xfdcd0
movq (%rax), %r12
cmpl %edi, 0x1b30(%r12)
jne 0x97540
movl 0x1b68(%r12), %eax
cmpl $0x2, %eax
je 0x974f8
cmpl $0x1, %eax
jne 0x97540
cmpb $0x1, 0x130(%r12)
jne 0x9750d
cmpl $0x2, %eax
jne 0x97540
cmpl %ebx, 0x1ca8(%r12)
jne 0x97540
cmpb $0x0, 0x1b3c(%r12)
jne 0x97540
movq %r13, -0x40(%rbp)
movq %r9, %r14
movl %r10d, -0x34(%rbp)
movss %xmm0, -0x30(%rbp)
movq %r8, -0x48(%rbp)
movq %r11, %r13
callq 0x46c46
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 0x97569
movq 0x1ae0(%r12), %rax
movl $0x80, %ecx
andl 0x1cc(%rax), %ecx
movl %r10d, %eax
andl $0x200000, %eax         # imm = 0x200000
orl %ecx, %eax
je 0x9757a
xorl %eax, %eax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
cmpl $0x9, %r15d
ja 0x978a0
movl %r15d, %eax
leaq 0x3ba72(%rip), %rcx     # 0xd3000
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movsbl (%r13), %eax
movl %eax, -0x2c(%rbp)
testq %r11, %r11
je 0x97780
movsbl (%r11), %edx
jmp 0x97785
testq %r11, %r11
je 0x97673
movl (%r11), %edx
jmp 0x97678
testq %r11, %r11
je 0x976a8
movsd (%r11), %xmm1
jmp 0x976b0
movswl (%r13), %eax
movl %eax, -0x2c(%rbp)
testq %r11, %r11
je 0x976e5
movswl (%r11), %edx
jmp 0x976ea
movzwl (%r13), %eax
movl %eax, -0x2c(%rbp)
testq %r11, %r11
je 0x97710
movzwl (%r11), %edx
jmp 0x97712
testq %r11, %r11
je 0x9774c
movq (%r11), %rdx
jmp 0x9774e
movzbl (%r13), %eax
movl %eax, -0x2c(%rbp)
testq %r11, %r11
je 0x97790
movzbl (%r11), %edx
jmp 0x97792
testq %r11, %r11
je 0x977e5
movl (%r11), %edx
jmp 0x977e7
movabsq $0x7fffffffffffffff, %rcx # imm = 0x7FFFFFFFFFFFFFFF
testq %r11, %r11
je 0x97817
movq (%r11), %rdx
jmp 0x9781b
testq %r11, %r11
je 0x97844
movss (%r11), %xmm1
jmp 0x9784c
movl $0x80000000, %edx       # imm = 0x80000000
testq %r8, %r8
je 0x97682
movl (%r8), %ecx
jmp 0x97687
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 0xa9011
movsd 0x3ba48(%rip), %xmm1    # 0xd30f8
testq %r8, %r8
je 0x976bc
movsd (%r8), %xmm2
jmp 0x976c4
movsd 0x3ba3c(%rip), %xmm2    # 0xd3100
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 0xaa557
movl $0xffff8000, %edx       # imm = 0xFFFF8000
testq %r8, %r8
je 0x976f5
movswl (%r8), %ecx
jmp 0x976fa
movl $0x7fff, %ecx           # imm = 0x7FFF
leaq -0x2c(%rbp), %rsi
movl $0x4, %edi
movq %r9, %r8
movl %r10d, %r9d
callq 0xa9011
jmp 0x97736
xorl %edx, %edx
testq %r8, %r8
je 0x9771d
movzwl (%r8), %ecx
jmp 0x97722
movl $0xffff, %ecx           # imm = 0xFFFF
leaq -0x2c(%rbp), %rsi
movl $0x5, %edi
movq %r9, %r8
movl %r10d, %r9d
callq 0xa9400
testb %al, %al
je 0x9756b
movzwl -0x2c(%rbp), %ecx
movw %cx, (%r13)
jmp 0x9756b
xorl %edx, %edx
testq %r8, %r8
je 0x97758
movq (%r8), %rcx
jmp 0x9775f
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 0xa9c8d
movl $0xffffff80, %edx       # imm = 0xFFFFFF80
testq %r8, %r8
je 0x9779d
movsbl (%r8), %ecx
jmp 0x977a2
xorl %edx, %edx
testq %r8, %r8
je 0x977b8
movzbl (%r8), %ecx
jmp 0x977bd
movl $0x7f, %ecx
leaq -0x2c(%rbp), %rsi
movl $0x4, %edi
movq %r9, %r8
movl %r10d, %r9d
callq 0xa9011
jmp 0x977d1
movl $0xff, %ecx
leaq -0x2c(%rbp), %rsi
movl $0x5, %edi
movq %r9, %r8
movl %r10d, %r9d
callq 0xa9400
testb %al, %al
je 0x9756b
movb -0x2c(%rbp), %cl
movb %cl, (%r13)
jmp 0x9756b
xorl %edx, %edx
testq %r8, %r8
je 0x977f1
movl (%r8), %ecx
jmp 0x977f6
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 0xa9400
leaq 0x1(%rcx), %rdx
testq %r8, %r8
je 0x97823
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 0xa986a
movss 0x2005c(%rip), %xmm1    # 0xb78a8
testq %r8, %r8
je 0x97858
movss (%r8), %xmm2
jmp 0x97860
movss 0x1ffe0(%rip), %xmm2    # 0xb7840
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 0xaa0f1
leaq 0x3bfb3(%rip), %rdi     # 0xd383b
leaq 0x3b8b9(%rip), %rsi     # 0xd3148
leaq 0x3c084(%rip), %rcx     # 0xd391a
movl $0x8aa, %edx            # imm = 0x8AA
callq 0xc140
leaq 0x22845(%rip), %rdi     # 0xba0ec
leaq 0x3b89a(%rip), %rsi     # 0xd3148
leaq 0x3c065(%rip), %rcx     # 0xd391a
movl $0x8c7, %edx            # imm = 0x8C7
callq 0xc140