// File: /workspace/github_cpp_makefile_star2_O2/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), %r13d
cmpl $0x1, %r13d
setne %al
testl $0x7000000f, %r13d      # imm = 0x7000000F
setne %cl
testb %cl, %al
jne 0x7ed32
movq %r9, %r10
movq %rdx, %r14
movl %esi, %r15d
movl %edi, %ebx
leaq 0x65339(%rip), %rax     # 0xe3ce0
movq (%rax), %r12
cmpl %edi, 0x1b30(%r12)
jne 0x7ea15
movl 0x1b68(%r12), %eax
cmpl $0x2, %eax
je 0x7e9d3
cmpl $0x1, %eax
jne 0x7ea15
cmpb $0x0, 0x130(%r12)
je 0x7e9e8
jmp 0x7ea15
cmpl %ebx, 0x1ca8(%r12)
jne 0x7ea15
cmpb $0x0, 0x1b3c(%r12)
jne 0x7ea15
movq %r14, -0x38(%rbp)
movq %r10, -0x48(%rbp)
movss %xmm0, -0x30(%rbp)
movq %r8, -0x40(%rbp)
movq %r11, %r14
callq 0x37444
movq %r14, %r11
movq -0x40(%rbp), %r8
movss -0x30(%rbp), %xmm0
movq -0x48(%rbp), %r10
movq -0x38(%rbp), %r14
cmpl %ebx, 0x1b30(%r12)
jne 0x7ea3e
movq 0x1ae0(%r12), %rax
movl $0x80, %ecx
andl 0x1cc(%rax), %ecx
movl %r13d, %eax
andl $0x200000, %eax         # imm = 0x200000
orl %ecx, %eax
je 0x7ea4f
xorl %eax, %eax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
cmpl $0x9, %r15d
ja 0x7ed51
movl %r15d, %eax
leaq 0x397dd(%rip), %rcx     # 0xb8240
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movsbl (%r14), %eax
movl %eax, -0x2c(%rbp)
testq %r11, %r11
je 0x7ec42
movsbl (%r11), %edx
jmp 0x7ec45
testq %r11, %r11
je 0x7eb44
movl (%r11), %edx
jmp 0x7eb49
testq %r11, %r11
je 0x7eb77
movsd (%r11), %xmm1
jmp 0x7eb7f
movswl (%r14), %eax
movl %eax, -0x2c(%rbp)
testq %r11, %r11
je 0x7ebb2
movswl (%r11), %edx
jmp 0x7ebb7
movzwl (%r14), %eax
movl %eax, -0x2c(%rbp)
testq %r11, %r11
je 0x7ebdb
movzwl (%r11), %edx
jmp 0x7ebdd
testq %r11, %r11
je 0x7ec14
movq (%r11), %rdx
jmp 0x7ec16
movzbl (%r14), %eax
movl %eax, -0x2c(%rbp)
testq %r11, %r11
je 0x7ec50
movzbl (%r11), %edx
jmp 0x7ec52
testq %r11, %r11
je 0x7ec9e
movl (%r11), %edx
jmp 0x7eca0
movabsq $0x7fffffffffffffff, %rcx # imm = 0x7FFFFFFFFFFFFFFF
testq %r11, %r11
je 0x7eccc
movq (%r11), %rdx
jmp 0x7ecd0
testq %r11, %r11
je 0x7ecf7
movss (%r11), %xmm1
jmp 0x7ecff
movl $0x80000000, %edx       # imm = 0x80000000
testq %r8, %r8
je 0x7eb53
movl (%r8), %ecx
jmp 0x7eb58
movl $0x7fffffff, %ecx       # imm = 0x7FFFFFFF
pushq $0x4
popq %rdi
movq %r14, %rsi
movq %r10, %r8
movl %r13d, %r9d
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x8eac2
movsd 0x397b9(%rip), %xmm1    # 0xb8338
testq %r8, %r8
je 0x7eb8b
movsd (%r8), %xmm2
jmp 0x7eb93
movsd 0x397ad(%rip), %xmm2    # 0xb8340
pushq $0x9
popq %rdi
movq %r14, %rsi
movq %r10, %rdx
movl %r13d, %ecx
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x8fed4
movl $0xffff8000, %edx       # imm = 0xFFFF8000
testq %r8, %r8
je 0x7ebc2
movswl (%r8), %ecx
jmp 0x7ebc7
movl $0x7fff, %ecx           # imm = 0x7FFF
pushq $0x4
popq %rdi
leaq -0x2c(%rbp), %rsi
movq %r10, %r8
movl %r13d, %r9d
callq 0x8eac2
jmp 0x7ebff
xorl %edx, %edx
testq %r8, %r8
je 0x7ebe8
movzwl (%r8), %ecx
jmp 0x7ebed
movl $0xffff, %ecx           # imm = 0xFFFF
pushq $0x5
popq %rdi
leaq -0x2c(%rbp), %rsi
movq %r10, %r8
movl %r13d, %r9d
callq 0x8ee88
testb %al, %al
je 0x7ea40
movzwl -0x2c(%rbp), %ecx
movw %cx, (%r14)
jmp 0x7ea40
xorl %edx, %edx
testq %r8, %r8
je 0x7ec20
movq (%r8), %rcx
jmp 0x7ec23
pushq $-0x1
popq %rcx
pushq $0x7
popq %rdi
movq %r14, %rsi
movq %r10, %r8
movl %r13d, %r9d
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x8f65a
pushq $-0x80
popq %rdx
testq %r8, %r8
je 0x7ec5d
movsbl (%r8), %ecx
jmp 0x7ec60
xorl %edx, %edx
testq %r8, %r8
je 0x7ec74
movzbl (%r8), %ecx
jmp 0x7ec79
pushq $0x7f
popq %rcx
pushq $0x4
popq %rdi
leaq -0x2c(%rbp), %rsi
movq %r10, %r8
movl %r13d, %r9d
callq 0x8eac2
jmp 0x7ec8b
movl $0xff, %ecx
pushq $0x5
popq %rdi
leaq -0x2c(%rbp), %rsi
movq %r10, %r8
movl %r13d, %r9d
callq 0x8ee88
testb %al, %al
je 0x7ea40
movb -0x2c(%rbp), %cl
movb %cl, (%r14)
jmp 0x7ea40
xorl %edx, %edx
testq %r8, %r8
je 0x7ecaa
movl (%r8), %ecx
jmp 0x7ecad
pushq $-0x1
popq %rcx
pushq $0x5
popq %rdi
movq %r14, %rsi
movq %r10, %r8
movl %r13d, %r9d
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x8ee88
leaq 0x1(%rcx), %rdx
testq %r8, %r8
je 0x7ecd8
movq (%r8), %rcx
pushq $0x6
popq %rdi
movq %r14, %rsi
movq %r10, %r8
movl %r13d, %r9d
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x8f273
movss 0x1dbd9(%rip), %xmm1    # 0x9c8d8
testq %r8, %r8
je 0x7ed0b
movss (%r8), %xmm2
jmp 0x7ed13
movss 0x1db5d(%rip), %xmm2    # 0x9c870
pushq $0x8
popq %rdi
movq %r14, %rsi
movq %r10, %rdx
movl %r13d, %ecx
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x8fa9f
leaq 0x39d42(%rip), %rdi     # 0xb8a7b
leaq 0x39648(%rip), %rsi     # 0xb8388
leaq 0x39e13(%rip), %rcx     # 0xb8b5a
movl $0x8aa, %edx            # imm = 0x8AA
callq 0xc140
leaq 0x203c4(%rip), %rdi     # 0x9f11c
leaq 0x39629(%rip), %rsi     # 0xb8388
leaq 0x39df4(%rip), %rcx     # 0xb8b5a
movl $0x8c7, %edx            # imm = 0x8C7
callq 0xc140