// File: /workspace/github_cpp_makefile_star2_O1/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
cmpl $0x2b, %esi
je 0x969a1
cmpl $0x2d, %esi
jne 0x96d41
cmpl $0x9, %edi
ja 0x96d60
movl %edi, %eax
leaq 0x3c5c5(%rip), %rdi     # 0xd2f78
movslq (%rdi,%rax,4), %rax
addq %rdi, %rax
jmpq *%rax
cmpl $0x2b, %esi
jne 0x96a0f
movsbl (%rcx), %edi
movb (%r8), %al
movsbl %al, %eax
testb %al, %al
sets %r10b
movl $0xffffff80, %r9d       # imm = 0xFFFFFF80
subl %eax, %r9d
cmpl %edi, %r9d
setg %r11b
movb $-0x80, %r9b
testb %r11b, %r10b
jne 0x96a0c
movl $0x7f, %r9d
movl $0x7f, %r10d
subl %eax, %r10d
leal (%rdi,%rax), %r11d
cmpl %edi, %r10d
movzbl %r11b, %edi
cmovgel %edi, %r9d
testb %al, %al
cmovlel %edi, %r9d
movb %r9b, (%rdx)
cmpl $0x2d, %esi
jne 0x96d3f
movsbl (%rcx), %ecx
movb (%r8), %al
movsbl %al, %eax
testb %al, %al
setg %dil
movl %eax, %esi
orl $-0x80, %esi
cmpl %ecx, %esi
setg %r8b
movb $-0x80, %sil
testb %r8b, %dil
jne 0x96a57
movl %eax, %esi
addl $0x7f, %esi
movl %ecx, %edi
subb %al, %dil
cmpl %ecx, %esi
movzbl %dil, %ecx
movl $0x7f, %esi
cmovgel %ecx, %esi
testb %al, %al
cmovnsl %ecx, %esi
movb %sil, (%rdx)
jmp 0x96d3f
cmpl $0x2b, %esi
jne 0x96aa8
movl (%rcx), %r9d
movl (%r8), %edi
testl %edi, %edi
sets %r10b
movl $0x80000000, %eax       # imm = 0x80000000
movl $0x80000000, %r11d      # imm = 0x80000000
subl %edi, %r11d
cmpl %r9d, %r11d
setg %r11b
testb %r11b, %r10b
jne 0x96aa6
movl $0x7fffffff, %eax       # imm = 0x7FFFFFFF
movl %edi, %r10d
xorl %eax, %r10d
leal (%rdi,%r9), %r11d
cmpl %r9d, %r10d
cmovgel %r11d, %eax
testl %edi, %edi
cmovlel %r11d, %eax
movl %eax, (%rdx)
cmpl $0x2d, %esi
jne 0x96d3f
movl (%rcx), %ecx
movl (%r8), %eax
testl %eax, %eax
setg %dil
movl %eax, %esi
orl $0x80000000, %esi       # imm = 0x80000000
cmpl %ecx, %esi
setg %r8b
movl $0x80000000, %esi       # imm = 0x80000000
testb %r8b, %dil
jne 0x96aee
movl $0x7fffffff, %esi       # imm = 0x7FFFFFFF
leal (%rax,%rsi), %edi
movl %ecx, %r8d
subl %eax, %r8d
cmpl %ecx, %edi
cmovgel %r8d, %esi
testl %eax, %eax
cmovnsl %r8d, %esi
movl %esi, (%rdx)
jmp 0x96d3f
cmpl $0x2b, %esi
jne 0x96b07
movsd (%rcx), %xmm0
addsd (%r8), %xmm0
movsd %xmm0, (%rdx)
cmpl $0x2d, %esi
jne 0x96d3f
movsd (%rcx), %xmm0
subsd (%r8), %xmm0
movsd %xmm0, (%rdx)
jmp 0x96d3f
cmpl $0x2b, %esi
jne 0x96b77
movswl (%rcx), %edi
movzwl (%r8), %eax
cwtl
testw %ax, %ax
sets %r10b
movl $0xffff8000, %r9d       # imm = 0xFFFF8000
subl %eax, %r9d
cmpl %edi, %r9d
setg %r11b
movw $0x8000, %r9w           # imm = 0x8000
testb %r11b, %r10b
jne 0x96b73
movl $0x7fff, %r9d           # imm = 0x7FFF
movl $0x7fff, %r10d          # imm = 0x7FFF
subl %eax, %r10d
movl %eax, %r11d
addl %edi, %r11d
cmpl %edi, %r10d
cmovgel %r11d, %r9d
testw %ax, %ax
cmovlel %r11d, %r9d
movw %r9w, (%rdx)
cmpl $0x2d, %esi
jne 0x96d3f
movswl (%rcx), %ecx
movzwl (%r8), %eax
cwtl
testw %ax, %ax
setg %dil
movl %eax, %esi
orl $0xffff8000, %esi       # imm = 0xFFFF8000
cmpl %ecx, %esi
setg %r8b
movw $0x8000, %si            # imm = 0x8000
testb %r8b, %dil
jne 0x96bc1
movl $0x7fff, %esi           # imm = 0x7FFF
movl %ecx, %edi
subl %eax, %edi
movl %eax, %r8d
addl %esi, %r8d
cmpl %ecx, %r8d
cmovgel %edi, %esi
testw %ax, %ax
cmovnsl %edi, %esi
movw %si, (%rdx)
jmp 0x96d3f
cmpl $0x2b, %esi
jne 0x96be0
movzwl (%r8), %eax
addw (%rcx), %ax
movl $0xffff, %edi           # imm = 0xFFFF
cmovael %eax, %edi
movw %di, (%rdx)
cmpl $0x2d, %esi
jne 0x96d3f
movzwl (%rcx), %eax
xorl %ecx, %ecx
subw (%r8), %ax
cmovbl %ecx, %eax
movw %ax, (%rdx)
jmp 0x96d3f
cmpl $0x2b, %esi
jne 0x96c16
movq (%r8), %rax
addq (%rcx), %rax
movq $-0x1, %rdi
cmovaeq %rax, %rdi
movq %rdi, (%rdx)
cmpl $0x2d, %esi
jne 0x96d3f
movq (%rcx), %rax
xorl %ecx, %ecx
subq (%r8), %rax
cmovaeq %rax, %rcx
movq %rcx, (%rdx)
jmp 0x96d3f
cmpl $0x2b, %esi
jne 0x96c4b
movb (%r8), %al
addb (%rcx), %al
movzbl %al, %eax
movl $0xff, %edi
cmovael %eax, %edi
movb %dil, (%rdx)
cmpl $0x2d, %esi
jne 0x96d3f
movb (%rcx), %al
xorl %ecx, %ecx
subb (%r8), %al
movzbl %al, %eax
cmovbl %ecx, %eax
movb %al, (%rdx)
jmp 0x96d3f
cmpl $0x2b, %esi
jne 0x96c7c
movl (%r8), %eax
addl (%rcx), %eax
movl $0xffffffff, %edi       # imm = 0xFFFFFFFF
cmovael %eax, %edi
movl %edi, (%rdx)
cmpl $0x2d, %esi
jne 0x96d3f
movl (%rcx), %eax
xorl %ecx, %ecx
subl (%r8), %eax
cmovbl %ecx, %eax
movl %eax, (%rdx)
jmp 0x96d3f
movabsq $0x7fffffffffffffff, %rax # imm = 0x7FFFFFFFFFFFFFFF
cmpl $0x2b, %esi
jne 0x96cdd
movq (%rcx), %r9
movq (%r8), %rdi
testq %rdi, %rdi
jns 0x96cbf
leaq 0x1(%rax), %r10
movq %r10, %r11
subq %rdi, %r11
cmpq %r9, %r11
jg 0x96cda
movq %rax, %r10
subq %rdi, %r10
leaq (%rdi,%r9), %r11
cmpq %r9, %r10
movq %r11, %r10
cmovlq %rax, %r10
testq %rdi, %rdi
cmovleq %r11, %r10
movq %r10, (%rdx)
cmpl $0x2d, %esi
jne 0x96d3f
movq (%rcx), %rsi
movq (%r8), %rcx
testq %rcx, %rcx
jle 0x96d24
leaq (%rcx,%rax), %rdi
incq %rdi
cmpq %rsi, %rdi
jle 0x96d24
incq %rax
jmp 0x96d3c
cmpl $0x2b, %esi
jne 0x96d10
movss (%rcx), %xmm0
addss (%r8), %xmm0
movss %xmm0, (%rdx)
cmpl $0x2d, %esi
jne 0x96d3f
movss (%rcx), %xmm0
subss (%r8), %xmm0
movss %xmm0, (%rdx)
jmp 0x96d3f
leaq (%rcx,%rax), %rdi
movq %rsi, %r8
subq %rcx, %r8
cmpq %rsi, %rdi
cmovgeq %r8, %rax
testq %rcx, %rcx
cmovnsq %r8, %rax
movq %rax, (%rdx)
popq %rbp
retq
leaq 0x3c98c(%rip), %rdi     # 0xd36d4
leaq 0x3c3f9(%rip), %rsi     # 0xd3148
leaq 0x3c995(%rip), %rcx     # 0xd36eb
movl $0x72a, %edx            # imm = 0x72A
callq 0xc140
leaq 0x23385(%rip), %rdi     # 0xba0ec
leaq 0x3c3da(%rip), %rsi     # 0xd3148
leaq 0x3c976(%rip), %rcx     # 0xd36eb
movl $0x757, %edx            # imm = 0x757
callq 0xc140