// File: Ciaxur[P]yagb-emu/include/imgui/imgui.cpp
// Function: ImGui::DebugNodeWindow(ImGuiWindow*, char const*)
void ImGui::DebugNodeWindow(ImGuiWindow* window, const char* label)
{
    if (window == NULL)
    {
        BulletText("%s: NULL", label);
        return;
    }

    ImGuiContext& g = *GImGui;
    const bool is_active = window->WasActive;
    ImGuiTreeNodeFlags tree_node_flags = (window == g.NavWindow) ? ImGuiTreeNodeFlags_Selected : ImGuiTreeNodeFlags_None;
    if (!is_active) { PushStyleColor(ImGuiCol_Text, GetStyleColorVec4(ImGuiCol_TextDisabled)); }
    const bool open = TreeNodeEx(label, tree_node_flags, "%s '%s'%s", label, window->Name, is_active ? "" : " *Inactive*");
    if (!is_active) { PopStyleColor(); }
    if (IsItemHovered() && is_active)
        GetForegroundDrawList(window)->AddRect(window->Pos, window->Pos + window->Size, IM_COL32(255, 255, 0, 255));
    if (!open)
        return;

    if (window->MemoryCompacted)
        TextDisabled("Note: some memory buffers have been compacted/freed.");

    ImGuiWindowFlags flags = window->Flags;
    DebugNodeDrawList(window, window->DrawList, "DrawList");
    BulletText("Pos: (%.1f,%.1f), Size: (%.1f,%.1f), ContentSize (%.1f,%.1f) Ideal (%.1f,%.1f)", window->Pos.x, window->Pos.y, window->Size.x, window->Size.y, window->ContentSize.x, window->ContentSize.y, window->ContentSizeIdeal.x, window->ContentSizeIdeal.y);
    BulletText("Flags: 0x%08X (%s%s%s%s%s%s%s%s%s..)", flags,
        (flags & ImGuiWindowFlags_ChildWindow)  ? "Child " : "",      (flags & ImGuiWindowFlags_Tooltip)     ? "Tooltip "   : "",  (flags & ImGuiWindowFlags_Popup) ? "Popup " : "",
        (flags & ImGuiWindowFlags_Modal)        ? "Modal " : "",      (flags & ImGuiWindowFlags_ChildMenu)   ? "ChildMenu " : "",  (flags & ImGuiWindowFlags_NoSavedSettings) ? "NoSavedSettings " : "",
        (flags & ImGuiWindowFlags_NoMouseInputs)? "NoMouseInputs":"", (flags & ImGuiWindowFlags_NoNavInputs) ? "NoNavInputs" : "", (flags & ImGuiWindowFlags_AlwaysAutoResize) ? "AlwaysAutoResize" : "");
    BulletText("Scroll: (%.2f/%.2f,%.2f/%.2f) Scrollbar:%s%s", window->Scroll.x, window->ScrollMax.x, window->Scroll.y, window->ScrollMax.y, window->ScrollbarX ? "X" : "", window->ScrollbarY ? "Y" : "");
    BulletText("Active: %d/%d, WriteAccessed: %d, BeginOrderWithinContext: %d", window->Active, window->WasActive, window->WriteAccessed, (window->Active || window->WasActive) ? window->BeginOrderWithinContext : -1);
    BulletText("Appearing: %d, Hidden: %d (CanSkip %d Cannot %d), SkipItems: %d", window->Appearing, window->Hidden, window->HiddenFramesCanSkipItems, window->HiddenFramesCannotSkipItems, window->SkipItems);
    BulletText("NavLastIds: 0x%08X,0x%08X, NavLayerActiveMask: %X", window->NavLastIds[0], window->NavLastIds[1], window->DC.NavLayerActiveMask);
    BulletText("NavLastChildNavWindow: %s", window->NavLastChildNavWindow ? window->NavLastChildNavWindow->Name : "NULL");
    if (!window->NavRectRel[0].IsInverted())
        BulletText("NavRectRel[0]: (%.1f,%.1f)(%.1f,%.1f)", window->NavRectRel[0].Min.x, window->NavRectRel[0].Min.y, window->NavRectRel[0].Max.x, window->NavRectRel[0].Max.y);
    else
        BulletText("NavRectRel[0]: <None>");
    if (window->RootWindow != window)       { DebugNodeWindow(window->RootWindow, "RootWindow"); }
    if (window->ParentWindow != NULL)       { DebugNodeWindow(window->ParentWindow, "ParentWindow"); }
    if (window->DC.ChildWindows.Size > 0)   { DebugNodeWindowsList(&window->DC.ChildWindows, "ChildWindows"); }
    if (window->ColumnsStorage.Size > 0 && TreeNode("Columns", "Columns sets (%d)", window->ColumnsStorage.Size))
    {
        for (int n = 0; n < window->ColumnsStorage.Size; n++)
            DebugNodeColumns(&window->ColumnsStorage[n]);
        TreePop();
    }
    DebugNodeStorage(&window->StateStorage, "Storage");
    TreePop();
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x88, %rsp
movq %rdi, -0x20(%rbp)
movq %rsi, -0x28(%rbp)
cmpq $0x0, -0x20(%rbp)
jne 0xe4bf6
movq -0x28(%rbp), %rsi
leaq 0x917a0(%rip), %rdi     # 0x17638a
movb $0x0, %al
callq 0x139ab0
jmp 0xe5230
movq 0x12e343(%rip), %rax    # 0x212f40
movq %rax, -0x30(%rbp)
movq -0x20(%rbp), %rax
movb 0x8f(%rax), %al
andb $0x1, %al
movb %al, -0x31(%rbp)
movq -0x20(%rbp), %rdx
movq -0x30(%rbp), %rax
movq 0x1c90(%rax), %rsi
xorl %eax, %eax
movl $0x1, %ecx
cmpq %rsi, %rdx
cmovel %ecx, %eax
movl %eax, -0x38(%rbp)
testb $0x1, -0x31(%rbp)
jne 0xe4c49
movl $0x1, %edi
callq 0xc77b0
movq %rax, %rsi
xorl %edi, %edi
callq 0xc78f0
movq -0x28(%rbp), %rdi
movl -0x38(%rbp), %esi
movq -0x28(%rbp), %rcx
movq -0x20(%rbp), %rax
movq (%rax), %r8
movb -0x31(%rbp), %dl
leaq 0x916e3(%rip), %r9      # 0x176348
leaq 0x8d29d(%rip), %rax     # 0x171f09
testb $0x1, %dl
cmovneq %rax, %r9
leaq 0x91719(%rip), %rdx     # 0x176393
movb $0x0, %al
callq 0x151fe0
andb $0x1, %al
movb %al, -0x39(%rbp)
testb $0x1, -0x31(%rbp)
jne 0xe4c96
movl $0x1, %edi
callq 0xc7990
xorl %edi, %edi
callq 0xca1c0
testb $0x1, %al
jne 0xe4ca3
jmp 0xe4cfa
testb $0x1, -0x31(%rbp)
je 0xe4cfa
movq -0x20(%rbp), %rdi
callq 0xec880
movq %rax, -0x60(%rbp)
movq -0x20(%rbp), %rsi
movq %rsi, %rdi
addq $0x10, %rdi
movq %rdi, -0x58(%rbp)
addq $0x18, %rsi
callq 0xc41b0
movq -0x60(%rbp), %rdi
movq -0x58(%rbp), %rsi
movlpd %xmm0, -0x44(%rbp)
leaq -0x44(%rbp), %rdx
movl $0xff00ffff, %ecx       # imm = 0xFF00FFFF
xorps %xmm0, %xmm0
movl $0xf, %r8d
movss 0x8bf47(%rip), %xmm1    # 0x170c3c
callq 0x112ef0
testb $0x1, -0x39(%rbp)
jne 0xe4d05
jmp 0xe5230
movq -0x20(%rbp), %rax
testb $0x1, 0x3e0(%rax)
je 0xe4d20
leaq 0x91684(%rip), %rdi     # 0x17639d
movb $0x0, %al
callq 0x1393f0
movq -0x20(%rbp), %rax
movl 0xc(%rax), %eax
movl %eax, -0x48(%rbp)
movq -0x20(%rbp), %rdi
movq -0x20(%rbp), %rax
movq 0x2b8(%rax), %rsi
leaq 0x90f83(%rip), %rdx     # 0x175cc3
callq 0xe38d0
movq -0x20(%rbp), %rax
movss 0x10(%rax), %xmm0
cvtss2sd %xmm0, %xmm0
movq -0x20(%rbp), %rax
movss 0x14(%rax), %xmm1
cvtss2sd %xmm1, %xmm1
movq -0x20(%rbp), %rax
movss 0x18(%rax), %xmm2
cvtss2sd %xmm2, %xmm2
movq -0x20(%rbp), %rax
movss 0x1c(%rax), %xmm3
cvtss2sd %xmm3, %xmm3
movq -0x20(%rbp), %rax
movss 0x28(%rax), %xmm4
cvtss2sd %xmm4, %xmm4
movq -0x20(%rbp), %rax
movss 0x2c(%rax), %xmm5
cvtss2sd %xmm5, %xmm5
movq -0x20(%rbp), %rax
movss 0x30(%rax), %xmm6
cvtss2sd %xmm6, %xmm6
movq -0x20(%rbp), %rax
movss 0x34(%rax), %xmm7
cvtss2sd %xmm7, %xmm7
leaq 0x9161e(%rip), %rdi     # 0x1763d2
movb $0x8, %al
callq 0x139ab0
movl -0x48(%rbp), %esi
movl -0x48(%rbp), %ecx
andl $0x1000000, %ecx        # imm = 0x1000000
leaq 0x8d13b(%rip), %rdx     # 0x171f09
leaq 0x91671(%rip), %rax     # 0x176446
cmpl $0x0, %ecx
cmovneq %rax, %rdx
movl -0x48(%rbp), %edi
andl $0x2000000, %edi        # imm = 0x2000000
leaq 0x8d11d(%rip), %rcx     # 0x171f09
leaq 0x9165a(%rip), %rax     # 0x17644d
cmpl $0x0, %edi
cmovneq %rax, %rcx
movl -0x48(%rbp), %edi
andl $0x4000000, %edi        # imm = 0x4000000
leaq 0x8d0ff(%rip), %r8      # 0x171f09
leaq 0x91645(%rip), %rax     # 0x176456
cmpl $0x0, %edi
cmovneq %rax, %r8
movl -0x48(%rbp), %edi
andl $0x8000000, %edi        # imm = 0x8000000
leaq 0x8d0e1(%rip), %r9      # 0x171f09
leaq 0x9162e(%rip), %rax     # 0x17645d
cmpl $0x0, %edi
cmovneq %rax, %r9
movl -0x48(%rbp), %edi
andl $0x10000000, %edi       # imm = 0x10000000
leaq 0x8d0c3(%rip), %r14     # 0x171f09
leaq 0x91617(%rip), %rax     # 0x176464
cmpl $0x0, %edi
cmovneq %rax, %r14
movl -0x48(%rbp), %edi
andl $0x100, %edi            # imm = 0x100
leaq 0x8d0a5(%rip), %rbx     # 0x171f09
leaq 0x91604(%rip), %rax     # 0x17646f
cmpl $0x0, %edi
cmovneq %rax, %rbx
movl -0x48(%rbp), %edi
andl $0x200, %edi            # imm = 0x200
leaq 0x8d087(%rip), %r11     # 0x171f09
leaq 0x915f7(%rip), %rax     # 0x176480
cmpl $0x0, %edi
cmovneq %rax, %r11
movl -0x48(%rbp), %edi
andl $0x40000, %edi          # imm = 0x40000
leaq 0x8d069(%rip), %r10     # 0x171f09
leaq 0x915e7(%rip), %rax     # 0x17648e
cmpl $0x0, %edi
cmovneq %rax, %r10
movl -0x48(%rbp), %r15d
andl $0x40, %r15d
leaq 0x8d04c(%rip), %rax     # 0x171f09
leaq 0x915d6(%rip), %rdi     # 0x17649a
cmpl $0x0, %r15d
cmovneq %rdi, %rax
leaq 0x9154e(%rip), %rdi     # 0x176421
movq %r14, (%rsp)
movq %rbx, 0x8(%rsp)
movq %r11, 0x10(%rsp)
movq %r10, 0x18(%rsp)
movq %rax, 0x20(%rsp)
movb $0x0, %al
callq 0x139ab0
movq -0x20(%rbp), %rax
movss 0x5c(%rax), %xmm0
cvtss2sd %xmm0, %xmm0
movq -0x20(%rbp), %rax
movss 0x64(%rax), %xmm1
cvtss2sd %xmm1, %xmm1
movq -0x20(%rbp), %rax
movss 0x60(%rax), %xmm2
cvtss2sd %xmm2, %xmm2
movq -0x20(%rbp), %rax
movss 0x68(%rax), %xmm3
cvtss2sd %xmm3, %xmm3
movq -0x20(%rbp), %rax
movb 0x8c(%rax), %cl
leaq 0x8cfd2(%rip), %rsi     # 0x171f09
leaq 0x9d240(%rip), %rax     # 0x18217e
testb $0x1, %cl
cmovneq %rax, %rsi
movq -0x20(%rbp), %rax
movb 0x8d(%rax), %cl
leaq 0x8cfb3(%rip), %rdx     # 0x171f09
leaq 0x9d22c(%rip), %rax     # 0x182189
testb $0x1, %cl
cmovneq %rax, %rdx
leaq 0x91540(%rip), %rdi     # 0x1764ab
movb $0x4, %al
callq 0x139ab0
movq -0x20(%rbp), %rax
movb 0x8e(%rax), %al
andb $0x1, %al
movzbl %al, %eax
movl %eax, -0x6c(%rbp)
movq -0x20(%rbp), %rax
movb 0x8f(%rax), %al
andb $0x1, %al
movzbl %al, %eax
movl %eax, -0x68(%rbp)
movq -0x20(%rbp), %rax
movb 0x90(%rax), %al
andb $0x1, %al
movzbl %al, %eax
movl %eax, -0x64(%rbp)
movq -0x20(%rbp), %rax
testb $0x1, 0x8e(%rax)
jne 0xe4fc2
movq -0x20(%rbp), %rax
testb $0x1, 0x8f(%rax)
je 0xe4fd2
movq -0x20(%rbp), %rax
movswl 0x9e(%rax), %eax
movl %eax, -0x70(%rbp)
jmp 0xe4fdc
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
movl %eax, -0x70(%rbp)
jmp 0xe4fdc
movl -0x64(%rbp), %ecx
movl -0x68(%rbp), %edx
movl -0x6c(%rbp), %esi
movl -0x70(%rbp), %r8d
leaq 0x914e8(%rip), %rdi     # 0x1764d8
movb $0x0, %al
callq 0x139ab0
movq -0x20(%rbp), %rax
movb 0x94(%rax), %al
andb $0x1, %al
movzbl %al, %esi
movq -0x20(%rbp), %rax
movb 0x95(%rax), %al
andb $0x1, %al
movzbl %al, %edx
movq -0x20(%rbp), %rax
movsbl 0xac(%rax), %ecx
movq -0x20(%rbp), %rax
movsbl 0xad(%rax), %r8d
movq -0x20(%rbp), %rax
movb 0x93(%rax), %al
andb $0x1, %al
movzbl %al, %r9d
leaq 0x914d3(%rip), %rdi     # 0x176516
movb $0x0, %al
callq 0x139ab0
movq -0x20(%rbp), %rax
movl 0x3b0(%rax), %esi
movq -0x20(%rbp), %rax
movl 0x3b4(%rax), %edx
movq -0x20(%rbp), %rax
movl 0x150(%rax), %ecx
leaq 0x914e7(%rip), %rdi     # 0x176556
movb $0x0, %al
callq 0x139ab0
movq -0x20(%rbp), %rax
cmpq $0x0, 0x3a8(%rax)
je 0xe5098
movq -0x20(%rbp), %rax
movq 0x3a8(%rax), %rax
movq (%rax), %rax
movq %rax, -0x78(%rbp)
jmp 0xe50a5
leaq 0x912ef(%rip), %rax     # 0x17638e
movq %rax, -0x78(%rbp)
jmp 0xe50a5
movq -0x78(%rbp), %rsi
leaq 0x914d8(%rip), %rdi     # 0x176588
movb $0x0, %al
callq 0x139ab0
movq -0x20(%rbp), %rdi
addq $0x3b8, %rdi            # imm = 0x3B8
callq 0xecc10
testb $0x1, %al
jne 0xe511b
movq -0x20(%rbp), %rax
movss 0x3b8(%rax), %xmm0
cvtss2sd %xmm0, %xmm0
movq -0x20(%rbp), %rax
movss 0x3bc(%rax), %xmm1
cvtss2sd %xmm1, %xmm1
movq -0x20(%rbp), %rax
movss 0x3c0(%rax), %xmm2
cvtss2sd %xmm2, %xmm2
movq -0x20(%rbp), %rax
movss 0x3c4(%rax), %xmm3
cvtss2sd %xmm3, %xmm3
leaq 0x91490(%rip), %rdi     # 0x1765a2
movb $0x4, %al
callq 0x139ab0
jmp 0xe5129
leaq 0x914a6(%rip), %rdi     # 0x1765c8
movb $0x0, %al
callq 0x139ab0
movq -0x20(%rbp), %rax
movq 0x390(%rax), %rax
cmpq -0x20(%rbp), %rax
je 0xe5151
movq -0x20(%rbp), %rax
movq 0x390(%rax), %rdi
leaq 0x8e72a(%rip), %rsi     # 0x173876
callq 0xe4bc0
movq -0x20(%rbp), %rax
cmpq $0x0, 0x388(%rax)
je 0xe5176
movq -0x20(%rbp), %rax
movq 0x388(%rax), %rdi
leaq 0xa72ad(%rip), %rsi     # 0x18c41e
callq 0xe4bc0
movq -0x20(%rbp), %rax
cmpl $0x0, 0x198(%rax)
jle 0xe51a1
movq -0x20(%rbp), %rdi
addq $0xd8, %rdi
addq $0xc0, %rdi
leaq 0x91442(%rip), %rsi     # 0x1765de
callq 0xe3830
movq -0x20(%rbp), %rax
cmpl $0x0, 0x2a0(%rax)
jle 0xe5214
movq -0x20(%rbp), %rax
movl 0x2a0(%rax), %edx
leaq 0x99e9f(%rip), %rdi     # 0x17f05e
leaq 0x91425(%rip), %rsi     # 0x1765eb
movb $0x0, %al
callq 0x150dd0
testb $0x1, %al
jne 0xe51d3
jmp 0xe5214
movl $0x0, -0x4c(%rbp)
movl -0x4c(%rbp), %eax
movq -0x20(%rbp), %rcx
cmpl 0x2a0(%rcx), %eax
jge 0xe520f
movq -0x20(%rbp), %rdi
addq $0x2a0, %rdi            # imm = 0x2A0
movl -0x4c(%rbp), %esi
callq 0xe9080
movq %rax, %rdi
callq 0xe46e0
movl -0x4c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x4c(%rbp)
jmp 0xe51da
callq 0x1523d0
movq -0x20(%rbp), %rdi
addq $0x290, %rdi            # imm = 0x290
leaq 0x913d7(%rip), %rsi     # 0x1765fd
callq 0xe4b10
callq 0x1523d0
addq $0x88, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
nop