// File: Ciaxur[P]yagb-emu/include/imgui/imgui_demo.cpp
// Function: ShowPlaceholderObject(char const*, int)
static void ShowPlaceholderObject(const char* prefix, int uid)
{
    // Use object uid as identifier. Most commonly you could also use the object pointer as a base ID.
    ImGui::PushID(uid);

    // Text and Tree nodes are less high than framed widgets, using AlignTextToFramePadding() we add vertical spacing to make the tree lines equal high.
    ImGui::TableNextRow();
    ImGui::TableSetColumnIndex(0);
    ImGui::AlignTextToFramePadding();
    bool node_open = ImGui::TreeNode("Object", "%s_%u", prefix, uid);
    ImGui::TableSetColumnIndex(1);
    ImGui::Text("my sailor is rich");

    if (node_open)
    {
        static float placeholder_members[8] = { 0.0f, 0.0f, 1.0f, 3.1416f, 100.0f, 999.0f };
        for (int i = 0; i < 8; i++)
        {
            ImGui::PushID(i); // Use field index as identifier.
            if (i < 2)
            {
                ShowPlaceholderObject("Child", 424242);
            }
            else
            {
                // Here we use a TreeNode to highlight on hover (we could use e.g. Selectable as well)
                ImGui::TableNextRow();
                ImGui::TableSetColumnIndex(0);
                ImGui::AlignTextToFramePadding();
                ImGuiTreeNodeFlags flags = ImGuiTreeNodeFlags_Leaf | ImGuiTreeNodeFlags_NoTreePushOnOpen | ImGuiTreeNodeFlags_Bullet;
                ImGui::TreeNodeEx("Field", flags, "Field_%d", i);

                ImGui::TableSetColumnIndex(1);
                ImGui::SetNextItemWidth(-FLT_MIN);
                if (i >= 5)
                    ImGui::InputFloat("##value", &placeholder_members[i], 1.0f);
                else
                    ImGui::DragFloat("##value", &placeholder_members[i], 0.01f);
                ImGui::NextColumn();
            }
            ImGui::PopID();
        }
        ImGui::TreePop();
    }
    ImGui::PopID();
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movl -0xc(%rbp), %edi
callq 0xdb550
xorl %edi, %edi
xorps %xmm0, %xmm0
callq 0x131530
xorl %edi, %edi
callq 0x131a20
callq 0x13da10
movq -0x8(%rbp), %rdx
movl -0xc(%rbp), %ecx
leaq 0x7a2da(%rip), %rdi     # 0x182fa5
leaq 0x7a2da(%rip), %rsi     # 0x182fac
movb $0x0, %al
callq 0x150dd0
andb $0x1, %al
movb %al, -0xd(%rbp)
movl $0x1, %edi
callq 0x131a20
leaq 0x7a2c3(%rip), %rdi     # 0x182fb2
movb $0x0, %al
callq 0x139160
testb $0x1, -0xd(%rbp)
je 0x108e10
movl $0x0, -0x14(%rbp)
cmpl $0x8, -0x14(%rbp)
jge 0x108e0b
movl -0x14(%rbp), %edi
callq 0xdb550
cmpl $0x2, -0x14(%rbp)
jge 0x108d35
leaq 0x75b1a(%rip), %rdi     # 0x17e840
movl $0x67932, %esi          # imm = 0x67932
callq 0x108c90
jmp 0x108df8
xorl %edi, %edi
xorps %xmm0, %xmm0
callq 0x131530
xorl %edi, %edi
callq 0x131a20
callq 0x13da10
movl $0x308, -0x18(%rbp)     # imm = 0x308
movl -0x18(%rbp), %esi
movl -0x14(%rbp), %ecx
leaq 0x7a265(%rip), %rdi     # 0x182fc4
leaq 0x7a264(%rip), %rdx     # 0x182fca
movb $0x0, %al
callq 0x151fe0
movl $0x1, %edi
callq 0x131a20
movss 0x69a59(%rip), %xmm0    # 0x1727d8
callq 0xc6860
cmpl $0x5, -0x14(%rbp)
jl 0x108dbe
movslq -0x14(%rbp), %rax
leaq 0x109eab(%rip), %rsi    # 0x212c40
shlq $0x2, %rax
addq %rax, %rsi
leaq 0x7a230(%rip), %rdi     # 0x182fd3
movss 0x67e91(%rip), %xmm0    # 0x170c3c
xorps %xmm1, %xmm1
leaq 0x86ef9(%rip), %rdx     # 0x18fcae
xorl %ecx, %ecx
callq 0x149f10
jmp 0x108df3
movslq -0x14(%rbp), %rax
leaq 0x109e77(%rip), %rsi    # 0x212c40
shlq $0x2, %rax
addq %rax, %rsi
leaq 0x7a1fc(%rip), %rdi     # 0x182fd3
movss 0x6f7e1(%rip), %xmm0    # 0x1785c0
xorps %xmm2, %xmm2
leaq 0x86ec5(%rip), %rdx     # 0x18fcae
xorl %ecx, %ecx
movaps %xmm2, %xmm1
callq 0x142f00
callq 0x136130
callq 0xdb640
movl -0x14(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x14(%rbp)
jmp 0x108d07
callq 0x1523d0
callq 0xdb640
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax,%rax)