// File: 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
subq $0x1a0, %rsp            # imm = 0x1A0
movl 0x10(%rbp), %eax
movl %edi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movq %rdx, -0x18(%rbp)
movss %xmm0, -0x1c(%rbp)
movq %rcx, -0x28(%rbp)
movq %r8, -0x30(%rbp)
movq %r9, -0x38(%rbp)
cmpl $0x1, 0x10(%rbp)
je 0x141a82
movl 0x10(%rbp), %ecx
andl $0x7000000f, %ecx       # imm = 0x7000000F
xorl %eax, %eax
cmpl $0x0, %ecx
movb %al, -0x5e(%rbp)
jne 0x141a89
movb $0x1, %al
movb %al, -0x5e(%rbp)
jmp 0x141a89
movb -0x5e(%rbp), %al
testb $0x1, %al
jne 0x141a92
jmp 0x141a94
jmp 0x141ab3
leaq 0x4d0d5(%rip), %rdi     # 0x18eb70
leaq 0x4c93e(%rip), %rsi     # 0x18e3e0
movl $0x8aa, %edx            # imm = 0x8AA
leaq 0x4d1a1(%rip), %rcx     # 0x18ec4f
callq 0xd180
leaq 0xd1486(%rip), %rax     # 0x212f40
movq (%rax), %rax
movq %rax, -0x40(%rbp)
movq -0x40(%rbp), %rax
movl 0x1b30(%rax), %eax
cmpl -0x8(%rbp), %eax
jne 0x141b23
movq -0x40(%rbp), %rax
cmpl $0x1, 0x1b68(%rax)
jne 0x141af1
movq -0x40(%rbp), %rax
testb $0x1, 0x130(%rax)
jne 0x141af1
callq 0xca040
jmp 0x141b21
movq -0x40(%rbp), %rax
cmpl $0x2, 0x1b68(%rax)
jne 0x141b1f
movq -0x40(%rbp), %rax
movl 0x1ca8(%rax), %eax
cmpl -0x8(%rbp), %eax
jne 0x141b1f
movq -0x40(%rbp), %rax
testb $0x1, 0x1b3c(%rax)
jne 0x141b1f
callq 0xca040
jmp 0x141b21
jmp 0x141b23
movq -0x40(%rbp), %rax
movl 0x1b30(%rax), %eax
cmpl -0x8(%rbp), %eax
je 0x141b3b
movb $0x0, -0x1(%rbp)
jmp 0x1422ac
movq -0x40(%rbp), %rax
movq 0x1ae0(%rax), %rax
movl 0x1cc(%rax), %eax
andl $0x80, %eax
cmpl $0x0, %eax
jne 0x141b63
movl 0x10(%rbp), %eax
andl $0x200000, %eax         # imm = 0x200000
cmpl $0x0, %eax
je 0x141b6c
movb $0x0, -0x1(%rbp)
jmp 0x1422ac
movl -0xc(%rbp), %eax
movq %rax, -0x68(%rbp)
subq $0xa, %rax
ja 0x14228d
movq -0x68(%rbp), %rax
leaq 0x4c76c(%rip), %rcx     # 0x18e2f4
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movq -0x18(%rbp), %rax
movsbl (%rax), %eax
movl %eax, -0x44(%rbp)
movss -0x1c(%rbp), %xmm0
movss %xmm0, -0x6c(%rbp)
cmpq $0x0, -0x28(%rbp)
je 0x141bb7
movq -0x28(%rbp), %rax
movb (%rax), %al
movb %al, -0x6d(%rbp)
jmp 0x141bbe
movb $-0x80, %al
movb %al, -0x6d(%rbp)
jmp 0x141bbe
movb -0x6d(%rbp), %al
movsbl %al, %eax
movl %eax, -0x74(%rbp)
cmpq $0x0, -0x30(%rbp)
je 0x141bd9
movq -0x30(%rbp), %rax
movb (%rax), %al
movb %al, -0x75(%rbp)
jmp 0x141be0
movb $0x7f, %al
movb %al, -0x75(%rbp)
jmp 0x141be0
movl -0x74(%rbp), %edx
movss -0x6c(%rbp), %xmm0
movb -0x75(%rbp), %al
movsbl %al, %ecx
movq -0x38(%rbp), %r8
movl 0x10(%rbp), %r9d
movl $0x4, %edi
leaq -0x44(%rbp), %rsi
callq 0x15bf80
andb $0x1, %al
movb %al, -0x45(%rbp)
testb $0x1, -0x45(%rbp)
je 0x141c1a
movl -0x44(%rbp), %eax
movb %al, %cl
movq -0x18(%rbp), %rax
movb %cl, (%rax)
movb -0x45(%rbp), %al
andb $0x1, %al
movb %al, -0x1(%rbp)
jmp 0x1422ac
movq -0x18(%rbp), %rax
movzbl (%rax), %eax
movl %eax, -0x4c(%rbp)
movss -0x1c(%rbp), %xmm0
movss %xmm0, -0x7c(%rbp)
cmpq $0x0, -0x28(%rbp)
je 0x141c4d
movq -0x28(%rbp), %rax
movb (%rax), %al
movb %al, -0x7d(%rbp)
jmp 0x141c54
xorl %eax, %eax
movb %al, -0x7d(%rbp)
jmp 0x141c54
movb -0x7d(%rbp), %al
movzbl %al, %eax
movl %eax, -0x84(%rbp)
cmpq $0x0, -0x30(%rbp)
je 0x141c75
movq -0x30(%rbp), %rax
movb (%rax), %al
movb %al, -0x85(%rbp)
jmp 0x141c7f
movb $-0x1, %al
movb %al, -0x85(%rbp)
jmp 0x141c7f
movl -0x84(%rbp), %edx
movss -0x7c(%rbp), %xmm0
movb -0x85(%rbp), %al
movzbl %al, %ecx
movq -0x38(%rbp), %r8
movl 0x10(%rbp), %r9d
movl $0x5, %edi
leaq -0x4c(%rbp), %rsi
callq 0x15c550
andb $0x1, %al
movb %al, -0x4d(%rbp)
testb $0x1, -0x4d(%rbp)
je 0x141cbf
movl -0x4c(%rbp), %eax
movb %al, %cl
movq -0x18(%rbp), %rax
movb %cl, (%rax)
movb -0x4d(%rbp), %al
andb $0x1, %al
movb %al, -0x1(%rbp)
jmp 0x1422ac
movq -0x18(%rbp), %rax
movswl (%rax), %eax
movl %eax, -0x54(%rbp)
movss -0x1c(%rbp), %xmm0
movss %xmm0, -0x8c(%rbp)
cmpq $0x0, -0x28(%rbp)
je 0x141cfa
movq -0x28(%rbp), %rax
movw (%rax), %ax
movw %ax, -0x8e(%rbp)
jmp 0x141d07
movw $0x8000, %ax            # imm = 0x8000
movw %ax, -0x8e(%rbp)
jmp 0x141d07
movw -0x8e(%rbp), %ax
cwtl
movl %eax, -0x94(%rbp)
cmpq $0x0, -0x30(%rbp)
je 0x141d2c
movq -0x30(%rbp), %rax
movw (%rax), %ax
movw %ax, -0x96(%rbp)
jmp 0x141d39
movw $0x7fff, %ax            # imm = 0x7FFF
movw %ax, -0x96(%rbp)
jmp 0x141d39
movl -0x94(%rbp), %edx
movss -0x8c(%rbp), %xmm0
movw -0x96(%rbp), %ax
movswl %ax, %ecx
movq -0x38(%rbp), %r8
movl 0x10(%rbp), %r9d
movl $0x4, %edi
leaq -0x54(%rbp), %rsi
callq 0x15bf80
andb $0x1, %al
movb %al, -0x55(%rbp)
testb $0x1, -0x55(%rbp)
je 0x141d7f
movl -0x54(%rbp), %eax
movw %ax, %cx
movq -0x18(%rbp), %rax
movw %cx, (%rax)
movb -0x55(%rbp), %al
andb $0x1, %al
movb %al, -0x1(%rbp)
jmp 0x1422ac
movq -0x18(%rbp), %rax
movzwl (%rax), %eax
movl %eax, -0x5c(%rbp)
movss -0x1c(%rbp), %xmm0
movss %xmm0, -0x9c(%rbp)
cmpq $0x0, -0x28(%rbp)
je 0x141dba
movq -0x28(%rbp), %rax
movw (%rax), %ax
movw %ax, -0x9e(%rbp)
jmp 0x141dc5
xorl %eax, %eax
movw %ax, -0x9e(%rbp)
jmp 0x141dc5
movw -0x9e(%rbp), %ax
movzwl %ax, %eax
movl %eax, -0xa4(%rbp)
cmpq $0x0, -0x30(%rbp)
je 0x141dec
movq -0x30(%rbp), %rax
movw (%rax), %ax
movw %ax, -0xa6(%rbp)
jmp 0x141df9
movw $0xffff, %ax            # imm = 0xFFFF
movw %ax, -0xa6(%rbp)
jmp 0x141df9
movl -0xa4(%rbp), %edx
movss -0x9c(%rbp), %xmm0
movw -0xa6(%rbp), %ax
movzwl %ax, %ecx
movq -0x38(%rbp), %r8
movl 0x10(%rbp), %r9d
movl $0x5, %edi
leaq -0x5c(%rbp), %rsi
callq 0x15c550
andb $0x1, %al
movb %al, -0x5d(%rbp)
testb $0x1, -0x5d(%rbp)
je 0x141e3f
movl -0x5c(%rbp), %eax
movw %ax, %cx
movq -0x18(%rbp), %rax
movw %cx, (%rax)
movb -0x5d(%rbp), %al
andb $0x1, %al
movb %al, -0x1(%rbp)
jmp 0x1422ac
movl -0xc(%rbp), %eax
movl %eax, -0xbc(%rbp)
movq -0x18(%rbp), %rax
movq %rax, -0xb8(%rbp)
movss -0x1c(%rbp), %xmm0
movss %xmm0, -0xac(%rbp)
cmpq $0x0, -0x28(%rbp)
je 0x141e82
movq -0x28(%rbp), %rax
movl (%rax), %eax
movl %eax, -0xc0(%rbp)
jmp 0x141e8f
movl $0x80000000, %eax       # imm = 0x80000000
movl %eax, -0xc0(%rbp)
jmp 0x141e8f
movl -0xc0(%rbp), %eax
movl %eax, -0xc4(%rbp)
cmpq $0x0, -0x30(%rbp)
je 0x141eb0
movq -0x30(%rbp), %rax
movl (%rax), %eax
movl %eax, -0xc8(%rbp)
jmp 0x141ebd
movl $0x7fffffff, %eax       # imm = 0x7FFFFFFF
movl %eax, -0xc8(%rbp)
jmp 0x141ebd
movl -0xc4(%rbp), %edx
movss -0xac(%rbp), %xmm0
movq -0xb8(%rbp), %rsi
movl -0xbc(%rbp), %edi
movl -0xc8(%rbp), %ecx
movq -0x38(%rbp), %r8
movl 0x10(%rbp), %r9d
callq 0x15bf80
andb $0x1, %al
movb %al, -0x1(%rbp)
jmp 0x1422ac
movl -0xc(%rbp), %eax
movl %eax, -0xdc(%rbp)
movq -0x18(%rbp), %rax
movq %rax, -0xd8(%rbp)
movss -0x1c(%rbp), %xmm0
movss %xmm0, -0xcc(%rbp)
cmpq $0x0, -0x28(%rbp)
je 0x141f2b
movq -0x28(%rbp), %rax
movl (%rax), %eax
movl %eax, -0xe0(%rbp)
jmp 0x141f35
xorl %eax, %eax
movl %eax, -0xe0(%rbp)
jmp 0x141f35
movl -0xe0(%rbp), %eax
movl %eax, -0xe4(%rbp)
cmpq $0x0, -0x30(%rbp)
je 0x141f56
movq -0x30(%rbp), %rax
movl (%rax), %eax
movl %eax, -0xe8(%rbp)
jmp 0x141f63
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
movl %eax, -0xe8(%rbp)
jmp 0x141f63
movl -0xe4(%rbp), %edx
movss -0xcc(%rbp), %xmm0
movq -0xd8(%rbp), %rsi
movl -0xdc(%rbp), %edi
movl -0xe8(%rbp), %ecx
movq -0x38(%rbp), %r8
movl 0x10(%rbp), %r9d
callq 0x15c550
andb $0x1, %al
movb %al, -0x1(%rbp)
jmp 0x1422ac
movl -0xc(%rbp), %eax
movl %eax, -0xfc(%rbp)
movq -0x18(%rbp), %rax
movq %rax, -0xf8(%rbp)
movss -0x1c(%rbp), %xmm0
movss %xmm0, -0xec(%rbp)
cmpq $0x0, -0x28(%rbp)
je 0x141fd3
movq -0x28(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x108(%rbp)
jmp 0x141fe6
movabsq $-0x8000000000000000, %rax # imm = 0x8000000000000000
movq %rax, -0x108(%rbp)
jmp 0x141fe6
movq -0x108(%rbp), %rax
movq %rax, -0x110(%rbp)
cmpq $0x0, -0x30(%rbp)
je 0x14200b
movq -0x30(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x118(%rbp)
jmp 0x14201e
movabsq $0x7fffffffffffffff, %rax # imm = 0x7FFFFFFFFFFFFFFF
movq %rax, -0x118(%rbp)
jmp 0x14201e
movq -0x110(%rbp), %rdx
movss -0xec(%rbp), %xmm0
movq -0xf8(%rbp), %rsi
movl -0xfc(%rbp), %edi
movq -0x118(%rbp), %rcx
movq -0x38(%rbp), %r8
movl 0x10(%rbp), %r9d
callq 0x15cb30
andb $0x1, %al
movb %al, -0x1(%rbp)
jmp 0x1422ac
movl -0xc(%rbp), %eax
movl %eax, -0x12c(%rbp)
movq -0x18(%rbp), %rax
movq %rax, -0x128(%rbp)
movss -0x1c(%rbp), %xmm0
movss %xmm0, -0x11c(%rbp)
cmpq $0x0, -0x28(%rbp)
je 0x142090
movq -0x28(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x138(%rbp)
jmp 0x14209b
xorl %eax, %eax
movq %rax, -0x138(%rbp)
jmp 0x14209b
movq -0x138(%rbp), %rax
movq %rax, -0x140(%rbp)
cmpq $0x0, -0x30(%rbp)
je 0x1420c0
movq -0x30(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x148(%rbp)
jmp 0x1420d0
movq $-0x1, %rax
movq %rax, -0x148(%rbp)
jmp 0x1420d0
movq -0x140(%rbp), %rdx
movss -0x11c(%rbp), %xmm0
movq -0x128(%rbp), %rsi
movl -0x12c(%rbp), %edi
movq -0x148(%rbp), %rcx
movq -0x38(%rbp), %r8
movl 0x10(%rbp), %r9d
callq 0x15d170
andb $0x1, %al
movb %al, -0x1(%rbp)
jmp 0x1422ac
movl -0xc(%rbp), %eax
movl %eax, -0x15c(%rbp)
movq -0x18(%rbp), %rax
movq %rax, -0x158(%rbp)
movss -0x1c(%rbp), %xmm0
movss %xmm0, -0x14c(%rbp)
cmpq $0x0, -0x28(%rbp)
je 0x142144
movq -0x28(%rbp), %rax
movss (%rax), %xmm0
movss %xmm0, -0x160(%rbp)
jmp 0x142156
movss 0x3060c(%rip), %xmm0    # 0x172758
movss %xmm0, -0x160(%rbp)
jmp 0x142156
movss -0x160(%rbp), %xmm0
movss %xmm0, -0x164(%rbp)
cmpq $0x0, -0x30(%rbp)
je 0x14217f
movq -0x30(%rbp), %rax
movss (%rax), %xmm0
movss %xmm0, -0x168(%rbp)
jmp 0x142191
movss 0x2fe2d(%rip), %xmm0    # 0x171fb4
movss %xmm0, -0x168(%rbp)
jmp 0x142191
movss -0x164(%rbp), %xmm1
movss -0x14c(%rbp), %xmm0
movq -0x158(%rbp), %rsi
movl -0x15c(%rbp), %edi
movss -0x168(%rbp), %xmm2
movq -0x38(%rbp), %rdx
movl 0x10(%rbp), %ecx
callq 0x15d930
andb $0x1, %al
movb %al, -0x1(%rbp)
jmp 0x1422ac
movl -0xc(%rbp), %eax
movl %eax, -0x17c(%rbp)
movq -0x18(%rbp), %rax
movq %rax, -0x178(%rbp)
movss -0x1c(%rbp), %xmm0
movss %xmm0, -0x16c(%rbp)
cmpq $0x0, -0x28(%rbp)
je 0x142206
movq -0x28(%rbp), %rax
movsd (%rax), %xmm0
movsd %xmm0, -0x188(%rbp)
jmp 0x142218
movsd 0x4c16a(%rip), %xmm0    # 0x18e378
movsd %xmm0, -0x188(%rbp)
jmp 0x142218
movsd -0x188(%rbp), %xmm0
movsd %xmm0, -0x190(%rbp)
cmpq $0x0, -0x30(%rbp)
je 0x142241
movq -0x30(%rbp), %rax
movsd (%rax), %xmm0
movsd %xmm0, -0x198(%rbp)
jmp 0x142253
movsd 0x4c137(%rip), %xmm0    # 0x18e380
movsd %xmm0, -0x198(%rbp)
jmp 0x142253
movsd -0x190(%rbp), %xmm1
movss -0x16c(%rbp), %xmm0
movq -0x178(%rbp), %rsi
movl -0x17c(%rbp), %edi
movsd -0x198(%rbp), %xmm2
movq -0x38(%rbp), %rdx
movl 0x10(%rbp), %ecx
callq 0x15df60
andb $0x1, %al
movb %al, -0x1(%rbp)
jmp 0x1422ac
jmp 0x14228d
leaq 0x32e76(%rip), %rdi     # 0x17510a
leaq 0x4c145(%rip), %rsi     # 0x18e3e0
movl $0x8c7, %edx            # imm = 0x8C7
leaq 0x4c9a8(%rip), %rcx     # 0x18ec4f
callq 0xd180
movb -0x1(%rbp), %al
andb $0x1, %al
addq $0x1a0, %rsp            # imm = 0x1A0
popq %rbp
retq
nopw (%rax,%rax)