// File: Ciaxur[P]yagb-emu/include/imgui/imgui.cpp
// Function: ImGui::NavUpdate()
static void ImGui::NavUpdate()
{
    ImGuiContext& g = *GImGui;
    ImGuiIO& io = g.IO;

    io.WantSetMousePos = false;
    g.NavWrapRequestWindow = NULL;
    g.NavWrapRequestFlags = ImGuiNavMoveFlags_None;
#if 0
    if (g.NavScoringCount > 0) IMGUI_DEBUG_LOG("NavScoringCount %d for '%s' layer %d (Init:%d, Move:%d)\n", g.FrameCount, g.NavScoringCount, g.NavWindow ? g.NavWindow->Name : "NULL", g.NavLayer, g.NavInitRequest || g.NavInitResultId != 0, g.NavMoveRequest);
#endif

    // Set input source as Gamepad when buttons are pressed (as some features differs when used with Gamepad vs Keyboard)
    // (do it before we map Keyboard input!)
    bool nav_keyboard_active = (io.ConfigFlags & ImGuiConfigFlags_NavEnableKeyboard) != 0;
    bool nav_gamepad_active = (io.ConfigFlags & ImGuiConfigFlags_NavEnableGamepad) != 0 && (io.BackendFlags & ImGuiBackendFlags_HasGamepad) != 0;
    if (nav_gamepad_active && g.NavInputSource != ImGuiInputSource_NavGamepad)
    {
        if (io.NavInputs[ImGuiNavInput_Activate] > 0.0f || io.NavInputs[ImGuiNavInput_Input] > 0.0f || io.NavInputs[ImGuiNavInput_Cancel] > 0.0f || io.NavInputs[ImGuiNavInput_Menu] > 0.0f
            || io.NavInputs[ImGuiNavInput_DpadLeft] > 0.0f || io.NavInputs[ImGuiNavInput_DpadRight] > 0.0f || io.NavInputs[ImGuiNavInput_DpadUp] > 0.0f || io.NavInputs[ImGuiNavInput_DpadDown] > 0.0f)
            g.NavInputSource = ImGuiInputSource_NavGamepad;
    }

    // Update Keyboard->Nav inputs mapping
    if (nav_keyboard_active)
    {
        #define NAV_MAP_KEY(_KEY, _NAV_INPUT)  do { if (IsKeyDown(io.KeyMap[_KEY])) { io.NavInputs[_NAV_INPUT] = 1.0f; g.NavInputSource = ImGuiInputSource_NavKeyboard; } } while (0)
        NAV_MAP_KEY(ImGuiKey_Space,     ImGuiNavInput_Activate );
        NAV_MAP_KEY(ImGuiKey_Enter,     ImGuiNavInput_Input    );
        NAV_MAP_KEY(ImGuiKey_Escape,    ImGuiNavInput_Cancel   );
        NAV_MAP_KEY(ImGuiKey_LeftArrow, ImGuiNavInput_KeyLeft_ );
        NAV_MAP_KEY(ImGuiKey_RightArrow,ImGuiNavInput_KeyRight_);
        NAV_MAP_KEY(ImGuiKey_UpArrow,   ImGuiNavInput_KeyUp_   );
        NAV_MAP_KEY(ImGuiKey_DownArrow, ImGuiNavInput_KeyDown_ );
        if (io.KeyCtrl)
            io.NavInputs[ImGuiNavInput_TweakSlow] = 1.0f;
        if (io.KeyShift)
            io.NavInputs[ImGuiNavInput_TweakFast] = 1.0f;
        if (io.KeyAlt && !io.KeyCtrl) // AltGR is Alt+Ctrl, also even on keyboards without AltGR we don't want Alt+Ctrl to open menu.
            io.NavInputs[ImGuiNavInput_KeyMenu_]  = 1.0f;
        #undef NAV_MAP_KEY
    }
    memcpy(io.NavInputsDownDurationPrev, io.NavInputsDownDuration, sizeof(io.NavInputsDownDuration));
    for (int i = 0; i < IM_ARRAYSIZE(io.NavInputs); i++)
        io.NavInputsDownDuration[i] = (io.NavInputs[i] > 0.0f) ? (io.NavInputsDownDuration[i] < 0.0f ? 0.0f : io.NavInputsDownDuration[i] + io.DeltaTime) : -1.0f;

    // Process navigation init request (select first/default focus)
    if (g.NavInitResultId != 0 && (!g.NavDisableHighlight || g.NavInitRequestFromMove))
        NavUpdateInitResult();
    g.NavInitRequest = false;
    g.NavInitRequestFromMove = false;
    g.NavInitResultId = 0;
    g.NavJustMovedToId = 0;

    // Process navigation move request
    if (g.NavMoveRequest)
        NavUpdateMoveResult();

    // When a forwarded move request failed, we restore the highlight that we disabled during the forward frame
    if (g.NavMoveRequestForward == ImGuiNavForward_ForwardActive)
    {
        IM_ASSERT(g.NavMoveRequest);
        if (g.NavMoveResultLocal.ID == 0 && g.NavMoveResultOther.ID == 0)
            g.NavDisableHighlight = false;
        g.NavMoveRequestForward = ImGuiNavForward_None;
    }

    // Apply application mouse position movement, after we had a chance to process move request result.
    if (g.NavMousePosDirty && g.NavIdIsAlive)
    {
        // Set mouse position given our knowledge of the navigated item position from last frame
        if ((io.ConfigFlags & ImGuiConfigFlags_NavEnableSetMousePos) && (io.BackendFlags & ImGuiBackendFlags_HasSetMousePos))
        {
            if (!g.NavDisableHighlight && g.NavDisableMouseHover && g.NavWindow)
            {
                io.MousePos = io.MousePosPrev = NavCalcPreferredRefPos();
                io.WantSetMousePos = true;
            }
        }
        g.NavMousePosDirty = false;
    }
    g.NavIdIsAlive = false;
    g.NavJustTabbedId = 0;
    IM_ASSERT(g.NavLayer == 0 || g.NavLayer == 1);

    // Store our return window (for returning from Layer 1 to Layer 0) and clear it as soon as we step back in our own Layer 0
    if (g.NavWindow)
        NavSaveLastChildNavWindowIntoParent(g.NavWindow);
    if (g.NavWindow && g.NavWindow->NavLastChildNavWindow != NULL && g.NavLayer == ImGuiNavLayer_Main)
        g.NavWindow->NavLastChildNavWindow = NULL;

    // Update CTRL+TAB and Windowing features (hold Square to move/resize/etc.)
    NavUpdateWindowing();

    // Set output flags for user application
    io.NavActive = (nav_keyboard_active || nav_gamepad_active) && g.NavWindow && !(g.NavWindow->Flags & ImGuiWindowFlags_NoNavInputs);
    io.NavVisible = (io.NavActive && g.NavId != 0 && !g.NavDisableHighlight) || (g.NavWindowingTarget != NULL);

    // Process NavCancel input (to close a popup, get back to parent, clear focus)
    if (IsNavInputTest(ImGuiNavInput_Cancel, ImGuiInputReadMode_Pressed))
    {
        IMGUI_DEBUG_LOG_NAV("[nav] ImGuiNavInput_Cancel\n");
        if (g.ActiveId != 0)
        {
            if (!IsActiveIdUsingNavInput(ImGuiNavInput_Cancel))
                ClearActiveID();
        }
        else if (g.NavWindow && (g.NavWindow->Flags & ImGuiWindowFlags_ChildWindow) && !(g.NavWindow->Flags & ImGuiWindowFlags_Popup) && g.NavWindow->ParentWindow)
        {
            // Exit child window
            ImGuiWindow* child_window = g.NavWindow;
            ImGuiWindow* parent_window = g.NavWindow->ParentWindow;
            IM_ASSERT(child_window->ChildId != 0);
            FocusWindow(parent_window);
            SetNavID(child_window->ChildId, 0, 0);
            // Reassigning with same value, we're being explicit here.
            g.NavIdIsAlive = false;     // -V1048
            if (g.NavDisableMouseHover)
                g.NavMousePosDirty = true;
        }
        else if (g.OpenPopupStack.Size > 0)
        {
            // Close open popup/menu
            if (!(g.OpenPopupStack.back().Window->Flags & ImGuiWindowFlags_Modal))
                ClosePopupToLevel(g.OpenPopupStack.Size - 1, true);
        }
        else if (g.NavLayer != ImGuiNavLayer_Main)
        {
            // Leave the "menu" layer
            NavRestoreLayer(ImGuiNavLayer_Main);
        }
        else
        {
            // Clear NavLastId for popups but keep it for regular child window so we can leave one and come back where we were
            if (g.NavWindow && ((g.NavWindow->Flags & ImGuiWindowFlags_Popup) || !(g.NavWindow->Flags & ImGuiWindowFlags_ChildWindow)))
                g.NavWindow->NavLastIds[0] = 0;
            g.NavId = g.NavFocusScopeId = 0;
        }
    }

    // Process manual activation request
    g.NavActivateId = g.NavActivateDownId = g.NavActivatePressedId = g.NavInputId = 0;
    if (g.NavId != 0 && !g.NavDisableHighlight && !g.NavWindowingTarget && g.NavWindow && !(g.NavWindow->Flags & ImGuiWindowFlags_NoNavInputs))
    {
        bool activate_down = IsNavInputDown(ImGuiNavInput_Activate);
        bool activate_pressed = activate_down && IsNavInputTest(ImGuiNavInput_Activate, ImGuiInputReadMode_Pressed);
        if (g.ActiveId == 0 && activate_pressed)
            g.NavActivateId = g.NavId;
        if ((g.ActiveId == 0 || g.ActiveId == g.NavId) && activate_down)
            g.NavActivateDownId = g.NavId;
        if ((g.ActiveId == 0 || g.ActiveId == g.NavId) && activate_pressed)
            g.NavActivatePressedId = g.NavId;
        if ((g.ActiveId == 0 || g.ActiveId == g.NavId) && IsNavInputTest(ImGuiNavInput_Input, ImGuiInputReadMode_Pressed))
            g.NavInputId = g.NavId;
    }
    if (g.NavWindow && (g.NavWindow->Flags & ImGuiWindowFlags_NoNavInputs))
        g.NavDisableHighlight = true;
    if (g.NavActivateId != 0)
        IM_ASSERT(g.NavActivateDownId == g.NavActivateId);
    g.NavMoveRequest = false;

    // Process programmatic activation request
    if (g.NavNextActivateId != 0)
        g.NavActivateId = g.NavActivateDownId = g.NavActivatePressedId = g.NavInputId = g.NavNextActivateId;
    g.NavNextActivateId = 0;

    // Initiate directional inputs request
    if (g.NavMoveRequestForward == ImGuiNavForward_None)
    {
        g.NavMoveDir = ImGuiDir_None;
        g.NavMoveRequestFlags = ImGuiNavMoveFlags_None;
        if (g.NavWindow && !g.NavWindowingTarget && !(g.NavWindow->Flags & ImGuiWindowFlags_NoNavInputs))
        {
            const ImGuiInputReadMode read_mode = ImGuiInputReadMode_Repeat;
            if (!IsActiveIdUsingNavDir(ImGuiDir_Left)  && (IsNavInputTest(ImGuiNavInput_DpadLeft,  read_mode) || IsNavInputTest(ImGuiNavInput_KeyLeft_,  read_mode))) { g.NavMoveDir = ImGuiDir_Left; }
            if (!IsActiveIdUsingNavDir(ImGuiDir_Right) && (IsNavInputTest(ImGuiNavInput_DpadRight, read_mode) || IsNavInputTest(ImGuiNavInput_KeyRight_, read_mode))) { g.NavMoveDir = ImGuiDir_Right; }
            if (!IsActiveIdUsingNavDir(ImGuiDir_Up)    && (IsNavInputTest(ImGuiNavInput_DpadUp,    read_mode) || IsNavInputTest(ImGuiNavInput_KeyUp_,    read_mode))) { g.NavMoveDir = ImGuiDir_Up; }
            if (!IsActiveIdUsingNavDir(ImGuiDir_Down)  && (IsNavInputTest(ImGuiNavInput_DpadDown,  read_mode) || IsNavInputTest(ImGuiNavInput_KeyDown_,  read_mode))) { g.NavMoveDir = ImGuiDir_Down; }
        }
        g.NavMoveClipDir = g.NavMoveDir;
    }
    else
    {
        // Forwarding previous request (which has been modified, e.g. wrap around menus rewrite the requests with a starting rectangle at the other side of the window)
        // (Preserve g.NavMoveRequestFlags, g.NavMoveClipDir which were set by the NavMoveRequestForward() function)
        IM_ASSERT(g.NavMoveDir != ImGuiDir_None && g.NavMoveClipDir != ImGuiDir_None);
        IM_ASSERT(g.NavMoveRequestForward == ImGuiNavForward_ForwardQueued);
        IMGUI_DEBUG_LOG_NAV("[nav] NavMoveRequestForward %d\n", g.NavMoveDir);
        g.NavMoveRequestForward = ImGuiNavForward_ForwardActive;
    }

    // Update PageUp/PageDown/Home/End scroll
    // FIXME-NAV: Consider enabling those keys even without the master ImGuiConfigFlags_NavEnableKeyboard flag?
    float nav_scoring_rect_offset_y = 0.0f;
    if (nav_keyboard_active)
        nav_scoring_rect_offset_y = NavUpdatePageUpPageDown();

    // If we initiate a movement request and have no current NavId, we initiate a InitDefautRequest that will be used as a fallback if the direction fails to find a match
    if (g.NavMoveDir != ImGuiDir_None)
    {
        g.NavMoveRequest = true;
        g.NavMoveRequestKeyMods = io.KeyMods;
        g.NavMoveDirLast = g.NavMoveDir;
    }
    if (g.NavMoveRequest && g.NavId == 0)
    {
        IMGUI_DEBUG_LOG_NAV("[nav] NavInitRequest: from move, window \"%s\", layer=%d\n", g.NavWindow->Name, g.NavLayer);
        g.NavInitRequest = g.NavInitRequestFromMove = true;
        // Reassigning with same value, we're being explicit here.
        g.NavInitResultId = 0;     // -V1048
        g.NavDisableHighlight = false;
    }
    NavUpdateAnyRequestFlag();

    // Scrolling
    if (g.NavWindow && !(g.NavWindow->Flags & ImGuiWindowFlags_NoNavInputs) && !g.NavWindowingTarget)
    {
        // *Fallback* manual-scroll with Nav directional keys when window has no navigable item
        ImGuiWindow* window = g.NavWindow;
        const float scroll_speed = IM_ROUND(window->CalcFontSize() * 100 * io.DeltaTime); // We need round the scrolling speed because sub-pixel scroll isn't reliably supported.
        if (window->DC.NavLayerActiveMask == 0x00 && window->DC.NavHasScroll && g.NavMoveRequest)
        {
            if (g.NavMoveDir == ImGuiDir_Left || g.NavMoveDir == ImGuiDir_Right)
                SetScrollX(window, ImFloor(window->Scroll.x + ((g.NavMoveDir == ImGuiDir_Left) ? -1.0f : +1.0f) * scroll_speed));
            if (g.NavMoveDir == ImGuiDir_Up || g.NavMoveDir == ImGuiDir_Down)
                SetScrollY(window, ImFloor(window->Scroll.y + ((g.NavMoveDir == ImGuiDir_Up) ? -1.0f : +1.0f) * scroll_speed));
        }

        // *Normal* Manual scroll with NavScrollXXX keys
        // Next movement request will clamp the NavId reference rectangle to the visible area, so navigation will resume within those bounds.
        ImVec2 scroll_dir = GetNavInputAmount2d(ImGuiNavDirSourceFlags_PadLStick, ImGuiInputReadMode_Down, 1.0f / 10.0f, 10.0f);
        if (scroll_dir.x != 0.0f && window->ScrollbarX)
            SetScrollX(window, ImFloor(window->Scroll.x + scroll_dir.x * scroll_speed));
        if (scroll_dir.y != 0.0f)
            SetScrollY(window, ImFloor(window->Scroll.y + scroll_dir.y * scroll_speed));
    }

    // Reset search results
    g.NavMoveResultLocal.Clear();
    g.NavMoveResultLocalVisibleSet.Clear();
    g.NavMoveResultOther.Clear();

    // When using gamepad, we project the reference nav bounding box into window visible area.
    // This is to allow resuming navigation inside the visible area after doing a large amount of scrolling, since with gamepad every movements are relative
    // (can't focus a visible object like we can with the mouse).
    if (g.NavMoveRequest && g.NavInputSource == ImGuiInputSource_NavGamepad && g.NavLayer == ImGuiNavLayer_Main)
    {
        ImGuiWindow* window = g.NavWindow;
        ImRect window_rect_rel(window->InnerRect.Min - window->Pos - ImVec2(1, 1), window->InnerRect.Max - window->Pos + ImVec2(1, 1));
        if (!window_rect_rel.Contains(window->NavRectRel[g.NavLayer]))
        {
            IMGUI_DEBUG_LOG_NAV("[nav] NavMoveRequest: clamp NavRectRel\n");
            float pad = window->CalcFontSize() * 0.5f;
            window_rect_rel.Expand(ImVec2(-ImMin(window_rect_rel.GetWidth(), pad), -ImMin(window_rect_rel.GetHeight(), pad))); // Terrible approximation for the intent of starting navigation from first fully visible item
            window->NavRectRel[g.NavLayer].ClipWithFull(window_rect_rel);
            g.NavId = g.NavFocusScopeId = 0;
        }
    }

    // For scoring we use a single segment on the left side our current item bounding box (not touching the edge to avoid box overlap with zero-spaced items)
    ImRect nav_rect_rel = g.NavWindow ? g.NavWindow->NavRectRel[g.NavLayer] : ImRect(0, 0, 0, 0);
    g.NavScoringRect = g.NavWindow ? ImRect(g.NavWindow->Pos + nav_rect_rel.Min, g.NavWindow->Pos + nav_rect_rel.Max) : GetViewportRect();
    g.NavScoringRect.TranslateY(nav_scoring_rect_offset_y);
    g.NavScoringRect.Min.x = ImMin(g.NavScoringRect.Min.x + 1.0f, g.NavScoringRect.Max.x);
    g.NavScoringRect.Max.x = g.NavScoringRect.Min.x;
    IM_ASSERT(!g.NavScoringRect.IsInverted()); // Ensure if we have a finite, non-inverted bounding box here will allows us to remove extraneous ImFabs() calls in NavScoreItem().
    //GetForegroundDrawList()->AddRect(g.NavScoringRectScreen.Min, g.NavScoringRectScreen.Max, IM_COL32(255,200,0,255)); // [DEBUG]
    g.NavScoringCount = 0;
#if IMGUI_DEBUG_NAV_RECTS
    if (g.NavWindow)
    {
        ImDrawList* draw_list = GetForegroundDrawList(g.NavWindow);
        if (1) { for (int layer = 0; layer < 2; layer++) draw_list->AddRect(g.NavWindow->Pos + g.NavWindow->NavRectRel[layer].Min, g.NavWindow->Pos + g.NavWindow->NavRectRel[layer].Max, IM_COL32(255,200,0,255)); } // [DEBUG]
        if (1) { ImU32 col = (!g.NavWindow->Hidden) ? IM_COL32(255,0,255,255) : IM_COL32(255,0,0,255); ImVec2 p = NavCalcPreferredRefPos(); char buf[32]; ImFormatString(buf, 32, "%d", g.NavLayer); draw_list->AddCircleFilled(p, 3.0f, col); draw_list->AddText(NULL, 13.0f, p + ImVec2(8,-4), col, buf); }
    }
#endif
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x150, %rsp            # imm = 0x150
movq 0x14559e(%rip), %rax    # 0x212f40
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x8, %rax
movq %rax, -0x10(%rbp)
movq -0x10(%rbp), %rax
movb $0x0, 0x393(%rax)
movq -0x8(%rbp), %rax
movq $0x0, 0x1db0(%rax)
movq -0x8(%rbp), %rax
movl $0x0, 0x1db8(%rax)
movq -0x10(%rbp), %rax
movl (%rax), %eax
andl $0x1, %eax
cmpl $0x0, %eax
setne %al
andb $0x1, %al
movb %al, -0x11(%rbp)
movq -0x10(%rbp), %rax
movl (%rax), %ecx
andl $0x2, %ecx
xorl %eax, %eax
cmpl $0x0, %ecx
movb %al, -0xdd(%rbp)
je 0xcda1a
movq -0x10(%rbp), %rax
movl 0x4(%rax), %eax
andl $0x1, %eax
cmpl $0x0, %eax
setne %al
movb %al, -0xdd(%rbp)
movb -0xdd(%rbp), %al
andb $0x1, %al
movb %al, -0x12(%rbp)
testb $0x1, -0x12(%rbp)
je 0xcdaf4
movq -0x8(%rbp), %rax
cmpl $0x4, 0x1cc4(%rax)
je 0xcdaf4
movq -0x10(%rbp), %rax
movss 0x33c(%rax), %xmm0
xorps %xmm1, %xmm1
ucomiss %xmm1, %xmm0
ja 0xcdae4
movq -0x10(%rbp), %rax
movss 0x344(%rax), %xmm0
xorps %xmm1, %xmm1
ucomiss %xmm1, %xmm0
ja 0xcdae4
movq -0x10(%rbp), %rax
movss 0x340(%rax), %xmm0
xorps %xmm1, %xmm1
ucomiss %xmm1, %xmm0
ja 0xcdae4
movq -0x10(%rbp), %rax
movss 0x348(%rax), %xmm0
xorps %xmm1, %xmm1
ucomiss %xmm1, %xmm0
ja 0xcdae4
movq -0x10(%rbp), %rax
movss 0x34c(%rax), %xmm0
xorps %xmm1, %xmm1
ucomiss %xmm1, %xmm0
ja 0xcdae4
movq -0x10(%rbp), %rax
movss 0x350(%rax), %xmm0
xorps %xmm1, %xmm1
ucomiss %xmm1, %xmm0
ja 0xcdae4
movq -0x10(%rbp), %rax
movss 0x354(%rax), %xmm0
xorps %xmm1, %xmm1
ucomiss %xmm1, %xmm0
ja 0xcdae4
movq -0x10(%rbp), %rax
movss 0x358(%rax), %xmm0
xorps %xmm1, %xmm1
ucomiss %xmm1, %xmm0
jbe 0xcdaf2
movq -0x8(%rbp), %rax
movl $0x4, 0x1cc4(%rax)
jmp 0xcdaf4
testb $0x1, -0x11(%rbp)
je 0xcdcf8
jmp 0xcdb00
movq -0x10(%rbp), %rax
movl 0x64(%rax), %edi
callq 0xd4960
testb $0x1, %al
jne 0xcdb12
jmp 0xcdb34
movq -0x10(%rbp), %rax
movss 0xa311e(%rip), %xmm0    # 0x170c3c
movss %xmm0, 0x33c(%rax)
movq -0x8(%rbp), %rax
movl $0x3, 0x1cc4(%rax)
jmp 0xcdb36
jmp 0xcdb38
movq -0x10(%rbp), %rax
movl 0x68(%rax), %edi
callq 0xd4960
testb $0x1, %al
jne 0xcdb4a
jmp 0xcdb6c
movq -0x10(%rbp), %rax
movss 0xa30e6(%rip), %xmm0    # 0x170c3c
movss %xmm0, 0x344(%rax)
movq -0x8(%rbp), %rax
movl $0x3, 0x1cc4(%rax)
jmp 0xcdb6e
jmp 0xcdb70
movq -0x10(%rbp), %rax
movl 0x6c(%rax), %edi
callq 0xd4960
testb $0x1, %al
jne 0xcdb82
jmp 0xcdba4
movq -0x10(%rbp), %rax
movss 0xa30ae(%rip), %xmm0    # 0x170c3c
movss %xmm0, 0x340(%rax)
movq -0x8(%rbp), %rax
movl $0x3, 0x1cc4(%rax)
jmp 0xcdba6
jmp 0xcdba8
movq -0x10(%rbp), %rax
movl 0x38(%rax), %edi
callq 0xd4960
testb $0x1, %al
jne 0xcdbba
jmp 0xcdbdc
movq -0x10(%rbp), %rax
movss 0xa3076(%rip), %xmm0    # 0x170c3c
movss %xmm0, 0x380(%rax)
movq -0x8(%rbp), %rax
movl $0x3, 0x1cc4(%rax)
jmp 0xcdbde
jmp 0xcdbe0
movq -0x10(%rbp), %rax
movl 0x3c(%rax), %edi
callq 0xd4960
testb $0x1, %al
jne 0xcdbf2
jmp 0xcdc14
movq -0x10(%rbp), %rax
movss 0xa303e(%rip), %xmm0    # 0x170c3c
movss %xmm0, 0x384(%rax)
movq -0x8(%rbp), %rax
movl $0x3, 0x1cc4(%rax)
jmp 0xcdc16
jmp 0xcdc18
movq -0x10(%rbp), %rax
movl 0x40(%rax), %edi
callq 0xd4960
testb $0x1, %al
jne 0xcdc2a
jmp 0xcdc4c
movq -0x10(%rbp), %rax
movss 0xa3006(%rip), %xmm0    # 0x170c3c
movss %xmm0, 0x388(%rax)
movq -0x8(%rbp), %rax
movl $0x3, 0x1cc4(%rax)
jmp 0xcdc4e
jmp 0xcdc50
movq -0x10(%rbp), %rax
movl 0x44(%rax), %edi
callq 0xd4960
testb $0x1, %al
jne 0xcdc62
jmp 0xcdc84
movq -0x10(%rbp), %rax
movss 0xa2fce(%rip), %xmm0    # 0x170c3c
movss %xmm0, 0x38c(%rax)
movq -0x8(%rbp), %rax
movl $0x3, 0x1cc4(%rax)
jmp 0xcdc86
movq -0x10(%rbp), %rax
testb $0x1, 0x138(%rax)
je 0xcdca7
movq -0x10(%rbp), %rax
movss 0xa2f9d(%rip), %xmm0    # 0x170c3c
movss %xmm0, 0x374(%rax)
movq -0x10(%rbp), %rax
testb $0x1, 0x139(%rax)
je 0xcdcc8
movq -0x10(%rbp), %rax
movss 0xa2f7c(%rip), %xmm0    # 0x170c3c
movss %xmm0, 0x378(%rax)
movq -0x10(%rbp), %rax
testb $0x1, 0x13a(%rax)
je 0xcdcf6
movq -0x10(%rbp), %rax
testb $0x1, 0x138(%rax)
jne 0xcdcf6
movq -0x10(%rbp), %rax
movss 0xa2f4e(%rip), %xmm0    # 0x170c3c
movss %xmm0, 0x37c(%rax)
jmp 0xcdcf8
movq -0x10(%rbp), %rdi
addq $0x14ec, %rdi           # imm = 0x14EC
movq -0x10(%rbp), %rsi
addq $0x1498, %rsi           # imm = 0x1498
movl $0x54, %edx
callq 0xd0a0
movl $0x0, -0x18(%rbp)
cmpl $0x15, -0x18(%rbp)
jge 0xcddd1
movq -0x10(%rbp), %rax
movslq -0x18(%rbp), %rcx
movss 0x33c(%rax,%rcx,4), %xmm0
xorps %xmm1, %xmm1
ucomiss %xmm1, %xmm0
jbe 0xcdd98
movq -0x10(%rbp), %rax
movslq -0x18(%rbp), %rcx
xorps %xmm0, %xmm0
ucomiss 0x1498(%rax,%rcx,4), %xmm0
jbe 0xcdd64
xorps %xmm0, %xmm0
movss %xmm0, -0xe4(%rbp)
jmp 0xcdd86
movq -0x10(%rbp), %rax
movslq -0x18(%rbp), %rcx
movss 0x1498(%rax,%rcx,4), %xmm0
movq -0x10(%rbp), %rax
addss 0x10(%rax), %xmm0
movss %xmm0, -0xe4(%rbp)
movss -0xe4(%rbp), %xmm0
movss %xmm0, -0xe8(%rbp)
jmp 0xcddaa
movss 0xa41e0(%rip), %xmm0    # 0x171f80
movss %xmm0, -0xe8(%rbp)
jmp 0xcddaa
movss -0xe8(%rbp), %xmm0
movq -0x10(%rbp), %rax
movslq -0x18(%rbp), %rcx
movss %xmm0, 0x1498(%rax,%rcx,4)
movl -0x18(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x18(%rbp)
jmp 0xcdd1f
movq -0x8(%rbp), %rax
cmpl $0x0, 0x1cec(%rax)
je 0xcddfd
movq -0x8(%rbp), %rax
testb $0x1, 0x1ce6(%rax)
je 0xcddf8
movq -0x8(%rbp), %rax
testb $0x1, 0x1cea(%rax)
je 0xcddfd
callq 0xe65e0
movq -0x8(%rbp), %rax
movb $0x0, 0x1ce9(%rax)
movq -0x8(%rbp), %rax
movb $0x0, 0x1cea(%rax)
movq -0x8(%rbp), %rax
movl $0x0, 0x1cec(%rax)
movq -0x8(%rbp), %rax
movl $0x0, 0x1cb4(%rax)
movq -0x8(%rbp), %rax
testb $0x1, 0x1d00(%rax)
je 0xcde41
callq 0xe66a0
movq -0x8(%rbp), %rax
cmpl $0x2, 0x1d08(%rax)
jne 0xcdeaf
movq -0x8(%rbp), %rax
testb $0x1, 0x1d00(%rax)
je 0xcde5d
jmp 0xcde7c
leaq 0xa979b(%rip), %rdi     # 0x1775ff
leaq 0xa509e(%rip), %rsi     # 0x172f09
movl $0x2294, %edx           # imm = 0x2294
leaq 0xa9799(%rip), %rcx     # 0x177610
callq 0xd180
movq -0x8(%rbp), %rax
cmpl $0x0, 0x1d28(%rax)
jne 0xcdea1
movq -0x8(%rbp), %rax
cmpl $0x0, 0x1d88(%rax)
jne 0xcdea1
movq -0x8(%rbp), %rax
movb $0x0, 0x1ce6(%rax)
movq -0x8(%rbp), %rax
movl $0x0, 0x1d08(%rax)
movq -0x8(%rbp), %rax
testb $0x1, 0x1ce5(%rax)
je 0xcdf59
movq -0x8(%rbp), %rax
testb $0x1, 0x1ce4(%rax)
je 0xcdf59
movq -0x10(%rbp), %rax
movl (%rax), %eax
andl $0x4, %eax
cmpl $0x0, %eax
je 0xcdf4e
movq -0x10(%rbp), %rax
movl 0x4(%rax), %eax
andl $0x4, %eax
cmpl $0x0, %eax
je 0xcdf4e
movq -0x8(%rbp), %rax
testb $0x1, 0x1ce6(%rax)
jne 0xcdf4c
movq -0x8(%rbp), %rax
testb $0x1, 0x1ce7(%rax)
je 0xcdf4c
movq -0x8(%rbp), %rax
cmpq $0x0, 0x1c90(%rax)
je 0xcdf4c
callq 0xde000
movlpd %xmm0, -0x20(%rbp)
movq -0x10(%rbp), %rcx
movq -0x20(%rbp), %rax
movq %rax, 0x3bc(%rcx)
movq -0x10(%rbp), %rax
movq 0x3bc(%rcx), %rcx
movq %rcx, 0x120(%rax)
movq -0x10(%rbp), %rax
movb $0x1, 0x393(%rax)
jmp 0xcdf4e
movq -0x8(%rbp), %rax
movb $0x0, 0x1ce5(%rax)
movq -0x8(%rbp), %rax
movb $0x0, 0x1ce4(%rax)
movq -0x8(%rbp), %rax
movl $0x0, 0x1cb0(%rax)
movq -0x8(%rbp), %rcx
movb $0x1, %al
cmpl $0x0, 0x1cdc(%rcx)
movb %al, -0xe9(%rbp)
je 0xcdf9b
movq -0x8(%rbp), %rax
cmpl $0x1, 0x1cdc(%rax)
sete %al
movb %al, -0xe9(%rbp)
movb -0xe9(%rbp), %al
testb $0x1, %al
jne 0xcdfa7
jmp 0xcdfa9
jmp 0xcdfc8
leaq 0xa9678(%rip), %rdi     # 0x177628
leaq 0xa4f52(%rip), %rsi     # 0x172f09
movl $0x22aa, %edx           # imm = 0x22AA
leaq 0xa964d(%rip), %rcx     # 0x177610
callq 0xd180
movq -0x8(%rbp), %rax
cmpq $0x0, 0x1c90(%rax)
je 0xcdfe6
movq -0x8(%rbp), %rax
movq 0x1c90(%rax), %rdi
callq 0xe6a20
movq -0x8(%rbp), %rax
cmpq $0x0, 0x1c90(%rax)
je 0xce02c
movq -0x8(%rbp), %rax
movq 0x1c90(%rax), %rax
cmpq $0x0, 0x3a8(%rax)
je 0xce02c
movq -0x8(%rbp), %rax
cmpl $0x0, 0x1cdc(%rax)
jne 0xce02c
movq -0x8(%rbp), %rax
movq 0x1c90(%rax), %rax
movq $0x0, 0x3a8(%rax)
callq 0xe6ab0
testb $0x1, -0x11(%rbp)
jne 0xce045
xorl %eax, %eax
testb $0x1, -0x12(%rbp)
movb %al, -0xea(%rbp)
je 0xce07c
movq -0x8(%rbp), %rcx
xorl %eax, %eax
cmpq $0x0, 0x1c90(%rcx)
movb %al, -0xea(%rbp)
je 0xce07c
movq -0x8(%rbp), %rax
movq 0x1c90(%rax), %rax
movl 0xc(%rax), %eax
andl $0x40000, %eax          # imm = 0x40000
cmpl $0x0, %eax
setne %al
xorb $-0x1, %al
movb %al, -0xea(%rbp)
movb -0xea(%rbp), %cl
movq -0x10(%rbp), %rax
andb $0x1, %cl
movb %cl, 0x395(%rax)
movq -0x10(%rbp), %rax
testb $0x1, 0x395(%rax)
je 0xce0be
movq -0x8(%rbp), %rax
cmpl $0x0, 0x1c98(%rax)
je 0xce0be
movq -0x8(%rbp), %rcx
movb $0x1, %al
testb $0x1, 0x1ce6(%rcx)
movb %al, -0xeb(%rbp)
je 0xce0d3
movq -0x8(%rbp), %rax
cmpq $0x0, 0x1dc0(%rax)
setne %al
movb %al, -0xeb(%rbp)
movb -0xeb(%rbp), %cl
movq -0x10(%rbp), %rax
andb $0x1, %cl
movb %cl, 0x396(%rax)
movl $0x1, %esi
movl %esi, %edi
callq 0xee780
testb $0x1, %al
jne 0xce0fb
jmp 0xce2eb
movq -0x8(%rbp), %rax
cmpl $0x0, 0x1b30(%rax)
je 0xce120
movl $0x1, %edi
callq 0xee7b0
testb $0x1, %al
jne 0xce11b
callq 0xca040
jmp 0xce2e9
movq -0x8(%rbp), %rax
cmpq $0x0, 0x1c90(%rax)
je 0xce214
movq -0x8(%rbp), %rax
movq 0x1c90(%rax), %rax
movl 0xc(%rax), %eax
andl $0x1000000, %eax        # imm = 0x1000000
cmpl $0x0, %eax
je 0xce214
movq -0x8(%rbp), %rax
movq 0x1c90(%rax), %rax
movl 0xc(%rax), %eax
andl $0x4000000, %eax        # imm = 0x4000000
cmpl $0x0, %eax
jne 0xce214
movq -0x8(%rbp), %rax
movq 0x1c90(%rax), %rax
cmpq $0x0, 0x388(%rax)
je 0xce214
movq -0x8(%rbp), %rax
movq 0x1c90(%rax), %rax
movq %rax, -0x28(%rbp)
movq -0x8(%rbp), %rax
movq 0x1c90(%rax), %rax
movq 0x388(%rax), %rax
movq %rax, -0x30(%rbp)
movq -0x28(%rbp), %rax
cmpl $0x0, 0x58(%rax)
je 0xce1b4
jmp 0xce1d3
leaq 0xa9490(%rip), %rdi     # 0x17764b
leaq 0xa4d47(%rip), %rsi     # 0x172f09
movl $0x22c7, %edx           # imm = 0x22C7
leaq 0xa9442(%rip), %rcx     # 0x177610
callq 0xd180
movq -0x30(%rbp), %rdi
callq 0xcb380
movq -0x28(%rbp), %rax
movl 0x58(%rax), %edi
xorl %edx, %edx
movl %edx, %esi
callq 0xdf300
movq -0x8(%rbp), %rax
movb $0x0, 0x1ce4(%rax)
movq -0x8(%rbp), %rax
testb $0x1, 0x1ce7(%rax)
je 0xce20f
movq -0x8(%rbp), %rax
movb $0x1, 0x1ce5(%rax)
jmp 0xce2e7
movq -0x8(%rbp), %rax
cmpl $0x0, 0x1c70(%rax)
jle 0xce25e
movq -0x8(%rbp), %rdi
addq $0x1c70, %rdi           # imm = 0x1C70
callq 0xeb7e0
movq 0x8(%rax), %rax
movl 0xc(%rax), %eax
andl $0x8000000, %eax        # imm = 0x8000000
cmpl $0x0, %eax
jne 0xce259
movq -0x8(%rbp), %rax
movl 0x1c70(%rax), %edi
subl $0x1, %edi
movl $0x1, %esi
callq 0xde1b0
jmp 0xce2e5
movq -0x8(%rbp), %rax
cmpl $0x0, 0x1cdc(%rax)
je 0xce274
xorl %edi, %edi
callq 0xe73d0
jmp 0xce2e3
movq -0x8(%rbp), %rax
cmpq $0x0, 0x1c90(%rax)
je 0xce2c7
movq -0x8(%rbp), %rax
movq 0x1c90(%rax), %rax
movl 0xc(%rax), %eax
andl $0x4000000, %eax        # imm = 0x4000000
cmpl $0x0, %eax
jne 0xce2b2
movq -0x8(%rbp), %rax
movq 0x1c90(%rax), %rax
movl 0xc(%rax), %eax
andl $0x1000000, %eax        # imm = 0x1000000
cmpl $0x0, %eax
jne 0xce2c7
movq -0x8(%rbp), %rax
movq 0x1c90(%rax), %rax
movl $0x0, 0x3b0(%rax)
movq -0x8(%rbp), %rax
movl $0x0, 0x1c9c(%rax)
movq -0x8(%rbp), %rax
movl $0x0, 0x1c98(%rax)
jmp 0xce2e5
jmp 0xce2e7
jmp 0xce2e9
jmp 0xce2eb
movq -0x8(%rbp), %rax
movl $0x0, 0x1cac(%rax)
movq -0x8(%rbp), %rax
movl $0x0, 0x1ca8(%rax)
movq -0x8(%rbp), %rax
movl $0x0, 0x1ca4(%rax)
movq -0x8(%rbp), %rax
movl $0x0, 0x1ca0(%rax)
movq -0x8(%rbp), %rax
cmpl $0x0, 0x1c98(%rax)
je 0xce4ab
movq -0x8(%rbp), %rax
testb $0x1, 0x1ce6(%rax)
jne 0xce4ab
movq -0x8(%rbp), %rax
cmpq $0x0, 0x1dc0(%rax)
jne 0xce4ab
movq -0x8(%rbp), %rax
cmpq $0x0, 0x1c90(%rax)
je 0xce4ab
movq -0x8(%rbp), %rax
movq 0x1c90(%rax), %rax
movl 0xc(%rax), %eax
andl $0x40000, %eax          # imm = 0x40000
cmpl $0x0, %eax
jne 0xce4ab
xorl %edi, %edi
callq 0xec0f0
andb $0x1, %al
movb %al, -0x31(%rbp)
xorl %eax, %eax
testb $0x1, -0x31(%rbp)
movb %al, -0xec(%rbp)
je 0xce3b1
xorl %edi, %edi
movl $0x1, %esi
callq 0xee780
movb %al, -0xec(%rbp)
movb -0xec(%rbp), %al
andb $0x1, %al
movb %al, -0x32(%rbp)
movq -0x8(%rbp), %rax
cmpl $0x0, 0x1b30(%rax)
jne 0xce3e3
testb $0x1, -0x32(%rbp)
je 0xce3e3
movq -0x8(%rbp), %rax
movl 0x1c98(%rax), %ecx
movq -0x8(%rbp), %rax
movl %ecx, 0x1ca0(%rax)
movq -0x8(%rbp), %rax
cmpl $0x0, 0x1b30(%rax)
je 0xce406
movq -0x8(%rbp), %rax
movl 0x1b30(%rax), %eax
movq -0x8(%rbp), %rcx
cmpl 0x1c98(%rcx), %eax
jne 0xce420
testb $0x1, -0x31(%rbp)
je 0xce420
movq -0x8(%rbp), %rax
movl 0x1c98(%rax), %ecx
movq -0x8(%rbp), %rax
movl %ecx, 0x1ca4(%rax)
movq -0x8(%rbp), %rax
cmpl $0x0, 0x1b30(%rax)
je 0xce443
movq -0x8(%rbp), %rax
movl 0x1b30(%rax), %eax
movq -0x8(%rbp), %rcx
cmpl 0x1c98(%rcx), %eax
jne 0xce45d
testb $0x1, -0x32(%rbp)
je 0xce45d
movq -0x8(%rbp), %rax
movl 0x1c98(%rax), %ecx
movq -0x8(%rbp), %rax
movl %ecx, 0x1ca8(%rax)
movq -0x8(%rbp), %rax
cmpl $0x0, 0x1b30(%rax)
je 0xce480
movq -0x8(%rbp), %rax
movl 0x1b30(%rax), %eax
movq -0x8(%rbp), %rcx
cmpl 0x1c98(%rcx), %eax
jne 0xce4a9
movl $0x2, %edi
movl $0x1, %esi
callq 0xee780
testb $0x1, %al
jne 0xce495
jmp 0xce4a9
movq -0x8(%rbp), %rax
movl 0x1c98(%rax), %ecx
movq -0x8(%rbp), %rax
movl %ecx, 0x1cac(%rax)
jmp 0xce4ab
movq -0x8(%rbp), %rax
cmpq $0x0, 0x1c90(%rax)
je 0xce4dc
movq -0x8(%rbp), %rax
movq 0x1c90(%rax), %rax
movl 0xc(%rax), %eax
andl $0x40000, %eax          # imm = 0x40000
cmpl $0x0, %eax
je 0xce4dc
movq -0x8(%rbp), %rax
movb $0x1, 0x1ce6(%rax)
movq -0x8(%rbp), %rax
cmpl $0x0, 0x1ca0(%rax)
je 0xce522
movq -0x8(%rbp), %rax
movl 0x1ca4(%rax), %eax
movq -0x8(%rbp), %rcx
cmpl 0x1ca0(%rcx), %eax
jne 0xce501
jmp 0xce520
leaq 0xa915e(%rip), %rdi     # 0x177666
leaq 0xa49fa(%rip), %rsi     # 0x172f09
movl $0x22f5, %edx           # imm = 0x22F5
leaq 0xa90f5(%rip), %rcx     # 0x177610
callq 0xd180
jmp 0xce522
movq -0x8(%rbp), %rax
movb $0x0, 0x1d00(%rax)
movq -0x8(%rbp), %rax
cmpl $0x0, 0x1cc0(%rax)
je 0xce56c
movq -0x8(%rbp), %rax
movl 0x1cc0(%rax), %ecx
movq -0x8(%rbp), %rax
movl %ecx, 0x1cac(%rax)
movq -0x8(%rbp), %rax
movl %ecx, 0x1ca8(%rax)
movq -0x8(%rbp), %rax
movl %ecx, 0x1ca4(%rax)
movq -0x8(%rbp), %rax
movl %ecx, 0x1ca0(%rax)
movq -0x8(%rbp), %rax
movl $0x0, 0x1cc0(%rax)
movq -0x8(%rbp), %rax
cmpl $0x0, 0x1d08(%rax)
jne 0xce716
movq -0x8(%rbp), %rax
movl $0xffffffff, 0x1d10(%rax) # imm = 0xFFFFFFFF
movq -0x8(%rbp), %rax
movl $0x0, 0x1d04(%rax)
movq -0x8(%rbp), %rax
cmpq $0x0, 0x1c90(%rax)
je 0xce6fd
movq -0x8(%rbp), %rax
cmpq $0x0, 0x1dc0(%rax)
jne 0xce6fd
movq -0x8(%rbp), %rax
movq 0x1c90(%rax), %rax
movl 0xc(%rax), %eax
andl $0x40000, %eax          # imm = 0x40000
cmpl $0x0, %eax
jne 0xce6fd
movl $0x3, -0x38(%rbp)
xorl %edi, %edi
callq 0xee7f0
testb $0x1, %al
jne 0xce62f
movl $0x4, %edi
movl $0x3, %esi
callq 0xee780
testb $0x1, %al
jne 0xce621
movl $0x11, %edi
movl $0x3, %esi
callq 0xee780
testb $0x1, %al
jne 0xce621
jmp 0xce62f
movq -0x8(%rbp), %rax
movl $0x0, 0x1d10(%rax)
movl $0x1, %edi
callq 0xee7f0
testb $0x1, %al
jne 0xce673
movl $0x5, %edi
movl $0x3, %esi
callq 0xee780
testb $0x1, %al
jne 0xce665
movl $0x12, %edi
movl $0x3, %esi
callq 0xee780
testb $0x1, %al
jne 0xce665
jmp 0xce673
movq -0x8(%rbp), %rax
movl $0x1, 0x1d10(%rax)
movl $0x2, %edi
callq 0xee7f0
testb $0x1, %al
jne 0xce6b7
movl $0x6, %edi
movl $0x3, %esi
callq 0xee780
testb $0x1, %al
jne 0xce6a9
movl $0x13, %edi
movl $0x3, %esi
callq 0xee780
testb $0x1, %al
jne 0xce6a9
jmp 0xce6b7
movq -0x8(%rbp), %rax
movl $0x2, 0x1d10(%rax)
movl $0x3, %edi
callq 0xee7f0
testb $0x1, %al
jne 0xce6fb
movl $0x7, %edi
movl $0x3, %esi
callq 0xee780
testb $0x1, %al
jne 0xce6ed
movl $0x14, %edi
movl $0x3, %esi
callq 0xee780
testb $0x1, %al
jne 0xce6ed
jmp 0xce6fb
movq -0x8(%rbp), %rax
movl $0x3, 0x1d10(%rax)
jmp 0xce6fd
movq -0x8(%rbp), %rax
movl 0x1d10(%rax), %ecx
movq -0x8(%rbp), %rax
movl %ecx, 0x1d18(%rax)
jmp 0xce7a8
movq -0x8(%rbp), %rcx
xorl %eax, %eax
cmpl $-0x1, 0x1d10(%rcx)
movb %al, -0xed(%rbp)
je 0xce73f
movq -0x8(%rbp), %rax
cmpl $-0x1, 0x1d18(%rax)
setne %al
movb %al, -0xed(%rbp)
movb -0xed(%rbp), %al
testb $0x1, %al
jne 0xce74b
jmp 0xce74d
jmp 0xce76c
leaq 0xa8f39(%rip), %rdi     # 0x17768d
leaq 0xa47ae(%rip), %rsi     # 0x172f09
movl $0x2310, %edx           # imm = 0x2310
leaq 0xa8ea9(%rip), %rcx     # 0x177610
callq 0xd180
movq -0x8(%rbp), %rax
cmpl $0x1, 0x1d08(%rax)
jne 0xce77b
jmp 0xce79a
leaq 0xa8f4e(%rip), %rdi     # 0x1776d0
leaq 0xa4780(%rip), %rsi     # 0x172f09
movl $0x2311, %edx           # imm = 0x2311
leaq 0xa8e7b(%rip), %rcx     # 0x177610
callq 0xd180
movq -0x8(%rbp), %rax
movl $0x2, 0x1d08(%rax)
xorps %xmm0, %xmm0
movss %xmm0, -0x3c(%rbp)
testb $0x1, -0x11(%rbp)
je 0xce7c0
callq 0xe7470
movss %xmm0, -0x3c(%rbp)
movq -0x8(%rbp), %rax
cmpl $-0x1, 0x1d10(%rax)
je 0xce800
movq -0x8(%rbp), %rax
movb $0x1, 0x1d00(%rax)
movq -0x10(%rbp), %rax
movl 0x3b8(%rax), %ecx
movq -0x8(%rbp), %rax
movl %ecx, 0x1d0c(%rax)
movq -0x8(%rbp), %rax
movl 0x1d10(%rax), %ecx
movq -0x8(%rbp), %rax
movl %ecx, 0x1d14(%rax)
movq -0x8(%rbp), %rax
testb $0x1, 0x1d00(%rax)
je 0xce849
movq -0x8(%rbp), %rax
cmpl $0x0, 0x1c98(%rax)
jne 0xce849
movq -0x8(%rbp), %rax
movb $0x1, 0x1cea(%rax)
movq -0x8(%rbp), %rax
movb $0x1, 0x1ce9(%rax)
movq -0x8(%rbp), %rax
movl $0x0, 0x1cec(%rax)
movq -0x8(%rbp), %rax
movb $0x0, 0x1ce6(%rax)
callq 0xdb260
movq -0x8(%rbp), %rax
cmpq $0x0, 0x1c90(%rax)
je 0xceb1b
movq -0x8(%rbp), %rax
movq 0x1c90(%rax), %rax
movl 0xc(%rax), %eax
andl $0x40000, %eax          # imm = 0x40000
cmpl $0x0, %eax
jne 0xceb1b
movq -0x8(%rbp), %rax
cmpq $0x0, 0x1dc0(%rax)
jne 0xceb1b
movq -0x8(%rbp), %rax
movq 0x1c90(%rax), %rax
movq %rax, -0x48(%rbp)
movq -0x48(%rbp), %rdi
callq 0xebbf0
movss 0xa3eca(%rip), %xmm1    # 0x172778
mulss %xmm1, %xmm0
movq -0x10(%rbp), %rax
movss 0x10(%rax), %xmm1
mulss %xmm1, %xmm0
movss 0xa3711(%rip), %xmm1    # 0x171fd8
addss %xmm1, %xmm0
cvttss2si %xmm0, %eax
cvtsi2ss %eax, %xmm0
movss %xmm0, -0x4c(%rbp)
movq -0x48(%rbp), %rax
cmpl $0x0, 0x150(%rax)
jne 0xcea5b
movq -0x48(%rbp), %rax
testb $0x1, 0x15d(%rax)
je 0xcea5b
movq -0x8(%rbp), %rax
testb $0x1, 0x1d00(%rax)
je 0xcea5b
movq -0x8(%rbp), %rax
cmpl $0x0, 0x1d10(%rax)
je 0xce929
movq -0x8(%rbp), %rax
cmpl $0x1, 0x1d10(%rax)
jne 0xce9b2
movq -0x48(%rbp), %rax
movq %rax, -0x108(%rbp)
movq -0x48(%rbp), %rax
movss 0x5c(%rax), %xmm0
movss %xmm0, -0xfc(%rbp)
movq -0x8(%rbp), %rax
movl 0x1d10(%rax), %eax
movss 0xa3629(%rip), %xmm0    # 0x171f80
movss 0xa22dd(%rip), %xmm1    # 0x170c3c
movss %xmm1, -0xf8(%rbp)
cmpl $0x0, %eax
movss %xmm0, -0xf4(%rbp)
je 0xce984
movss -0xf8(%rbp), %xmm0
movss %xmm0, -0xf4(%rbp)
movss -0xfc(%rbp), %xmm1
movss -0xf4(%rbp), %xmm0
movss -0x4c(%rbp), %xmm2
mulss %xmm2, %xmm0
addss %xmm1, %xmm0
callq 0xc2f90
movq -0x108(%rbp), %rdi
callq 0xdd8e0
movq -0x8(%rbp), %rax
cmpl $0x2, 0x1d10(%rax)
je 0xce9d0
movq -0x8(%rbp), %rax
cmpl $0x3, 0x1d10(%rax)
jne 0xcea59
movq -0x48(%rbp), %rax
movq %rax, -0x120(%rbp)
movq -0x48(%rbp), %rax
movss 0x60(%rax), %xmm0
movss %xmm0, -0x114(%rbp)
movq -0x8(%rbp), %rax
movl 0x1d10(%rax), %eax
movss 0xa3582(%rip), %xmm0    # 0x171f80
movss 0xa2236(%rip), %xmm1    # 0x170c3c
movss %xmm1, -0x110(%rbp)
cmpl $0x2, %eax
movss %xmm0, -0x10c(%rbp)
je 0xcea2b
movss -0x110(%rbp), %xmm0
movss %xmm0, -0x10c(%rbp)
movss -0x114(%rbp), %xmm1
movss -0x10c(%rbp), %xmm0
movss -0x4c(%rbp), %xmm2
mulss %xmm2, %xmm0
addss %xmm1, %xmm0
callq 0xc2f90
movq -0x120(%rbp), %rdi
callq 0xdd920
jmp 0xcea5b
movl $0x4, %edi
xorl %esi, %esi
movss 0xa3d12(%rip), %xmm0    # 0x17277c
movss 0xa356a(%rip), %xmm1    # 0x171fdc
callq 0xdf970
movlpd %xmm0, -0x54(%rbp)
movss -0x54(%rbp), %xmm0
xorps %xmm1, %xmm1
ucomiss %xmm1, %xmm0
jne 0xcea8d
jp 0xcea8d
jmp 0xcead1
movq -0x48(%rbp), %rax
testb $0x1, 0x8c(%rax)
je 0xcead1
movq -0x48(%rbp), %rax
movq %rax, -0x128(%rbp)
movq -0x48(%rbp), %rax
movss 0x5c(%rax), %xmm1
movss -0x54(%rbp), %xmm0
movss -0x4c(%rbp), %xmm2
mulss %xmm2, %xmm0
addss %xmm1, %xmm0
callq 0xc2f90
movq -0x128(%rbp), %rdi
callq 0xdd8e0
movss -0x50(%rbp), %xmm0
xorps %xmm1, %xmm1
ucomiss %xmm1, %xmm0
jne 0xceae2
jp 0xceae2
jmp 0xceb19
movq -0x48(%rbp), %rax
movq %rax, -0x130(%rbp)
movq -0x48(%rbp), %rax
movss 0x60(%rax), %xmm1
movss -0x50(%rbp), %xmm0
movss -0x4c(%rbp), %xmm2
mulss %xmm2, %xmm0
addss %xmm1, %xmm0
callq 0xc2f90
movq -0x130(%rbp), %rdi
callq 0xdd920
jmp 0xceb1b
movq -0x8(%rbp), %rdi
addq $0x1d20, %rdi           # imm = 0x1D20
callq 0xedc90
movq -0x8(%rbp), %rdi
addq $0x1d50, %rdi           # imm = 0x1D50
callq 0xedc90
movq -0x8(%rbp), %rdi
addq $0x1d80, %rdi           # imm = 0x1D80
callq 0xedc90
movq -0x8(%rbp), %rax
testb $0x1, 0x1d00(%rax)
je 0xced52
movq -0x8(%rbp), %rax
cmpl $0x4, 0x1cc4(%rax)
jne 0xced52
movq -0x8(%rbp), %rax
cmpl $0x0, 0x1cdc(%rax)
jne 0xced52
movq -0x8(%rbp), %rax
movq 0x1c90(%rax), %rax
movq %rax, -0x60(%rbp)
movq -0x60(%rbp), %rsi
movq %rsi, %rdi
addq $0x218, %rdi            # imm = 0x218
addq $0x10, %rsi
callq 0xc3c00
movlpd %xmm0, -0x80(%rbp)
leaq -0x88(%rbp), %rdi
movq %rdi, -0x148(%rbp)
movss 0xa207d(%rip), %xmm1    # 0x170c3c
movss %xmm1, -0x13c(%rbp)
movaps %xmm1, %xmm0
callq 0xbf4c0
movq -0x148(%rbp), %rsi
leaq -0x80(%rbp), %rdi
callq 0xc3c00
movlpd %xmm0, -0x78(%rbp)
movq -0x60(%rbp), %rsi
movq %rsi, %rdi
addq $0x220, %rdi            # imm = 0x220
addq $0x10, %rsi
callq 0xc3c00
movss -0x13c(%rbp), %xmm1
movlpd %xmm0, -0x98(%rbp)
leaq -0xa0(%rbp), %rdi
movq %rdi, -0x138(%rbp)
movaps %xmm1, %xmm0
callq 0xbf4c0
movq -0x138(%rbp), %rsi
leaq -0x98(%rbp), %rdi
callq 0xc41b0
movlpd %xmm0, -0x90(%rbp)
leaq -0x70(%rbp), %rdi
leaq -0x78(%rbp), %rsi
leaq -0x90(%rbp), %rdx
callq 0xe8660
movq -0x60(%rbp), %rsi
addq $0x3b8, %rsi            # imm = 0x3B8
movq -0x8(%rbp), %rax
movl 0x1cdc(%rax), %eax
shlq $0x4, %rax
addq %rax, %rsi
leaq -0x70(%rbp), %rdi
callq 0xe8a40
testb $0x1, %al
jne 0xced50
movq -0x60(%rbp), %rdi
callq 0xebbf0
movss 0xa334a(%rip), %xmm1    # 0x171fd8
mulss %xmm1, %xmm0
movss %xmm0, -0xa4(%rbp)
leaq -0x70(%rbp), %rdi
callq 0xeb840
movss -0xa4(%rbp), %xmm1
callq 0xc4620
movd %xmm0, %eax
xorl $0x80000000, %eax       # imm = 0x80000000
movd %eax, %xmm0
movss %xmm0, -0x14c(%rbp)
leaq -0x70(%rbp), %rdi
callq 0xeb860
movss -0xa4(%rbp), %xmm1
callq 0xc4620
movaps %xmm0, %xmm1
movss -0x14c(%rbp), %xmm0
movd %xmm1, %eax
xorl $0x80000000, %eax       # imm = 0x80000000
movd %eax, %xmm1
leaq -0xac(%rbp), %rdi
callq 0xbf4c0
leaq -0x70(%rbp), %rdi
leaq -0xac(%rbp), %rsi
callq 0xe89d0
movq -0x60(%rbp), %rdi
addq $0x3b8, %rdi            # imm = 0x3B8
movq -0x8(%rbp), %rax
movl 0x1cdc(%rax), %eax
shlq $0x4, %rax
addq %rax, %rdi
leaq -0x70(%rbp), %rsi
callq 0xeb8d0
movq -0x8(%rbp), %rax
movl $0x0, 0x1c9c(%rax)
movq -0x8(%rbp), %rax
movl $0x0, 0x1c98(%rax)
jmp 0xced52
movq -0x8(%rbp), %rax
cmpq $0x0, 0x1c90(%rax)
je 0xced99
movq -0x8(%rbp), %rax
movq 0x1c90(%rax), %rax
addq $0x3b8, %rax            # imm = 0x3B8
movq -0x8(%rbp), %rcx
movl 0x1cdc(%rcx), %ecx
shlq $0x4, %rcx
addq %rcx, %rax
movq (%rax), %rcx
movq %rcx, -0xbc(%rbp)
movq 0x8(%rax), %rax
movq %rax, -0xb4(%rbp)
jmp 0xcedb1
leaq -0xbc(%rbp), %rdi
xorps %xmm3, %xmm3
movaps %xmm3, %xmm0
movaps %xmm3, %xmm1
movaps %xmm3, %xmm2
callq 0xec090
movq -0x8(%rbp), %rax
cmpq $0x0, 0x1c90(%rax)
je 0xcee21
movq -0x8(%rbp), %rax
movq 0x1c90(%rax), %rdi
addq $0x10, %rdi
leaq -0xbc(%rbp), %rsi
callq 0xc41b0
movlpd %xmm0, -0xd4(%rbp)
movq -0x8(%rbp), %rax
movq 0x1c90(%rax), %rdi
addq $0x10, %rdi
leaq -0xb4(%rbp), %rsi
callq 0xc41b0
movlpd %xmm0, -0xdc(%rbp)
leaq -0xcc(%rbp), %rdi
leaq -0xd4(%rbp), %rsi
leaq -0xdc(%rbp), %rdx
callq 0xe8660
jmp 0xcee36
callq 0xd7920
movlpd %xmm0, -0xcc(%rbp)
movlpd %xmm1, -0xc4(%rbp)
movq -0x8(%rbp), %rax
movq -0xcc(%rbp), %rcx
movq %rcx, 0x1cc8(%rax)
movq -0xc4(%rbp), %rcx
movq %rcx, 0x1cd0(%rax)
movq -0x8(%rbp), %rdi
addq $0x1cc8, %rdi           # imm = 0x1CC8
movss -0x3c(%rbp), %xmm0
callq 0xee830
movq -0x8(%rbp), %rax
movss 0xa1dc5(%rip), %xmm0    # 0x170c3c
addss 0x1cc8(%rax), %xmm0
movq -0x8(%rbp), %rax
movss 0x1cd0(%rax), %xmm1
callq 0xc4620
movq -0x8(%rbp), %rax
movss %xmm0, 0x1cc8(%rax)
movq -0x8(%rbp), %rax
movss 0x1cc8(%rax), %xmm0
movq -0x8(%rbp), %rax
movss %xmm0, 0x1cd0(%rax)
movq -0x8(%rbp), %rdi
addq $0x1cc8, %rdi           # imm = 0x1CC8
callq 0xecc10
xorb $-0x1, %al
testb $0x1, %al
jne 0xceecc
jmp 0xceece
jmp 0xceeed
leaq 0xa8834(%rip), %rdi     # 0x177709
leaq 0xa402d(%rip), %rsi     # 0x172f09
movl $0x2360, %edx           # imm = 0x2360
leaq 0xa8728(%rip), %rcx     # 0x177610
callq 0xd180
movq -0x8(%rbp), %rax
movl $0x0, 0x1cd8(%rax)
addq $0x150, %rsp            # imm = 0x150
popq %rbp
retq
nopw %cs:(%rax,%rax)