// File: Ciaxur[P]yagb-emu/include/imgui/imgui_widgets.cpp
// Function: ImGui::DataTypeApplyOp(int, int, void*, void const*, void const*)
void ImGui::DataTypeApplyOp(ImGuiDataType data_type, int op, void* output, const void* arg1, const void* arg2)
{
    IM_ASSERT(op == '+' || op == '-');
    switch (data_type)
    {
        case ImGuiDataType_S8:
            if (op == '+') { *(ImS8*)output  = ImAddClampOverflow(*(const ImS8*)arg1,  *(const ImS8*)arg2,  IM_S8_MIN,  IM_S8_MAX); }
            if (op == '-') { *(ImS8*)output  = ImSubClampOverflow(*(const ImS8*)arg1,  *(const ImS8*)arg2,  IM_S8_MIN,  IM_S8_MAX); }
            return;
        case ImGuiDataType_U8:
            if (op == '+') { *(ImU8*)output  = ImAddClampOverflow(*(const ImU8*)arg1,  *(const ImU8*)arg2,  IM_U8_MIN,  IM_U8_MAX); }
            if (op == '-') { *(ImU8*)output  = ImSubClampOverflow(*(const ImU8*)arg1,  *(const ImU8*)arg2,  IM_U8_MIN,  IM_U8_MAX); }
            return;
        case ImGuiDataType_S16:
            if (op == '+') { *(ImS16*)output = ImAddClampOverflow(*(const ImS16*)arg1, *(const ImS16*)arg2, IM_S16_MIN, IM_S16_MAX); }
            if (op == '-') { *(ImS16*)output = ImSubClampOverflow(*(const ImS16*)arg1, *(const ImS16*)arg2, IM_S16_MIN, IM_S16_MAX); }
            return;
        case ImGuiDataType_U16:
            if (op == '+') { *(ImU16*)output = ImAddClampOverflow(*(const ImU16*)arg1, *(const ImU16*)arg2, IM_U16_MIN, IM_U16_MAX); }
            if (op == '-') { *(ImU16*)output = ImSubClampOverflow(*(const ImU16*)arg1, *(const ImU16*)arg2, IM_U16_MIN, IM_U16_MAX); }
            return;
        case ImGuiDataType_S32:
            if (op == '+') { *(ImS32*)output = ImAddClampOverflow(*(const ImS32*)arg1, *(const ImS32*)arg2, IM_S32_MIN, IM_S32_MAX); }
            if (op == '-') { *(ImS32*)output = ImSubClampOverflow(*(const ImS32*)arg1, *(const ImS32*)arg2, IM_S32_MIN, IM_S32_MAX); }
            return;
        case ImGuiDataType_U32:
            if (op == '+') { *(ImU32*)output = ImAddClampOverflow(*(const ImU32*)arg1, *(const ImU32*)arg2, IM_U32_MIN, IM_U32_MAX); }
            if (op == '-') { *(ImU32*)output = ImSubClampOverflow(*(const ImU32*)arg1, *(const ImU32*)arg2, IM_U32_MIN, IM_U32_MAX); }
            return;
        case ImGuiDataType_S64:
            if (op == '+') { *(ImS64*)output = ImAddClampOverflow(*(const ImS64*)arg1, *(const ImS64*)arg2, IM_S64_MIN, IM_S64_MAX); }
            if (op == '-') { *(ImS64*)output = ImSubClampOverflow(*(const ImS64*)arg1, *(const ImS64*)arg2, IM_S64_MIN, IM_S64_MAX); }
            return;
        case ImGuiDataType_U64:
            if (op == '+') { *(ImU64*)output = ImAddClampOverflow(*(const ImU64*)arg1, *(const ImU64*)arg2, IM_U64_MIN, IM_U64_MAX); }
            if (op == '-') { *(ImU64*)output = ImSubClampOverflow(*(const ImU64*)arg1, *(const ImU64*)arg2, IM_U64_MIN, IM_U64_MAX); }
            return;
        case ImGuiDataType_Float:
            if (op == '+') { *(float*)output = *(const float*)arg1 + *(const float*)arg2; }
            if (op == '-') { *(float*)output = *(const float*)arg1 - *(const float*)arg2; }
            return;
        case ImGuiDataType_Double:
            if (op == '+') { *(double*)output = *(const double*)arg1 + *(const double*)arg2; }
            if (op == '-') { *(double*)output = *(const double*)arg1 - *(const double*)arg2; }
            return;
        case ImGuiDataType_COUNT: break;
    }
    IM_ASSERT(0);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movl %edi, -0x4(%rbp)
movl %esi, -0x8(%rbp)
movq %rdx, -0x10(%rbp)
movq %rcx, -0x18(%rbp)
movq %r8, -0x20(%rbp)
movb $0x1, %al
cmpl $0x2b, -0x8(%rbp)
movb %al, -0x21(%rbp)
je 0x13fe8f
cmpl $0x2d, -0x8(%rbp)
sete %al
movb %al, -0x21(%rbp)
movb -0x21(%rbp), %al
testb $0x1, %al
jne 0x13fe98
jmp 0x13fe9a
jmp 0x13feb9
leaq 0x4eacb(%rip), %rdi     # 0x18e96c
leaq 0x4e538(%rip), %rsi     # 0x18e3e0
movl $0x72a, %edx            # imm = 0x72A
leaq 0x4eacf(%rip), %rcx     # 0x18e983
callq 0xd180
movl -0x4(%rbp), %eax
movq %rax, -0x30(%rbp)
subq $0xa, %rax
ja 0x14025c
movq -0x30(%rbp), %rax
leaq 0x4e39b(%rip), %rcx     # 0x18e270
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
cmpl $0x2b, -0x8(%rbp)
jne 0x13ff0d
movq -0x18(%rbp), %rax
movb (%rax), %sil
movq -0x20(%rbp), %rax
movl $0xffffff80, %edx       # imm = 0xFFFFFF80
movl $0x7f, %ecx
movsbl %sil, %edi
movsbl (%rax), %esi
callq 0x140290
movb %al, %cl
movq -0x10(%rbp), %rax
movb %cl, (%rax)
cmpl $0x2d, -0x8(%rbp)
jne 0x13ff3c
movq -0x18(%rbp), %rax
movb (%rax), %sil
movq -0x20(%rbp), %rax
movl $0xffffff80, %edx       # imm = 0xFFFFFF80
movl $0x7f, %ecx
movsbl %sil, %edi
movsbl (%rax), %esi
callq 0x140310
movb %al, %cl
movq -0x10(%rbp), %rax
movb %cl, (%rax)
jmp 0x14027b
cmpl $0x2b, -0x8(%rbp)
jne 0x13ff6d
movq -0x18(%rbp), %rax
movb (%rax), %sil
movq -0x20(%rbp), %rax
xorl %edx, %edx
movl $0xff, %ecx
movzbl %sil, %edi
movzbl (%rax), %esi
callq 0x140390
movb %al, %cl
movq -0x10(%rbp), %rax
movb %cl, (%rax)
cmpl $0x2d, -0x8(%rbp)
jne 0x13ff99
movq -0x18(%rbp), %rax
movb (%rax), %sil
movq -0x20(%rbp), %rax
xorl %edx, %edx
movl $0xff, %ecx
movzbl %sil, %edi
movzbl (%rax), %esi
callq 0x140410
movb %al, %cl
movq -0x10(%rbp), %rax
movb %cl, (%rax)
jmp 0x14027b
cmpl $0x2b, -0x8(%rbp)
jne 0x13ffce
movq -0x18(%rbp), %rax
movw (%rax), %si
movq -0x20(%rbp), %rax
movl $0xffff8000, %edx       # imm = 0xFFFF8000
movl $0x7fff, %ecx           # imm = 0x7FFF
movswl %si, %edi
movswl (%rax), %esi
callq 0x140490
movw %ax, %cx
movq -0x10(%rbp), %rax
movw %cx, (%rax)
cmpl $0x2d, -0x8(%rbp)
jne 0x13fffe
movq -0x18(%rbp), %rax
movw (%rax), %si
movq -0x20(%rbp), %rax
movl $0xffff8000, %edx       # imm = 0xFFFF8000
movl $0x7fff, %ecx           # imm = 0x7FFF
movswl %si, %edi
movswl (%rax), %esi
callq 0x140510
movw %ax, %cx
movq -0x10(%rbp), %rax
movw %cx, (%rax)
jmp 0x14027b
cmpl $0x2b, -0x8(%rbp)
jne 0x140030
movq -0x18(%rbp), %rax
movw (%rax), %si
movq -0x20(%rbp), %rax
xorl %edx, %edx
movl $0xffff, %ecx           # imm = 0xFFFF
movzwl %si, %edi
movzwl (%rax), %esi
callq 0x140590
movw %ax, %cx
movq -0x10(%rbp), %rax
movw %cx, (%rax)
cmpl $0x2d, -0x8(%rbp)
jne 0x14005d
movq -0x18(%rbp), %rax
movw (%rax), %si
movq -0x20(%rbp), %rax
xorl %edx, %edx
movl $0xffff, %ecx           # imm = 0xFFFF
movzwl %si, %edi
movzwl (%rax), %esi
callq 0x140610
movw %ax, %cx
movq -0x10(%rbp), %rax
movw %cx, (%rax)
jmp 0x14027b
cmpl $0x2b, -0x8(%rbp)
jne 0x14008b
movq -0x18(%rbp), %rax
movl (%rax), %edi
movq -0x20(%rbp), %rax
movl (%rax), %esi
movl $0x80000000, %edx       # imm = 0x80000000
movl $0x7fffffff, %ecx       # imm = 0x7FFFFFFF
callq 0x140690
movl %eax, %ecx
movq -0x10(%rbp), %rax
movl %ecx, (%rax)
cmpl $0x2d, -0x8(%rbp)
jne 0x1400b4
movq -0x18(%rbp), %rax
movl (%rax), %edi
movq -0x20(%rbp), %rax
movl (%rax), %esi
movl $0x80000000, %edx       # imm = 0x80000000
movl $0x7fffffff, %ecx       # imm = 0x7FFFFFFF
callq 0x1406f0
movl %eax, %ecx
movq -0x10(%rbp), %rax
movl %ecx, (%rax)
jmp 0x14027b
cmpl $0x2b, -0x8(%rbp)
jne 0x1400df
movq -0x18(%rbp), %rax
movl (%rax), %edi
movq -0x20(%rbp), %rax
movl (%rax), %esi
xorl %edx, %edx
movl $0xffffffff, %ecx       # imm = 0xFFFFFFFF
callq 0x140750
movl %eax, %ecx
movq -0x10(%rbp), %rax
movl %ecx, (%rax)
cmpl $0x2d, -0x8(%rbp)
jne 0x140105
movq -0x18(%rbp), %rax
movl (%rax), %edi
movq -0x20(%rbp), %rax
movl (%rax), %esi
xorl %edx, %edx
movl $0xffffffff, %ecx       # imm = 0xFFFFFFFF
callq 0x1407b0
movl %eax, %ecx
movq -0x10(%rbp), %rax
movl %ecx, (%rax)
jmp 0x14027b
cmpl $0x2b, -0x8(%rbp)
jne 0x140141
movq -0x18(%rbp), %rax
movq (%rax), %rdi
movq -0x20(%rbp), %rax
movq (%rax), %rsi
movabsq $-0x8000000000000000, %rdx # imm = 0x8000000000000000
movabsq $0x7fffffffffffffff, %rcx # imm = 0x7FFFFFFFFFFFFFFF
callq 0x140810
movq %rax, %rcx
movq -0x10(%rbp), %rax
movq %rcx, (%rax)
cmpl $0x2d, -0x8(%rbp)
jne 0x140178
movq -0x18(%rbp), %rax
movq (%rax), %rdi
movq -0x20(%rbp), %rax
movq (%rax), %rsi
movabsq $-0x8000000000000000, %rdx # imm = 0x8000000000000000
movabsq $0x7fffffffffffffff, %rcx # imm = 0x7FFFFFFFFFFFFFFF
callq 0x140880
movq %rax, %rcx
movq -0x10(%rbp), %rax
movq %rcx, (%rax)
jmp 0x14027b
cmpl $0x2b, -0x8(%rbp)
jne 0x1401ab
movq -0x18(%rbp), %rax
movq (%rax), %rdi
movq -0x20(%rbp), %rax
movq (%rax), %rsi
xorl %eax, %eax
movl %eax, %edx
movq $-0x1, %rcx
callq 0x1408f0
movq %rax, %rcx
movq -0x10(%rbp), %rax
movq %rcx, (%rax)
cmpl $0x2d, -0x8(%rbp)
jne 0x1401d9
movq -0x18(%rbp), %rax
movq (%rax), %rdi
movq -0x20(%rbp), %rax
movq (%rax), %rsi
xorl %eax, %eax
movl %eax, %edx
movq $-0x1, %rcx
callq 0x140960
movq %rax, %rcx
movq -0x10(%rbp), %rax
movq %rcx, (%rax)
jmp 0x14027b
cmpl $0x2b, -0x8(%rbp)
jne 0x1401fc
movq -0x18(%rbp), %rax
movss (%rax), %xmm0
movq -0x20(%rbp), %rax
addss (%rax), %xmm0
movq -0x10(%rbp), %rax
movss %xmm0, (%rax)
cmpl $0x2d, -0x8(%rbp)
jne 0x14021a
movq -0x18(%rbp), %rax
movss (%rax), %xmm0
movq -0x20(%rbp), %rax
subss (%rax), %xmm0
movq -0x10(%rbp), %rax
movss %xmm0, (%rax)
jmp 0x14027b
cmpl $0x2b, -0x8(%rbp)
jne 0x14023a
movq -0x18(%rbp), %rax
movsd (%rax), %xmm0
movq -0x20(%rbp), %rax
addsd (%rax), %xmm0
movq -0x10(%rbp), %rax
movsd %xmm0, (%rax)
cmpl $0x2d, -0x8(%rbp)
jne 0x140258
movq -0x18(%rbp), %rax
movsd (%rax), %xmm0
movq -0x20(%rbp), %rax
subsd (%rax), %xmm0
movq -0x10(%rbp), %rax
movsd %xmm0, (%rax)
jmp 0x14027b
jmp 0x14025c
leaq 0x34ea7(%rip), %rdi     # 0x17510a
leaq 0x4e176(%rip), %rsi     # 0x18e3e0
movl $0x757, %edx            # imm = 0x757
leaq 0x4e70d(%rip), %rcx     # 0x18e983
callq 0xd180
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)