// File: Ciaxur[P]yagb-emu/include/imgui/imgui_demo.cpp
// Function: ShowDemoWindowWidgets()::Funcs::MyCallback(ImGuiInputTextCallbackData*)
static int MyCallback(ImGuiInputTextCallbackData* data)
                {
                    if (data->EventFlag == ImGuiInputTextFlags_CallbackCompletion)
                    {
                        data->InsertChars(data->CursorPos, "..");
                    }
                    else if (data->EventFlag == ImGuiInputTextFlags_CallbackHistory)
                    {
                        if (data->EventKey == ImGuiKey_UpArrow)
                        {
                            data->DeleteChars(0, data->BufTextLen);
                            data->InsertChars(0, "Pressed Up!");
                            data->SelectAll();
                        }
                        else if (data->EventKey == ImGuiKey_DownArrow)
                        {
                            data->DeleteChars(0, data->BufTextLen);
                            data->InsertChars(0, "Pressed Down!");
                            data->SelectAll();
                        }
                    }
                    else if (data->EventFlag == ImGuiInputTextFlags_CallbackEdit)
                    {
                        // Toggle casing of first character
                        char c = data->Buf[0];
                        if ((c >= 'a' && c <= 'z') || (c >= 'A' && c <= 'Z')) data->Buf[0] ^= 32;
                        data->BufDirty = true;

                        // Increment a counter
                        int* p_int = (int*)data->UserData;
                        *p_int = *p_int + 1;
                    }
                    return 0;
                }

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
cmpl $0x40, (%rax)
jne 0x107535
movq -0x8(%rbp), %rdi
movq -0x8(%rbp), %rax
movl 0x2c(%rax), %esi
leaq 0x7a7d0(%rip), %rdx     # 0x181cf7
xorl %eax, %eax
movl %eax, %ecx
callq 0x14b4e0
jmp 0x107631
movq -0x8(%rbp), %rax
cmpl $0x80, (%rax)
jne 0x1075bd
movq -0x8(%rbp), %rax
cmpl $0x3, 0x14(%rax)
jne 0x10757e
movq -0x8(%rbp), %rdi
movq -0x8(%rbp), %rax
movl 0x20(%rax), %edx
xorl %esi, %esi
callq 0x14b3d0
movq -0x8(%rbp), %rdi
xorl %esi, %esi
leaq 0x7647e(%rip), %rdx     # 0x17d9e8
xorl %eax, %eax
movl %eax, %ecx
callq 0x14b4e0
movq -0x8(%rbp), %rdi
callq 0x109270
jmp 0x1075bb
movq -0x8(%rbp), %rax
cmpl $0x4, 0x14(%rax)
jne 0x1075b9
movq -0x8(%rbp), %rdi
movq -0x8(%rbp), %rax
movl 0x20(%rax), %edx
xorl %esi, %esi
callq 0x14b3d0
movq -0x8(%rbp), %rdi
xorl %esi, %esi
leaq 0x7644d(%rip), %rdx     # 0x17d9f4
xorl %eax, %eax
movl %eax, %ecx
callq 0x14b4e0
movq -0x8(%rbp), %rdi
callq 0x109270
jmp 0x1075bb
jmp 0x10762f
movq -0x8(%rbp), %rax
cmpl $0x80000, (%rax)        # imm = 0x80000
jne 0x10762d
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rax
movb (%rax), %al
movb %al, -0x9(%rbp)
movsbl -0x9(%rbp), %eax
cmpl $0x61, %eax
jl 0x1075e8
movsbl -0x9(%rbp), %eax
cmpl $0x7a, %eax
jle 0x1075fa
movsbl -0x9(%rbp), %eax
cmpl $0x41, %eax
jl 0x10760a
movsbl -0x9(%rbp), %eax
cmpl $0x5a, %eax
jg 0x10760a
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rax
movsbl (%rax), %ecx
xorl $0x20, %ecx
movb %cl, (%rax)
movq -0x8(%rbp), %rax
movb $0x1, 0x28(%rax)
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rax
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rax
movl (%rax), %ecx
addl $0x1, %ecx
movq -0x18(%rbp), %rax
movl %ecx, (%rax)
jmp 0x10762f
jmp 0x107631
xorl %eax, %eax
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax)