// File: Ciaxur[P]yagb-emu/include/imgui/imgui.cpp
// Function: ImGui::NavUpdateWindowing()
static void ImGui::NavUpdateWindowing()
{
    ImGuiContext& g = *GImGui;
    ImGuiWindow* apply_focus_window = NULL;
    bool apply_toggle_layer = false;

    ImGuiWindow* modal_window = GetTopMostPopupModal();
    bool allow_windowing = (modal_window == NULL);
    if (!allow_windowing)
        g.NavWindowingTarget = NULL;

    // Fade out
    if (g.NavWindowingTargetAnim && g.NavWindowingTarget == NULL)
    {
        g.NavWindowingHighlightAlpha = ImMax(g.NavWindowingHighlightAlpha - g.IO.DeltaTime * 10.0f, 0.0f);
        if (g.DimBgRatio <= 0.0f && g.NavWindowingHighlightAlpha <= 0.0f)
            g.NavWindowingTargetAnim = NULL;
    }

    // Start CTRL-TAB or Square+L/R window selection
    bool start_windowing_with_gamepad = allow_windowing && !g.NavWindowingTarget && IsNavInputTest(ImGuiNavInput_Menu, ImGuiInputReadMode_Pressed);
    bool start_windowing_with_keyboard = allow_windowing && !g.NavWindowingTarget && g.IO.KeyCtrl && IsKeyPressedMap(ImGuiKey_Tab) && (g.IO.ConfigFlags & ImGuiConfigFlags_NavEnableKeyboard);
    if (start_windowing_with_gamepad || start_windowing_with_keyboard)
        if (ImGuiWindow* window = g.NavWindow ? g.NavWindow : FindWindowNavFocusable(g.WindowsFocusOrder.Size - 1, -INT_MAX, -1))
        {
            g.NavWindowingTarget = g.NavWindowingTargetAnim = window->RootWindow; // FIXME-DOCK: Will need to use RootWindowDockStop
            g.NavWindowingTimer = g.NavWindowingHighlightAlpha = 0.0f;
            g.NavWindowingToggleLayer = start_windowing_with_keyboard ? false : true;
            g.NavInputSource = start_windowing_with_keyboard ? ImGuiInputSource_NavKeyboard : ImGuiInputSource_NavGamepad;
        }

    // Gamepad update
    g.NavWindowingTimer += g.IO.DeltaTime;
    if (g.NavWindowingTarget && g.NavInputSource == ImGuiInputSource_NavGamepad)
    {
        // Highlight only appears after a brief time holding the button, so that a fast tap on PadMenu (to toggle NavLayer) doesn't add visual noise
        g.NavWindowingHighlightAlpha = ImMax(g.NavWindowingHighlightAlpha, ImSaturate((g.NavWindowingTimer - NAV_WINDOWING_HIGHLIGHT_DELAY) / 0.05f));

        // Select window to focus
        const int focus_change_dir = (int)IsNavInputTest(ImGuiNavInput_FocusPrev, ImGuiInputReadMode_RepeatSlow) - (int)IsNavInputTest(ImGuiNavInput_FocusNext, ImGuiInputReadMode_RepeatSlow);
        if (focus_change_dir != 0)
        {
            NavUpdateWindowingHighlightWindow(focus_change_dir);
            g.NavWindowingHighlightAlpha = 1.0f;
        }

        // Single press toggles NavLayer, long press with L/R apply actual focus on release (until then the window was merely rendered top-most)
        if (!IsNavInputDown(ImGuiNavInput_Menu))
        {
            g.NavWindowingToggleLayer &= (g.NavWindowingHighlightAlpha < 1.0f); // Once button was held long enough we don't consider it a tap-to-toggle-layer press anymore.
            if (g.NavWindowingToggleLayer && g.NavWindow)
                apply_toggle_layer = true;
            else if (!g.NavWindowingToggleLayer)
                apply_focus_window = g.NavWindowingTarget;
            g.NavWindowingTarget = NULL;
        }
    }

    // Keyboard: Focus
    if (g.NavWindowingTarget && g.NavInputSource == ImGuiInputSource_NavKeyboard)
    {
        // Visuals only appears after a brief time after pressing TAB the first time, so that a fast CTRL+TAB doesn't add visual noise
        g.NavWindowingHighlightAlpha = ImMax(g.NavWindowingHighlightAlpha, ImSaturate((g.NavWindowingTimer - NAV_WINDOWING_HIGHLIGHT_DELAY) / 0.05f)); // 1.0f
        if (IsKeyPressedMap(ImGuiKey_Tab, true))
            NavUpdateWindowingHighlightWindow(g.IO.KeyShift ? +1 : -1);
        if (!g.IO.KeyCtrl)
            apply_focus_window = g.NavWindowingTarget;
    }

    // Keyboard: Press and Release ALT to toggle menu layer
    // FIXME: We lack an explicit IO variable for "is the imgui window focused", so compare mouse validity to detect the common case of backend clearing releases all keys on ALT-TAB
    if (IsNavInputTest(ImGuiNavInput_KeyMenu_, ImGuiInputReadMode_Pressed))
        g.NavWindowingToggleLayer = true;
    if ((g.ActiveId == 0 || g.ActiveIdAllowOverlap) && g.NavWindowingToggleLayer && IsNavInputTest(ImGuiNavInput_KeyMenu_, ImGuiInputReadMode_Released))
        if (IsMousePosValid(&g.IO.MousePos) == IsMousePosValid(&g.IO.MousePosPrev))
            apply_toggle_layer = true;

    // Move window
    if (g.NavWindowingTarget && !(g.NavWindowingTarget->Flags & ImGuiWindowFlags_NoMove))
    {
        ImVec2 move_delta;
        if (g.NavInputSource == ImGuiInputSource_NavKeyboard && !g.IO.KeyShift)
            move_delta = GetNavInputAmount2d(ImGuiNavDirSourceFlags_Keyboard, ImGuiInputReadMode_Down);
        if (g.NavInputSource == ImGuiInputSource_NavGamepad)
            move_delta = GetNavInputAmount2d(ImGuiNavDirSourceFlags_PadLStick, ImGuiInputReadMode_Down);
        if (move_delta.x != 0.0f || move_delta.y != 0.0f)
        {
            const float NAV_MOVE_SPEED = 800.0f;
            const float move_speed = ImFloor(NAV_MOVE_SPEED * g.IO.DeltaTime * ImMin(g.IO.DisplayFramebufferScale.x, g.IO.DisplayFramebufferScale.y)); // FIXME: Doesn't handle variable framerate very well
            ImGuiWindow* moving_window = g.NavWindowingTarget->RootWindow;
            SetWindowPos(moving_window, moving_window->Pos + move_delta * move_speed, ImGuiCond_Always);
            MarkIniSettingsDirty(moving_window);
            g.NavDisableMouseHover = true;
        }
    }

    // Apply final focus
    if (apply_focus_window && (g.NavWindow == NULL || apply_focus_window != g.NavWindow->RootWindow))
    {
        ClearActiveID();
        g.NavDisableHighlight = false;
        g.NavDisableMouseHover = true;
        apply_focus_window = NavRestoreLastChildNavWindow(apply_focus_window);
        ClosePopupsOverWindow(apply_focus_window, false);
        FocusWindow(apply_focus_window);
        if (apply_focus_window->NavLastIds[0] == 0)
            NavInitWindow(apply_focus_window, false);

        // If the window only has a menu layer, select it directly
        if (apply_focus_window->DC.NavLayerActiveMask == (1 << ImGuiNavLayer_Menu))
            g.NavLayer = ImGuiNavLayer_Menu;
    }
    if (apply_focus_window)
        g.NavWindowingTarget = NULL;

    // Apply menu/layer toggle
    if (apply_toggle_layer && g.NavWindow)
    {
        // Move to parent menu if necessary
        ImGuiWindow* new_nav_window = g.NavWindow;
        while (new_nav_window->ParentWindow
            && (new_nav_window->DC.NavLayerActiveMask & (1 << ImGuiNavLayer_Menu)) == 0
            && (new_nav_window->Flags & ImGuiWindowFlags_ChildWindow) != 0
            && (new_nav_window->Flags & (ImGuiWindowFlags_Popup | ImGuiWindowFlags_ChildMenu)) == 0)
            new_nav_window = new_nav_window->ParentWindow;
        if (new_nav_window != g.NavWindow)
        {
            ImGuiWindow* old_nav_window = g.NavWindow;
            FocusWindow(new_nav_window);
            new_nav_window->NavLastChildNavWindow = old_nav_window;
        }
        g.NavDisableHighlight = false;
        g.NavDisableMouseHover = true;

        // When entering a regular menu bar with the Alt key, we always reinitialize the navigation ID.
        const ImGuiNavLayer new_nav_layer = (g.NavWindow->DC.NavLayerActiveMask & (1 << ImGuiNavLayer_Menu)) ? (ImGuiNavLayer)((int)g.NavLayer ^ 1) : ImGuiNavLayer_Main;
        NavRestoreLayer(new_nav_layer);
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0xc0, %rsp
movq 0x12c47e(%rip), %rax    # 0x212f40
movq %rax, -0x8(%rbp)
movq $0x0, -0x10(%rbp)
movb $0x0, -0x11(%rbp)
callq 0xcbca0
movq %rax, -0x20(%rbp)
cmpq $0x0, -0x20(%rbp)
sete %al
andb $0x1, %al
movb %al, -0x21(%rbp)
testb $0x1, -0x21(%rbp)
jne 0xe6afd
movq -0x8(%rbp), %rax
movq $0x0, 0x1dc0(%rax)
movq -0x8(%rbp), %rax
cmpq $0x0, 0x1dc8(%rax)
je 0xe6b94
movq -0x8(%rbp), %rax
cmpq $0x0, 0x1dc0(%rax)
jne 0xe6b94
movq -0x8(%rbp), %rax
movss 0x1ddc(%rax), %xmm1
movq -0x8(%rbp), %rax
movss 0x18(%rax), %xmm0
movd %xmm0, %eax
xorl $0x80000000, %eax       # imm = 0x80000000
movd %eax, %xmm0
movss 0x8b495(%rip), %xmm2    # 0x171fdc
mulss %xmm2, %xmm0
addss %xmm1, %xmm0
xorps %xmm1, %xmm1
callq 0xc88c0
movq -0x8(%rbp), %rax
movss %xmm0, 0x1ddc(%rax)
movq -0x8(%rbp), %rax
xorps %xmm0, %xmm0
ucomiss 0x1e68(%rax), %xmm0
jb 0xe6b92
movq -0x8(%rbp), %rax
xorps %xmm0, %xmm0
ucomiss 0x1ddc(%rax), %xmm0
jb 0xe6b92
movq -0x8(%rbp), %rax
movq $0x0, 0x1dc8(%rax)
jmp 0xe6b94
xorl %eax, %eax
testb $0x1, -0x21(%rbp)
movb %al, -0x85(%rbp)
je 0xe6bcd
movq -0x8(%rbp), %rcx
xorl %eax, %eax
cmpq $0x0, 0x1dc0(%rcx)
movb %al, -0x85(%rbp)
jne 0xe6bcd
movl $0x3, %edi
movl $0x1, %esi
callq 0xee780
movb %al, -0x85(%rbp)
movb -0x85(%rbp), %al
andb $0x1, %al
movb %al, -0x22(%rbp)
xorl %eax, %eax
testb $0x1, -0x21(%rbp)
movb %al, -0x86(%rbp)
je 0xe6c44
movq -0x8(%rbp), %rcx
xorl %eax, %eax
cmpq $0x0, 0x1dc0(%rcx)
movb %al, -0x86(%rbp)
jne 0xe6c44
movq -0x8(%rbp), %rcx
xorl %eax, %eax
testb $0x1, 0x140(%rcx)
movb %al, -0x86(%rbp)
je 0xe6c44
xorl %edi, %edi
movl $0x1, %esi
callq 0xedee0
movb %al, %cl
xorl %eax, %eax
testb $0x1, %cl
movb %al, -0x86(%rbp)
jne 0xe6c2e
jmp 0xe6c44
movq -0x8(%rbp), %rax
movl 0x8(%rax), %eax
andl $0x1, %eax
cmpl $0x0, %eax
setne %al
movb %al, -0x86(%rbp)
movb -0x86(%rbp), %al
andb $0x1, %al
movb %al, -0x23(%rbp)
testb $0x1, -0x22(%rbp)
jne 0xe6c5f
testb $0x1, -0x23(%rbp)
je 0xe6d27
movq -0x8(%rbp), %rax
cmpq $0x0, 0x1c90(%rax)
je 0xe6c81
movq -0x8(%rbp), %rax
movq 0x1c90(%rax), %rax
movq %rax, -0x90(%rbp)
jmp 0xe6ca4
movq -0x8(%rbp), %rax
movl 0x1a98(%rax), %edi
subl $0x1, %edi
movl $0x80000001, %esi       # imm = 0x80000001
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
callq 0xe7940
movq %rax, -0x90(%rbp)
movq -0x90(%rbp), %rax
movq %rax, -0x30(%rbp)
cmpq $0x0, -0x30(%rbp)
je 0xe6d25
movq -0x30(%rbp), %rax
movq 0x390(%rax), %rcx
movq -0x8(%rbp), %rax
movq %rcx, 0x1dc8(%rax)
movq -0x8(%rbp), %rax
movq %rcx, 0x1dc0(%rax)
movq -0x8(%rbp), %rax
movl $0x0, 0x1ddc(%rax)
movq -0x8(%rbp), %rax
movl $0x0, 0x1dd8(%rax)
movb -0x23(%rbp), %cl
andb $0x1, %cl
decb %cl
movq -0x8(%rbp), %rax
andb $0x1, %cl
movb %cl, 0x1de0(%rax)
movb -0x23(%rbp), %dl
movl $0x4, %ecx
movl $0x3, %eax
testb $0x1, %dl
cmovnel %eax, %ecx
movq -0x8(%rbp), %rax
movl %ecx, 0x1cc4(%rax)
jmp 0xe6d27
movq -0x8(%rbp), %rax
movss 0x18(%rax), %xmm0
movq -0x8(%rbp), %rax
addss 0x1dd8(%rax), %xmm0
movss %xmm0, 0x1dd8(%rax)
movq -0x8(%rbp), %rax
cmpq $0x0, 0x1dc0(%rax)
je 0xe6ebc
movq -0x8(%rbp), %rax
cmpl $0x4, 0x1cc4(%rax)
jne 0xe6ebc
movq -0x8(%rbp), %rax
movss 0x1ddc(%rax), %xmm0
movss %xmm0, -0x98(%rbp)
movq -0x8(%rbp), %rax
movss 0x1dd8(%rax), %xmm0
movss 0x8b241(%rip), %xmm1    # 0x171fd0
subss %xmm1, %xmm0
movss 0x8ba55(%rip), %xmm1    # 0x1727f0
divss %xmm1, %xmm0
callq 0xc5aa0
movaps %xmm0, %xmm1
movss -0x98(%rbp), %xmm0
callq 0xc88c0
movq -0x8(%rbp), %rax
movss %xmm0, 0x1ddc(%rax)
movl $0xc, %edi
movl $0x4, %esi
callq 0xee780
andb $0x1, %al
movzbl %al, %eax
movl %eax, -0x94(%rbp)
movl $0xd, %edi
movl $0x4, %esi
callq 0xee780
movb %al, %cl
movl -0x94(%rbp), %eax
andb $0x1, %cl
movzbl %cl, %ecx
subl %ecx, %eax
movl %eax, -0x34(%rbp)
cmpl $0x0, -0x34(%rbp)
je 0xe6e1e
movl -0x34(%rbp), %edi
callq 0xe7a00
movq -0x8(%rbp), %rax
movss 0x89e26(%rip), %xmm0    # 0x170c3c
movss %xmm0, 0x1ddc(%rax)
movl $0x3, %edi
callq 0xec0f0
testb $0x1, %al
jne 0xe6eba
movq -0x8(%rbp), %rax
movss 0x89e00(%rip), %xmm0    # 0x170c3c
ucomiss 0x1ddc(%rax), %xmm0
seta %al
andb $0x1, %al
movzbl %al, %edx
movq -0x8(%rbp), %rax
movb 0x1de0(%rax), %cl
andb $0x1, %cl
movzbl %cl, %ecx
andl %edx, %ecx
cmpl $0x0, %ecx
setne %cl
andb $0x1, %cl
movb %cl, 0x1de0(%rax)
movq -0x8(%rbp), %rax
testb $0x1, 0x1de0(%rax)
je 0xe6e8d
movq -0x8(%rbp), %rax
cmpq $0x0, 0x1c90(%rax)
je 0xe6e8d
movb $0x1, -0x11(%rbp)
jmp 0xe6eab
movq -0x8(%rbp), %rax
testb $0x1, 0x1de0(%rax)
jne 0xe6ea9
movq -0x8(%rbp), %rax
movq 0x1dc0(%rax), %rax
movq %rax, -0x10(%rbp)
jmp 0xe6eab
movq -0x8(%rbp), %rax
movq $0x0, 0x1dc0(%rax)
jmp 0xe6ebc
movq -0x8(%rbp), %rax
cmpq $0x0, 0x1dc0(%rax)
je 0xe6f87
movq -0x8(%rbp), %rax
cmpl $0x3, 0x1cc4(%rax)
jne 0xe6f87
movq -0x8(%rbp), %rax
movss 0x1ddc(%rax), %xmm0
movss %xmm0, -0x9c(%rbp)
movq -0x8(%rbp), %rax
movss 0x1dd8(%rax), %xmm0
movss 0x8b0c9(%rip), %xmm1    # 0x171fd0
subss %xmm1, %xmm0
movss 0x8b8dd(%rip), %xmm1    # 0x1727f0
divss %xmm1, %xmm0
callq 0xc5aa0
movaps %xmm0, %xmm1
movss -0x9c(%rbp), %xmm0
callq 0xc88c0
movq -0x8(%rbp), %rax
movss %xmm0, 0x1ddc(%rax)
xorl %edi, %edi
movl $0x1, %esi
callq 0xedee0
testb $0x1, %al
jne 0xe6f4a
jmp 0xe6f69
movq -0x8(%rbp), %rax
movb 0x141(%rax), %cl
movl $0xffffffff, %edi       # imm = 0xFFFFFFFF
movl $0x1, %eax
testb $0x1, %cl
cmovnel %eax, %edi
callq 0xe7a00
movq -0x8(%rbp), %rax
testb $0x1, 0x140(%rax)
jne 0xe6f85
movq -0x8(%rbp), %rax
movq 0x1dc0(%rax), %rax
movq %rax, -0x10(%rbp)
jmp 0xe6f87
movl $0x10, %edi
movl $0x1, %esi
callq 0xee780
testb $0x1, %al
jne 0xe6f9c
jmp 0xe6fa7
movq -0x8(%rbp), %rax
movb $0x1, 0x1de0(%rax)
movq -0x8(%rbp), %rax
cmpl $0x0, 0x1b30(%rax)
je 0xe6fc1
movq -0x8(%rbp), %rax
testb $0x1, 0x1b3d(%rax)
je 0xe702e
movq -0x8(%rbp), %rax
testb $0x1, 0x1de0(%rax)
je 0xe702e
movl $0x10, %edi
movl $0x2, %esi
callq 0xee780
testb $0x1, %al
jne 0xe6fe3
jmp 0xe702e
movq -0x8(%rbp), %rdi
addq $0x8, %rdi
addq $0x120, %rdi            # imm = 0x120
callq 0xcb710
andb $0x1, %al
movzbl %al, %eax
movl %eax, -0xa0(%rbp)
movq -0x8(%rbp), %rdi
addq $0x8, %rdi
addq $0x3bc, %rdi            # imm = 0x3BC
callq 0xcb710
movb %al, %cl
movl -0xa0(%rbp), %eax
andb $0x1, %cl
movzbl %cl, %ecx
cmpl %ecx, %eax
jne 0xe702c
movb $0x1, -0x11(%rbp)
jmp 0xe702e
movq -0x8(%rbp), %rax
cmpq $0x0, 0x1dc0(%rax)
je 0xe71bc
movq -0x8(%rbp), %rax
movq 0x1dc0(%rax), %rax
movl 0xc(%rax), %eax
andl $0x4, %eax
cmpl $0x0, %eax
jne 0xe71bc
leaq -0x3c(%rbp), %rdi
callq 0xe7de0
movq -0x8(%rbp), %rax
cmpl $0x3, 0x1cc4(%rax)
jne 0xe709c
movq -0x8(%rbp), %rax
testb $0x1, 0x141(%rax)
jne 0xe709c
movl $0x1, %edi
xorl %esi, %esi
xorps %xmm1, %xmm1
movaps %xmm1, %xmm0
callq 0xdf970
movlpd %xmm0, -0x44(%rbp)
movq -0x44(%rbp), %rax
movq %rax, -0x3c(%rbp)
movq -0x8(%rbp), %rax
cmpl $0x4, 0x1cc4(%rax)
jne 0xe70c8
movl $0x4, %edi
xorl %esi, %esi
xorps %xmm1, %xmm1
movaps %xmm1, %xmm0
callq 0xdf970
movlpd %xmm0, -0x4c(%rbp)
movq -0x4c(%rbp), %rax
movq %rax, -0x3c(%rbp)
movss -0x3c(%rbp), %xmm0
xorps %xmm1, %xmm1
ucomiss %xmm1, %xmm0
jne 0xe70eb
jp 0xe70eb
movss -0x38(%rbp), %xmm0
xorps %xmm1, %xmm1
ucomiss %xmm1, %xmm0
jne 0xe70eb
jp 0xe70eb
jmp 0xe71ba
movl $0x44480000, -0x50(%rbp) # imm = 0x44480000
movq -0x8(%rbp), %rax
movss 0x18(%rax), %xmm1
movss 0xc0(%rax), %xmm0
movss 0x8b6e9(%rip), %xmm2    # 0x1727f4
mulss %xmm2, %xmm1
movss %xmm1, -0xb4(%rbp)
movss 0xc4(%rax), %xmm1
callq 0xc4620
movaps %xmm0, %xmm1
movss -0xb4(%rbp), %xmm0
mulss %xmm1, %xmm0
callq 0xc2f90
movss %xmm0, -0x54(%rbp)
movq -0x8(%rbp), %rax
movq 0x1dc0(%rax), %rax
movq 0x390(%rax), %rax
movq %rax, -0x60(%rbp)
movq -0x60(%rbp), %rax
movq %rax, -0xa8(%rbp)
addq $0x10, %rax
movq %rax, -0xb0(%rbp)
movss -0x54(%rbp), %xmm0
leaq -0x3c(%rbp), %rdi
callq 0xc2f50
movq -0xb0(%rbp), %rdi
movlpd %xmm0, -0x70(%rbp)
leaq -0x70(%rbp), %rsi
callq 0xc41b0
movq -0xa8(%rbp), %rdi
movlpd %xmm0, -0x68(%rbp)
leaq -0x68(%rbp), %rsi
movl $0x1, %edx
callq 0xcb810
movq -0x60(%rbp), %rdi
callq 0xcb7c0
movq -0x8(%rbp), %rax
movb $0x1, 0x1ce7(%rax)
jmp 0xe71bc
cmpq $0x0, -0x10(%rbp)
je 0xe725e
movq -0x8(%rbp), %rax
cmpq $0x0, 0x1c90(%rax)
je 0xe71ed
movq -0x10(%rbp), %rax
movq -0x8(%rbp), %rcx
movq 0x1c90(%rcx), %rcx
cmpq 0x390(%rcx), %rax
je 0xe725e
callq 0xca040
movq -0x8(%rbp), %rax
movb $0x0, 0x1ce6(%rax)
movq -0x8(%rbp), %rax
movb $0x1, 0x1ce7(%rax)
movq -0x10(%rbp), %rdi
callq 0xd9fa0
movq %rax, -0x10(%rbp)
movq -0x10(%rbp), %rdi
xorl %esi, %esi
callq 0xcbdc0
movq -0x10(%rbp), %rdi
callq 0xcb380
movq -0x10(%rbp), %rax
cmpl $0x0, 0x3b0(%rax)
jne 0xe7241
movq -0x10(%rbp), %rdi
xorl %esi, %esi
callq 0xd5b90
movq -0x10(%rbp), %rax
cmpl $0x2, 0x150(%rax)
jne 0xe725c
movq -0x8(%rbp), %rax
movl $0x1, 0x1cdc(%rax)
jmp 0xe725e
cmpq $0x0, -0x10(%rbp)
je 0xe7274
movq -0x8(%rbp), %rax
movq $0x0, 0x1dc0(%rax)
testb $0x1, -0x11(%rbp)
je 0xe73bb
movq -0x8(%rbp), %rax
cmpq $0x0, 0x1c90(%rax)
je 0xe73bb
movq -0x8(%rbp), %rax
movq 0x1c90(%rax), %rax
movq %rax, -0x78(%rbp)
movq -0x78(%rbp), %rcx
xorl %eax, %eax
cmpq $0x0, 0x388(%rcx)
movb %al, -0xb5(%rbp)
je 0xe7301
movq -0x78(%rbp), %rax
movl 0x150(%rax), %ecx
andl $0x2, %ecx
xorl %eax, %eax
cmpl $0x0, %ecx
movb %al, -0xb5(%rbp)
jne 0xe7301
movq -0x78(%rbp), %rax
movl 0xc(%rax), %ecx
andl $0x1000000, %ecx        # imm = 0x1000000
xorl %eax, %eax
cmpl $0x0, %ecx
movb %al, -0xb5(%rbp)
je 0xe7301
movq -0x78(%rbp), %rax
movl 0xc(%rax), %eax
andl $0x14000000, %eax       # imm = 0x14000000
cmpl $0x0, %eax
sete %al
movb %al, -0xb5(%rbp)
movb -0xb5(%rbp), %al
testb $0x1, %al
jne 0xe730d
jmp 0xe731e
movq -0x78(%rbp), %rax
movq 0x388(%rax), %rax
movq %rax, -0x78(%rbp)
jmp 0xe729f
movq -0x78(%rbp), %rax
movq -0x8(%rbp), %rcx
cmpq 0x1c90(%rcx), %rax
je 0xe7356
movq -0x8(%rbp), %rax
movq 0x1c90(%rax), %rax
movq %rax, -0x80(%rbp)
movq -0x78(%rbp), %rdi
callq 0xcb380
movq -0x80(%rbp), %rcx
movq -0x78(%rbp), %rax
movq %rcx, 0x3a8(%rax)
movq -0x8(%rbp), %rax
movb $0x0, 0x1ce6(%rax)
movq -0x8(%rbp), %rax
movb $0x1, 0x1ce7(%rax)
movq -0x8(%rbp), %rax
movq 0x1c90(%rax), %rax
movl 0x150(%rax), %eax
andl $0x2, %eax
cmpl $0x0, %eax
je 0xe739a
movq -0x8(%rbp), %rax
movl 0x1cdc(%rax), %eax
xorl $0x1, %eax
movl %eax, -0xbc(%rbp)
jmp 0xe73a4
xorl %eax, %eax
movl %eax, -0xbc(%rbp)
jmp 0xe73a4
movl -0xbc(%rbp), %eax
movl %eax, -0x84(%rbp)
movl -0x84(%rbp), %edi
callq 0xe73d0
addq $0xc0, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)