// File: /workspace/github_cpp_makefile_star2_O1/Ciaxur[P]yagb-emu/include/imgui/imgui_demo.cpp
// Function: (anonymous namespace)::MyItem::CompareWithSortSpecs(void const*, void const*)
CompareWithSortSpecs(const void* lhs, const void* rhs)
    {
        const MyItem* a = (const MyItem*)lhs;
        const MyItem* b = (const MyItem*)rhs;
        for (int n = 0; n < s_current_sort_specs->SpecsCount; n++)
        {
            // Here we identify columns using the ColumnUserID value that we ourselves passed to TableSetupColumn()
            // We could also choose to identify columns based on their index (sort_spec->ColumnIndex), which is simpler!
            const ImGuiTableColumnSortSpecs* sort_spec = &s_current_sort_specs->Specs[n];
            int delta = 0;
            switch (sort_spec->ColumnUserID)
            {
            case MyItemColumnID_ID:             delta = (a->ID - b->ID);                break;
            case MyItemColumnID_Name:           delta = (strcmp(a->Name, b->Name));     break;
            case MyItemColumnID_Quantity:       delta = (a->Quantity - b->Quantity);    break;
            case MyItemColumnID_Description:    delta = (strcmp(a->Name, b->Name));     break;
            default: IM_ASSERT(0); break;
            }
            if (delta > 0)
                return (sort_spec->SortDirection == ImGuiSortDirection_Ascending) ? +1 : -1;
            if (delta < 0)
                return (sort_spec->SortDirection == ImGuiSortDirection_Ascending) ? -1 : +1;
        }

        // qsort() is instable so always return a way to differenciate items.
        // Your own compare function may want to avoid fallback on implicit sort specs e.g. a Name compare if it wasn't already part of the sort specs.
        return (a->ID - b->ID);
    }

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq 0x8b404(%rip), %rax     # 0xfeba0
movslq 0x8(%rax), %r13
testq %r13, %r13
setg %r12b
jle 0x73864
movq (%rax), %rbx
addq $0x8, %rbx
movq %r13, %r14
negq %r14
movl $0x1, %r15d
leaq 0x49941(%rip), %rcx     # 0xbd108
movq %rsi, -0x40(%rbp)
movq %rdi, -0x38(%rbp)
movl -0x8(%rbx), %eax
cmpq $0x4, %rax
ja 0x73880
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movq -0x38(%rbp), %rax
movq 0x8(%rax), %rdi
movq -0x40(%rbp), %rax
movq 0x8(%rax), %rsi
callq 0xc720
leaq 0x49907(%rip), %rcx     # 0xbd108
movq -0x38(%rbp), %rdi
movq -0x40(%rbp), %rsi
jmp 0x73817
movl 0x10(%rdi), %eax
subl 0x10(%rsi), %eax
jmp 0x73817
movl (%rdi), %eax
subl (%rsi), %eax
testl %eax, %eax
jle 0x73831
xorl %eax, %eax
cmpb $0x1, (%rbx)
sete %al
leal -0x1(,%rax,2), %eax
movl %eax, -0x2c(%rbp)
xorl %eax, %eax
jmp 0x73835
movb $0x1, %al
js 0x7385a
testb %al, %al
je 0x73864
cmpq %r13, %r15
setb %r12b
addq $0xc, %rbx
leaq (%r14,%r15), %rax
incq %rax
incq %r15
cmpq $0x1, %rax
jne 0x737cf
jmp 0x73864
xorl %eax, %eax
cmpb $0x1, (%rbx)
setne %al
jmp 0x73823
testb $0x1, %r12b
movl -0x2c(%rbp), %eax
jne 0x73871
movl (%rdi), %eax
subl (%rsi), %eax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x46865(%rip), %rdi     # 0xba0ec
leaq 0x49e29(%rip), %rsi     # 0xbd6b7
leaq 0x52bec(%rip), %rcx     # 0xc6481
movl $0xd00, %edx            # imm = 0xD00
callq 0xc140